@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,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 2046;
|
|
3
|
+
export const __webpack_esm_ids__ = [2046];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 2046
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ U: () => (/* binding */ useHideOnScroll)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
13
|
+
|
|
14
|
+
var THROTTLE_MS = 50;
|
|
15
|
+
var isScrollTarget = function isScrollTarget(target) {
|
|
16
|
+
return typeof target.addEventListener === 'function';
|
|
17
|
+
};
|
|
18
|
+
var isWindow = function isWindow(target) {
|
|
19
|
+
return target.window === target;
|
|
20
|
+
};
|
|
21
|
+
var scrollTopOf = function scrollTopOf(target) {
|
|
22
|
+
return isWindow(target) ? target.scrollY : target.scrollTop;
|
|
23
|
+
};
|
|
24
|
+
/** 아래로 스크롤하면 true(숨김), 위로 스크롤하거나 꼭대기면 false */
|
|
25
|
+
var useHideOnScroll = function useHideOnScroll(_a) {
|
|
26
|
+
var _b = _a === void 0 ? {} : _a,
|
|
27
|
+
_c = _b.enabled,
|
|
28
|
+
enabled = _c === void 0 ? true : _c,
|
|
29
|
+
_d = _b.threshold,
|
|
30
|
+
threshold = _d === void 0 ? 1 : _d,
|
|
31
|
+
target = _b.target;
|
|
32
|
+
var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
33
|
+
hidden = _e[0],
|
|
34
|
+
setHidden = _e[1];
|
|
35
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
36
|
+
if (!enabled) {
|
|
37
|
+
setHidden(false);
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
var element = target === undefined ? window : isScrollTarget(target) ? target : target.current;
|
|
41
|
+
if (!element) return undefined;
|
|
42
|
+
var anchor = scrollTopOf(element);
|
|
43
|
+
var timer;
|
|
44
|
+
var check = function check() {
|
|
45
|
+
timer = undefined;
|
|
46
|
+
var top = scrollTopOf(element);
|
|
47
|
+
if (top <= 0) {
|
|
48
|
+
anchor = 0;
|
|
49
|
+
setHidden(false);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
var delta = top - anchor;
|
|
53
|
+
if (Math.abs(delta) < threshold) return;
|
|
54
|
+
anchor = top;
|
|
55
|
+
setHidden(delta > 0);
|
|
56
|
+
};
|
|
57
|
+
var onScroll = function onScroll() {
|
|
58
|
+
if (timer === undefined) timer = setTimeout(check, THROTTLE_MS);
|
|
59
|
+
};
|
|
60
|
+
element.addEventListener('scroll', onScroll, {
|
|
61
|
+
passive: true
|
|
62
|
+
});
|
|
63
|
+
return function () {
|
|
64
|
+
element.removeEventListener('scroll', onScroll);
|
|
65
|
+
if (timer !== undefined) clearTimeout(timer);
|
|
66
|
+
};
|
|
67
|
+
}, [enabled, threshold, target]);
|
|
68
|
+
return hidden;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
/***/ }
|
|
72
|
+
|
|
73
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 2060;
|
|
3
|
+
export const __webpack_esm_ids__ = [2060,4917,7298];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 7298
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ Iw: () => (/* binding */ widthProp)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* unused harmony exports size, sizeProp */
|
|
13
|
+
/** 모든 컴포넌트가 함께 쓰는 크기 이름. px 은 styles/token/size.css 에 있다. */
|
|
14
|
+
var size = (/* unused pure expression or super */ null && (['xs', 's', 'm', 'l', 'xl']));
|
|
15
|
+
/** 컴포넌트는 다섯 이름 중 지원하는 것만 고른다. `size-{값}` 클래스가 붙는다. */
|
|
16
|
+
var sizeProp = function sizeProp(values, defaultValue) {
|
|
17
|
+
return {
|
|
18
|
+
type: 'className',
|
|
19
|
+
className: 'size',
|
|
20
|
+
values: values,
|
|
21
|
+
"default": defaultValue
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
var widthProp = function widthProp(defaultValue) {
|
|
25
|
+
return {
|
|
26
|
+
type: 'css',
|
|
27
|
+
key: 'width',
|
|
28
|
+
"default": defaultValue
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/***/ }
|
|
33
|
+
|
|
34
|
+
};
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 2308;
|
|
3
|
+
export const __webpack_esm_ids__ = [2308];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 9074
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ Gk: () => (/* binding */ semanticColor),
|
|
11
|
+
/* harmony export */ TU: () => (/* binding */ fontSizeClass)
|
|
12
|
+
/* harmony export */ });
|
|
13
|
+
/* unused harmony exports fontSize, weight, color, textAlign, textDecoration, wordBreak, whiteSpace, styleClassProps, textProps */
|
|
14
|
+
/* harmony import */ var _styles_token_colors__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(7232);
|
|
15
|
+
var __spreadArray = undefined && undefined.__spreadArray || function (to, from, pack) {
|
|
16
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
17
|
+
if (ar || !(i in from)) {
|
|
18
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
19
|
+
ar[i] = from[i];
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// 글자 크기 단계다. 컴포넌트 크기 이름(xs·s·m·l·xl)과 축이 달라 따로 둔다.
|
|
26
|
+
var fontSize = (/* unused pure expression or super */ null && (['xsm', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl']));
|
|
27
|
+
var weight = (/* unused pure expression or super */ null && (['regular', 'medium', 'semibold', 'bold', 'extrabold']));
|
|
28
|
+
// `2xl` 처럼 숫자로 시작하는 클래스는 선택자로 쓸 수 없어 `t-` 를 붙인다. Text 의 CSS 를 함께 쓰는 Paragraph·Post 도 이것으로 클래스를 만든다.
|
|
29
|
+
var fontSizeClass = function fontSizeClass(size) {
|
|
30
|
+
return /^\d+xl$/.test(size) ? "t-".concat(size) : size;
|
|
31
|
+
};
|
|
32
|
+
// 의미 이름(`text-primary` → `--text-primary`). 다크에서 값이 바뀐다(ADR 0012). 원시 이름은 라이트 값에 묶인다(ADR 0004)
|
|
33
|
+
var semanticColor = ['text-primary', 'text-body', 'text-secondary', 'text-tertiary', 'text-muted', 'text-placeholder', 'text-disabled', 'text-inverse', 'text-on-brand', 'text-on-brand-subtle', 'text-on-overlay', 'text-on-disabled', 'text-brand', 'text-brand-active', 'text-brand-emphasis', 'text-brand-secondary', 'text-danger', 'text-error', 'text-success', 'text-warning'];
|
|
34
|
+
var color = __spreadArray(__spreadArray([], semanticColor, true), Object.keys(_styles_token_colors__WEBPACK_IMPORTED_MODULE_0__/* .colors */ .T), true);
|
|
35
|
+
// 아래 값은 CSS 표기(`pre-line`)로 받고 클래스는 camelCase(`whiteSpace-preLine`)다.
|
|
36
|
+
// getMergedProps 는 값을 그대로 붙이므로 이 변환은 text.tsx 의 styleClass 가 한다.
|
|
37
|
+
var textAlign = (/* unused pure expression or super */ null && (['left', 'center']));
|
|
38
|
+
var textDecoration = (/* unused pure expression or super */ null && (['underline', 'none', 'line-through', 'overline', 'blink']));
|
|
39
|
+
var wordBreak = (/* unused pure expression or super */ null && (['normal', 'break-all', 'break-word', 'keep-all']));
|
|
40
|
+
var whiteSpace = (/* unused pure expression or super */ null && (['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap']));
|
|
41
|
+
var styleClassProps = (/* unused pure expression or super */ null && (['textAlign', 'textDecoration', 'wordBreak', 'whiteSpace']));
|
|
42
|
+
var textProps = {
|
|
43
|
+
color: {
|
|
44
|
+
type: 'className',
|
|
45
|
+
className: 'color',
|
|
46
|
+
values: color
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/***/ },
|
|
51
|
+
|
|
52
|
+
/***/ 7359
|
|
53
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
54
|
+
|
|
55
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
56
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
57
|
+
/* harmony export */ });
|
|
58
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
59
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
60
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(3274);
|
|
61
|
+
/* harmony import */ var _core_composer__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(2777);
|
|
62
|
+
/* harmony import */ var _icon_icon__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(3547);
|
|
63
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
64
|
+
__assign = Object.assign || function (t) {
|
|
65
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
66
|
+
s = arguments[i];
|
|
67
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
68
|
+
}
|
|
69
|
+
return t;
|
|
70
|
+
};
|
|
71
|
+
return __assign.apply(this, arguments);
|
|
72
|
+
};
|
|
73
|
+
var __rest = undefined && undefined.__rest || function (s, e) {
|
|
74
|
+
var t = {};
|
|
75
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
76
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
77
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
78
|
+
}
|
|
79
|
+
return t;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
var ParagraphRootBase = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
87
|
+
var className = props.className,
|
|
88
|
+
restProps = __rest(props, ["className"]);
|
|
89
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", __assign({
|
|
90
|
+
ref: ref,
|
|
91
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-paragraph root', className)
|
|
92
|
+
}, restProps));
|
|
93
|
+
});
|
|
94
|
+
ParagraphRootBase.displayName = 'ParagraphRoot';
|
|
95
|
+
var ParagraphText = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
96
|
+
var className = props.className,
|
|
97
|
+
restProps = __rest(props, ["className"]);
|
|
98
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", __assign({
|
|
99
|
+
ref: ref,
|
|
100
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-paragraph text', className)
|
|
101
|
+
}, restProps));
|
|
102
|
+
});
|
|
103
|
+
ParagraphText.displayName = 'ParagraphText';
|
|
104
|
+
var ParagraphIcon = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
105
|
+
var className = props.className,
|
|
106
|
+
restProps = __rest(props, ["className"]);
|
|
107
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_icon_icon__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A, __assign({
|
|
108
|
+
ref: ref,
|
|
109
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-paragraph icon', className)
|
|
110
|
+
}, restProps));
|
|
111
|
+
});
|
|
112
|
+
ParagraphIcon.displayName = 'ParagraphIcon';
|
|
113
|
+
var ParagraphBadge = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
114
|
+
var className = props.className,
|
|
115
|
+
restProps = __rest(props, ["className"]);
|
|
116
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", __assign({
|
|
117
|
+
ref: ref,
|
|
118
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-paragraph badge', className)
|
|
119
|
+
}, restProps));
|
|
120
|
+
});
|
|
121
|
+
ParagraphBadge.displayName = 'ParagraphBadge';
|
|
122
|
+
var ParagraphLink = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
123
|
+
var _a = props.asChild,
|
|
124
|
+
asChild = _a === void 0 ? false : _a,
|
|
125
|
+
className = props.className,
|
|
126
|
+
restProps = __rest(props, ["asChild", "className"]);
|
|
127
|
+
var Comp = asChild ? _core_composer__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A : 'a';
|
|
128
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Comp, __assign({
|
|
129
|
+
ref: ref,
|
|
130
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_2__/* .classNames */ .x)('nuri-theme base-paragraph link', className)
|
|
131
|
+
}, restProps));
|
|
132
|
+
});
|
|
133
|
+
ParagraphLink.displayName = 'ParagraphLink';
|
|
134
|
+
var ParagraphRoot = Object.assign(ParagraphRootBase, {
|
|
135
|
+
Text: ParagraphText,
|
|
136
|
+
Icon: ParagraphIcon,
|
|
137
|
+
Badge: ParagraphBadge,
|
|
138
|
+
Link: ParagraphLink
|
|
139
|
+
});
|
|
140
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ParagraphRoot);
|
|
141
|
+
|
|
142
|
+
/***/ },
|
|
143
|
+
|
|
144
|
+
/***/ 7066
|
|
145
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
146
|
+
|
|
147
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
148
|
+
/* harmony export */ BM: () => (/* binding */ paragraphProps),
|
|
149
|
+
/* harmony export */ mg: () => (/* binding */ paragraphTextProps),
|
|
150
|
+
/* harmony export */ y9: () => (/* binding */ paragraphBadgeProps)
|
|
151
|
+
/* harmony export */ });
|
|
152
|
+
/* unused harmony export badgeVariant */
|
|
153
|
+
/* harmony import */ var _elements_text_text_props__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(9074);
|
|
154
|
+
|
|
155
|
+
/** 문단 안 뱃지 색. Badge 의 variant 에서 테두리 모양(outlined)만 뺐다 */
|
|
156
|
+
var badgeVariant = ['neutral', 'primary', 'danger', 'success', 'warning'];
|
|
157
|
+
// 클래스 이름이 Text 의 `color-*` 와 같아 text-style.css 의 색 규칙을 그대로 쓴다
|
|
158
|
+
var paragraphProps = {
|
|
159
|
+
color: {
|
|
160
|
+
type: 'className',
|
|
161
|
+
className: 'color',
|
|
162
|
+
values: _elements_text_text_props__WEBPACK_IMPORTED_MODULE_0__/* .semanticColor */ .Gk,
|
|
163
|
+
"default": 'text-body'
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
var paragraphTextProps = {
|
|
167
|
+
color: {
|
|
168
|
+
type: 'className',
|
|
169
|
+
className: 'color',
|
|
170
|
+
values: _elements_text_text_props__WEBPACK_IMPORTED_MODULE_0__/* .semanticColor */ .Gk
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
var paragraphBadgeProps = {
|
|
174
|
+
variant: {
|
|
175
|
+
type: 'className',
|
|
176
|
+
className: 'variant',
|
|
177
|
+
values: badgeVariant,
|
|
178
|
+
"default": 'neutral'
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
/***/ }
|
|
183
|
+
|
|
184
|
+
};
|
package/dist/chunk-2777.js
CHANGED
|
@@ -9,6 +9,7 @@ export const __webpack_esm_modules__ = {
|
|
|
9
9
|
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
10
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
11
|
/* harmony export */ });
|
|
12
|
+
/* unused harmony export composeRefs */
|
|
12
13
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
13
14
|
var __assign = undefined && undefined.__assign || function () {
|
|
14
15
|
__assign = Object.assign || function (t) {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 3091;
|
|
3
|
+
export const __webpack_esm_ids__ = [3091];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 3091
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ O: () => (/* binding */ useRevealChildren)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
13
|
+
/* harmony import */ var _utils_classNames__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(3274);
|
|
14
|
+
/* harmony import */ var _stagger__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(4577);
|
|
15
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
16
|
+
__assign = Object.assign || function (t) {
|
|
17
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
+
s = arguments[i];
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
return __assign.apply(this, arguments);
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
var countElements = function countElements(children) {
|
|
29
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children).filter(react__WEBPACK_IMPORTED_MODULE_0__.isValidElement).length;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* stagger 를 받은 목록이 자식 요소마다 .motion-reveal 과 순서(--i)를 단다. 자식은 className·style 을 자기 루트에 합치는 컴포넌트다.
|
|
33
|
+
* 첫 렌더에 있던 자식만 차례로 나타난다. 나중에 더해진 자식은 바로 보인다.
|
|
34
|
+
*/
|
|
35
|
+
var useRevealChildren = function useRevealChildren(children, stagger) {
|
|
36
|
+
var revealCount = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(function () {
|
|
37
|
+
return stagger === undefined || stagger === false ? 0 : countElements(children);
|
|
38
|
+
})[0];
|
|
39
|
+
var gap = typeof stagger === 'number' ? stagger : undefined;
|
|
40
|
+
var order = 0;
|
|
41
|
+
return react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, function (child) {
|
|
42
|
+
if (! /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(child)) return child;
|
|
43
|
+
var index = order++;
|
|
44
|
+
if (index >= revealCount) return child;
|
|
45
|
+
return /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, {
|
|
46
|
+
className: (0,_utils_classNames__WEBPACK_IMPORTED_MODULE_1__/* .classNames */ .x)(child.props.className, 'motion-reveal'),
|
|
47
|
+
style: __assign(__assign({}, child.props.style), (0,_stagger__WEBPACK_IMPORTED_MODULE_2__/* .staggerStyle */ .L)(index, gap))
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/***/ }
|
|
53
|
+
|
|
54
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 3297;
|
|
3
|
+
export const __webpack_esm_ids__ = [3297];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 3297
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __nuri_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ y: () => (/* binding */ useCloseOnBackEvent)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(1041);
|
|
13
|
+
|
|
14
|
+
var STATE_KEY = '@nurihaus/web-design-system/back-event';
|
|
15
|
+
var seqOf = function seqOf(state) {
|
|
16
|
+
var value = state === null || state === void 0 ? void 0 : state[STATE_KEY];
|
|
17
|
+
return typeof value === 'number' ? value : 0;
|
|
18
|
+
};
|
|
19
|
+
// 닫으며 부른 history.back() 의 popstate 가 오기 전에 다음 pushState 를 하면 브라우저가 그 back 을 버리거나 엉뚱한 항목으로 간다.
|
|
20
|
+
// 그래서 back 은 한 번에 하나만 하고, 그 popstate 가 올 때까지 push 를 미룬다.
|
|
21
|
+
var sync = function sync(stack) {
|
|
22
|
+
var entries = stack.entries;
|
|
23
|
+
if (entries.some(function (e) {
|
|
24
|
+
return e.phase === 'popping';
|
|
25
|
+
})) return;
|
|
26
|
+
var leaving = entries.filter(function (e) {
|
|
27
|
+
return e.phase === 'pushed' && !e.wanted;
|
|
28
|
+
}).sort(function (a, b) {
|
|
29
|
+
return b.seq - a.seq;
|
|
30
|
+
})[0];
|
|
31
|
+
if (leaving) {
|
|
32
|
+
leaving.phase = 'popping';
|
|
33
|
+
window.history.back();
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
entries.forEach(function (entry) {
|
|
37
|
+
var _a;
|
|
38
|
+
if (entry.phase !== 'idle' || !entry.wanted) return;
|
|
39
|
+
stack.seq += 1;
|
|
40
|
+
entry.seq = stack.seq;
|
|
41
|
+
entry.phase = 'pushed';
|
|
42
|
+
window.history.pushState((_a = {}, _a[STATE_KEY] = entry.seq, _a), '');
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var remove = function remove(stack, entry) {
|
|
46
|
+
stack.entries = stack.entries.filter(function (e) {
|
|
47
|
+
return e !== entry;
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var handlePopState = function handlePopState(stack, event) {
|
|
51
|
+
var popping = stack.entries.find(function (e) {
|
|
52
|
+
return e.phase === 'popping';
|
|
53
|
+
});
|
|
54
|
+
if (popping) {
|
|
55
|
+
popping.phase = 'idle';
|
|
56
|
+
if (!popping.mounted) remove(stack, popping);
|
|
57
|
+
if (stack.entries.length === 0) window.removeEventListener('popstate', stack.onPopState);
|
|
58
|
+
sync(stack);
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
// 뒤로 가기 한 번에 그 위에 쌓인 것이 모두 닫힌다. 겹친 오버레이는 나중에 연 것부터 하나씩 닫힌다.
|
|
62
|
+
var reached = seqOf(event.state);
|
|
63
|
+
stack.entries.forEach(function (entry) {
|
|
64
|
+
if (entry.phase !== 'pushed' || entry.seq <= reached) return;
|
|
65
|
+
entry.phase = 'idle';
|
|
66
|
+
entry.wanted = false;
|
|
67
|
+
entry.close();
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
// Modal·Drawer 진입점마다 이 모듈이 따로 번들된다. history 는 하나라 쌓인 순서도 전역 키 하나에 둔다.
|
|
71
|
+
var STACK_KEY = Symbol["for"]('@nurihaus/web-design-system/back-stack');
|
|
72
|
+
var getStack = function getStack() {
|
|
73
|
+
var registry = globalThis;
|
|
74
|
+
if (!registry[STACK_KEY]) {
|
|
75
|
+
var stack_1 = {
|
|
76
|
+
entries: [],
|
|
77
|
+
seq: 0,
|
|
78
|
+
onPopState: function onPopState(event) {
|
|
79
|
+
return handlePopState(stack_1, event);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
registry[STACK_KEY] = stack_1;
|
|
83
|
+
}
|
|
84
|
+
return registry[STACK_KEY];
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* 열린 동안 history 항목을 하나 쌓아, 뒤로 가기가 페이지를 떠나지 않고 이 오버레이를 닫게 한다.
|
|
88
|
+
* 다른 길로 닫히면 쌓은 항목을 history.back() 으로 되돌린다.
|
|
89
|
+
*/
|
|
90
|
+
var useCloseOnBackEvent = function useCloseOnBackEvent(_a) {
|
|
91
|
+
var open = _a.open,
|
|
92
|
+
enabled = _a.enabled,
|
|
93
|
+
onClose = _a.onClose;
|
|
94
|
+
var onCloseRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(onClose);
|
|
95
|
+
onCloseRef.current = onClose;
|
|
96
|
+
var entry = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(function () {
|
|
97
|
+
return {
|
|
98
|
+
phase: 'idle',
|
|
99
|
+
wanted: false,
|
|
100
|
+
mounted: false,
|
|
101
|
+
seq: 0,
|
|
102
|
+
close: function close() {
|
|
103
|
+
return onCloseRef.current();
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
})[0];
|
|
107
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
108
|
+
if (typeof window === 'undefined') return undefined;
|
|
109
|
+
var stack = getStack();
|
|
110
|
+
if (stack.entries.length === 0) window.addEventListener('popstate', stack.onPopState);
|
|
111
|
+
entry.mounted = true;
|
|
112
|
+
stack.entries.push(entry);
|
|
113
|
+
return function () {
|
|
114
|
+
entry.mounted = false;
|
|
115
|
+
entry.wanted = false;
|
|
116
|
+
if (entry.phase === 'idle') remove(stack, entry);
|
|
117
|
+
if (stack.entries.length === 0) window.removeEventListener('popstate', stack.onPopState);
|
|
118
|
+
sync(stack);
|
|
119
|
+
};
|
|
120
|
+
}, [entry]);
|
|
121
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
122
|
+
if (typeof window === 'undefined') return;
|
|
123
|
+
entry.wanted = open && enabled;
|
|
124
|
+
sync(getStack());
|
|
125
|
+
}, [entry, open, enabled]);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/***/ }
|
|
129
|
+
|
|
130
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
export const __webpack_esm_id__ = 3640;
|
|
3
|
+
export const __webpack_esm_ids__ = [3640];
|
|
4
|
+
export const __webpack_esm_modules__ = {
|
|
5
|
+
|
|
6
|
+
/***/ 3640
|
|
7
|
+
(__unused_webpack_module, __webpack_exports__, __nuri_require__) {
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// EXPORTS
|
|
11
|
+
__nuri_require__.d(__webpack_exports__, {
|
|
12
|
+
H: () => (/* binding */ useEffectTrigger)
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react","module":"react"}
|
|
16
|
+
var external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_ = __nuri_require__(1041);
|
|
17
|
+
;// ./helpers/motion/effects.ts
|
|
18
|
+
/** data-effect 이름 → 의미 토큰. styles/motion.css 의 키프레임 이름이 motion-{토큰}-{이름} 이다 */
|
|
19
|
+
var effects = {
|
|
20
|
+
shake: 'reject',
|
|
21
|
+
wiggle: 'reject',
|
|
22
|
+
shine: 'attention',
|
|
23
|
+
blink: 'attention'
|
|
24
|
+
};
|
|
25
|
+
var effectAnimationName = function effectAnimationName(name) {
|
|
26
|
+
return "motion-".concat(effects[name], "-").concat(name);
|
|
27
|
+
};
|
|
28
|
+
;// ./helpers/motion/use-effect-trigger.ts
|
|
29
|
+
var __assign = undefined && undefined.__assign || function () {
|
|
30
|
+
__assign = Object.assign || function (t) {
|
|
31
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
32
|
+
s = arguments[i];
|
|
33
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
34
|
+
}
|
|
35
|
+
return t;
|
|
36
|
+
};
|
|
37
|
+
return __assign.apply(this, arguments);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
var IDLE = {
|
|
42
|
+
phase: 'idle'
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* data-effect 로 거는 1회짜리 CSS 효과. 요소에 data-effect={effect} 와 onAnimationEnd 를 단다.
|
|
46
|
+
* trigger(name, times) 는 재생 중이어도 처음부터 다시 times 번 재생한다.
|
|
47
|
+
*/
|
|
48
|
+
var useEffectTrigger = function useEffectTrigger() {
|
|
49
|
+
var _a = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useState)(IDLE),
|
|
50
|
+
state = _a[0],
|
|
51
|
+
setState = _a[1];
|
|
52
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useEffect)(function () {
|
|
53
|
+
if (state.phase !== 'arming') return;
|
|
54
|
+
// 같은 data-effect 를 떼었다 다시 달아도 그 사이에 스타일 계산이 없으면 브라우저는 애니메이션을 새로 시작하지 않는다
|
|
55
|
+
document.documentElement.getBoundingClientRect();
|
|
56
|
+
setState(__assign(__assign({}, state), {
|
|
57
|
+
phase: 'playing'
|
|
58
|
+
}));
|
|
59
|
+
}, [state]);
|
|
60
|
+
var trigger = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useCallback)(function (name, times) {
|
|
61
|
+
if (times === void 0) {
|
|
62
|
+
times = 1;
|
|
63
|
+
}
|
|
64
|
+
var remaining = Math.floor(times);
|
|
65
|
+
if (remaining < 1) return;
|
|
66
|
+
setState({
|
|
67
|
+
phase: 'arming',
|
|
68
|
+
name: name,
|
|
69
|
+
remaining: remaining
|
|
70
|
+
});
|
|
71
|
+
}, []);
|
|
72
|
+
var onAnimationEnd = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_module_react_.useCallback)(function (event) {
|
|
73
|
+
if (event.target !== event.currentTarget) return;
|
|
74
|
+
var animationName = event.animationName;
|
|
75
|
+
setState(function (current) {
|
|
76
|
+
if (current.phase !== 'playing' || animationName !== effectAnimationName(current.name)) {
|
|
77
|
+
return current;
|
|
78
|
+
}
|
|
79
|
+
return current.remaining > 1 ? __assign(__assign({}, current), {
|
|
80
|
+
phase: 'arming',
|
|
81
|
+
remaining: current.remaining - 1
|
|
82
|
+
}) : IDLE;
|
|
83
|
+
});
|
|
84
|
+
}, []);
|
|
85
|
+
return {
|
|
86
|
+
effect: state.phase === 'playing' ? state.name : undefined,
|
|
87
|
+
trigger: trigger,
|
|
88
|
+
onAnimationEnd: onAnimationEnd
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/***/ }
|
|
93
|
+
|
|
94
|
+
};
|