@nurihaus/web-design-system 3.9.2 → 3.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/.storybook/migration.d.ts +1 -0
- package/dist/.storybook/preview.d.ts +49 -0
- package/dist/.storybook/usage.d.ts +23 -0
- package/dist/agreement.js +1110 -0
- package/dist/ai/components.md +4159 -335
- package/dist/ai/motion.md +209 -135
- package/dist/ai/tokens.md +331 -145
- package/dist/alphabet-keypad.js +446 -0
- package/dist/asset.js +370 -0
- package/dist/avatar.js +251 -34
- package/dist/bar-chart.js +478 -0
- package/dist/board-row.js +379 -0
- package/dist/border.js +223 -0
- package/dist/bottom-cta.js +378 -0
- package/dist/bottom-info.js +253 -0
- package/dist/bottom-nav.js +33 -5
- package/dist/bottom-sheet.js +608 -0
- package/dist/breadcrumb.js +6 -3
- package/dist/card.js +5 -2
- package/dist/check-box.js +43 -140
- package/dist/chip-group.js +50 -12
- package/dist/chunk-1563.js +42 -18
- package/dist/chunk-1657.js +7 -3
- package/dist/{chunk-9387.js → chunk-1768.js} +2 -2
- package/dist/chunk-1983.js +136 -0
- package/dist/chunk-2046.js +73 -0
- package/dist/chunk-2060.js +34 -0
- package/dist/chunk-2308.js +184 -0
- package/dist/chunk-2777.js +1 -0
- package/dist/chunk-3091.js +54 -0
- package/dist/chunk-3297.js +130 -0
- package/dist/chunk-3640.js +94 -0
- package/dist/chunk-4109.js +115 -0
- package/dist/chunk-4205.js +47 -0
- package/dist/chunk-4324.js +109 -0
- package/dist/chunk-4328.js +69 -0
- package/dist/chunk-4558.js +18 -118
- package/dist/chunk-4577.js +35 -0
- package/dist/chunk-4917.js +1 -1
- package/dist/chunk-5302.js +111 -0
- package/dist/chunk-5670.js +94 -0
- package/dist/chunk-6096.js +176 -0
- package/dist/chunk-6302.js +10 -10
- package/dist/chunk-6478.js +155 -0
- package/dist/chunk-6499.js +39 -0
- package/dist/{chunk-5226.js → chunk-6616.js} +47 -42
- package/dist/chunk-6706.js +64 -0
- package/dist/chunk-674.js +133 -0
- package/dist/chunk-7024.js +152 -0
- package/dist/chunk-7232.js +122 -0
- package/dist/chunk-7298.js +1 -1
- package/dist/chunk-7302.js +66 -0
- package/dist/chunk-7460.js +204 -0
- package/dist/chunk-7589.js +40 -0
- package/dist/chunk-7593.js +85 -0
- package/dist/chunk-7653.js +16 -0
- package/dist/chunk-7737.js +21 -0
- package/dist/chunk-7739.js +1 -5
- package/dist/chunk-829.js +38 -0
- package/dist/chunk-8491.js +43 -0
- package/dist/chunk-8734.js +33 -0
- package/dist/chunk-8787.js +80 -0
- package/dist/chunk-8933.js +14 -2
- package/dist/chunk-8982.js +186 -0
- package/dist/chunk-910.js +82 -27
- package/dist/chunk-948.js +166 -0
- package/dist/chunk-9497.js +11 -1
- package/dist/collapsible-menu.js +39 -14
- package/dist/components/agreement/agreement-props.d.ts +44 -0
- package/dist/components/agreement/agreement-type.d.ts +107 -0
- package/dist/components/agreement/agreement.d.ts +26 -0
- package/dist/components/agreement/agreement.stories.d.ts +72 -0
- package/dist/components/agreement/base-agreement.d.ts +40 -0
- package/dist/components/asset/asset-props.d.ts +43 -0
- package/dist/components/asset/asset-type.d.ts +71 -0
- package/dist/components/asset/asset.d.ts +23 -0
- package/dist/components/asset/asset.stories.d.ts +71 -0
- package/dist/components/asset/base-asset.d.ts +11 -0
- package/dist/components/avatar/avatar-props.d.ts +1 -0
- package/dist/components/avatar/avatar-type.d.ts +6 -4
- package/dist/components/avatar/avatar.stories.d.ts +10 -0
- package/dist/components/badge/badge-type.d.ts +10 -4
- package/dist/components/badge/badge.stories.d.ts +15 -0
- package/dist/components/bar-chart/bar-chart-fill.d.ts +6 -0
- package/dist/components/bar-chart/bar-chart-props.d.ts +17 -0
- package/dist/components/bar-chart/bar-chart-type.d.ts +52 -0
- package/dist/components/bar-chart/bar-chart.d.ts +4 -0
- package/dist/components/bar-chart/bar-chart.stories.d.ts +65 -0
- package/dist/components/bar-chart/base-bar-chart.d.ts +17 -0
- package/dist/components/board-row/base-board-row.d.ts +13 -0
- package/dist/components/board-row/board-row-props.d.ts +2 -0
- package/dist/components/board-row/board-row-type.d.ts +22 -0
- package/dist/components/board-row/board-row.d.ts +8 -0
- package/dist/components/board-row/board-row.stories.d.ts +32 -0
- package/dist/components/border/base-border.d.ts +4 -0
- package/dist/components/border/border-props.d.ts +10 -0
- package/dist/components/border/border-type.d.ts +7 -0
- package/dist/components/border/border.d.ts +5 -0
- package/dist/components/border/border.stories.d.ts +19 -0
- package/dist/components/bottom-bar/bottom-bar.stories.d.ts +12 -5
- package/dist/components/bottom-cta/base-bottom-cta.d.ts +4 -0
- package/dist/components/bottom-cta/bottom-cta-props.d.ts +10 -0
- package/dist/components/bottom-cta/bottom-cta-type.d.ts +39 -0
- package/dist/components/bottom-cta/bottom-cta.d.ts +35 -0
- package/dist/components/bottom-cta/bottom-cta.stories.d.ts +79 -0
- package/dist/components/bottom-info/base-bottom-info.d.ts +4 -0
- package/dist/components/bottom-info/bottom-info-props.d.ts +1 -0
- package/dist/components/bottom-info/bottom-info-type.d.ts +6 -0
- package/dist/components/bottom-info/bottom-info.d.ts +4 -0
- package/dist/components/bottom-info/bottom-info.stories.d.ts +22 -0
- package/dist/components/bottom-nav/bottom-nav-type.d.ts +2 -1
- package/dist/components/bottom-nav/bottom-nav.stories.d.ts +16 -1
- package/dist/components/bottom-sheet/base-bottom-sheet.d.ts +17 -0
- package/dist/components/bottom-sheet/bottom-sheet-props.d.ts +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-snap.d.ts +15 -0
- package/dist/components/bottom-sheet/bottom-sheet-type.d.ts +55 -0
- package/dist/components/bottom-sheet/bottom-sheet.d.ts +4 -0
- package/dist/components/bottom-sheet/bottom-sheet.stories.d.ts +47 -0
- package/dist/components/breadcrumb/breadcrumb-type.d.ts +2 -1
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +15 -0
- package/dist/components/button/button-appearance.d.ts +50 -0
- package/dist/components/button/button-props.d.ts +12 -3
- package/dist/components/button/button-type.d.ts +14 -4
- package/dist/components/button/button.stories.d.ts +34 -3
- package/dist/components/button/cta-button.d.ts +1 -1
- package/dist/components/callout/callout.stories.d.ts +11 -0
- package/dist/components/card/card-type.d.ts +2 -1
- package/dist/components/card/card.stories.d.ts +9 -0
- package/dist/components/check-box/check-box-props.d.ts +8 -0
- package/dist/components/check-box/check-box-type.d.ts +10 -3
- package/dist/components/check-box/check-box.stories.d.ts +32 -1
- package/dist/components/chip-group/chip-group-props.d.ts +13 -1
- package/dist/components/chip-group/chip-group-type.d.ts +5 -1
- package/dist/components/chip-group/chip-group.stories.d.ts +30 -0
- package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +6 -2
- package/dist/components/collapsible-menu/collapsible-menu.stories.d.ts +12 -0
- package/dist/components/core/composer/index.d.ts +2 -0
- package/dist/components/description-list/description-list.stories.d.ts +7 -0
- package/dist/components/drawer/base-drawer.d.ts +2 -4
- package/dist/components/drawer/drawer-type.d.ts +17 -2
- package/dist/components/drawer/drawer.stories.d.ts +21 -0
- package/dist/components/drop-down/drop-down-type.d.ts +4 -2
- package/dist/components/drop-down/drop-down.stories.d.ts +16 -0
- package/dist/components/elements/text/text-props.d.ts +4 -3
- package/dist/components/elements/text/text-type.d.ts +3 -2
- package/dist/components/elements/text/text.stories.d.ts +13 -1
- package/dist/components/empty-state/empty-state-props.d.ts +5 -3
- package/dist/components/empty-state/empty-state-type.d.ts +17 -5
- package/dist/components/empty-state/empty-state.d.ts +8 -3
- package/dist/components/empty-state/empty-state.stories.d.ts +328 -11
- package/dist/components/grid-list/base-grid-list.d.ts +10 -0
- package/dist/components/grid-list/grid-list-props.d.ts +11 -0
- package/dist/components/grid-list/grid-list-type.d.ts +24 -0
- package/dist/components/grid-list/grid-list.d.ts +6 -0
- package/dist/components/grid-list/grid-list.stories.d.ts +30 -0
- package/dist/components/highlight/base-highlight.d.ts +14 -0
- package/dist/components/highlight/highlight-props.d.ts +2 -0
- package/dist/components/highlight/highlight-type.d.ts +42 -0
- package/dist/components/highlight/highlight.d.ts +4 -0
- package/dist/components/highlight/highlight.stories.d.ts +31 -0
- package/dist/components/icon/icon-paths.d.ts +16 -0
- package/dist/components/icon/icon.stories.d.ts +11 -1
- package/dist/components/icon-button/icon-button-type.d.ts +4 -1
- package/dist/components/icon-button/icon-button.stories.d.ts +11 -0
- package/dist/components/keypad/alphabet-keypad.d.ts +4 -0
- package/dist/components/keypad/alphabet-keypad.stories.d.ts +24 -0
- package/dist/components/keypad/base-keypad.d.ts +6 -0
- package/dist/components/keypad/full-secure-keypad.d.ts +4 -0
- package/dist/components/keypad/full-secure-keypad.stories.d.ts +26 -0
- package/dist/components/keypad/keypad-layout.d.ts +16 -0
- package/dist/components/keypad/keypad-props.d.ts +16 -0
- package/dist/components/keypad/keypad-type.d.ts +66 -0
- package/dist/components/keypad/number-keypad.d.ts +4 -0
- package/dist/components/keypad/number-keypad.stories.d.ts +26 -0
- package/dist/components/keypad/use-keypad-decoys.d.ts +10 -0
- package/dist/components/list/base-list.d.ts +3 -0
- package/dist/components/list/list-footer.d.ts +5 -0
- package/dist/components/list/list-footer.stories.d.ts +304 -0
- package/dist/components/list/list-group.d.ts +1 -1
- package/dist/components/list/list-group.stories.d.ts +9 -0
- package/dist/components/list/list-header.d.ts +5 -0
- package/dist/components/list/list-header.stories.d.ts +302 -0
- package/dist/components/list/list-props.d.ts +33 -1
- package/dist/components/list/list-row.d.ts +5 -4
- package/dist/components/list/list-row.stories.d.ts +33 -9
- package/dist/components/list/list-type.d.ts +46 -3
- package/dist/components/loading/index.d.ts +4 -0
- package/dist/components/loading/inline-loading/base-inline-loading.d.ts +3 -2
- package/dist/components/loading/inline-loading/inline-loading-props.d.ts +3 -0
- package/dist/components/loading/inline-loading/inline-loading-type.d.ts +6 -6
- package/dist/components/loading/inline-loading/inline-loading.stories.d.ts +28 -2
- package/dist/components/loading/loading-dots/base-loading-dots.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots-props.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots-type.d.ts +6 -0
- package/dist/components/loading/loading-dots/loading-dots.d.ts +4 -0
- package/dist/components/loading/loading-dots/loading-dots.stories.d.ts +37 -0
- package/dist/components/loading/loading-props.d.ts +9 -0
- package/dist/components/loading/loading-type.d.ts +9 -0
- package/dist/components/loading/loading.stories.d.ts +15 -0
- package/dist/components/loading/overlay-loading/overlay-loading-type.d.ts +4 -0
- package/dist/components/loading/overlay-loading/overlay-loading.stories.d.ts +17 -0
- package/dist/components/loading/progress-bar/base-progress-bar.d.ts +3 -0
- package/dist/components/loading/progress-bar/progress-bar-props.d.ts +4 -0
- package/dist/components/loading/progress-bar/progress-bar-type.d.ts +19 -0
- package/dist/components/loading/progress-bar/progress-bar.d.ts +4 -0
- package/dist/components/loading/progress-bar/progress-bar.stories.d.ts +63 -0
- package/dist/components/loading/spinner/spinner-props.d.ts +4 -1
- package/dist/components/loading/spinner/spinner-type.d.ts +3 -1
- package/dist/components/loading/spinner/spinner.d.ts +2 -1
- package/dist/components/loading/spinner/spinner.stories.d.ts +30 -4
- package/dist/components/logging/logging-type.d.ts +1 -1
- package/dist/components/logging/logging.stories.d.ts +5 -0
- package/dist/components/media/media-thumbnail.stories.d.ts +9 -0
- package/dist/components/media/media-type.d.ts +2 -1
- package/dist/components/media/media-viewer.stories.d.ts +7 -0
- package/dist/components/menu/base-menu.d.ts +21 -0
- package/dist/components/menu/menu-props.d.ts +2 -0
- package/dist/components/menu/menu-type.d.ts +70 -0
- package/dist/components/menu/menu.d.ts +8 -0
- package/dist/components/menu/menu.stories.d.ts +54 -0
- package/dist/components/message/message.stories.d.ts +16 -9
- package/dist/components/message-composer/message-composer-type.d.ts +2 -1
- package/dist/components/message-composer/message-composer.stories.d.ts +10 -0
- package/dist/components/modal/modal-type.d.ts +22 -3
- package/dist/components/modal/modal-with-double-button.stories.d.ts +15 -0
- package/dist/components/modal/modal.stories.d.ts +16 -0
- package/dist/components/motion/motion.stories.d.ts +7 -0
- package/dist/components/notice/notice-type.d.ts +1 -1
- package/dist/components/notice/notice.stories.d.ts +12 -5
- package/dist/components/numeric-spinner/base-numeric-spinner.d.ts +8 -0
- package/dist/components/numeric-spinner/numeric-spinner-props.d.ts +5 -0
- package/dist/components/numeric-spinner/numeric-spinner-type.d.ts +29 -0
- package/dist/components/numeric-spinner/numeric-spinner.d.ts +4 -0
- package/dist/components/numeric-spinner/numeric-spinner.stories.d.ts +36 -0
- package/dist/components/overlay/overlay-context.d.ts +44 -0
- package/dist/components/overlay/overlay-provider.d.ts +6 -0
- package/dist/components/overlay/overlay-type.d.ts +68 -0
- package/dist/components/overlay/overlay.d.ts +5 -0
- package/dist/components/overlay/overlay.stories.d.ts +36 -0
- package/dist/components/overlay/use-bottom-sheet.d.ts +3 -0
- package/dist/components/overlay/use-dialog.d.ts +3 -0
- package/dist/components/overlay/use-toast.d.ts +3 -0
- package/dist/components/pagination/pagination-type.d.ts +2 -1
- package/dist/components/pagination/pagination.stories.d.ts +15 -0
- package/dist/components/paragraph/base-paragraph.d.ts +14 -0
- package/dist/components/paragraph/paragraph-props.d.ts +25 -0
- package/dist/components/paragraph/paragraph-type.d.ts +33 -0
- package/dist/components/paragraph/paragraph.d.ts +9 -0
- package/dist/components/paragraph/paragraph.stories.d.ts +54 -0
- package/dist/components/post/base-post.d.ts +19 -0
- package/dist/components/post/post-props.d.ts +31 -0
- package/dist/components/post/post-type.d.ts +34 -0
- package/dist/components/post/post.d.ts +16 -0
- package/dist/components/post/post.stories.d.ts +35 -0
- package/dist/components/radio/base-radio.d.ts +5 -2
- package/dist/components/radio/radio-type.d.ts +11 -3
- package/dist/components/radio/radio.stories.d.ts +20 -2
- package/dist/components/rating/base-rating.d.ts +11 -0
- package/dist/components/rating/rating-props.d.ts +11 -0
- package/dist/components/rating/rating-type.d.ts +46 -0
- package/dist/components/rating/rating.d.ts +4 -0
- package/dist/components/rating/rating.stories.d.ts +35 -0
- package/dist/components/search-field/base-search-field.d.ts +4 -0
- package/dist/components/search-field/search-field-props.d.ts +2 -0
- package/dist/components/search-field/search-field-type.d.ts +25 -0
- package/dist/components/search-field/search-field.d.ts +8 -0
- package/dist/components/search-field/search-field.stories.d.ts +39 -0
- package/dist/components/segmented-control/base-segmented-control.d.ts +8 -0
- package/dist/components/segmented-control/segmented-control-props.d.ts +5 -0
- package/dist/components/segmented-control/segmented-control-type.d.ts +31 -0
- package/dist/components/segmented-control/segmented-control.d.ts +4 -0
- package/dist/components/segmented-control/segmented-control.stories.d.ts +39 -0
- package/dist/components/skeleton/base-skeleton.d.ts +7 -3
- package/dist/components/skeleton/skeleton-group-props.d.ts +4 -0
- package/dist/components/skeleton/skeleton-group-type.d.ts +47 -0
- package/dist/components/skeleton/skeleton-group.d.ts +4 -0
- package/dist/components/skeleton/skeleton-group.stories.d.ts +57 -0
- package/dist/components/skeleton/skeleton-type.d.ts +1 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +18 -7
- package/dist/components/slider/base-slider.d.ts +13 -0
- package/dist/components/slider/slider-props.d.ts +10 -0
- package/dist/components/slider/slider-type.d.ts +46 -0
- package/dist/components/slider/slider.d.ts +4 -0
- package/dist/components/slider/slider.stories.d.ts +38 -0
- package/dist/components/split-text-field/base-split-text-field.d.ts +4 -0
- package/dist/components/split-text-field/split-text-field-props.d.ts +23 -0
- package/dist/components/split-text-field/split-text-field-type.d.ts +46 -0
- package/dist/components/split-text-field/split-text-field.d.ts +7 -0
- package/dist/components/split-text-field/split-text-field.stories.d.ts +38 -0
- package/dist/components/step-progress/step-progress-props.d.ts +10 -0
- package/dist/components/step-progress/step-progress-type.d.ts +22 -3
- package/dist/components/step-progress/step-progress.d.ts +1 -1
- package/dist/components/step-progress/step-progress.stories.d.ts +40 -0
- package/dist/components/switch/base-switch.d.ts +2 -4
- package/dist/components/switch/switch-type.d.ts +5 -2
- package/dist/components/switch/switch.stories.d.ts +22 -0
- package/dist/components/table/table-type.d.ts +2 -1
- package/dist/components/table/table.stories.d.ts +23 -0
- package/dist/components/table-row/base-table-row.d.ts +4 -0
- package/dist/components/table-row/table-row-props.d.ts +14 -0
- package/dist/components/table-row/table-row-type.d.ts +13 -0
- package/dist/components/table-row/table-row.d.ts +5 -0
- package/dist/components/table-row/table-row.stories.d.ts +24 -0
- package/dist/components/tabs/tabs-type.d.ts +4 -1
- package/dist/components/tabs/tabs.stories.d.ts +17 -0
- package/dist/components/tag/tag-type.d.ts +2 -1
- package/dist/components/tag/tag.stories.d.ts +9 -0
- package/dist/components/text-area/base-text-area.d.ts +2 -1
- package/dist/components/text-area/text-area-type.d.ts +11 -3
- package/dist/components/text-area/text-area.stories.d.ts +15 -0
- package/dist/components/text-button/base-text-button.d.ts +3 -0
- package/dist/components/text-button/text-button-props.d.ts +19 -0
- package/dist/components/text-button/text-button-type.d.ts +17 -0
- package/dist/components/text-button/text-button.d.ts +5 -0
- package/dist/components/text-button/text-button.stories.d.ts +47 -0
- package/dist/components/text-field/base-text-field.d.ts +12 -6
- package/dist/components/text-field/text-field-type.d.ts +39 -7
- package/dist/components/text-field/text-field.stories.d.ts +32 -5
- package/dist/components/toast/toast-type.d.ts +4 -1
- package/dist/components/toast/toast.stories.d.ts +22 -7
- package/dist/components/tooltip/tooltip-type.d.ts +4 -1
- package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
- package/dist/components/top/base-top.d.ts +4 -0
- package/dist/components/top/top-props.d.ts +12 -0
- package/dist/components/top/top-type.d.ts +20 -0
- package/dist/components/top/top.d.ts +5 -0
- package/dist/components/top/top.stories.d.ts +320 -0
- package/dist/components.css +4192 -860
- package/dist/cta-button.js +96 -33
- package/dist/data-table.js +5 -3
- package/dist/drawer.js +90 -119
- package/dist/drop-down.js +19 -11
- package/dist/empty-state.js +16 -7
- package/dist/full-secure-keypad.js +524 -0
- package/dist/grid-list.js +378 -0
- package/dist/helpers/hooks/useCloseOnBackEvent.d.ts +12 -0
- package/dist/helpers/hooks/useFieldClear.d.ts +21 -0
- package/dist/helpers/hooks/useIndicatorPosition.d.ts +7 -0
- package/dist/helpers/hooks/useKeyboardInset.d.ts +5 -0
- package/dist/helpers/hooks/useReturnFocus.d.ts +9 -0
- package/dist/helpers/hooks/useScrollStart.d.ts +9 -0
- package/dist/helpers/motion/appear.d.ts +3 -0
- package/dist/helpers/motion/effects.d.ts +9 -0
- package/dist/helpers/motion/motion-props.d.ts +35 -0
- package/dist/helpers/motion/stagger.d.ts +3 -0
- package/dist/helpers/motion/use-appear.d.ts +12 -0
- package/dist/helpers/motion/use-attention-handle.d.ts +7 -0
- package/dist/helpers/motion/use-confirm-spring.d.ts +7 -0
- package/dist/helpers/motion/use-effect-trigger.d.ts +11 -0
- package/dist/helpers/motion/use-hide-on-scroll.d.ts +12 -0
- package/dist/helpers/motion/use-presence-callbacks.d.ts +13 -0
- package/dist/helpers/motion/use-reveal-children.d.ts +6 -0
- package/dist/helpers/types/propsDef.d.ts +4 -2
- package/dist/highlight.js +492 -0
- package/dist/icon-button.js +55 -96
- package/dist/icon-text-badge.js +29 -17
- package/dist/icon-text-option-badge.js +21 -13
- package/dist/index.d.ts +60 -5
- package/dist/index.js +15039 -5437
- package/dist/list-footer.js +339 -0
- package/dist/list-group.js +61 -18
- package/dist/list-header.js +293 -0
- package/dist/list-row.js +246 -26
- package/dist/loading.js +203 -40
- package/dist/media-thumbnail.js +11 -7
- package/dist/menu.js +527 -0
- package/dist/message-composer.js +15 -11
- package/dist/modal-with-double-button.js +76 -54
- package/dist/modal.js +97 -29
- package/dist/notice.js +19 -11
- package/dist/number-keypad.js +436 -0
- package/dist/numeric-spinner.js +396 -0
- package/dist/option-badge.js +29 -17
- package/dist/overlay.js +1747 -0
- package/dist/pagination.js +13 -9
- package/dist/paragraph.js +286 -0
- package/dist/post.js +568 -0
- package/dist/radio.js +119 -21
- package/dist/rating.js +437 -0
- package/dist/scripts/usage-doc.d.mts +83 -0
- package/dist/search-field.js +516 -0
- package/dist/segmented-control.js +409 -0
- package/dist/skeleton-group.js +322 -0
- package/dist/skeleton.js +26 -112
- package/dist/slider.js +419 -0
- package/dist/split-text-field.js +498 -0
- package/dist/step-progress.js +125 -16
- package/dist/styles.css +4063 -838
- package/dist/switch.js +91 -17
- package/dist/table-row.js +284 -0
- package/dist/tabs.js +62 -64
- package/dist/tag.js +4 -2
- package/dist/text-area.js +83 -31
- package/dist/text-button.js +357 -0
- package/dist/text-field.js +126 -156
- package/dist/text.js +5 -7
- package/dist/toast.js +100 -241
- package/dist/tokens/generated/motion.d.ts +21 -4
- package/dist/tokens/generated/semantic-admin.d.ts +103 -46
- package/dist/tokens/generated/semantic-app.d.ts +164 -16
- package/dist/tokens.css +636 -105
- package/dist/tokens.js +293 -71
- package/dist/tooltip.js +50 -22
- package/dist/top.js +312 -0
- package/package.json +120 -2
|
@@ -1,20 +1,46 @@
|
|
|
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("./inline-loading-type").InlineLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["s", "m", "l"];
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
20
|
+
};
|
|
6
21
|
justifyContent: {
|
|
7
22
|
control: "inline-radio";
|
|
8
23
|
options: readonly ["flex-start", "center", "flex-end", "space-between"];
|
|
9
24
|
};
|
|
10
25
|
};
|
|
11
26
|
args: {
|
|
12
|
-
size:
|
|
27
|
+
size: "m";
|
|
28
|
+
variant: "neutral";
|
|
13
29
|
justifyContent: "flex-start";
|
|
30
|
+
delay: false;
|
|
14
31
|
};
|
|
15
32
|
};
|
|
16
33
|
export default meta;
|
|
17
34
|
type Story = StoryObj<typeof meta>;
|
|
35
|
+
/** 기본 글자 불러오는 중을 단 인라인 로딩이다. */
|
|
18
36
|
export declare const Default: Story;
|
|
19
|
-
|
|
37
|
+
/** 무엇을 기다리는지 글자로 쓴다. 글자는 링과 같은 색이다. */
|
|
38
|
+
export declare const WithLabel: Story;
|
|
39
|
+
/** 정말 좁은 자리라 글자를 뺐다. 화면 읽기 프로그램에는 불러오는 중이라고 알린다. */
|
|
40
|
+
export declare const WithoutLabel: Story;
|
|
41
|
+
/** s·m 은 가로로, l 은 세로로 놓인다. l 은 빈 영역 가운데를 채울 때 쓴다. */
|
|
20
42
|
export declare const Sizes: Story;
|
|
43
|
+
/** neutral·brand 는 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
44
|
+
export declare const Variants: Story;
|
|
45
|
+
/** justifyContent 값별로 점선 상자 안에서 로딩 표시가 놓이는 자리를 본다. */
|
|
46
|
+
export declare const Justify: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const BaseLoadingDots: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
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
|
+
export default BaseLoadingDots;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
import { LoadingAppearanceProps } from '../loading-type';
|
|
4
|
+
export interface LoadingDotsProps extends StyleProps, LoadingAppearanceProps {
|
|
5
|
+
}
|
|
6
|
+
export type BaseLoadingDotsProps = ComponentPropsWithRef<'span'>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LoadingDotsProps } from './loading-dots-type';
|
|
2
|
+
declare const LoadingDots: import("react").ForwardRefExoticComponent<LoadingDotsProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
3
|
+
export default LoadingDots;
|
|
4
|
+
export type { LoadingDotsProps } from './loading-dots-type';
|
|
@@ -0,0 +1,37 @@
|
|
|
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("./loading-dots-type").LoadingDotsProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["s", "m", "l"];
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
args: {
|
|
23
|
+
size: "m";
|
|
24
|
+
variant: "neutral";
|
|
25
|
+
delay: false;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
/** 기본 점 셋이다. */
|
|
31
|
+
export declare const Default: Story;
|
|
32
|
+
/** s·m·l 세 크기다. 점 지름과 간격이 함께 바뀐다. */
|
|
33
|
+
export declare const Sizes: Story;
|
|
34
|
+
/** neutral·brand 는 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
35
|
+
export declare const Variants: Story;
|
|
36
|
+
/** 문장 끝에 붙인 점이다. 글자 크기에 맞춰 s 를 쓴다. */
|
|
37
|
+
export declare const InText: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropDef } from '../../helpers/types/propsDef';
|
|
2
|
+
/** 로딩 가족이 모두 같은 이름으로 쓰는 축. px 은 styles/token/size.css 의 --loading-*, 색은 styles/loading.css 에 있다 */
|
|
3
|
+
export declare const loadingSizes: readonly ["s", "m", "l"];
|
|
4
|
+
export declare const loadingVariants: readonly ["neutral", "brand", "inverse"];
|
|
5
|
+
export declare const loadingVariantProp: (defaultValue: (typeof loadingVariants)[number]) => PropDef<typeof loadingVariants>;
|
|
6
|
+
export declare const loadingProps: {
|
|
7
|
+
size: import("../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
8
|
+
variant: PropDef<readonly ["neutral", "brand", "inverse"]>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { loadingSizes, loadingVariants } from './loading-props';
|
|
2
|
+
/** 로딩 가족 공통 축. 이름과 뜻이 컴포넌트마다 같다 */
|
|
3
|
+
export interface LoadingAppearanceProps {
|
|
4
|
+
size?: (typeof loadingSizes)[number];
|
|
5
|
+
/** neutral 은 흰 바탕의 회색, brand 는 보라, inverse 는 보라·어두운 바탕 위의 흰색 */
|
|
6
|
+
variant?: (typeof loadingVariants)[number];
|
|
7
|
+
/** true(기본)면 300ms 안에 끝나는 로딩은 보이지 않는다. 자리와 role 은 바로 생긴다 */
|
|
8
|
+
delay?: boolean;
|
|
9
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
/** 용도마다 하나씩 놓았다. 스토리에서는 바로 보이게 delay 를 껐다. */
|
|
15
|
+
export declare const ByPurpose: Story;
|
|
@@ -3,6 +3,10 @@ import { StyleProps } from '../../../helpers/types/common-props';
|
|
|
3
3
|
export interface OverlayLoadingProps extends StyleProps {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
message?: string;
|
|
6
|
+
/** 0~100. 주면 스피너 대신 진행 막대를 그린다(업로드처럼 얼마나 남았는지 알 때) */
|
|
7
|
+
progress?: number;
|
|
8
|
+
/** true(기본)면 300ms 안에 끝나면 보이지 않는다. 조작은 처음부터 막는다 */
|
|
9
|
+
delay?: boolean;
|
|
6
10
|
backdropOpacity?: number;
|
|
7
11
|
zIndex?: number;
|
|
8
12
|
}
|
|
@@ -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("./overlay-loading-type").OverlayLoadingProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
backdropOpacity: {
|
|
@@ -20,14 +27,24 @@ declare const meta: {
|
|
|
20
27
|
message: string;
|
|
21
28
|
backdropOpacity: number;
|
|
22
29
|
zIndex: number;
|
|
30
|
+
delay: false;
|
|
23
31
|
};
|
|
24
32
|
};
|
|
25
33
|
export default meta;
|
|
26
34
|
type Story = StoryObj<typeof meta>;
|
|
35
|
+
/** 로딩 중... 문구를 단 화면 전체 덮개다. 아래 화면이 어둡게 가려지는지 본다. */
|
|
27
36
|
export declare const Default: Story;
|
|
37
|
+
/** 문구 없이 스피너만 있는 덮개다. */
|
|
28
38
|
export declare const WithoutMessage: Story;
|
|
39
|
+
/** 배경을 옅게(0.2) 덮고 저장 중입니다 문구를 단 덮개다. 아래 화면이 비쳐 보이는지 본다. */
|
|
29
40
|
export declare const LightBackdrop: Story;
|
|
41
|
+
/** progress 를 주면 스피너 대신 흰 진행 막대를 그린다. */
|
|
42
|
+
export declare const WithProgress: Story;
|
|
30
43
|
/** open 이 false 면 아무것도 그리지 않는다. */
|
|
31
44
|
export declare const Closed: Story;
|
|
32
45
|
/** 화면 전체를 덮어 뒤의 본문을 누를 수 없게 한다. */
|
|
33
46
|
export declare const OverContent: Story;
|
|
47
|
+
/** 켜면 화면 전체가 흐리게 덮인다. 2초 뒤 꺼지며 바로 사라진다. */
|
|
48
|
+
export declare const MotionEnter: Story;
|
|
49
|
+
/** 0.2초 걸리는 일과 2초 걸리는 일이다. delay 가 켜져 있으면 짧은 일에는 덮개가 보이지 않는다. 덮개는 처음부터 조작을 막는다. */
|
|
50
|
+
export declare const MotionDelay: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
+
import { LoadingAppearanceProps } from '../loading-type';
|
|
4
|
+
export interface ProgressBarProps extends StyleProps, LoadingAppearanceProps {
|
|
5
|
+
/** 0 부터 max 사이. 밖의 값은 끝으로 맞춘다. 없으면 끝을 모르는 진행이라 막대가 왼쪽에서 오른쪽으로 지난다 */
|
|
6
|
+
value?: number | null;
|
|
7
|
+
/** 기본 100 */
|
|
8
|
+
max?: number;
|
|
9
|
+
/** value 가 바뀌면 막대가 차오른다. 처음 그릴 때는 전환 없이 그린다. 기본 true */
|
|
10
|
+
animated?: boolean;
|
|
11
|
+
/** 'aria-label' 로 붙는다 (예: '업로드 진행률') */
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
export interface BaseProgressBarProps extends ComponentPropsWithRef<'div'> {
|
|
15
|
+
/** null 이면 끝을 모르는 진행이다 */
|
|
16
|
+
value: number | null;
|
|
17
|
+
max: number;
|
|
18
|
+
indicatorStyle?: CSSProperties;
|
|
19
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ProgressBarProps } from './progress-bar-type';
|
|
2
|
+
declare const ProgressBar: import("react").ForwardRefExoticComponent<ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export default ProgressBar;
|
|
4
|
+
export type { ProgressBarProps } from './progress-bar-type';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { loadingSizes, loadingVariants } from '../loading-props';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
component: import("react").ForwardRefExoticComponent<import("./progress-bar-type").ProgressBarProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
argTypes: {
|
|
14
|
+
size: {
|
|
15
|
+
control: "inline-radio";
|
|
16
|
+
options: readonly ["s", "m", "l"];
|
|
17
|
+
};
|
|
18
|
+
variant: {
|
|
19
|
+
control: "inline-radio";
|
|
20
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
21
|
+
};
|
|
22
|
+
value: {
|
|
23
|
+
control: {
|
|
24
|
+
type: "range";
|
|
25
|
+
min: number;
|
|
26
|
+
max: number;
|
|
27
|
+
step: number;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
args: {
|
|
32
|
+
value: number;
|
|
33
|
+
label: string;
|
|
34
|
+
size: "m";
|
|
35
|
+
variant: "brand";
|
|
36
|
+
delay: false;
|
|
37
|
+
};
|
|
38
|
+
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
39
|
+
value?: number | null | undefined;
|
|
40
|
+
max?: number | undefined;
|
|
41
|
+
animated?: boolean | undefined;
|
|
42
|
+
label: string;
|
|
43
|
+
className?: string | undefined;
|
|
44
|
+
style?: import("react").CSSProperties | undefined;
|
|
45
|
+
size?: (typeof loadingSizes)[number] | undefined;
|
|
46
|
+
variant?: (typeof loadingVariants)[number] | undefined;
|
|
47
|
+
delay?: boolean | undefined;
|
|
48
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
49
|
+
key?: import("react").Key | null | undefined;
|
|
50
|
+
}>) => import("react/jsx-runtime").JSX.Element)[];
|
|
51
|
+
};
|
|
52
|
+
export default meta;
|
|
53
|
+
type Story = StoryObj<typeof meta>;
|
|
54
|
+
/** 40% 진행한 막대다. */
|
|
55
|
+
export declare const Default: Story;
|
|
56
|
+
/** value 가 없으면 끝을 모르는 진행이다. 막대가 왼쪽 밖에서 오른쪽 밖으로 지난다. */
|
|
57
|
+
export declare const Indeterminate: Story;
|
|
58
|
+
/** s(2px)·m(4px)·l(8px) 두께다. */
|
|
59
|
+
export declare const Sizes: Story;
|
|
60
|
+
/** brand(기본)·neutral 은 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
61
|
+
export declare const Variants: Story;
|
|
62
|
+
/** 버튼을 누르면 20% 씩 차오른다. 오른쪽은 animated={false} 라 바로 바뀐다. */
|
|
63
|
+
export declare const MotionProgress: Story;
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
export declare const spinnerProps: {
|
|
1
|
+
export declare const spinnerProps: {
|
|
2
|
+
size: import("../../../helpers/types/propsDef").ClassNamePropsType<readonly ["s", "m", "l"]>;
|
|
3
|
+
variant: import("../../../helpers/types/propsDef").PropDef<readonly ["neutral", "brand", "inverse"]>;
|
|
4
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { StyleProps } from '../../../helpers/types/common-props';
|
|
3
|
-
|
|
3
|
+
import { LoadingAppearanceProps } from '../loading-type';
|
|
4
|
+
export interface SpinnerProps extends StyleProps, LoadingAppearanceProps {
|
|
5
|
+
}
|
|
4
6
|
export type BaseSpinnerProps = ComponentPropsWithRef<'div'>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { SpinnerProps } from './spinner-type';
|
|
2
|
+
declare const Spinner: import("react").ForwardRefExoticComponent<SpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
2
3
|
export default Spinner;
|
|
3
4
|
export type { SpinnerProps } from './spinner-type';
|
|
@@ -1,11 +1,37 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
4
|
+
parameters: {
|
|
5
|
+
docs: {
|
|
6
|
+
description: {
|
|
7
|
+
component: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
component: import("react").ForwardRefExoticComponent<import("./spinner-type").SpinnerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
argTypes: {
|
|
13
|
+
size: {
|
|
14
|
+
control: "inline-radio";
|
|
15
|
+
options: readonly ["s", "m", "l"];
|
|
16
|
+
};
|
|
17
|
+
variant: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: readonly ["neutral", "brand", "inverse"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
args: {
|
|
23
|
+
size: "m";
|
|
24
|
+
variant: "neutral";
|
|
25
|
+
delay: false;
|
|
26
|
+
};
|
|
5
27
|
};
|
|
6
28
|
export default meta;
|
|
7
29
|
type Story = StoryObj<typeof meta>;
|
|
30
|
+
/** 기본 스피너다. 스토리에서는 바로 보이게 delay 를 껐다. */
|
|
8
31
|
export declare const Default: Story;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
32
|
+
/** s·m·l 세 크기다. 링 지름과 선 두께가 함께 바뀐다. */
|
|
33
|
+
export declare const Sizes: Story;
|
|
34
|
+
/** neutral·brand 는 흰 바탕, inverse 는 어두운 바탕 위에 둔다. */
|
|
35
|
+
export declare const Variants: Story;
|
|
36
|
+
/** 0.2초 걸리는 일과 2초 걸리는 일이다. delay 가 켜져 있으면 짧은 일에는 스피너가 보이지 않는다. */
|
|
37
|
+
export declare const MotionDelay: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
/** 디자인시스템 컴포넌트가 내보내는 행동 이름. 수동 로그(useLog)는 다른 문자열도 쓸 수 있다. */
|
|
3
|
-
export type LogAction = 'click' | 'open' | 'close' | 'change' | 'show' | 'navigate';
|
|
3
|
+
export type LogAction = 'click' | 'open' | 'close' | 'change' | 'show' | 'navigate' | 'submit';
|
|
4
4
|
export interface LogEvent {
|
|
5
5
|
/** 컴포넌트 displayName. 수동 로그는 화면·모듈 이름 */
|
|
6
6
|
component: string;
|
|
@@ -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("./media-type").MediaThumbnailProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
size: {
|
|
@@ -32,3 +39,5 @@ export declare const Invalid: Story;
|
|
|
32
39
|
export declare const Removable: Story;
|
|
33
40
|
/** 말풍선 안. size l 은 폭을 채우되 240 을 넘지 않는다. */
|
|
34
41
|
export declare const InBubble: Story;
|
|
42
|
+
/** 썸네일을 누르고 있으면 줄어든다. 아래는 pressEffect={false} */
|
|
43
|
+
export declare const MotionPress: Story;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactElement } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
2
3
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
4
|
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
import { mediaTypes, sizes } from './media-props';
|
|
@@ -27,7 +28,7 @@ export interface MediaViewerProps extends MediaViewerRootProps, MediaSourceProps
|
|
|
27
28
|
/** 뷰어의 접근성 이름. 화면에는 안 보인다. 없으면 alt 를 쓴다 */
|
|
28
29
|
title?: string;
|
|
29
30
|
}
|
|
30
|
-
export interface MediaThumbnailProps extends MediaSourceProps, StyleProps, TrackProps {
|
|
31
|
+
export interface MediaThumbnailProps extends MediaSourceProps, StyleProps, TrackProps, PressEffectProps {
|
|
31
32
|
size?: (typeof sizes)[number];
|
|
32
33
|
/** alt 가 없을 때(영상 등) 썸네일 버튼의 aria-label (예: '영상 보기') */
|
|
33
34
|
viewLabel?: string;
|
|
@@ -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("./media-type").MediaViewerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
12
|
argTypes: {
|
|
6
13
|
type: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { MenuCheckItemBaseProps, MenuContentProps, MenuItemBaseProps, MenuRootProps, MenuTriggerProps } from './menu-type';
|
|
3
|
+
declare const MenuRoot: {
|
|
4
|
+
(props: PropsWithChildren<MenuRootProps>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
} & {
|
|
7
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<MenuTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Content: import("react").ForwardRefExoticComponent<Omit<MenuContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Label: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
10
|
+
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;
|
|
11
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Item: import("react").ForwardRefExoticComponent<Omit<MenuItemBaseProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
CheckItem: import("react").ForwardRefExoticComponent<Omit<MenuCheckItemBaseProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
ItemIndicator: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
|
|
15
|
+
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;
|
|
16
|
+
}, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
17
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
18
|
+
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;
|
|
19
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
};
|
|
21
|
+
export default MenuRoot;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { PressEffectProps } from '../../helpers/motion/motion-props';
|
|
3
|
+
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
5
|
+
import { aligns, sides } from './menu-props';
|
|
6
|
+
export type MenuSide = (typeof sides)[number];
|
|
7
|
+
export type MenuAlign = (typeof aligns)[number];
|
|
8
|
+
export interface MenuRootProps {
|
|
9
|
+
open?: boolean;
|
|
10
|
+
defaultOpen?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
}
|
|
13
|
+
export interface MenuTriggerProps extends ComponentPropsWithRef<'button'>, AsChildProps {
|
|
14
|
+
}
|
|
15
|
+
export interface MenuContentProps extends ComponentPropsWithRef<'div'> {
|
|
16
|
+
side?: MenuSide;
|
|
17
|
+
align?: MenuAlign;
|
|
18
|
+
/** 목록을 그릴 요소. Radix `DropdownMenu.Portal` 의 container. 없으면 document.body */
|
|
19
|
+
portalContainer?: HTMLElement;
|
|
20
|
+
}
|
|
21
|
+
export type MenuLabelProps = ComponentPropsWithRef<'div'>;
|
|
22
|
+
export interface MenuItemBaseProps extends Omit<ComponentPropsWithRef<'div'>, 'onSelect'>, AsChildProps {
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** `preventDefault()` 하면 메뉴가 닫히지 않는다 */
|
|
25
|
+
onSelect?: (event: Event) => void;
|
|
26
|
+
}
|
|
27
|
+
export interface MenuCheckItemBaseProps extends Omit<ComponentPropsWithRef<'div'>, 'onSelect'> {
|
|
28
|
+
checked: boolean;
|
|
29
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
onSelect?: (event: Event) => void;
|
|
32
|
+
}
|
|
33
|
+
export type MenuItemIndicatorProps = ComponentPropsWithRef<'span'>;
|
|
34
|
+
export type MenuSeparatorProps = ComponentPropsWithRef<'div'>;
|
|
35
|
+
export interface MenuProps extends MenuRootProps, StyleProps, TrackProps, PressEffectProps {
|
|
36
|
+
/** asChild 로 감싸 누르면 열리는 요소 */
|
|
37
|
+
trigger: ReactElement;
|
|
38
|
+
/** `Menu.Item` · `Menu.CheckItem` · `Menu.Separator` */
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
/** 트리거의 어느 쪽에 펼칠지. 기본 bottom */
|
|
41
|
+
side?: MenuSide;
|
|
42
|
+
/** 그 쪽에서 트리거의 어디에 맞출지. 기본 start */
|
|
43
|
+
align?: MenuAlign;
|
|
44
|
+
/** 목록 맨 위 제목 줄 */
|
|
45
|
+
header?: ReactNode;
|
|
46
|
+
/** 열린 동안 history 항목을 하나 쌓아 뒤로 가기가 메뉴를 닫는다. 기본 true */
|
|
47
|
+
closeOnBackEvent?: boolean;
|
|
48
|
+
/** 목록을 그릴 요소. 없으면 document.body */
|
|
49
|
+
portalContainer?: HTMLElement;
|
|
50
|
+
}
|
|
51
|
+
export interface MenuItemProps extends AsChildProps, StyleProps {
|
|
52
|
+
/** 사용 로그의 value. 개발자가 정한 id 만 */
|
|
53
|
+
id: string;
|
|
54
|
+
/** 라벨. asChild 면 라벨을 채울 링크 요소 하나 */
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
/** 라벨 앞 아이콘 자리 */
|
|
57
|
+
left?: ReactNode;
|
|
58
|
+
/** 라벨 뒤 단축키·배지 자리 */
|
|
59
|
+
right?: ReactNode;
|
|
60
|
+
disabled?: boolean;
|
|
61
|
+
onSelect?: () => void;
|
|
62
|
+
}
|
|
63
|
+
export interface MenuCheckItemProps extends StyleProps {
|
|
64
|
+
id: string;
|
|
65
|
+
children: ReactNode;
|
|
66
|
+
checked: boolean;
|
|
67
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export type MenuSeparatorItemProps = StyleProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { MenuCheckItemProps, MenuItemProps, MenuProps } from './menu-type';
|
|
2
|
+
declare const Menu: import("react").ForwardRefExoticComponent<MenuProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
|
+
Item: import("react").ForwardRefExoticComponent<MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
CheckItem: import("react").ForwardRefExoticComponent<MenuCheckItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
Separator: import("react").ForwardRefExoticComponent<import("../../helpers/types/common-props").StyleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
};
|
|
7
|
+
export default Menu;
|
|
8
|
+
export type { MenuCheckItemProps, MenuItemProps, MenuProps, MenuSeparatorItemProps, } from './menu-type';
|
|
@@ -0,0 +1,54 @@
|
|
|
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("./menu-type").MenuProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
12
|
+
Item: import("react").ForwardRefExoticComponent<import("./menu-type").MenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
CheckItem: import("react").ForwardRefExoticComponent<import("./menu-type").MenuCheckItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Separator: import("react").ForwardRefExoticComponent<import("../../helpers/types/common-props").StyleProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
side: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "select";
|
|
20
|
+
};
|
|
21
|
+
options: readonly ["top", "bottom", "left", "right"];
|
|
22
|
+
};
|
|
23
|
+
align: {
|
|
24
|
+
control: {
|
|
25
|
+
type: "select";
|
|
26
|
+
};
|
|
27
|
+
options: readonly ["start", "center", "end"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
args: {
|
|
31
|
+
trigger: import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
children: import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
/** 더보기 버튼을 누르면 아래에 행동 목록이 펼쳐진다. 항목이 위에서부터 차례로 나타난다. */
|
|
38
|
+
export declare const Default: Story;
|
|
39
|
+
/** 맨 위 제목 줄을 단 메뉴다. */
|
|
40
|
+
export declare const WithHeader: Story;
|
|
41
|
+
/** 라벨 뒤에 단축키를 단 항목이다. */
|
|
42
|
+
export declare const WithRight: Story;
|
|
43
|
+
/** 켜고 끄는 항목이다. 켜진 항목 오른쪽에 체크가 붙는다. */
|
|
44
|
+
export declare const CheckItems: Story;
|
|
45
|
+
/** 꺼진 항목은 흐리고 눌리지 않는다. 키보드 이동도 건너뛴다. */
|
|
46
|
+
export declare const Disabled: Story;
|
|
47
|
+
/** 링크 항목이다. asChild 로 a 하나가 항목이 된다. */
|
|
48
|
+
export declare const Link: Story;
|
|
49
|
+
/** 네 방향으로 펼친다. 버튼마다 목록이 어느 쪽에서 펼쳐지는지 본다. */
|
|
50
|
+
export declare const Sides: Story;
|
|
51
|
+
/** 같은 아래 방향에서 트리거의 시작·가운데·끝에 맞춘다. */
|
|
52
|
+
export declare const Aligns: Story;
|
|
53
|
+
/** 바깥 버튼으로 열고 닫는다. 항목을 골라 닫혀도 버튼 문구가 돌아오는지 본다. */
|
|
54
|
+
export declare const Controlled: Story;
|