JS Design System v0.6

유의사항

화면 하단이나 폼 옆에 두는 유의사항·안내 문구입니다. 읽지 않아도 진행할 수 있는 정보를 담습니다.

Composition

이 패턴이 조합하는 컴포넌트입니다. 세부 옵션은 각 컴포넌트 페이지를 참고하세요.

1. 기본

제목 + 불릿 3~5개. 배경 subtle, 보더 없음.

유의사항
  • 정책은 배포 후 에이전트의 다음 체크인(최대 5분)에 적용됩니다.
  • 차단된 파일은 격리 저장소에 30일 보관 후 자동 삭제됩니다.
  • 예외 목록은 해시 또는 경로 기준이며 와일드카드(*)를 지원합니다.

2. 주의

되돌리기 어려운 영향은 .warning. 즉시 조치가 필요하면 Notification(danger).

정책 삭제 전 확인
  • 삭제한 정책이 적용된 에이전트는 기본 정책으로 돌아갑니다.
  • 감사 로그는 유지되지만 정책 이름은 ID 로 표시됩니다.

3. 접힌 유의사항

길거나 부차적인 안내는 Accordion 으로 접습니다.

유의사항 3개
  • 정책은 배포 후 최대 5분 내 적용됩니다.
  • 격리 파일은 30일 보관됩니다.
  • 예외는 해시·경로 기준입니다.

Usage

React: @jiran/ds-react 패키지를 설치하고 style.css 를 한 번 import 하면 위 React 탭 코드를 그대로 쓸 수 있습니다(React Package). HTML: assets/style.css 를 연결하고(일부만 필요하면 아래 컴포넌트 CSS 복사), 동작이 필요하면 assets/ds.js 를 함께 넣습니다 — 이 페이지의 프리뷰가 그 스크립트로 동작합니다. 색은 전부 토큰(var(--accent) 등)을 참조하므로 --accent-* 만 제품 컬러로 바꾸면 됩니다.

React @jiran/ds-react

npm i @jiran/ds-react

// main.tsx — 앱 진입점에서 한 번
import "@jiran/ds-react/style.css";

// 컴포넌트
import { Notes, Notice, Toast, ToastStack, Banner, ToastProvider, useToast, Accordion, AccordionGroup } from "@jiran/ds-react";

HTML

<!-- 1) 토큰 + 전체 컴포넌트 스타일 한 번에 연결 -->
<link rel="stylesheet" href="assets/style.css">
<!-- 동작(드롭다운·탭·달력·표 정렬/선택·토스트 등) — 순수 JS 한 파일. React 제품은 불필요 -->
<script src="assets/ds.js" defer></script>

<!-- 2) 또는 아래 "Component CSS" 만 프로젝트 CSS 에 붙이고,
        :root 토큰은 Foundations › Design Token 에서 복사 -->

Component CSS .notice, .toast, .toast-stack, .banner, .accordion, .accordion-group, .notes

/* JS Design System v0.6 · .notice, .toast, .toast-stack, .banner, .accordion, .accordion-group, .notes · 토큰(var(--*))은 assets/style.css :root 참고 */
.accordion{border:1px solid var(--border-default);border-radius:var(--radius-lg);background:var(--bg-surface);width:100%;interpolate-size:allow-keywords}
.accordion summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;font-weight:600;font-size:16px;line-height:24px;cursor:pointer}
.accordion summary::-webkit-details-marker{display:none}
.accordion summary::after{content:"";width:16px;height:16px;flex:none;background:var(--text-secondary);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2224%22 height=%2224%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 %3E%3Cpath d=%22M6 9l6 6l6 -6%22 /%3E%3C/svg%3E") center/contain no-repeat;mask:url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2224%22 height=%2224%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22black%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22 %3E%3Cpath d=%22M6 9l6 6l6 -6%22 /%3E%3C/svg%3E") center/contain no-repeat;transition:transform var(--motion-fast)}
.accordion[open] summary::after{transform:rotate(180deg)}
.accordion summary small{font-weight:400;color:var(--text-tertiary);margin-left:auto;font-size:12px}
.accordion summary>svg{flex:none}
.accordion .body{padding:0 20px 16px;font-size:14px;color:var(--text-secondary);line-height:1.6}
.accordion.disabled{opacity:.5;pointer-events:none}
.accordion.flat{border:0;border-radius:0;border-bottom:1px solid var(--border-default)}
.accordion.flat summary{padding:14px 4px}
.accordion.flat .body{padding:0 4px 16px}
.accordion.flat:last-child{border-bottom:0}
.accordion-group{display:flex;flex-direction:column;gap:8px;width:100%}
.accordion-group.flat{gap:0;background:var(--bg-surface);padding:0 20px;border-radius:var(--radius-lg)}
.accordion::details-content{height:0;overflow:hidden;transition:height var(--motion-base),content-visibility var(--motion-base);transition-behavior:allow-discrete}
.accordion[open]::details-content{height:auto}
.notice{display:flex;gap:12px;align-items:flex-start;border-radius:var(--radius-lg);padding:14px 18px;font-size:14px;border:1px solid var(--border-default);width:100%;background:var(--bg-surface);line-height:1.55}
.notice b{display:block;margin-bottom:2px}
.notice .ico{flex:none;width:20px;height:20px;display:grid;place-items:center;color:var(--info-text);margin-top:1px}
.notice .ico svg{width:20px;height:20px}
.notice .close{margin-left:auto;flex:none;border:0;background:transparent;color:var(--text-tertiary);font:inherit;line-height:1;cursor:pointer;padding:2px;display:grid;place-items:center}
.notice .close svg{width:14px;height:14px}
.notice .close:hover{color:var(--text-primary)}
.notice .actions{display:flex;gap:8px;margin-top:8px}
.notice.info{background:var(--info-subtle);border-color:color-mix(in srgb,var(--info) 30%,transparent)}
.notice.success{background:var(--success-subtle);border-color:color-mix(in srgb,var(--success) 30%,transparent)}
.notice.success .ico{color:var(--success-text)}
.notice.warning{background:var(--warning-subtle);border-color:color-mix(in srgb,var(--warning) 30%,transparent)}
.notice.warning .ico{color:var(--warning-text)}
.notice.danger{background:var(--danger-subtle);border-color:color-mix(in srgb,var(--danger) 30%,transparent)}
.notice.danger .ico{color:var(--danger-text)}
.toast{display:inline-flex;align-items:center;gap:12px;width:360px;max-width:100%;padding:12px 16px;border-radius:var(--radius-lg);background:var(--bg-inverse);color:var(--text-inverse);font-size:14px;box-shadow:var(--shadow-3)}
.toast .ico{flex:none;width:20px;height:20px;display:grid;place-items:center;color:var(--success)}
.toast .ico svg{width:20px;height:20px}
.toast.danger .ico{color:var(--danger)}
.toast .action{margin-left:auto;background:none;border:0;color:var(--accent-inverse);font:inherit;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap}
.toast .action:hover{text-decoration:underline}
.toast-stack{display:flex;flex-direction:column;gap:8px;align-items:flex-end}
.toast-stack.fixed{position:fixed;right:24px;bottom:24px;z-index:110}
.banner{display:flex;align-items:center;gap:12px;width:100%;padding:10px 20px;background:var(--accent);color:var(--accent-on);font-size:14px;font-weight:500}
.banner .btn{margin-left:auto}
.banner.warning{background:var(--warning);color:var(--warning-on)}
.banner.danger{background:var(--danger);color:var(--danger-on)}
.notes{width:100%;background:var(--bg-subtle);border-radius:var(--radius-lg);padding:20px 24px;font-size:14px;color:var(--text-secondary);line-height:1.6}
.notes b{display:block;color:var(--text-primary);margin-bottom:8px;font-size:14px}
.notes ul{margin:0;padding-left:1.2em;max-width:none}
.notes li{margin-bottom:4px}
.notes.warning{background:var(--warning-subtle)}