@hjmds/design-contracts 1.26.1 → 1.27.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/dist/agreement.d.ts +1 -0
- package/dist/agreement.d.ts.map +1 -1
- package/dist/agreement.js +2 -1
- package/dist/agreement.js.map +1 -1
- package/dist/auth-screen.d.ts +1 -1
- package/dist/behaviors.d.ts +1 -1
- package/dist/calendar.d.ts +1 -0
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +4 -1
- package/dist/calendar.js.map +1 -1
- package/dist/catalog.d.ts +78 -30
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +10 -5
- package/dist/catalog.js.map +1 -1
- package/dist/chart.d.ts +2 -0
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +1 -1
- package/dist/chart.js.map +1 -1
- package/dist/component-definitions.d.ts +1 -0
- package/dist/component-definitions.d.ts.map +1 -1
- package/dist/component-definitions.js +1 -0
- package/dist/component-definitions.js.map +1 -1
- package/dist/component-recipes.d.ts +53 -6
- package/dist/component-recipes.d.ts.map +1 -1
- package/dist/component-recipes.js +64 -10
- package/dist/component-recipes.js.map +1 -1
- package/dist/data-table.d.ts +11 -0
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +5 -0
- package/dist/data-table.js.map +1 -1
- package/dist/description-list.d.ts +3 -0
- package/dist/description-list.d.ts.map +1 -1
- package/dist/description-list.js +5 -1
- package/dist/description-list.js.map +1 -1
- package/dist/design-profile-layout.d.ts +28 -0
- package/dist/design-profile-layout.d.ts.map +1 -1
- package/dist/design-profile-layout.js +27 -3
- package/dist/design-profile-layout.js.map +1 -1
- package/dist/design-profile.d.ts.map +1 -1
- package/dist/design-profile.js +40 -8
- package/dist/design-profile.js.map +1 -1
- package/dist/field-group.d.ts +13 -0
- package/dist/field-group.d.ts.map +1 -1
- package/dist/field-group.js +17 -2
- package/dist/field-group.js.map +1 -1
- package/dist/foundations.d.ts +24 -11
- package/dist/foundations.d.ts.map +1 -1
- package/dist/foundations.js +40 -7
- package/dist/foundations.js.map +1 -1
- package/dist/heading.d.ts +5 -5
- package/dist/image-choice.d.ts +23 -0
- package/dist/image-choice.d.ts.map +1 -0
- package/dist/image-choice.js +26 -0
- package/dist/image-choice.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/masonry.d.ts +8 -0
- package/dist/masonry.d.ts.map +1 -1
- package/dist/masonry.js +12 -1
- package/dist/masonry.js.map +1 -1
- package/dist/number-field.d.ts +2 -2
- package/dist/number-field.d.ts.map +1 -1
- package/dist/number-field.js +4 -2
- package/dist/number-field.js.map +1 -1
- package/dist/qr-code-recipe.d.ts +1 -0
- package/dist/qr-code-recipe.d.ts.map +1 -1
- package/dist/qr-code-recipe.js +3 -1
- package/dist/qr-code-recipe.js.map +1 -1
- package/dist/recipes.d.ts +1 -1
- package/dist/recipes.d.ts.map +1 -1
- package/dist/recipes.js +1 -1
- package/dist/recipes.js.map +1 -1
- package/dist/result.d.ts +9 -0
- package/dist/result.d.ts.map +1 -1
- package/dist/result.js +5 -0
- package/dist/result.js.map +1 -1
- package/dist/screen-patterns.d.ts +139 -2
- package/dist/screen-patterns.d.ts.map +1 -1
- package/dist/screen-patterns.js +140 -1
- package/dist/screen-patterns.js.map +1 -1
- package/dist/sheet.d.ts +15 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +20 -1
- package/dist/sheet.js.map +1 -1
- package/dist/showcase.d.ts +27 -27
- package/dist/showcase.js +27 -27
- package/dist/showcase.js.map +1 -1
- package/dist/tag.d.ts +10 -2
- package/dist/tag.d.ts.map +1 -1
- package/dist/tag.js +3 -2
- package/dist/tag.js.map +1 -1
- package/dist/tags-input.d.ts +6 -0
- package/dist/tags-input.d.ts.map +1 -1
- package/dist/tags-input.js +3 -1
- package/dist/tags-input.js.map +1 -1
- package/dist/text-formats.d.ts +2 -2
- package/dist/top.d.ts +2 -2
- package/dist/transfer-list.d.ts +1 -1
- package/dist/transfer-list.d.ts.map +1 -1
- package/dist/transfer-list.js +2 -1
- package/dist/transfer-list.js.map +1 -1
- package/dist/upload-item.d.ts +1 -10
- package/dist/upload-item.d.ts.map +1 -1
- package/dist/upload-item.js +1 -2
- package/dist/upload-item.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/docs/activity-chip.md +4 -3
- package/docs/catalog-freeze.json +5 -2
- package/docs/chart.md +1 -1
- package/docs/consumer-policy.md +13 -6
- package/docs/description-list.md +4 -0
- package/docs/design-profile.md +28 -2
- package/docs/font-roles.md +1 -1
- package/docs/generated/component-maturity.md +5 -4
- package/docs/generated/renderer-evidence.json +92 -6
- package/docs/generated/renderer-evidence.md +5 -3
- package/docs/generated/showcase-manifest.json +49 -1
- package/docs/gravity-letters.md +7 -2
- package/docs/masonry.md +4 -2
- package/docs/screen-patterns.md +5 -2
- package/docs/showcase.md +7 -9
- package/docs/stable-promotion.md +13 -1
- package/docs/usage/README.md +40 -10
- package/docs/usage/SELECTION.md +30 -4
- package/docs/usage/STANDARD.md +11 -2
- package/docs/usage/components/account-switcher.md +98 -0
- package/docs/usage/components/activity-chip.md +4 -4
- package/docs/usage/components/badge.md +1 -1
- package/docs/usage/components/bezier-editor.md +99 -0
- package/docs/usage/components/bottom-cta.md +2 -1
- package/docs/usage/components/button.md +26 -12
- package/docs/usage/components/carousel.md +4 -4
- package/docs/usage/components/chart.md +1 -0
- package/docs/usage/components/chat-message.md +18 -12
- package/docs/usage/components/chat-screen.md +6 -3
- package/docs/usage/components/cohort-retention-table.md +83 -0
- package/docs/usage/components/collapsible.md +7 -2
- package/docs/usage/components/comment-thread-row.md +102 -0
- package/docs/usage/components/comment-thread-screen.md +27 -13
- package/docs/usage/components/composition-layout.md +1 -0
- package/docs/usage/components/context-menu.md +32 -15
- package/docs/usage/components/conversation-row.md +11 -4
- package/docs/usage/components/conversion-funnel.md +85 -0
- package/docs/usage/components/correlation-matrix.md +80 -0
- package/docs/usage/components/data-table.md +4 -0
- package/docs/usage/components/description-list.md +2 -1
- package/docs/usage/components/editor-screen.md +9 -5
- package/docs/usage/components/effect-surface.md +4 -2
- package/docs/usage/components/empty-state.md +2 -2
- package/docs/usage/components/event-attendance-card.md +104 -0
- package/docs/usage/components/expandable-search.md +105 -0
- package/docs/usage/components/file-picker.md +5 -0
- package/docs/usage/components/filter-recovery.md +97 -0
- package/docs/usage/components/follow-profile-card.md +100 -0
- package/docs/usage/components/heading.md +6 -2
- package/docs/usage/components/histogram-explorer.md +89 -0
- package/docs/usage/components/icon-button.md +18 -2
- package/docs/usage/components/icon-tile.md +12 -4
- package/docs/usage/components/image-choice-group.md +81 -0
- package/docs/usage/components/import-field-mapping.md +94 -0
- package/docs/usage/components/inline-edit.md +105 -0
- package/docs/usage/components/keyboard-avoidance-context.md +60 -0
- package/docs/usage/components/keyboard-avoiding.md +5 -1
- package/docs/usage/components/list-detail-screen.md +4 -4
- package/docs/usage/components/list.md +1 -1
- package/docs/usage/components/masonry.md +6 -7
- package/docs/usage/components/media-selection-screen.md +7 -5
- package/docs/usage/components/media-transport.md +104 -0
- package/docs/usage/components/message-composer.md +13 -3
- package/docs/usage/components/moderation-screen.md +5 -2
- package/docs/usage/components/notification-inbox-screen.md +3 -3
- package/docs/usage/components/notification-row.md +64 -8
- package/docs/usage/components/onboarding-screen.md +1 -1
- package/docs/usage/components/overview-screen.md +9 -3
- package/docs/usage/components/pagination.md +18 -3
- package/docs/usage/components/password-rules-field.md +90 -0
- package/docs/usage/components/permission-screen.md +1 -1
- package/docs/usage/components/photo-source-sheet.md +1 -1
- package/docs/usage/components/popover.md +6 -3
- package/docs/usage/components/pricing-choice.md +85 -0
- package/docs/usage/components/profile-summary.md +56 -8
- package/docs/usage/components/progress.md +3 -3
- package/docs/usage/components/qr-code.md +5 -9
- package/docs/usage/components/repeatable-field-group.md +92 -0
- package/docs/usage/components/reply-composer.md +83 -0
- package/docs/usage/components/reply-message.md +85 -0
- package/docs/usage/components/result.md +3 -3
- package/docs/usage/components/saved-items-screen.md +7 -5
- package/docs/usage/components/screen-layout.md +21 -10
- package/docs/usage/components/search-field.md +1 -1
- package/docs/usage/components/section.md +2 -2
- package/docs/usage/components/selection-action-bar.md +89 -0
- package/docs/usage/components/settings-screen.md +13 -11
- package/docs/usage/components/sheet.md +19 -7
- package/docs/usage/components/shortcut-recorder.md +77 -0
- package/docs/usage/components/split-action.md +94 -0
- package/docs/usage/components/streaming-answer.md +94 -0
- package/docs/usage/components/switch.md +6 -2
- package/docs/usage/components/table-column-settings.md +88 -0
- package/docs/usage/components/target-summary.md +79 -0
- package/docs/usage/components/text.md +11 -5
- package/docs/usage/components/toggle-feedback-button.md +94 -0
- package/docs/usage/components/top-bar.md +8 -12
- package/docs/usage/components/transfer-task.md +87 -0
- package/docs/usage/compositions/action-recovery-optimistic.md +18 -14
- package/docs/usage/compositions/action-recovery-save.md +18 -14
- package/docs/usage/compositions/action-recovery-undo.md +18 -14
- package/docs/usage/compositions/activity-status.md +1 -1
- package/docs/usage/compositions/adaptive-content.md +2 -1
- package/docs/usage/compositions/collection-detail.md +6 -5
- package/docs/usage/compositions/collection-editing.md +13 -6
- package/docs/usage/compositions/command-records.md +5 -4
- package/docs/usage/compositions/communication.md +7 -5
- package/docs/usage/compositions/compound-controls.md +7 -3
- package/docs/usage/compositions/content-transition-comparison.md +10 -5
- package/docs/usage/compositions/data-layouts.md +12 -16
- package/docs/usage/compositions/data-workflows.md +7 -4
- package/docs/usage/compositions/date-time-selection.md +5 -5
- package/docs/usage/compositions/design-profile-comparison.md +22 -6
- package/docs/usage/compositions/disclosure.md +14 -9
- package/docs/usage/compositions/document-resource.md +1 -1
- package/docs/usage/compositions/environment-matrix.md +16 -12
- package/docs/usage/compositions/expo-interactions.md +9 -8
- package/docs/usage/compositions/family-drawer.md +9 -5
- package/docs/usage/compositions/field-group.md +7 -3
- package/docs/usage/compositions/interaction-adapters.md +11 -9
- package/docs/usage/compositions/interaction-flow-apply.md +17 -15
- package/docs/usage/compositions/interaction-flow-search.md +11 -7
- package/docs/usage/compositions/live-list.md +12 -8
- package/docs/usage/compositions/navigation-bar-collection.md +8 -3
- package/docs/usage/compositions/optional-motion.md +2 -2
- package/docs/usage/compositions/paper-surface.md +11 -6
- package/docs/usage/compositions/purpose-input-comment.md +10 -4
- package/docs/usage/compositions/purpose-input-message.md +10 -4
- package/docs/usage/compositions/reference-first.md +4 -4
- package/docs/usage/compositions/reference-review.md +4 -4
- package/docs/usage/compositions/reference-settings.md +4 -4
- package/docs/usage/compositions/selection-motion.md +2 -1
- package/docs/usage/compositions/social-compositions.md +7 -6
- package/docs/usage/compositions/stea-event-ticket.md +2 -4
- package/docs/usage/compositions/stea-order-progress.md +19 -21
- package/docs/usage/compositions/stea-pixel-empty.md +26 -26
- package/docs/usage/compositions/task-controls.md +7 -2
- package/docs/usage/compositions/texture-comparison.md +5 -5
- package/docs/usage/compositions/toast-layout.md +7 -3
- package/docs/usage/compositions/toggle-feedback.md +1 -1
- package/docs/usage/compositions/visual-foundations.md +10 -5
- package/docs/usage/compositions/web-additions.md +5 -1
- package/docs/usage/screens/common-chat.md +5 -3
- package/docs/usage/screens/common-comments.md +14 -9
- package/docs/usage/screens/common-conversation-list.md +109 -0
- package/docs/usage/screens/common-inbox.md +5 -3
- package/docs/usage/screens/common-login.md +7 -4
- package/docs/usage/screens/common-profile.md +16 -12
- package/docs/usage/screens/common-saved.md +12 -8
- package/docs/usage/screens/common-search.md +16 -8
- package/docs/usage/screens/common-settings.md +12 -11
- package/docs/usage/screens/common-shell.md +12 -10
- package/docs/usage/screens/dashboard.md +59 -56
- package/docs/usage/screens/discovery-gallery.md +18 -9
- package/docs/usage/screens/flow-collection.md +10 -6
- package/docs/usage/screens/flow-editor.md +9 -6
- package/docs/usage/screens/flow-media.md +12 -7
- package/docs/usage/screens/flow-moderation.md +9 -3
- package/docs/usage/screens/flow-onboarding.md +13 -8
- package/docs/usage/screens/flow-permission.md +5 -3
- package/docs/usage/screens/landing.md +20 -14
- package/docs/usage/screens/mockup-studio.md +100 -88
- package/docs/usage/screens/notification-settings.md +9 -7
- package/docs/usage/screens/product-bento.md +22 -10
- package/docs/usage/screens/reference-comparison.md +2 -2
- package/docs/usage/tokens/font-roles.md +18 -2
- package/docs/usage/tokens/typography.md +22 -11
- package/package.json +7 -1
package/dist/showcase.js
CHANGED
|
@@ -6,7 +6,7 @@ import { componentCatalog, getComponentSurfaceStatus, } from "./catalog.js";
|
|
|
6
6
|
export const showcaseEnvironmentMatrix = [
|
|
7
7
|
{
|
|
8
8
|
id: "default",
|
|
9
|
-
label: "
|
|
9
|
+
label: "밝게 · 왼쪽→오른쪽 · 100%",
|
|
10
10
|
theme: "light",
|
|
11
11
|
direction: "ltr",
|
|
12
12
|
textScale: 1,
|
|
@@ -14,7 +14,7 @@ export const showcaseEnvironmentMatrix = [
|
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
id: "dark",
|
|
17
|
-
label: "
|
|
17
|
+
label: "어둡게 · 왼쪽→오른쪽 · 100%",
|
|
18
18
|
theme: "dark",
|
|
19
19
|
direction: "ltr",
|
|
20
20
|
textScale: 1,
|
|
@@ -22,7 +22,7 @@ export const showcaseEnvironmentMatrix = [
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
id: "large-text",
|
|
25
|
-
label: "
|
|
25
|
+
label: "밝게 · 왼쪽→오른쪽 · 200%",
|
|
26
26
|
theme: "light",
|
|
27
27
|
direction: "ltr",
|
|
28
28
|
textScale: 2,
|
|
@@ -30,7 +30,7 @@ export const showcaseEnvironmentMatrix = [
|
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
32
|
id: "rtl",
|
|
33
|
-
label: "
|
|
33
|
+
label: "밝게 · 오른쪽→왼쪽 · 100%",
|
|
34
34
|
theme: "light",
|
|
35
35
|
direction: "rtl",
|
|
36
36
|
textScale: 1,
|
|
@@ -38,7 +38,7 @@ export const showcaseEnvironmentMatrix = [
|
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
id: "reduced-motion",
|
|
41
|
-
label: "
|
|
41
|
+
label: "밝게 · 왼쪽→오른쪽 · 동작 줄이기",
|
|
42
42
|
theme: "light",
|
|
43
43
|
direction: "ltr",
|
|
44
44
|
textScale: 1,
|
|
@@ -58,58 +58,58 @@ export function getShowcaseEnvironmentInput(environment) {
|
|
|
58
58
|
export const showcaseScenarios = [
|
|
59
59
|
{
|
|
60
60
|
id: "contract",
|
|
61
|
-
label: "
|
|
62
|
-
description: "
|
|
61
|
+
label: "계약",
|
|
62
|
+
description: "구조·기본값·지원 축·플랫폼과 성숙도가 보인다.",
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
id: "default",
|
|
66
|
-
label: "
|
|
67
|
-
description: "
|
|
66
|
+
label: "기본",
|
|
67
|
+
description: "제품 설정을 덮어쓰지 않고 recipe 기본값으로 보통 상태를 그린다.",
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
70
|
id: "dark",
|
|
71
|
-
label: "
|
|
72
|
-
description: "
|
|
71
|
+
label: "어두운 테마",
|
|
72
|
+
description: "어두운 테마에서도 의미 색이 읽힌다.",
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
id: "long-copy",
|
|
76
|
-
label: "
|
|
77
|
-
description: "
|
|
76
|
+
label: "긴 문구",
|
|
77
|
+
description: "긴 한국어·영어 문구가 잘리거나 의미를 숨기지 않고 줄바꿈된다.",
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
80
|
id: "large-text",
|
|
81
|
-
label: "200%
|
|
82
|
-
description: "
|
|
81
|
+
label: "200% 글자",
|
|
82
|
+
description: "글자를 200%까지 키워도 필요한 정보가 잘리지 않는다.",
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
id: "rtl",
|
|
86
|
-
label: "
|
|
87
|
-
description: "
|
|
86
|
+
label: "오른쪽→왼쪽",
|
|
87
|
+
description: "논리적 시작·끝 배치와 방향 아이콘이 올바르게 뒤집힌다.",
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
90
|
id: "reduced-motion",
|
|
91
|
-
label: "
|
|
92
|
-
description: "
|
|
91
|
+
label: "동작 줄이기",
|
|
92
|
+
description: "움직임이 recipe의 동작 줄이기 대체 표현을 따른다.",
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
id: "accessibility",
|
|
96
|
-
label: "
|
|
97
|
-
description: "
|
|
96
|
+
label: "접근성",
|
|
97
|
+
description: "이름·상태·관계·대비·터치 영역을 확인할 수 있다.",
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
id: "keyboard",
|
|
101
|
-
label: "
|
|
102
|
-
description: "
|
|
101
|
+
label: "키보드",
|
|
102
|
+
description: "포커스 순서와 문서화한 키보드 동작을 상호작용 테스트로 실행한다.",
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
id: "native-actions",
|
|
106
|
-
label: "
|
|
107
|
-
description: "
|
|
106
|
+
label: "앱 동작",
|
|
107
|
+
description: "접근성 동작과 그 상태 변화를 Native renderer에서 실행한다.",
|
|
108
108
|
},
|
|
109
109
|
{
|
|
110
110
|
id: "platform-parity",
|
|
111
|
-
label: "
|
|
112
|
-
description: "
|
|
111
|
+
label: "웹·앱 동등성",
|
|
112
|
+
description: "각 renderer가 플랫폼 고유 동작을 쓰면서 같은 의도를 유지한다.",
|
|
113
113
|
},
|
|
114
114
|
];
|
|
115
115
|
const plannedRequirements = ["contract"];
|
package/dist/showcase.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"showcase.js","sourceRoot":"","sources":["../src/showcase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,yBAAyB,GAK1B,MAAM,cAAc,CAAC;AAwBtB;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC;QACE,EAAE,EAAE,SAA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,GAAG,OAAO,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,GAAG,OAAO,IAAI,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,CAChH;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,IAAI,KAAK,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,UAA4C,gBAAgB;IAE5D,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACjB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC,EACD,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAClD,CAAC;AACJ,CAAC","sourcesContent":["import {\n componentCatalog,\n getComponentSurfaceStatus,\n type ComponentCatalogEntry,\n type ComponentStatus,\n type ComponentSurfaceMaturity,\n type ComponentSurfaceStatus,\n} from \"./catalog.js\";\nimport type { BehaviorName } from \"./behaviors.js\";\nimport type { ResolvedTheme } from \"./colors.js\";\nimport type {\n DesignSystemDirection,\n DesignSystemEnvironmentInput,\n DesignSystemTextScale,\n} from \"./design-system-provider.js\";\n\nexport type ShowcaseTheme = ResolvedTheme;\nexport type ShowcaseDirection = DesignSystemDirection;\n/** Closed fixture subset of the Provider's continuous text-scale signal. */\nexport type ShowcaseTextScale = 1 | 1.5 | 2;\nexport type ShowcaseMotionPreference = \"full\" | \"reduced\";\n\nexport type ShowcaseEnvironment = Readonly<{\n id: \"default\" | \"dark\" | \"large-text\" | \"rtl\" | \"reduced-motion\";\n label: string;\n theme: ShowcaseTheme;\n direction: ShowcaseDirection;\n textScale: ShowcaseTextScale;\n motion: ShowcaseMotionPreference;\n}>;\n\n/**\n * A small, deliberate environment matrix catches the high-risk differences\n * without multiplying every story into an unreadable Cartesian product.\n */\nexport const showcaseEnvironmentMatrix = [\n {\n id: \"default\",\n label: \"Light · LTR · 100%\",\n theme: \"light\",\n direction: \"ltr\",\n textScale: 1,\n motion: \"full\",\n },\n {\n id: \"dark\",\n label: \"Dark · LTR · 100%\",\n theme: \"dark\",\n direction: \"ltr\",\n textScale: 1,\n motion: \"full\",\n },\n {\n id: \"large-text\",\n label: \"Light · LTR · 200%\",\n theme: \"light\",\n direction: \"ltr\",\n textScale: 2,\n motion: \"full\",\n },\n {\n id: \"rtl\",\n label: \"Light · RTL · 100%\",\n theme: \"light\",\n direction: \"rtl\",\n textScale: 1,\n motion: \"full\",\n },\n {\n id: \"reduced-motion\",\n label: \"Light · LTR · Reduced motion\",\n theme: \"light\",\n direction: \"ltr\",\n textScale: 1,\n motion: \"reduced\",\n },\n] as const satisfies readonly ShowcaseEnvironment[];\n\n/** Bridges documentation fixtures to the same environment contract products consume. */\nexport function getShowcaseEnvironmentInput(\n environment: ShowcaseEnvironment,\n): DesignSystemEnvironmentInput {\n const textScale: DesignSystemTextScale = environment.textScale;\n return {\n theme: environment.theme,\n direction: environment.direction,\n textScale,\n reducedMotion: environment.motion === \"reduced\",\n };\n}\n\nexport type ShowcaseScenarioId =\n | \"contract\"\n | \"default\"\n | \"dark\"\n | \"long-copy\"\n | \"large-text\"\n | \"rtl\"\n | \"reduced-motion\"\n | \"accessibility\"\n | \"keyboard\"\n | \"native-actions\"\n | \"platform-parity\";\n\nexport type ShowcaseSurface = \"contract\" | \"web\" | \"native\";\n\nexport type ShowcaseScenario = Readonly<{\n id: ShowcaseScenarioId;\n label: string;\n description: string;\n}>;\n\nexport const showcaseScenarios = [\n {\n id: \"contract\",\n label: \"Contract\",\n description: \"Anatomy, defaults, supported axes, platform and maturity are visible.\",\n },\n {\n id: \"default\",\n label: \"Default\",\n description: \"The normal state renders using recipe defaults without product overrides.\",\n },\n {\n id: \"dark\",\n label: \"Dark\",\n description: \"Semantic colors remain legible on the dark theme.\",\n },\n {\n id: \"long-copy\",\n label: \"Long copy\",\n description: \"Long Korean and English copy wraps without clipping or hiding meaning.\",\n },\n {\n id: \"large-text\",\n label: \"200% text\",\n description: \"Text can grow to 200% without truncating required information.\",\n },\n {\n id: \"rtl\",\n label: \"RTL\",\n description: \"Logical start/end layout and directional icons mirror correctly.\",\n },\n {\n id: \"reduced-motion\",\n label: \"Reduced motion\",\n description: \"Motion follows the recipe reduced-motion fallback.\",\n },\n {\n id: \"accessibility\",\n label: \"Accessibility\",\n description: \"Names, states, relationships, contrast and touch targets are inspectable.\",\n },\n {\n id: \"keyboard\",\n label: \"Keyboard\",\n description: \"Focus order and documented keyboard behavior run as interaction tests.\",\n },\n {\n id: \"native-actions\",\n label: \"Native actions\",\n description: \"Accessible host actions and their state transitions run against the Native renderer.\",\n },\n {\n id: \"platform-parity\",\n label: \"Web / Native parity\",\n description: \"Adaptive renderers preserve intent while using platform-native behavior.\",\n },\n] as const satisfies readonly ShowcaseScenario[];\n\nconst plannedRequirements = [\"contract\"] as const satisfies readonly ShowcaseScenarioId[];\nconst rendererRequirements = [\n \"default\",\n \"dark\",\n \"long-copy\",\n \"large-text\",\n \"rtl\",\n \"reduced-motion\",\n \"accessibility\",\n] as const satisfies readonly Exclude<ShowcaseScenarioId, \"contract\">[];\n\nexport type ShowcaseComponentEntry = Readonly<{\n storyId: string;\n component: ComponentCatalogEntry;\n /** Resolved Web/Native renderer maturity, including legacy catalog inputs. */\n surfaceMaturity: ComponentSurfaceMaturity;\n requirements: readonly ShowcaseEvidenceRequirement[];\n requiredScenarios: readonly ShowcaseScenarioId[];\n requiredSurfaces: readonly ShowcaseSurface[];\n}>;\n\nexport type ShowcaseEvidenceRequirement = Readonly<{\n surface: ShowcaseSurface;\n scenarios: readonly ShowcaseScenarioId[];\n}>;\n\nexport type ShowcaseEvidenceEntry = Readonly<{\n storyId: string;\n surface: ShowcaseSurface;\n scenarios: readonly ShowcaseScenarioId[];\n}>;\n\nexport type ShowcaseCoverageEntry = Readonly<{\n storyId: string;\n component: ComponentCatalogEntry;\n missingEvidence: readonly Readonly<{\n surface: ShowcaseSurface;\n scenario: ShowcaseScenarioId;\n }>[];\n missingSurfaces: readonly ShowcaseSurface[];\n missingScenarios: readonly ShowcaseScenarioId[];\n complete: boolean;\n}>;\n\nexport function getShowcaseStoryId(entry: ComponentCatalogEntry): string {\n const slug = entry.name\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .replace(/[^a-zA-Z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\")\n .toLowerCase();\n return `${entry.category}/${slug}`;\n}\n\nexport function getRequiredShowcaseScenarios(\n entry: ComponentCatalogEntry,\n): readonly ShowcaseScenarioId[] {\n const activeSurfaces = ([\"web\", \"native\"] as const).filter((surface) =>\n isRendererMaturity(getComponentSurfaceStatus(entry, surface)),\n );\n if (activeSurfaces.length === 0) return plannedRequirements;\n\n const rendererScenarios = [...new Set(activeSurfaces.flatMap((surface) =>\n getRendererShowcaseScenarios(entry, surface),\n ))];\n return [\n \"contract\",\n ...rendererScenarios,\n ];\n}\n\nfunction isRendererMaturity(\n status: ComponentSurfaceStatus,\n): status is Extract<ComponentStatus, \"stable\" | \"beta\"> {\n return status === \"stable\" || status === \"beta\";\n}\n\n// These outputs expose no consumer-authored visible prose; default and accessibility proofs remain required.\nconst textlessComponentNames: ReadonlySet<string> = new Set([\n \"Icon\", \"IconButton\", \"Skeleton\", \"Spinner\", \"ThinkingOrb\", \"Divider\",\n \"Avatar\", \"Asset\", \"CounterBadge\", \"Image\", \"VisuallyHidden\", \"Pagination\",\n // These own form/range behavior but no long-form text slot; their child fields\n // and calendar cells own their copy, so duplicating that proof here misattributes it.\n \"Form\", \"DateRangePicker\",\n]);\n\n// These behaviors expose no interaction on either rendered surface.\nconst semanticOnlyBehaviors: ReadonlySet<NonNullable<ComponentCatalogEntry[\"behavior\"]>> = new Set([\n \"top\", \"authScreen\", \"heading\", \"bottomInfo\", \"nativePlatform\", \"textFormat\", \"asset\",\n]);\n\n// Keep surface capability lookup local: importing behaviorRegistry here would pull every\n// behavior contract into the lightweight showcase/evidence entry points. The alternative was\n// importing that registry; showcase.test.ts cross-checks these names against it to prevent drift.\nconst webKeyboardBehaviors: ReadonlySet<BehaviorName> = new Set([\n \"agreement\", \"alertDialog\", \"anchor\", \"authProviderButton\", \"bottomNavigation\", \"breadcrumb\",\n \"calendar\", \"carousel\", \"chart\", \"checkbox\", \"checkboxGroup\", \"chip\", \"collapsible\", \"combobox\",\n \"commandPalette\", \"contextMenu\", \"dataTable\", \"datePicker\", \"dateRange\", \"dialog\",\n \"disclosureGroup\", \"field\", \"filePicker\", \"floatingActionButton\", \"form\", \"layout\", \"link\",\n \"loadMore\", \"menu\", \"menubar\", \"numberField\", \"otpField\", \"pagination\", \"passwordField\",\n \"popover\", \"radioGroup\", \"searchField\", \"segmentedControl\", \"select\", \"sheet\", \"sidePanel\",\n \"sidebar\", \"skipNav\", \"slider\", \"splitter\", \"switch\", \"tabs\", \"tagsInput\", \"toast\",\n \"toggleGroup\", \"tooltip\", \"tour\", \"transferList\", \"tree\", \"uploadItem\",\n]);\nconst nativeActionBehaviors: ReadonlySet<BehaviorName> = new Set([\n \"agreement\", \"alertDialog\", \"authProviderButton\", \"bottomNavigation\", \"calendar\", \"carousel\",\n \"checkbox\", \"checkboxGroup\", \"chip\", \"collapsible\", \"combobox\", \"datePicker\", \"dateRange\",\n \"dialog\", \"disclosureGroup\", \"field\", \"filePicker\", \"floatingActionButton\", \"form\", \"link\",\n \"loadMore\", \"menu\", \"numberField\", \"otpField\", \"passwordField\", \"radioGroup\", \"searchField\",\n \"segmentedControl\", \"select\", \"sheet\", \"slider\", \"switch\", \"tabs\", \"tagsInput\", \"toast\",\n \"toggleGroup\", \"transferList\", \"uploadItem\",\n // 2026-10-14: Native DataTable sort/row actions and chart adjustable stepping.\n \"dataTable\", \"chart\",\n]);\n\nfunction getRendererShowcaseScenarios(\n entry: ComponentCatalogEntry,\n surface?: \"web\" | \"native\",\n): readonly Exclude<ShowcaseScenarioId, \"contract\">[] {\n const requirements: Exclude<ShowcaseScenarioId, \"contract\">[] = rendererRequirements.filter(\n (scenario) => scenario !== \"long-copy\" || !textlessComponentNames.has(entry.name),\n );\n // ColorPicker composes native form controls; its text commit/escape behavior still needs real keyboard proof.\n if (entry.name === \"ColorPicker\" && surface === \"web\") requirements.push(\"keyboard\");\n if (entry.behavior && !semanticOnlyBehaviors.has(entry.behavior)) {\n // Web owns DOM key bindings; Native declares host accessibility actions instead, so Pressable tests must not claim physical keyboard proof.\n if (surface === \"web\" && webKeyboardBehaviors.has(entry.behavior)) requirements.push(\"keyboard\");\n if (surface === \"native\" && nativeActionBehaviors.has(entry.behavior)) requirements.push(\"native-actions\");\n }\n return requirements;\n}\n\nexport function getRequiredShowcaseSurfaces(\n entry: ComponentCatalogEntry,\n): readonly ShowcaseSurface[] {\n return getRequiredShowcaseEvidence(entry).map(({ surface }) => surface);\n}\n\nexport function getRequiredShowcaseEvidence(\n entry: ComponentCatalogEntry,\n): readonly ShowcaseEvidenceRequirement[] {\n const requirements: ShowcaseEvidenceRequirement[] = [\n { surface: \"contract\", scenarios: [\"contract\"] },\n ];\n const activeSurfaces = ([\"web\", \"native\"] as const).filter((surface) =>\n isRendererMaturity(getComponentSurfaceStatus(entry, surface)),\n );\n for (const surface of activeSurfaces) {\n requirements.push({ surface, scenarios: getRendererShowcaseScenarios(entry, surface) });\n }\n return requirements;\n}\n\nexport function createShowcaseManifest(\n entries: readonly ComponentCatalogEntry[] = componentCatalog,\n): readonly ShowcaseComponentEntry[] {\n return entries.map((component) => ({\n storyId: getShowcaseStoryId(component),\n component,\n surfaceMaturity: {\n web: getComponentSurfaceStatus(component, \"web\"),\n native: getComponentSurfaceStatus(component, \"native\"),\n },\n requirements: getRequiredShowcaseEvidence(component),\n requiredScenarios: getRequiredShowcaseScenarios(component),\n requiredSurfaces: getRequiredShowcaseSurfaces(component),\n }));\n}\n\nexport const showcaseManifest = createShowcaseManifest();\n\nexport function createShowcaseCoverage(\n evidence: readonly ShowcaseEvidenceEntry[],\n manifest: readonly ShowcaseComponentEntry[] = showcaseManifest,\n): readonly ShowcaseCoverageEntry[] {\n return manifest.map(({ storyId, component, requirements }) => {\n const componentEvidence = evidence.filter((entry) => entry.storyId === storyId);\n const missingEvidence = requirements.flatMap(({ surface, scenarios }) =>\n scenarios\n .filter(\n (scenario) =>\n !componentEvidence.some(\n (entry) => entry.surface === surface && entry.scenarios.includes(scenario),\n ),\n )\n .map((scenario) => ({ surface, scenario })),\n );\n const missingSurfaces = [...new Set(missingEvidence.map(({ surface }) => surface))];\n const missingScenarios = [...new Set(missingEvidence.map(({ scenario }) => scenario))];\n return {\n storyId,\n component,\n missingEvidence,\n missingSurfaces,\n missingScenarios,\n complete: missingSurfaces.length === 0 && missingScenarios.length === 0,\n };\n });\n}\n\nexport function assertShowcaseCoverage(\n evidence: readonly ShowcaseEvidenceEntry[],\n manifest: readonly ShowcaseComponentEntry[] = showcaseManifest,\n): void {\n const missing = createShowcaseCoverage(evidence, manifest).filter(({ complete }) => !complete);\n if (missing.length === 0) return;\n const details = missing\n .map(({ storyId, missingEvidence }) =>\n `${storyId} (${missingEvidence.map(({ surface, scenario }) => `${surface}/${scenario}`).join(\", \") || \"none\"})`,\n )\n .join(\"\\n\");\n throw new Error(`Showcase evidence is incomplete:\\n${details}`);\n}\n\nexport function summarizeShowcaseMaturity(\n entries: readonly ComponentCatalogEntry[] = componentCatalog,\n): Readonly<Record<ComponentStatus, number>> {\n return entries.reduce<Record<ComponentStatus, number>>(\n (summary, entry) => {\n summary[entry.status] += 1;\n return summary;\n },\n { stable: 0, beta: 0, planned: 0, deprecated: 0 },\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"showcase.js","sourceRoot":"","sources":["../src/showcase.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,y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OAAO;IACjC,MAAM,OAAO,GAAG,OAAO;SACpB,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,EAAE,CACpC,GAAG,OAAO,KAAK,eAAe,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,GAAG,OAAO,IAAI,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,CAChH;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,IAAI,KAAK,CAAC,qCAAqC,OAAO,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,UAA4C,gBAAgB;IAE5D,OAAO,OAAO,CAAC,MAAM,CACnB,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE;QACjB,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3B,OAAO,OAAO,CAAC;IACjB,CAAC,EACD,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,CAClD,CAAC;AACJ,CAAC","sourcesContent":["import {\n componentCatalog,\n getComponentSurfaceStatus,\n type ComponentCatalogEntry,\n type ComponentStatus,\n type ComponentSurfaceMaturity,\n type ComponentSurfaceStatus,\n} from \"./catalog.js\";\nimport type { BehaviorName } from \"./behaviors.js\";\nimport type { ResolvedTheme } from \"./colors.js\";\nimport type {\n DesignSystemDirection,\n DesignSystemEnvironmentInput,\n DesignSystemTextScale,\n} from \"./design-system-provider.js\";\n\nexport type ShowcaseTheme = ResolvedTheme;\nexport type ShowcaseDirection = DesignSystemDirection;\n/** Closed fixture subset of the Provider's continuous text-scale signal. */\nexport type ShowcaseTextScale = 1 | 1.5 | 2;\nexport type ShowcaseMotionPreference = \"full\" | \"reduced\";\n\nexport type ShowcaseEnvironment = Readonly<{\n id: \"default\" | \"dark\" | \"large-text\" | \"rtl\" | \"reduced-motion\";\n label: string;\n theme: ShowcaseTheme;\n direction: ShowcaseDirection;\n textScale: ShowcaseTextScale;\n motion: ShowcaseMotionPreference;\n}>;\n\n/**\n * A small, deliberate environment matrix catches the high-risk differences\n * without multiplying every story into an unreadable Cartesian product.\n */\nexport const showcaseEnvironmentMatrix = [\n {\n id: \"default\",\n label: \"밝게 · 왼쪽→오른쪽 · 100%\",\n theme: \"light\",\n direction: \"ltr\",\n textScale: 1,\n motion: \"full\",\n },\n {\n id: \"dark\",\n label: \"어둡게 · 왼쪽→오른쪽 · 100%\",\n theme: \"dark\",\n direction: \"ltr\",\n textScale: 1,\n motion: \"full\",\n },\n {\n id: \"large-text\",\n label: \"밝게 · 왼쪽→오른쪽 · 200%\",\n theme: \"light\",\n direction: \"ltr\",\n textScale: 2,\n motion: \"full\",\n },\n {\n id: \"rtl\",\n label: \"밝게 · 오른쪽→왼쪽 · 100%\",\n theme: \"light\",\n direction: \"rtl\",\n textScale: 1,\n motion: \"full\",\n },\n {\n id: \"reduced-motion\",\n label: \"밝게 · 왼쪽→오른쪽 · 동작 줄이기\",\n theme: \"light\",\n direction: \"ltr\",\n textScale: 1,\n motion: \"reduced\",\n },\n] as const satisfies readonly ShowcaseEnvironment[];\n\n/** Bridges documentation fixtures to the same environment contract products consume. */\nexport function getShowcaseEnvironmentInput(\n environment: ShowcaseEnvironment,\n): DesignSystemEnvironmentInput {\n const textScale: DesignSystemTextScale = environment.textScale;\n return {\n theme: environment.theme,\n direction: environment.direction,\n textScale,\n reducedMotion: environment.motion === \"reduced\",\n };\n}\n\nexport type ShowcaseScenarioId =\n | \"contract\"\n | \"default\"\n | \"dark\"\n | \"long-copy\"\n | \"large-text\"\n | \"rtl\"\n | \"reduced-motion\"\n | \"accessibility\"\n | \"keyboard\"\n | \"native-actions\"\n | \"platform-parity\";\n\nexport type ShowcaseSurface = \"contract\" | \"web\" | \"native\";\n\nexport type ShowcaseScenario = Readonly<{\n id: ShowcaseScenarioId;\n label: string;\n description: string;\n}>;\n\nexport const showcaseScenarios = [\n {\n id: \"contract\",\n label: \"계약\",\n description: \"구조·기본값·지원 축·플랫폼과 성숙도가 보인다.\",\n },\n {\n id: \"default\",\n label: \"기본\",\n description: \"제품 설정을 덮어쓰지 않고 recipe 기본값으로 보통 상태를 그린다.\",\n },\n {\n id: \"dark\",\n label: \"어두운 테마\",\n description: \"어두운 테마에서도 의미 색이 읽힌다.\",\n },\n {\n id: \"long-copy\",\n label: \"긴 문구\",\n description: \"긴 한국어·영어 문구가 잘리거나 의미를 숨기지 않고 줄바꿈된다.\",\n },\n {\n id: \"large-text\",\n label: \"200% 글자\",\n description: \"글자를 200%까지 키워도 필요한 정보가 잘리지 않는다.\",\n },\n {\n id: \"rtl\",\n label: \"오른쪽→왼쪽\",\n description: \"논리적 시작·끝 배치와 방향 아이콘이 올바르게 뒤집힌다.\",\n },\n {\n id: \"reduced-motion\",\n label: \"동작 줄이기\",\n description: \"움직임이 recipe의 동작 줄이기 대체 표현을 따른다.\",\n },\n {\n id: \"accessibility\",\n label: \"접근성\",\n description: \"이름·상태·관계·대비·터치 영역을 확인할 수 있다.\",\n },\n {\n id: \"keyboard\",\n label: \"키보드\",\n description: \"포커스 순서와 문서화한 키보드 동작을 상호작용 테스트로 실행한다.\",\n },\n {\n id: \"native-actions\",\n label: \"앱 동작\",\n description: \"접근성 동작과 그 상태 변화를 Native renderer에서 실행한다.\",\n },\n {\n id: \"platform-parity\",\n label: \"웹·앱 동등성\",\n description: \"각 renderer가 플랫폼 고유 동작을 쓰면서 같은 의도를 유지한다.\",\n },\n] as const satisfies readonly ShowcaseScenario[];\n\nconst plannedRequirements = [\"contract\"] as const satisfies readonly ShowcaseScenarioId[];\nconst rendererRequirements = [\n \"default\",\n \"dark\",\n \"long-copy\",\n \"large-text\",\n \"rtl\",\n \"reduced-motion\",\n \"accessibility\",\n] as const satisfies readonly Exclude<ShowcaseScenarioId, \"contract\">[];\n\nexport type ShowcaseComponentEntry = Readonly<{\n storyId: string;\n component: ComponentCatalogEntry;\n /** Resolved Web/Native renderer maturity, including legacy catalog inputs. */\n surfaceMaturity: ComponentSurfaceMaturity;\n requirements: readonly ShowcaseEvidenceRequirement[];\n requiredScenarios: readonly ShowcaseScenarioId[];\n requiredSurfaces: readonly ShowcaseSurface[];\n}>;\n\nexport type ShowcaseEvidenceRequirement = Readonly<{\n surface: ShowcaseSurface;\n scenarios: readonly ShowcaseScenarioId[];\n}>;\n\nexport type ShowcaseEvidenceEntry = Readonly<{\n storyId: string;\n surface: ShowcaseSurface;\n scenarios: readonly ShowcaseScenarioId[];\n}>;\n\nexport type ShowcaseCoverageEntry = Readonly<{\n storyId: string;\n component: ComponentCatalogEntry;\n missingEvidence: readonly Readonly<{\n surface: ShowcaseSurface;\n scenario: ShowcaseScenarioId;\n }>[];\n missingSurfaces: readonly ShowcaseSurface[];\n missingScenarios: readonly ShowcaseScenarioId[];\n complete: boolean;\n}>;\n\nexport function getShowcaseStoryId(entry: ComponentCatalogEntry): string {\n const slug = entry.name\n .replace(/([a-z0-9])([A-Z])/g, \"$1-$2\")\n .replace(/[^a-zA-Z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\")\n .toLowerCase();\n return `${entry.category}/${slug}`;\n}\n\nexport function getRequiredShowcaseScenarios(\n entry: ComponentCatalogEntry,\n): readonly ShowcaseScenarioId[] {\n const activeSurfaces = ([\"web\", \"native\"] as const).filter((surface) =>\n isRendererMaturity(getComponentSurfaceStatus(entry, surface)),\n );\n if (activeSurfaces.length === 0) return plannedRequirements;\n\n const rendererScenarios = [...new Set(activeSurfaces.flatMap((surface) =>\n getRendererShowcaseScenarios(entry, surface),\n ))];\n return [\n \"contract\",\n ...rendererScenarios,\n ];\n}\n\nfunction isRendererMaturity(\n status: ComponentSurfaceStatus,\n): status is Extract<ComponentStatus, \"stable\" | \"beta\"> {\n return status === \"stable\" || status === \"beta\";\n}\n\n// These outputs expose no consumer-authored visible prose; default and accessibility proofs remain required.\nconst textlessComponentNames: ReadonlySet<string> = new Set([\n \"Icon\", \"IconButton\", \"Skeleton\", \"Spinner\", \"ThinkingOrb\", \"Divider\",\n \"Avatar\", \"Asset\", \"CounterBadge\", \"Image\", \"VisuallyHidden\", \"Pagination\",\n // These own form/range behavior but no long-form text slot; their child fields\n // and calendar cells own their copy, so duplicating that proof here misattributes it.\n \"Form\", \"DateRangePicker\",\n]);\n\n// These behaviors expose no interaction on either rendered surface.\nconst semanticOnlyBehaviors: ReadonlySet<NonNullable<ComponentCatalogEntry[\"behavior\"]>> = new Set([\n \"top\", \"authScreen\", \"heading\", \"bottomInfo\", \"nativePlatform\", \"textFormat\", \"asset\",\n]);\n\n// Keep surface capability lookup local: importing behaviorRegistry here would pull every\n// behavior contract into the lightweight showcase/evidence entry points. The alternative was\n// importing that registry; showcase.test.ts cross-checks these names against it to prevent drift.\nconst webKeyboardBehaviors: ReadonlySet<BehaviorName> = new Set([\n \"agreement\", \"alertDialog\", \"anchor\", \"authProviderButton\", \"bottomNavigation\", \"breadcrumb\",\n \"calendar\", \"carousel\", \"chart\", \"checkbox\", \"checkboxGroup\", \"chip\", \"collapsible\", \"combobox\",\n \"commandPalette\", \"contextMenu\", \"dataTable\", \"datePicker\", \"dateRange\", \"dialog\",\n \"disclosureGroup\", \"field\", \"filePicker\", \"floatingActionButton\", \"form\", \"layout\", \"link\",\n \"loadMore\", \"menu\", \"menubar\", \"numberField\", \"otpField\", \"pagination\", \"passwordField\",\n \"popover\", \"radioGroup\", \"searchField\", \"segmentedControl\", \"select\", \"sheet\", \"sidePanel\",\n \"sidebar\", \"skipNav\", \"slider\", \"splitter\", \"switch\", \"tabs\", \"tagsInput\", \"toast\",\n \"toggleGroup\", \"tooltip\", \"tour\", \"transferList\", \"tree\", \"uploadItem\",\n]);\nconst nativeActionBehaviors: ReadonlySet<BehaviorName> = new Set([\n \"agreement\", \"alertDialog\", \"authProviderButton\", \"bottomNavigation\", \"calendar\", \"carousel\",\n \"checkbox\", \"checkboxGroup\", \"chip\", \"collapsible\", \"combobox\", \"datePicker\", \"dateRange\",\n \"dialog\", \"disclosureGroup\", \"field\", \"filePicker\", \"floatingActionButton\", \"form\", \"link\",\n \"loadMore\", \"menu\", \"numberField\", \"otpField\", \"passwordField\", \"radioGroup\", \"searchField\",\n \"segmentedControl\", \"select\", \"sheet\", \"slider\", \"switch\", \"tabs\", \"tagsInput\", \"toast\",\n \"toggleGroup\", \"transferList\", \"uploadItem\",\n // 2026-10-14: Native DataTable sort/row actions and chart adjustable stepping.\n \"dataTable\", \"chart\",\n]);\n\nfunction getRendererShowcaseScenarios(\n entry: ComponentCatalogEntry,\n surface?: \"web\" | \"native\",\n): readonly Exclude<ShowcaseScenarioId, \"contract\">[] {\n const requirements: Exclude<ShowcaseScenarioId, \"contract\">[] = rendererRequirements.filter(\n (scenario) => scenario !== \"long-copy\" || !textlessComponentNames.has(entry.name),\n );\n // ColorPicker composes native form controls; its text commit/escape behavior still needs real keyboard proof.\n if (entry.name === \"ColorPicker\" && surface === \"web\") requirements.push(\"keyboard\");\n if (entry.behavior && !semanticOnlyBehaviors.has(entry.behavior)) {\n // Web owns DOM key bindings; Native declares host accessibility actions instead, so Pressable tests must not claim physical keyboard proof.\n if (surface === \"web\" && webKeyboardBehaviors.has(entry.behavior)) requirements.push(\"keyboard\");\n if (surface === \"native\" && nativeActionBehaviors.has(entry.behavior)) requirements.push(\"native-actions\");\n }\n return requirements;\n}\n\nexport function getRequiredShowcaseSurfaces(\n entry: ComponentCatalogEntry,\n): readonly ShowcaseSurface[] {\n return getRequiredShowcaseEvidence(entry).map(({ surface }) => surface);\n}\n\nexport function getRequiredShowcaseEvidence(\n entry: ComponentCatalogEntry,\n): readonly ShowcaseEvidenceRequirement[] {\n const requirements: ShowcaseEvidenceRequirement[] = [\n { surface: \"contract\", scenarios: [\"contract\"] },\n ];\n const activeSurfaces = ([\"web\", \"native\"] as const).filter((surface) =>\n isRendererMaturity(getComponentSurfaceStatus(entry, surface)),\n );\n for (const surface of activeSurfaces) {\n requirements.push({ surface, scenarios: getRendererShowcaseScenarios(entry, surface) });\n }\n return requirements;\n}\n\nexport function createShowcaseManifest(\n entries: readonly ComponentCatalogEntry[] = componentCatalog,\n): readonly ShowcaseComponentEntry[] {\n return entries.map((component) => ({\n storyId: getShowcaseStoryId(component),\n component,\n surfaceMaturity: {\n web: getComponentSurfaceStatus(component, \"web\"),\n native: getComponentSurfaceStatus(component, \"native\"),\n },\n requirements: getRequiredShowcaseEvidence(component),\n requiredScenarios: getRequiredShowcaseScenarios(component),\n requiredSurfaces: getRequiredShowcaseSurfaces(component),\n }));\n}\n\nexport const showcaseManifest = createShowcaseManifest();\n\nexport function createShowcaseCoverage(\n evidence: readonly ShowcaseEvidenceEntry[],\n manifest: readonly ShowcaseComponentEntry[] = showcaseManifest,\n): readonly ShowcaseCoverageEntry[] {\n return manifest.map(({ storyId, component, requirements }) => {\n const componentEvidence = evidence.filter((entry) => entry.storyId === storyId);\n const missingEvidence = requirements.flatMap(({ surface, scenarios }) =>\n scenarios\n .filter(\n (scenario) =>\n !componentEvidence.some(\n (entry) => entry.surface === surface && entry.scenarios.includes(scenario),\n ),\n )\n .map((scenario) => ({ surface, scenario })),\n );\n const missingSurfaces = [...new Set(missingEvidence.map(({ surface }) => surface))];\n const missingScenarios = [...new Set(missingEvidence.map(({ scenario }) => scenario))];\n return {\n storyId,\n component,\n missingEvidence,\n missingSurfaces,\n missingScenarios,\n complete: missingSurfaces.length === 0 && missingScenarios.length === 0,\n };\n });\n}\n\nexport function assertShowcaseCoverage(\n evidence: readonly ShowcaseEvidenceEntry[],\n manifest: readonly ShowcaseComponentEntry[] = showcaseManifest,\n): void {\n const missing = createShowcaseCoverage(evidence, manifest).filter(({ complete }) => !complete);\n if (missing.length === 0) return;\n const details = missing\n .map(({ storyId, missingEvidence }) =>\n `${storyId} (${missingEvidence.map(({ surface, scenario }) => `${surface}/${scenario}`).join(\", \") || \"none\"})`,\n )\n .join(\"\\n\");\n throw new Error(`Showcase evidence is incomplete:\\n${details}`);\n}\n\nexport function summarizeShowcaseMaturity(\n entries: readonly ComponentCatalogEntry[] = componentCatalog,\n): Readonly<Record<ComponentStatus, number>> {\n return entries.reduce<Record<ComponentStatus, number>>(\n (summary, entry) => {\n summary[entry.status] += 1;\n return summary;\n },\n { stable: 0, beta: 0, planned: 0, deprecated: 0 },\n );\n}\n"]}
|
package/dist/tag.d.ts
CHANGED
|
@@ -41,7 +41,11 @@ export declare const tagRecipe: {
|
|
|
41
41
|
key: "textMuted";
|
|
42
42
|
alpha?: number;
|
|
43
43
|
}>;
|
|
44
|
-
readonly border:
|
|
44
|
+
readonly border: Readonly<{
|
|
45
|
+
source: "theme";
|
|
46
|
+
key: "border";
|
|
47
|
+
alpha?: number;
|
|
48
|
+
}>;
|
|
45
49
|
};
|
|
46
50
|
readonly brand: {
|
|
47
51
|
readonly background: Readonly<{
|
|
@@ -54,7 +58,11 @@ export declare const tagRecipe: {
|
|
|
54
58
|
key: "contentBrand";
|
|
55
59
|
alpha?: number;
|
|
56
60
|
}>;
|
|
57
|
-
readonly border:
|
|
61
|
+
readonly border: Readonly<{
|
|
62
|
+
source: "theme";
|
|
63
|
+
key: "border";
|
|
64
|
+
alpha?: number;
|
|
65
|
+
}>;
|
|
58
66
|
};
|
|
59
67
|
readonly info: {
|
|
60
68
|
readonly background: Readonly<{
|
package/dist/tag.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAI/B,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAE7E,eAAO,MAAM,WAAW;;CAEwB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;IACnC,KAAK,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GAAG,QAAQ,CAAC;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC,CAAC;AAEH,yDAAyD;AACzD,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,qBAAqB,GAC7B,uBAAuB,CAUzB"}
|
package/dist/tag.js
CHANGED
|
@@ -40,15 +40,16 @@ export const tagRecipe = {
|
|
|
40
40
|
slots: ["root", "label"],
|
|
41
41
|
defaults: tagDefaults,
|
|
42
42
|
tones: {
|
|
43
|
+
// Same as badgeRecipe: a canvas plate without a border vanished on the canvas (2026-10-17 review E3).
|
|
43
44
|
neutral: {
|
|
44
45
|
background: semanticColors.canvas,
|
|
45
46
|
content: semanticColors.content.secondary,
|
|
46
|
-
border:
|
|
47
|
+
border: semanticColors.border.default,
|
|
47
48
|
},
|
|
48
49
|
brand: {
|
|
49
50
|
background: semanticColors.canvas,
|
|
50
51
|
content: semanticColors.content.brand,
|
|
51
|
-
border:
|
|
52
|
+
border: semanticColors.border.default,
|
|
52
53
|
},
|
|
53
54
|
info: {
|
|
54
55
|
background: semanticColors.canvas,
|
package/dist/tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sourceRoot":"","sources":["../src/tag.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI/D,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,SAAS;CAC+B,CAAC;AAiBjD,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,E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,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QAC/D,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QACzD,MAAM,EACJ,QAAQ,CAAC,MAAM,KAAK,IAAI;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KACtD,CAAC;AACJ,CAAC","sourcesContent":["import {\n resolveColorReference,\n type ColorReferencePalette,\n} from \"./color-references.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\nimport { fontWeight, spacing, stroke } from \"./foundations.js\";\n\nexport type TagTone = \"neutral\" | \"info\" | \"success\" | \"attention\" | \"brand\";\n\nexport const tagDefaults = {\n tone: \"neutral\",\n} as const satisfies Readonly<{ tone: TagTone }>;\n\n/**\n * A single piece of static metadata (a position, a grade, a season). Tag has\n * no interaction axis at all — no selected, no pressed, no closable. Removing\n * or toggling a tag is deselection, which belongs to `Chip`.\n */\nexport type TagDescriptor = Readonly<{\n label: string;\n tone?: TagTone;\n}>;\n\nexport type ResolvedTagDescriptor = Readonly<{\n label: string;\n tone: TagTone;\n}>;\n\nfunction assertCopy(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Tag ${field} must not be empty`);\n }\n}\n\nconst supportedTones: readonly TagTone[] = [\n \"neutral\",\n \"info\",\n \"success\",\n \"attention\",\n \"brand\",\n];\n\nexport function validateTagDescriptor(descriptor: TagDescriptor): void {\n assertCopy(descriptor.label, \"label\");\n if (\n descriptor.tone !== undefined &&\n !supportedTones.includes(descriptor.tone)\n ) {\n throw new TypeError(`Unsupported Tag tone: ${String(descriptor.tone)}`);\n }\n}\n\nexport function resolveTagDescriptor(\n descriptor: TagDescriptor,\n): ResolvedTagDescriptor {\n validateTagDescriptor(descriptor);\n return {\n label: descriptor.label,\n tone: descriptor.tone ?? tagDefaults.tone,\n };\n}\n\n/**\n * Rectangular, not the pill `radius.full` that `chipRecipe` and `badgeRecipe`\n * use, so a static Tag never reads as a pressable Chip or a status Badge at a\n * glance. No `states` and no `focus` contract: nothing here is ever pressed\n * or focused.\n */\nexport const tagRecipe = {\n slots: [\"root\", \"label\"] as const,\n defaults: tagDefaults,\n tones: {\n // Same as badgeRecipe: a canvas plate without a border vanished on the canvas (2026-10-17 review E3).\n neutral: {\n background: semanticColors.canvas,\n content: semanticColors.content.secondary,\n border: semanticColors.border.default,\n },\n brand: {\n background: semanticColors.canvas,\n content: semanticColors.content.brand,\n border: semanticColors.border.default,\n },\n info: {\n background: semanticColors.canvas,\n content: semanticColors.feedback.info.foreground,\n border: semanticColors.feedback.info.border,\n },\n success: {\n background: semanticColors.feedback.success.badgeBackground,\n content: semanticColors.feedback.success.foreground,\n border: semanticColors.feedback.success.border,\n },\n attention: {\n background: semanticColors.feedback.attention.badgeBackground,\n content: semanticColors.feedback.attention.foreground,\n border: semanticColors.feedback.attention.border,\n },\n },\n size: {\n // Static metadata still participates in Dynamic Type. A fixed 20px frame\n // clips the label at accessibility sizes; minHeight preserves the compact\n // base shape while allowing the intrinsic line box to grow.\n minHeight: 20,\n paddingHorizontal: spacing.xxs,\n gap: spacing.xxs,\n textVariant: \"caption\",\n fontWeight: fontWeight.semibold,\n },\n radius: \"sm\",\n borderWidth: stroke.default,\n} as const;\n\nexport type ResolvedTagPresentation = Readonly<{\n background: string;\n content: string;\n border: string | null;\n}>;\n\n/** Resolve the same Tag recipe for non-CSS renderers. */\nexport function resolveTagPresentation(\n tone: TagTone,\n palette: ColorReferencePalette,\n): ResolvedTagPresentation {\n const contract = tagRecipe.tones[tone];\n return {\n background: resolveColorReference(contract.background, palette),\n content: resolveColorReference(contract.content, palette),\n border:\n contract.border === null\n ? null\n : resolveColorReference(contract.border, palette),\n };\n}\n"]}
|
package/dist/tags-input.d.ts
CHANGED
|
@@ -99,6 +99,12 @@ export declare const tagsInputRecipe: {
|
|
|
99
99
|
key: "textBody";
|
|
100
100
|
alpha?: number;
|
|
101
101
|
}>;
|
|
102
|
+
readonly border: Readonly<{
|
|
103
|
+
source: "theme";
|
|
104
|
+
key: "borderControl";
|
|
105
|
+
alpha?: number;
|
|
106
|
+
}>;
|
|
107
|
+
readonly borderWidth: 1;
|
|
102
108
|
};
|
|
103
109
|
/** 삭제 버튼은 태그보다 작아도 되지만 포인터 타깃은 공용 최소값을 지킨다. */
|
|
104
110
|
readonly remove: {
|
package/dist/tags-input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags-input.d.ts","sourceRoot":"","sources":["../src/tags-input.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,SAAS,mBAAmB,EAAE,EAC3C,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,UAAU,GAC7B,MAAM,GAAG,IAAI,CAOf;AAED,eAAO,MAAM,yBAAyB;IACpC;;;OAGG;yBACsB,SAAS,kBAAkB,EAAE;IACtD,2DAA2D;;CAEnD,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,wBAAwB,CAA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CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,CAAC;AAEnF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAC3C,QAAQ,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACrC,kCAAkC;IAClC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACtC,CAAC,CAAC;AAEH;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,eAAoB,GAC3B,qBAAqB,CAavB;AAED,8CAA8C;AAC9C,wBAAgB,WAAW,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAKxF;AAED,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoB1B,+CAA+C;;;;;;;;;;;;;;;;;;;;;;;;;CAmBhD,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;IAG5B;;;OAGG;;;;;;;;;;;;;;;;;;;;;CAyBgC,CAAC"}
|
package/dist/tags-input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { fieldFrameContract, focusIndicatorContract } from "./component-contracts.js";
|
|
2
|
-
import { control, spacing } from "./foundations.js";
|
|
2
|
+
import { control, spacing, stroke } from "./foundations.js";
|
|
3
3
|
import { semanticColors } from "./semantic-colors.js";
|
|
4
4
|
/**
|
|
5
5
|
* 활성 후보를 방향키로 옮긴 결과. 목록 끝에서 순환한다 — 후보가 보통 짧아서 끝에
|
|
@@ -67,6 +67,8 @@ export const tagsInputRecipe = {
|
|
|
67
67
|
gap: spacing.xxs,
|
|
68
68
|
background: semanticColors.canvas,
|
|
69
69
|
color: semanticColors.content.body,
|
|
70
|
+
border: semanticColors.border.control,
|
|
71
|
+
borderWidth: stroke.default,
|
|
70
72
|
},
|
|
71
73
|
/** 삭제 버튼은 태그보다 작아도 되지만 포인터 타깃은 공용 최소값을 지킨다. */
|
|
72
74
|
remove: { minTouchTarget: control.minTouchTarget, color: semanticColors.content.secondary },
|
package/dist/tags-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags-input.js","sourceRoot":"","sources":["../src/tags-input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAmCtD;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAC9C,WAA2C,EAC3C,SAAwB,EACxB,SAA8B;IAE9B,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC;IACrE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;IACjE,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,C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,2FAA2F;QAC3F,yFAAyF;QACzF,iFAAiF;KAClF;CACkC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport { fieldFrameContract, focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, spacing } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * 자유 입력으로 여러 값을 모으는 필드 — 해시태그, 초대할 사람, 검색 필터.\n *\n * Combobox와 다르다. Combobox는 **주어진 목록에서 고른다**. TagsInput은 목록이 없거나\n * 있어도 목록 밖의 값을 만들 수 있다. 그래서 Combobox에 `multiple` 축을 붙이는 대신\n * 별도로 둔다 — 합치면 \"목록에 없는 값을 고를 수 있는 Select\"라는 모순이 생긴다.\n * (제품이 후보 목록을 함께 보여 주고 싶으면 이 필드와 Combobox의 listbox를 조합한다.)\n *\n * 이 계약이 소유하는 것은 **언제 태그가 확정되는가**와 **빈 입력에서 지우면 무엇이\n * 지워지는가** 둘이다. 중복 허용 여부·최대 개수·글자 규칙은 제품 정책이라 판정 결과를\n * 받기만 한다.\n */\nexport type TagsInputCommitKey = \"Enter\" | \"Comma\" | \"Space\" | \"Blur\";\n\n/**\n * 후보 목록. Combobox의 listbox 계약을 **이 필드 안에서** 쓰는 형태다.\n *\n * \"Combobox에 multiple을 붙이자\"가 아니라 여기로 온 이유: Combobox의 값은 목록 안의\n * 키 하나이고 이 필드의 값은 문자열 배열이다. 값 모양이 다른 둘을 한 컴포넌트에 넣으면\n * 모든 소비자가 매번 좁히기를 해야 한다. 자유 입력이 이미 여기 있으므로 후보를 여기에\n * 더하는 쪽이 값 하나로 끝난다.\n *\n * 필터링은 제품이 한다 — 이 계약은 \"무엇을 보여줄지\"가 아니라 \"고른 것을 어떻게\n * 확정할지\"만 안다.\n */\nexport type TagsInputSuggestion = Readonly<{\n id: string;\n label: string;\n /** 확정될 문자열. 생략하면 `label`. */\n value?: string;\n disabled?: boolean;\n}>;\n\n/**\n * 활성 후보를 방향키로 옮긴 결과. 목록 끝에서 순환한다 — 후보가 보통 짧아서 끝에\n * 막히면 반대 끝까지 다시 내려가야 한다.\n */\nexport function resolveTagsInputActiveSuggestion(\n suggestions: readonly TagsInputSuggestion[],\n currentId: string | null,\n direction: \"next\" | \"previous\",\n): string | null {\n const enabled = suggestions.filter((item) => item.disabled !== true);\n if (enabled.length === 0) return null;\n const index = enabled.findIndex((item) => item.id === currentId);\n if (index === -1) return direction === \"next\" ? enabled[0]!.id : enabled.at(-1)!.id;\n const next = direction === \"next\" ? index + 1 : index - 1;\n return enabled[(next + enabled.length) % enabled.length]!.id;\n}\n\nexport const tagsInputBehaviorDefaults = {\n /**\n * Enter만 기본이다. 쉼표·공백은 언어에 따라 값의 일부다(한국어 태그에 공백이 흔하다).\n * 제품이 자기 도메인을 알 때 켠다.\n */\n commitKeys: [\"Enter\"] as readonly TagsInputCommitKey[],\n /** 빈 입력에서 Backspace는 마지막 태그를 **선택**만 한다. 한 번 더 눌러야 지운다. */\n backspaceRemovesLastTag: false,\n} as const;\n\nexport type TagsInputRejectionReason = \"empty\" | \"duplicate\" | \"limit\" | \"invalid\";\n\nexport type TagsInputCommitResult = Readonly<{\n accepted: boolean;\n /** 정리된 값(앞뒤 공백 제거). 거절돼도 제품이 문구에 쓸 수 있게 돌려준다. */\n value: string;\n reason?: TagsInputRejectionReason;\n}>;\n\nexport type TagsInputPolicy = Readonly<{\n /** 같은 값을 다시 넣을 수 있는가. 기본은 막는다. */\n allowDuplicates?: boolean;\n maxTags?: number;\n /** 제품 도메인 규칙. 실패 사유는 `invalid` 하나로 합쳐 돌려준다. */\n isValid?: (value: string) => boolean;\n}>;\n\n/**\n * 태그 하나를 확정할 수 있는지 판정한다. 값을 바꾸지 않고 결과만 돌려준다 —\n * 실제 상태 갱신은 renderer가, 사용자에게 보여 줄 문장은 제품이 만든다.\n */\nexport function resolveTagsInputCommit(\n current: readonly string[],\n rawValue: string,\n policy: TagsInputPolicy = {},\n): TagsInputCommitResult {\n const value = rawValue.trim();\n if (value.length === 0) return { accepted: false, value, reason: \"empty\" };\n if (policy.allowDuplicates !== true && current.includes(value)) {\n return { accepted: false, value, reason: \"duplicate\" };\n }\n if (policy.maxTags !== undefined && current.length >= policy.maxTags) {\n return { accepted: false, value, reason: \"limit\" };\n }\n if (policy.isValid !== undefined && !policy.isValid(value)) {\n return { accepted: false, value, reason: \"invalid\" };\n }\n return { accepted: true, value };\n}\n\n/** 태그 하나를 뺀 목록. 같은 값이 여러 개면 해당 위치 하나만 지운다. */\nexport function removeTagAt(current: readonly string[], index: number): readonly string[] {\n if (!Number.isInteger(index) || index < 0 || index >= current.length) {\n throw new RangeError(`TagsInput index out of range: ${String(index)}`);\n }\n return [...current.slice(0, index), ...current.slice(index + 1)];\n}\n\nexport const tagsInputRecipe = {\n slots: [\"root\", \"frame\", \"tag\", \"remove\", \"input\"] as const,\n defaults: { commitKeys: tagsInputBehaviorDefaults.commitKeys },\n frame: {\n minHeight: fieldFrameContract.minHeight,\n paddingHorizontal: fieldFrameContract.paddingHorizontal,\n paddingVertical: spacing.xxs,\n gap: spacing.xs,\n border: fieldFrameContract.border,\n background: fieldFrameContract.background,\n },\n tag: {\n minHeight: 28,\n paddingHorizontal: spacing.xs,\n gap: spacing.xxs,\n background: semanticColors.canvas,\n color: semanticColors.content.body,\n },\n /** 삭제 버튼은 태그보다 작아도 되지만 포인터 타깃은 공용 최소값을 지킨다. */\n remove: { minTouchTarget: control.minTouchTarget, color: semanticColors.content.secondary },\n selectedTagOutline: semanticColors.border.focus,\n states: { focus: focusIndicatorContract },\n} as const satisfies {\n slots: readonly [\"root\", \"frame\", \"tag\", \"remove\", \"input\"];\n defaults: { commitKeys: readonly TagsInputCommitKey[] };\n frame: {\n minHeight: number;\n paddingHorizontal: number;\n paddingVertical: number;\n gap: number;\n border: ColorReference;\n background: ColorReference;\n };\n tag: { minHeight: number; paddingHorizontal: number; gap: number; background: ColorReference; color: ColorReference };\n remove: { minTouchTarget: number; color: ColorReference };\n selectedTagOutline: ColorReference;\n states: { focus: typeof focusIndicatorContract };\n};\n\nexport const tagsInputBehavior = {\n controlled: [\"tags\", \"defaultTags\", \"onTagsChange\"],\n inputs: [\"policy\", \"commitKeys\", \"label\", \"removeLabel\"],\n /**\n * `onDraftChange`가 없으면 제품이 후보를 거를 수 없다 — 무엇을 입력 중인지 모르기\n * 때문이다. 후보 목록을 계약에 넣는 순간 이 이벤트도 함께 필요하다.\n */\n events: [\"onReject\", \"onDraftChange\"],\n defaults: { backspaceRemovesLastTag: tagsInputBehaviorDefaults.backspaceRemovesLastTag },\n stateAxes: {\n availability: [\"enabled\", \"disabled\"],\n value: [\"empty\", \"filled\"],\n validation: [\"valid\", \"invalid\"],\n },\n web: {\n roles: [\"combobox\", \"listbox\", \"option\", \"button\", \"list\", \"listitem\"],\n keyboard: [\"Enter\", \"Backspace\", \"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\", \"Escape\", \"Tab\"],\n focus: \"native\",\n },\n native: { roles: [\"button\"], states: [\"disabled\"], actions: [\"commit\", \"remove\"] },\n scenarios: [\n \"enter-commits-the-trimmed-value-and-clears-the-input\",\n \"an-empty-or-whitespace-only-value-is-never-committed\",\n \"duplicates-are-rejected-by-default-and-the-reason-is-reported-not-swallowed\",\n \"backspace-in-an-empty-input-selects-the-last-tag-before-a-second-press-removes-it\",\n \"every-tag-carries-its-own-remove-control-with-a-localized-name\",\n \"the-policy-judges-and-the-product-writes-the-sentence-the-user-reads\",\n \"a-candidate-list-lives-in-this-field-because-the-value-shape-is-this-fields-not-comboboxs\",\n \"enter-commits-the-active-candidate-when-one-is-highlighted-and-the-typed-text-otherwise\",\n \"candidate-filtering-belongs-to-the-product-the-contract-only-commits-the-choice\",\n ],\n} as const satisfies BehaviorContract;\n"]}
|
|
1
|
+
{"version":3,"file":"tags-input.js","sourceRoot":"","sources":["../src/tags-input.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB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AC,UAAU,EAAE,eAAe,CAAC;IACrC,QAAQ,EAAE,EAAE,uBAAuB,EAAE,yBAAyB,CAAC,uBAAuB,EAAE;IACxF,SAAS,EAAE;QACT,YAAY,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;QACrC,KAAK,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC1B,UAAU,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;KACjC;IACD,GAAG,EAAE;QACH,KAAK,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC;QACtE,QAAQ,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,CAAC;QACpG,KAAK,EAAE,QAAQ;KAChB;IACD,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,UAAU,CAAC,EAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,EAAE;IAClF,SAAS,EAAE;QACT,sDAAsD;QACtD,sDAAsD;QACtD,6EAA6E;QAC7E,mFAAmF;QACnF,gEAAgE;QAChE,sEAAsE;QACtE,2FAA2F;QAC3F,yFAAyF;QACzF,iFAAiF;KAClF;CACkC,CAAC","sourcesContent":["import type { BehaviorContract } from \"./behaviors.js\";\nimport type { ColorReference } from \"./color-references.js\";\nimport { fieldFrameContract, focusIndicatorContract } from \"./component-contracts.js\";\nimport { control, spacing, stroke } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * 자유 입력으로 여러 값을 모으는 필드 — 해시태그, 초대할 사람, 검색 필터.\n *\n * Combobox와 다르다. Combobox는 **주어진 목록에서 고른다**. TagsInput은 목록이 없거나\n * 있어도 목록 밖의 값을 만들 수 있다. 그래서 Combobox에 `multiple` 축을 붙이는 대신\n * 별도로 둔다 — 합치면 \"목록에 없는 값을 고를 수 있는 Select\"라는 모순이 생긴다.\n * (제품이 후보 목록을 함께 보여 주고 싶으면 이 필드와 Combobox의 listbox를 조합한다.)\n *\n * 이 계약이 소유하는 것은 **언제 태그가 확정되는가**와 **빈 입력에서 지우면 무엇이\n * 지워지는가** 둘이다. 중복 허용 여부·최대 개수·글자 규칙은 제품 정책이라 판정 결과를\n * 받기만 한다.\n */\nexport type TagsInputCommitKey = \"Enter\" | \"Comma\" | \"Space\" | \"Blur\";\n\n/**\n * 후보 목록. Combobox의 listbox 계약을 **이 필드 안에서** 쓰는 형태다.\n *\n * \"Combobox에 multiple을 붙이자\"가 아니라 여기로 온 이유: Combobox의 값은 목록 안의\n * 키 하나이고 이 필드의 값은 문자열 배열이다. 값 모양이 다른 둘을 한 컴포넌트에 넣으면\n * 모든 소비자가 매번 좁히기를 해야 한다. 자유 입력이 이미 여기 있으므로 후보를 여기에\n * 더하는 쪽이 값 하나로 끝난다.\n *\n * 필터링은 제품이 한다 — 이 계약은 \"무엇을 보여줄지\"가 아니라 \"고른 것을 어떻게\n * 확정할지\"만 안다.\n */\nexport type TagsInputSuggestion = Readonly<{\n id: string;\n label: string;\n /** 확정될 문자열. 생략하면 `label`. */\n value?: string;\n disabled?: boolean;\n}>;\n\n/**\n * 활성 후보를 방향키로 옮긴 결과. 목록 끝에서 순환한다 — 후보가 보통 짧아서 끝에\n * 막히면 반대 끝까지 다시 내려가야 한다.\n */\nexport function resolveTagsInputActiveSuggestion(\n suggestions: readonly TagsInputSuggestion[],\n currentId: string | null,\n direction: \"next\" | \"previous\",\n): string | null {\n const enabled = suggestions.filter((item) => item.disabled !== true);\n if (enabled.length === 0) return null;\n const index = enabled.findIndex((item) => item.id === currentId);\n if (index === -1) return direction === \"next\" ? enabled[0]!.id : enabled.at(-1)!.id;\n const next = direction === \"next\" ? index + 1 : index - 1;\n return enabled[(next + enabled.length) % enabled.length]!.id;\n}\n\nexport const tagsInputBehaviorDefaults = {\n /**\n * Enter만 기본이다. 쉼표·공백은 언어에 따라 값의 일부다(한국어 태그에 공백이 흔하다).\n * 제품이 자기 도메인을 알 때 켠다.\n */\n commitKeys: [\"Enter\"] as readonly TagsInputCommitKey[],\n /** 빈 입력에서 Backspace는 마지막 태그를 **선택**만 한다. 한 번 더 눌러야 지운다. */\n backspaceRemovesLastTag: false,\n} as const;\n\nexport type TagsInputRejectionReason = \"empty\" | \"duplicate\" | \"limit\" | \"invalid\";\n\nexport type TagsInputCommitResult = Readonly<{\n accepted: boolean;\n /** 정리된 값(앞뒤 공백 제거). 거절돼도 제품이 문구에 쓸 수 있게 돌려준다. */\n value: string;\n reason?: TagsInputRejectionReason;\n}>;\n\nexport type TagsInputPolicy = Readonly<{\n /** 같은 값을 다시 넣을 수 있는가. 기본은 막는다. */\n allowDuplicates?: boolean;\n maxTags?: number;\n /** 제품 도메인 규칙. 실패 사유는 `invalid` 하나로 합쳐 돌려준다. */\n isValid?: (value: string) => boolean;\n}>;\n\n/**\n * 태그 하나를 확정할 수 있는지 판정한다. 값을 바꾸지 않고 결과만 돌려준다 —\n * 실제 상태 갱신은 renderer가, 사용자에게 보여 줄 문장은 제품이 만든다.\n */\nexport function resolveTagsInputCommit(\n current: readonly string[],\n rawValue: string,\n policy: TagsInputPolicy = {},\n): TagsInputCommitResult {\n const value = rawValue.trim();\n if (value.length === 0) return { accepted: false, value, reason: \"empty\" };\n if (policy.allowDuplicates !== true && current.includes(value)) {\n return { accepted: false, value, reason: \"duplicate\" };\n }\n if (policy.maxTags !== undefined && current.length >= policy.maxTags) {\n return { accepted: false, value, reason: \"limit\" };\n }\n if (policy.isValid !== undefined && !policy.isValid(value)) {\n return { accepted: false, value, reason: \"invalid\" };\n }\n return { accepted: true, value };\n}\n\n/** 태그 하나를 뺀 목록. 같은 값이 여러 개면 해당 위치 하나만 지운다. */\nexport function removeTagAt(current: readonly string[], index: number): readonly string[] {\n if (!Number.isInteger(index) || index < 0 || index >= current.length) {\n throw new RangeError(`TagsInput index out of range: ${String(index)}`);\n }\n return [...current.slice(0, index), ...current.slice(index + 1)];\n}\n\nexport const tagsInputRecipe = {\n slots: [\"root\", \"frame\", \"tag\", \"remove\", \"input\"] as const,\n defaults: { commitKeys: tagsInputBehaviorDefaults.commitKeys },\n frame: {\n minHeight: fieldFrameContract.minHeight,\n paddingHorizontal: fieldFrameContract.paddingHorizontal,\n paddingVertical: spacing.xxs,\n gap: spacing.xs,\n border: fieldFrameContract.border,\n background: fieldFrameContract.background,\n },\n tag: {\n minHeight: 28,\n paddingHorizontal: spacing.xs,\n gap: spacing.xxs,\n background: semanticColors.canvas,\n color: semanticColors.content.body,\n border: semanticColors.border.control,\n borderWidth: stroke.default,\n },\n /** 삭제 버튼은 태그보다 작아도 되지만 포인터 타깃은 공용 최소값을 지킨다. */\n remove: { minTouchTarget: control.minTouchTarget, color: semanticColors.content.secondary },\n selectedTagOutline: semanticColors.border.focus,\n states: { focus: focusIndicatorContract },\n} as const satisfies {\n slots: readonly [\"root\", \"frame\", \"tag\", \"remove\", \"input\"];\n defaults: { commitKeys: readonly TagsInputCommitKey[] };\n frame: {\n minHeight: number;\n paddingHorizontal: number;\n paddingVertical: number;\n gap: number;\n border: ColorReference;\n background: ColorReference;\n };\n tag: { minHeight: number; paddingHorizontal: number; gap: number; background: ColorReference; color: ColorReference; border: ColorReference; borderWidth: number };\n remove: { minTouchTarget: number; color: ColorReference };\n selectedTagOutline: ColorReference;\n states: { focus: typeof focusIndicatorContract };\n};\n\nexport const tagsInputBehavior = {\n controlled: [\"tags\", \"defaultTags\", \"onTagsChange\"],\n inputs: [\"policy\", \"commitKeys\", \"label\", \"removeLabel\"],\n /**\n * `onDraftChange`가 없으면 제품이 후보를 거를 수 없다 — 무엇을 입력 중인지 모르기\n * 때문이다. 후보 목록을 계약에 넣는 순간 이 이벤트도 함께 필요하다.\n */\n events: [\"onReject\", \"onDraftChange\"],\n defaults: { backspaceRemovesLastTag: tagsInputBehaviorDefaults.backspaceRemovesLastTag },\n stateAxes: {\n availability: [\"enabled\", \"disabled\"],\n value: [\"empty\", \"filled\"],\n validation: [\"valid\", \"invalid\"],\n },\n web: {\n roles: [\"combobox\", \"listbox\", \"option\", \"button\", \"list\", \"listitem\"],\n keyboard: [\"Enter\", \"Backspace\", \"ArrowUp\", \"ArrowDown\", \"ArrowLeft\", \"ArrowRight\", \"Escape\", \"Tab\"],\n focus: \"native\",\n },\n native: { roles: [\"button\"], states: [\"disabled\"], actions: [\"commit\", \"remove\"] },\n scenarios: [\n \"enter-commits-the-trimmed-value-and-clears-the-input\",\n \"an-empty-or-whitespace-only-value-is-never-committed\",\n \"duplicates-are-rejected-by-default-and-the-reason-is-reported-not-swallowed\",\n \"backspace-in-an-empty-input-selects-the-last-tag-before-a-second-press-removes-it\",\n \"every-tag-carries-its-own-remove-control-with-a-localized-name\",\n \"the-policy-judges-and-the-product-writes-the-sentence-the-user-reads\",\n \"a-candidate-list-lives-in-this-field-because-the-value-shape-is-this-fields-not-comboboxs\",\n \"enter-commits-the-active-candidate-when-one-is-highlighted-and-the-typed-text-otherwise\",\n \"candidate-filtering-belongs-to-the-product-the-contract-only-commits-the-choice\",\n ],\n} as const satisfies BehaviorContract;\n"]}
|
package/dist/text-formats.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type TextFormatKind = "kbd" | "code" | "quote";
|
|
|
11
11
|
export declare const textFormatRecipe: {
|
|
12
12
|
readonly slots: readonly ["root"];
|
|
13
13
|
readonly kbd: {
|
|
14
|
-
readonly fontFamily: readonly ["ui-monospace", "SFMono-Regular", "Consolas", "Liberation Mono", "monospace"];
|
|
14
|
+
readonly fontFamily: readonly ["ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Cascadia Mono", "Consolas", "Liberation Mono", "monospace"];
|
|
15
15
|
readonly textVariant: "label";
|
|
16
16
|
readonly paddingHorizontal: 4;
|
|
17
17
|
readonly radius: 8;
|
|
@@ -32,7 +32,7 @@ export declare const textFormatRecipe: {
|
|
|
32
32
|
}>;
|
|
33
33
|
};
|
|
34
34
|
readonly code: {
|
|
35
|
-
readonly fontFamily: readonly ["ui-monospace", "SFMono-Regular", "Consolas", "Liberation Mono", "monospace"];
|
|
35
|
+
readonly fontFamily: readonly ["ui-monospace", "SFMono-Regular", "SF Mono", "Menlo", "Monaco", "Cascadia Mono", "Consolas", "Liberation Mono", "monospace"];
|
|
36
36
|
readonly textVariant: "body";
|
|
37
37
|
readonly paddingHorizontal: 4;
|
|
38
38
|
readonly radius: 8;
|
package/dist/top.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ export declare const topRecipe: {
|
|
|
47
47
|
readonly title: {
|
|
48
48
|
readonly fontSize: 20;
|
|
49
49
|
readonly lineHeight: 28;
|
|
50
|
-
readonly fontWeight: "
|
|
50
|
+
readonly fontWeight: "600";
|
|
51
51
|
};
|
|
52
52
|
readonly paddingTop: 16;
|
|
53
53
|
readonly paddingBottom: 12;
|
|
@@ -56,7 +56,7 @@ export declare const topRecipe: {
|
|
|
56
56
|
readonly title: {
|
|
57
57
|
readonly fontSize: 32;
|
|
58
58
|
readonly lineHeight: 40;
|
|
59
|
-
readonly fontWeight: "
|
|
59
|
+
readonly fontWeight: "700";
|
|
60
60
|
};
|
|
61
61
|
readonly paddingTop: 24;
|
|
62
62
|
readonly paddingBottom: 16;
|
package/dist/transfer-list.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transfer-list.d.ts","sourceRoot":"","sources":["../src/transfer-list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,aAAa,EACb,aAAa,EACb,oBAAoB,EACrB,MAAM,gBAAgB,CAAC;AAWxB;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEpD,MAAM,MAAM,sBAAsB,CAAC,EAAE,SAAS,aAAa,GAAG,aAAa,IAAI,QAAQ,CAAC;IACtF,KAAK,EAAE,SAAS,oBAAoB,CAAC,EAAE,CAAC,EAAE,CAAC;I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AAgB,yBAAyB,CAAC,EAAE,SAAS,aAAa,EAChE,UAAU,EAAE,sBAAsB,CAAC,EAAE,CAAC,EACtC,SAAS,EAAE,qBAAqB,CAAC,EAAE,CAAC,EACpC,SAAS,EAAE,yBAAyB,GACnC,sBAAsB,CAAC,EAAE,CAAC,CA0B5B;AAED;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAAC,EAAE,SAAS,aAAa,EACxE,mBAAmB,EAAE,SAAS,oBAAoB,CAAC,EAAE,CAAC,EAAE,EACxD,YAAY,EAAE,MAAM,GACnB,EAAE,GAAG,IAAI,CAIX;AAED,sFAAsF;AACtF,wBAAgB,8BAA8B,CAAC,EAAE,SAAS,aAAa,EACrE,UAAU,EAAE,sBAAsB,CAAC,EAAE,CAAC,EACtC,SAAS,EAAE,qBAAqB,CAAC,EAAE,CAAC,GACnC,qBAAqB,CAAC,EAAE,CAAC,CAM3B;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8D9B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;CA8BI,CAAC"}
|
package/dist/transfer-list.js
CHANGED
|
@@ -151,7 +151,8 @@ export const transferListRecipe = {
|
|
|
151
151
|
},
|
|
152
152
|
item: collectionItemContract,
|
|
153
153
|
emptyState: { color: semanticColors.content.secondary, textVariant: "label" },
|
|
154
|
-
|
|
154
|
+
// The move buttons always stack (beside or between the panels), so they take the stacked-button gap.
|
|
155
|
+
moveControls: { gap: spacing.xs },
|
|
155
156
|
moveButton: {
|
|
156
157
|
minTarget: control.minTouchTarget,
|
|
157
158
|
color: semanticColors.content.brand,
|