@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
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } 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 './segmented-control-props';
|
|
6
|
+
export interface SegmentedControlItem {
|
|
7
|
+
id: string;
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export interface SegmentedControlProps extends StyleProps, TrackProps, PressEffectProps {
|
|
12
|
+
items: SegmentedControlItem[];
|
|
13
|
+
/** 고른 칸 id. 늘 하나가 골라져 있다. value·defaultValue 가 없으면 첫 칸 */
|
|
14
|
+
value?: string;
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
onValueChange?: (id: string) => void;
|
|
17
|
+
size?: (typeof sizes)[number];
|
|
18
|
+
/** 기본 false 는 칸이 폭을 똑같이 나눈다. true 면 칸이 글자 폭이고 넘치면 가로로 민다 */
|
|
19
|
+
fluid?: boolean;
|
|
20
|
+
/** 'aria-label' 로 붙는다 (예: '보기 방식') */
|
|
21
|
+
label: string;
|
|
22
|
+
}
|
|
23
|
+
export interface SegmentedControlRootProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'dir' | 'onChange'> {
|
|
24
|
+
value: string;
|
|
25
|
+
onValueChange: (id: string) => void;
|
|
26
|
+
}
|
|
27
|
+
export interface SegmentedControlItemProps extends Omit<ComponentPropsWithRef<'button'>, 'value'> {
|
|
28
|
+
value: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export type SegmentedControlIndicatorProps = ComponentPropsWithRef<'div'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SegmentedControlProps } from './segmented-control-type';
|
|
2
|
+
declare const SegmentedControl: import("react").ForwardRefExoticComponent<SegmentedControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default SegmentedControl;
|
|
4
|
+
export type { SegmentedControlProps, SegmentedControlItem } from './segmented-control-type';
|
|
@@ -0,0 +1,39 @@
|
|
|
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("./segmented-control-type").SegmentedControlProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select";
|
|
16
|
+
};
|
|
17
|
+
options: readonly ["s", "m"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
label: string;
|
|
22
|
+
items: {
|
|
23
|
+
id: string;
|
|
24
|
+
label: string;
|
|
25
|
+
}[];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
/** 세 칸 중 하나를 고른다. 누르면 흰 판이 그 칸으로 옮겨 간다. */
|
|
31
|
+
export declare const Default: Story;
|
|
32
|
+
/** 두 크기. m 은 화면 위, s 는 카드·시트 안. */
|
|
33
|
+
export declare const Sizes: Story;
|
|
34
|
+
/** 칸이 많고 글자가 길어 fluid 로 놓았다. 넘친 목록을 밀면 왼쪽에 처음으로 되돌리는 화살표가 나타난다. */
|
|
35
|
+
export declare const Fluid: Story;
|
|
36
|
+
/** 고를 수 없는 칸. 화살표 키로 옮겨 가도 건너뛴다. */
|
|
37
|
+
export declare const Disabled: Story;
|
|
38
|
+
/** 칸을 누르고 있으면 밝아진다(크기는 그대로). 아래는 pressEffect={false} */
|
|
39
|
+
export declare const MotionPress: Story;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const BaseSkeletonRoot: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
2
2
|
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;
|
|
3
|
-
}, "ref"> & import("react").RefAttributes<HTMLSpanElement
|
|
4
|
-
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
4
|
+
Group: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
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;
|
|
6
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
};
|
|
8
|
+
export default BaseSkeletonRoot;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SkeletonBlock, SkeletonPattern } from './skeleton-group-type';
|
|
2
|
+
export declare const patterns: readonly ["list", "listWithIcon", "titleList", "card", "table"];
|
|
3
|
+
/** 패턴마다 위에서부터 그릴 블록. repeat 은 마지막 블록을 되풀이한다 */
|
|
4
|
+
export declare const PATTERNS: Record<SkeletonPattern, SkeletonBlock[]>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StyleProps } from '../../helpers/types/common-props';
|
|
2
|
+
import type { PrimitiveTokens } from '../../tokens/generated';
|
|
3
|
+
import type { patterns } from './skeleton-group-props';
|
|
4
|
+
/** --spacing-* 의 이름. tokens/figma.json 에서 생성된 primitive.spacing 의 키다 */
|
|
5
|
+
export type SpacingToken = keyof PrimitiveTokens['spacing'];
|
|
6
|
+
export type SkeletonPattern = (typeof patterns)[number];
|
|
7
|
+
/** 묶음이 그리는 블록 하나. row 는 블록을 가로로 놓는다 */
|
|
8
|
+
export type SkeletonBlock = {
|
|
9
|
+
kind: 'title';
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'subtitle';
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'text';
|
|
14
|
+
lines: number;
|
|
15
|
+
} | {
|
|
16
|
+
kind: 'circle';
|
|
17
|
+
} | {
|
|
18
|
+
kind: 'rect';
|
|
19
|
+
} | {
|
|
20
|
+
kind: 'card';
|
|
21
|
+
} | {
|
|
22
|
+
kind: 'spacer';
|
|
23
|
+
size: SpacingToken;
|
|
24
|
+
} | {
|
|
25
|
+
kind: 'row';
|
|
26
|
+
items: SkeletonBlock[];
|
|
27
|
+
};
|
|
28
|
+
/** custom 에 쓰는 이름. text 는 한 줄, spacer:{n} 은 --spacing-{n} 만큼 더 띄운다 */
|
|
29
|
+
export type SkeletonCustomToken = Exclude<SkeletonBlock['kind'], 'spacer' | 'row'> | `spacer:${SpacingToken}`;
|
|
30
|
+
interface SkeletonGroupCommonProps extends StyleProps {
|
|
31
|
+
/** 마지막 블록을 몇 번 그릴지. 목록·표 패턴의 마지막 블록은 행이다. 기본 3 */
|
|
32
|
+
repeat?: number;
|
|
33
|
+
/** 블록마다 Skeleton 의 shimmer 를 켠다. 기본 true */
|
|
34
|
+
animated?: boolean;
|
|
35
|
+
/** 영역의 이름. 기본 '불러오는 중' */
|
|
36
|
+
'aria-label'?: string;
|
|
37
|
+
}
|
|
38
|
+
export type SkeletonGroupProps = SkeletonGroupCommonProps & ({
|
|
39
|
+
/** 미리 정한 모양. 기본 'list' */
|
|
40
|
+
pattern?: SkeletonPattern;
|
|
41
|
+
custom?: never;
|
|
42
|
+
} | {
|
|
43
|
+
pattern?: never;
|
|
44
|
+
/** 위에서부터 그릴 블록 이름. pattern 과 함께 쓰지 않는다 */
|
|
45
|
+
custom: SkeletonCustomToken[];
|
|
46
|
+
});
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SkeletonGroupProps } from './skeleton-group-type';
|
|
2
|
+
declare const SkeletonGroup: import("react").ForwardRefExoticComponent<SkeletonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default SkeletonGroup;
|
|
4
|
+
export type { SkeletonBlock, SkeletonCustomToken, SkeletonGroupProps, SkeletonPattern, SpacingToken, } from './skeleton-group-type';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { SkeletonGroupProps, SkeletonPattern } from './skeleton-group-type';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
component: import("react").ForwardRefExoticComponent<SkeletonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
argTypes: {
|
|
14
|
+
pattern: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "select";
|
|
17
|
+
};
|
|
18
|
+
options: readonly ["list", "listWithIcon", "titleList", "card", "table"];
|
|
19
|
+
};
|
|
20
|
+
repeat: {
|
|
21
|
+
control: {
|
|
22
|
+
type: "number";
|
|
23
|
+
min: number;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
animated: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "boolean";
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
args: {
|
|
33
|
+
pattern: "list";
|
|
34
|
+
repeat: number;
|
|
35
|
+
animated: true;
|
|
36
|
+
};
|
|
37
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
38
|
+
'aria-label'?: string | undefined;
|
|
39
|
+
repeat?: number | undefined;
|
|
40
|
+
animated?: boolean | undefined;
|
|
41
|
+
pattern?: SkeletonPattern | undefined;
|
|
42
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<typeof meta>;
|
|
46
|
+
/** list 패턴이다. 한 줄 글을 repeat 만큼 그린다. */
|
|
47
|
+
export declare const Default: Story;
|
|
48
|
+
/** 다섯 패턴을 나란히 본다. repeat 은 마지막 블록(목록·표는 행)을 되풀이한다. */
|
|
49
|
+
export declare const Patterns: Story;
|
|
50
|
+
/** 원 하나와 두 줄 글을 한 행으로 그리는 아이콘 목록이다. */
|
|
51
|
+
export declare const ListWithIcon: Story;
|
|
52
|
+
/** 머리 행 하나와 본문 행을 사각형 칸으로 그리는 표다. */
|
|
53
|
+
export declare const Table: Story;
|
|
54
|
+
/** custom 으로 블록 순서를 직접 적는다. spacer:24 는 --spacing-24 만큼 더 띄운다. */
|
|
55
|
+
export declare const Custom: Story;
|
|
56
|
+
/** animated 를 끄면 모든 블록이 shimmer 없이 바탕만 보인다. */
|
|
57
|
+
export declare const Static: Story;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { shapes } from './skeleton-props';
|
|
3
3
|
export type BaseSkeletonProps = ComponentPropsWithRef<'span'>;
|
|
4
|
+
export type BaseSkeletonGroupProps = ComponentPropsWithRef<'div'>;
|
|
4
5
|
export interface SkeletonProps extends BaseSkeletonProps {
|
|
5
6
|
shape?: (typeof shapes)[number];
|
|
6
7
|
width?: number | string;
|
|
@@ -2,6 +2,13 @@ import type { StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { shapes } from './skeleton-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("./skeleton-type").SkeletonProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
6
13
|
argTypes: {
|
|
7
14
|
shape: {
|
|
@@ -38,9 +45,10 @@ declare const meta: {
|
|
|
38
45
|
animated: true;
|
|
39
46
|
};
|
|
40
47
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
41
|
-
|
|
48
|
+
slot?: string | undefined | undefined;
|
|
42
49
|
style?: import("react").CSSProperties | undefined;
|
|
43
|
-
|
|
50
|
+
title?: string | undefined | undefined;
|
|
51
|
+
key?: import("react").Key | null | undefined;
|
|
44
52
|
defaultChecked?: boolean | undefined | undefined;
|
|
45
53
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
46
54
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -48,6 +56,7 @@ declare const meta: {
|
|
|
48
56
|
accessKey?: string | undefined | undefined;
|
|
49
57
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
50
58
|
autoFocus?: boolean | undefined | undefined;
|
|
59
|
+
className?: string | undefined | undefined;
|
|
51
60
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
52
61
|
contextMenu?: string | undefined | undefined;
|
|
53
62
|
dir?: string | undefined | undefined;
|
|
@@ -57,10 +66,8 @@ declare const meta: {
|
|
|
57
66
|
id?: string | undefined | undefined;
|
|
58
67
|
lang?: string | undefined | undefined;
|
|
59
68
|
nonce?: string | undefined | undefined;
|
|
60
|
-
slot?: string | undefined | undefined;
|
|
61
69
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
62
70
|
tabIndex?: number | undefined | undefined;
|
|
63
|
-
title?: string | undefined | undefined;
|
|
64
71
|
translate?: "yes" | "no" | undefined | undefined;
|
|
65
72
|
radioGroup?: string | undefined | undefined;
|
|
66
73
|
role?: import("react").AriaRole | undefined;
|
|
@@ -143,6 +150,7 @@ declare const meta: {
|
|
|
143
150
|
"aria-valuemin"?: number | undefined | undefined;
|
|
144
151
|
"aria-valuenow"?: number | undefined | undefined;
|
|
145
152
|
"aria-valuetext"?: string | undefined | undefined;
|
|
153
|
+
children?: import("react").ReactNode;
|
|
146
154
|
dangerouslySetInnerHTML?: {
|
|
147
155
|
__html: string | TrustedHTML;
|
|
148
156
|
} | undefined | undefined;
|
|
@@ -304,22 +312,25 @@ declare const meta: {
|
|
|
304
312
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
305
313
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
306
314
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
307
|
-
key?: import("react").Key | null | undefined;
|
|
308
315
|
height?: number | string | undefined;
|
|
309
316
|
width?: number | string | undefined;
|
|
310
|
-
shape?: (typeof shapes)[number] | undefined;
|
|
311
|
-
lines?: number | undefined;
|
|
312
317
|
animated?: boolean | undefined;
|
|
318
|
+
lines?: number | undefined;
|
|
319
|
+
shape?: (typeof shapes)[number] | undefined;
|
|
313
320
|
ref?: import("react").LegacyRef<HTMLSpanElement> | undefined;
|
|
314
321
|
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
315
322
|
};
|
|
316
323
|
export default meta;
|
|
317
324
|
type Story = StoryObj<typeof meta>;
|
|
325
|
+
/** 한 줄 텍스트 모양 스켈레톤이다. 반짝이며 흐르는 애니메이션을 본다. */
|
|
318
326
|
export declare const Default: Story;
|
|
327
|
+
/** 모양별 스켈레톤이다. */
|
|
319
328
|
export declare const Shapes: Story;
|
|
320
329
|
/** text 는 lines 로 여러 줄을 그리고 마지막 줄이 짧다. */
|
|
321
330
|
export declare const Lines: Story;
|
|
331
|
+
/** 200×120 사각형 스켈레톤이다. */
|
|
322
332
|
export declare const Rect: Story;
|
|
333
|
+
/** 지름 48px 원 스켈레톤이다. */
|
|
323
334
|
export declare const Circle: Story;
|
|
324
335
|
/** animated 를 끄면 shimmer 없이 회색 바탕만 보인다. */
|
|
325
336
|
export declare const Static: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SliderRootProps } from './slider-type';
|
|
2
|
+
declare const SliderRoot: import("react").ForwardRefExoticComponent<Omit<SliderRootProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
3
|
+
Track: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
4
|
+
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;
|
|
5
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
Range: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
7
|
+
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;
|
|
8
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
Thumb: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
10
|
+
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;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
};
|
|
13
|
+
export default SliderRoot;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** 채운 트랙의 색. primary 는 브랜드(--surface-brand), neutral 은 회색(--surface-strong) */
|
|
2
|
+
export declare const variant: readonly ["primary", "neutral"];
|
|
3
|
+
export declare const sliderProps: {
|
|
4
|
+
variant: {
|
|
5
|
+
type: "className";
|
|
6
|
+
className: string;
|
|
7
|
+
values: readonly ["primary", "neutral"];
|
|
8
|
+
default: "primary";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } 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 { variant } from './slider-props';
|
|
6
|
+
export interface SliderLabel {
|
|
7
|
+
min: ReactNode;
|
|
8
|
+
mid?: ReactNode;
|
|
9
|
+
max: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface SliderProps extends StyleProps, TrackProps, PressEffectProps {
|
|
12
|
+
value?: number;
|
|
13
|
+
defaultValue?: number;
|
|
14
|
+
/** 끄는 동안 값이 바뀔 때마다 */
|
|
15
|
+
onValueChange?: (value: number) => void;
|
|
16
|
+
/** 손을 떼거나 키로 바꿔 값이 정해졌을 때 한 번 */
|
|
17
|
+
onValueCommit?: (value: number) => void;
|
|
18
|
+
/** 기본 0 */
|
|
19
|
+
min?: number;
|
|
20
|
+
/** 기본 100 */
|
|
21
|
+
max?: number;
|
|
22
|
+
/** 기본 1 */
|
|
23
|
+
step?: number;
|
|
24
|
+
/** 트랙 아래 양 끝(과 가운데) 글 */
|
|
25
|
+
label?: SliderLabel;
|
|
26
|
+
/** 끄는 동안·포커스 동안 손잡이 위에 현재 값을 띄운다 */
|
|
27
|
+
tooltip?: boolean;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
variant?: (typeof variant)[number];
|
|
30
|
+
/** 손잡이(role="slider")의 이름 */
|
|
31
|
+
'aria-label': string;
|
|
32
|
+
/** 값을 읽어 줄 글(aria-valuetext)과 tooltip 글. 없으면 숫자 그대로 */
|
|
33
|
+
formatValue?: (value: number) => string;
|
|
34
|
+
}
|
|
35
|
+
export interface SliderRootProps extends Omit<ComponentPropsWithRef<'span'>, 'defaultValue' | 'dir' | 'onChange'> {
|
|
36
|
+
value: number;
|
|
37
|
+
onValueChange: (value: number) => void;
|
|
38
|
+
onValueCommit?: (value: number) => void;
|
|
39
|
+
min: number;
|
|
40
|
+
max: number;
|
|
41
|
+
step: number;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export type SliderTrackProps = ComponentPropsWithRef<'span'>;
|
|
45
|
+
export type SliderRangeProps = ComponentPropsWithRef<'span'>;
|
|
46
|
+
export type SliderThumbProps = ComponentPropsWithRef<'span'>;
|
|
@@ -0,0 +1,38 @@
|
|
|
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("./slider-type").SliderProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
control: {
|
|
15
|
+
type: "select";
|
|
16
|
+
};
|
|
17
|
+
options: readonly ["primary", "neutral"];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
args: {
|
|
21
|
+
'aria-label': string;
|
|
22
|
+
defaultValue: number;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
/** 손잡이를 끌거나 화살표 키로 값을 바꾼다. 아래 숫자가 따라 바뀐다. */
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
/** 채운 트랙의 두 색. primary 는 브랜드, neutral 은 회색. */
|
|
30
|
+
export declare const Variants: Story;
|
|
31
|
+
/** 트랙 아래 양 끝과 가운데 글. */
|
|
32
|
+
export declare const WithLabel: Story;
|
|
33
|
+
/** 끄는 동안·포커스 동안 손잡이 위에 현재 값이 뜬다. formatValue 가 글을 만든다. */
|
|
34
|
+
export declare const WithTooltip: Story;
|
|
35
|
+
/** 끌 수 없는 상태. */
|
|
36
|
+
export declare const Disabled: Story;
|
|
37
|
+
/** 손잡이를 누르고 있으면 살짝 줄어든다. 아래는 pressEffect={false} */
|
|
38
|
+
export declare const MotionPress: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseSplitTextField: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
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;
|
|
3
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export default BaseSplitTextField;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { sizes } from '../text-field/text-field-props';
|
|
2
|
+
/** 크기는 TextField 와 같다. 같은 입력 상자 CSS 를 쓴다 */
|
|
3
|
+
export { sizes };
|
|
4
|
+
export declare const splitTextFieldProps: {
|
|
5
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["xs", "s", "m", "l", "xl"]>;
|
|
6
|
+
width: import("../../helpers/types/propsDef").CSSPropsTypeWithoutValues<string | number>;
|
|
7
|
+
};
|
|
8
|
+
/** 주민등록번호 13자리. 뒤 7자리를 가린다 */
|
|
9
|
+
export declare const rrn13Spec: {
|
|
10
|
+
readonly lengths: readonly [6, 7];
|
|
11
|
+
readonly defaultMask: true;
|
|
12
|
+
readonly labels: readonly ["주민등록번호 앞 6자리", "주민등록번호 뒤 7자리"];
|
|
13
|
+
readonly hiddenDigits: 0;
|
|
14
|
+
readonly className: "split-text-field-rrn13";
|
|
15
|
+
};
|
|
16
|
+
/** 생년월일 6자리와 성별 1자리. 나머지 6자리는 점으로만 보인다 */
|
|
17
|
+
export declare const rrnFirst7Spec: {
|
|
18
|
+
readonly lengths: readonly [6, 1];
|
|
19
|
+
readonly defaultMask: false;
|
|
20
|
+
readonly labels: readonly ["주민등록번호 앞 6자리", "주민등록번호 뒤 첫 자리"];
|
|
21
|
+
readonly hiddenDigits: 6;
|
|
22
|
+
readonly className: "split-text-field-rrn-first7";
|
|
23
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
4
|
+
import { sizes } from './split-text-field-props';
|
|
5
|
+
export type BaseSplitTextFieldProps = ComponentPropsWithRef<'div'>;
|
|
6
|
+
/** 앞·뒤 칸 하나의 설정 */
|
|
7
|
+
export interface SplitTextFieldPartProps {
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** 변형 하나의 모양. 앞·뒤 칸 자릿수와 기본 가림, 칸마다 읽어 줄 이름 */
|
|
12
|
+
export interface SplitTextFieldSpec {
|
|
13
|
+
lengths: readonly [number, number];
|
|
14
|
+
defaultMask: boolean;
|
|
15
|
+
labels: readonly [string, string];
|
|
16
|
+
/** 뒤 칸 다음에 점으로만 보이는 나머지 자릿수. 입력받지 않는다 */
|
|
17
|
+
hiddenDigits: number;
|
|
18
|
+
/** 루트에 붙는 변형 클래스 */
|
|
19
|
+
className: string;
|
|
20
|
+
}
|
|
21
|
+
export interface SplitTextFieldProps extends StyleProps, TrackProps {
|
|
22
|
+
/** 앞 칸과 뒤 칸을 이은 숫자열(raw). 가림과 상관없이 숫자 그대로다 */
|
|
23
|
+
value?: string;
|
|
24
|
+
defaultValue?: string;
|
|
25
|
+
onChange?: (raw: string) => void;
|
|
26
|
+
/** 주면 이 이름의 hidden input 이 raw 를 폼에 싣는다 */
|
|
27
|
+
name?: string;
|
|
28
|
+
/** 두 칸 위의 라벨. 두 칸을 묶은 group 의 이름이 된다 */
|
|
29
|
+
title?: ReactNode;
|
|
30
|
+
helperText?: ReactNode;
|
|
31
|
+
isError?: boolean;
|
|
32
|
+
size?: (typeof sizes)[number];
|
|
33
|
+
width?: number | string;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
first?: SplitTextFieldPartProps;
|
|
36
|
+
second?: SplitTextFieldPartProps;
|
|
37
|
+
/** 뒤 칸을 비밀번호처럼 가린다. 기본은 변형마다 다르다(RRN13 true, RRNFirst7 false) */
|
|
38
|
+
mask?: boolean;
|
|
39
|
+
/** 값이 있고 포커스가 안에 있으면 지우기 버튼(X)을 띄운다. 두 칸을 함께 비운다 */
|
|
40
|
+
clearable?: boolean;
|
|
41
|
+
/** 지우기 버튼으로 지운 뒤 불린다. onChange 는 그 앞에 '' 로 불린다 */
|
|
42
|
+
onClear?: () => void;
|
|
43
|
+
}
|
|
44
|
+
export interface SplitTextFieldBodyProps extends SplitTextFieldProps {
|
|
45
|
+
spec: SplitTextFieldSpec;
|
|
46
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SplitTextFieldProps } from './split-text-field-type';
|
|
2
|
+
declare const SplitTextField: {
|
|
3
|
+
RRN13: import("react").ForwardRefExoticComponent<SplitTextFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
RRNFirst7: import("react").ForwardRefExoticComponent<SplitTextFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
};
|
|
6
|
+
export default SplitTextField;
|
|
7
|
+
export type { SplitTextFieldPartProps, SplitTextFieldProps } from './split-text-field-type';
|
|
@@ -0,0 +1,38 @@
|
|
|
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("./split-text-field-type").SplitTextFieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["xs", "s", "m", "l", "xl"];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
title: string;
|
|
20
|
+
width: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
/** 13자리. 앞 칸 6자리를 채우면 뒤 칸으로 넘어가고 뒤 7자리는 가려진다. */
|
|
26
|
+
export declare const RRN13: Story;
|
|
27
|
+
/** 생년월일 6자리와 성별 한 자리. 나머지 6자리는 점으로만 보인다. */
|
|
28
|
+
export declare const RRNFirst7: Story;
|
|
29
|
+
/** xs·s·m·l·xl 다섯 크기다. TextField 와 같은 높이·글자 단계다. */
|
|
30
|
+
export declare const Sizes: Story;
|
|
31
|
+
/** onChange 는 두 칸을 이은 숫자열을 받는다. 가림과 상관없이 숫자 그대로다. 아래 글이 실제 값이다. */
|
|
32
|
+
export declare const Controlled: Story;
|
|
33
|
+
/** mask 로 뒤 칸 가림을 켜고 끈다. RRN13 은 기본으로 가리고 RRNFirst7 은 기본으로 보인다. */
|
|
34
|
+
export declare const Mask: Story;
|
|
35
|
+
/** helperText 는 회색 안내, isError 면 테두리와 문구가 빨개지고 두 칸에 aria-invalid 가 붙는다. */
|
|
36
|
+
export declare const HelperAndError: Story;
|
|
37
|
+
/** disabled 는 두 칸을, first·second 의 disabled 는 한 칸만 끈다. placeholder 도 칸마다 준다. */
|
|
38
|
+
export declare const Disabled: Story;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
/** all: 단계 이름을 모두 보인다. current: 지금 단계 이름만(카드 안처럼 좁을 때) */
|
|
2
2
|
export declare const labelVisibility: readonly ["all", "current"];
|
|
3
|
+
/** bar: 단계마다 막대(기본). icon: 단계마다 둥근 표시를 이음선으로 잇는다 */
|
|
4
|
+
export declare const variants: readonly ["bar", "icon"];
|
|
5
|
+
/** 막대 두께는 ProgressBar 와 같은 이름·값(--progress-thickness-*)이다 */
|
|
6
|
+
export declare const sizes: readonly ["s", "m", "l"];
|
|
3
7
|
export declare const stepProgressProps: {
|
|
8
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
9
|
+
variant: {
|
|
10
|
+
type: "className";
|
|
11
|
+
className: string;
|
|
12
|
+
values: readonly ["bar", "icon"];
|
|
13
|
+
};
|
|
4
14
|
labelVisibility: {
|
|
5
15
|
type: "className";
|
|
6
16
|
className: string;
|
|
@@ -1,17 +1,36 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { StyleProps } from '../../helpers/types/common-props';
|
|
3
|
-
import { labelVisibility } from './step-progress-props';
|
|
3
|
+
import { labelVisibility, sizes, variants } from './step-progress-props';
|
|
4
4
|
export type StepState = 'done' | 'current' | 'todo';
|
|
5
|
+
/** 아이콘이 있는 단계. icon 은 variant='icon' 의 둥근 표시 안에 들어간다 */
|
|
6
|
+
export interface StepItem {
|
|
7
|
+
label: ReactNode;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
}
|
|
5
10
|
export interface StepProgressProps extends StyleProps {
|
|
6
|
-
/** 단계
|
|
7
|
-
steps: ReactNode
|
|
11
|
+
/** 단계 이름 또는 { label, icon }. 순서대로 */
|
|
12
|
+
steps: Array<ReactNode | StepItem>;
|
|
8
13
|
/** 지금 단계의 순번(0부터). steps.length 면 모두 끝난 것이다 */
|
|
9
14
|
current: number;
|
|
15
|
+
/** 막대 두께·이름 글자·간격. s 2px·m 4px(기본)·l 8px, ProgressBar 와 같은 두께다 */
|
|
16
|
+
size?: (typeof sizes)[number];
|
|
10
17
|
labelVisibility?: (typeof labelVisibility)[number];
|
|
18
|
+
/** bar: 단계마다 막대(기본). icon: 단계마다 둥근 표시(아이콘이나 1부터의 번호)를 이음선으로 잇는다 */
|
|
19
|
+
variant?: (typeof variants)[number];
|
|
20
|
+
/** variant='icon' 에서 끝난 단계에 체크를 그린다. false 면 단계의 아이콘·번호를 끝남 색으로 둔다. 기본 true */
|
|
21
|
+
checkForFinish?: boolean;
|
|
11
22
|
/** 'aria-label' 로 붙는다 (예: '진행 단계') */
|
|
12
23
|
label: string;
|
|
24
|
+
/** current 가 바뀌면 막대가 차오른다. 처음 그릴 때는 전환 없이 그린다. 기본 true */
|
|
25
|
+
animated?: boolean;
|
|
26
|
+
/** 처음 그릴 때 단계를 차례로 보인다. 숫자면 단계 사이 간격(ms). animated 일 때만 돈다. 기본 false */
|
|
27
|
+
stagger?: boolean | number;
|
|
28
|
+
/** stagger 의 첫 단계가 나타나기 전 기다리는 시간(ms) */
|
|
29
|
+
delay?: number;
|
|
13
30
|
}
|
|
14
31
|
export type StepProgressRootProps = ComponentPropsWithRef<'ol'>;
|
|
15
32
|
export interface StepProgressStepProps extends ComponentPropsWithRef<'li'> {
|
|
16
33
|
state: StepState;
|
|
34
|
+
/** 막대 앞 둥근 표시의 내용. 주면 표시를 그린다 */
|
|
35
|
+
marker?: ReactNode;
|
|
17
36
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { StepProgressProps } from './step-progress-type';
|
|
2
2
|
declare const StepProgress: import("react").ForwardRefExoticComponent<StepProgressProps & import("react").RefAttributes<HTMLOListElement>>;
|
|
3
3
|
export default StepProgress;
|
|
4
|
-
export type { StepProgressProps } from './step-progress-type';
|
|
4
|
+
export type { StepItem, StepProgressProps } from './step-progress-type';
|