@nurihaus/web-design-system 3.9.2 → 3.9.4
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/README.md +2 -0
- package/dist/.storybook/migration.d.ts +1 -0
- package/dist/.storybook/preview.d.ts +49 -0
- package/dist/.storybook/usage.d.ts +23 -0
- package/dist/agreement.js +1110 -0
- package/dist/ai/components.md +4159 -335
- package/dist/ai/motion.md +209 -135
- package/dist/ai/tokens.md +331 -145
- package/dist/alphabet-keypad.js +446 -0
- package/dist/asset.js +370 -0
- package/dist/avatar.js +251 -34
- package/dist/bar-chart.js +478 -0
- package/dist/board-row.js +379 -0
- package/dist/border.js +223 -0
- package/dist/bottom-cta.js +378 -0
- package/dist/bottom-info.js +253 -0
- package/dist/bottom-nav.js +33 -5
- package/dist/bottom-sheet.js +608 -0
- package/dist/breadcrumb.js +6 -3
- package/dist/card.js +5 -2
- package/dist/check-box.js +43 -140
- package/dist/chip-group.js +50 -12
- package/dist/chunk-1563.js +42 -18
- package/dist/chunk-1657.js +7 -3
- package/dist/{chunk-9387.js → chunk-1768.js} +2 -2
- package/dist/chunk-1983.js +136 -0
- package/dist/chunk-2046.js +73 -0
- package/dist/chunk-2060.js +34 -0
- package/dist/chunk-2308.js +184 -0
- package/dist/chunk-2777.js +1 -0
- package/dist/chunk-3091.js +54 -0
- package/dist/chunk-3297.js +130 -0
- package/dist/chunk-3640.js +94 -0
- package/dist/chunk-4109.js +115 -0
- package/dist/chunk-4205.js +47 -0
- package/dist/chunk-4324.js +109 -0
- package/dist/chunk-4328.js +69 -0
- package/dist/chunk-4558.js +18 -118
- package/dist/chunk-4577.js +35 -0
- package/dist/chunk-4917.js +1 -1
- package/dist/chunk-5302.js +111 -0
- package/dist/chunk-5670.js +94 -0
- package/dist/chunk-6096.js +176 -0
- package/dist/chunk-6302.js +10 -10
- package/dist/chunk-6478.js +155 -0
- package/dist/chunk-6499.js +39 -0
- package/dist/{chunk-5226.js → chunk-6616.js} +47 -42
- package/dist/chunk-6706.js +64 -0
- package/dist/chunk-674.js +133 -0
- package/dist/chunk-7024.js +152 -0
- package/dist/chunk-7232.js +122 -0
- package/dist/chunk-7298.js +1 -1
- package/dist/chunk-7302.js +66 -0
- package/dist/chunk-7460.js +204 -0
- package/dist/chunk-7589.js +40 -0
- package/dist/chunk-7593.js +85 -0
- package/dist/chunk-7653.js +16 -0
- package/dist/chunk-7737.js +21 -0
- package/dist/chunk-7739.js +1 -5
- package/dist/chunk-829.js +38 -0
- package/dist/chunk-8491.js +43 -0
- package/dist/chunk-8734.js +33 -0
- package/dist/chunk-8787.js +80 -0
- package/dist/chunk-8933.js +14 -2
- package/dist/chunk-8982.js +186 -0
- package/dist/chunk-910.js +82 -27
- package/dist/chunk-948.js +166 -0
- package/dist/chunk-9497.js +11 -1
- package/dist/collapsible-menu.js +39 -14
- package/dist/components/agreement/agreement-props.d.ts +44 -0
- package/dist/components/agreement/agreement-type.d.ts +107 -0
- package/dist/components/agreement/agreement.d.ts +26 -0
- package/dist/components/agreement/agreement.stories.d.ts +72 -0
- package/dist/components/agreement/base-agreement.d.ts +40 -0
- package/dist/components/asset/asset-props.d.ts +43 -0
- package/dist/components/asset/asset-type.d.ts +71 -0
- package/dist/components/asset/asset.d.ts +23 -0
- package/dist/components/asset/asset.stories.d.ts +71 -0
- package/dist/components/asset/base-asset.d.ts +11 -0
- package/dist/components/avatar/avatar-props.d.ts +1 -0
- package/dist/components/avatar/avatar-type.d.ts +6 -4
- package/dist/components/avatar/avatar.stories.d.ts +10 -0
- package/dist/components/badge/badge-type.d.ts +10 -4
- package/dist/components/badge/badge.stories.d.ts +15 -0
- package/dist/components/bar-chart/bar-chart-fill.d.ts +6 -0
- package/dist/components/bar-chart/bar-chart-props.d.ts +17 -0
- package/dist/components/bar-chart/bar-chart-type.d.ts +52 -0
- package/dist/components/bar-chart/bar-chart.d.ts +4 -0
- package/dist/components/bar-chart/bar-chart.stories.d.ts +65 -0
- package/dist/components/bar-chart/base-bar-chart.d.ts +17 -0
- package/dist/components/board-row/base-board-row.d.ts +13 -0
- package/dist/components/board-row/board-row-props.d.ts +2 -0
- package/dist/components/board-row/board-row-type.d.ts +22 -0
- package/dist/components/board-row/board-row.d.ts +8 -0
- package/dist/components/board-row/board-row.stories.d.ts +32 -0
- package/dist/components/border/base-border.d.ts +4 -0
- package/dist/components/border/border-props.d.ts +10 -0
- package/dist/components/border/border-type.d.ts +7 -0
- package/dist/components/border/border.d.ts +5 -0
- package/dist/components/border/border.stories.d.ts +19 -0
- package/dist/components/bottom-bar/bottom-bar.stories.d.ts +12 -5
- package/dist/components/bottom-cta/base-bottom-cta.d.ts +4 -0
- package/dist/components/bottom-cta/bottom-cta-props.d.ts +10 -0
- package/dist/components/bottom-cta/bottom-cta-type.d.ts +39 -0
- package/dist/components/bottom-cta/bottom-cta.d.ts +35 -0
- package/dist/components/bottom-cta/bottom-cta.stories.d.ts +79 -0
- package/dist/components/bottom-info/base-bottom-info.d.ts +4 -0
- package/dist/components/bottom-info/bottom-info-props.d.ts +1 -0
- package/dist/components/bottom-info/bottom-info-type.d.ts +6 -0
- package/dist/components/bottom-info/bottom-info.d.ts +4 -0
- package/dist/components/bottom-info/bottom-info.stories.d.ts +22 -0
- package/dist/components/bottom-nav/bottom-nav-type.d.ts +2 -1
- package/dist/components/bottom-nav/bottom-nav.stories.d.ts +16 -1
- package/dist/components/bottom-sheet/base-bottom-sheet.d.ts +17 -0
- package/dist/components/bottom-sheet/bottom-sheet-props.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-snap.d.ts +15 -0
- package/dist/components/bottom-sheet/bottom-sheet-type.d.ts +55 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
- package/dist/components/bottom-sheet/bottom-sheet.stories.d.ts +47 -0
- package/dist/components/breadcrumb/breadcrumb-type.d.ts +2 -1
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +15 -0
- package/dist/components/button/button-appearance.d.ts +50 -0
- package/dist/components/button/button-props.d.ts +12 -3
- package/dist/components/button/button-type.d.ts +14 -4
- package/dist/components/button/button.stories.d.ts +34 -3
- package/dist/components/button/cta-button.d.ts +1 -1
- package/dist/components/callout/callout.stories.d.ts +11 -0
- package/dist/components/card/card-type.d.ts +2 -1
- package/dist/components/card/card.stories.d.ts +9 -0
- package/dist/components/check-box/check-box-props.d.ts +8 -0
- package/dist/components/check-box/check-box-type.d.ts +10 -3
- package/dist/components/check-box/check-box.stories.d.ts +32 -1
- package/dist/components/chip-group/chip-group-props.d.ts +13 -1
- package/dist/components/chip-group/chip-group-type.d.ts +5 -1
- package/dist/components/chip-group/chip-group.stories.d.ts +30 -0
- package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +6 -2
- package/dist/components/collapsible-menu/collapsible-menu.stories.d.ts +12 -0
- package/dist/components/core/composer/index.d.ts +2 -0
- package/dist/components/description-list/description-list.stories.d.ts +7 -0
- package/dist/components/drawer/base-drawer.d.ts +2 -4
- package/dist/components/drawer/drawer-type.d.ts +17 -2
- package/dist/components/drawer/drawer.stories.d.ts +21 -0
- package/dist/components/drop-down/drop-down-type.d.ts +4 -2
- package/dist/components/drop-down/drop-down.stories.d.ts +16 -0
- package/dist/components/elements/text/text-props.d.ts +4 -3
- package/dist/components/elements/text/text-type.d.ts +3 -2
- package/dist/components/elements/text/text.stories.d.ts +13 -1
- package/dist/components/empty-state/empty-state-props.d.ts +5 -3
- package/dist/components/empty-state/empty-state-type.d.ts +17 -5
- package/dist/components/empty-state/empty-state.d.ts +8 -3
- package/dist/components/empty-state/empty-state.stories.d.ts +328 -11
- package/dist/components/grid-list/base-grid-list.d.ts +10 -0
- package/dist/components/grid-list/grid-list-props.d.ts +11 -0
- package/dist/components/grid-list/grid-list-type.d.ts +24 -0
- package/dist/components/grid-list/grid-list.d.ts +6 -0
- package/dist/components/grid-list/grid-list.stories.d.ts +30 -0
- package/dist/components/highlight/base-highlight.d.ts +14 -0
- package/dist/components/highlight/highlight-props.d.ts +2 -0
- package/dist/components/highlight/highlight-type.d.ts +42 -0
- package/dist/components/highlight/highlight.d.ts +4 -0
- package/dist/components/highlight/highlight.stories.d.ts +31 -0
- package/dist/components/icon/icon-paths.d.ts +16 -0
- package/dist/components/icon/icon.stories.d.ts +11 -1
- package/dist/components/icon-button/icon-button-type.d.ts +4 -1
- package/dist/components/icon-button/icon-button.stories.d.ts +11 -0
- package/dist/components/keypad/alphabet-keypad.d.ts +4 -0
- package/dist/components/keypad/alphabet-keypad.stories.d.ts +24 -0
- package/dist/components/keypad/base-keypad.d.ts +6 -0
- package/dist/components/keypad/full-secure-keypad.d.ts +4 -0
- package/dist/components/keypad/full-secure-keypad.stories.d.ts +26 -0
- package/dist/components/keypad/keypad-layout.d.ts +16 -0
- package/dist/components/keypad/keypad-props.d.ts +16 -0
- package/dist/components/keypad/keypad-type.d.ts +66 -0
- package/dist/components/keypad/number-keypad.d.ts +4 -0
- package/dist/components/keypad/number-keypad.stories.d.ts +26 -0
- package/dist/components/keypad/use-keypad-decoys.d.ts +10 -0
- package/dist/components/list/base-list.d.ts +3 -0
- package/dist/components/list/list-footer.d.ts +5 -0
- package/dist/components/list/list-footer.stories.d.ts +304 -0
- package/dist/components/list/list-group.d.ts +1 -1
- package/dist/components/list/list-group.stories.d.ts +9 -0
- package/dist/components/list/list-header.d.ts +5 -0
- package/dist/components/list/list-header.stories.d.ts +302 -0
- package/dist/components/list/list-props.d.ts +33 -1
- package/dist/components/list/list-row.d.ts +5 -4
- package/dist/components/list/list-row.stories.d.ts +33 -9
- package/dist/components/list/list-type.d.ts +46 -3
- package/dist/components/loading/index.d.ts +4 -0
- package/dist/components/loading/inline-loading/base-inline-loading.d.ts +3 -2
- package/dist/components/loading/inline-loading/inline-loading-props.d.ts +3 -0
- package/dist/components/loading/inline-loading/inline-loading-type.d.ts +6 -6
- package/dist/components/loading/inline-loading/inline-loading.stories.d.ts +28 -2
- package/dist/components/loading/loading-dots/base-loading-dots.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots-props.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots-type.d.ts +6 -0
- package/dist/components/loading/loading-dots/loading-dots.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots.stories.d.ts +37 -0
- package/dist/components/loading/loading-props.d.ts +9 -0
- package/dist/components/loading/loading-type.d.ts +9 -0
- package/dist/components/loading/loading.stories.d.ts +15 -0
- package/dist/components/loading/overlay-loading/overlay-loading-type.d.ts +4 -0
- package/dist/components/loading/overlay-loading/overlay-loading.stories.d.ts +17 -0
- package/dist/components/loading/progress-bar/base-progress-bar.d.ts +3 -0
- package/dist/components/loading/progress-bar/progress-bar-props.d.ts +4 -0
- package/dist/components/loading/progress-bar/progress-bar-type.d.ts +19 -0
- package/dist/components/loading/progress-bar/progress-bar.d.ts +4 -0
- package/dist/components/loading/progress-bar/progress-bar.stories.d.ts +63 -0
- package/dist/components/loading/spinner/spinner-props.d.ts +4 -1
- package/dist/components/loading/spinner/spinner-type.d.ts +3 -1
- package/dist/components/loading/spinner/spinner.d.ts +2 -1
- package/dist/components/loading/spinner/spinner.stories.d.ts +30 -4
- package/dist/components/logging/logging-type.d.ts +1 -1
- package/dist/components/logging/logging.stories.d.ts +5 -0
- package/dist/components/media/media-thumbnail.stories.d.ts +9 -0
- package/dist/components/media/media-type.d.ts +2 -1
- package/dist/components/media/media-viewer.stories.d.ts +7 -0
- package/dist/components/menu/base-menu.d.ts +21 -0
- package/dist/components/menu/menu-props.d.ts +2 -0
- package/dist/components/menu/menu-type.d.ts +70 -0
- package/dist/components/menu/menu.d.ts +8 -0
- package/dist/components/menu/menu.stories.d.ts +54 -0
- package/dist/components/message/message.stories.d.ts +16 -9
- package/dist/components/message-composer/message-composer-type.d.ts +2 -1
- package/dist/components/message-composer/message-composer.stories.d.ts +10 -0
- package/dist/components/modal/modal-type.d.ts +22 -3
- package/dist/components/modal/modal-with-double-button.stories.d.ts +15 -0
- package/dist/components/modal/modal.stories.d.ts +16 -0
- package/dist/components/motion/motion.stories.d.ts +7 -0
- package/dist/components/notice/notice-type.d.ts +1 -1
- package/dist/components/notice/notice.stories.d.ts +12 -5
- package/dist/components/numeric-spinner/base-numeric-spinner.d.ts +8 -0
- package/dist/components/numeric-spinner/numeric-spinner-props.d.ts +5 -0
- package/dist/components/numeric-spinner/numeric-spinner-type.d.ts +29 -0
- package/dist/components/numeric-spinner/numeric-spinner.d.ts +4 -0
- package/dist/components/numeric-spinner/numeric-spinner.stories.d.ts +36 -0
- package/dist/components/overlay/overlay-context.d.ts +44 -0
- package/dist/components/overlay/overlay-provider.d.ts +6 -0
- package/dist/components/overlay/overlay-type.d.ts +68 -0
- package/dist/components/overlay/overlay.d.ts +5 -0
- package/dist/components/overlay/overlay.stories.d.ts +36 -0
- package/dist/components/overlay/use-bottom-sheet.d.ts +3 -0
- package/dist/components/overlay/use-dialog.d.ts +3 -0
- package/dist/components/overlay/use-toast.d.ts +3 -0
- package/dist/components/pagination/pagination-type.d.ts +2 -1
- package/dist/components/pagination/pagination.stories.d.ts +15 -0
- package/dist/components/paragraph/base-paragraph.d.ts +14 -0
- package/dist/components/paragraph/paragraph-props.d.ts +25 -0
- package/dist/components/paragraph/paragraph-type.d.ts +33 -0
- package/dist/components/paragraph/paragraph.d.ts +9 -0
- package/dist/components/paragraph/paragraph.stories.d.ts +54 -0
- package/dist/components/post/base-post.d.ts +19 -0
- package/dist/components/post/post-props.d.ts +31 -0
- package/dist/components/post/post-type.d.ts +34 -0
- package/dist/components/post/post.d.ts +16 -0
- package/dist/components/post/post.stories.d.ts +35 -0
- package/dist/components/radio/base-radio.d.ts +5 -2
- package/dist/components/radio/radio-type.d.ts +11 -3
- package/dist/components/radio/radio.stories.d.ts +20 -2
- package/dist/components/rating/base-rating.d.ts +11 -0
- package/dist/components/rating/rating-props.d.ts +11 -0
- package/dist/components/rating/rating-type.d.ts +46 -0
- package/dist/components/rating/rating.d.ts +4 -0
- package/dist/components/rating/rating.stories.d.ts +35 -0
- package/dist/components/search-field/base-search-field.d.ts +4 -0
- package/dist/components/search-field/search-field-props.d.ts +2 -0
- package/dist/components/search-field/search-field-type.d.ts +25 -0
- package/dist/components/search-field/search-field.d.ts +8 -0
- package/dist/components/search-field/search-field.stories.d.ts +39 -0
- package/dist/components/segmented-control/base-segmented-control.d.ts +8 -0
- package/dist/components/segmented-control/segmented-control-props.d.ts +5 -0
- package/dist/components/segmented-control/segmented-control-type.d.ts +31 -0
- package/dist/components/segmented-control/segmented-control.d.ts +4 -0
- package/dist/components/segmented-control/segmented-control.stories.d.ts +39 -0
- package/dist/components/skeleton/base-skeleton.d.ts +7 -3
- package/dist/components/skeleton/skeleton-group-props.d.ts +4 -0
- package/dist/components/skeleton/skeleton-group-type.d.ts +47 -0
- package/dist/components/skeleton/skeleton-group.d.ts +4 -0
- package/dist/components/skeleton/skeleton-group.stories.d.ts +57 -0
- package/dist/components/skeleton/skeleton-type.d.ts +1 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +18 -7
- package/dist/components/slider/base-slider.d.ts +13 -0
- package/dist/components/slider/slider-props.d.ts +10 -0
- package/dist/components/slider/slider-type.d.ts +46 -0
- package/dist/components/slider/slider.d.ts +4 -0
- package/dist/components/slider/slider.stories.d.ts +38 -0
- package/dist/components/split-text-field/base-split-text-field.d.ts +4 -0
- package/dist/components/split-text-field/split-text-field-props.d.ts +23 -0
- package/dist/components/split-text-field/split-text-field-type.d.ts +46 -0
- package/dist/components/split-text-field/split-text-field.d.ts +7 -0
- package/dist/components/split-text-field/split-text-field.stories.d.ts +38 -0
- package/dist/components/step-progress/step-progress-props.d.ts +10 -0
- package/dist/components/step-progress/step-progress-type.d.ts +22 -3
- package/dist/components/step-progress/step-progress.d.ts +1 -1
- package/dist/components/step-progress/step-progress.stories.d.ts +40 -0
- package/dist/components/switch/base-switch.d.ts +2 -4
- package/dist/components/switch/switch-type.d.ts +5 -2
- package/dist/components/switch/switch.stories.d.ts +22 -0
- package/dist/components/table/table-type.d.ts +2 -1
- package/dist/components/table/table.stories.d.ts +23 -0
- package/dist/components/table-row/base-table-row.d.ts +4 -0
- package/dist/components/table-row/table-row-props.d.ts +14 -0
- package/dist/components/table-row/table-row-type.d.ts +13 -0
- package/dist/components/table-row/table-row.d.ts +5 -0
- package/dist/components/table-row/table-row.stories.d.ts +24 -0
- package/dist/components/tabs/tabs-type.d.ts +4 -1
- package/dist/components/tabs/tabs.stories.d.ts +17 -0
- package/dist/components/tag/tag-type.d.ts +2 -1
- package/dist/components/tag/tag.stories.d.ts +9 -0
- package/dist/components/text-area/base-text-area.d.ts +2 -1
- package/dist/components/text-area/text-area-type.d.ts +11 -3
- package/dist/components/text-area/text-area.stories.d.ts +15 -0
- package/dist/components/text-button/base-text-button.d.ts +3 -0
- package/dist/components/text-button/text-button-props.d.ts +19 -0
- package/dist/components/text-button/text-button-type.d.ts +17 -0
- package/dist/components/text-button/text-button.d.ts +5 -0
- package/dist/components/text-button/text-button.stories.d.ts +47 -0
- package/dist/components/text-field/base-text-field.d.ts +12 -6
- package/dist/components/text-field/text-field-type.d.ts +39 -7
- package/dist/components/text-field/text-field.stories.d.ts +32 -5
- package/dist/components/toast/toast-type.d.ts +4 -1
- package/dist/components/toast/toast.stories.d.ts +22 -7
- package/dist/components/tooltip/tooltip-type.d.ts +4 -1
- package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
- package/dist/components/top/base-top.d.ts +4 -0
- package/dist/components/top/top-props.d.ts +12 -0
- package/dist/components/top/top-type.d.ts +20 -0
- package/dist/components/top/top.d.ts +5 -0
- package/dist/components/top/top.stories.d.ts +320 -0
- package/dist/components.css +4192 -860
- package/dist/cta-button.js +96 -33
- package/dist/data-table.js +5 -3
- package/dist/drawer.js +90 -119
- package/dist/drop-down.js +19 -11
- package/dist/empty-state.js +16 -7
- package/dist/full-secure-keypad.js +524 -0
- package/dist/grid-list.js +378 -0
- package/dist/helpers/hooks/useCloseOnBackEvent.d.ts +12 -0
- package/dist/helpers/hooks/useFieldClear.d.ts +21 -0
- package/dist/helpers/hooks/useIndicatorPosition.d.ts +7 -0
- package/dist/helpers/hooks/useKeyboardInset.d.ts +5 -0
- package/dist/helpers/hooks/useReturnFocus.d.ts +9 -0
- package/dist/helpers/hooks/useScrollStart.d.ts +9 -0
- package/dist/helpers/motion/appear.d.ts +3 -0
- package/dist/helpers/motion/effects.d.ts +9 -0
- package/dist/helpers/motion/motion-props.d.ts +35 -0
- package/dist/helpers/motion/stagger.d.ts +3 -0
- package/dist/helpers/motion/use-appear.d.ts +12 -0
- package/dist/helpers/motion/use-attention-handle.d.ts +7 -0
- package/dist/helpers/motion/use-confirm-spring.d.ts +7 -0
- package/dist/helpers/motion/use-effect-trigger.d.ts +11 -0
- package/dist/helpers/motion/use-hide-on-scroll.d.ts +12 -0
- package/dist/helpers/motion/use-presence-callbacks.d.ts +13 -0
- package/dist/helpers/motion/use-reveal-children.d.ts +6 -0
- package/dist/helpers/types/propsDef.d.ts +4 -2
- package/dist/highlight.js +492 -0
- package/dist/icon-button.js +55 -96
- package/dist/icon-text-badge.js +29 -17
- package/dist/icon-text-option-badge.js +21 -13
- package/dist/index.d.ts +60 -5
- package/dist/index.js +15039 -5437
- package/dist/list-footer.js +339 -0
- package/dist/list-group.js +61 -18
- package/dist/list-header.js +293 -0
- package/dist/list-row.js +246 -26
- package/dist/loading.js +203 -40
- package/dist/media-thumbnail.js +11 -7
- package/dist/menu.js +527 -0
- package/dist/message-composer.js +15 -11
- package/dist/modal-with-double-button.js +76 -54
- package/dist/modal.js +97 -29
- package/dist/notice.js +19 -11
- package/dist/number-keypad.js +436 -0
- package/dist/numeric-spinner.js +396 -0
- package/dist/option-badge.js +29 -17
- package/dist/overlay.js +1747 -0
- package/dist/pagination.js +13 -9
- package/dist/paragraph.js +286 -0
- package/dist/post.js +568 -0
- package/dist/radio.js +119 -21
- package/dist/rating.js +437 -0
- package/dist/scripts/usage-doc.d.mts +83 -0
- package/dist/search-field.js +516 -0
- package/dist/segmented-control.js +409 -0
- package/dist/skeleton-group.js +322 -0
- package/dist/skeleton.js +26 -112
- package/dist/slider.js +419 -0
- package/dist/split-text-field.js +498 -0
- package/dist/step-progress.js +125 -16
- package/dist/styles.css +4063 -838
- package/dist/switch.js +91 -17
- package/dist/table-row.js +284 -0
- package/dist/tabs.js +62 -64
- package/dist/tag.js +4 -2
- package/dist/text-area.js +83 -31
- package/dist/text-button.js +357 -0
- package/dist/text-field.js +126 -156
- package/dist/text.js +5 -7
- package/dist/toast.js +100 -241
- package/dist/tokens/generated/motion.d.ts +21 -4
- package/dist/tokens/generated/semantic-admin.d.ts +103 -46
- package/dist/tokens/generated/semantic-app.d.ts +164 -16
- package/dist/tokens.css +636 -105
- package/dist/tokens.js +293 -71
- package/dist/tooltip.js +50 -22
- package/dist/top.js +312 -0
- package/package.json +120 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ComponentType, MouseEventHandler, ReactNode } from 'react';
|
|
2
|
+
import { AppearProps, HideOnScrollProps, PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { IconName } from '../icon/icon-type';
|
|
4
5
|
import { TrackProps } from '../logging/logging-type';
|
|
@@ -25,7 +26,7 @@ export interface BottomNavLinkProps {
|
|
|
25
26
|
/** `track` 을 주면 누를 때 로그를 보낸다. 직접 만든 `linkComponent` 는 이 값을 `<a>` 에 넘긴다 */
|
|
26
27
|
onClick?: MouseEventHandler<HTMLAnchorElement>;
|
|
27
28
|
}
|
|
28
|
-
export interface BottomNavProps extends StyleProps, TrackProps {
|
|
29
|
+
export interface BottomNavProps extends StyleProps, TrackProps, PressEffectProps, AppearProps, HideOnScrollProps {
|
|
29
30
|
items: BottomNavItem[];
|
|
30
31
|
/** 지금 화면의 탭 id. 주소에서 정하므로 탭 바가 스스로 바꾸지 않는다 */
|
|
31
32
|
value?: string;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { BottomNavLinkProps } from './bottom-nav-type';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
5
|
component: import("react").ForwardRefExoticComponent<import("./bottom-nav-type").BottomNavProps & import("react").RefAttributes<HTMLElement>>;
|
|
5
6
|
parameters: {
|
|
6
7
|
layout: string;
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
7
13
|
};
|
|
8
14
|
args: {
|
|
9
15
|
label: string;
|
|
10
16
|
value: string;
|
|
11
|
-
linkComponent: (props:
|
|
17
|
+
linkComponent: (props: BottomNavLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
18
|
items: ({
|
|
13
19
|
id: string;
|
|
14
20
|
label: string;
|
|
@@ -52,4 +58,13 @@ declare const meta: {
|
|
|
52
58
|
};
|
|
53
59
|
export default meta;
|
|
54
60
|
type Story = StoryObj<typeof meta>;
|
|
61
|
+
/** 화면 아래에 붙은 하단 내비게이션이다. 현재 탭 표시와 홈·내 정보 탭에 붙은 배지를 본다. */
|
|
55
62
|
export declare const Default: Story;
|
|
63
|
+
/** 탭을 누르고 있으면 살짝 작아진다. 탭을 바꾸면 선택 캡슐이 옛 자리에서 새 자리로 옮겨 간다(indicate) */
|
|
64
|
+
export declare const MotionPress: Story;
|
|
65
|
+
/** pressEffect 를 끈 하단 내비게이션이다. 탭을 눌러 눌림 효과가 없는지 Default 와 비교한다. */
|
|
66
|
+
export declare const MotionPressOff: Story;
|
|
67
|
+
/** 아래로 스크롤하면 숨고 위로 스크롤하면 돌아온다 */
|
|
68
|
+
export declare const MotionHideOnScroll: Story;
|
|
69
|
+
/** 하단 내비게이션이 0.4초 뒤 slide 효과로 나타난다. 다시 재생 버튼으로 등장을 반복해 본다. */
|
|
70
|
+
export declare const MotionAppear: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { BottomSheetContentProps, BottomSheetPanelProps, BottomSheetRootProps } from './bottom-sheet-type';
|
|
3
|
+
declare const BottomSheetRoot: {
|
|
4
|
+
(props: PropsWithChildren<BottomSheetRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("../drawer/drawer-type").DrawerTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Content: import("react").ForwardRefExoticComponent<Omit<BottomSheetContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Panel: import("react").ForwardRefExoticComponent<Omit<BottomSheetPanelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Handle: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
12
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Title: import("react").ForwardRefExoticComponent<Omit<import("../drawer/drawer-type").DrawerTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
Description: import("react").ForwardRefExoticComponent<Omit<import("../drawer/drawer-type").DrawerDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
15
|
+
Close: import("react").ForwardRefExoticComponent<Omit<import("../drawer/drawer-type").DrawerCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
};
|
|
17
|
+
export default BottomSheetRoot;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const motionStrengths: readonly ["weak", "strong"];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** 시트가 멈추는 높이. `'40%'` 는 시트 최대 높이(`--sheet-max-height`)의 비율, `'320px'` 는 그 높이다 */
|
|
2
|
+
export type SnapPoint = `${number}%` | `${number}px`;
|
|
3
|
+
/** 패널 height 에 넣을 CSS 값. JS 측정 없이 그려져야 첫 프레임과 MotionProvider 없는 앱에서도 높이가 맞다 */
|
|
4
|
+
export declare const snapPointToCss: (point: SnapPoint) => string;
|
|
5
|
+
export declare const snapPointToPx: (point: SnapPoint, maxHeight: number) => number;
|
|
6
|
+
/**
|
|
7
|
+
* 손을 뗀 뒤 갈 곳. `current` 는 지금 snap 의 index, `offsetY` 는 끈 거리(아래가 +), `velocityY` 는 놓을 때 속도(px/s),
|
|
8
|
+
* `snapHeights` 는 snap 마다의 높이(px, 작은 것부터). 높이 0(닫힘)과 각 snap 중 끈 뒤의 높이에 가장 가까운 곳으로 간다.
|
|
9
|
+
*/
|
|
10
|
+
export declare const resolveSnap: (current: number, offsetY: number, velocityY: number, snapHeights: readonly number[]) => number | "close";
|
|
11
|
+
/** 끌 수 있는 범위(translateY px). 위로는 가장 큰 snap 까지, 아래로는 닫힘(dismissible 이 아니면 가장 작은 snap)까지 */
|
|
12
|
+
export declare const dragBounds: (current: number, snapHeights: readonly number[], dismissible: boolean) => {
|
|
13
|
+
top: number;
|
|
14
|
+
bottom: number;
|
|
15
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import type { HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import { EnterMotionProps, PresenceCallbackProps, PressEffectProps } from '../../helpers/motion/motion-props';
|
|
4
|
+
import { StyleProps } from '../../helpers/types/common-props';
|
|
5
|
+
import { DrawerContentProps, DrawerRootProps } from '../drawer/drawer-type';
|
|
6
|
+
import { TrackProps } from '../logging/logging-type';
|
|
7
|
+
import { SnapPoint } from './bottom-sheet-snap';
|
|
8
|
+
export type { SnapPoint } from './bottom-sheet-snap';
|
|
9
|
+
export interface BottomSheetRootProps extends DrawerRootProps {
|
|
10
|
+
/** false 면 바탕을 그리지 않고 바깥을 조작할 수 있다. Radix `Dialog.Root` 의 modal */
|
|
11
|
+
modal?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/** DrawerContent 가 Radix `Dialog.Content` 에 그대로 넘기는 것 중 Drawer 가 타입에 적지 않은 셋 */
|
|
14
|
+
export interface BottomSheetContentProps extends DrawerContentProps {
|
|
15
|
+
/** 바깥 누름·바깥 포커스로 닫히기 직전. `preventDefault()` 하면 열린 채로 남는다 */
|
|
16
|
+
onInteractOutside?: (event: Event) => void;
|
|
17
|
+
onOpenAutoFocus?: (event: Event) => void;
|
|
18
|
+
onCloseAutoFocus?: (event: Event) => void;
|
|
19
|
+
}
|
|
20
|
+
/** 끌리는 시트 판. motion 의 drag props 를 받는다 */
|
|
21
|
+
export type BottomSheetPanelProps = HTMLMotionProps<'div'>;
|
|
22
|
+
export type BottomSheetHandleProps = ComponentPropsWithRef<'div'>;
|
|
23
|
+
export interface BottomSheetProps extends DrawerRootProps, StyleProps, TrackProps, EnterMotionProps, PresenceCallbackProps, PressEffectProps {
|
|
24
|
+
/** asChild 로 감싸 클릭하면 열리는 요소. 없으면 open·defaultOpen 으로만 연다 */
|
|
25
|
+
trigger?: ReactElement;
|
|
26
|
+
title: ReactNode;
|
|
27
|
+
description?: ReactNode;
|
|
28
|
+
children?: ReactNode;
|
|
29
|
+
footer?: ReactNode;
|
|
30
|
+
/** 위 가운데 손잡이. 기본 true */
|
|
31
|
+
showHandle?: boolean;
|
|
32
|
+
/** 멈추는 높이들, 작은 것부터. 없으면 내용 높이 하나 */
|
|
33
|
+
snapPoints?: SnapPoint[];
|
|
34
|
+
/** 열릴 때의 snap index. 기본 0 */
|
|
35
|
+
defaultSnap?: number;
|
|
36
|
+
onSnapChange?: (index: number) => void;
|
|
37
|
+
/** 내용을 위로 스크롤하면 다음 snap 으로 커진다 */
|
|
38
|
+
expandOnScroll?: boolean;
|
|
39
|
+
/** 마지막 snap 에 닿으면 부른다 */
|
|
40
|
+
onExpanded?: () => void;
|
|
41
|
+
/** false 면 바탕이 없고 바깥을 조작할 수 있으며 바깥 누름·아래로 끌기로 닫히지 않는다. 기본 true */
|
|
42
|
+
dismissible?: boolean;
|
|
43
|
+
/** 화면 키보드가 올라오면 시트를 그 위로 올린다 */
|
|
44
|
+
hasTextField?: boolean;
|
|
45
|
+
/** false 면 바깥을 눌러도 닫히지 않고 시트가 좌우로 흔들린다. 기본 true */
|
|
46
|
+
closeOnOverlayClick?: boolean;
|
|
47
|
+
/** false 면 Esc 로 닫히지 않는다. 기본 true */
|
|
48
|
+
closeOnEscape?: boolean;
|
|
49
|
+
/** 열린 동안 history 항목을 하나 쌓아 뒤로 가기가 시트를 닫는다. 기본 true */
|
|
50
|
+
closeOnBackEvent?: boolean;
|
|
51
|
+
onHandleDragStart?: () => void;
|
|
52
|
+
onHandleDragEnd?: () => void;
|
|
53
|
+
/** 시트를 그릴 요소. 없으면 document.body */
|
|
54
|
+
portalContainer?: HTMLElement;
|
|
55
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BottomSheetProps } from './bottom-sheet-type';
|
|
2
|
+
declare const BottomSheet: import("react").ForwardRefExoticComponent<BottomSheetProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default BottomSheet;
|
|
4
|
+
export type { BottomSheetProps } from './bottom-sheet-type';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
component: import("react").ForwardRefExoticComponent<import("./bottom-sheet-type").BottomSheetProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
motion: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select";
|
|
16
|
+
};
|
|
17
|
+
options: readonly ["weak", "strong"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
title: string;
|
|
22
|
+
children: string;
|
|
23
|
+
trigger: import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
/** 열기 버튼을 누르면 내용 높이만큼 올라온다. 손잡이를 아래로 끌면 닫힌다. */
|
|
29
|
+
export declare const Default: Story;
|
|
30
|
+
/** 설명과 아래 버튼 줄을 단 시트다. */
|
|
31
|
+
export declare const WithDescriptionAndFooter: Story;
|
|
32
|
+
/** 40%·100% 두 높이에 멈춘다. 손잡이를 위로 끌면 커지고, 빠르게 튕기면 한 칸씩 옮긴다. */
|
|
33
|
+
export declare const SnapPoints: Story;
|
|
34
|
+
/** 본문을 위로 스크롤하면 다음 높이로 커진다. 마지막 높이에 닿으면 onExpanded 가 불린다. */
|
|
35
|
+
export declare const ExpandOnScroll: Story;
|
|
36
|
+
/** 바탕이 없고 바깥을 계속 누를 수 있다. 아래로 끌어도 가장 작은 높이에서 멈추고 닫히지 않는다. */
|
|
37
|
+
export declare const NotDismissible: Story;
|
|
38
|
+
/** 입력 상자에 포커스하면 화면 키보드 위로 시트가 올라간다(휴대폰에서 본다). */
|
|
39
|
+
export declare const WithTextField: Story;
|
|
40
|
+
/** 바깥 버튼으로 열고 닫는다. 시트 안에서 닫아도 버튼 문구가 열기로 돌아오는지 본다. */
|
|
41
|
+
export declare const Controlled: Story;
|
|
42
|
+
/** 같은 시트의 weak·strong 을 나란히 열어 본다. strong 은 스프링이라 끝에서 한 번 튄다. 퇴장은 둘이 같다. */
|
|
43
|
+
export declare const MotionStrength: Story;
|
|
44
|
+
/** 바탕을 눌러도 닫히지 않고 시트가 좌우로 흔들린다. 닫기는 버튼이나 아래로 끌기로 한다. */
|
|
45
|
+
export declare const MotionCloseOnOverlayClick: Story;
|
|
46
|
+
/** 열고 닫으면 애니메이션이 끝난 뒤 onEntered·onExited 가, 손잡이를 끌면 onHandleDragStart·End 가 불린다. */
|
|
47
|
+
export declare const MotionEnterExit: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ElementType, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
import { sizes } from './breadcrumb-props';
|
|
@@ -18,7 +19,7 @@ export interface BreadcrumbItem {
|
|
|
18
19
|
/** 없으면 링크가 아닌 글자로 그린다. 마지막 항목은 href 가 있어도 현재 위치로 그린다. */
|
|
19
20
|
href?: string;
|
|
20
21
|
}
|
|
21
|
-
export interface BreadcrumbProps extends StyleProps, TrackProps {
|
|
22
|
+
export interface BreadcrumbProps extends StyleProps, TrackProps, PressEffectProps {
|
|
22
23
|
items: BreadcrumbItem[];
|
|
23
24
|
size?: (typeof sizes)[number];
|
|
24
25
|
/** 마지막(현재 위치) 항목이 아닌 항목을 클릭하면 그 id 로 불린다. */
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { BreadcrumbItem } from './breadcrumb-type';
|
|
3
3
|
declare const meta: {
|
|
4
4
|
title: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
component: import("react").ForwardRefExoticComponent<import("./breadcrumb-type").BreadcrumbProps & import("react").RefAttributes<HTMLElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
size: {
|
|
@@ -17,9 +24,17 @@ declare const meta: {
|
|
|
17
24
|
};
|
|
18
25
|
export default meta;
|
|
19
26
|
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/** 홈 › 목록 › 상세 경로다. 링크인 앞 항목과 현재 페이지인 마지막 항목이 구분되는지 본다. */
|
|
20
28
|
export declare const Default: Story;
|
|
29
|
+
/** 크기별 경로 표시다. 글자 크기와 구분자 간격 차이를 본다. */
|
|
21
30
|
export declare const Sizes: Story;
|
|
31
|
+
/** 구분자를 `/` 로 바꾼 경로 표시다. */
|
|
22
32
|
export declare const CustomSeparator: Story;
|
|
33
|
+
/** 가운데 그룹 항목에 링크가 없다. 링크 없는 항목이 링크 항목과 다르게 보이는지 본다. */
|
|
23
34
|
export declare const WithoutHref: Story;
|
|
35
|
+
/** 홈 하나뿐인 경로 표시다. 구분자 없이 항목 하나만 보이는지 본다. */
|
|
24
36
|
export declare const Single: Story;
|
|
37
|
+
/** 항목 이름이 아주 긴 경로 표시다. 폭이 모자랄 때 항목이 줄바꿈되거나 잘리는 모습을 본다. */
|
|
25
38
|
export declare const LongLabels: Story;
|
|
39
|
+
/** 링크 항목을 누르고 있으면 줄어든다. 글자 항목과 현재 위치는 그대로다. 아래는 pressEffect={false} */
|
|
40
|
+
export declare const MotionPress: Story;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Color, LegacyVariant, Variant } from './button-type';
|
|
2
|
+
export interface Appearance {
|
|
3
|
+
color: Color;
|
|
4
|
+
variant: Variant;
|
|
5
|
+
}
|
|
6
|
+
/** ADR 0011 의 대응표. 다음 메이저에서 LegacyVariant 와 함께 지운다 */
|
|
7
|
+
export declare const LEGACY_VARIANT: {
|
|
8
|
+
readonly primary: {
|
|
9
|
+
readonly color: "primary";
|
|
10
|
+
readonly variant: "fill";
|
|
11
|
+
};
|
|
12
|
+
readonly secondary: {
|
|
13
|
+
readonly color: "primary";
|
|
14
|
+
readonly variant: "weak";
|
|
15
|
+
};
|
|
16
|
+
readonly ghost: {
|
|
17
|
+
readonly color: "primary";
|
|
18
|
+
readonly variant: "outline";
|
|
19
|
+
};
|
|
20
|
+
readonly neutral: {
|
|
21
|
+
readonly color: "primary";
|
|
22
|
+
readonly variant: "ghost";
|
|
23
|
+
};
|
|
24
|
+
readonly confirm: {
|
|
25
|
+
readonly color: "danger";
|
|
26
|
+
readonly variant: "fill";
|
|
27
|
+
};
|
|
28
|
+
readonly outlined: {
|
|
29
|
+
readonly color: "danger";
|
|
30
|
+
readonly variant: "outline";
|
|
31
|
+
};
|
|
32
|
+
readonly social: {
|
|
33
|
+
readonly color: "neutral";
|
|
34
|
+
readonly variant: "outline";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
interface AppearanceProps {
|
|
38
|
+
color?: Color;
|
|
39
|
+
variant?: Variant | LegacyVariant;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* 옛 값으로 읽어야 하는 variant. `ghost` 는 옛 값(선 버튼)이자 새 값(바탕 없음)이라
|
|
43
|
+
* `color` 를 같이 준 쪽만 새 뜻이다. 옛 코드는 `color` 를 모른다.
|
|
44
|
+
*/
|
|
45
|
+
export declare const legacyVariantOf: ({ color, variant }: AppearanceProps) => LegacyVariant | undefined;
|
|
46
|
+
/** 넘겨받은 `color`·`variant` 를 새 두 축 한 쌍으로 정한다. 옛 값은 표로 옮기고, 같이 준 `color` 가 표보다 앞선다 */
|
|
47
|
+
export declare const resolveAppearance: (props: AppearanceProps) => Appearance;
|
|
48
|
+
/** 개발 빌드에서 옛 값마다 한 번 옮길 곳을 알린다 */
|
|
49
|
+
export declare const warnLegacyVariant: (legacy: LegacyVariant) => void;
|
|
50
|
+
export {};
|
|
@@ -1,11 +1,20 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const colors: readonly ["primary", "neutral", "danger"];
|
|
2
|
+
export declare const variants: readonly ["fill", "weak", "outline", "ghost"];
|
|
3
|
+
/** ADR 0011 이전의 variant. `button-appearance.ts` 의 LEGACY_VARIANT 가 새 두 축으로 옮긴다. 다음 메이저에서 지운다 */
|
|
4
|
+
export declare const legacyVariants: readonly ["primary", "secondary", "ghost", "neutral", "confirm", "outlined", "social"];
|
|
2
5
|
export declare const sizes: readonly ["xs", "s", "m", "l", "xl"];
|
|
3
6
|
export declare const ctaButtonProps: {
|
|
4
|
-
|
|
7
|
+
color: {
|
|
5
8
|
type: "className";
|
|
6
9
|
className: string;
|
|
7
|
-
values: readonly ["primary", "
|
|
10
|
+
values: readonly ["primary", "neutral", "danger"];
|
|
8
11
|
default: "primary";
|
|
9
12
|
};
|
|
13
|
+
variant: {
|
|
14
|
+
type: "className";
|
|
15
|
+
className: string;
|
|
16
|
+
values: readonly ["fill", "weak", "outline", "ghost"];
|
|
17
|
+
default: "fill";
|
|
18
|
+
};
|
|
10
19
|
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
11
20
|
};
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { AppearProps, PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
|
-
import { sizes,
|
|
5
|
+
import { colors, legacyVariants, sizes, variants } from './button-props';
|
|
6
|
+
export type Color = (typeof colors)[number];
|
|
7
|
+
export type Variant = (typeof variants)[number];
|
|
8
|
+
/** @deprecated ADR 0011 이전의 variant. `color` × `variant` 로 옮긴다(usage.md 의 대응표). 다음 메이저에서 지운다 */
|
|
9
|
+
export type LegacyVariant = (typeof legacyVariants)[number];
|
|
5
10
|
export interface CommonButtonProps {
|
|
11
|
+
/** 글자 자리(너비)를 지킨 채 가리고 가운데에 로딩 표시를 띄운다. aria-busy 가 붙고 클릭은 무시한다 */
|
|
6
12
|
loading?: boolean;
|
|
7
13
|
}
|
|
8
14
|
export interface BaseButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps, AsChildProps {
|
|
9
15
|
children?: ReactNode;
|
|
16
|
+
/** 주면 children 을 너비를 지키는 칸에 넣고, loading 동안 이것을 그 위에 띄운다 */
|
|
10
17
|
loadingComponent?: ReactNode;
|
|
11
18
|
}
|
|
12
|
-
export interface CTAButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps, AsChildProps, TrackProps {
|
|
13
|
-
|
|
19
|
+
export interface CTAButtonProps extends ComponentPropsWithRef<'button'>, CommonButtonProps, AsChildProps, TrackProps, PressEffectProps, AppearProps {
|
|
20
|
+
/** 무슨 색. 역할 이름이고 토큰 이름이 아니다. 기본 `primary` */
|
|
21
|
+
color?: Color;
|
|
22
|
+
/** 얼마나 세게. 기본 `fill`. 옛 일곱 값은 한 마이너 동안 받는다. `color` 없는 `ghost` 는 옛 뜻(`primary · outline`)이다 */
|
|
23
|
+
variant?: Variant | LegacyVariant;
|
|
14
24
|
size?: (typeof sizes)[number];
|
|
15
25
|
text: string | ReactNode;
|
|
16
26
|
leftIcon?: ReactNode;
|
|
17
27
|
rightIcon?: ReactNode;
|
|
18
|
-
/** 버튼 오른쪽 위 모서리에 끼우는 말풍선(Callout) 글자. 글자는 움직이지 않는다. 로딩 중에는
|
|
28
|
+
/** 버튼 오른쪽 위 모서리에 끼우는 말풍선(Callout) 글자. 글자는 움직이지 않는다. 로딩 중에는 점(LoadingDots)과 바뀌어 숨는다 */
|
|
19
29
|
callout?: ReactNode;
|
|
20
30
|
/** 링크 요소 하나(`<a>`·라우터 Link)를 children 으로 주면 그 요소가 버튼 모양이 된다. 버튼 글자·아이콘은 그 안에 들어간다. loading 은 쓰지 않는다 */
|
|
21
31
|
children?: ReactNode;
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
component: import("react").ForwardRefExoticComponent<Omit<import("./button-type").CTAButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
12
|
argTypes: {
|
|
13
|
+
color: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select";
|
|
16
|
+
};
|
|
17
|
+
options: readonly ["primary", "neutral", "danger"];
|
|
18
|
+
};
|
|
6
19
|
variant: {
|
|
7
20
|
control: {
|
|
8
21
|
type: "select";
|
|
9
22
|
};
|
|
10
|
-
options: readonly ["
|
|
23
|
+
options: readonly ["fill", "weak", "outline", "ghost"];
|
|
11
24
|
};
|
|
12
25
|
size: {
|
|
13
26
|
control: {
|
|
@@ -18,16 +31,34 @@ declare const meta: {
|
|
|
18
31
|
};
|
|
19
32
|
args: {
|
|
20
33
|
text: string;
|
|
21
|
-
|
|
34
|
+
color: "primary";
|
|
35
|
+
variant: "fill";
|
|
22
36
|
size: "l";
|
|
23
37
|
};
|
|
24
38
|
};
|
|
25
39
|
export default meta;
|
|
26
40
|
type Story = StoryObj<typeof meta>;
|
|
41
|
+
/** 기본 CTAButton 이다. 컨트롤에서 props 를 바꿔 본다. */
|
|
27
42
|
export declare const Default: Story;
|
|
28
|
-
|
|
43
|
+
/** color 줄마다 variant 넷을 늘어놓았다. 칸마다 위에서부터 기본·disabled·loading 이다. 호버는 마우스를 올려 본다. */
|
|
44
|
+
export declare const Matrix: Story;
|
|
45
|
+
/** ADR 0011 이전의 variant 일곱이다. 각각 라벨의 새 조합과 같은 모양이어야 한다. 개발 빌드에서는 값마다 한 번 콘솔 경고가 뜬다. 다음 메이저에서 지운다. */
|
|
46
|
+
export declare const Legacy: Story;
|
|
47
|
+
/** 크기별 버튼을 한 줄로 늘어놓았다. 높이와 글자 크기 차이를 본다. */
|
|
29
48
|
export declare const Sizes: Story;
|
|
49
|
+
/** loading 상태 버튼이다. 글자 자리에 점 세 개가 뜨는지 본다. */
|
|
30
50
|
export declare const Loading: Story;
|
|
51
|
+
/** disabled 버튼이다. 흐려진 모습을 본다. 눌렀을 때 흔들림은 MotionDisabledShake 에서 본다. */
|
|
31
52
|
export declare const Disabled: Story;
|
|
53
|
+
/** 왼쪽에 체크, 오른쪽에 아래 화살표 아이콘을 단 버튼이다. 아이콘과 글자 사이 간격을 본다. */
|
|
32
54
|
export declare const WithIcons: Story;
|
|
55
|
+
/** 다른 화면으로 옮겨 가는 버튼이다. 넘긴 링크 요소가 버튼 모양이 된다. */
|
|
33
56
|
export declare const AsLink: Story;
|
|
57
|
+
/** pressEffect 를 켠 버튼과 끈 버튼이다. 각각 누르고 있을 때 눌림 효과 차이를 비교한다. */
|
|
58
|
+
export declare const MotionPress: Story;
|
|
59
|
+
/** 왼쪽 버튼만 loading 이다. 아래 버튼으로 loading 을 껐다 켜며 두 버튼의 폭이 같게 유지되는지 본다. */
|
|
60
|
+
export declare const MotionLoadingKeepsWidth: Story;
|
|
61
|
+
/** fade·scale·slide 등장 효과를 단 버튼 세 개다. 다시 재생 버튼으로 0.4초 뒤 나타나는 모습을 반복해 본다. */
|
|
62
|
+
export declare const MotionAppear: Story;
|
|
63
|
+
/** disabled 버튼이다. 눌러서 옆으로 짧게 흔들리는지 본다. Firefox 에서는 흔들리지 않을 수 있다. */
|
|
64
|
+
export declare const MotionDisabledShake: Story;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CTAButtonProps } from './button-type';
|
|
2
2
|
declare const CTAButton: import("react").ForwardRefExoticComponent<Omit<CTAButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export default CTAButton;
|
|
4
|
-
export type { CTAButtonProps } from './button-type';
|
|
4
|
+
export type { CTAButtonProps, Color as CTAButtonColor, Variant as CTAButtonVariant, } from './button-type';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
component: import("react").ForwardRefExoticComponent<Omit<import("./callout-type").CalloutProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
tail: {
|
|
@@ -16,7 +23,11 @@ declare const meta: {
|
|
|
16
23
|
};
|
|
17
24
|
export default meta;
|
|
18
25
|
type Story = StoryObj<typeof meta>;
|
|
26
|
+
/** 최근 사용 문구를 담은 기본 말풍선이다. */
|
|
19
27
|
export declare const Default: Story;
|
|
28
|
+
/** 꼬리 방향별 말풍선이다. 꼬리가 가리키는 쪽과 위치를 본다. */
|
|
20
29
|
export declare const Tails: Story;
|
|
21
30
|
/** CTAButton 의 callout prop — 버튼 오른쪽 위 모서리에 끼운다 */
|
|
22
31
|
export declare const OnButton: Story;
|
|
32
|
+
/** 나타날 때 꼬리에서 pop(enter strong) 한 뒤 세 번 둥실(attention float)하고 멈춘다. 버튼으로 다시 마운트한다 */
|
|
33
|
+
export declare const MotionEnter: Story;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { variant } from './card-props';
|
|
4
5
|
export interface BaseCardProps extends ComponentPropsWithRef<'div'>, AsChildProps {
|
|
5
6
|
}
|
|
6
|
-
export interface CardProps extends ComponentPropsWithRef<'div'>, AsChildProps {
|
|
7
|
+
export interface CardProps extends ComponentPropsWithRef<'div'>, AsChildProps, PressEffectProps {
|
|
7
8
|
variant?: (typeof variant)[number];
|
|
8
9
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
4
11
|
component: import("react").ForwardRefExoticComponent<Omit<import("./card-type").CardProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
variant: {
|
|
@@ -22,3 +29,5 @@ export declare const Variants: Story;
|
|
|
22
29
|
export declare const Link: Story;
|
|
23
30
|
/** 버튼 카드 */
|
|
24
31
|
export declare const Button: Story;
|
|
32
|
+
/** 링크 카드를 누르고 있으면 줄어든다. 아래는 pressEffect={false} */
|
|
33
|
+
export declare const MotionPress: Story;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare const sizes: readonly ["s", "m", "l"];
|
|
2
|
+
/** filled 는 보라 네모에 흰 체크, outlined 는 네모 없이 체크만(꺼짐 회색·켜짐 보라) */
|
|
3
|
+
export declare const variant: readonly ["filled", "outlined"];
|
|
2
4
|
export declare const checkBoxIndicatorProps: {
|
|
3
5
|
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
6
|
+
variant: {
|
|
7
|
+
type: "className";
|
|
8
|
+
className: string;
|
|
9
|
+
values: readonly ["filled", "outlined"];
|
|
10
|
+
default: "filled";
|
|
11
|
+
};
|
|
4
12
|
};
|
|
@@ -1,24 +1,31 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ConfirmMotionProps, PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
|
-
import { sizes } from './check-box-props';
|
|
5
|
+
import { sizes, variant } from './check-box-props';
|
|
6
|
+
/** 체크박스는 세기를 고르지 않는다. 채움이 칸 안에서 퍼지므로 strong 의 넘침이 보이지 않는다 */
|
|
7
|
+
export type CheckBoxMotionProps = Pick<ConfirmMotionProps, 'delay'>;
|
|
5
8
|
export interface CheckBoxRootProps {
|
|
6
9
|
checked?: boolean;
|
|
7
10
|
onChange?: (checked: boolean) => void;
|
|
8
11
|
id: string;
|
|
9
12
|
disabled?: boolean;
|
|
10
13
|
className?: string;
|
|
14
|
+
/** 라벨 글이 체크박스 밖에 있을 때(Agreement) 그 글의 id 로 이름을 잇는다 */
|
|
15
|
+
'aria-labelledby'?: string;
|
|
16
|
+
'aria-label'?: string;
|
|
11
17
|
}
|
|
12
|
-
export interface CheckBoxIndicatorProps extends
|
|
18
|
+
export interface CheckBoxIndicatorProps extends CheckBoxMotionProps {
|
|
13
19
|
className?: string;
|
|
14
20
|
}
|
|
15
21
|
export interface CheckBoxLabelProps extends AsChildProps {
|
|
16
22
|
preventChangeOnClick?: boolean;
|
|
17
23
|
className?: string;
|
|
18
24
|
}
|
|
19
|
-
export interface CheckBoxProps extends CheckBoxRootProps, TrackProps {
|
|
25
|
+
export interface CheckBoxProps extends CheckBoxRootProps, TrackProps, PressEffectProps, CheckBoxMotionProps {
|
|
20
26
|
label: string | ReactNode;
|
|
21
27
|
size?: (typeof sizes)[number];
|
|
28
|
+
variant?: (typeof variant)[number];
|
|
22
29
|
className?: string;
|
|
23
30
|
onClick?: (checked: boolean) => void;
|
|
24
31
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import type { CheckBoxProps } from './check-box-type';
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<CheckBoxProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
5
13
|
argTypes: {
|
|
6
14
|
size: {
|
|
7
15
|
control: {
|
|
@@ -9,6 +17,12 @@ declare const meta: {
|
|
|
9
17
|
};
|
|
10
18
|
options: readonly ["s", "m", "l"];
|
|
11
19
|
};
|
|
20
|
+
variant: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "select";
|
|
23
|
+
};
|
|
24
|
+
options: readonly ["filled", "outlined"];
|
|
25
|
+
};
|
|
12
26
|
};
|
|
13
27
|
args: {
|
|
14
28
|
id: string;
|
|
@@ -17,8 +31,25 @@ declare const meta: {
|
|
|
17
31
|
};
|
|
18
32
|
export default meta;
|
|
19
33
|
type Story = StoryObj<typeof meta>;
|
|
34
|
+
/** 누를 때마다 체크가 바뀌는 기본 체크박스다. */
|
|
20
35
|
export declare const Default: Story;
|
|
36
|
+
/** 크기별 체크박스다. 상자와 라벨 크기 차이를 본다. */
|
|
21
37
|
export declare const Sizes: Story;
|
|
38
|
+
/** filled 는 보라 네모에 흰 체크, outlined 는 네모 없이 체크만. 둘 다 켜진 상태로 나란히 */
|
|
39
|
+
export declare const Variants: Story;
|
|
40
|
+
/** 체크된 상태로 고정된 체크박스다. */
|
|
22
41
|
export declare const Checked: Story;
|
|
42
|
+
/** disabled 체크박스를 체크 안 됨과 체크됨으로 나란히 그렸다. 두 상태 모두 흐려지는지 본다. */
|
|
23
43
|
export declare const Disabled: Story;
|
|
44
|
+
/** 라벨 없이 상자만 있는 체크박스다. */
|
|
24
45
|
export declare const WithoutLabel: Story;
|
|
46
|
+
/** 체크 칸을 누르고 있으면 줄어든다. 오른쪽은 pressEffect={false} */
|
|
47
|
+
export declare const MotionPress: Story;
|
|
48
|
+
/** 체크하면 보라 채움과 흰 체크가 짧게 떠오른다. 해제는 반대로 사라진다 */
|
|
49
|
+
export declare const MotionFill: Story;
|
|
50
|
+
/** 연타. 버튼은 70ms 마다 다섯 번 바꾼다. 전환이 중간에서 되돌아가도 깜빡이지 않아야 한다 */
|
|
51
|
+
export declare const MotionRapidToggle: Story;
|
|
52
|
+
/** delay 로 차례로 체크된다. 전체 동의를 누르면 아래 항목이 80ms 간격으로 따라온다 */
|
|
53
|
+
export declare const MotionDelay: Story;
|
|
54
|
+
/** disabled 를 누르면 흔들린다(pointerdown, Chromium) */
|
|
55
|
+
export declare const MotionDisabledShake: Story;
|
|
@@ -1 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/** 칩이 놓이는 바탕의 무게. filled 는 페이지 바탕 위, outlined 는 카드·시트 안, ghost 는 촘촘하거나 보조 필터 */
|
|
2
|
+
export declare const variant: readonly ["filled", "outlined", "ghost"];
|
|
3
|
+
/** s 는 페이지 바탕 위(36), xs 는 카드·시트 안(28) */
|
|
4
|
+
export declare const sizes: readonly ["xs", "s"];
|
|
5
|
+
export declare const chipGroupProps: {
|
|
6
|
+
variant: {
|
|
7
|
+
type: "className";
|
|
8
|
+
className: string;
|
|
9
|
+
values: readonly ["filled", "outlined", "ghost"];
|
|
10
|
+
default: "filled";
|
|
11
|
+
};
|
|
12
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s"]>;
|
|
13
|
+
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
5
|
+
import { sizes, variant } from './chip-group-props';
|
|
4
6
|
export interface ChipGroupItem {
|
|
5
7
|
id: string;
|
|
6
8
|
label: ReactNode;
|
|
@@ -8,13 +10,15 @@ export interface ChipGroupItem {
|
|
|
8
10
|
count?: number;
|
|
9
11
|
disabled?: boolean;
|
|
10
12
|
}
|
|
11
|
-
export interface ChipGroupProps extends StyleProps, TrackProps {
|
|
13
|
+
export interface ChipGroupProps extends StyleProps, TrackProps, PressEffectProps {
|
|
12
14
|
items: ChipGroupItem[];
|
|
13
15
|
value?: string;
|
|
14
16
|
defaultValue?: string;
|
|
15
17
|
onValueChange?: (id: string) => void;
|
|
16
18
|
/** 'aria-label' 로 붙는다 (예: '캠페인 종류') */
|
|
17
19
|
label: string;
|
|
20
|
+
variant?: (typeof variant)[number];
|
|
21
|
+
size?: (typeof sizes)[number];
|
|
18
22
|
}
|
|
19
23
|
export interface ChipGroupRootProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'dir'> {
|
|
20
24
|
value: string;
|