@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
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { motion, side } from './message-props';
|
|
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<Omit<import("./message-type").MessageProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
side: {
|
|
@@ -22,9 +29,13 @@ declare const meta: {
|
|
|
22
29
|
time: string;
|
|
23
30
|
};
|
|
24
31
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
25
|
-
|
|
32
|
+
slot?: string | undefined | undefined;
|
|
26
33
|
style?: import("react").CSSProperties | undefined;
|
|
27
|
-
|
|
34
|
+
time?: import("react").ReactNode;
|
|
35
|
+
title?: string | undefined | undefined;
|
|
36
|
+
key?: import("react").Key | null | undefined;
|
|
37
|
+
name?: import("react").ReactNode;
|
|
38
|
+
value?: string | number | readonly string[] | undefined;
|
|
28
39
|
defaultChecked?: boolean | undefined | undefined;
|
|
29
40
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
30
41
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -32,6 +43,7 @@ declare const meta: {
|
|
|
32
43
|
accessKey?: string | undefined | undefined;
|
|
33
44
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
34
45
|
autoFocus?: boolean | undefined | undefined;
|
|
46
|
+
className?: string | undefined | undefined;
|
|
35
47
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
36
48
|
contextMenu?: string | undefined | undefined;
|
|
37
49
|
dir?: string | undefined | undefined;
|
|
@@ -41,10 +53,8 @@ declare const meta: {
|
|
|
41
53
|
id?: string | undefined | undefined;
|
|
42
54
|
lang?: string | undefined | undefined;
|
|
43
55
|
nonce?: string | undefined | undefined;
|
|
44
|
-
slot?: string | undefined | undefined;
|
|
45
56
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
46
57
|
tabIndex?: number | undefined | undefined;
|
|
47
|
-
title?: string | undefined | undefined;
|
|
48
58
|
translate?: "yes" | "no" | undefined | undefined;
|
|
49
59
|
radioGroup?: string | undefined | undefined;
|
|
50
60
|
role?: import("react").AriaRole | undefined;
|
|
@@ -127,6 +137,7 @@ declare const meta: {
|
|
|
127
137
|
"aria-valuemin"?: number | undefined | undefined;
|
|
128
138
|
"aria-valuenow"?: number | undefined | undefined;
|
|
129
139
|
"aria-valuetext"?: string | undefined | undefined;
|
|
140
|
+
children?: import("react").ReactNode;
|
|
130
141
|
dangerouslySetInnerHTML?: {
|
|
131
142
|
__html: string | TrustedHTML;
|
|
132
143
|
} | undefined | undefined;
|
|
@@ -288,14 +299,10 @@ declare const meta: {
|
|
|
288
299
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLIElement> | undefined;
|
|
289
300
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
290
301
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
291
|
-
time?: import("react").ReactNode;
|
|
292
|
-
key?: import("react").Key | null | undefined;
|
|
293
|
-
name?: import("react").ReactNode;
|
|
294
|
-
value?: string | number | readonly string[] | undefined;
|
|
295
302
|
motion?: (typeof motion)[number] | undefined;
|
|
296
303
|
media?: import("react").ReactNode;
|
|
297
|
-
side?: (typeof side)[number] | undefined;
|
|
298
304
|
dateTime?: string | undefined;
|
|
305
|
+
side?: (typeof side)[number] | undefined;
|
|
299
306
|
ref?: import("react").LegacyRef<HTMLLIElement> | undefined;
|
|
300
307
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
301
308
|
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { 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';
|
|
4
5
|
export type MessageComposerRootProps = ComponentPropsWithRef<'div'>;
|
|
5
6
|
export type MessageComposerTextareaProps = ComponentPropsWithRef<'textarea'>;
|
|
6
7
|
export type MessageComposerSendProps = ComponentPropsWithRef<'button'>;
|
|
7
|
-
export interface MessageComposerProps extends StyleProps, TrackProps {
|
|
8
|
+
export interface MessageComposerProps extends StyleProps, TrackProps, PressEffectProps {
|
|
8
9
|
value?: string;
|
|
9
10
|
defaultValue?: string;
|
|
10
11
|
onValueChange?: (value: string) => void;
|
|
@@ -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<import("./message-composer-type").MessageComposerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
args: {
|
|
6
13
|
label: string;
|
|
@@ -27,6 +34,7 @@ declare const meta: {
|
|
|
27
34
|
style?: import("react").CSSProperties | undefined;
|
|
28
35
|
track?: string | undefined;
|
|
29
36
|
trackProps?: Record<string, string | number | boolean> | undefined;
|
|
37
|
+
pressEffect?: boolean | undefined;
|
|
30
38
|
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
31
39
|
key?: import("react").Key | null | undefined;
|
|
32
40
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
@@ -44,3 +52,5 @@ export declare const WithLeading: Story;
|
|
|
44
52
|
export declare const WithAttachments: Story;
|
|
45
53
|
/** 보내기에 성공하면 쓰는 쪽이 값을 비운다 */
|
|
46
54
|
export declare const Controlled: Story;
|
|
55
|
+
/** 보내기 원을 누르고 있으면 줄어든다. 아래는 pressEffect={false} */
|
|
56
|
+
export declare const MotionPress: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
1
|
+
import { AnimationEventHandler, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { PresenceCallbackProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { CTAButtonProps } from '../button/button-type';
|
|
4
5
|
import { TrackProps } from '../logging/logging-type';
|
|
@@ -10,9 +11,15 @@ export interface ModalRootProps {
|
|
|
10
11
|
}
|
|
11
12
|
export interface ModalContainerProps extends AsChildProps, StyleProps {
|
|
12
13
|
forceMount?: true;
|
|
14
|
+
/** 창을 그릴 요소. Radix `Dialog.Portal` 의 container. 없으면 document.body */
|
|
15
|
+
portalContainer?: HTMLElement;
|
|
13
16
|
/** 열릴 때·닫힐 때 포커스를 옮기기 직전. Radix `Dialog.Content` 에 그대로 넘긴다 */
|
|
14
17
|
onOpenAutoFocus?: (event: Event) => void;
|
|
15
18
|
onCloseAutoFocus?: (event: Event) => void;
|
|
19
|
+
/** 바깥 누름·Esc 로 닫히기 직전. `preventDefault()` 하면 열린 채로 남는다 */
|
|
20
|
+
onPointerDownOutside?: (event: Event) => void;
|
|
21
|
+
onEscapeKeyDown?: (event: KeyboardEvent) => void;
|
|
22
|
+
onAnimationEnd?: AnimationEventHandler<HTMLDivElement>;
|
|
16
23
|
}
|
|
17
24
|
export interface ModalTriggerProps extends AsChildProps {
|
|
18
25
|
className?: string;
|
|
@@ -29,7 +36,7 @@ export interface ModalDescriptionProps extends AsChildProps {
|
|
|
29
36
|
export interface ModalCloseProps extends AsChildProps {
|
|
30
37
|
className?: string;
|
|
31
38
|
}
|
|
32
|
-
export interface ModalWithDoubleButtonProps {
|
|
39
|
+
export interface ModalWithDoubleButtonProps extends PresenceCallbackProps {
|
|
33
40
|
/**
|
|
34
41
|
* 넘기면 열림을 부모가 정한다. 열리면 포커스가 창 안으로 들어가고 닫히면 연 요소로 돌아오며,
|
|
35
42
|
* Esc·바깥 누름·X 아이콘·두 버튼이 `onOpenChange(false)` 를 부른다.
|
|
@@ -47,8 +54,12 @@ export interface ModalWithDoubleButtonProps {
|
|
|
47
54
|
left: CTAButtonProps;
|
|
48
55
|
right: CTAButtonProps;
|
|
49
56
|
size?: (typeof sizes)[number];
|
|
57
|
+
/** 창을 그릴 요소. 없으면 document.body */
|
|
58
|
+
portalContainer?: HTMLElement;
|
|
59
|
+
/** `open` 을 넘겼을 때만. 열린 동안 history 항목을 하나 쌓아 뒤로 가기가 페이지 대신 `onOpenChange(false)` 를 부른다. 기본 true */
|
|
60
|
+
closeOnBackEvent?: boolean;
|
|
50
61
|
}
|
|
51
|
-
export interface ModalProps extends ModalRootProps, StyleProps, TrackProps {
|
|
62
|
+
export interface ModalProps extends ModalRootProps, StyleProps, TrackProps, PresenceCallbackProps {
|
|
52
63
|
/** 있으면 `Modal.Trigger asChild` 로 감싸 클릭하면 열리는 요소가 된다. */
|
|
53
64
|
trigger?: ReactElement;
|
|
54
65
|
title: ReactNode;
|
|
@@ -58,4 +69,12 @@ export interface ModalProps extends ModalRootProps, StyleProps, TrackProps {
|
|
|
58
69
|
footer?: ReactNode;
|
|
59
70
|
showCloseIcon?: boolean;
|
|
60
71
|
size?: (typeof sizes)[number];
|
|
72
|
+
/** false 면 바깥을 눌러도 닫히지 않고 창이 좌우로 흔들린다. 기본 true */
|
|
73
|
+
closeOnOverlayClick?: boolean;
|
|
74
|
+
/** false 면 Esc 로 닫히지 않는다. 기본 true */
|
|
75
|
+
closeOnEscape?: boolean;
|
|
76
|
+
/** 창을 그릴 요소. 없으면 document.body */
|
|
77
|
+
portalContainer?: HTMLElement;
|
|
78
|
+
/** 열린 동안 history 항목을 하나 쌓아 브라우저·기기의 뒤로 가기가 페이지 대신 창을 닫는다. 기본 true */
|
|
79
|
+
closeOnBackEvent?: boolean;
|
|
61
80
|
}
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import ModalWithDoubleButton from './modal-with-double-button';
|
|
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("./modal-type").ModalWithDoubleButtonProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
size: {
|
|
@@ -14,9 +21,17 @@ declare const meta: {
|
|
|
14
21
|
};
|
|
15
22
|
export default meta;
|
|
16
23
|
type Story = StoryObj<typeof ModalWithDoubleButton.Column>;
|
|
24
|
+
/** 버튼 두 개를 세로로 쌓은 Column 모달이다. */
|
|
17
25
|
export declare const Default: Story;
|
|
26
|
+
/** 버튼 두 개를 가로로 놓은 Row 모달이다. 삭제 확인처럼 취소와 주 동작을 나란히 둔 모습이다. */
|
|
18
27
|
export declare const Row: Story;
|
|
19
28
|
/** 모달은 화면 가운데 하나만 뜨므로 size 는 Controls 에서 바꿔 본다. */
|
|
20
29
|
export declare const Size: Story;
|
|
30
|
+
/** 닫기 아이콘과 제목 아래 구분선을 켠 모달이다. */
|
|
21
31
|
export declare const WithCloseIconAndTitleLine: Story;
|
|
32
|
+
/** open 을 넘긴 모달이다. 오른쪽 위 X 가 진짜 닫기 버튼이 된다. 닫은 뒤 다시 열기 버튼으로 연다. */
|
|
33
|
+
export declare const CloseIconControlled: Story;
|
|
34
|
+
/** 약관처럼 본문이 긴 모달이다. 본문만 스크롤되고 위의 닫기 아이콘·제목과 아래 두 버튼은 제자리에 있다. */
|
|
35
|
+
export declare const LongContent: Story;
|
|
36
|
+
/** 오른쪽 저장 버튼이 disabled 인 모달이다. */
|
|
22
37
|
export declare const DisabledButton: Story;
|
|
@@ -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<import("./modal-type").ModalProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
@@ -18,10 +25,19 @@ declare const meta: {
|
|
|
18
25
|
};
|
|
19
26
|
export default meta;
|
|
20
27
|
type Story = StoryObj<typeof meta>;
|
|
28
|
+
/** 열린 채 시작하는 기본 모달이다. 제목·설명·적용 버튼 배치를 본다. */
|
|
21
29
|
export declare const Default: Story;
|
|
22
30
|
/** 모달은 화면 가운데 하나만 뜨므로 size 는 Controls 에서 바꿔 본다. */
|
|
23
31
|
export declare const Size: Story;
|
|
32
|
+
/** 열기 버튼으로 열고 취소나 적용을 누르면 닫히는 모달이다. */
|
|
24
33
|
export declare const Controlled: Story;
|
|
34
|
+
/** 닫기 아이콘이 없는 모달이다. */
|
|
25
35
|
export declare const WithoutCloseIcon: Story;
|
|
36
|
+
/** 설명과 아래 버튼 줄이 없는 모달이다. 제목과 본문만 있을 때 여백을 본다. */
|
|
26
37
|
export declare const WithoutDescriptionAndFooter: Story;
|
|
38
|
+
/** 본문이 40줄인 모달이다. 본문만 스크롤되고 제목과 아래 버튼이 제자리에 있는지 본다. */
|
|
27
39
|
export declare const LongContent: Story;
|
|
40
|
+
/** 열면 가운데에서 커지며 들어오고 닫으면 작아지며 사라진다. 들어오고 나가는 동안에도 가운데에 머문다. */
|
|
41
|
+
export declare const MotionEnterExit: Story;
|
|
42
|
+
/** 바깥을 눌러도 닫히지 않고 창이 좌우로 흔들린다. Esc 도 막았다. 닫기는 버튼으로만 한다. */
|
|
43
|
+
export declare const MotionCloseOnOverlayClick: Story;
|
|
@@ -7,6 +7,11 @@ declare const meta: {
|
|
|
7
7
|
};
|
|
8
8
|
parameters: {
|
|
9
9
|
layout: string;
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
10
15
|
};
|
|
11
16
|
};
|
|
12
17
|
export default meta;
|
|
@@ -21,3 +26,5 @@ export declare const Presets: Story;
|
|
|
21
26
|
export declare const Provider: Story;
|
|
22
27
|
/** OS 의 동작 줄이기 설정과, 그 설정이 CSS 시간 변수에 준 값을 보여 준다. 켜면 --motion-enter-duration 이 0ms 가 된다. */
|
|
23
28
|
export declare const ReducedMotion: Story;
|
|
29
|
+
/** 토큰마다 그 모션을 보여 주는 컴포넌트 스토리로 가는 목록. 툴바의 Motion 메뉴로 동작 줄이기를 켜고 비교한다. */
|
|
30
|
+
export declare const Gallery: Story;
|
|
@@ -14,7 +14,7 @@ export interface NoticeProps extends Omit<ComponentPropsWithRef<'div'>, 'title'>
|
|
|
14
14
|
title?: ReactNode;
|
|
15
15
|
/** 본문 글 */
|
|
16
16
|
children: ReactNode;
|
|
17
|
-
/** 본문 아래 작은 버튼(CTAButton xs·
|
|
17
|
+
/** 본문 아래 작은 버튼(CTAButton xs·primary·outline) 하나 */
|
|
18
18
|
action?: NoticeAction;
|
|
19
19
|
/** 조건부로 나타나는 안내만 준다. 나타날 때 흐려졌다 선명해진다 */
|
|
20
20
|
motion?: (typeof motion)[number];
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { motion, variant } from './notice-props';
|
|
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<Omit<import("./notice-type").NoticeProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
variant: {
|
|
@@ -21,9 +28,10 @@ declare const meta: {
|
|
|
21
28
|
children: string;
|
|
22
29
|
};
|
|
23
30
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
24
|
-
|
|
31
|
+
slot?: string | undefined | undefined;
|
|
25
32
|
style?: import("react").CSSProperties | undefined;
|
|
26
|
-
|
|
33
|
+
title?: import("react").ReactNode;
|
|
34
|
+
key?: import("react").Key | null | undefined;
|
|
27
35
|
defaultChecked?: boolean | undefined | undefined;
|
|
28
36
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
29
37
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -31,6 +39,7 @@ declare const meta: {
|
|
|
31
39
|
accessKey?: string | undefined | undefined;
|
|
32
40
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
33
41
|
autoFocus?: boolean | undefined | undefined;
|
|
42
|
+
className?: string | undefined | undefined;
|
|
34
43
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
35
44
|
contextMenu?: string | undefined | undefined;
|
|
36
45
|
dir?: string | undefined | undefined;
|
|
@@ -40,10 +49,8 @@ declare const meta: {
|
|
|
40
49
|
id?: string | undefined | undefined;
|
|
41
50
|
lang?: string | undefined | undefined;
|
|
42
51
|
nonce?: string | undefined | undefined;
|
|
43
|
-
slot?: string | undefined | undefined;
|
|
44
52
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
45
53
|
tabIndex?: number | undefined | undefined;
|
|
46
|
-
title?: import("react").ReactNode;
|
|
47
54
|
translate?: "yes" | "no" | undefined | undefined;
|
|
48
55
|
radioGroup?: string | undefined | undefined;
|
|
49
56
|
role?: import("react").AriaRole | undefined;
|
|
@@ -126,6 +133,7 @@ declare const meta: {
|
|
|
126
133
|
"aria-valuemin"?: number | undefined | undefined;
|
|
127
134
|
"aria-valuenow"?: number | undefined | undefined;
|
|
128
135
|
"aria-valuetext"?: string | undefined | undefined;
|
|
136
|
+
children: import("react").ReactNode;
|
|
129
137
|
dangerouslySetInnerHTML?: {
|
|
130
138
|
__html: string | TrustedHTML;
|
|
131
139
|
} | undefined | undefined;
|
|
@@ -287,7 +295,6 @@ declare const meta: {
|
|
|
287
295
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
288
296
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
289
297
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
290
|
-
key?: import("react").Key | null | undefined;
|
|
291
298
|
variant?: (typeof variant)[number] | undefined;
|
|
292
299
|
motion?: (typeof motion)[number] | undefined;
|
|
293
300
|
action?: import("./notice-type").NoticeAction | undefined;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NumericSpinnerButtonProps, NumericSpinnerRootProps } from './numeric-spinner-type';
|
|
2
|
+
declare const NumericSpinnerRoot: import("react").ForwardRefExoticComponent<Omit<NumericSpinnerRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Button: import("react").ForwardRefExoticComponent<Omit<NumericSpinnerButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
Value: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLSpanElement | 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<HTMLSpanElement> | null | undefined;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
};
|
|
8
|
+
export default NumericSpinnerRoot;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
3
|
+
import { StyleProps } from '../../helpers/types/common-props';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
5
|
+
import { sizes } from './numeric-spinner-props';
|
|
6
|
+
export interface NumericSpinnerProps extends StyleProps, TrackProps, PressEffectProps {
|
|
7
|
+
/** 정수. 1 씩 바뀐다 */
|
|
8
|
+
value?: number;
|
|
9
|
+
defaultValue?: number;
|
|
10
|
+
onValueChange?: (value: number) => void;
|
|
11
|
+
/** 기본 0. 값이 여기면 빼기 버튼이 막힌다 */
|
|
12
|
+
min?: number;
|
|
13
|
+
/** 기본 999. 값이 여기면 더하기 버튼이 막힌다 */
|
|
14
|
+
max?: number;
|
|
15
|
+
size?: (typeof sizes)[number];
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** 빼기 버튼의 aria-label. 기본 '빼기' */
|
|
18
|
+
decreaseLabel?: string;
|
|
19
|
+
/** 더하기 버튼의 aria-label. 기본 '더하기' */
|
|
20
|
+
increaseLabel?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface NumericSpinnerRootProps extends ComponentPropsWithRef<'div'> {
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
export interface NumericSpinnerButtonProps extends Omit<ComponentPropsWithRef<'button'>, 'type' | 'aria-label'> {
|
|
26
|
+
/** 아이콘만 있는 버튼이라 이름이 꼭 필요하다 */
|
|
27
|
+
'aria-label': string;
|
|
28
|
+
}
|
|
29
|
+
export type NumericSpinnerValueProps = ComponentPropsWithRef<'span'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { NumericSpinnerProps } from './numeric-spinner-type';
|
|
2
|
+
declare const NumericSpinner: import("react").ForwardRefExoticComponent<NumericSpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default NumericSpinner;
|
|
4
|
+
export type { NumericSpinnerProps } from './numeric-spinner-type';
|
|
@@ -0,0 +1,36 @@
|
|
|
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("./numeric-spinner-type").NumericSpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select";
|
|
16
|
+
};
|
|
17
|
+
options: readonly ["xs", "s", "m", "l"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
min: number;
|
|
22
|
+
max: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/** 더하기·빼기로 1 씩 바뀐다. 0 이나 10 에 닿으면 그쪽 버튼이 막힌다. */
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
/** 네 크기. 높이는 컨트롤 높이(28·36·40·44)다. */
|
|
30
|
+
export declare const Sizes: Story;
|
|
31
|
+
/** 값이 끝에 있다. 막힌 쪽 버튼을 누르면 전체가 흔들린다. */
|
|
32
|
+
export declare const AtBoundary: Story;
|
|
33
|
+
/** 바꿀 수 없는 상태. */
|
|
34
|
+
export declare const Disabled: Story;
|
|
35
|
+
/** 버튼을 누르고 있으면 살짝 줄어든다. 오른쪽은 pressEffect={false} */
|
|
36
|
+
export declare const MotionPress: Story;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Context, ReactElement } from 'react';
|
|
2
|
+
import { ConfirmResult } from './overlay-type';
|
|
3
|
+
/** Provider 가 그릴 때 넘기는 것. 열림과 퇴장 끝 알림은 Provider 가 쥔다 */
|
|
4
|
+
export interface OverlayRenderState {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onExited: () => void;
|
|
7
|
+
portalContainer?: HTMLElement;
|
|
8
|
+
}
|
|
9
|
+
export type OverlayRender = (state: OverlayRenderState) => ReactElement;
|
|
10
|
+
/** 'closing' 이면 답은 이미 돌려줬고 퇴장 애니메이션이 끝나길 기다린다. 끝나면 스택에서 빠진다 */
|
|
11
|
+
export type OverlayPhase = 'open' | 'closing';
|
|
12
|
+
export type OverlayEntry = {
|
|
13
|
+
id: number;
|
|
14
|
+
kind: 'toast';
|
|
15
|
+
phase: OverlayPhase;
|
|
16
|
+
render: OverlayRender;
|
|
17
|
+
} | {
|
|
18
|
+
id: number;
|
|
19
|
+
kind: 'dialog';
|
|
20
|
+
phase: OverlayPhase;
|
|
21
|
+
render: OverlayRender;
|
|
22
|
+
resolve: (result: ConfirmResult) => void;
|
|
23
|
+
} | {
|
|
24
|
+
id: number;
|
|
25
|
+
kind: 'sheet';
|
|
26
|
+
phase: OverlayPhase;
|
|
27
|
+
render: OverlayRender;
|
|
28
|
+
resolve: (value: unknown) => void;
|
|
29
|
+
};
|
|
30
|
+
/** 같은 답을 두 번 줘도, 닫히는 중에 다시 줘도 처음 것만 남는다 */
|
|
31
|
+
export type SettleDialog = (result: ConfirmResult) => void;
|
|
32
|
+
/** 고른 값으로 닫는다. 값 없이 부르면 고르지 않고 닫은 것이다. 처음 것만 남는다 */
|
|
33
|
+
export type SettleSheet = (value?: unknown) => void;
|
|
34
|
+
export interface OverlayController {
|
|
35
|
+
openDialog: (build: (settle: SettleDialog) => OverlayRender) => Promise<ConfirmResult>;
|
|
36
|
+
closeTopDialog: () => void;
|
|
37
|
+
openSheet: (build: (settle: SettleSheet) => OverlayRender) => Promise<unknown>;
|
|
38
|
+
closeTopSheet: () => void;
|
|
39
|
+
showToast: (build: (dismiss: () => void) => OverlayRender) => number;
|
|
40
|
+
dismissToast: (id: number) => void;
|
|
41
|
+
}
|
|
42
|
+
export declare const OverlayContext: Context<OverlayController | null>;
|
|
43
|
+
/** Provider 밖이면 던진다. 조용히 넘어가면 "확인을 눌렀는데 아무 일도 없다" 로 나타난다 */
|
|
44
|
+
export declare const useOverlayController: (hookName: string) => OverlayController;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { OverlayProviderProps } from './overlay-type';
|
|
2
|
+
/** 앱 루트에 한 번 둔다. useDialog · useToast · useBottomSheet 가 여는 오버레이를 children 뒤에 쌓아 그린다. ToastProvider 를 품는다 */
|
|
3
|
+
export declare const OverlayProvider: {
|
|
4
|
+
(props: OverlayProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SnapPoint } from '../bottom-sheet/bottom-sheet-snap';
|
|
3
|
+
import type { Color } from '../button/button-type';
|
|
4
|
+
import type { ToastProps, ToastProviderProps } from '../toast/toast-type';
|
|
5
|
+
export interface OverlayProviderProps extends Omit<ToastProviderProps, 'portalContainer'> {
|
|
6
|
+
/** 훅으로 연 대화상자와 토스트 자리를 그릴 요소. 없으면 document.body(토스트 자리는 Provider 가 놓인 자리) */
|
|
7
|
+
portalContainer?: HTMLElement;
|
|
8
|
+
}
|
|
9
|
+
/** `'cancel'` 은 취소 버튼, `'dismiss'` 는 Esc · 바깥 누름 · 뒤로 가기 · `close()` 로 닫은 것이다 */
|
|
10
|
+
export type ConfirmResult = 'confirm' | 'cancel' | 'dismiss';
|
|
11
|
+
export interface DialogAlertOptions {
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
description?: ReactNode;
|
|
14
|
+
/** 기본 '확인' */
|
|
15
|
+
buttonText?: string;
|
|
16
|
+
/** Modal 의 `track`. 열고 닫을 때 `open` · `close` 를 보낸다 */
|
|
17
|
+
track?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface DialogConfirmOptions {
|
|
20
|
+
title: string;
|
|
21
|
+
description?: ReactNode;
|
|
22
|
+
/** 기본 '확인' */
|
|
23
|
+
confirmText?: string;
|
|
24
|
+
/** 기본 '취소' */
|
|
25
|
+
cancelText?: string;
|
|
26
|
+
/** 확인 버튼 색(ADR 0011). 기본 'primary' */
|
|
27
|
+
color?: Extract<Color, 'primary' | 'danger'>;
|
|
28
|
+
/** Promise 를 돌려주면 끝날 때까지 확인 버튼이 loading 이고 창이 닫히지 않는다. 거부되면 창은 열린 채 `confirm` 이 같은 오류로 거부된다 */
|
|
29
|
+
onConfirm?: () => void | Promise<void>;
|
|
30
|
+
/** 주면 열 때 `open`, 닫을 때 답(`ConfirmResult`)을 value 로 `close` 를 보낸다 */
|
|
31
|
+
track?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface UseDialogReturn {
|
|
34
|
+
/** 버튼 하나짜리 알림. 어떻게 닫혀도 resolve 된다 */
|
|
35
|
+
alert: (options: DialogAlertOptions) => Promise<void>;
|
|
36
|
+
confirm: (options: DialogConfirmOptions) => Promise<ConfirmResult>;
|
|
37
|
+
/** 맨 위 대화상자를 `'dismiss'` 로 닫는다. 열린 것이 없으면 아무 일도 없다 */
|
|
38
|
+
close: () => void;
|
|
39
|
+
}
|
|
40
|
+
export type ToastShowOptions = Pick<ToastProps, 'description' | 'variant' | 'action' | 'duration'>;
|
|
41
|
+
export interface UseToastReturn {
|
|
42
|
+
/** 토스트를 띄우고 id 를 바로 돌려준다 */
|
|
43
|
+
show: (title: ReactNode, options?: ToastShowOptions) => number;
|
|
44
|
+
/** 그 토스트를 닫는다. 이미 닫혔으면 아무 일도 없다 */
|
|
45
|
+
dismiss: (id: number) => void;
|
|
46
|
+
}
|
|
47
|
+
/** content · footer 가 받는 것. `close(value)` 는 그 값으로, `close()` 는 값 없이 닫는다 */
|
|
48
|
+
export interface BottomSheetRenderState<T> {
|
|
49
|
+
close: (value?: T) => void;
|
|
50
|
+
}
|
|
51
|
+
export interface BottomSheetOpenOptions<T> {
|
|
52
|
+
title: ReactNode;
|
|
53
|
+
description?: ReactNode;
|
|
54
|
+
content: (state: BottomSheetRenderState<T>) => ReactNode;
|
|
55
|
+
footer?: (state: BottomSheetRenderState<T>) => ReactNode;
|
|
56
|
+
/** BottomSheet 의 snapPoints. 없으면 내용 높이 */
|
|
57
|
+
snapPoints?: SnapPoint[];
|
|
58
|
+
/** false 면 바깥 누름·아래로 끌기·Esc·뒤로 가기로 닫히지 않는다. `close()` 로만 닫는다. 기본 true */
|
|
59
|
+
dismissible?: boolean;
|
|
60
|
+
/** BottomSheet 의 `track`. 열고 닫을 때 `open` · `close` 를 보낸다 */
|
|
61
|
+
track?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface UseBottomSheetReturn {
|
|
64
|
+
/** 시트를 열고 고른 값을 돌려준다. 바깥 누름 · 끌어 내리기 · Esc · 뒤로 가기 · 값 없는 `close()` 면 undefined */
|
|
65
|
+
open: <T>(options: BottomSheetOpenOptions<T>) => Promise<T | undefined>;
|
|
66
|
+
/** 맨 위 시트를 undefined 로 닫는다. 열린 것이 없으면 아무 일도 없다 */
|
|
67
|
+
close: () => void;
|
|
68
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { OverlayProvider } from './overlay-provider';
|
|
2
|
+
export { useBottomSheet } from './use-bottom-sheet';
|
|
3
|
+
export { useDialog } from './use-dialog';
|
|
4
|
+
export { useToast } from './use-toast';
|
|
5
|
+
export type { OverlayProviderProps, ConfirmResult, DialogAlertOptions, DialogConfirmOptions, UseDialogReturn, ToastShowOptions, UseToastReturn, BottomSheetOpenOptions, BottomSheetRenderState, UseBottomSheetReturn, } from './overlay-type';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
(props: import("./overlay-type").OverlayProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
args: {
|
|
17
|
+
children: null;
|
|
18
|
+
};
|
|
19
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
20
|
+
portalContainer?: HTMLElement | undefined;
|
|
21
|
+
label?: string | undefined;
|
|
22
|
+
children: import("react").ReactNode;
|
|
23
|
+
position?: typeof import("../toast/toast-props").positions[number] | undefined;
|
|
24
|
+
duration?: number | undefined;
|
|
25
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
/** 삭제는 confirm, 저장은 alert. 취소 버튼은 cancel, Esc·바깥 누름은 dismiss 로 답이 온다. */
|
|
30
|
+
export declare const Default: Story;
|
|
31
|
+
/** onConfirm 이 Promise 면 끝날 때까지 확인 버튼이 loading 이고 창이 열려 있다. 실패하면 창은 남고 오류 토스트가 뜬다. */
|
|
32
|
+
export declare const AsyncConfirm: Story;
|
|
33
|
+
/** show 는 id 를 바로 돌려준다. dismiss(id) 로 그 토스트만 닫는다. */
|
|
34
|
+
export declare const Toast: Story;
|
|
35
|
+
/** 고르면 그 값이, 바깥 누름·끌어 내리기·Esc 로 닫으면 undefined 가 돌아온다. */
|
|
36
|
+
export declare const BottomSheet: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes } from './pagination-props';
|
|
4
5
|
export interface PaginationRootProps extends ComponentPropsWithRef<'nav'> {
|
|
@@ -10,7 +11,7 @@ export interface PaginationItemProps extends ComponentPropsWithRef<'button'> {
|
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export type PaginationEllipsisProps = ComponentPropsWithRef<'span'>;
|
|
13
|
-
export interface PaginationProps extends PaginationRootProps, TrackProps {
|
|
14
|
+
export interface PaginationProps extends PaginationRootProps, TrackProps, PressEffectProps {
|
|
14
15
|
totalPages: number;
|
|
15
16
|
page?: number;
|
|
16
17
|
defaultPage?: number;
|
|
@@ -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("./pagination-type").PaginationProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
@@ -17,9 +24,17 @@ declare const meta: {
|
|
|
17
24
|
};
|
|
18
25
|
export default meta;
|
|
19
26
|
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/** 10쪽 중 1쪽에서 시작하는 페이지 이동이다. */
|
|
20
28
|
export declare const Default: Story;
|
|
29
|
+
/** 5쪽에서 시작하는 페이지 이동이다. 쪽을 누르면 현재 쪽 표시가 옮겨간다. */
|
|
21
30
|
export declare const Controlled: Story;
|
|
31
|
+
/** 크기별 페이지 이동이다. */
|
|
22
32
|
export declare const Sizes: Story;
|
|
33
|
+
/** 20쪽 중 10쪽에서 siblingCount 0·1·2 를 비교한다. 현재 쪽 양옆에 보이는 쪽 수 차이를 본다. */
|
|
23
34
|
export declare const SiblingCount: Story;
|
|
35
|
+
/** 3쪽뿐인 페이지 이동이다. 생략 표시 없이 모든 쪽이 보이는지 본다. */
|
|
24
36
|
export declare const FewPages: Story;
|
|
37
|
+
/** disabled 페이지 이동이다. 눌러도 쪽이 바뀌지 않는다. */
|
|
25
38
|
export declare const Disabled: Story;
|
|
39
|
+
/** 버튼을 누르고 있으면 줄어들고 어두워진다. 아래는 pressEffect={false} */
|
|
40
|
+
export declare const MotionPress: Story;
|