@hjmds/design-contracts 1.12.1 → 1.13.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/avatar-fallback.d.ts +11 -0
- package/dist/avatar-fallback.d.ts.map +1 -1
- package/dist/avatar-fallback.js +21 -0
- package/dist/avatar-fallback.js.map +1 -1
- package/dist/base-recipes.d.ts +17 -0
- package/dist/base-recipes.d.ts.map +1 -1
- package/dist/base-recipes.js +17 -0
- package/dist/base-recipes.js.map +1 -1
- package/dist/catalog.d.ts +25 -0
- package/dist/catalog.d.ts.map +1 -1
- package/dist/command-palette.d.ts +14 -9
- package/dist/command-palette.d.ts.map +1 -1
- package/dist/command-palette.js +8 -9
- package/dist/command-palette.js.map +1 -1
- package/dist/component-recipes.d.ts +17 -0
- package/dist/component-recipes.d.ts.map +1 -1
- package/dist/component-recipes.js +5 -0
- package/dist/component-recipes.js.map +1 -1
- package/dist/provider-button.d.ts.map +1 -1
- package/dist/provider-button.js +3 -0
- package/dist/provider-button.js.map +1 -1
- package/dist/reactions.d.ts +10 -0
- package/dist/reactions.d.ts.map +1 -1
- package/dist/reactions.js +7 -0
- package/dist/reactions.js.map +1 -1
- package/dist/screen-patterns.d.ts +147 -0
- package/dist/screen-patterns.d.ts.map +1 -0
- package/dist/screen-patterns.js +149 -0
- package/dist/screen-patterns.js.map +1 -0
- package/dist/slider.d.ts +8 -0
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.js +6 -1
- package/dist/slider.js.map +1 -1
- package/dist/upload-item.d.ts +5 -0
- package/dist/upload-item.d.ts.map +1 -1
- package/dist/upload-item.js +5 -0
- 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/action-session.md +3 -3
- package/docs/agreement.md +5 -0
- package/docs/avatar-fallback.md +7 -0
- package/docs/bottom-navigation.md +6 -0
- package/docs/brand-boundary.md +1 -1
- package/docs/button-label.md +6 -0
- package/docs/clipboard.md +3 -0
- package/docs/command-palette.md +45 -2
- package/docs/consumer-policy.md +5 -1
- package/docs/data-table.md +6 -4
- package/docs/dialog.md +8 -2
- package/docs/form.md +51 -0
- package/docs/generated/component-maturity.md +1 -1
- package/docs/generated/renderer-evidence.json +3 -3
- package/docs/generated/renderer-evidence.md +1 -1
- package/docs/generated/showcase-manifest.json +1 -1
- package/docs/link.md +8 -0
- package/docs/migration-native-legacy-removal.md +45 -1
- package/docs/optional-adapters.md +1 -1
- package/docs/password-field.md +5 -0
- package/docs/product-composition-adoption.md +40 -0
- package/docs/progress.md +19 -1
- package/docs/provider-button.md +13 -0
- package/docs/result.md +3 -0
- package/docs/screen-chrome.md +10 -0
- package/docs/screen-patterns.md +376 -0
- package/docs/sheet.md +12 -0
- package/docs/splitter.md +8 -2
- package/docs/theming.md +36 -29
- package/docs/toggle-group.md +7 -0
- package/docs/tour.md +7 -1
- package/docs/tree.md +5 -2
- package/docs/upload-item.md +7 -0
- package/docs/usage/README.md +236 -0
- package/docs/usage/STANDARD.md +108 -0
- package/docs/usage/components/accordion.md +107 -0
- package/docs/usage/components/activity-heatmap.md +104 -0
- package/docs/usage/components/affix.md +86 -0
- package/docs/usage/components/agreement.md +129 -0
- package/docs/usage/components/alert-dialog.md +130 -0
- package/docs/usage/components/anchor.md +96 -0
- package/docs/usage/components/aspect-ratio.md +89 -0
- package/docs/usage/components/asset.md +126 -0
- package/docs/usage/components/auth-provider-button.md +116 -0
- package/docs/usage/components/auth-screen-layout.md +129 -0
- package/docs/usage/components/avatar.md +114 -0
- package/docs/usage/components/badge.md +84 -0
- package/docs/usage/components/bottom-cta.md +125 -0
- package/docs/usage/components/bottom-info.md +99 -0
- package/docs/usage/components/bottom-navigation.md +136 -0
- package/docs/usage/components/breadcrumb.md +81 -0
- package/docs/usage/components/button.md +118 -0
- package/docs/usage/components/calendar.md +122 -0
- package/docs/usage/components/card.md +110 -0
- package/docs/usage/components/carousel.md +113 -0
- package/docs/usage/components/celebration.md +96 -0
- package/docs/usage/components/chat-message.md +122 -0
- package/docs/usage/components/chat-screen.md +112 -0
- package/docs/usage/components/checkbox-group.md +104 -0
- package/docs/usage/components/checkbox.md +103 -0
- package/docs/usage/components/chip.md +104 -0
- package/docs/usage/components/code-block.md +111 -0
- package/docs/usage/components/collapsible.md +112 -0
- package/docs/usage/components/color-picker.md +86 -0
- package/docs/usage/components/combobox.md +137 -0
- package/docs/usage/components/command-palette.md +125 -0
- package/docs/usage/components/comment-thread-screen.md +125 -0
- package/docs/usage/components/container.md +98 -0
- package/docs/usage/components/content-transition.md +101 -0
- package/docs/usage/components/context-menu.md +136 -0
- package/docs/usage/components/counter-badge.md +107 -0
- package/docs/usage/components/data-table.md +122 -0
- package/docs/usage/components/date-picker.md +142 -0
- package/docs/usage/components/date-range-picker.md +111 -0
- package/docs/usage/components/description-list.md +103 -0
- package/docs/usage/components/design-system-provider.md +124 -0
- package/docs/usage/components/dialog.md +176 -0
- package/docs/usage/components/divider.md +89 -0
- package/docs/usage/components/editor-screen.md +126 -0
- package/docs/usage/components/effect-surface.md +120 -0
- package/docs/usage/components/empty-state.md +114 -0
- package/docs/usage/components/field.md +129 -0
- package/docs/usage/components/file-picker.md +114 -0
- package/docs/usage/components/floating-action-button.md +138 -0
- package/docs/usage/components/form.md +162 -0
- package/docs/usage/components/grid.md +99 -0
- package/docs/usage/components/heading.md +87 -0
- package/docs/usage/components/icon-button.md +126 -0
- package/docs/usage/components/icon.md +105 -0
- package/docs/usage/components/image.md +122 -0
- package/docs/usage/components/keyboard-avoiding.md +93 -0
- package/docs/usage/components/keyboard-dock.md +110 -0
- package/docs/usage/components/keyboard-form-scroll-view.md +95 -0
- package/docs/usage/components/keyboard-motion-provider.md +86 -0
- package/docs/usage/components/layout.md +117 -0
- package/docs/usage/components/link.md +121 -0
- package/docs/usage/components/list-detail-screen.md +103 -0
- package/docs/usage/components/list-row.md +124 -0
- package/docs/usage/components/list.md +119 -0
- package/docs/usage/components/load-more.md +115 -0
- package/docs/usage/components/masonry.md +109 -0
- package/docs/usage/components/media-selection-screen.md +119 -0
- package/docs/usage/components/mentions.md +119 -0
- package/docs/usage/components/menu.md +129 -0
- package/docs/usage/components/menubar.md +93 -0
- package/docs/usage/components/message-composer.md +124 -0
- package/docs/usage/components/moderation-screen.md +113 -0
- package/docs/usage/components/notice.md +106 -0
- package/docs/usage/components/notification-inbox-screen.md +97 -0
- package/docs/usage/components/notification-item.md +98 -0
- package/docs/usage/components/number-field.md +131 -0
- package/docs/usage/components/onboarding-screen.md +106 -0
- package/docs/usage/components/otp-field.md +101 -0
- package/docs/usage/components/pagination.md +82 -0
- package/docs/usage/components/password-field.md +137 -0
- package/docs/usage/components/permission-screen.md +107 -0
- package/docs/usage/components/photo-source-sheet.md +119 -0
- package/docs/usage/components/popover.md +108 -0
- package/docs/usage/components/profile-screen.md +89 -0
- package/docs/usage/components/progress.md +122 -0
- package/docs/usage/components/qr-code.md +122 -0
- package/docs/usage/components/radio-group.md +124 -0
- package/docs/usage/components/radio.md +104 -0
- package/docs/usage/components/result.md +116 -0
- package/docs/usage/components/saved-items-screen.md +126 -0
- package/docs/usage/components/screen-layout.md +119 -0
- package/docs/usage/components/search-field.md +120 -0
- package/docs/usage/components/search-screen.md +215 -0
- package/docs/usage/components/section.md +111 -0
- package/docs/usage/components/segmented-control.md +138 -0
- package/docs/usage/components/select.md +142 -0
- package/docs/usage/components/settings-screen.md +126 -0
- package/docs/usage/components/shared-transition-element.md +111 -0
- package/docs/usage/components/shared-transition-screen.md +86 -0
- package/docs/usage/components/sheet.md +151 -0
- package/docs/usage/components/side-panel.md +104 -0
- package/docs/usage/components/sidebar.md +107 -0
- package/docs/usage/components/skeleton.md +105 -0
- package/docs/usage/components/skip-nav.md +76 -0
- package/docs/usage/components/slider.md +121 -0
- package/docs/usage/components/sortable-collection.md +127 -0
- package/docs/usage/components/spinner.md +86 -0
- package/docs/usage/components/splitter.md +103 -0
- package/docs/usage/components/stack.md +93 -0
- package/docs/usage/components/statistic.md +123 -0
- package/docs/usage/components/steps.md +110 -0
- package/docs/usage/components/surface.md +91 -0
- package/docs/usage/components/swipe-actions.md +124 -0
- package/docs/usage/components/switch.md +120 -0
- package/docs/usage/components/tabs.md +134 -0
- package/docs/usage/components/tag.md +84 -0
- package/docs/usage/components/tags-input.md +111 -0
- package/docs/usage/components/text-area.md +112 -0
- package/docs/usage/components/text-format.md +75 -0
- package/docs/usage/components/text-transition.md +104 -0
- package/docs/usage/components/text.md +101 -0
- package/docs/usage/components/thinking-orb.md +105 -0
- package/docs/usage/components/timeline.md +105 -0
- package/docs/usage/components/toast.md +145 -0
- package/docs/usage/components/toggle-group.md +95 -0
- package/docs/usage/components/tooltip.md +103 -0
- package/docs/usage/components/top-bar.md +124 -0
- package/docs/usage/components/top.md +89 -0
- package/docs/usage/components/tour.md +118 -0
- package/docs/usage/components/transfer-list.md +115 -0
- package/docs/usage/components/tree.md +91 -0
- package/docs/usage/components/upload-item.md +99 -0
- package/docs/usage/components/virtual-list.md +105 -0
- package/docs/usage/components/visually-hidden.md +72 -0
- package/docs/usage/components/watermark.md +78 -0
- package/docs/usage/compositions/action-recovery-optimistic.md +180 -0
- package/docs/usage/compositions/action-recovery-save.md +235 -0
- package/docs/usage/compositions/action-recovery-undo.md +193 -0
- package/docs/usage/compositions/common-message.md +132 -0
- package/docs/usage/compositions/common-notification.md +101 -0
- package/docs/usage/compositions/compound-controls.md +186 -0
- package/docs/usage/compositions/data-layouts.md +157 -0
- package/docs/usage/compositions/disclosure.md +144 -0
- package/docs/usage/compositions/environment-matrix.md +139 -0
- package/docs/usage/compositions/expo-interactions.md +149 -0
- package/docs/usage/compositions/family-drawer.md +201 -0
- package/docs/usage/compositions/floating-action-button.md +197 -0
- package/docs/usage/compositions/input-sheet.md +148 -0
- package/docs/usage/compositions/interaction-adapters.md +190 -0
- package/docs/usage/compositions/interaction-flow-apply.md +205 -0
- package/docs/usage/compositions/interaction-flow-draft.md +188 -0
- package/docs/usage/compositions/interaction-flow-search.md +171 -0
- package/docs/usage/compositions/native-renderers.md +106 -0
- package/docs/usage/compositions/navigation-bar-collection.md +164 -0
- package/docs/usage/compositions/optional-adapters.md +169 -0
- package/docs/usage/compositions/optional-motion.md +109 -0
- package/docs/usage/compositions/photo-source.md +104 -0
- package/docs/usage/compositions/purpose-input-comment.md +110 -0
- package/docs/usage/compositions/purpose-input-message.md +119 -0
- package/docs/usage/compositions/reference-first.md +96 -0
- package/docs/usage/compositions/reference-review.md +107 -0
- package/docs/usage/compositions/reference-settings.md +107 -0
- package/docs/usage/compositions/selection-scope.md +174 -0
- package/docs/usage/compositions/stea-event-ticket.md +166 -0
- package/docs/usage/compositions/stea-flip-card.md +162 -0
- package/docs/usage/compositions/stea-order-progress.md +184 -0
- package/docs/usage/compositions/stea-otp-verify.md +215 -0
- package/docs/usage/compositions/stea-pixel-empty.md +140 -0
- package/docs/usage/compositions/stea-schedule-card.md +169 -0
- package/docs/usage/compositions/stea-stat-summary.md +154 -0
- package/docs/usage/compositions/time-selection.md +174 -0
- package/docs/usage/compositions/toast-layout.md +128 -0
- package/docs/usage/compositions/visual-foundations.md +185 -0
- package/docs/usage/compositions/web-additions.md +146 -0
- package/docs/usage/compositions/web-navigation.md +143 -0
- package/docs/usage/screens/common-chat.md +127 -0
- package/docs/usage/screens/common-comments.md +108 -0
- package/docs/usage/screens/common-inbox.md +110 -0
- package/docs/usage/screens/common-login.md +98 -0
- package/docs/usage/screens/common-profile.md +221 -0
- package/docs/usage/screens/common-saved.md +127 -0
- package/docs/usage/screens/common-search.md +274 -0
- package/docs/usage/screens/common-settings.md +126 -0
- package/docs/usage/screens/common-shell.md +108 -0
- package/docs/usage/screens/dashboard.md +245 -0
- package/docs/usage/screens/discovery-gallery.md +306 -0
- package/docs/usage/screens/flow-collection.md +96 -0
- package/docs/usage/screens/flow-editor.md +120 -0
- package/docs/usage/screens/flow-media.md +111 -0
- package/docs/usage/screens/flow-moderation.md +120 -0
- package/docs/usage/screens/flow-onboarding.md +193 -0
- package/docs/usage/screens/flow-permission.md +103 -0
- package/docs/usage/screens/landing.md +347 -0
- package/docs/usage/screens/mockup-studio.md +190 -0
- package/docs/usage/screens/notification-settings.md +206 -0
- package/docs/usage/screens/reference-comparison.md +159 -0
- package/docs/usage/templates/component.md +61 -0
- package/docs/usage/templates/composition.md +47 -0
- package/docs/usage/templates/screen.md +56 -0
- package/docs/usage/templates/token.md +32 -0
- package/docs/usage/tokens/color.md +142 -0
- package/docs/usage/tokens/elevation-opacity.md +86 -0
- package/docs/usage/tokens/layers.md +98 -0
- package/docs/usage/tokens/layout.md +114 -0
- package/docs/usage/tokens/motion.md +88 -0
- package/docs/usage/tokens/radius.md +53 -0
- package/docs/usage/tokens/size.md +74 -0
- package/docs/usage/tokens/spacing.md +73 -0
- package/docs/usage/tokens/stroke.md +50 -0
- package/docs/usage/tokens/theme-studio.md +70 -0
- package/docs/usage/tokens/typography-studio.md +70 -0
- package/docs/usage/tokens/typography.md +89 -0
- package/package.json +7 -1
|
@@ -3,6 +3,17 @@ export type AvatarFallbackContext = Readonly<{
|
|
|
3
3
|
size: number;
|
|
4
4
|
decorative: true;
|
|
5
5
|
}>;
|
|
6
|
+
/**
|
|
7
|
+
* Initials shown when an Avatar has no image: the first character of the first and the last word,
|
|
8
|
+
* counted in code points, upper-cased for the current locale. `provided` (Native `initials`) wins and
|
|
9
|
+
* keeps at most three code points.
|
|
10
|
+
*
|
|
11
|
+
* 2026-10-06 follow-up: Web took the first two words and Native the first and last, so the same
|
|
12
|
+
* "Kim Min Jun" read "KM" on Web and "KJ" on Native. First+last was kept because the family and
|
|
13
|
+
* given names sit at the two ends of a name with middle names; the first-two rule shows a middle
|
|
14
|
+
* name instead. Native also indexed UTF-16 units and could split a surrogate pair; code points fix it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveAvatarInitials(name: string, provided?: string): string;
|
|
6
17
|
export type BlobatarFallbackOptions = Readonly<{
|
|
7
18
|
/** Stable public product identifier, never a default email or display name. */
|
|
8
19
|
seed: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-fallback.d.ts","sourceRoot":"","sources":["../src/avatar-fallback.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"avatar-fallback.d.ts","sourceRoot":"","sources":["../src/avatar-fallback.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,IAAI,CAAA;CAAE,CAAC,CAAC;AAEjF;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAQ7E;AAED,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC;IAC7C,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B,CAAC,CAAC;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAM3G;AAED,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAC,OAAO,GAAC,KAAK,GAAC,WAAW,GAAC,MAAM,GAAC,QAAQ,GAAC,UAAU,CAAC;AACnG,MAAM,MAAM,qBAAqB,GAAG,QAAQ,CAAC;IAAC,IAAI,EAAC,MAAM,CAAC;IAAA,UAAU,CAAC,EAAC,wBAAwB,CAAC;IAAA,MAAM,CAAC,EAAC,OAAO,CAAC;IAAA,OAAO,CAAC,EAAC,OAAO,CAAA;CAAC,CAAC,CAAC;AAClI,wBAAgB,qBAAqB,CAAC,OAAO,EAAC,qBAAqB;;;;;EAIlE"}
|
package/dist/avatar-fallback.js
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Initials shown when an Avatar has no image: the first character of the first and the last word,
|
|
3
|
+
* counted in code points, upper-cased for the current locale. `provided` (Native `initials`) wins and
|
|
4
|
+
* keeps at most three code points.
|
|
5
|
+
*
|
|
6
|
+
* 2026-10-06 follow-up: Web took the first two words and Native the first and last, so the same
|
|
7
|
+
* "Kim Min Jun" read "KM" on Web and "KJ" on Native. First+last was kept because the family and
|
|
8
|
+
* given names sit at the two ends of a name with middle names; the first-two rule shows a middle
|
|
9
|
+
* name instead. Native also indexed UTF-16 units and could split a surrogate pair; code points fix it.
|
|
10
|
+
*/
|
|
11
|
+
export function resolveAvatarInitials(name, provided) {
|
|
12
|
+
const supplied = provided?.trim();
|
|
13
|
+
if (supplied)
|
|
14
|
+
return Array.from(supplied).slice(0, 3).join("").toLocaleUpperCase();
|
|
15
|
+
const parts = name.trim().split(/\s+/u).filter(Boolean);
|
|
16
|
+
if (parts.length === 0)
|
|
17
|
+
throw new TypeError("Avatar name must not be empty");
|
|
18
|
+
const first = Array.from(parts[0])[0] ?? "";
|
|
19
|
+
const last = parts.length > 1 ? Array.from(parts.at(-1))[0] ?? "" : "";
|
|
20
|
+
return `${first}${last}`.toLocaleUpperCase();
|
|
21
|
+
}
|
|
1
22
|
export function resolveBlobatarFallback(options) {
|
|
2
23
|
if (typeof options.seed !== "string" || !options.seed.trim())
|
|
3
24
|
throw new TypeError("Avatar seed must not be empty");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-fallback.js","sourceRoot":"","sources":["../src/avatar-fallback.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"avatar-fallback.js","sourceRoot":"","sources":["../src/avatar-fallback.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,QAAiB;IACnE,MAAM,Q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IAAI,EAAE,UAAU,EAAE,CAAC;AAC5C,CAAC;AAID,MAAM,UAAU,qBAAqB,CAAC,OAA6B;IAClE,uBAAuB,CAAC,EAAC,IAAI,EAAC,OAAO,CAAC,IAAI,EAAC,CAAC,CAAC;IAC7C,MAAM,UAAU,GAAC,OAAO,CAAC,UAAU,IAAE,MAAM,CAAC;IAAA,IAAG,CAAC,CAAC,MAAM,EAAC,OAAO,EAAC,KAAK,EAAC,WAAW,EAAC,MAAM,EAAC,QAAQ,EAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAC,MAAM,IAAI,SAAS,CAAC,wCAAwC,CAAC,CAAC;IACjM,OAAO,EAAC,IAAI,EAAC,OAAO,CAAC,IAAI,EAAC,UAAU,EAAC,MAAM,EAAC,OAAO,CAAC,MAAM,IAAE,KAAK,EAAC,OAAO,EAAC,OAAO,CAAC,OAAO,IAAE,IAAI,EAAC,CAAC;AAClG,CAAC","sourcesContent":["/** Avatar owns the accessible name; fallback artwork must remain decorative. */\nexport type AvatarFallbackContext = Readonly<{ size: number; decorative: true }>;\n\n/**\n * Initials shown when an Avatar has no image: the first character of the first and the last word,\n * counted in code points, upper-cased for the current locale. `provided` (Native `initials`) wins and\n * keeps at most three code points.\n *\n * 2026-10-06 follow-up: Web took the first two words and Native the first and last, so the same\n * \"Kim Min Jun\" read \"KM\" on Web and \"KJ\" on Native. First+last was kept because the family and\n * given names sit at the two ends of a name with middle names; the first-two rule shows a middle\n * name instead. Native also indexed UTF-16 units and could split a surrogate pair; code points fix it.\n */\nexport function resolveAvatarInitials(name: string, provided?: string): string {\n const supplied = provided?.trim();\n if (supplied) return Array.from(supplied).slice(0, 3).join(\"\").toLocaleUpperCase();\n const parts = name.trim().split(/\\s+/u).filter(Boolean);\n if (parts.length === 0) throw new TypeError(\"Avatar name must not be empty\");\n const first = Array.from(parts[0]!)[0] ?? \"\";\n const last = parts.length > 1 ? Array.from(parts.at(-1)!)[0] ?? \"\" : \"\";\n return `${first}${last}`.toLocaleUpperCase();\n}\n\nexport type BlobatarFallbackOptions = Readonly<{\n /** Stable public product identifier, never a default email or display name. */\n seed: string;\n expression?: \"idle\" | \"happy\";\n}>;\nexport function resolveBlobatarFallback(options: BlobatarFallbackOptions): Required<BlobatarFallbackOptions> {\n if (typeof options.seed !== \"string\" || !options.seed.trim()) throw new TypeError(\"Avatar seed must not be empty\");\n const expression = options.expression ?? \"idle\";\n if (expression !== \"idle\" && expression !== \"happy\") throw new TypeError(\"Unsupported avatar expression\");\n // Preserve exact identifiers: normalizing case would merge distinct accounts.\n return { seed: options.seed, expression };\n}\n\nexport type BlobatarMotionExpression = 'idle'|'happy'|'sad'|'surprised'|'wink'|'sleepy'|'thinking';\nexport type BlobatarMotionOptions = Readonly<{seed:string;expression?:BlobatarMotionExpression;active?:boolean;visible?:boolean}>;\nexport function resolveBlobatarMotion(options:BlobatarMotionOptions){\n resolveBlobatarFallback({seed:options.seed});\n const expression=options.expression??'idle';if(!['idle','happy','sad','surprised','wink','sleepy','thinking'].includes(expression))throw new TypeError('Unsupported animated avatar expression');\n return {seed:options.seed,expression,active:options.active??false,visible:options.visible??true};\n}\n"]}
|
package/dist/base-recipes.d.ts
CHANGED
|
@@ -223,6 +223,23 @@ export declare const fieldRecipe: {
|
|
|
223
223
|
readonly color: "textMuted";
|
|
224
224
|
};
|
|
225
225
|
readonly disabledOpacity: 0.6;
|
|
226
|
+
/**
|
|
227
|
+
* Which slots `disabledOpacity` fades (2026-10-06). Label and control dim; the
|
|
228
|
+
* hint and the error keep their contrast, because they are the text that says
|
|
229
|
+
* why the field is locked or what to fix. Renderers used to fade the whole
|
|
230
|
+
* frame, so the small support text (`support.textVariant`) — already the
|
|
231
|
+
* lowest-contrast text in the field — lost contrast too. Fading nothing was
|
|
232
|
+
* rejected: the label and the control are what tell the user the field is off.
|
|
233
|
+
*
|
|
234
|
+
* Every field-family input follows this scope. The amount is the component
|
|
235
|
+
* recipe's own `states.disabledOpacity` where it has one (SearchField,
|
|
236
|
+
* PasswordField, OtpField, NumberField, Select); otherwise this recipe's
|
|
237
|
+
* `disabledOpacity` (TextField, TextArea, Field, Combobox, DatePicker, TagsInput).
|
|
238
|
+
*/
|
|
239
|
+
readonly disabledScope: {
|
|
240
|
+
readonly dimmed: readonly ["label", "control"];
|
|
241
|
+
readonly unchanged: readonly ["hint", "error"];
|
|
242
|
+
};
|
|
226
243
|
};
|
|
227
244
|
/**
|
|
228
245
|
* Renderer-neutral Surface geometry. Tone colors stay in `surfaceRecipe` for
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-recipes.d.ts","sourceRoot":"","sources":["../src/base-recipes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAc,MAAM,EAAE,OAAO,EAAc,MAAM,kBAAkB,CAAC;AAGpF,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC/E,uEAAuE;AACvE,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAC7C;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC,YAAY,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAChF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,OAAO,OAAO,CAAC;AAC3D,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,MAAM,CAAC;AAChD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,CAAC;AAC/C,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,4EAA4E;AAC5E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcvB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M,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAErD,4EAA4E;AAC5E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAcvB;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA2BH;;;;;;;;;;;OAWG;;;;;;CAmCJ,CAAC;AAEF,yFAAyF;AACzF,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAEzE;AAED,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwDzB,CAAC;AAEF,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE5C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6BtB;;;;OAIG;uCAC+B,MAAM,GAAG,IAAI;;;;;;;;;;;;;;;;;;;;;;;IAqB/C;;;;;;;;;;;;OAYG;;;;;CAyCJ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;CAU3B,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;CAM3B,CAAC"}
|
package/dist/base-recipes.js
CHANGED
|
@@ -165,6 +165,23 @@ export const fieldRecipe = {
|
|
|
165
165
|
},
|
|
166
166
|
placeholder: { color: "textMuted" },
|
|
167
167
|
disabledOpacity: 0.6,
|
|
168
|
+
/**
|
|
169
|
+
* Which slots `disabledOpacity` fades (2026-10-06). Label and control dim; the
|
|
170
|
+
* hint and the error keep their contrast, because they are the text that says
|
|
171
|
+
* why the field is locked or what to fix. Renderers used to fade the whole
|
|
172
|
+
* frame, so the small support text (`support.textVariant`) — already the
|
|
173
|
+
* lowest-contrast text in the field — lost contrast too. Fading nothing was
|
|
174
|
+
* rejected: the label and the control are what tell the user the field is off.
|
|
175
|
+
*
|
|
176
|
+
* Every field-family input follows this scope. The amount is the component
|
|
177
|
+
* recipe's own `states.disabledOpacity` where it has one (SearchField,
|
|
178
|
+
* PasswordField, OtpField, NumberField, Select); otherwise this recipe's
|
|
179
|
+
* `disabledOpacity` (TextField, TextArea, Field, Combobox, DatePicker, TagsInput).
|
|
180
|
+
*/
|
|
181
|
+
disabledScope: {
|
|
182
|
+
dimmed: ["label", "control"],
|
|
183
|
+
unchanged: ["hint", "error"],
|
|
184
|
+
},
|
|
168
185
|
};
|
|
169
186
|
/**
|
|
170
187
|
* Renderer-neutral Surface geometry. Tone colors stay in `surfaceRecipe` for
|
package/dist/base-recipes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-recipes.js","sourceRoot":"","sources":["../src/base-recipes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAkBpF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAU;IACnE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAW;IACzF,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE;QAC/F,0EAA0E;QAC1E,uEAAuE;QACvE,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,IAAI,EAAE;QAClG,KAAK,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM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GAAG,EAAE,CAAC;KACP;IACD,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;IACnC,eAAe,EAAE,GAAG;CAiCrB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,KAAK;CAMhB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE;IACjC,KAAK,EAAE,MAAM;CAId,CAAC","sourcesContent":["import type { ThemeColors } from \"./colors.js\";\nimport { control, fontWeight, radius, spacing, typography } from \"./foundations.js\";\nimport type { FontWeightValue, TextVariant } from \"./foundations.js\";\n\nexport type ButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\" | \"link\";\n/** Corner geometry of the control frame. Mirrors `IconButtonShape`. */\nexport type ButtonShape = \"rounded\" | \"pill\";\n/**\n * Where the label sits inside the frame. `center` is the action default;\n * `leading` is for a full-width row action whose label reads as list copy.\n */\nexport type ButtonAlign = \"center\" | \"leading\";\nexport type ButtonSize = keyof typeof control.buttonHeight;\nexport type SurfaceTone = \"default\" | \"raised\" | \"accent\" | \"sunken\" | \"subtle\";\nexport type SurfacePadding = \"none\" | keyof typeof spacing;\nexport type SurfaceRadius = keyof typeof radius;\nexport type FieldVariant = \"surface\" | \"inset\";\nexport type FieldShape = \"medium\" | \"large\" | \"full\";\n\n/** Small renderer entry point for the three foundational visual recipes. */\nexport const buttonRecipe = {\n slots: [\"root\", \"leading\", \"label\", \"trailing\", \"spinner\"] as const,\n defaults: { tone: \"primary\", size: \"medium\", shape: \"rounded\", align: \"center\" } as const,\n tones: {\n primary: { background: \"primary\", content: \"onPrimary\", border: null, paddingHorizontal: null },\n // The outline is a border role, not a text color. Drawing it in `textSub`\n // made a resting control read heavier than the selected one beside it.\n secondary: { background: \"bg\", content: \"text\", border: \"borderControl\", paddingHorizontal: null },\n ghost: { background: null, content: \"textMuted\", border: null, paddingHorizontal: null },\n danger: { background: \"dangerFill\", content: \"onDanger\", border: null, paddingHorizontal: null },\n // A link-tone control is inline copy, so the size axis' horizontal padding\n // would push it out of alignment with the text around it.\n link: { background: null, content: \"contentBrand\", border: null, paddingHorizontal: 0 },\n },\n /**\n * Visual treatment for a control that is also a toggle. `accessibilityState`\n * / `aria-pressed` already expressed the state; without a paired visual every\n * consumer painted the selected background in product styles.\n */\n states: {\n selected: { background: \"bg\", content: \"contentBrand\", border: \"contentBrand\" },\n },\n sizes: {\n small: {\n height: control.buttonHeight.small,\n hitSlop: control.buttonHitSlop.small,\n paddingHorizontal: spacing.sm,\n textVariant: \"label\",\n },\n medium: {\n height: control.buttonHeight.medium,\n hitSlop: control.buttonHitSlop.medium,\n paddingHorizontal: spacing.md,\n textVariant: \"body\",\n },\n large: {\n height: control.buttonHeight.large,\n hitSlop: control.buttonHitSlop.large,\n paddingHorizontal: spacing.lg,\n textVariant: \"bodyLarge\",\n },\n },\n shapes: { rounded: \"md\", pill: \"full\" },\n aligns: { center: \"center\", leading: \"flex-start\" },\n opacity: { disabled: 0.5, pressed: 0.86 },\n /**\n * 긴 라벨의 처리 규칙. 지금까지 이 판단이 없어서 Web은 무한히 줄바꿈하고 RN은 한 줄로\n * 잘렸다 — 같은 번역문이 두 표면에서 다르게 보였다.\n *\n * 자르지 않고 **두 줄까지 접는다**. 잘린 행동 라벨(\"삭제하...\"))은 무엇을 하는 버튼인지\n * 잃는다. 대신 무제한 줄바꿈도 막는다 — 하단 CTA 행처럼 버튼이 남의 레이아웃을 밀어내는\n * 자리가 있고, 두 줄을 넘는 라벨은 레이아웃이 아니라 카피의 문제다.\n *\n * 큰 글자 설정에서는 상한을 **푼다**. 사용자가 키운 글자에서 두 줄로 자르면 내용이\n * 사라지고, 그건 WCAG 1.4.4를 어긴다. 제품 카피가 아니라 사용자 설정이 원인이기 때문에\n * 같은 규칙을 적용할 수 없다.\n */\n label: { overflow: \"wrap\", maxLines: 2, liftCapOnLargeText: true },\n} as const satisfies {\n slots: readonly string[];\n defaults: { tone: ButtonTone; size: ButtonSize; shape: ButtonShape; align: ButtonAlign };\n tones: Record<\n ButtonTone,\n {\n background: keyof ThemeColors | null;\n content: keyof ThemeColors;\n border: keyof ThemeColors | null;\n /** `null` keeps the size axis' padding. */\n paddingHorizontal: number | null;\n }\n >;\n states: {\n selected: {\n background: keyof ThemeColors;\n content: keyof ThemeColors;\n border: keyof ThemeColors;\n };\n };\n sizes: Record<\n ButtonSize,\n {\n height: number;\n hitSlop: number;\n paddingHorizontal: number;\n textVariant: TextVariant;\n }\n >;\n shapes: Record<ButtonShape, keyof typeof radius>;\n aligns: Record<ButtonAlign, \"center\" | \"flex-start\">;\n opacity: { disabled: number; pressed: number };\n label: { overflow: \"wrap\"; maxLines: number; liftCapOnLargeText: boolean };\n};\n\n/** Resolves the label's line cap for one resolved environment. `null` means uncapped. */\nexport function resolveButtonLabelLines(largeText: boolean): number | null {\n return largeText && buttonRecipe.label.liftCapOnLargeText ? null : buttonRecipe.label.maxLines;\n}\n\nexport const surfaceRecipe = {\n default: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n raised: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: true,\n borderAlways: true,\n // An elevated surface must not clip: `overflow: hidden` cuts off its own\n // shadow. Every other tone clips so a child image cannot spill past the\n // rounded corner, which consumers were fixing in product styles.\n clipsContent: false,\n },\n // White surfaces retain a boundary; tonal fills were removed at the user\n // review, so elevation and border now carry hierarchy.\n sunken: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n accent: {\n background: \"bg\",\n border: \"primary\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n subtle: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n} as const satisfies Record<\n SurfaceTone,\n {\n background: keyof ThemeColors;\n border: keyof ThemeColors;\n borderAlpha: number;\n elevated: boolean;\n clipsContent: boolean;\n borderAlways: boolean;\n }\n>;\n\n/** Text placement inside a field control. */\nexport type FieldAlign = \"start\" | \"center\";\n\nexport const fieldRecipe = {\n slots: [\n \"root\",\n \"label\",\n \"control\",\n \"leading\",\n \"input\",\n \"trailing\",\n \"hint\",\n \"error\",\n ] as const,\n defaults: { variant: \"surface\", shape: \"medium\", align: \"start\" } as const,\n variants: {\n // Input interiors stay on the canvas; focus is conveyed by the blue outline, not a grey or blue fill.\n surface: { background: \"bg\" },\n inset: { background: \"bg\" },\n },\n shapes: {\n medium: \"md\",\n large: \"lg\",\n full: \"full\",\n },\n states: {\n idle: { border: \"borderControl\" },\n focused: { border: \"contentBrand\" },\n invalid: { border: \"danger\" },\n },\n minHeight: control.minTouchTarget,\n multilineMinHeight: 80,\n /**\n * Upper bound for a growing multiline field, expressed in visible lines. A\n * consumer otherwise reaches for `inputStyle={{ maxHeight }}`, which moves a\n * recipe-owned dimension into product code. `null` keeps unbounded growth.\n */\n multilineMaxVisibleLines: null as number | null,\n borderWidth: 1,\n focusRingWidth: 2,\n focusRingOffset: 2,\n paddingHorizontal: spacing.md,\n paddingVertical: spacing.sm,\n textVariant: \"body\",\n label: {\n color: \"textBody\",\n textVariant: \"body\",\n fontWeight: fontWeight.semibold,\n gap: spacing.xs,\n },\n support: {\n hintColor: \"textMuted\",\n errorColor: \"danger\",\n textVariant: \"label\",\n gap: 6,\n },\n placeholder: { color: \"textMuted\" },\n disabledOpacity: 0.6,\n} as const satisfies {\n slots: readonly string[];\n defaults: { variant: FieldVariant; shape: FieldShape; align: FieldAlign };\n variants: Record<FieldVariant, { background: keyof ThemeColors }>;\n shapes: Record<FieldShape, keyof typeof radius>;\n states: Record<\n \"idle\" | \"focused\" | \"invalid\",\n { border: keyof ThemeColors }\n >;\n minHeight: number;\n multilineMinHeight: number;\n multilineMaxVisibleLines: number | null;\n borderWidth: number;\n focusRingWidth: number;\n focusRingOffset: number;\n paddingHorizontal: number;\n paddingVertical: number;\n textVariant: keyof typeof typography;\n label: {\n color: keyof ThemeColors;\n textVariant: keyof typeof typography;\n fontWeight: FontWeightValue;\n gap: number;\n };\n support: {\n hintColor: keyof ThemeColors;\n errorColor: keyof ThemeColors;\n textVariant: keyof typeof typography;\n gap: number;\n };\n placeholder: { color: keyof ThemeColors };\n disabledOpacity: number;\n};\n\n/**\n * Renderer-neutral Surface geometry. Tone colors stay in `surfaceRecipe` for\n * compatibility; these axes make the previously implicit Web/Native defaults\n * explicit without changing that public recipe shape.\n */\nexport const surfaceDefaults = {\n tone: \"default\",\n padding: \"none\",\n radius: \"lg\",\n bordered: false,\n} as const satisfies {\n tone: SurfaceTone;\n padding: SurfacePadding;\n radius: SurfaceRadius;\n bordered: boolean;\n};\n\nexport const surfaceGeometry = {\n paddings: { none: 0, ...spacing },\n radii: radius,\n} as const satisfies {\n paddings: Record<SurfacePadding, number>;\n radii: Record<SurfaceRadius, number>;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"base-recipes.js","sourceRoot":"","sources":["../src/base-recipes.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAkBpF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,KAAK,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,CAAU;IACnE,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAW;IACzF,KAAK,EAAE;QACL,OAAO,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE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AE;IAC7B,eAAe,EAAE,OAAO,CAAC,EAAE;IAC3B,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE;QACL,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,MAAM;QACnB,UAAU,EAAE,UAAU,CAAC,QAAQ;QAC/B,GAAG,EAAE,OAAO,CAAC,EAAE;KAChB;IACD,OAAO,EAAE;QACP,SAAS,EAAE,WAAW;QACtB,UAAU,EAAE,QAAQ;QACpB,WAAW,EAAE,OAAO;QACpB,GAAG,EAAE,CAAC;KACP;IACD,WAAW,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE;IACnC,eAAe,EAAE,GAAG;IACpB;;;;;;;;;;;;OAYG;IACH,aAAa,EAAE;QACb,MAAM,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC;QAC5B,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;KAC7B;CAqCF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,KAAK;CAMhB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE;IACjC,KAAK,EAAE,MAAM;CAId,CAAC","sourcesContent":["import type { ThemeColors } from \"./colors.js\";\nimport { control, fontWeight, radius, spacing, typography } from \"./foundations.js\";\nimport type { FontWeightValue, TextVariant } from \"./foundations.js\";\n\nexport type ButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\" | \"link\";\n/** Corner geometry of the control frame. Mirrors `IconButtonShape`. */\nexport type ButtonShape = \"rounded\" | \"pill\";\n/**\n * Where the label sits inside the frame. `center` is the action default;\n * `leading` is for a full-width row action whose label reads as list copy.\n */\nexport type ButtonAlign = \"center\" | \"leading\";\nexport type ButtonSize = keyof typeof control.buttonHeight;\nexport type SurfaceTone = \"default\" | \"raised\" | \"accent\" | \"sunken\" | \"subtle\";\nexport type SurfacePadding = \"none\" | keyof typeof spacing;\nexport type SurfaceRadius = keyof typeof radius;\nexport type FieldVariant = \"surface\" | \"inset\";\nexport type FieldShape = \"medium\" | \"large\" | \"full\";\n\n/** Small renderer entry point for the three foundational visual recipes. */\nexport const buttonRecipe = {\n slots: [\"root\", \"leading\", \"label\", \"trailing\", \"spinner\"] as const,\n defaults: { tone: \"primary\", size: \"medium\", shape: \"rounded\", align: \"center\" } as const,\n tones: {\n primary: { background: \"primary\", content: \"onPrimary\", border: null, paddingHorizontal: null },\n // The outline is a border role, not a text color. Drawing it in `textSub`\n // made a resting control read heavier than the selected one beside it.\n secondary: { background: \"bg\", content: \"text\", border: \"borderControl\", paddingHorizontal: null },\n ghost: { background: null, content: \"textMuted\", border: null, paddingHorizontal: null },\n danger: { background: \"dangerFill\", content: \"onDanger\", border: null, paddingHorizontal: null },\n // A link-tone control is inline copy, so the size axis' horizontal padding\n // would push it out of alignment with the text around it.\n link: { background: null, content: \"contentBrand\", border: null, paddingHorizontal: 0 },\n },\n /**\n * Visual treatment for a control that is also a toggle. `accessibilityState`\n * / `aria-pressed` already expressed the state; without a paired visual every\n * consumer painted the selected background in product styles.\n */\n states: {\n selected: { background: \"bg\", content: \"contentBrand\", border: \"contentBrand\" },\n },\n sizes: {\n small: {\n height: control.buttonHeight.small,\n hitSlop: control.buttonHitSlop.small,\n paddingHorizontal: spacing.sm,\n textVariant: \"label\",\n },\n medium: {\n height: control.buttonHeight.medium,\n hitSlop: control.buttonHitSlop.medium,\n paddingHorizontal: spacing.md,\n textVariant: \"body\",\n },\n large: {\n height: control.buttonHeight.large,\n hitSlop: control.buttonHitSlop.large,\n paddingHorizontal: spacing.lg,\n textVariant: \"bodyLarge\",\n },\n },\n shapes: { rounded: \"md\", pill: \"full\" },\n aligns: { center: \"center\", leading: \"flex-start\" },\n opacity: { disabled: 0.5, pressed: 0.86 },\n /**\n * 긴 라벨의 처리 규칙. 지금까지 이 판단이 없어서 Web은 무한히 줄바꿈하고 RN은 한 줄로\n * 잘렸다 — 같은 번역문이 두 표면에서 다르게 보였다.\n *\n * 자르지 않고 **두 줄까지 접는다**. 잘린 행동 라벨(\"삭제하...\"))은 무엇을 하는 버튼인지\n * 잃는다. 대신 무제한 줄바꿈도 막는다 — 하단 CTA 행처럼 버튼이 남의 레이아웃을 밀어내는\n * 자리가 있고, 두 줄을 넘는 라벨은 레이아웃이 아니라 카피의 문제다.\n *\n * 큰 글자 설정에서는 상한을 **푼다**. 사용자가 키운 글자에서 두 줄로 자르면 내용이\n * 사라지고, 그건 WCAG 1.4.4를 어긴다. 제품 카피가 아니라 사용자 설정이 원인이기 때문에\n * 같은 규칙을 적용할 수 없다.\n */\n label: { overflow: \"wrap\", maxLines: 2, liftCapOnLargeText: true },\n} as const satisfies {\n slots: readonly string[];\n defaults: { tone: ButtonTone; size: ButtonSize; shape: ButtonShape; align: ButtonAlign };\n tones: Record<\n ButtonTone,\n {\n background: keyof ThemeColors | null;\n content: keyof ThemeColors;\n border: keyof ThemeColors | null;\n /** `null` keeps the size axis' padding. */\n paddingHorizontal: number | null;\n }\n >;\n states: {\n selected: {\n background: keyof ThemeColors;\n content: keyof ThemeColors;\n border: keyof ThemeColors;\n };\n };\n sizes: Record<\n ButtonSize,\n {\n height: number;\n hitSlop: number;\n paddingHorizontal: number;\n textVariant: TextVariant;\n }\n >;\n shapes: Record<ButtonShape, keyof typeof radius>;\n aligns: Record<ButtonAlign, \"center\" | \"flex-start\">;\n opacity: { disabled: number; pressed: number };\n label: { overflow: \"wrap\"; maxLines: number; liftCapOnLargeText: boolean };\n};\n\n/** Resolves the label's line cap for one resolved environment. `null` means uncapped. */\nexport function resolveButtonLabelLines(largeText: boolean): number | null {\n return largeText && buttonRecipe.label.liftCapOnLargeText ? null : buttonRecipe.label.maxLines;\n}\n\nexport const surfaceRecipe = {\n default: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n raised: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: true,\n borderAlways: true,\n // An elevated surface must not clip: `overflow: hidden` cuts off its own\n // shadow. Every other tone clips so a child image cannot spill past the\n // rounded corner, which consumers were fixing in product styles.\n clipsContent: false,\n },\n // White surfaces retain a boundary; tonal fills were removed at the user\n // review, so elevation and border now carry hierarchy.\n sunken: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n accent: {\n background: \"bg\",\n border: \"primary\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n subtle: {\n background: \"bg\",\n border: \"border\",\n borderAlpha: 1,\n elevated: false,\n borderAlways: true,\n clipsContent: true,\n },\n} as const satisfies Record<\n SurfaceTone,\n {\n background: keyof ThemeColors;\n border: keyof ThemeColors;\n borderAlpha: number;\n elevated: boolean;\n clipsContent: boolean;\n borderAlways: boolean;\n }\n>;\n\n/** Text placement inside a field control. */\nexport type FieldAlign = \"start\" | \"center\";\n\nexport const fieldRecipe = {\n slots: [\n \"root\",\n \"label\",\n \"control\",\n \"leading\",\n \"input\",\n \"trailing\",\n \"hint\",\n \"error\",\n ] as const,\n defaults: { variant: \"surface\", shape: \"medium\", align: \"start\" } as const,\n variants: {\n // Input interiors stay on the canvas; focus is conveyed by the blue outline, not a grey or blue fill.\n surface: { background: \"bg\" },\n inset: { background: \"bg\" },\n },\n shapes: {\n medium: \"md\",\n large: \"lg\",\n full: \"full\",\n },\n states: {\n idle: { border: \"borderControl\" },\n focused: { border: \"contentBrand\" },\n invalid: { border: \"danger\" },\n },\n minHeight: control.minTouchTarget,\n multilineMinHeight: 80,\n /**\n * Upper bound for a growing multiline field, expressed in visible lines. A\n * consumer otherwise reaches for `inputStyle={{ maxHeight }}`, which moves a\n * recipe-owned dimension into product code. `null` keeps unbounded growth.\n */\n multilineMaxVisibleLines: null as number | null,\n borderWidth: 1,\n focusRingWidth: 2,\n focusRingOffset: 2,\n paddingHorizontal: spacing.md,\n paddingVertical: spacing.sm,\n textVariant: \"body\",\n label: {\n color: \"textBody\",\n textVariant: \"body\",\n fontWeight: fontWeight.semibold,\n gap: spacing.xs,\n },\n support: {\n hintColor: \"textMuted\",\n errorColor: \"danger\",\n textVariant: \"label\",\n gap: 6,\n },\n placeholder: { color: \"textMuted\" },\n disabledOpacity: 0.6,\n /**\n * Which slots `disabledOpacity` fades (2026-10-06). Label and control dim; the\n * hint and the error keep their contrast, because they are the text that says\n * why the field is locked or what to fix. Renderers used to fade the whole\n * frame, so the small support text (`support.textVariant`) — already the\n * lowest-contrast text in the field — lost contrast too. Fading nothing was\n * rejected: the label and the control are what tell the user the field is off.\n *\n * Every field-family input follows this scope. The amount is the component\n * recipe's own `states.disabledOpacity` where it has one (SearchField,\n * PasswordField, OtpField, NumberField, Select); otherwise this recipe's\n * `disabledOpacity` (TextField, TextArea, Field, Combobox, DatePicker, TagsInput).\n */\n disabledScope: {\n dimmed: [\"label\", \"control\"],\n unchanged: [\"hint\", \"error\"],\n },\n} as const satisfies {\n slots: readonly string[];\n defaults: { variant: FieldVariant; shape: FieldShape; align: FieldAlign };\n variants: Record<FieldVariant, { background: keyof ThemeColors }>;\n shapes: Record<FieldShape, keyof typeof radius>;\n states: Record<\n \"idle\" | \"focused\" | \"invalid\",\n { border: keyof ThemeColors }\n >;\n minHeight: number;\n multilineMinHeight: number;\n multilineMaxVisibleLines: number | null;\n borderWidth: number;\n focusRingWidth: number;\n focusRingOffset: number;\n paddingHorizontal: number;\n paddingVertical: number;\n textVariant: keyof typeof typography;\n label: {\n color: keyof ThemeColors;\n textVariant: keyof typeof typography;\n fontWeight: FontWeightValue;\n gap: number;\n };\n support: {\n hintColor: keyof ThemeColors;\n errorColor: keyof ThemeColors;\n textVariant: keyof typeof typography;\n gap: number;\n };\n placeholder: { color: keyof ThemeColors };\n disabledOpacity: number;\n disabledScope: {\n dimmed: readonly (\"label\" | \"control\")[];\n unchanged: readonly (\"hint\" | \"error\")[];\n };\n};\n\n/**\n * Renderer-neutral Surface geometry. Tone colors stay in `surfaceRecipe` for\n * compatibility; these axes make the previously implicit Web/Native defaults\n * explicit without changing that public recipe shape.\n */\nexport const surfaceDefaults = {\n tone: \"default\",\n padding: \"none\",\n radius: \"lg\",\n bordered: false,\n} as const satisfies {\n tone: SurfaceTone;\n padding: SurfacePadding;\n radius: SurfaceRadius;\n bordered: boolean;\n};\n\nexport const surfaceGeometry = {\n paddings: { none: 0, ...spacing },\n radii: radius,\n} as const satisfies {\n paddings: Record<SurfacePadding, number>;\n radii: Record<SurfaceRadius, number>;\n};\n"]}
|
package/dist/catalog.d.ts
CHANGED
|
@@ -4170,6 +4170,10 @@ export declare const recipeRegistry: {
|
|
|
4170
4170
|
readonly color: "textMuted";
|
|
4171
4171
|
};
|
|
4172
4172
|
readonly disabledOpacity: 0.6;
|
|
4173
|
+
readonly disabledScope: {
|
|
4174
|
+
readonly dimmed: readonly ["label", "control"];
|
|
4175
|
+
readonly unchanged: readonly ["hint", "error"];
|
|
4176
|
+
};
|
|
4173
4177
|
};
|
|
4174
4178
|
readonly filePickerRecipe: {
|
|
4175
4179
|
readonly slots: readonly ["root", "trigger", "dropzone", "hint", "error"];
|
|
@@ -5850,6 +5854,22 @@ export declare const recipeRegistry: {
|
|
|
5850
5854
|
readonly defaults: {
|
|
5851
5855
|
readonly size: "medium";
|
|
5852
5856
|
};
|
|
5857
|
+
readonly pills: {
|
|
5858
|
+
readonly gap: 8;
|
|
5859
|
+
readonly radius: 999;
|
|
5860
|
+
readonly inset: 8;
|
|
5861
|
+
readonly minHeight: 44;
|
|
5862
|
+
readonly selectedBackground: Readonly<{
|
|
5863
|
+
source: "theme";
|
|
5864
|
+
key: "textBody";
|
|
5865
|
+
alpha?: number;
|
|
5866
|
+
}>;
|
|
5867
|
+
readonly selectedContent: Readonly<{
|
|
5868
|
+
source: "theme";
|
|
5869
|
+
key: "bg";
|
|
5870
|
+
alpha?: number;
|
|
5871
|
+
}>;
|
|
5872
|
+
};
|
|
5853
5873
|
readonly adaptive: {
|
|
5854
5874
|
readonly largeTextLayout: "stacked";
|
|
5855
5875
|
readonly stackAtFontScale: 1.6;
|
|
@@ -6980,6 +7000,10 @@ export declare const recipeRegistry: {
|
|
|
6980
7000
|
readonly draggedOpacity: 0.64;
|
|
6981
7001
|
};
|
|
6982
7002
|
readonly radius: "full";
|
|
7003
|
+
readonly header: {
|
|
7004
|
+
readonly gap: 16;
|
|
7005
|
+
readonly trackGap: 8;
|
|
7006
|
+
};
|
|
6983
7007
|
};
|
|
6984
7008
|
readonly spinnerRecipe: {
|
|
6985
7009
|
readonly slots: readonly ["root"];
|
|
@@ -8195,6 +8219,7 @@ export declare const recipeRegistry: {
|
|
|
8195
8219
|
readonly row: {
|
|
8196
8220
|
readonly minHeight: 68;
|
|
8197
8221
|
readonly paddingHorizontal: 16;
|
|
8222
|
+
readonly paddingVertical: 8;
|
|
8198
8223
|
readonly gap: 12;
|
|
8199
8224
|
readonly radius: "md";
|
|
8200
8225
|
};
|
package/dist/catalog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,YAAY,GACZ,cAAc,GACd,UAAU,GACV,SAAS,GACT,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,KAAK,GAAG,QAAQ,CAAC;AACzE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,CAAC;AAC3E,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGjB,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,cAAc,CAAC"}
|
|
@@ -105,17 +105,22 @@ export declare function canDismissCommandPalette(reason: CommandPaletteDismissRe
|
|
|
105
105
|
export type CommandPaletteDescriptor = Readonly<{
|
|
106
106
|
accessibilityLabel: string;
|
|
107
107
|
searchPlaceholder: string;
|
|
108
|
+
/**
|
|
109
|
+
* Product-localized copy announced once when the visible result list is
|
|
110
|
+
* empty. Optional (added 2026-10-06) so existing descriptors stay valid;
|
|
111
|
+
* without it a renderer shows no empty copy rather than inventing an
|
|
112
|
+
* untranslated fallback. An `asyncState` `empty`/`error`/`loading` message
|
|
113
|
+
* still takes precedence because the product adapter knows more.
|
|
114
|
+
*/
|
|
115
|
+
emptyMessage?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Accessible name of the visible close action that dismisses with
|
|
118
|
+
* `"close-action"`. Optional for the same compatibility reason; without it
|
|
119
|
+
* the palette closes through Escape/outside/activation only, as before.
|
|
120
|
+
*/
|
|
121
|
+
closeLabel?: string;
|
|
108
122
|
}>;
|
|
109
123
|
export declare function validateCommandPaletteDescriptor(descriptor: CommandPaletteDescriptor): void;
|
|
110
|
-
/**
|
|
111
|
-
* Anatomy only — chrome for the modal shell and the pinned search field,
|
|
112
|
-
* reusing the exact tokens Dialog-family and Menu-family recipes already use
|
|
113
|
-
* (`floatingSurfaceContract`, `fieldFrameContract`, `collectionItemContract`)
|
|
114
|
-
* instead of inventing new ones. Result rows and section labels reuse
|
|
115
|
-
* `collectionItemContract` the same way `menuRecipe`/`treeRecipe` do — a
|
|
116
|
-
* command result is chrome-identical to a Menu item, it just lives in a
|
|
117
|
-
* modal instead of an anchored popup.
|
|
118
|
-
*/
|
|
119
124
|
export declare const commandPaletteRecipe: {
|
|
120
125
|
readonly slots: readonly ["backdrop", "positioner", "content", "searchField", "viewport", "section", "sectionLabel", "item", "leading", "copy", "label", "description", "shortcut", "emptyState"];
|
|
121
126
|
readonly backdrop: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.d.ts","sourceRoot":"","sources":["../src/command-palette.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AASjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,MAAM,MAAM,4BAA4B,CAAC,GAAG,SAAS,aAAa,GAAG,aAAa,IAChF,kBAAkB,CAAC,GAAG,CAAC,CAAC;AAE1B,MAAM,MAAM,oBAAoB,CAC9B,GAAG,SAAS,aAAa,GAAG,aAAa,EACzC,UAAU,SAAS,aAAa,GAAG,aAAa,IAC9C,gBAAgB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAEtC,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAChD,MAAM,MAAM,wBAAwB,GAAG,uBAAuB,CAAC;AAE/D,MAAM,MAAM,4BAA4B,GAAG,SAAS,GAAG,UAAU,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,6BAA6B,CAAC,GAAG,SAAS,aAAa,GAAG,aAAa,IAAI,CACrF,MAAM,EAAE,GAAG,EACX,MAAM,EAAE,4BAA4B,KACjC,IAAI,CAAC;AAEV;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,2BAA2B,GACnC,cAAc,GACd,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,c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AE,CACb,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,+BAA+B,KACrC,IAAI,CAAC;CACX,CAAC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAC/B,iCAAiC,GACjC,mCAAmC,CAAC;AAExC,MAAM,MAAM,2BAA2B,GAAG,QAAQ,CAAC;IACjD,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC,CAAC;AAEH,eAAO,MAAM,8BAA8B;;;;CAIK,CAAC;AAEjD,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,2BAA2B,EACnC,MAAM,GAAE,2BAA4D,GACnE,OAAO,CAMT;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC9C,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC,CAAC;AAQH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,wBAAwB,GACnC,IAAI,CAUN;AAKD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6CvB,CAAC;AAEX,eAAO,MAAM,+BAA+B,knBASlC,CAAC"}
|
package/dist/command-palette.js
CHANGED
|
@@ -28,16 +28,15 @@ export function validateCommandPaletteDescriptor(descriptor) {
|
|
|
28
28
|
}
|
|
29
29
|
assertNonEmpty(descriptor.accessibilityLabel, "accessibilityLabel");
|
|
30
30
|
assertNonEmpty(descriptor.searchPlaceholder, "searchPlaceholder");
|
|
31
|
+
for (const f of ["emptyMessage", "closeLabel"]) {
|
|
32
|
+
const v = descriptor[f];
|
|
33
|
+
if (v !== undefined)
|
|
34
|
+
assertNonEmpty(v, f);
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
* (`floatingSurfaceContract`, `fieldFrameContract`, `collectionItemContract`)
|
|
36
|
-
* instead of inventing new ones. Result rows and section labels reuse
|
|
37
|
-
* `collectionItemContract` the same way `menuRecipe`/`treeRecipe` do — a
|
|
38
|
-
* command result is chrome-identical to a Menu item, it just lives in a
|
|
39
|
-
* modal instead of an anchored popup.
|
|
40
|
-
*/
|
|
37
|
+
// Anatomy only; reuses Dialog/Menu chrome tokens. Rationale: docs/command-palette.md
|
|
38
|
+
// "HJM 기본값" (moved out of JSDoc 2026-10-06 because dist keeps comments and the
|
|
39
|
+
// behaviors bundle that re-exports this module sits at its byte budget).
|
|
41
40
|
export const commandPaletteRecipe = {
|
|
42
41
|
slots: [
|
|
43
42
|
"backdrop",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../src/command-palette.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAsHtD,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,IAAI;CAC2B,CAAC;AAEjD,MAAM,UAAU,wBAAwB,CACtC,MAAmC,EACnC,SAAsC,8BAA8B;IAEpE,IAAI,MAAM,KAAK,cAAc,IAAI,MAAM,KAAK,YAAY;QAAE,OAAO,IAAI,CAAC;IACtE,IAAI,CAAC,MAAM,CAAC,WAAW;QAAE,OAAO,KAAK,C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AE,GAAG;KACf;IACD,WAAW,EAAE;QACX,SAAS,EAAE,kBAAkB,CAAC,SAAS;QACvC,iBAAiB,EAAE,kBAAkB,CAAC,iBAAiB;QACvD,WAAW,EAAE,kBAAkB,CAAC,MAAM;KACvC;IACD,IAAI,EAAE,sBAAsB;IAC5B,YAAY,EAAE;QACZ,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS;QACvC,WAAW,EAAE,OAAgB;QAC7B,iBAAiB,EAAE,OAAO,CAAC,EAAE;QAC7B,eAAe,EAAE,OAAO,CAAC,EAAE;KAC5B;IACD,UAAU,EAAE;QACV,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,SAAS;QACvC,WAAW,EAAE,MAAe;QAC5B,eAAe,EAAE,OAAO,CAAC,EAAE;KAC5B;IACD,UAAU,EAAE,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE,YAAY,CAAC,IAAI,EAAE;CAC1D,CAAC;AAEX,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,4EAA4E;IAC5E,sDAAsD;IACtD,oFAAoF;IACpF,iFAAiF;IACjF,sFAAsF;IACtF,sDAAsD;IACtD,8EAA8E;IAC9E,sFAAsF;CAC9E,CAAC","sourcesContent":["import type { CollectionKey, ComboboxInput, MenuItemDescriptor } from \"./behaviors.js\";\nimport type { CollectionSource, ComboboxCollectionState } from \"./collection.js\";\nimport {\n collectionItemContract,\n fieldFrameContract,\n floatingSurfaceContract,\n} from \"./component-contracts.js\";\nimport { backdrop, motionPreset, spacing } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * antd has no direct crosswalk target for CommandPalette — it is not in\n * `antDesignReferenceComponents`. The nearest antd surface, `AutoComplete`/\n * `Select` with `showSearch`, is exactly the composition question this\n * module answers below, not a separate coverage gap.\n *\n * Decisive difference from Combobox: **a result is an action, not a\n * persisted value.** Committing a Combobox sets `selectedKey` as the field's\n * ongoing value, and `inputValue` goes on mirroring it. Running \"새 트윗\n * 작성\" has no ongoing value anywhere to remember — the palette closes and\n * resets. Forcing `selectedKey`/`onCommit` onto that would create a\n * phantom value that is always `null` again the instant the palette reopens,\n * the same category of dead-state mistake `docs/dropdown.md` avoided by not\n * re-defining Menu's problem under a second name. So items here are shaped\n * like `MenuItemDescriptor` (carries `shortcut`/`tone` for destructive\n * commands), not `SelectItemDescriptor` (which deliberately strips both,\n * because a Select option is a value, not an action).\n *\n * Everything else composes from existing contracts without changes:\n * - **Heterogeneous sources** (\"최근\" / \"명령어\" / \"검색 결과\" in one list):\n * already representable — `CollectionSource`'s `sections` is exactly\n * grouped items, no new data model.\n * - **Search/filter text**: `ComboboxInput` (inputValue/defaultInputValue/\n * onInputValueChange) and `ComboboxCollectionState` (local vs. external\n * filtering, `queryValue`/`resultQuery` staleness guard) are reused\n * verbatim — a command search is the same async-search problem Combobox\n * already solved, just over commands instead of selectable values.\n * - **Keyboard navigation/typeahead across sections**: `getCollectionNavigationTarget`/\n * `getCollectionTypeaheadMatch` (`src/collection.ts`) already generalize\n * over any `CollectionSource`; nothing palette-specific to add.\n * - **Global keyboard shortcut** (⌘K): explicitly out of scope. Which key\n * combination opens the palette, and whether it is global or scoped, is a\n * product/app decision — the same reason Link does not own navigation and\n * BottomNavigation does not own the router's route state.\n */\nexport type CommandPaletteItemDescriptor<Key extends CollectionKey = CollectionKey> =\n MenuItemDescriptor<Key>;\n\nexport type CommandPaletteSource<\n Key extends CollectionKey = CollectionKey,\n SectionKey extends CollectionKey = CollectionKey,\n> = CollectionSource<Key, SectionKey>;\n\nexport type CommandPaletteInput = ComboboxInput;\nexport type CommandPaletteQueryState = ComboboxCollectionState;\n\nexport type CommandPaletteActivateReason = \"pointer\" | \"keyboard\";\n\n/**\n * Mirrors Menu's `onAction`/`onActionAfterDismiss` split (`behaviorRegistry.menu`)\n * without importing it — Menu, like Dialog, predates the per-component\n * `src/<name>.ts` convention and has no exported type of its own to import,\n * only string literals in the shared registry. `onActivate` fires\n * immediately; `onActivateAfterDismiss` fires once the exit transition\n * completes, for a command that itself opens another overlay (the same\n * \"close first, open the next surface after exit completes\" ordering\n * `docs/architecture.md`'s overlay-stack rule already requires).\n */\nexport type CommandPaletteActivateHandler<Key extends CollectionKey = CollectionKey> = (\n itemId: Key,\n reason: CommandPaletteActivateReason,\n) => void;\n\n/**\n * Web-only modal overlay (catalog: `platform: \"web\"`) — there is no `modal`\n * axis the way SidePanel needs one; a command palette is always a modal\n * takeover, never an inline non-modal surface. No `back`/`swipe` for the\n * same web-only reason `SidePanelDismissReason` excludes them.\n *\n * `\"activation\"` is a dismiss reason, not merely an event: running a command\n * always closes the palette, which is why `canDismissCommandPalette` treats\n * it like `\"programmatic\"` — an owner-level certainty no policy can veto.\n * There is no `busy` axis blocking dismissal while a command executes: the\n * palette itself is fire-and-forget (`onActivate` fires and the palette\n * closes); if the command's own effect is asynchronous, that runs after the\n * palette is already gone, the same ordering Menu's `onActionAfterDismiss`\n * already models. Recreating AlertDialog's `idle→busy→error` session here\n * would be guessing at a requirement (a command that must block the palette\n * open until it settles) with no measured product need.\n */\nexport type CommandPaletteDismissReason =\n | \"close-action\"\n | \"outside\"\n | \"escape\"\n | \"activation\"\n | \"programmatic\";\n\nexport type CommandPaletteOpenChangeDetails = Readonly<{\n reason: \"trigger\" | CommandPaletteDismissReason;\n}>;\n\nexport type ControlledCommandPaletteOpenState = Readonly<{\n open: boolean;\n defaultOpen?: never;\n onOpenChange(open: boolean, details: CommandPaletteOpenChangeDetails): void;\n}>;\n\nexport type UncontrolledCommandPaletteOpenState = Readonly<{\n open?: never;\n defaultOpen?: boolean;\n onOpenChange?: (\n open: boolean,\n details: CommandPaletteOpenChangeDetails,\n ) => void;\n}>;\n\nexport type CommandPaletteOpenState =\n | ControlledCommandPaletteOpenState\n | UncontrolledCommandPaletteOpenState;\n\nexport type CommandPaletteDismissPolicy = Readonly<{\n dismissible: boolean;\n outsideDismiss: boolean;\n escapeDismiss: boolean;\n}>;\n\nexport const commandPaletteBehaviorDefaults = {\n dismissible: true,\n outsideDismiss: true,\n escapeDismiss: true,\n} as const satisfies CommandPaletteDismissPolicy;\n\nexport function canDismissCommandPalette(\n reason: CommandPaletteDismissReason,\n policy: CommandPaletteDismissPolicy = commandPaletteBehaviorDefaults,\n): boolean {\n if (reason === \"programmatic\" || reason === \"activation\") return true;\n if (!policy.dismissible) return false;\n if (reason === \"outside\") return policy.outsideDismiss;\n if (reason === \"escape\") return policy.escapeDismiss;\n return true;\n}\n\n/**\n * `accessibilityLabel` is required, not optional like Popover's — a command\n * palette's `role=\"dialog\"` surface has no visible heading the way Dialog's\n * `title` slot or typical Popover content provides; the search field alone\n * is not a reliable accessible name across renderers. `searchPlaceholder` is\n * required for the same reason `LoadMoreLabels`/`PaginationLabels` require\n * every field: a renderer must not invent untranslated fallback copy.\n */\nexport type CommandPaletteDescriptor = Readonly<{\n accessibilityLabel: string;\n searchPlaceholder: string;\n}>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`CommandPalette ${field} must not be empty`);\n }\n}\n\nexport function validateCommandPaletteDescriptor(\n descriptor: CommandPaletteDescriptor,\n): void {\n if (descriptor === null || typeof descriptor !== \"object\") {\n throw new TypeError(\"CommandPalette descriptor must be an object\");\n }\n assertNonEmpty(descriptor.accessibilityLabel, \"accessibilityLabel\");\n assertNonEmpty(descriptor.searchPlaceholder, \"searchPlaceholder\");\n}\n\n/**\n * Anatomy only — chrome for the modal shell and the pinned search field,\n * reusing the exact tokens Dialog-family and Menu-family recipes already use\n * (`floatingSurfaceContract`, `fieldFrameContract`, `collectionItemContract`)\n * instead of inventing new ones. Result rows and section labels reuse\n * `collectionItemContract` the same way `menuRecipe`/`treeRecipe` do — a\n * command result is chrome-identical to a Menu item, it just lives in a\n * modal instead of an anchored popup.\n */\nexport const commandPaletteRecipe = {\n slots: [\n \"backdrop\",\n \"positioner\",\n \"content\",\n \"searchField\",\n \"viewport\",\n \"section\",\n \"sectionLabel\",\n \"item\",\n \"leading\",\n \"copy\",\n \"label\",\n \"description\",\n \"shortcut\",\n \"emptyState\",\n ] as const,\n backdrop: backdrop.modal,\n content: {\n background: floatingSurfaceContract.background,\n border: floatingSurfaceContract.border,\n borderWidth: floatingSurfaceContract.borderWidth,\n radius: \"lg\" as const,\n shadow: floatingSurfaceContract.shadow,\n maxWidth: 560,\n maxHeight: 420,\n },\n searchField: {\n minHeight: fieldFrameContract.minHeight,\n paddingHorizontal: fieldFrameContract.paddingHorizontal,\n borderColor: fieldFrameContract.border,\n },\n item: collectionItemContract,\n sectionLabel: {\n color: semanticColors.content.secondary,\n textVariant: \"label\" as const,\n paddingHorizontal: spacing.sm,\n paddingVertical: spacing.xs,\n },\n emptyState: {\n color: semanticColors.content.secondary,\n textVariant: \"body\" as const,\n paddingVertical: spacing.xl,\n },\n transition: { enter: motionPreset.enter, exit: motionPreset.exit },\n} as const;\n\nexport const commandPaletteBehaviorScenarios = [\n \"activating-a-result-always-closes-the-palette-regardless-of-dismiss-policy\",\n \"escape-and-outside-close-without-running-any-command\",\n \"sections-merge-recents-static-commands-and-search-results-without-a-new-data-model\",\n \"keyboard-navigation-and-typeahead-reuse-the-shared-collection-helpers-unchanged\",\n \"local-vs-external-filtering-reuses-comboboxcollectionstate-staleness-guard-unchanged\",\n \"empty-result-state-is-announced-once-not-per-section\",\n \"no-global-shortcut-binding-is-owned-here-the-product-decides-the-trigger-key\",\n \"activate-after-dismiss-lets-a-command-open-the-next-overlay-only-once-exit-completes\",\n] as const;\n"]}
|
|
1
|
+
{"version":3,"file":"command-palette.js","sourceRoot":"","sources":["../src/command-palette.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,sB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;IAC5E,sDAAsD;IACtD,oFAAoF;IACpF,iFAAiF;IACjF,sFAAsF;IACtF,sDAAsD;IACtD,8EAA8E;IAC9E,sFAAsF;CAC9E,CAAC","sourcesContent":["import type { CollectionKey, ComboboxInput, MenuItemDescriptor } from \"./behaviors.js\";\nimport type { CollectionSource, ComboboxCollectionState } from \"./collection.js\";\nimport {\n collectionItemContract,\n fieldFrameContract,\n floatingSurfaceContract,\n} from \"./component-contracts.js\";\nimport { backdrop, motionPreset, spacing } from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\n/**\n * antd has no direct crosswalk target for CommandPalette — it is not in\n * `antDesignReferenceComponents`. The nearest antd surface, `AutoComplete`/\n * `Select` with `showSearch`, is exactly the composition question this\n * module answers below, not a separate coverage gap.\n *\n * Decisive difference from Combobox: **a result is an action, not a\n * persisted value.** Committing a Combobox sets `selectedKey` as the field's\n * ongoing value, and `inputValue` goes on mirroring it. Running \"새 트윗\n * 작성\" has no ongoing value anywhere to remember — the palette closes and\n * resets. Forcing `selectedKey`/`onCommit` onto that would create a\n * phantom value that is always `null` again the instant the palette reopens,\n * the same category of dead-state mistake `docs/dropdown.md` avoided by not\n * re-defining Menu's problem under a second name. So items here are shaped\n * like `MenuItemDescriptor` (carries `shortcut`/`tone` for destructive\n * commands), not `SelectItemDescriptor` (which deliberately strips both,\n * because a Select option is a value, not an action).\n *\n * Everything else composes from existing contracts without changes:\n * - **Heterogeneous sources** (\"최근\" / \"명령어\" / \"검색 결과\" in one list):\n * already representable — `CollectionSource`'s `sections` is exactly\n * grouped items, no new data model.\n * - **Search/filter text**: `ComboboxInput` (inputValue/defaultInputValue/\n * onInputValueChange) and `ComboboxCollectionState` (local vs. external\n * filtering, `queryValue`/`resultQuery` staleness guard) are reused\n * verbatim — a command search is the same async-search problem Combobox\n * already solved, just over commands instead of selectable values.\n * - **Keyboard navigation/typeahead across sections**: `getCollectionNavigationTarget`/\n * `getCollectionTypeaheadMatch` (`src/collection.ts`) already generalize\n * over any `CollectionSource`; nothing palette-specific to add.\n * - **Global keyboard shortcut** (⌘K): explicitly out of scope. Which key\n * combination opens the palette, and whether it is global or scoped, is a\n * product/app decision — the same reason Link does not own navigation and\n * BottomNavigation does not own the router's route state.\n */\nexport type CommandPaletteItemDescriptor<Key extends CollectionKey = CollectionKey> =\n MenuItemDescriptor<Key>;\n\nexport type CommandPaletteSource<\n Key extends CollectionKey = CollectionKey,\n SectionKey extends CollectionKey = CollectionKey,\n> = CollectionSource<Key, SectionKey>;\n\nexport type CommandPaletteInput = ComboboxInput;\nexport type CommandPaletteQueryState = ComboboxCollectionState;\n\nexport type CommandPaletteActivateReason = \"pointer\" | \"keyboard\";\n\n/**\n * Mirrors Menu's `onAction`/`onActionAfterDismiss` split (`behaviorRegistry.menu`)\n * without importing it — Menu, like Dialog, predates the per-component\n * `src/<name>.ts` convention and has no exported type of its own to import,\n * only string literals in the shared registry. `onActivate` fires\n * immediately; `onActivateAfterDismiss` fires once the exit transition\n * completes, for a command that itself opens another overlay (the same\n * \"close first, open the next surface after exit completes\" ordering\n * `docs/architecture.md`'s overlay-stack rule already requires).\n */\nexport type CommandPaletteActivateHandler<Key extends CollectionKey = CollectionKey> = (\n itemId: Key,\n reason: CommandPaletteActivateReason,\n) => void;\n\n/**\n * Web-only modal overlay (catalog: `platform: \"web\"`) — there is no `modal`\n * axis the way SidePanel needs one; a command palette is always a modal\n * takeover, never an inline non-modal surface. No `back`/`swipe` for the\n * same web-only reason `SidePanelDismissReason` excludes them.\n *\n * `\"activation\"` is a dismiss reason, not merely an event: running a command\n * always closes the palette, which is why `canDismissCommandPalette` treats\n * it like `\"programmatic\"` — an owner-level certainty no policy can veto.\n * There is no `busy` axis blocking dismissal while a command executes: the\n * palette itself is fire-and-forget (`onActivate` fires and the palette\n * closes); if the command's own effect is asynchronous, that runs after the\n * palette is already gone, the same ordering Menu's `onActionAfterDismiss`\n * already models. Recreating AlertDialog's `idle→busy→error` session here\n * would be guessing at a requirement (a command that must block the palette\n * open until it settles) with no measured product need.\n */\nexport type CommandPaletteDismissReason =\n | \"close-action\"\n | \"outside\"\n | \"escape\"\n | \"activation\"\n | \"programmatic\";\n\nexport type CommandPaletteOpenChangeDetails = Readonly<{\n reason: \"trigger\" | CommandPaletteDismissReason;\n}>;\n\nexport type ControlledCommandPaletteOpenState = Readonly<{\n open: boolean;\n defaultOpen?: never;\n onOpenChange(open: boolean, details: CommandPaletteOpenChangeDetails): void;\n}>;\n\nexport type UncontrolledCommandPaletteOpenState = Readonly<{\n open?: never;\n defaultOpen?: boolean;\n onOpenChange?: (\n open: boolean,\n details: CommandPaletteOpenChangeDetails,\n ) => void;\n}>;\n\nexport type CommandPaletteOpenState =\n | ControlledCommandPaletteOpenState\n | UncontrolledCommandPaletteOpenState;\n\nexport type CommandPaletteDismissPolicy = Readonly<{\n dismissible: boolean;\n outsideDismiss: boolean;\n escapeDismiss: boolean;\n}>;\n\nexport const commandPaletteBehaviorDefaults = {\n dismissible: true,\n outsideDismiss: true,\n escapeDismiss: true,\n} as const satisfies CommandPaletteDismissPolicy;\n\nexport function canDismissCommandPalette(\n reason: CommandPaletteDismissReason,\n policy: CommandPaletteDismissPolicy = commandPaletteBehaviorDefaults,\n): boolean {\n if (reason === \"programmatic\" || reason === \"activation\") return true;\n if (!policy.dismissible) return false;\n if (reason === \"outside\") return policy.outsideDismiss;\n if (reason === \"escape\") return policy.escapeDismiss;\n return true;\n}\n\n/**\n * `accessibilityLabel` is required, not optional like Popover's — a command\n * palette's `role=\"dialog\"` surface has no visible heading the way Dialog's\n * `title` slot or typical Popover content provides; the search field alone\n * is not a reliable accessible name across renderers. `searchPlaceholder` is\n * required for the same reason `LoadMoreLabels`/`PaginationLabels` require\n * every field: a renderer must not invent untranslated fallback copy.\n */\nexport type CommandPaletteDescriptor = Readonly<{\n accessibilityLabel: string;\n searchPlaceholder: string;\n /**\n * Product-localized copy announced once when the visible result list is\n * empty. Optional (added 2026-10-06) so existing descriptors stay valid;\n * without it a renderer shows no empty copy rather than inventing an\n * untranslated fallback. An `asyncState` `empty`/`error`/`loading` message\n * still takes precedence because the product adapter knows more.\n */\n emptyMessage?: string;\n /**\n * Accessible name of the visible close action that dismisses with\n * `\"close-action\"`. Optional for the same compatibility reason; without it\n * the palette closes through Escape/outside/activation only, as before.\n */\n closeLabel?: string;\n}>;\n\nfunction assertNonEmpty(value: string, field: string): void {\n if (typeof value !== \"string\" || value.trim().length === 0) {\n throw new TypeError(`CommandPalette ${field} must not be empty`);\n }\n}\n\nexport function validateCommandPaletteDescriptor(\n descriptor: CommandPaletteDescriptor,\n): void {\n if (descriptor === null || typeof descriptor !== \"object\") {\n throw new TypeError(\"CommandPalette descriptor must be an object\");\n }\n assertNonEmpty(descriptor.accessibilityLabel, \"accessibilityLabel\");\n assertNonEmpty(descriptor.searchPlaceholder, \"searchPlaceholder\");\n for (const f of [\"emptyMessage\", \"closeLabel\"] as const) {\n const v = descriptor[f];\n if (v !== undefined) assertNonEmpty(v, f);\n }\n}\n\n// Anatomy only; reuses Dialog/Menu chrome tokens. Rationale: docs/command-palette.md\n// \"HJM 기본값\" (moved out of JSDoc 2026-10-06 because dist keeps comments and the\n// behaviors bundle that re-exports this module sits at its byte budget).\nexport const commandPaletteRecipe = {\n slots: [\n \"backdrop\",\n \"positioner\",\n \"content\",\n \"searchField\",\n \"viewport\",\n \"section\",\n \"sectionLabel\",\n \"item\",\n \"leading\",\n \"copy\",\n \"label\",\n \"description\",\n \"shortcut\",\n \"emptyState\",\n ] as const,\n backdrop: backdrop.modal,\n content: {\n background: floatingSurfaceContract.background,\n border: floatingSurfaceContract.border,\n borderWidth: floatingSurfaceContract.borderWidth,\n radius: \"lg\" as const,\n shadow: floatingSurfaceContract.shadow,\n maxWidth: 560,\n maxHeight: 420,\n },\n searchField: {\n minHeight: fieldFrameContract.minHeight,\n paddingHorizontal: fieldFrameContract.paddingHorizontal,\n borderColor: fieldFrameContract.border,\n },\n item: collectionItemContract,\n sectionLabel: {\n color: semanticColors.content.secondary,\n textVariant: \"label\" as const,\n paddingHorizontal: spacing.sm,\n paddingVertical: spacing.xs,\n },\n emptyState: {\n color: semanticColors.content.secondary,\n textVariant: \"body\" as const,\n paddingVertical: spacing.xl,\n },\n transition: { enter: motionPreset.enter, exit: motionPreset.exit },\n} as const;\n\nexport const commandPaletteBehaviorScenarios = [\n \"activating-a-result-always-closes-the-palette-regardless-of-dismiss-policy\",\n \"escape-and-outside-close-without-running-any-command\",\n \"sections-merge-recents-static-commands-and-search-results-without-a-new-data-model\",\n \"keyboard-navigation-and-typeahead-reuse-the-shared-collection-helpers-unchanged\",\n \"local-vs-external-filtering-reuses-comboboxcollectionstate-staleness-guard-unchanged\",\n \"empty-result-state-is-announced-once-not-per-section\",\n \"no-global-shortcut-binding-is-owned-here-the-product-decides-the-trigger-key\",\n \"activate-after-dismiss-lets-a-command-open-the-next-overlay-only-once-exit-completes\",\n] as const;\n"]}
|
|
@@ -1796,6 +1796,22 @@ export declare const segmentedControlRecipe: {
|
|
|
1796
1796
|
readonly defaults: {
|
|
1797
1797
|
readonly size: "medium";
|
|
1798
1798
|
};
|
|
1799
|
+
readonly pills: {
|
|
1800
|
+
readonly gap: 8;
|
|
1801
|
+
readonly radius: 999;
|
|
1802
|
+
readonly inset: 8;
|
|
1803
|
+
readonly minHeight: 44;
|
|
1804
|
+
readonly selectedBackground: Readonly<{
|
|
1805
|
+
source: "theme";
|
|
1806
|
+
key: "textBody";
|
|
1807
|
+
alpha?: number;
|
|
1808
|
+
}>;
|
|
1809
|
+
readonly selectedContent: Readonly<{
|
|
1810
|
+
source: "theme";
|
|
1811
|
+
key: "bg";
|
|
1812
|
+
alpha?: number;
|
|
1813
|
+
}>;
|
|
1814
|
+
};
|
|
1799
1815
|
readonly adaptive: {
|
|
1800
1816
|
readonly largeTextLayout: "stacked";
|
|
1801
1817
|
readonly stackAtFontScale: 1.6;
|
|
@@ -2970,6 +2986,7 @@ export declare const sheetRecipe: {
|
|
|
2970
2986
|
readonly radius: 12;
|
|
2971
2987
|
readonly offsetY: 4;
|
|
2972
2988
|
};
|
|
2989
|
+
/** Caps `size="auto"` only; fixed `sizes` (medium/large/full) are bounded by the safe-area viewport instead. */
|
|
2973
2990
|
readonly maxHeightRatio: 0.9;
|
|
2974
2991
|
readonly paddingHorizontal: 20;
|
|
2975
2992
|
readonly paddingTop: 12;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-recipes.d.ts","sourceRoot":"","sources":["../src/component-recipes.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,OAAO,EAUP,OAAO,EAKR,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EACL,gBAAgB,EAChB,6BAA6B,EAC7B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,8BAA8B,GACpC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,cAAc,EACd,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,uBAAuB,EACvB,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,MAAM,GACN,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,CAAC;AACd,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE3D,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BtB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAChB,SAAS,GACT,WAAW,GACX,YAAY,GACZ,OAAO,GACP,MAAM,GAC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AAC,QAAQ,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,aAAa,CAAC,KAAK,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,aAAa,CAAC,KAAK,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,YAAY,CAAC,KAAK,CAAC;AACzD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,YAAY,CAAC,MAAM,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,YAAY,CAAC,KAAK,CAAC"}
|
|
@@ -605,6 +605,10 @@ export const comboboxRecipe = {
|
|
|
605
605
|
export const segmentedControlRecipe = {
|
|
606
606
|
slots: ["root", "item", "label", "indicator"],
|
|
607
607
|
defaults: { size: "medium" },
|
|
608
|
+
// Category filters share the single-selection engine, with a compact surface inside a 44 target.
|
|
609
|
+
// See usage/components/segmented-control.md; no separate filter-selection state is introduced.
|
|
610
|
+
pills: { gap: spacing.xs, radius: radius.full, inset: spacing.xs, minHeight: control.minTouchTarget,
|
|
611
|
+
selectedBackground: semanticColors.content.body, selectedContent: semanticColors.canvas },
|
|
608
612
|
adaptive: {
|
|
609
613
|
// Equal-width rows stop being comparable when every short label wraps one
|
|
610
614
|
// Hangul syllable per line. Native renderers stack the options before that
|
|
@@ -1239,6 +1243,7 @@ export const sheetRecipe = {
|
|
|
1239
1243
|
borderWidth: floatingSurfaceContract.borderWidth,
|
|
1240
1244
|
radius: "xl",
|
|
1241
1245
|
shadow: floatingSurfaceContract.shadow,
|
|
1246
|
+
/** Caps `size="auto"` only; fixed `sizes` (medium/large/full) are bounded by the safe-area viewport instead. */
|
|
1242
1247
|
maxHeightRatio: 0.9,
|
|
1243
1248
|
paddingHorizontal: spacing.lg,
|
|
1244
1249
|
paddingTop: spacing.sm,
|