@nizivo/react 0.0.0-stage → 0.2.0
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/LICENSE +202 -0
- package/README.md +120 -2
- package/THIRD_PARTY_NOTICES +68 -0
- package/dist/_engines/react-aria/dialog.client.js +126 -0
- package/dist/_engines/react-aria/dom-allowlist.js +19 -0
- package/dist/_engines/react-aria/dom.js +31 -0
- package/dist/_engines/react-aria/drawer.client.js +8 -0
- package/dist/_engines/react-aria/file-upload.client.js +50 -0
- package/dist/_engines/react-aria/locale.client.js +13 -0
- package/dist/_engines/react-aria/menu.client.js +229 -0
- package/dist/_engines/react-aria/open-state.client.js +53 -0
- package/dist/_engines/react-aria/outside-press.client.js +61 -0
- package/dist/_engines/react-aria/overlay.client.js +46 -0
- package/dist/_engines/react-aria/popover.client.js +148 -0
- package/dist/_engines/react-aria/popup.client.js +153 -0
- package/dist/_engines/react-aria/select.client.js +180 -0
- package/dist/_engines/react-aria/tabs.client.js +95 -0
- package/dist/_engines/react-aria/toast.client.js +38 -0
- package/dist/_engines/react-aria/tooltip.client.js +72 -0
- package/dist/_internal/cx.js +11 -0
- package/dist/_internal/data-status.d.ts +3 -0
- package/dist/_internal/data-status.js +13 -0
- package/dist/_internal/engine-part.d.ts +1 -0
- package/dist/_internal/field.js +20 -0
- package/dist/_internal/glyphs.js +87 -0
- package/dist/_internal/keys.js +62 -0
- package/dist/_internal/modal.client.js +54 -0
- package/dist/_internal/nested-focus.js +33 -0
- package/dist/_internal/overlay.d.ts +9 -0
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/alert/alert-dismiss.client.d.ts +32 -0
- package/dist/alert/alert-dismiss.client.js +38 -0
- package/dist/alert/alert.d.ts +28 -0
- package/dist/alert/alert.js +44 -0
- package/dist/alert/index.d.ts +3 -0
- package/dist/alert/index.js +3 -0
- package/dist/app-shell/app-shell.d.ts +24 -0
- package/dist/app-shell/app-shell.js +56 -0
- package/dist/app-shell/index.d.ts +2 -0
- package/dist/app-shell/index.js +1 -0
- package/dist/augment.d.ts +13 -0
- package/dist/augment.js +0 -0
- package/dist/avatar/avatar.d.ts +96 -0
- package/dist/avatar/avatar.js +94 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.js +1 -0
- package/dist/badge/badge.d.ts +19 -0
- package/dist/badge/badge.js +22 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.js +1 -0
- package/dist/banner/banner-dismiss.client.d.ts +32 -0
- package/dist/banner/banner-dismiss.client.js +38 -0
- package/dist/banner/banner.d.ts +34 -0
- package/dist/banner/banner.js +47 -0
- package/dist/banner/index.d.ts +3 -0
- package/dist/banner/index.js +3 -0
- package/dist/breadcrumb/breadcrumb.d.ts +46 -0
- package/dist/breadcrumb/breadcrumb.js +46 -0
- package/dist/breadcrumb/breadcrumb.parts.d.ts +6 -0
- package/dist/breadcrumb/breadcrumb.parts.js +9 -0
- package/dist/breadcrumb/index.d.ts +3 -0
- package/dist/breadcrumb/index.js +3 -0
- package/dist/button/button.d.ts +55 -0
- package/dist/button/button.js +62 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.js +1 -0
- package/dist/card/card.d.ts +64 -0
- package/dist/card/card.js +62 -0
- package/dist/card/card.parts.d.ts +6 -0
- package/dist/card/card.parts.js +14 -0
- package/dist/card/index.d.ts +3 -0
- package/dist/card/index.js +3 -0
- package/dist/checkbox/checkbox.client.d.ts +37 -0
- package/dist/checkbox/checkbox.client.js +81 -0
- package/dist/checkbox/index.d.ts +2 -0
- package/dist/checkbox/index.js +1 -0
- package/dist/chip-group/chip-group.client.d.ts +88 -0
- package/dist/chip-group/chip-group.client.js +157 -0
- package/dist/chip-group/index.d.ts +2 -0
- package/dist/chip-group/index.js +1 -0
- package/dist/choice-card/choice-card.client.d.ts +66 -0
- package/dist/choice-card/choice-card.client.js +138 -0
- package/dist/choice-card/index.d.ts +2 -0
- package/dist/choice-card/index.js +1 -0
- package/dist/config/config.client.d.ts +24 -0
- package/dist/config/config.client.js +33 -0
- package/dist/config/index.d.ts +2 -0
- package/dist/config/index.js +1 -0
- package/dist/container/container.d.ts +13 -0
- package/dist/container/container.js +16 -0
- package/dist/container/index.d.ts +2 -0
- package/dist/container/index.js +1 -0
- package/dist/contracts/details.d.ts +13 -0
- package/dist/contracts/details.js +9 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/merge-props.d.ts +16 -0
- package/dist/contracts/merge-props.js +76 -0
- package/dist/contracts/render.d.ts +17 -0
- package/dist/contracts/render.js +43 -0
- package/dist/contracts/state.d.ts +42 -0
- package/dist/contracts/state.js +42 -0
- package/dist/css/alert.css +2 -0
- package/dist/css/app-shell.css +2 -0
- package/dist/css/avatar.css +2 -0
- package/dist/css/badge.css +2 -0
- package/dist/css/banner.css +2 -0
- package/dist/css/base.css +2 -0
- package/dist/css/breadcrumb.css +2 -0
- package/dist/css/button.css +2 -0
- package/dist/css/card.css +2 -0
- package/dist/css/checkbox.css +2 -0
- package/dist/css/chip-group.css +2 -0
- package/dist/css/choice-card.css +2 -0
- package/dist/css/container.css +2 -0
- package/dist/css/delta.css +2 -0
- package/dist/css/dialog.css +2 -0
- package/dist/css/drawer.css +2 -0
- package/dist/css/empty-state.css +2 -0
- package/dist/css/field.css +2 -0
- package/dist/css/fieldset.css +2 -0
- package/dist/css/file-upload.css +2 -0
- package/dist/css/form.css +2 -0
- package/dist/css/grid.css +2 -0
- package/dist/css/heading.css +2 -0
- package/dist/css/icon-button.css +2 -0
- package/dist/css/image.css +2 -0
- package/dist/css/inline-error.css +2 -0
- package/dist/css/inline.css +2 -0
- package/dist/css/input.css +2 -0
- package/dist/css/kbd.css +2 -0
- package/dist/css/kpi-tile.css +2 -0
- package/dist/css/menu.css +2 -0
- package/dist/css/meter.css +2 -0
- package/dist/css/metric.css +2 -0
- package/dist/css/mobile-tab-bar.css +2 -0
- package/dist/css/mobile-top-bar.css +2 -0
- package/dist/css/motion.css +2 -0
- package/dist/css/native-select.css +2 -0
- package/dist/css/nav-item.css +2 -0
- package/dist/css/number-value.css +2 -0
- package/dist/css/page-header.css +2 -0
- package/dist/css/pagination.css +2 -0
- package/dist/css/password-input.css +2 -0
- package/dist/css/popover.css +2 -0
- package/dist/css/progress-bar.css +2 -0
- package/dist/css/progress-ring.css +2 -0
- package/dist/css/radio-group.css +2 -0
- package/dist/css/ranked-list.css +2 -0
- package/dist/css/search-field.css +2 -0
- package/dist/css/segmented-control.css +2 -0
- package/dist/css/select.css +2 -0
- package/dist/css/separator.css +2 -0
- package/dist/css/sidebar.css +2 -0
- package/dist/css/skeleton.css +2 -0
- package/dist/css/split.css +2 -0
- package/dist/css/stack.css +2 -0
- package/dist/css/sticky-bar.css +2 -0
- package/dist/css/switch.css +2 -0
- package/dist/css/tab-nav.css +2 -0
- package/dist/css/table-selection.css +2 -0
- package/dist/css/table.css +2 -0
- package/dist/css/tabs.css +2 -0
- package/dist/css/text.css +2 -0
- package/dist/css/textarea.css +2 -0
- package/dist/css/toast.css +2 -0
- package/dist/css/tooltip.css +2 -0
- package/dist/css/top-bar.css +2 -0
- package/dist/css/trend-card.css +2 -0
- package/dist/delta/delta.d.ts +32 -0
- package/dist/delta/delta.js +50 -0
- package/dist/delta/index.d.ts +2 -0
- package/dist/delta/index.js +1 -0
- package/dist/dialog/dialog.client.d.ts +25 -0
- package/dist/dialog/dialog.client.js +145 -0
- package/dist/dialog/dialog.contract.d.ts +97 -0
- package/dist/dialog/dialog.parts.d.ts +6 -0
- package/dist/dialog/dialog.parts.js +15 -0
- package/dist/dialog/index.d.ts +5 -0
- package/dist/dialog/index.js +3 -0
- package/dist/drawer/drawer.client.d.ts +25 -0
- package/dist/drawer/drawer.client.js +154 -0
- package/dist/drawer/drawer.contract.d.ts +98 -0
- package/dist/drawer/drawer.parts.d.ts +6 -0
- package/dist/drawer/drawer.parts.js +16 -0
- package/dist/drawer/index.d.ts +5 -0
- package/dist/drawer/index.js +3 -0
- package/dist/empty-state/empty-state.d.ts +18 -0
- package/dist/empty-state/empty-state.js +32 -0
- package/dist/empty-state/index.d.ts +2 -0
- package/dist/empty-state/index.js +1 -0
- package/dist/field/field-scope.client.d.ts +50 -0
- package/dist/field/field-scope.client.js +212 -0
- package/dist/field/field-static.d.ts +122 -0
- package/dist/field/field-static.js +159 -0
- package/dist/field/field.d.ts +5 -0
- package/dist/field/field.js +53 -0
- package/dist/field/index.d.ts +4 -0
- package/dist/field/index.js +4 -0
- package/dist/fieldset/fieldset.d.ts +36 -0
- package/dist/fieldset/fieldset.js +63 -0
- package/dist/fieldset/index.d.ts +2 -0
- package/dist/fieldset/index.js +1 -0
- package/dist/file-upload/file-upload.client.d.ts +9 -0
- package/dist/file-upload/file-upload.client.js +406 -0
- package/dist/file-upload/file-upload.contract.d.ts +112 -0
- package/dist/file-upload/index.d.ts +3 -0
- package/dist/file-upload/index.js +1 -0
- package/dist/file-upload/seam.d.ts +1 -0
- package/dist/form/form.client.d.ts +38 -0
- package/dist/form/form.client.js +127 -0
- package/dist/form/form.d.ts +36 -0
- package/dist/form/form.js +29 -0
- package/dist/form/index.d.ts +4 -0
- package/dist/form/index.js +4 -0
- package/dist/form/submit-button.client.d.ts +20 -0
- package/dist/form/submit-button.client.js +19 -0
- package/dist/grid/grid.d.ts +38 -0
- package/dist/grid/grid.js +28 -0
- package/dist/grid/index.d.ts +2 -0
- package/dist/grid/index.js +1 -0
- package/dist/heading/heading.d.ts +30 -0
- package/dist/heading/heading.js +26 -0
- package/dist/heading/index.d.ts +2 -0
- package/dist/heading/index.js +1 -0
- package/dist/i18n/format-label.d.ts +24 -0
- package/dist/i18n/format-label.js +19 -0
- package/dist/i18n/index.d.ts +2 -0
- package/dist/i18n/index.js +1 -0
- package/dist/icon-button/icon-button-static.d.ts +23 -0
- package/dist/icon-button/icon-button-static.js +83 -0
- package/dist/icon-button/icon-button.client.js +29 -0
- package/dist/icon-button/icon-button.contract.d.ts +89 -0
- package/dist/icon-button/icon-button.d.ts +5 -0
- package/dist/icon-button/icon-button.js +21 -0
- package/dist/icon-button/index.d.ts +4 -0
- package/dist/icon-button/index.js +3 -0
- package/dist/image/image.d.ts +28 -0
- package/dist/image/image.js +24 -0
- package/dist/image/index.d.ts +2 -0
- package/dist/image/index.js +1 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +96 -0
- package/dist/inline/index.d.ts +2 -0
- package/dist/inline/index.js +1 -0
- package/dist/inline/inline.d.ts +16 -0
- package/dist/inline/inline.js +14 -0
- package/dist/inline-error/index.d.ts +2 -0
- package/dist/inline-error/index.js +1 -0
- package/dist/inline-error/inline-error.d.ts +17 -0
- package/dist/inline-error/inline-error.js +33 -0
- package/dist/input/index.d.ts +2 -0
- package/dist/input/index.js +1 -0
- package/dist/input/input.client.d.ts +39 -0
- package/dist/input/input.client.js +82 -0
- package/dist/kbd/index.d.ts +2 -0
- package/dist/kbd/index.js +1 -0
- package/dist/kbd/kbd.d.ts +19 -0
- package/dist/kbd/kbd.js +68 -0
- package/dist/kpi-tile/index.d.ts +2 -0
- package/dist/kpi-tile/index.js +1 -0
- package/dist/kpi-tile/kpi-tile.d.ts +30 -0
- package/dist/kpi-tile/kpi-tile.js +48 -0
- package/dist/locales/en-US.d.ts +77 -0
- package/dist/locales/en-US.js +83 -0
- package/dist/menu/index.d.ts +5 -0
- package/dist/menu/index.js +3 -0
- package/dist/menu/menu.client.d.ts +14 -0
- package/dist/menu/menu.client.js +152 -0
- package/dist/menu/menu.contract.d.ts +152 -0
- package/dist/menu/menu.parts.d.ts +6 -0
- package/dist/menu/menu.parts.js +17 -0
- package/dist/meter/index.d.ts +2 -0
- package/dist/meter/index.js +1 -0
- package/dist/meter/meter.d.ts +43 -0
- package/dist/meter/meter.js +59 -0
- package/dist/metric/index.d.ts +2 -0
- package/dist/metric/index.js +1 -0
- package/dist/metric/metric.d.ts +72 -0
- package/dist/metric/metric.js +116 -0
- package/dist/mobile-tab-bar/index.d.ts +4 -0
- package/dist/mobile-tab-bar/index.js +4 -0
- package/dist/mobile-tab-bar/mobile-tab-bar-inset.client.js +38 -0
- package/dist/mobile-tab-bar/mobile-tab-bar-more.client.d.ts +26 -0
- package/dist/mobile-tab-bar/mobile-tab-bar-more.client.js +60 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.d.ts +39 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.js +54 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.parts.d.ts +6 -0
- package/dist/mobile-tab-bar/mobile-tab-bar.parts.js +9 -0
- package/dist/mobile-top-bar/index.d.ts +2 -0
- package/dist/mobile-top-bar/index.js +1 -0
- package/dist/mobile-top-bar/mobile-top-bar.d.ts +17 -0
- package/dist/mobile-top-bar/mobile-top-bar.js +31 -0
- package/dist/motion/count-up.client.d.ts +39 -0
- package/dist/motion/count-up.client.js +109 -0
- package/dist/motion/index.d.ts +2 -0
- package/dist/motion/index.js +1 -0
- package/dist/native-select/index.d.ts +2 -0
- package/dist/native-select/index.js +1 -0
- package/dist/native-select/native-select.d.ts +43 -0
- package/dist/native-select/native-select.js +56 -0
- package/dist/nav-item/index.d.ts +2 -0
- package/dist/nav-item/index.js +1 -0
- package/dist/nav-item/nav-item.d.ts +35 -0
- package/dist/nav-item/nav-item.js +50 -0
- package/dist/number-value/index.d.ts +2 -0
- package/dist/number-value/index.js +1 -0
- package/dist/number-value/number-value.d.ts +25 -0
- package/dist/number-value/number-value.js +26 -0
- package/dist/page-header/index.d.ts +2 -0
- package/dist/page-header/index.js +1 -0
- package/dist/page-header/page-header.d.ts +19 -0
- package/dist/page-header/page-header.js +39 -0
- package/dist/pagination/index.d.ts +2 -0
- package/dist/pagination/index.js +1 -0
- package/dist/pagination/pagination.d.ts +74 -0
- package/dist/pagination/pagination.js +136 -0
- package/dist/password-input/index.d.ts +2 -0
- package/dist/password-input/index.js +1 -0
- package/dist/password-input/password-input.client.d.ts +52 -0
- package/dist/password-input/password-input.client.js +106 -0
- package/dist/popover/index.d.ts +5 -0
- package/dist/popover/index.js +3 -0
- package/dist/popover/popover.client.d.ts +20 -0
- package/dist/popover/popover.client.js +113 -0
- package/dist/popover/popover.contract.d.ts +88 -0
- package/dist/popover/popover.parts.d.ts +6 -0
- package/dist/popover/popover.parts.js +13 -0
- package/dist/progress-bar/index.d.ts +2 -0
- package/dist/progress-bar/index.js +1 -0
- package/dist/progress-bar/progress-bar.d.ts +34 -0
- package/dist/progress-bar/progress-bar.js +55 -0
- package/dist/progress-ring/index.d.ts +2 -0
- package/dist/progress-ring/index.js +1 -0
- package/dist/progress-ring/progress-ring.d.ts +38 -0
- package/dist/progress-ring/progress-ring.js +67 -0
- package/dist/radio-group/index.d.ts +3 -0
- package/dist/radio-group/index.js +3 -0
- package/dist/radio-group/radio-group.client.d.ts +22 -0
- package/dist/radio-group/radio-group.client.js +70 -0
- package/dist/radio-group/radio-group.d.ts +28 -0
- package/dist/radio-group/radio-group.js +35 -0
- package/dist/ranked-list/index.d.ts +3 -0
- package/dist/ranked-list/index.js +3 -0
- package/dist/ranked-list/ranked-list.d.ts +85 -0
- package/dist/ranked-list/ranked-list.js +153 -0
- package/dist/ranked-list/ranked-list.parts.d.ts +6 -0
- package/dist/ranked-list/ranked-list.parts.js +10 -0
- package/dist/search-field/index.d.ts +2 -0
- package/dist/search-field/index.js +1 -0
- package/dist/search-field/search-field.client.d.ts +55 -0
- package/dist/search-field/search-field.client.js +136 -0
- package/dist/segmented-control/index.d.ts +3 -0
- package/dist/segmented-control/index.js +3 -0
- package/dist/segmented-control/segmented-control.client.d.ts +61 -0
- package/dist/segmented-control/segmented-control.client.js +156 -0
- package/dist/segmented-control/segmented-control.parts.d.ts +6 -0
- package/dist/segmented-control/segmented-control.parts.js +9 -0
- package/dist/select/index.d.ts +5 -0
- package/dist/select/index.js +3 -0
- package/dist/select/select.client.d.ts +12 -0
- package/dist/select/select.client.js +152 -0
- package/dist/select/select.contract.d.ts +119 -0
- package/dist/select/select.parts.d.ts +6 -0
- package/dist/select/select.parts.js +15 -0
- package/dist/separator/index.d.ts +2 -0
- package/dist/separator/index.js +1 -0
- package/dist/separator/separator.d.ts +26 -0
- package/dist/separator/separator.js +23 -0
- package/dist/sidebar/index.d.ts +4 -0
- package/dist/sidebar/index.js +4 -0
- package/dist/sidebar/sidebar-item.client.d.ts +10 -0
- package/dist/sidebar/sidebar-item.client.js +55 -0
- package/dist/sidebar/sidebar.d.ts +45 -0
- package/dist/sidebar/sidebar.js +62 -0
- package/dist/sidebar/sidebar.parts.d.ts +6 -0
- package/dist/sidebar/sidebar.parts.js +11 -0
- package/dist/skeleton/index.d.ts +2 -0
- package/dist/skeleton/index.js +1 -0
- package/dist/skeleton/skeleton.d.ts +20 -0
- package/dist/skeleton/skeleton.js +19 -0
- package/dist/split/index.d.ts +3 -0
- package/dist/split/index.js +3 -0
- package/dist/split/split.d.ts +28 -0
- package/dist/split/split.js +33 -0
- package/dist/split/split.parts.d.ts +6 -0
- package/dist/split/split.parts.js +10 -0
- package/dist/stack/index.d.ts +2 -0
- package/dist/stack/index.js +1 -0
- package/dist/stack/stack.d.ts +17 -0
- package/dist/stack/stack.js +14 -0
- package/dist/sticky-bar/index.d.ts +2 -0
- package/dist/sticky-bar/index.js +1 -0
- package/dist/sticky-bar/sticky-bar.d.ts +16 -0
- package/dist/sticky-bar/sticky-bar.js +26 -0
- package/dist/styles.css +595 -0
- package/dist/switch/index.d.ts +2 -0
- package/dist/switch/index.js +1 -0
- package/dist/switch/switch.client.d.ts +33 -0
- package/dist/switch/switch.client.js +63 -0
- package/dist/tab-nav/index.d.ts +3 -0
- package/dist/tab-nav/index.js +3 -0
- package/dist/tab-nav/tab-nav.d.ts +36 -0
- package/dist/tab-nav/tab-nav.js +47 -0
- package/dist/tab-nav/tab-nav.parts.d.ts +6 -0
- package/dist/tab-nav/tab-nav.parts.js +9 -0
- package/dist/table/index.d.ts +3 -0
- package/dist/table/index.js +3 -0
- package/dist/table/table.d.ts +101 -0
- package/dist/table/table.js +121 -0
- package/dist/table/table.parts.d.ts +6 -0
- package/dist/table/table.parts.js +18 -0
- package/dist/table-selection/index.d.ts +3 -0
- package/dist/table-selection/index.js +3 -0
- package/dist/table-selection/table-selection.client.d.ts +14 -0
- package/dist/table-selection/table-selection.client.js +84 -0
- package/dist/table-selection/table-selection.d.ts +34 -0
- package/dist/table-selection/table-selection.js +50 -0
- package/dist/tabs/index.d.ts +4 -0
- package/dist/tabs/index.js +3 -0
- package/dist/tabs/tabs.client.d.ts +8 -0
- package/dist/tabs/tabs.client.js +68 -0
- package/dist/tabs/tabs.contract.d.ts +89 -0
- package/dist/tabs/tabs.parts.d.ts +6 -0
- package/dist/tabs/tabs.parts.js +11 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.js +1 -0
- package/dist/text/text.d.ts +32 -0
- package/dist/text/text.js +17 -0
- package/dist/textarea/index.d.ts +2 -0
- package/dist/textarea/index.js +1 -0
- package/dist/textarea/textarea.client.d.ts +18 -0
- package/dist/textarea/textarea.client.js +31 -0
- package/dist/theme-script/index.d.ts +2 -0
- package/dist/theme-script/index.js +1 -0
- package/dist/theme-script/theme-script.d.ts +43 -0
- package/dist/theme-script/theme-script.js +46 -0
- package/dist/toast/index.d.ts +4 -0
- package/dist/toast/index.js +3 -0
- package/dist/toast/seam.d.ts +2 -0
- package/dist/toast/store.d.ts +19 -0
- package/dist/toast/store.js +136 -0
- package/dist/toast/toast.contract.d.ts +56 -0
- package/dist/toast/toaster.client.d.ts +10 -0
- package/dist/toast/toaster.client.js +305 -0
- package/dist/tooltip/index.d.ts +5 -0
- package/dist/tooltip/index.js +3 -0
- package/dist/tooltip/tooltip.client.d.ts +12 -0
- package/dist/tooltip/tooltip.client.js +51 -0
- package/dist/tooltip/tooltip.contract.d.ts +60 -0
- package/dist/tooltip/tooltip.parts.d.ts +6 -0
- package/dist/tooltip/tooltip.parts.js +10 -0
- package/dist/top-bar/index.d.ts +2 -0
- package/dist/top-bar/index.js +1 -0
- package/dist/top-bar/top-bar.d.ts +17 -0
- package/dist/top-bar/top-bar.js +35 -0
- package/dist/trend-card/index.d.ts +2 -0
- package/dist/trend-card/index.js +1 -0
- package/dist/trend-card/trend-card.d.ts +34 -0
- package/dist/trend-card/trend-card.js +74 -0
- package/package.json +447 -3
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ControlSize } from "../augment.js";
|
|
3
|
+
import { ChangeDetails, OpenReason } from "../contracts/details.js";
|
|
4
|
+
import "../_internal/engine-part.js";
|
|
5
|
+
import { Align, Side } from "../contracts/state.js";
|
|
6
|
+
import { CSSProperties, ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
7
|
+
//#region src/select/select.contract.d.ts
|
|
8
|
+
export type SelectValueReason = "item-press" | "keyboard" | "typeahead" | "form-reset";
|
|
9
|
+
/**
|
|
10
|
+
* Strings the engine renders (§9.3 rule 7). `placeholder` is passed to the engine.
|
|
11
|
+
* Engine-owned with React Aria (not overridable): the visually hidden "Dismiss" buttons in the popup.
|
|
12
|
+
*/
|
|
13
|
+
export interface SelectLabels {
|
|
14
|
+
/** Shown while no value is chosen. React Aria's default is its localized "Select an item". */
|
|
15
|
+
placeholder: string;
|
|
16
|
+
}
|
|
17
|
+
export interface SelectRootProps {
|
|
18
|
+
value?: string | null;
|
|
19
|
+
defaultValue?: string | null;
|
|
20
|
+
/** `details.reason` is `'unknown'` with React Aria, which reports no cause. */
|
|
21
|
+
onValueChange?: (value: string | null, details: ChangeDetails<SelectValueReason>) => void;
|
|
22
|
+
open?: boolean;
|
|
23
|
+
defaultOpen?: boolean;
|
|
24
|
+
onOpenChange?: (open: boolean, details: ChangeDetails<OpenReason>) => void;
|
|
25
|
+
/**
|
|
26
|
+
* With `name`, a hidden native `<select>` carries the value into `FormData`. Inside a `Field`, the
|
|
27
|
+
* Field's `name`, `required`, `disabled` and presented error apply unless set here (an explicit
|
|
28
|
+
* `false` wins), and a click on its label focuses the trigger without opening the listbox.
|
|
29
|
+
*/
|
|
30
|
+
name?: string;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
/** An error message is presented (owned by Field, never by the engine). Inside a Field, the Field sets it. */
|
|
34
|
+
invalid?: boolean;
|
|
35
|
+
placeholder?: SelectLabels["placeholder"];
|
|
36
|
+
"aria-label"?: string;
|
|
37
|
+
/** Names the trigger together with the value. Inside a Field, the Field label id goes here (§16.1). */
|
|
38
|
+
"aria-labelledby"?: string;
|
|
39
|
+
/** 32 / 40 / 48 px. @default 'md' */
|
|
40
|
+
size?: ControlSize;
|
|
41
|
+
className?: string;
|
|
42
|
+
children: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
export interface SelectRootState {
|
|
45
|
+
open: boolean;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
}
|
|
48
|
+
export interface SelectTriggerState {
|
|
49
|
+
open: boolean;
|
|
50
|
+
pressed: boolean;
|
|
51
|
+
focusVisible: boolean;
|
|
52
|
+
disabled: boolean;
|
|
53
|
+
}
|
|
54
|
+
export interface SelectValueState {
|
|
55
|
+
placeholder: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface SelectPopupState {
|
|
58
|
+
entering: boolean;
|
|
59
|
+
exiting: boolean;
|
|
60
|
+
side: Side;
|
|
61
|
+
}
|
|
62
|
+
export interface SelectItemState {
|
|
63
|
+
highlighted: boolean;
|
|
64
|
+
selected: boolean;
|
|
65
|
+
disabled: boolean;
|
|
66
|
+
focusVisible: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface SelectTriggerProps extends Omit<ComponentPropsWithRef<"button">, "children" | "disabled" | "type"> {
|
|
69
|
+
leadingIcon?: ReactNode;
|
|
70
|
+
/** Replaces the chevron glyph. */
|
|
71
|
+
indicator?: ReactNode;
|
|
72
|
+
/** Must render a `<button>` (a component that renders one is fine). */
|
|
73
|
+
render?: RenderProp<SelectTriggerState>;
|
|
74
|
+
/** Replaces the default `Select.Value`. */
|
|
75
|
+
children?: ReactNode;
|
|
76
|
+
}
|
|
77
|
+
export interface SelectValueProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
78
|
+
/** Must render a `<span>`. */
|
|
79
|
+
render?: RenderProp<SelectValueState>;
|
|
80
|
+
}
|
|
81
|
+
export interface SelectPopupProps {
|
|
82
|
+
/** @default 'bottom' */
|
|
83
|
+
side?: "top" | "bottom";
|
|
84
|
+
/** @default 'start' */
|
|
85
|
+
align?: Align;
|
|
86
|
+
/** Distance from the trigger in px. @default 4 */
|
|
87
|
+
sideOffset?: number;
|
|
88
|
+
/** Portal container. Defaults to the parent overlay, else `document.body` (§12.1 L2). */
|
|
89
|
+
container?: Element | null;
|
|
90
|
+
className?: string;
|
|
91
|
+
style?: CSSProperties;
|
|
92
|
+
children: ReactNode;
|
|
93
|
+
}
|
|
94
|
+
export interface SelectItemProps extends Omit<ComponentPropsWithRef<"div">, "children" | "id"> {
|
|
95
|
+
value: string;
|
|
96
|
+
/** Typeahead text; defaults to `children` when it is a string. */
|
|
97
|
+
textValue?: string;
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
/** Replaces the check shown at the end of the selected item; `null` shows none. Decorative. */
|
|
100
|
+
indicator?: ReactNode;
|
|
101
|
+
/** Must render a `<div>`. */
|
|
102
|
+
render?: RenderProp<SelectItemState>;
|
|
103
|
+
children: ReactNode;
|
|
104
|
+
}
|
|
105
|
+
type NoState = Record<string, never>;
|
|
106
|
+
export interface SelectGroupProps extends Omit<ComponentPropsWithRef<"section">, "id"> {
|
|
107
|
+
/** Must render a `<section>`. */
|
|
108
|
+
render?: RenderProp<NoState>;
|
|
109
|
+
}
|
|
110
|
+
export interface SelectGroupLabelProps extends Omit<ComponentPropsWithRef<"header">, "id"> {
|
|
111
|
+
/** Must render a `<header>`. */
|
|
112
|
+
render?: RenderProp<NoState>;
|
|
113
|
+
}
|
|
114
|
+
export interface SelectSeparatorProps extends Omit<ComponentPropsWithRef<"div">, "children"> {
|
|
115
|
+
/** Must render a `<div>`. */
|
|
116
|
+
render?: RenderProp<NoState>;
|
|
117
|
+
}
|
|
118
|
+
//#endregion
|
|
119
|
+
export type { OpenReason };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectGroup, SelectGroupLabel, SelectItem, SelectPopup, SelectRoot, SelectSeparator, SelectTrigger, SelectValue } from "./select.client.js";
|
|
2
|
+
declare namespace select_parts_d_exports {
|
|
3
|
+
export { SelectGroup as Group, SelectGroupLabel as GroupLabel, SelectItem as Item, SelectPopup as Popup, SelectRoot as Root, SelectSeparator as Separator, SelectTrigger as Trigger, SelectValue as Value };
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { SelectGroup as Group, SelectGroupLabel as GroupLabel, SelectItem as Item, SelectPopup as Popup, SelectRoot as Root, SelectSeparator as Separator, SelectTrigger as Trigger, SelectValue as Value, select_parts_d_exports };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { SelectGroup, SelectGroupLabel, SelectItem, SelectPopup, SelectRoot, SelectSeparator, SelectTrigger, SelectValue } from "./select.client.js";
|
|
3
|
+
//#region src/select/select.parts.ts
|
|
4
|
+
var select_parts_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Group: () => SelectGroup,
|
|
6
|
+
GroupLabel: () => SelectGroupLabel,
|
|
7
|
+
Item: () => SelectItem,
|
|
8
|
+
Popup: () => SelectPopup,
|
|
9
|
+
Root: () => SelectRoot,
|
|
10
|
+
Separator: () => SelectSeparator,
|
|
11
|
+
Trigger: () => SelectTrigger,
|
|
12
|
+
Value: () => SelectValue
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
export { SelectGroup as Group, SelectGroupLabel as GroupLabel, SelectItem as Item, SelectPopup as Popup, SelectRoot as Root, SelectSeparator as Separator, SelectTrigger as Trigger, SelectValue as Value, select_parts_exports };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from "./separator.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { Orientation } from "../contracts/state.js";
|
|
3
|
+
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
4
|
+
//#region src/separator/separator.d.ts
|
|
5
|
+
export interface SeparatorState {
|
|
6
|
+
orientation: Orientation;
|
|
7
|
+
decorative: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface SeparatorProps extends Omit<ComponentPropsWithRef<"hr">, "children"> {
|
|
10
|
+
/** A vertical separator stretches to the height of its flex row. @default 'horizontal' */
|
|
11
|
+
orientation?: Orientation;
|
|
12
|
+
/**
|
|
13
|
+
* Purely visual, hidden from assistive technology (`role="none"`): the Figma Divider default
|
|
14
|
+
* (7370:95, M35). Pass `decorative={false}` for a separator that means something on its own, a
|
|
15
|
+
* break between two groups a screen reader should hear (an `<hr>`'s implicit `separator` role,
|
|
16
|
+
* with `aria-orientation` when vertical). @default true
|
|
17
|
+
*/
|
|
18
|
+
decorative?: boolean;
|
|
19
|
+
render?: RenderProp<SeparatorState>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* An `<hr>`: a 1 px `border/subtle` line, Figma's Divider (7370:95). Decorative by default; spacing
|
|
23
|
+
* comes first, a line only when spacing is not enough (the Figma doc).
|
|
24
|
+
*/
|
|
25
|
+
export declare function Separator({ orientation, decorative, render, className, ...rest }: SeparatorProps): ReactElement;
|
|
26
|
+
//#endregion
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
//#region src/separator/separator.tsx
|
|
4
|
+
/**
|
|
5
|
+
* An `<hr>`: a 1 px `border/subtle` line, Figma's Divider (7370:95). Decorative by default; spacing
|
|
6
|
+
* comes first, a line only when spacing is not enough (the Figma doc).
|
|
7
|
+
*/
|
|
8
|
+
function Separator({ orientation = "horizontal", decorative = true, render, className, ...rest }) {
|
|
9
|
+
const native = render === void 0;
|
|
10
|
+
return renderElement("hr", render, {
|
|
11
|
+
orientation,
|
|
12
|
+
decorative
|
|
13
|
+
}, {
|
|
14
|
+
"data-slot": "separator",
|
|
15
|
+
"data-orientation": orientation,
|
|
16
|
+
...rest,
|
|
17
|
+
className: cx("nz-separator", className),
|
|
18
|
+
role: decorative ? "none" : native ? void 0 : "separator",
|
|
19
|
+
"aria-orientation": !decorative && orientation === "vertical" ? "vertical" : void 0
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Separator };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SidebarContent, SidebarContentProps, SidebarFooter, SidebarFooterProps, SidebarHeader, SidebarHeaderProps, SidebarLabels, SidebarRoot, SidebarRootProps } from "./sidebar.js";
|
|
2
|
+
import { SidebarItem, SidebarItemProps } from "./sidebar-item.client.js";
|
|
3
|
+
import { sidebar_parts_d_exports } from "./sidebar.parts.js";
|
|
4
|
+
export { sidebar_parts_d_exports as Sidebar, SidebarContent, type SidebarContentProps, SidebarFooter, type SidebarFooterProps, SidebarHeader, type SidebarHeaderProps, SidebarItem, type SidebarItemProps, type SidebarLabels, SidebarRoot, type SidebarRootProps };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SidebarContent, SidebarFooter, SidebarHeader, SidebarRoot } from "./sidebar.js";
|
|
2
|
+
import { SidebarItem } from "./sidebar-item.client.js";
|
|
3
|
+
import { sidebar_parts_exports } from "./sidebar.parts.js";
|
|
4
|
+
export { sidebar_parts_exports as Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarItem, SidebarRoot };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NavItemProps } from "../nav-item/nav-item.js";
|
|
2
|
+
import { ReactElement } from "react";
|
|
3
|
+
//#region src/sidebar/sidebar-item.client.d.ts
|
|
4
|
+
export type SidebarItemProps = NavItemProps;
|
|
5
|
+
/**
|
|
6
|
+
* A `NavItem` for a Sidebar: the same link, with a Tooltip that names it while the Sidebar is the
|
|
7
|
+
* icon rail (hover after the delay, keyboard focus at once; Escape closes it).
|
|
8
|
+
*/
|
|
9
|
+
export declare function SidebarItem({ className, ref, disabled, ...item }: SidebarItemProps): ReactElement;
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../_internal/cx.js";
|
|
3
|
+
import { TooltipPopup, TooltipRoot, TooltipTrigger } from "../tooltip/tooltip.client.js";
|
|
4
|
+
import { NavItem } from "../nav-item/nav-item.js";
|
|
5
|
+
import { useRef, useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/sidebar/sidebar-item.client.tsx
|
|
8
|
+
/** Whether `link`'s label is out of the layout: the rail's visually hidden label is 1 px wide. */
|
|
9
|
+
function inRail(link) {
|
|
10
|
+
const label = link?.querySelector(".nz-nav-item-label");
|
|
11
|
+
return label instanceof HTMLElement && label.getBoundingClientRect().width <= 1;
|
|
12
|
+
}
|
|
13
|
+
/** Writes `node` to every ref: the Tooltip trigger's (positioning), ours, and the consumer's. */
|
|
14
|
+
function allRefs(...refs) {
|
|
15
|
+
return (node) => {
|
|
16
|
+
for (const ref of refs) if (typeof ref === "function") ref(node);
|
|
17
|
+
else if (typeof ref === "object" && ref !== null && "current" in ref) ref.current = node;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* A `NavItem` for a Sidebar: the same link, with a Tooltip that names it while the Sidebar is the
|
|
22
|
+
* icon rail (hover after the delay, keyboard focus at once; Escape closes it).
|
|
23
|
+
*/
|
|
24
|
+
function SidebarItem({ className, ref, disabled, ...item }) {
|
|
25
|
+
const link = useRef(null);
|
|
26
|
+
const [open, setOpen] = useState(false);
|
|
27
|
+
return /* @__PURE__ */ jsxs(TooltipRoot, {
|
|
28
|
+
open,
|
|
29
|
+
onOpenChange: (next) => setOpen(next && inRail(link.current)),
|
|
30
|
+
disabled: disabled === true,
|
|
31
|
+
children: [/* @__PURE__ */ jsx(TooltipTrigger, { render: (props) => /* @__PURE__ */ jsx(NavItem, {
|
|
32
|
+
...item,
|
|
33
|
+
...triggerProps(props),
|
|
34
|
+
...disabled === void 0 ? {} : { disabled },
|
|
35
|
+
"data-slot": "sidebar-item",
|
|
36
|
+
className: cx("nz-sidebar-item", className),
|
|
37
|
+
ref: allRefs(props["ref"], link, ref)
|
|
38
|
+
}) }), /* @__PURE__ */ jsx(TooltipPopup, {
|
|
39
|
+
side: "end",
|
|
40
|
+
children: item.children
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Keeps the trigger's handlers. Drops what would make the DOM differ from NavItem's server path:
|
|
46
|
+
* the trigger's class, slot, `data-open` and `tabIndex` (a link is focusable already), the ref
|
|
47
|
+
* (merged above), and `aria-describedby`: the tooltip repeats the link's name, so describing the link
|
|
48
|
+
* by it would say the label twice.
|
|
49
|
+
*/
|
|
50
|
+
function triggerProps(props) {
|
|
51
|
+
const { className: _class, "data-slot": _slot, "data-open": _open, "aria-describedby": _described, tabIndex: _tabIndex, ref: _ref, type: _type, ...kept } = props;
|
|
52
|
+
return kept;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { SidebarItem };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
3
|
+
//#region src/sidebar/sidebar.d.ts
|
|
4
|
+
type Empty = Record<string, never>;
|
|
5
|
+
/** Strings this part renders (§16.4). */
|
|
6
|
+
export interface SidebarLabels {
|
|
7
|
+
/** The navigation landmark's name. @default 'Primary' */
|
|
8
|
+
nav: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SidebarRootProps extends ComponentPropsWithRef<"nav"> {
|
|
11
|
+
/**
|
|
12
|
+
* Overrides the width the viewport gives: `true` keeps the icon rail and `false` the full sidebar
|
|
13
|
+
* at every width from 640 px, for an app with its own collapse control. Below 640 px the Sidebar
|
|
14
|
+
* is not shown either way. Absent, it follows the viewport.
|
|
15
|
+
*/
|
|
16
|
+
collapsed?: boolean;
|
|
17
|
+
labels?: Partial<SidebarLabels>;
|
|
18
|
+
render?: RenderProp<Empty>;
|
|
19
|
+
}
|
|
20
|
+
export interface SidebarHeaderProps extends Omit<ComponentPropsWithRef<"div">, "title"> {
|
|
21
|
+
/** The store's mark, for example a square `Avatar` (Figma's 32 px Store mark). The rail keeps it. */
|
|
22
|
+
mark?: ReactNode;
|
|
23
|
+
/** The store's name (Figma's Store). In the rail it leaves the layout and stays in the DOM. */
|
|
24
|
+
title?: ReactNode;
|
|
25
|
+
/** A line under the name, such as the store's domain. */
|
|
26
|
+
description?: ReactNode;
|
|
27
|
+
/** A link to the store's home or a store switcher's trigger: `render={<a href="/" />}`. */
|
|
28
|
+
render?: RenderProp<Empty>;
|
|
29
|
+
}
|
|
30
|
+
export interface SidebarContentProps extends ComponentPropsWithRef<"div"> {
|
|
31
|
+
render?: RenderProp<Empty>;
|
|
32
|
+
}
|
|
33
|
+
export interface SidebarFooterProps extends ComponentPropsWithRef<"div"> {
|
|
34
|
+
render?: RenderProp<Empty>;
|
|
35
|
+
}
|
|
36
|
+
/** The `<nav>` landmark around everything in the sidebar. */
|
|
37
|
+
export declare function SidebarRoot({ collapsed, labels, render, className, ...rest }: SidebarRootProps): ReactElement;
|
|
38
|
+
/** The store at the top: its mark, name and a line under it, on a card (Figma's Store Switcher). */
|
|
39
|
+
export declare function SidebarHeader({ mark, title, description, render, className, children, ...rest }: SidebarHeaderProps): ReactElement;
|
|
40
|
+
/** The destinations, `NavItem`s 4 px apart. */
|
|
41
|
+
export declare function SidebarContent({ render, className, ...rest }: SidebarContentProps): ReactElement;
|
|
42
|
+
/** Pushed to the bottom, for Settings (Figma's Spacer frame becomes an auto margin). */
|
|
43
|
+
export declare function SidebarFooter({ render, className, ...rest }: SidebarFooterProps): ReactElement;
|
|
44
|
+
//#endregion
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/sidebar/sidebar.tsx
|
|
5
|
+
/** The `<nav>` landmark around everything in the sidebar. */
|
|
6
|
+
function SidebarRoot({ collapsed, labels, render, className, ...rest }) {
|
|
7
|
+
return renderElement("nav", render, {}, {
|
|
8
|
+
"aria-label": labels?.nav ?? "Primary",
|
|
9
|
+
"data-slot": "sidebar",
|
|
10
|
+
"data-collapsed": collapsed === true ? "" : void 0,
|
|
11
|
+
"data-expanded": collapsed === false ? "" : void 0,
|
|
12
|
+
...rest,
|
|
13
|
+
className: cx("nz-sidebar", className)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** The store at the top: its mark, name and a line under it, on a card (Figma's Store Switcher). */
|
|
17
|
+
function SidebarHeader({ mark, title, description, render, className, children, ...rest }) {
|
|
18
|
+
return renderElement("div", render, {}, {
|
|
19
|
+
"data-slot": "sidebar-header",
|
|
20
|
+
...rest,
|
|
21
|
+
className: cx("nz-sidebar-header", className),
|
|
22
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23
|
+
mark != null && /* @__PURE__ */ jsx("span", {
|
|
24
|
+
className: "nz-sidebar-header-mark",
|
|
25
|
+
"data-slot": "sidebar-header-mark",
|
|
26
|
+
children: mark
|
|
27
|
+
}),
|
|
28
|
+
(title != null || description != null) && /* @__PURE__ */ jsxs("span", {
|
|
29
|
+
className: "nz-sidebar-header-text",
|
|
30
|
+
"data-slot": "sidebar-header-text",
|
|
31
|
+
children: [title != null && /* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "nz-sidebar-header-title",
|
|
33
|
+
"data-slot": "sidebar-header-title",
|
|
34
|
+
children: title
|
|
35
|
+
}), description != null && /* @__PURE__ */ jsx("span", {
|
|
36
|
+
className: "nz-sidebar-header-description",
|
|
37
|
+
"data-slot": "sidebar-header-description",
|
|
38
|
+
children: description
|
|
39
|
+
})]
|
|
40
|
+
}),
|
|
41
|
+
children
|
|
42
|
+
] })
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
/** The destinations, `NavItem`s 4 px apart. */
|
|
46
|
+
function SidebarContent({ render, className, ...rest }) {
|
|
47
|
+
return renderElement("div", render, {}, {
|
|
48
|
+
"data-slot": "sidebar-content",
|
|
49
|
+
...rest,
|
|
50
|
+
className: cx("nz-sidebar-content", className)
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/** Pushed to the bottom, for Settings (Figma's Spacer frame becomes an auto margin). */
|
|
54
|
+
function SidebarFooter({ render, className, ...rest }) {
|
|
55
|
+
return renderElement("div", render, {}, {
|
|
56
|
+
"data-slot": "sidebar-footer",
|
|
57
|
+
...rest,
|
|
58
|
+
className: cx("nz-sidebar-footer", className)
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { SidebarContent, SidebarFooter, SidebarHeader, SidebarRoot };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SidebarContent, SidebarFooter, SidebarHeader, SidebarRoot } from "./sidebar.js";
|
|
2
|
+
declare namespace sidebar_parts_d_exports {
|
|
3
|
+
export { SidebarContent as Content, SidebarFooter as Footer, SidebarHeader as Header, SidebarRoot as Root };
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { SidebarContent as Content, SidebarFooter as Footer, SidebarHeader as Header, SidebarRoot as Root, sidebar_parts_d_exports };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { SidebarContent, SidebarFooter, SidebarHeader, SidebarRoot } from "./sidebar.js";
|
|
3
|
+
//#region src/sidebar/sidebar.parts.ts
|
|
4
|
+
var sidebar_parts_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Content: () => SidebarContent,
|
|
6
|
+
Footer: () => SidebarFooter,
|
|
7
|
+
Header: () => SidebarHeader,
|
|
8
|
+
Root: () => SidebarRoot
|
|
9
|
+
});
|
|
10
|
+
//#endregion
|
|
11
|
+
export { SidebarContent as Content, SidebarFooter as Footer, SidebarHeader as Header, SidebarRoot as Root, sidebar_parts_exports };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from "./skeleton.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
3
|
+
//#region src/skeleton/skeleton.d.ts
|
|
4
|
+
/** Figma "Shape": a text line, a block (media, a chart) or a circle (an avatar). */
|
|
5
|
+
export type SkeletonShape = "line" | "block" | "circle";
|
|
6
|
+
export interface SkeletonState {
|
|
7
|
+
shape: SkeletonShape;
|
|
8
|
+
}
|
|
9
|
+
export interface SkeletonProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
10
|
+
/** @default 'line' */
|
|
11
|
+
shape?: SkeletonShape;
|
|
12
|
+
render?: RenderProp<SkeletonState>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* One placeholder block, always hidden from assistive technology. The region it stands in for sets
|
|
16
|
+
* `aria-busy` and carries visually hidden "Loading …" text (§16.5). There is no `style` prop path:
|
|
17
|
+
* size it with a class, or with `--nz-skeleton-width`, `--nz-skeleton-height` and `--nz-skeleton-radius`.
|
|
18
|
+
*/
|
|
19
|
+
export declare function Skeleton({ shape, render, className, ...rest }: SkeletonProps): ReactElement;
|
|
20
|
+
//#endregion
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
//#region src/skeleton/skeleton.tsx
|
|
4
|
+
/**
|
|
5
|
+
* One placeholder block, always hidden from assistive technology. The region it stands in for sets
|
|
6
|
+
* `aria-busy` and carries visually hidden "Loading …" text (§16.5). There is no `style` prop path:
|
|
7
|
+
* size it with a class, or with `--nz-skeleton-width`, `--nz-skeleton-height` and `--nz-skeleton-radius`.
|
|
8
|
+
*/
|
|
9
|
+
function Skeleton({ shape = "line", render, className, ...rest }) {
|
|
10
|
+
return renderElement("span", render, { shape }, {
|
|
11
|
+
"data-slot": "skeleton",
|
|
12
|
+
"data-shape": shape,
|
|
13
|
+
...rest,
|
|
14
|
+
className: cx("nz-skeleton", className),
|
|
15
|
+
"aria-hidden": true
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Skeleton };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SplitAside, SplitAsideProps, SplitAsideWidth, SplitMain, SplitMainProps, SplitRoot, SplitRootProps } from "./split.js";
|
|
2
|
+
import { split_parts_d_exports } from "./split.parts.js";
|
|
3
|
+
export { split_parts_d_exports as Split, SplitAside, type SplitAsideProps, type SplitAsideWidth, SplitMain, type SplitMainProps, SplitRoot, type SplitRootProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
3
|
+
//#region src/split/split.d.ts
|
|
4
|
+
type Empty = Record<string, never>;
|
|
5
|
+
/** `wide` is 08's 360 px aside (the 8 + 4 split); `narrow` its 232 px Settings nav column. */
|
|
6
|
+
export type SplitAsideWidth = "narrow" | "wide";
|
|
7
|
+
export interface SplitRootProps extends ComponentPropsWithRef<"div"> {
|
|
8
|
+
/** The aside's width while the columns sit side by side. @default 'wide' */
|
|
9
|
+
aside?: SplitAsideWidth;
|
|
10
|
+
render?: RenderProp<Empty>;
|
|
11
|
+
}
|
|
12
|
+
export interface SplitMainProps extends ComponentPropsWithRef<"div"> {
|
|
13
|
+
render?: RenderProp<Empty>;
|
|
14
|
+
}
|
|
15
|
+
export interface SplitAsideProps extends ComponentPropsWithRef<"div"> {
|
|
16
|
+
render?: RenderProp<Empty>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The row. Put `Split.Main` and `Split.Aside` in reading order: the aside after the main column (an
|
|
20
|
+
* Overview's side panel), or first (a Settings page's section nav). They stack in that order.
|
|
21
|
+
*/
|
|
22
|
+
export declare function SplitRoot({ aside, render, className, ...rest }: SplitRootProps): ReactElement;
|
|
23
|
+
/** The main column: it takes the rest of the row. */
|
|
24
|
+
export declare function SplitMain({ render, className, ...rest }: SplitMainProps): ReactElement;
|
|
25
|
+
/** The side column, `aside` wide; pass `render={<aside />}` for complementary content. */
|
|
26
|
+
export declare function SplitAside({ render, className, ...rest }: SplitAsideProps): ReactElement;
|
|
27
|
+
//#endregion
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
//#region src/split/split.tsx
|
|
4
|
+
/**
|
|
5
|
+
* The row. Put `Split.Main` and `Split.Aside` in reading order: the aside after the main column (an
|
|
6
|
+
* Overview's side panel), or first (a Settings page's section nav). They stack in that order.
|
|
7
|
+
*/
|
|
8
|
+
function SplitRoot({ aside = "wide", render, className, ...rest }) {
|
|
9
|
+
return renderElement("div", render, {}, {
|
|
10
|
+
"data-slot": "split",
|
|
11
|
+
"data-aside": aside,
|
|
12
|
+
...rest,
|
|
13
|
+
className: cx("nz-split", className)
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** The main column: it takes the rest of the row. */
|
|
17
|
+
function SplitMain({ render, className, ...rest }) {
|
|
18
|
+
return renderElement("div", render, {}, {
|
|
19
|
+
"data-slot": "split-main",
|
|
20
|
+
...rest,
|
|
21
|
+
className: cx("nz-split-main", className)
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
/** The side column, `aside` wide; pass `render={<aside />}` for complementary content. */
|
|
25
|
+
function SplitAside({ render, className, ...rest }) {
|
|
26
|
+
return renderElement("div", render, {}, {
|
|
27
|
+
"data-slot": "split-aside",
|
|
28
|
+
...rest,
|
|
29
|
+
className: cx("nz-split-aside", className)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { SplitAside, SplitMain, SplitRoot };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SplitAside, SplitMain, SplitRoot } from "./split.js";
|
|
2
|
+
declare namespace split_parts_d_exports {
|
|
3
|
+
export { SplitAside as Aside, SplitMain as Main, SplitRoot as Root };
|
|
4
|
+
}
|
|
5
|
+
//#endregion
|
|
6
|
+
export { SplitAside as Aside, SplitMain as Main, SplitRoot as Root, split_parts_d_exports };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __exportAll } from "../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { SplitAside, SplitMain, SplitRoot } from "./split.js";
|
|
3
|
+
//#region src/split/split.parts.ts
|
|
4
|
+
var split_parts_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Aside: () => SplitAside,
|
|
6
|
+
Main: () => SplitMain,
|
|
7
|
+
Root: () => SplitRoot
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SplitAside as Aside, SplitMain as Main, SplitRoot as Root, split_parts_exports };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Stack } from "./stack.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
3
|
+
//#region src/stack/stack.d.ts
|
|
4
|
+
/** A `--nz-space-*` key: `'4'` is `--nz-space-4` (1rem), `'0-5'` is `--nz-space-0-5`. Token keys only. */
|
|
5
|
+
export type LayoutGap = "0" | "0-5" | "1" | "1-5" | "2" | "3" | "4" | "5" | "6" | "8" | "10" | "12" | "16" | "20" | "24";
|
|
6
|
+
export interface StackState {
|
|
7
|
+
gap: LayoutGap | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface StackProps extends ComponentPropsWithRef<"div"> {
|
|
10
|
+
/** Space between children. Absent, there is none. */
|
|
11
|
+
gap?: LayoutGap;
|
|
12
|
+
/** Another element, for example `render={<ul />}` for a list. */
|
|
13
|
+
render?: RenderProp<StackState>;
|
|
14
|
+
}
|
|
15
|
+
/** Children in a column. */
|
|
16
|
+
export declare function Stack({ gap, render, className, ...rest }: StackProps): ReactElement;
|
|
17
|
+
//#endregion
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cx } from "../_internal/cx.js";
|
|
2
|
+
import { renderElement } from "../contracts/render.js";
|
|
3
|
+
//#region src/stack/stack.tsx
|
|
4
|
+
/** Children in a column. */
|
|
5
|
+
function Stack({ gap, render, className, ...rest }) {
|
|
6
|
+
return renderElement("div", render, { gap }, {
|
|
7
|
+
"data-slot": "stack",
|
|
8
|
+
"data-gap": gap,
|
|
9
|
+
...rest,
|
|
10
|
+
className: cx("nz-stack", className)
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Stack };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { StickyBar } from "./sticky-bar.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RenderProp } from "../contracts/render.js";
|
|
2
|
+
import { ComponentPropsWithRef, ReactElement, ReactNode } from "react";
|
|
3
|
+
//#region src/sticky-bar/sticky-bar.d.ts
|
|
4
|
+
export interface StickyBarProps extends ComponentPropsWithRef<"div"> {
|
|
5
|
+
/** At the start, for example "2 items" and the total. */
|
|
6
|
+
summary?: ReactNode;
|
|
7
|
+
/** The actions, usually one or two `size="lg"` Buttons, at the end. */
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
render?: RenderProp<Record<string, never>>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A bar that sticks to the bottom of the viewport while its section scrolls: the last child of the
|
|
13
|
+
* page's content, or of the region it acts on.
|
|
14
|
+
*/
|
|
15
|
+
export declare function StickyBar({ summary, render, className, children, ...rest }: StickyBarProps): ReactElement;
|
|
16
|
+
//#endregion
|