@designbasekorea/ui-wc 0.8.13 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/LICENSE-PAYMENT-LOGOS.md +437 -0
- package/README.md +51 -3
- package/dist/esm/components/db-achievement-list.d.ts +31 -0
- package/dist/esm/components/db-achievement-list.js +1 -0
- package/dist/esm/components/db-achievement-modal.d.ts +38 -0
- package/dist/esm/components/db-achievement-modal.js +1 -0
- package/dist/esm/components/db-ai-chain-of-thought.d.ts +14 -0
- package/dist/esm/components/db-ai-chain-of-thought.js +1 -0
- package/dist/esm/components/db-ai-chat.js +1 -1
- package/dist/esm/components/db-ai-checkpoint.d.ts +14 -0
- package/dist/esm/components/db-ai-checkpoint.js +1 -0
- package/dist/esm/components/db-ai-confirmation.d.ts +14 -0
- package/dist/esm/components/db-ai-confirmation.js +1 -0
- package/dist/esm/components/db-ai-context.d.ts +15 -0
- package/dist/esm/components/db-ai-context.js +1 -0
- package/dist/esm/components/db-ai-conversation.d.ts +21 -0
- package/dist/esm/components/db-ai-conversation.js +1 -0
- package/dist/esm/components/db-ai-execution-quote.d.ts +41 -0
- package/dist/esm/components/db-ai-execution-quote.js +1 -0
- package/dist/esm/components/db-ai-file-tree.d.ts +14 -0
- package/dist/esm/components/db-ai-file-tree.js +1 -0
- package/dist/esm/components/db-ai-glow.d.ts +1 -1
- package/dist/esm/components/db-ai-inline-citation.d.ts +16 -0
- package/dist/esm/components/db-ai-inline-citation.js +1 -0
- package/dist/esm/components/db-ai-message.d.ts +19 -0
- package/dist/esm/components/db-ai-message.js +1 -0
- package/dist/esm/components/db-ai-model-select.d.ts +36 -0
- package/dist/esm/components/db-ai-model-select.js +1 -0
- package/dist/esm/components/db-ai-plan.d.ts +14 -0
- package/dist/esm/components/db-ai-plan.js +1 -0
- package/dist/esm/components/db-ai-queue.d.ts +14 -0
- package/dist/esm/components/db-ai-queue.js +1 -0
- package/dist/esm/components/db-ai-reasoning.d.ts +14 -0
- package/dist/esm/components/db-ai-reasoning.js +1 -0
- package/dist/esm/components/db-ai-sources.d.ts +14 -0
- package/dist/esm/components/db-ai-sources.js +1 -0
- package/dist/esm/components/db-ai-stack-trace.d.ts +14 -0
- package/dist/esm/components/db-ai-stack-trace.js +1 -0
- package/dist/esm/components/db-ai-subagent.d.ts +14 -0
- package/dist/esm/components/db-ai-subagent.js +1 -0
- package/dist/esm/components/db-ai-task-status.d.ts +26 -0
- package/dist/esm/components/db-ai-task-status.js +1 -0
- package/dist/esm/components/db-ai-task.d.ts +14 -0
- package/dist/esm/components/db-ai-task.js +1 -0
- package/dist/esm/components/db-ai-terminal.d.ts +14 -0
- package/dist/esm/components/db-ai-terminal.js +1 -0
- package/dist/esm/components/db-ai-test-results.d.ts +14 -0
- package/dist/esm/components/db-ai-test-results.js +1 -0
- package/dist/esm/components/db-ai-tool.d.ts +14 -0
- package/dist/esm/components/db-ai-tool.js +1 -0
- package/dist/esm/components/db-attachment-list.d.ts +38 -0
- package/dist/esm/components/db-attachment-list.js +1 -0
- package/dist/esm/components/db-bento-card.d.ts +55 -0
- package/dist/esm/components/db-bento-card.js +1 -0
- package/dist/esm/components/db-bento-grid.d.ts +25 -0
- package/dist/esm/components/db-bento-grid.js +1 -0
- package/dist/esm/components/db-boarding-pass-stack.d.ts +49 -0
- package/dist/esm/components/db-boarding-pass-stack.js +1 -0
- package/dist/esm/components/db-boarding-pass.d.ts +32 -0
- package/dist/esm/components/db-boarding-pass.js +1 -0
- package/dist/esm/components/db-border-beam.d.ts +52 -0
- package/dist/esm/components/db-border-beam.js +1 -0
- package/dist/esm/components/db-button.d.ts +1 -1
- package/dist/esm/components/db-button.js +1 -1
- package/dist/esm/components/db-chat-composer.d.ts +2 -0
- package/dist/esm/components/db-chat-composer.js +1 -1
- package/dist/esm/components/db-chat-message.d.ts +1 -1
- package/dist/esm/components/db-chat-orb.d.ts +1 -1
- package/dist/esm/components/db-chat-widget.d.ts +1 -1
- package/dist/esm/components/db-color-picker.d.ts +1 -0
- package/dist/esm/components/db-color-picker.js +1 -1
- package/dist/esm/components/db-confetti.d.ts +90 -0
- package/dist/esm/components/db-confetti.js +1 -0
- package/dist/esm/components/db-context-bar.d.ts +13 -0
- package/dist/esm/components/db-context-bar.js +1 -0
- package/dist/esm/components/db-credit-balance.d.ts +17 -0
- package/dist/esm/components/db-credit-balance.js +1 -0
- package/dist/esm/components/db-credit-card.d.ts +51 -0
- package/dist/esm/components/db-credit-card.js +1 -0
- package/dist/esm/components/db-credit-dropdown.d.ts +31 -0
- package/dist/esm/components/db-credit-dropdown.js +1 -0
- package/dist/esm/components/db-credit-history.d.ts +31 -0
- package/dist/esm/components/db-credit-history.js +1 -0
- package/dist/esm/components/db-credit-recharge-modal.d.ts +35 -0
- package/dist/esm/components/db-credit-recharge-modal.js +1 -0
- package/dist/esm/components/db-credit-recharge.d.ts +39 -0
- package/dist/esm/components/db-credit-recharge.js +1 -0
- package/dist/esm/components/db-design-canvas.d.ts +137 -0
- package/dist/esm/components/db-design-canvas.js +1 -0
- package/dist/esm/components/db-design-toolbar.d.ts +60 -0
- package/dist/esm/components/db-design-toolbar.js +1 -0
- package/dist/esm/components/db-device-mockup.d.ts +100 -0
- package/dist/esm/components/db-device-mockup.js +1 -0
- package/dist/esm/components/db-download-progress.d.ts +1 -1
- package/dist/esm/components/db-drawer.js +1 -1
- package/dist/esm/components/db-dropdown.d.ts +2 -0
- package/dist/esm/components/db-dropdown.js +1 -1
- package/dist/esm/components/db-email-verify.d.ts +1 -1
- package/dist/esm/components/db-file-uploader.d.ts +10 -0
- package/dist/esm/components/db-filter-bar.d.ts +34 -0
- package/dist/esm/components/db-filter-bar.js +1 -0
- package/dist/esm/components/db-flight-status.d.ts +33 -0
- package/dist/esm/components/db-flight-status.js +1 -0
- package/dist/esm/components/db-floating-action-button.d.ts +24 -14
- package/dist/esm/components/db-floating-action-button.js +1 -1
- package/dist/esm/components/db-footer.d.ts +3 -0
- package/dist/esm/components/db-footer.js +1 -1
- package/dist/esm/components/db-glyph-matrix.d.ts +58 -0
- package/dist/esm/components/db-glyph-matrix.js +1 -0
- package/dist/esm/components/db-icons.d.ts +1 -1
- package/dist/esm/components/db-icons.js +1 -1
- package/dist/esm/components/db-menu-item.d.ts +2 -0
- package/dist/esm/components/db-menu-item.js +1 -1
- package/dist/esm/components/db-modal.d.ts +1 -1
- package/dist/esm/components/db-modal.js +1 -1
- package/dist/esm/components/db-navbar.d.ts +3 -1
- package/dist/esm/components/db-navbar.js +1 -1
- package/dist/esm/components/db-navigation-rail.d.ts +1 -1
- package/dist/esm/components/db-node.d.ts +83 -0
- package/dist/esm/components/db-node.js +1 -0
- package/dist/esm/components/db-notification-dropdown.d.ts +30 -0
- package/dist/esm/components/db-notification-dropdown.js +1 -0
- package/dist/esm/components/db-notification-inbox.d.ts +25 -0
- package/dist/esm/components/db-notification-inbox.js +1 -0
- package/dist/esm/components/db-otp-input.d.ts +1 -1
- package/dist/esm/components/db-phone-verify.d.ts +1 -1
- package/dist/esm/components/db-plan-overview.d.ts +26 -0
- package/dist/esm/components/db-plan-overview.js +1 -0
- package/dist/esm/components/db-popover.js +1 -1
- package/dist/esm/components/db-progressive-blur.d.ts +35 -0
- package/dist/esm/components/db-progressive-blur.js +1 -0
- package/dist/esm/components/db-receipt.d.ts +37 -0
- package/dist/esm/components/db-receipt.js +1 -0
- package/dist/esm/components/db-search-bar.js +1 -1
- package/dist/esm/components/db-segment-control.js +1 -1
- package/dist/esm/components/db-select.js +1 -1
- package/dist/esm/components/db-sidebar.d.ts +14 -1
- package/dist/esm/components/db-sidebar.js +1 -1
- package/dist/esm/components/db-split-view.d.ts +2 -0
- package/dist/esm/components/db-split-view.js +1 -1
- package/dist/esm/components/db-textarea.js +1 -1
- package/dist/esm/components/db-ticket.d.ts +18 -0
- package/dist/esm/components/db-ticket.js +1 -0
- package/dist/esm/components/db-time-picker.d.ts +1 -1
- package/dist/esm/components/db-tool-button.d.ts +57 -0
- package/dist/esm/components/db-tool-button.js +1 -0
- package/dist/esm/components/db-tweet-card.d.ts +101 -0
- package/dist/esm/components/db-tweet-card.js +1 -0
- package/dist/esm/components/db-two-factor.d.ts +1 -1
- package/dist/esm/components/db-voice-control.d.ts +25 -0
- package/dist/esm/components/db-voice-control.js +1 -0
- package/dist/esm/components/db-workspace-invite-modal.d.ts +51 -0
- package/dist/esm/components/db-workspace-invite-modal.js +1 -0
- package/dist/esm/components/db-workspace-members.d.ts +36 -0
- package/dist/esm/components/db-workspace-members.js +1 -0
- package/dist/esm/components/device-mockup-style.js +1 -0
- package/dist/esm/components/flight-route.js +1 -0
- package/dist/esm/components/node-style.js +1 -0
- package/dist/esm/components/paper-card.d.ts +26 -0
- package/dist/esm/components/paper-card.js +1 -0
- package/dist/esm/components/random-gradient-palettes.d.ts +4 -0
- package/dist/esm/core/ai-element.d.ts +47 -0
- package/dist/esm/core/ai-element.js +1 -0
- package/dist/esm/core/credit-ui.js +1 -0
- package/dist/esm/core/i18n.d.ts +153 -0
- package/dist/esm/core/i18n.js +1 -1
- package/dist/esm/core/notification-ui.d.ts +17 -0
- package/dist/esm/core/notification-ui.js +1 -0
- package/dist/esm/helpers/payment-brands.d.ts +56 -0
- package/dist/esm/helpers/payment-brands.js +1 -0
- package/dist/esm/helpers/toast.d.ts +2 -3
- package/dist/esm/index.d.ts +62 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@designbasekorea/ui-contracts/dist/components.js +1 -1
- package/dist/esm/ui-contracts/dist/components.d.d.ts +76 -0
- package/dist/esm/ui-contracts/dist/primitives.d.d.ts +21 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2149 -23
- package/dist/index.esm.js +1 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.ts +786 -6727
- package/dist/react/index.esm.js +1 -1
- package/package.json +13 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# 변경 이력
|
|
2
2
|
|
|
3
|
+
## 0.9.0 - 2026-10-22
|
|
4
|
+
|
|
5
|
+
컴포넌트 패키지 `@designbasekorea/ui-wc` 단독 릴리스입니다. `@designbasekorea/blocks`, 페이지 템플릿과 갤러리 서비스는 이 npm 배포에 포함하지 않습니다.
|
|
6
|
+
|
|
7
|
+
### 주요 추가 및 수정
|
|
8
|
+
|
|
9
|
+
- 배포 타입: 전체·개별 컴포넌트·React 경로가 같은 선언을 참조하도록 정리하고, 새 공유 계약 타입을 패키지에 포함해 소비 프로젝트의 중복 전역 선언과 누락된 타입 오류를 수정.
|
|
10
|
+
|
|
11
|
+
- Node: WC/React 노드 표면, 입력·출력 포트, 드래그/키보드 이동·연결 이벤트, 접기·개요 보기, 선택·삭제 요청과 상태 배지. 포인터 캡처가 끊겨도 마지막 위치를 유지하고 Esc만 이동을 취소합니다. 전체 그래프 편집기 예제의 저장·실행 로직은 호스트 앱이 담당합니다.
|
|
12
|
+
- DesignCanvas, DesignToolbar, ContextBar, ToolButton: 디자인 편집 화면을 구성하는 공통 컴포넌트와 React 래퍼.
|
|
13
|
+
- 디바이스 목업, FlightStatus·BoardingPassStack, 음성 입력, 달성 목록·모달 등 신규 컴포넌트.
|
|
14
|
+
- 알림 목록·드롭다운, 작업 공간 멤버·초대, 첨부 파일 목록, 플랜·크레딧 이력과 실행 견적 컴포넌트.
|
|
15
|
+
- BentoGrid·BentoCard, TweetCard, ProgressiveBlur, BorderBeam, Confetti, GlyphMatrix와 React 래퍼.
|
|
16
|
+
- Button·Modal·Drawer·Sidebar·MenuItem·Navbar·Select·Textarea 등 기존 컴포넌트의 상호작용, 접근성, 토큰과 스타일 수정.
|
|
17
|
+
- WC 전체 진입점, React 래퍼와 개별 컴포넌트 import를 제공합니다. 토큰·테마는 기존 설치 방식으로 별도 로드합니다.
|
|
18
|
+
|
|
19
|
+
### 추가
|
|
20
|
+
|
|
21
|
+
- CreditCard: 가로·세로 카드, 기본·대비·메탈 외형, 클릭·키보드 플립, React 상태 제어와 접근성 지원.
|
|
22
|
+
|
|
23
|
+
- Ticket, BoardingPass, Receipt: 반응형 티켓·탑승권·영수증과 React 래퍼. 절취 형태, 코드 이미지, 안전한 정수 금액 계산, 지역화 및 액션 이벤트 지원.
|
|
24
|
+
|
|
25
|
+
### 개선
|
|
26
|
+
|
|
27
|
+
- Sidebar: `hideExpandIcon`·`showDepthGuide` 표시 옵션 추가. chevron 없이 카테고리를 열고 닫거나 하위 목록에 세로 가이드를 표시할 수 있습니다.
|
|
28
|
+
|
|
29
|
+
- Sidebar: `children` 기반 2depth 내비게이션에 `expandedIds`·`accordionMode`·`db-expanded-change`/React `onExpandedChange`를 추가. 부모/하위 선택 스타일을 분리하고, 긴 목록 잘림을 제거. MenuItem은 native button과 `aria-expanded`/`aria-controls`, 접힌 하위 항목의 inert 처리, Enter·Space·좌우 방향키를 지원.
|
|
30
|
+
|
|
31
|
+
- 최근32개 모듈 품질 검수: 인스턴스 CSS 간격 변수, 빈 폴더·단계 메타·의미 아이콘, 인용 top layer/닫힘/포커스, Vanilla 대화 append, 첨부 제거 포커스와 긴 멤버 목록의 모바일 배치를 개선. 새 런타임 의존성은 없다.
|
|
32
|
+
|
|
33
|
+
- AI Elements: 18개 WC/React 모듈과 21개 참고 요소 대응 예제. 접이식 작업 추적·출처·승인·계획·실행 결과·대화, 기존 API/URL 유지. [사용 계약](./docs/AI-ELEMENTS.md).
|
|
34
|
+
|
|
35
|
+
- 충전 모달을 라디오 없는 버튼 카드 선택으로 개선. 상품명 스타터/플러스/프로, 카드 내부 추천 배지, 좌측 결제 요약 제거. 기본 Recharge 동작과 controlled 이벤트는 유지.
|
|
36
|
+
|
|
37
|
+
- 모듈형 헤더 크레딧 드롭다운·충전 모달과 실제 앱 조립 example 추가. native Popover 및 기존 Modal의 focus trap/portal을 사용하고 controlled 선택·요약/로딩·오류를 연결.
|
|
38
|
+
|
|
39
|
+
- 크레딧 잔액/예약/사용·충전 선택/결제 진입·AI 작업 상태 Web Components와 React wrapper 추가. 실제 결제·크레딧 지급은 앱/서버가 담당. [연결 안내](./docs/CREDIT-AI.md).
|
|
40
|
+
|
|
41
|
+
## 0.8.14 - 2026-10-22
|
|
42
|
+
|
|
43
|
+
### 수정
|
|
44
|
+
|
|
45
|
+
- `db-textarea`: 입력 중 `error`·`error-message` 가 바뀌면(예: 빈 값 제출 후 검증) 입력한 내용이 지워지거나 잘리던 문제 수정. 입력할 때마다 `value` 속성을 실제 값으로 맞춰 둔다.
|
|
46
|
+
- `db-textarea`: 내부 `<textarea>` id 를 `<호스트 id>-field` 로 바꿔 호스트와 id 가 겹치지 않게 하고, 라벨이 실제 입력 필드를 가리키도록 수정.
|
|
47
|
+
- `db-select`: 옵션에 `aria-disabled` 를 명시.
|
|
48
|
+
|
|
3
49
|
## 0.8.13 - 2026-10-12
|
|
4
50
|
|
|
5
51
|
### 개선
|
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
# Payment brand artwork
|
|
2
|
+
|
|
3
|
+
Source: https://github.com/datatrans/payment-logos (assets/cards), retrieved 2026-10-21.
|
|
4
|
+
Authors: Datatrans Ltd and repository contributors.
|
|
5
|
+
Visa, Mastercard, American Express, Discover, JCB and UnionPay SVG artwork is distributed unchanged in src/assets/payment and encoded as data URLs in src/helpers/payment-brands.ts. The additional Visa and Mastercard cardSrc variants remove the white background rectangle and trim the viewBox; Visa is displayed as a monochrome CSS mask. These adaptations remain under CC BY-SA 4.0.
|
|
6
|
+
License: Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0).
|
|
7
|
+
https://creativecommons.org/licenses/by-sa/4.0/
|
|
8
|
+
Artwork and brand names remain trademarks of their respective owners. This notice concerns the artwork; the rest of the library retains its existing license.
|
|
9
|
+
|
|
10
|
+
Attribution-ShareAlike 4.0 International
|
|
11
|
+
|
|
12
|
+
=======================================================================
|
|
13
|
+
|
|
14
|
+
Creative Commons Corporation ("Creative Commons") is not a law firm and
|
|
15
|
+
does not provide legal services or legal advice. Distribution of
|
|
16
|
+
Creative Commons public licenses does not create a lawyer-client or
|
|
17
|
+
other relationship. Creative Commons makes its licenses and related
|
|
18
|
+
information available on an "as-is" basis. Creative Commons gives no
|
|
19
|
+
warranties regarding its licenses, any material licensed under their
|
|
20
|
+
terms and conditions, or any related information. Creative Commons
|
|
21
|
+
disclaims all liability for damages resulting from their use to the
|
|
22
|
+
fullest extent possible.
|
|
23
|
+
|
|
24
|
+
Using Creative Commons Public Licenses
|
|
25
|
+
|
|
26
|
+
Creative Commons public licenses provide a standard set of terms and
|
|
27
|
+
conditions that creators and other rights holders may use to share
|
|
28
|
+
original works of authorship and other material subject to copyright
|
|
29
|
+
and certain other rights specified in the public license below. The
|
|
30
|
+
following considerations are for informational purposes only, are not
|
|
31
|
+
exhaustive, and do not form part of our licenses.
|
|
32
|
+
|
|
33
|
+
Considerations for licensors: Our public licenses are
|
|
34
|
+
intended for use by those authorized to give the public
|
|
35
|
+
permission to use material in ways otherwise restricted by
|
|
36
|
+
copyright and certain other rights. Our licenses are
|
|
37
|
+
irrevocable. Licensors should read and understand the terms
|
|
38
|
+
and conditions of the license they choose before applying it.
|
|
39
|
+
Licensors should also secure all rights necessary before
|
|
40
|
+
applying our licenses so that the public can reuse the
|
|
41
|
+
material as expected. Licensors should clearly mark any
|
|
42
|
+
material not subject to the license. This includes other CC-
|
|
43
|
+
licensed material, or material used under an exception or
|
|
44
|
+
limitation to copyright. More considerations for licensors:
|
|
45
|
+
wiki.creativecommons.org/Considerations_for_licensors
|
|
46
|
+
|
|
47
|
+
Considerations for the public: By using one of our public
|
|
48
|
+
licenses, a licensor grants the public permission to use the
|
|
49
|
+
licensed material under specified terms and conditions. If
|
|
50
|
+
the licensor's permission is not necessary for any reason--for
|
|
51
|
+
example, because of any applicable exception or limitation to
|
|
52
|
+
copyright--then that use is not regulated by the license. Our
|
|
53
|
+
licenses grant only permissions under copyright and certain
|
|
54
|
+
other rights that a licensor has authority to grant. Use of
|
|
55
|
+
the licensed material may still be restricted for other
|
|
56
|
+
reasons, including because others have copyright or other
|
|
57
|
+
rights in the material. A licensor may make special requests,
|
|
58
|
+
such as asking that all changes be marked or described.
|
|
59
|
+
Although not required by our licenses, you are encouraged to
|
|
60
|
+
respect those requests where reasonable. More_considerations
|
|
61
|
+
for the public:
|
|
62
|
+
wiki.creativecommons.org/Considerations_for_licensees
|
|
63
|
+
|
|
64
|
+
=======================================================================
|
|
65
|
+
|
|
66
|
+
Creative Commons Attribution-ShareAlike 4.0 International Public
|
|
67
|
+
License
|
|
68
|
+
|
|
69
|
+
By exercising the Licensed Rights (defined below), You accept and agree
|
|
70
|
+
to be bound by the terms and conditions of this Creative Commons
|
|
71
|
+
Attribution-ShareAlike 4.0 International Public License ("Public
|
|
72
|
+
License"). To the extent this Public License may be interpreted as a
|
|
73
|
+
contract, You are granted the Licensed Rights in consideration of Your
|
|
74
|
+
acceptance of these terms and conditions, and the Licensor grants You
|
|
75
|
+
such rights in consideration of benefits the Licensor receives from
|
|
76
|
+
making the Licensed Material available under these terms and
|
|
77
|
+
conditions.
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Section 1 -- Definitions.
|
|
81
|
+
|
|
82
|
+
a. Adapted Material means material subject to Copyright and Similar
|
|
83
|
+
Rights that is derived from or based upon the Licensed Material
|
|
84
|
+
and in which the Licensed Material is translated, altered,
|
|
85
|
+
arranged, transformed, or otherwise modified in a manner requiring
|
|
86
|
+
permission under the Copyright and Similar Rights held by the
|
|
87
|
+
Licensor. For purposes of this Public License, where the Licensed
|
|
88
|
+
Material is a musical work, performance, or sound recording,
|
|
89
|
+
Adapted Material is always produced where the Licensed Material is
|
|
90
|
+
synched in timed relation with a moving image.
|
|
91
|
+
|
|
92
|
+
b. Adapter's License means the license You apply to Your Copyright
|
|
93
|
+
and Similar Rights in Your contributions to Adapted Material in
|
|
94
|
+
accordance with the terms and conditions of this Public License.
|
|
95
|
+
|
|
96
|
+
c. BY-SA Compatible License means a license listed at
|
|
97
|
+
creativecommons.org/compatiblelicenses, approved by Creative
|
|
98
|
+
Commons as essentially the equivalent of this Public License.
|
|
99
|
+
|
|
100
|
+
d. Copyright and Similar Rights means copyright and/or similar rights
|
|
101
|
+
closely related to copyright including, without limitation,
|
|
102
|
+
performance, broadcast, sound recording, and Sui Generis Database
|
|
103
|
+
Rights, without regard to how the rights are labeled or
|
|
104
|
+
categorized. For purposes of this Public License, the rights
|
|
105
|
+
specified in Section 2(b)(1)-(2) are not Copyright and Similar
|
|
106
|
+
Rights.
|
|
107
|
+
|
|
108
|
+
e. Effective Technological Measures means those measures that, in the
|
|
109
|
+
absence of proper authority, may not be circumvented under laws
|
|
110
|
+
fulfilling obligations under Article 11 of the WIPO Copyright
|
|
111
|
+
Treaty adopted on December 20, 1996, and/or similar international
|
|
112
|
+
agreements.
|
|
113
|
+
|
|
114
|
+
f. Exceptions and Limitations means fair use, fair dealing, and/or
|
|
115
|
+
any other exception or limitation to Copyright and Similar Rights
|
|
116
|
+
that applies to Your use of the Licensed Material.
|
|
117
|
+
|
|
118
|
+
g. License Elements means the license attributes listed in the name
|
|
119
|
+
of a Creative Commons Public License. The License Elements of this
|
|
120
|
+
Public License are Attribution and ShareAlike.
|
|
121
|
+
|
|
122
|
+
h. Licensed Material means the artistic or literary work, database,
|
|
123
|
+
or other material to which the Licensor applied this Public
|
|
124
|
+
License.
|
|
125
|
+
|
|
126
|
+
i. Licensed Rights means the rights granted to You subject to the
|
|
127
|
+
terms and conditions of this Public License, which are limited to
|
|
128
|
+
all Copyright and Similar Rights that apply to Your use of the
|
|
129
|
+
Licensed Material and that the Licensor has authority to license.
|
|
130
|
+
|
|
131
|
+
j. Licensor means the individual(s) or entity(ies) granting rights
|
|
132
|
+
under this Public License.
|
|
133
|
+
|
|
134
|
+
k. Share means to provide material to the public by any means or
|
|
135
|
+
process that requires permission under the Licensed Rights, such
|
|
136
|
+
as reproduction, public display, public performance, distribution,
|
|
137
|
+
dissemination, communication, or importation, and to make material
|
|
138
|
+
available to the public including in ways that members of the
|
|
139
|
+
public may access the material from a place and at a time
|
|
140
|
+
individually chosen by them.
|
|
141
|
+
|
|
142
|
+
l. Sui Generis Database Rights means rights other than copyright
|
|
143
|
+
resulting from Directive 96/9/EC of the European Parliament and of
|
|
144
|
+
the Council of 11 March 1996 on the legal protection of databases,
|
|
145
|
+
as amended and/or succeeded, as well as other essentially
|
|
146
|
+
equivalent rights anywhere in the world.
|
|
147
|
+
|
|
148
|
+
m. You means the individual or entity exercising the Licensed Rights
|
|
149
|
+
under this Public License. Your has a corresponding meaning.
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
Section 2 -- Scope.
|
|
153
|
+
|
|
154
|
+
a. License grant.
|
|
155
|
+
|
|
156
|
+
1. Subject to the terms and conditions of this Public License,
|
|
157
|
+
the Licensor hereby grants You a worldwide, royalty-free,
|
|
158
|
+
non-sublicensable, non-exclusive, irrevocable license to
|
|
159
|
+
exercise the Licensed Rights in the Licensed Material to:
|
|
160
|
+
|
|
161
|
+
a. reproduce and Share the Licensed Material, in whole or
|
|
162
|
+
in part; and
|
|
163
|
+
|
|
164
|
+
b. produce, reproduce, and Share Adapted Material.
|
|
165
|
+
|
|
166
|
+
2. Exceptions and Limitations. For the avoidance of doubt, where
|
|
167
|
+
Exceptions and Limitations apply to Your use, this Public
|
|
168
|
+
License does not apply, and You do not need to comply with
|
|
169
|
+
its terms and conditions.
|
|
170
|
+
|
|
171
|
+
3. Term. The term of this Public License is specified in Section
|
|
172
|
+
6(a).
|
|
173
|
+
|
|
174
|
+
4. Media and formats; technical modifications allowed. The
|
|
175
|
+
Licensor authorizes You to exercise the Licensed Rights in
|
|
176
|
+
all media and formats whether now known or hereafter created,
|
|
177
|
+
and to make technical modifications necessary to do so. The
|
|
178
|
+
Licensor waives and/or agrees not to assert any right or
|
|
179
|
+
authority to forbid You from making technical modifications
|
|
180
|
+
necessary to exercise the Licensed Rights, including
|
|
181
|
+
technical modifications necessary to circumvent Effective
|
|
182
|
+
Technological Measures. For purposes of this Public License,
|
|
183
|
+
simply making modifications authorized by this Section 2(a)
|
|
184
|
+
(4) never produces Adapted Material.
|
|
185
|
+
|
|
186
|
+
5. Downstream recipients.
|
|
187
|
+
|
|
188
|
+
a. Offer from the Licensor -- Licensed Material. Every
|
|
189
|
+
recipient of the Licensed Material automatically
|
|
190
|
+
receives an offer from the Licensor to exercise the
|
|
191
|
+
Licensed Rights under the terms and conditions of this
|
|
192
|
+
Public License.
|
|
193
|
+
|
|
194
|
+
b. Additional offer from the Licensor -- Adapted Material.
|
|
195
|
+
Every recipient of Adapted Material from You
|
|
196
|
+
automatically receives an offer from the Licensor to
|
|
197
|
+
exercise the Licensed Rights in the Adapted Material
|
|
198
|
+
under the conditions of the Adapter's License You apply.
|
|
199
|
+
|
|
200
|
+
c. No downstream restrictions. You may not offer or impose
|
|
201
|
+
any additional or different terms or conditions on, or
|
|
202
|
+
apply any Effective Technological Measures to, the
|
|
203
|
+
Licensed Material if doing so restricts exercise of the
|
|
204
|
+
Licensed Rights by any recipient of the Licensed
|
|
205
|
+
Material.
|
|
206
|
+
|
|
207
|
+
6. No endorsement. Nothing in this Public License constitutes or
|
|
208
|
+
may be construed as permission to assert or imply that You
|
|
209
|
+
are, or that Your use of the Licensed Material is, connected
|
|
210
|
+
with, or sponsored, endorsed, or granted official status by,
|
|
211
|
+
the Licensor or others designated to receive attribution as
|
|
212
|
+
provided in Section 3(a)(1)(A)(i).
|
|
213
|
+
|
|
214
|
+
b. Other rights.
|
|
215
|
+
|
|
216
|
+
1. Moral rights, such as the right of integrity, are not
|
|
217
|
+
licensed under this Public License, nor are publicity,
|
|
218
|
+
privacy, and/or other similar personality rights; however, to
|
|
219
|
+
the extent possible, the Licensor waives and/or agrees not to
|
|
220
|
+
assert any such rights held by the Licensor to the limited
|
|
221
|
+
extent necessary to allow You to exercise the Licensed
|
|
222
|
+
Rights, but not otherwise.
|
|
223
|
+
|
|
224
|
+
2. Patent and trademark rights are not licensed under this
|
|
225
|
+
Public License.
|
|
226
|
+
|
|
227
|
+
3. To the extent possible, the Licensor waives any right to
|
|
228
|
+
collect royalties from You for the exercise of the Licensed
|
|
229
|
+
Rights, whether directly or through a collecting society
|
|
230
|
+
under any voluntary or waivable statutory or compulsory
|
|
231
|
+
licensing scheme. In all other cases the Licensor expressly
|
|
232
|
+
reserves any right to collect such royalties.
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
Section 3 -- License Conditions.
|
|
236
|
+
|
|
237
|
+
Your exercise of the Licensed Rights is expressly made subject to the
|
|
238
|
+
following conditions.
|
|
239
|
+
|
|
240
|
+
a. Attribution.
|
|
241
|
+
|
|
242
|
+
1. If You Share the Licensed Material (including in modified
|
|
243
|
+
form), You must:
|
|
244
|
+
|
|
245
|
+
a. retain the following if it is supplied by the Licensor
|
|
246
|
+
with the Licensed Material:
|
|
247
|
+
|
|
248
|
+
i. identification of the creator(s) of the Licensed
|
|
249
|
+
Material and any others designated to receive
|
|
250
|
+
attribution, in any reasonable manner requested by
|
|
251
|
+
the Licensor (including by pseudonym if
|
|
252
|
+
designated);
|
|
253
|
+
|
|
254
|
+
ii. a copyright notice;
|
|
255
|
+
|
|
256
|
+
iii. a notice that refers to this Public License;
|
|
257
|
+
|
|
258
|
+
iv. a notice that refers to the disclaimer of
|
|
259
|
+
warranties;
|
|
260
|
+
|
|
261
|
+
v. a URI or hyperlink to the Licensed Material to the
|
|
262
|
+
extent reasonably practicable;
|
|
263
|
+
|
|
264
|
+
b. indicate if You modified the Licensed Material and
|
|
265
|
+
retain an indication of any previous modifications; and
|
|
266
|
+
|
|
267
|
+
c. indicate the Licensed Material is licensed under this
|
|
268
|
+
Public License, and include the text of, or the URI or
|
|
269
|
+
hyperlink to, this Public License.
|
|
270
|
+
|
|
271
|
+
2. You may satisfy the conditions in Section 3(a)(1) in any
|
|
272
|
+
reasonable manner based on the medium, means, and context in
|
|
273
|
+
which You Share the Licensed Material. For example, it may be
|
|
274
|
+
reasonable to satisfy the conditions by providing a URI or
|
|
275
|
+
hyperlink to a resource that includes the required
|
|
276
|
+
information.
|
|
277
|
+
|
|
278
|
+
3. If requested by the Licensor, You must remove any of the
|
|
279
|
+
information required by Section 3(a)(1)(A) to the extent
|
|
280
|
+
reasonably practicable.
|
|
281
|
+
|
|
282
|
+
b. ShareAlike.
|
|
283
|
+
|
|
284
|
+
In addition to the conditions in Section 3(a), if You Share
|
|
285
|
+
Adapted Material You produce, the following conditions also apply.
|
|
286
|
+
|
|
287
|
+
1. The Adapter's License You apply must be a Creative Commons
|
|
288
|
+
license with the same License Elements, this version or
|
|
289
|
+
later, or a BY-SA Compatible License.
|
|
290
|
+
|
|
291
|
+
2. You must include the text of, or the URI or hyperlink to, the
|
|
292
|
+
Adapter's License You apply. You may satisfy this condition
|
|
293
|
+
in any reasonable manner based on the medium, means, and
|
|
294
|
+
context in which You Share Adapted Material.
|
|
295
|
+
|
|
296
|
+
3. You may not offer or impose any additional or different terms
|
|
297
|
+
or conditions on, or apply any Effective Technological
|
|
298
|
+
Measures to, Adapted Material that restrict exercise of the
|
|
299
|
+
rights granted under the Adapter's License You apply.
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
Section 4 -- Sui Generis Database Rights.
|
|
303
|
+
|
|
304
|
+
Where the Licensed Rights include Sui Generis Database Rights that
|
|
305
|
+
apply to Your use of the Licensed Material:
|
|
306
|
+
|
|
307
|
+
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
|
|
308
|
+
to extract, reuse, reproduce, and Share all or a substantial
|
|
309
|
+
portion of the contents of the database;
|
|
310
|
+
|
|
311
|
+
b. if You include all or a substantial portion of the database
|
|
312
|
+
contents in a database in which You have Sui Generis Database
|
|
313
|
+
Rights, then the database in which You have Sui Generis Database
|
|
314
|
+
Rights (but not its individual contents) is Adapted Material,
|
|
315
|
+
|
|
316
|
+
including for purposes of Section 3(b); and
|
|
317
|
+
c. You must comply with the conditions in Section 3(a) if You Share
|
|
318
|
+
all or a substantial portion of the contents of the database.
|
|
319
|
+
|
|
320
|
+
For the avoidance of doubt, this Section 4 supplements and does not
|
|
321
|
+
replace Your obligations under this Public License where the Licensed
|
|
322
|
+
Rights include other Copyright and Similar Rights.
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
|
|
326
|
+
|
|
327
|
+
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
|
|
328
|
+
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
|
|
329
|
+
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
|
|
330
|
+
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
|
|
331
|
+
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
|
|
332
|
+
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
333
|
+
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
|
|
334
|
+
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
|
|
335
|
+
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
|
|
336
|
+
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
|
|
337
|
+
|
|
338
|
+
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
|
|
339
|
+
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
|
|
340
|
+
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
|
|
341
|
+
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
|
|
342
|
+
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
|
|
343
|
+
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
|
|
344
|
+
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
|
|
345
|
+
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
|
|
346
|
+
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
|
|
347
|
+
|
|
348
|
+
c. The disclaimer of warranties and limitation of liability provided
|
|
349
|
+
above shall be interpreted in a manner that, to the extent
|
|
350
|
+
possible, most closely approximates an absolute disclaimer and
|
|
351
|
+
waiver of all liability.
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
Section 6 -- Term and Termination.
|
|
355
|
+
|
|
356
|
+
a. This Public License applies for the term of the Copyright and
|
|
357
|
+
Similar Rights licensed here. However, if You fail to comply with
|
|
358
|
+
this Public License, then Your rights under this Public License
|
|
359
|
+
terminate automatically.
|
|
360
|
+
|
|
361
|
+
b. Where Your right to use the Licensed Material has terminated under
|
|
362
|
+
Section 6(a), it reinstates:
|
|
363
|
+
|
|
364
|
+
1. automatically as of the date the violation is cured, provided
|
|
365
|
+
it is cured within 30 days of Your discovery of the
|
|
366
|
+
violation; or
|
|
367
|
+
|
|
368
|
+
2. upon express reinstatement by the Licensor.
|
|
369
|
+
|
|
370
|
+
For the avoidance of doubt, this Section 6(b) does not affect any
|
|
371
|
+
right the Licensor may have to seek remedies for Your violations
|
|
372
|
+
of this Public License.
|
|
373
|
+
|
|
374
|
+
c. For the avoidance of doubt, the Licensor may also offer the
|
|
375
|
+
Licensed Material under separate terms or conditions or stop
|
|
376
|
+
distributing the Licensed Material at any time; however, doing so
|
|
377
|
+
will not terminate this Public License.
|
|
378
|
+
|
|
379
|
+
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
|
|
380
|
+
License.
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
Section 7 -- Other Terms and Conditions.
|
|
384
|
+
|
|
385
|
+
a. The Licensor shall not be bound by any additional or different
|
|
386
|
+
terms or conditions communicated by You unless expressly agreed.
|
|
387
|
+
|
|
388
|
+
b. Any arrangements, understandings, or agreements regarding the
|
|
389
|
+
Licensed Material not stated herein are separate from and
|
|
390
|
+
independent of the terms and conditions of this Public License.
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
Section 8 -- Interpretation.
|
|
394
|
+
|
|
395
|
+
a. For the avoidance of doubt, this Public License does not, and
|
|
396
|
+
shall not be interpreted to, reduce, limit, restrict, or impose
|
|
397
|
+
conditions on any use of the Licensed Material that could lawfully
|
|
398
|
+
be made without permission under this Public License.
|
|
399
|
+
|
|
400
|
+
b. To the extent possible, if any provision of this Public License is
|
|
401
|
+
deemed unenforceable, it shall be automatically reformed to the
|
|
402
|
+
minimum extent necessary to make it enforceable. If the provision
|
|
403
|
+
cannot be reformed, it shall be severed from this Public License
|
|
404
|
+
without affecting the enforceability of the remaining terms and
|
|
405
|
+
conditions.
|
|
406
|
+
|
|
407
|
+
c. No term or condition of this Public License will be waived and no
|
|
408
|
+
failure to comply consented to unless expressly agreed to by the
|
|
409
|
+
Licensor.
|
|
410
|
+
|
|
411
|
+
d. Nothing in this Public License constitutes or may be interpreted
|
|
412
|
+
as a limitation upon, or waiver of, any privileges and immunities
|
|
413
|
+
that apply to the Licensor or You, including from the legal
|
|
414
|
+
processes of any jurisdiction or authority.
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
=======================================================================
|
|
418
|
+
|
|
419
|
+
Creative Commons is not a party to its public
|
|
420
|
+
licenses. Notwithstanding, Creative Commons may elect to apply one of
|
|
421
|
+
its public licenses to material it publishes and in those instances
|
|
422
|
+
will be considered the “Licensor.” The text of the Creative Commons
|
|
423
|
+
public licenses is dedicated to the public domain under the CC0 Public
|
|
424
|
+
Domain Dedication. Except for the limited purpose of indicating that
|
|
425
|
+
material is shared under a Creative Commons public license or as
|
|
426
|
+
otherwise permitted by the Creative Commons policies published at
|
|
427
|
+
creativecommons.org/policies, Creative Commons does not authorize the
|
|
428
|
+
use of the trademark "Creative Commons" or any other trademark or logo
|
|
429
|
+
of Creative Commons without its prior written consent including,
|
|
430
|
+
without limitation, in connection with any unauthorized modifications
|
|
431
|
+
to any of its public licenses or any other arrangements,
|
|
432
|
+
understandings, or agreements concerning use of licensed material. For
|
|
433
|
+
the avoidance of doubt, this paragraph does not form part of the
|
|
434
|
+
public licenses.
|
|
435
|
+
|
|
436
|
+
Creative Commons may be contacted at creativecommons.org.
|
|
437
|
+
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Supernormal Web Components
|
|
2
2
|
|
|
3
|
-
Designbase **Web Components** — Vue 3, Angular, React, vanilla HTML에서 공통으로 사용하는 웹 컴포넌트 라이브러리입니다.
|
|
3
|
+
Supernormal(슈퍼노말), by Designbase. **Web Components** — Vue 3, Angular, React, vanilla HTML에서 공통으로 사용하는 웹 컴포넌트 라이브러리입니다.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
커스텀 엘리먼트를 제공하며, React 전용 wrapper(`@designbasekorea/ui-wc/react`)도 포함합니다.
|
|
6
6
|
|
|
7
7
|
### 품질 규격
|
|
8
8
|
|
|
@@ -22,6 +22,10 @@ npm run audit:axe # axe-core 런타임 접근성 검증 (build 선행 필
|
|
|
22
22
|
npm run verify:docs # 문서 ↔ 구현 정합성
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
## 크레딧·충전·AI 작업 UI (개발 소스)
|
|
26
|
+
|
|
27
|
+
`CreditBalance`, `CreditRecharge`, `AiTaskStatus`, `CreditDropdown`, `CreditRechargeModal`의 Web Component/React API와 서버 연결 경계는 [사용 안내](./docs/CREDIT-AI.md)를 따릅니다. 기존 배포 0.8.13에는 아직 포함되지 않은 추가 기능입니다.
|
|
28
|
+
|
|
25
29
|
## 최근 변경
|
|
26
30
|
|
|
27
31
|
버전별 변경 내용은 [CHANGELOG.md](./CHANGELOG.md) 를 참고하세요.
|
|
@@ -183,6 +187,33 @@ property setter를 지원하는 컴포넌트: `db-tabs`, `db-navbar`, `db-sideba
|
|
|
183
187
|
|
|
184
188
|
---
|
|
185
189
|
|
|
190
|
+
## Sidebar 2depth · 아코디언
|
|
191
|
+
|
|
192
|
+
`sections[].items[].children`에 하위 항목을 넣으면 부모 아래에 들여쓴 2depth 목록이 펼쳐집니다. 부모 클릭은 열기/닫기, 하위 클릭은 기존 `db-item-click` 이벤트를 전달합니다. 라우팅은 앱에서 연결합니다.
|
|
193
|
+
|
|
194
|
+
- `accordion-mode="single"` (기본): 한 그룹씩 열기. `multiple`: 여러 그룹 열기.
|
|
195
|
+
- `hide-expand-icon` / React `hideExpandIcon`: chevron 숨김. 펼침 상태의 ARIA와 키보드 동작은 유지됩니다.
|
|
196
|
+
- `show-depth-guide` / React `showDepthGuide`: 하위 목록 왼쪽에 의미 토큰 기반 세로 가이드 표시. 두 옵션은 기본적으로 꺼져 있습니다.
|
|
197
|
+
- `default-expanded-ids`: 초기 그룹 ID의 JSON 배열.
|
|
198
|
+
- `expanded-ids` / `expandedIds`: 현재 펼침 상태를 외부에서 지정하는 배열/JSON. 선택된 `active` 항목과 독립적입니다.
|
|
199
|
+
- `db-expanded-change`: `{ itemId, expanded, expandedIds }`. 사용자 조작 시 한 번 발생합니다. 속성으로 상태를 지정할 때는 발생하지 않습니다.
|
|
200
|
+
- Enter·Space로 열기/닫기, →로 열기, ←로 닫기. 닫힌 하위 목록은 키보드와 접근성 탐색에서 제외됩니다. 열린 목록은 고정 높이로 잘리지 않습니다.
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
const [expandedIds, setExpandedIds] = useState(['form']);
|
|
204
|
+
<Sidebar
|
|
205
|
+
sections={[{ id: 'library', items: [{ id: 'form', label: 'Form', children: [
|
|
206
|
+
{ id: 'button', label: 'Button' }, { id: 'input', label: 'Input', active: true },
|
|
207
|
+
] }] }]}
|
|
208
|
+
accordionMode="single"
|
|
209
|
+
expandedIds={expandedIds}
|
|
210
|
+
onExpandedChange={event => setExpandedIds(event.detail.expandedIds)}
|
|
211
|
+
onItemClick={event => navigate(`/components/${event.detail.item.id}`)}
|
|
212
|
+
/>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
자체적으로 HTML 아코디언을 중복 구현할 필요가 없습니다. 앱은 메뉴 데이터·선택·라우팅을 맡고 Sidebar는 2depth 표현·펼침·키보드 동작을 담당합니다.
|
|
216
|
+
|
|
186
217
|
## Sidebar 커스텀 내비게이션
|
|
187
218
|
|
|
188
219
|
`db-sidebar`의 메인 영역에는 데이터 기반 `items`·`sections`와 함께 커스텀 콘텐츠를 넣을 수 있습니다.
|
|
@@ -482,3 +513,20 @@ import { NavigationRail } from '@designbasekorea/ui-wc/react';
|
|
|
482
513
|
```
|
|
483
514
|
|
|
484
515
|
툴팁을 직접 구성할 때 `db-tooltip focus-target="child"`를 지정하면 내부 버튼/링크에 포커스를 유지하고 wrapper의 추가 Tab 정지를 없앱니다.
|
|
516
|
+
|
|
517
|
+
AI 대화·작업 과정·출처·도구 결과는 [AI Elements](./docs/AI-ELEMENTS.md)를 참고하세요.
|
|
518
|
+
|
|
519
|
+
### 티켓 · 탑승권 · 영수증
|
|
520
|
+
|
|
521
|
+
`db-ticket` / `Ticket`, `db-boarding-pass` / `BoardingPass`, `db-receipt` / `Receipt`를 제공합니다. 객체 데이터, container query 기반 반응형 배치, 절취 모양, 실제 코드 이미지, 지역화와 정수 금액 계산을 지원합니다. [사용법과 데이터 계약](docs/PAPER-CARDS.md)을 참고하세요.
|
|
522
|
+
|
|
523
|
+
### 신용카드 표시
|
|
524
|
+
|
|
525
|
+
`db-credit-card` / `CreditCard`: 가로·세로 비율, 클릭·키보드 앞뒷면 전환, 상태 제어와 동작 줄이기 설정을 지원합니다. [데이터 API와 사용법](docs/CREDIT-CARD.md)을 참고하세요.
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
## 컴포넌트 패키지만 배포
|
|
529
|
+
|
|
530
|
+
저장소 루트에서 `npm run ui-wc:build`로 공유 계약과 ui-wc만 빌드하고, `npm run publish:ui-wc`로 `@designbasekorea/ui-wc`만 npm에 배포합니다. 이 명령은 blocks·템플릿·갤러리를 배포하지 않습니다. 갤러리 전체 빌드는 `npm run example:gallery:build`가 blocks 빌드를 별도로 실행합니다.
|
|
531
|
+
|
|
532
|
+
npm 배포물에는 ui-wc의 `dist`, README·변경 이력과 결제 로고 라이선스 고지만 포함됩니다. 신규 컴포넌트는 전체 진입점·React 래퍼·개별 import에서 사용할 수 있습니다. 결제·초대·AI 요청·저장 같은 실제 서버 동작은 소비 앱에서 연결합니다.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DbElement } from '../core/base-element.js';
|
|
2
|
+
import './db-button.js';
|
|
3
|
+
|
|
4
|
+
interface DbAchievementItem {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
state: 'locked' | 'earned' | 'needs_review';
|
|
9
|
+
current?: number;
|
|
10
|
+
target?: number;
|
|
11
|
+
earnedLabel?: string;
|
|
12
|
+
motif?: 'star' | 'award' | 'bulb' | 'heart';
|
|
13
|
+
}
|
|
14
|
+
/** Presentation only. The owner supplies server-validated awards/progress; selection grants nothing. */
|
|
15
|
+
declare class DbAchievementList extends DbElement {
|
|
16
|
+
private data;
|
|
17
|
+
static get observedAttributes(): string[];
|
|
18
|
+
get items(): DbAchievementItem[];
|
|
19
|
+
set items(value: DbAchievementItem[]);
|
|
20
|
+
connectedCallback(): void;
|
|
21
|
+
attributeChangedCallback(): void;
|
|
22
|
+
private render;
|
|
23
|
+
}
|
|
24
|
+
declare global {
|
|
25
|
+
interface HTMLElementTagNameMap {
|
|
26
|
+
'db-achievement-list': DbAchievementList;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export { DbAchievementList };
|
|
31
|
+
export type { DbAchievementItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DbElement as t}from"../core/base-element.js";import{textNode as e,replaceView as i}from"../core/credit-ui.js";import{createDbIcon as s}from"./db-icons.js";import"./db-button.js";function achievementItems(t){const e=new Set;return Array.isArray(t)?t.filter(t=>!(!t||"string"!=typeof t.id||!t.id||e.has(t.id)||"string"!=typeof t.title||"string"!=typeof t.description||!["locked","earned","needs_review"].includes(t.state))&&(e.add(t.id),!0)).map(t=>({id:t.id,title:t.title,description:t.description,state:t.state,current:Number.isSafeInteger(t.current)&&t.current>=0?t.current:void 0,target:Number.isSafeInteger(t.target)&&t.target>0?t.target:void 0,earnedLabel:"string"==typeof t.earnedLabel?t.earnedLabel:void 0,motif:["star","award","bulb","heart"].includes(t.motif||"")?t.motif:"award"})):[]}function achievementMedallion(t){const i=e("div","designbase-wc-achievement-art","");return i.dataset.state=t.state,i.setAttribute("aria-hidden","true"),i.append(s(t.motif||"award",40)),i}class DbAchievementList extends t{constructor(){super(...arguments),this.data=[]}static get observedAttributes(){return["label","empty-label","loading","error"]}get items(){return this.data.map(t=>({...t}))}set items(t){this.data=achievementItems(t),this.isConnected&&this.render()}connectedCallback(){this.upgradeProperties(["items"]),this.cleanups.listen(this,"db-click",t=>{const e=t.target instanceof HTMLElement?t.target.closest("[data-badge-id]"):null;e&&this.contains(e)&&!this.hasAttribute("loading")&&!this.hasAttribute("error")&&this.dbEmit("select",{id:e.dataset.badgeId})}),this.render()}attributeChangedCallback(){this.isConnected&&this.render()}render(){this.classList.add("designbase-wc-achievement-list"),this.setAttribute("aria-busy",String(this.hasAttribute("loading")));const t=e("div","designbase-wc-achievement-list__grid","");t.setAttribute("role","list"),t.setAttribute("aria-label",this.getAttribute("label")||"뱃지 목록");const s=this.getAttribute("error")||(this.hasAttribute("loading")?"뱃지를 불러오고 있어요":this.data.length?"":this.getAttribute("empty-label")||"아직 등록된 뱃지가 없어요");if(s){const t=e("p","designbase-wc-achievement-list__message",s);return t.setAttribute("role",this.hasAttribute("error")?"alert":"status"),void i(this,t)}for(const i of this.data){const s=e("article","designbase-wc-achievement-list__card","");if(s.dataset.state=i.state,s.setAttribute("role","listitem"),s.append(achievementMedallion(i),e("span","designbase-wc-achievement-list__state","earned"===i.state?"획득 완료":"needs_review"===i.state?"기록 확인 필요":"도전 중"),e("h3","",i.title),e("p","designbase-wc-achievement-list__description",i.description)),"locked"===i.state&&i.target){const t=document.createElement("progress");t.max=i.target,t.value=Math.min(i.current||0,i.target),t.setAttribute("aria-label",i.title+" 진행률"),s.append(t,e("span","designbase-wc-achievement-list__date",`${Math.min(i.current||0,i.target)} / ${i.target}`))}else s.append(e("span","designbase-wc-achievement-list__date","earned"===i.state?i.earnedLabel||"나의 컬렉션에 담았어요":"needs_review"===i.state?"연결된 기록을 다시 확인해 주세요":"다음 순간을 기다려요"));const a=document.createElement("db-button");a.setAttribute("variant","secondary"),a.setAttribute("size","s"),a.dataset.badgeId=i.id,a.dataset.action=i.id,a.textContent="자세히 보기",a.setAttribute("aria-label",i.title+" 자세히 보기"),s.append(a),t.append(s)}i(this,t)}}customElements.get("db-achievement-list")||customElements.define("db-achievement-list",DbAchievementList);export{DbAchievementList,achievementItems,achievementMedallion};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DbElement } from '../core/base-element.js';
|
|
2
|
+
import { DbAchievementItem } from './db-achievement-list.js';
|
|
3
|
+
import './db-modal.js';
|
|
4
|
+
import './db-confetti.js';
|
|
5
|
+
import './db-button.js';
|
|
6
|
+
|
|
7
|
+
/** Controlled presentation; no award or receipt writes. Effects stay inside this modal. */
|
|
8
|
+
declare class DbAchievementModal extends DbElement {
|
|
9
|
+
private data;
|
|
10
|
+
private modal?;
|
|
11
|
+
private body?;
|
|
12
|
+
private confetti?;
|
|
13
|
+
private frame;
|
|
14
|
+
private viewKey;
|
|
15
|
+
private presentationKey;
|
|
16
|
+
private readonly descriptionId;
|
|
17
|
+
private readonly headingId;
|
|
18
|
+
static get observedAttributes(): string[];
|
|
19
|
+
get items(): DbAchievementItem[];
|
|
20
|
+
set items(value: DbAchievementItem[]);
|
|
21
|
+
get open(): boolean;
|
|
22
|
+
set open(value: boolean);
|
|
23
|
+
connectedCallback(): void;
|
|
24
|
+
disconnectedCallback(): void;
|
|
25
|
+
attributeChangedCallback(): void;
|
|
26
|
+
private dismiss;
|
|
27
|
+
private stopEffects;
|
|
28
|
+
private ensureView;
|
|
29
|
+
private stage;
|
|
30
|
+
private sync;
|
|
31
|
+
}
|
|
32
|
+
declare global {
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
'db-achievement-modal': DbAchievementModal;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { DbAchievementModal };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DbElement as t}from"../core/base-element.js";import{textNode as e,creditAction as i,replaceView as s}from"../core/credit-ui.js";import{dbUid as a}from"../core/uid.js";import{achievementItems as n,achievementMedallion as o}from"./db-achievement-list.js";import"./db-modal.js";import"./db-confetti.js";import"./db-button.js";class DbAchievementModal extends t{constructor(){super(...arguments),this.data=[],this.frame=null,this.viewKey="",this.presentationKey="",this.descriptionId=a("achievement-description"),this.headingId=a("achievement-heading")}static get observedAttributes(){return["open","mode","loading","error","confirm-label"]}get items(){return this.data.map(t=>({...t}))}set items(t){this.data=n(t),this.isConnected&&this.sync()}get open(){return this.hasAttribute("open")&&"false"!==this.getAttribute("open")}set open(t){this.toggleAttribute("open",t)}connectedCallback(){this.upgradeProperties(["items","open"]),this.ensureView(),this.cleanups.listen(this.modal,"db-close",t=>{t.stopPropagation(),this.dismiss(),queueMicrotask(()=>{this.isConnected&&this.open&&this.modal&&!this.modal.open&&(this.modal.open=!0)})}),this.cleanups.listen(this.body,"db-click",t=>{t.target instanceof HTMLElement&&["acknowledge","dismiss"].includes(t.target.dataset.action||"")&&this.dismiss()}),this.cleanups.listen(window.matchMedia("(prefers-reduced-motion: reduce)"),"change",()=>{this.stopEffects(),this.viewKey="",this.sync()}),this.sync()}disconnectedCallback(){this.stopEffects(),this.modal?.remove(),this.modal=void 0,this.viewKey="",this.presentationKey="",super.disconnectedCallback()}attributeChangedCallback(){this.isConnected&&this.sync()}dismiss(){!this.hasAttribute("loading")&&this.open&&this.dbEmit("dismiss",{ids:this.data.map(t=>t.id)})}stopEffects(){null!==this.frame&&cancelAnimationFrame(this.frame),this.frame=null,this.confetti?.remove(),this.confetti=void 0}ensureView(){this.modal||(this.modal=document.createElement("db-modal"),this.modal.setAttribute("size","s"),this.body=e("div","designbase-wc-achievement-modal__body",""),this.body.setAttribute("data-modal-part","body"),this.modal.append(this.body),this.append(this.modal))}stage(t){const i=e("div","designbase-wc-achievement-modal__stage","");i.setAttribute("aria-hidden","true"),this.open&&"earned"===t.state&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(this.confetti=document.createElement("db-confetti"),this.confetti.setAttribute("trigger","manual"),i.append(this.confetti));const s=e("div","designbase-wc-achievement-modal__coin","");s.dataset.state=t.state;for(let t=-5;t<=5;t++){const i=e("span","designbase-wc-achievement-modal__edge","");i.style.transform=`translateZ(${t}px)`,s.append(i)}const a=o(t);a.classList.add("designbase-wc-achievement-modal__face","designbase-wc-achievement-modal__face--front");const n=o(t);return n.classList.add("designbase-wc-achievement-modal__face","designbase-wc-achievement-modal__face--back"),s.append(a,n),i.append(s),i}sync(){if(!this.modal||!this.body)return;const t=this.data[0],a="detail"!==this.getAttribute("mode");this.modal.removeAttribute("title"),this.modal.setAttribute("describedby",this.descriptionId),this.modal.setAttribute("show-close-button","false");for(const t of["close-on-escape","close-on-outside-click"])this.modal.setAttribute(t,String(!this.hasAttribute("loading")));const n=JSON.stringify([this.data,a,this.open,this.hasAttribute("loading"),this.getAttribute("error"),this.getAttribute("confirm-label")]);if(n!==this.viewKey){this.viewKey=n,this.stopEffects();const o=document.createElement("div"),d=i("dismiss","",this.hasAttribute("loading"));if(d.classList.add("designbase-wc-achievement-modal__close"),d.setAttribute("variant","ghost"),d.setAttribute("start-icon","close"),d.setAttribute("icon-only",""),d.setAttribute("aria-label","모달 닫기"),o.append(d),t){o.append(this.stage(t),e("span","designbase-wc-achievement-modal__eyebrow","locked"===t.state?"아직 획득하지 못한 뱃지":"needs_review"===t.state?"기록 확인 필요":a?"새로운 순간을 모았어요":"나의 컬렉션"));const i=e("h3","",t.title);i.id=this.headingId,o.append(i);const s=e("p","designbase-wc-achievement-modal__description",t.description);if(s.id=this.descriptionId,o.append(s),t.earnedLabel&&"earned"===t.state&&o.append(e("p","designbase-wc-achievement-list__date",t.earnedLabel)),this.data.length>1){const t=e("div","designbase-wc-achievement-modal__related","함께 받은 뱃지 "+(this.data.length-1)+"개");for(const i of this.data.slice(1))t.append(e("span","",i.title));o.append(t)}}else{const t=e("p","","표시할 뱃지가 없어요");t.id=this.descriptionId,o.append(t)}const c=e("p","designbase-wc-achievement-modal__error",this.getAttribute("error")||"");c.setAttribute("role","alert"),c.hidden=!c.textContent,o.append(c);const r=this.getAttribute("confirm-label")||("locked"===t?.state?"아직 획득하지 못했어요":"확인"),h=i("acknowledge",r,this.hasAttribute("loading"));h.setAttribute("variant","locked"===t?.state?"secondary":"primary"),h.setAttribute("size","m"),h.toggleAttribute("loading",this.hasAttribute("loading")),o.append(h),s(this.body,...Array.from(o.childNodes))}this.modal.open!==this.open&&(this.modal.open=this.open);const o=this.body.closest('[role="dialog"]');o?.classList.add("designbase-wc-achievement-modal__panel"),t&&o?.setAttribute("aria-labelledby",this.headingId);const d=JSON.stringify([this.data.map(t=>[t.id,t.state]),a]);this.open?this.presentationKey!==d&&(this.presentationKey=d,this.frame=requestAnimationFrame(()=>{if(this.frame=null,this.open&&this.isConnected&&this.confetti)for(const[t,e]of[[.08,65],[.92,115]])this.confetti.fire({particleCount:42,origin:{x:t,y:.88},angle:e,spread:75,startVelocity:26,ticks:140,scalar:.75,disableForReducedMotion:!0})})):(this.presentationKey="",this.stopEffects())}}customElements.get("db-achievement-modal")||customElements.define("db-achievement-modal",DbAchievementModal);export{DbAchievementModal};
|