@nexus-cross/design-system 1.0.6-beta.2 → 1.0.7
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/DESIGN.md +185 -0
- package/cursor-rules/nexus-ui-api.mdc +223 -7
- package/cursor-rules/nexus-ui-components.mdc +44 -17
- package/dist/alert.js +16 -0
- package/dist/alert.mjs +3 -0
- package/dist/badge.js +16 -0
- package/dist/badge.mjs +3 -0
- package/dist/breadcrumb.js +12 -0
- package/dist/breadcrumb.mjs +3 -0
- package/dist/chunks/chunk-22O6YUYH.mjs +5 -0
- package/dist/chunks/chunk-2N2EPBO4.js +120 -0
- package/dist/chunks/{chunk-AFSEYJZT.js → chunk-2T7RUYEK.js} +175 -50
- package/dist/chunks/chunk-2UPGFY6E.mjs +76 -0
- package/dist/chunks/{chunk-VGO4Z2WH.js → chunk-3RK3UT2O.js} +50 -12
- package/dist/chunks/chunk-3ZWN66YH.js +53 -0
- package/dist/chunks/chunk-5PQ3UCKF.js +99 -0
- package/dist/chunks/chunk-6BWOKTVQ.mjs +87 -0
- package/dist/chunks/chunk-6DBRL6NA.mjs +81 -0
- package/dist/chunks/{chunk-HNLI646G.mjs → chunk-AAITRHED.mjs} +51 -13
- package/dist/chunks/chunk-B5O6W3Z4.mjs +73 -0
- package/dist/chunks/chunk-BJM3NDT2.mjs +368 -0
- package/dist/chunks/chunk-C2DSAJTL.js +109 -0
- package/dist/chunks/chunk-CUTMLBC3.mjs +86 -0
- package/dist/chunks/chunk-CV4GMFWP.js +174 -0
- package/dist/chunks/chunk-DICN6GKE.js +99 -0
- package/dist/chunks/chunk-DYPPVXQF.js +143 -0
- package/dist/chunks/chunk-EJY7IVSK.mjs +31 -0
- package/dist/chunks/chunk-FUIBYZZ4.mjs +98 -0
- package/dist/chunks/chunk-H2G5FMRN.mjs +75 -0
- package/dist/chunks/chunk-H2V7RHYV.mjs +120 -0
- package/dist/chunks/chunk-MMCA33FW.mjs +85 -0
- package/dist/chunks/chunk-NZHK76R3.js +109 -0
- package/dist/chunks/chunk-OE5BAEBE.js +7 -0
- package/dist/chunks/chunk-P73MEU7N.mjs +150 -0
- package/dist/chunks/chunk-PDJTSQOC.js +59 -0
- package/dist/chunks/chunk-S2GMEC43.js +109 -0
- package/dist/chunks/chunk-X3CTJ7TD.js +108 -0
- package/dist/chunks/chunk-XGIJZ3NZ.js +160 -0
- package/dist/chunks/chunk-YO5MSDPX.mjs +36 -0
- package/dist/chunks/chunk-ZI4LN2B2.js +96 -0
- package/dist/chunks/chunk-ZU4AWAFT.mjs +137 -0
- package/dist/component-tokens/button.d.ts +3 -0
- package/dist/component-tokens/button.d.ts.map +1 -0
- package/dist/component-tokens/index.d.ts +3 -0
- package/dist/component-tokens/index.d.ts.map +1 -0
- package/dist/component-tokens/types.d.ts +19 -0
- package/dist/component-tokens/types.d.ts.map +1 -0
- package/dist/{accordion.d.mts → components/Accordion.d.ts} +2 -3
- package/dist/components/Accordion.d.ts.map +1 -0
- package/dist/components/Alert.d.ts +16 -0
- package/dist/components/Alert.d.ts.map +1 -0
- package/dist/{avatar.d.mts → components/Avatar.d.ts} +5 -6
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/Badge.d.ts +17 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Breadcrumb.d.ts +15 -0
- package/dist/components/Breadcrumb.d.ts.map +1 -0
- package/dist/{button.d.mts → components/Button.d.ts} +5 -6
- package/dist/components/Button.d.ts.map +1 -0
- package/dist/{carousel.d.mts → components/Carousel.d.ts} +5 -6
- package/dist/components/Carousel.d.ts.map +1 -0
- package/dist/{checkbox.d.mts → components/CheckBox.d.ts} +6 -7
- package/dist/components/CheckBox.d.ts.map +1 -0
- package/dist/{chip.d.mts → components/Chip.d.ts} +6 -7
- package/dist/components/Chip.d.ts.map +1 -0
- package/dist/{client-only.d.mts → components/ClientOnly.d.ts} +4 -5
- package/dist/components/ClientOnly.d.ts.map +1 -0
- package/dist/{countdown.d.mts → components/Countdown.d.ts} +3 -3
- package/dist/components/Countdown.d.ts.map +1 -0
- package/dist/{counter.d.mts → components/Counter.d.ts} +3 -3
- package/dist/components/Counter.d.ts.map +1 -0
- package/dist/{data-list.d.mts → components/DataList.d.ts} +4 -5
- package/dist/components/DataList.d.ts.map +1 -0
- package/dist/components/DatePicker.d.ts +17 -0
- package/dist/components/DatePicker.d.ts.map +1 -0
- package/dist/{divider.d.mts → components/Divider.d.ts} +5 -6
- package/dist/components/Divider.d.ts.map +1 -0
- package/dist/{drawer.d.mts → components/Drawer.d.ts} +13 -15
- package/dist/components/Drawer.d.ts.map +1 -0
- package/dist/components/DropdownMenu.d.ts +30 -0
- package/dist/components/DropdownMenu.d.ts.map +1 -0
- package/dist/{ellipsis.d.mts → components/Ellipsis.d.ts} +4 -5
- package/dist/components/Ellipsis.d.ts.map +1 -0
- package/dist/components/EmptyState.d.ts +15 -0
- package/dist/components/EmptyState.d.ts.map +1 -0
- package/dist/{error-boundary.d.mts → components/ErrorBoundary.d.ts} +4 -5
- package/dist/components/ErrorBoundary.d.ts.map +1 -0
- package/dist/{infinite-scroll.d.mts → components/InfiniteScroll.d.ts} +5 -6
- package/dist/components/InfiniteScroll.d.ts.map +1 -0
- package/dist/{marquee.d.mts → components/Marquee.d.ts} +3 -3
- package/dist/components/Marquee.d.ts.map +1 -0
- package/dist/{number-input.d.mts → components/NumberInput.d.ts} +10 -12
- package/dist/components/NumberInput.d.ts.map +1 -0
- package/dist/components/NxImage.d.ts +13 -0
- package/dist/components/NxImage.d.ts.map +1 -0
- package/dist/{pagination.d.mts → components/Pagination.d.ts} +6 -7
- package/dist/components/Pagination.d.ts.map +1 -0
- package/dist/components/Popover.d.ts +23 -0
- package/dist/components/Popover.d.ts.map +1 -0
- package/dist/{price-input.d.mts → components/PriceInput.d.ts} +5 -6
- package/dist/components/PriceInput.d.ts.map +1 -0
- package/dist/components/Progress.d.ts +17 -0
- package/dist/components/Progress.d.ts.map +1 -0
- package/dist/{radio-group.d.mts → components/RadioGroup.d.ts} +6 -7
- package/dist/components/RadioGroup.d.ts.map +1 -0
- package/dist/{select.d.mts → components/Select.d.ts} +7 -10
- package/dist/components/Select.d.ts.map +1 -0
- package/dist/{skeleton.d.mts → components/Skeleton.d.ts} +3 -3
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/Slider.d.ts +19 -0
- package/dist/components/Slider.d.ts.map +1 -0
- package/dist/{spinner.d.mts → components/Spinner.d.ts} +3 -3
- package/dist/components/Spinner.d.ts.map +1 -0
- package/dist/components/Stepper.d.ts +19 -0
- package/dist/components/Stepper.d.ts.map +1 -0
- package/dist/{switch.d.mts → components/Switch.d.ts} +5 -6
- package/dist/components/Switch.d.ts.map +1 -0
- package/dist/{tab.d.mts → components/Tab.d.ts} +7 -9
- package/dist/components/Tab.d.ts.map +1 -0
- package/dist/components/TagInput.d.ts +20 -0
- package/dist/components/TagInput.d.ts.map +1 -0
- package/dist/components/TextArea.d.ts +18 -0
- package/dist/components/TextArea.d.ts.map +1 -0
- package/dist/{text-input.d.mts → components/TextInput.d.ts} +5 -6
- package/dist/components/TextInput.d.ts.map +1 -0
- package/dist/{theme-provider.d.mts → components/ThemeProvider.d.ts} +3 -3
- package/dist/components/ThemeProvider.d.ts.map +1 -0
- package/dist/components/ToggleGroup.d.ts +35 -0
- package/dist/components/ToggleGroup.d.ts.map +1 -0
- package/dist/{tooltip.d.mts → components/Tooltip.d.ts} +6 -10
- package/dist/components/Tooltip.d.ts.map +1 -0
- package/dist/{virtual-scroll.d.mts → components/VirtualScroll.d.ts} +4 -4
- package/dist/components/VirtualScroll.d.ts.map +1 -0
- package/dist/date-picker.js +12 -0
- package/dist/date-picker.mjs +3 -0
- package/dist/dropdown-menu.js +32 -0
- package/dist/dropdown-menu.mjs +3 -0
- package/dist/empty-state.js +16 -0
- package/dist/empty-state.mjs +3 -0
- package/dist/hooks/useCheckDevice.d.ts +4 -4
- package/dist/hooks/useCheckDevice.d.ts.map +1 -0
- package/dist/hooks/useClickOutside.d.ts +2 -2
- package/dist/hooks/useClickOutside.d.ts.map +1 -0
- package/dist/hooks/useDraggableBottomSheet.d.ts +3 -3
- package/dist/hooks/useDraggableBottomSheet.d.ts.map +1 -0
- package/dist/hooks/useDraggableWindow.d.ts +5 -7
- package/dist/hooks/useDraggableWindow.d.ts.map +1 -0
- package/dist/hooks/useInView.d.ts +3 -3
- package/dist/hooks/useInView.d.ts.map +1 -0
- package/dist/hooks/useModal.d.ts +48 -2
- package/dist/hooks/useModal.d.ts.map +1 -0
- package/dist/index.d.ts +100 -77
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +269 -157
- package/dist/index.mjs +30 -18
- package/dist/modal/Modal.d.ts +52 -0
- package/dist/modal/Modal.d.ts.map +1 -0
- package/dist/modal/components/ModalComponent.d.ts +22 -0
- package/dist/modal/components/ModalComponent.d.ts.map +1 -0
- package/dist/modal/components/ModalContainer.d.ts +9 -0
- package/dist/modal/components/ModalContainer.d.ts.map +1 -0
- package/dist/modal/components/ModalPortal.d.ts +8 -0
- package/dist/modal/components/ModalPortal.d.ts.map +1 -0
- package/dist/modal/components/ModalPortalTarget.d.ts +7 -0
- package/dist/modal/components/ModalPortalTarget.d.ts.map +1 -0
- package/dist/modal/components/ModalTemplate.d.ts +20 -0
- package/dist/modal/components/ModalTemplate.d.ts.map +1 -0
- package/dist/modal/components/ModalTemplate.variants.d.ts +29 -0
- package/dist/modal/components/ModalTemplate.variants.d.ts.map +1 -0
- package/dist/modal/constants.d.ts +3 -0
- package/dist/modal/constants.d.ts.map +1 -0
- package/dist/modal/index.d.ts +11 -82
- package/dist/modal/index.d.ts.map +1 -0
- package/dist/modal/index.js +12 -12
- package/dist/modal/index.mjs +3 -3
- package/dist/modal/types.d.ts +90 -0
- package/dist/modal/types.d.ts.map +1 -0
- package/dist/number-input.js +4 -4
- package/dist/number-input.mjs +1 -1
- package/dist/nx-image.js +12 -0
- package/dist/nx-image.mjs +3 -0
- package/dist/progress.js +16 -0
- package/dist/progress.mjs +3 -0
- package/dist/schemas/_all.json +840 -13
- package/dist/schemas/accordion.d.ts +67 -0
- package/dist/schemas/accordion.d.ts.map +1 -0
- package/dist/schemas/alert.d.ts +30 -0
- package/dist/schemas/alert.d.ts.map +1 -0
- package/dist/schemas/alert.json +49 -0
- package/dist/schemas/avatar.d.ts +30 -0
- package/dist/schemas/avatar.d.ts.map +1 -0
- package/dist/schemas/badge.d.ts +33 -0
- package/dist/schemas/badge.d.ts.map +1 -0
- package/dist/schemas/badge.json +76 -0
- package/dist/schemas/breadcrumb.d.ts +38 -0
- package/dist/schemas/breadcrumb.d.ts.map +1 -0
- package/dist/schemas/breadcrumb.json +47 -0
- package/dist/schemas/button.d.ts +42 -0
- package/dist/schemas/button.d.ts.map +1 -0
- package/dist/schemas/carousel.d.ts +48 -0
- package/dist/schemas/carousel.d.ts.map +1 -0
- package/dist/schemas/checkbox.d.ts +48 -0
- package/dist/schemas/checkbox.d.ts.map +1 -0
- package/dist/schemas/chip.d.ts +30 -0
- package/dist/schemas/chip.d.ts.map +1 -0
- package/dist/schemas/client-only.d.ts +12 -0
- package/dist/schemas/client-only.d.ts.map +1 -0
- package/dist/schemas/countdown.d.ts +52 -0
- package/dist/schemas/countdown.d.ts.map +1 -0
- package/dist/schemas/counter.d.ts +36 -0
- package/dist/schemas/counter.d.ts.map +1 -0
- package/dist/schemas/data-list.d.ts +33 -0
- package/dist/schemas/data-list.d.ts.map +1 -0
- package/dist/schemas/date-picker.d.ts +36 -0
- package/dist/schemas/date-picker.d.ts.map +1 -0
- package/dist/schemas/datePicker.json +56 -0
- package/dist/schemas/divider.d.ts +21 -0
- package/dist/schemas/divider.d.ts.map +1 -0
- package/dist/schemas/drawer.d.ts +95 -0
- package/dist/schemas/drawer.d.ts.map +1 -0
- package/dist/schemas/dropdown-menu.d.ts +64 -0
- package/dist/schemas/dropdown-menu.d.ts.map +1 -0
- package/dist/schemas/dropdownMenu.json +83 -0
- package/dist/schemas/ellipsis.d.ts +30 -0
- package/dist/schemas/ellipsis.d.ts.map +1 -0
- package/dist/schemas/empty-state.d.ts +27 -0
- package/dist/schemas/empty-state.d.ts.map +1 -0
- package/dist/schemas/emptyState.json +44 -0
- package/dist/schemas/error-boundary.d.ts +15 -0
- package/dist/schemas/error-boundary.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +47 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/infinite-scroll.d.ts +39 -0
- package/dist/schemas/infinite-scroll.d.ts.map +1 -0
- package/dist/schemas/marquee.d.ts +27 -0
- package/dist/schemas/marquee.d.ts.map +1 -0
- package/dist/schemas/modal.d.ts +176 -0
- package/dist/schemas/modal.d.ts.map +1 -0
- package/dist/schemas/number-input.d.ts +72 -0
- package/dist/schemas/number-input.d.ts.map +1 -0
- package/dist/schemas/numberInput.json +27 -8
- package/dist/schemas/nx-image.d.ts +33 -0
- package/dist/schemas/nx-image.d.ts.map +1 -0
- package/dist/schemas/nxImage.json +56 -0
- package/dist/schemas/pagination.d.ts +27 -0
- package/dist/schemas/pagination.d.ts.map +1 -0
- package/dist/schemas/popover.d.ts +39 -0
- package/dist/schemas/popover.d.ts.map +1 -0
- package/dist/schemas/price-input.d.ts +63 -0
- package/dist/schemas/price-input.d.ts.map +1 -0
- package/dist/schemas/progress.d.ts +30 -0
- package/dist/schemas/progress.d.ts.map +1 -0
- package/dist/schemas/progress.json +63 -0
- package/dist/schemas/radio-group.d.ts +61 -0
- package/dist/schemas/radio-group.d.ts.map +1 -0
- package/dist/schemas/select.d.ts +52 -0
- package/dist/schemas/select.d.ts.map +1 -0
- package/dist/schemas/skeleton.d.ts +27 -0
- package/dist/schemas/skeleton.d.ts.map +1 -0
- package/dist/schemas/slider.d.ts +45 -0
- package/dist/schemas/slider.d.ts.map +1 -0
- package/dist/schemas/slider.json +78 -0
- package/dist/schemas/spinner.d.ts +21 -0
- package/dist/schemas/spinner.d.ts.map +1 -0
- package/dist/schemas/stepper.d.ts +39 -0
- package/dist/schemas/stepper.d.ts.map +1 -0
- package/dist/schemas/stepper.json +73 -0
- package/dist/schemas/switch.d.ts +33 -0
- package/dist/schemas/switch.d.ts.map +1 -0
- package/dist/schemas/tab.d.ts +61 -0
- package/dist/schemas/tab.d.ts.map +1 -0
- package/dist/schemas/table.d.ts +113 -0
- package/dist/schemas/table.d.ts.map +1 -0
- package/dist/schemas/tag-input.d.ts +39 -0
- package/dist/schemas/tag-input.d.ts.map +1 -0
- package/dist/schemas/tagInput.json +70 -0
- package/dist/schemas/text-area.d.ts +69 -0
- package/dist/schemas/text-area.d.ts.map +1 -0
- package/dist/schemas/text-input.d.ts +78 -0
- package/dist/schemas/text-input.d.ts.map +1 -0
- package/dist/schemas/textArea.json +26 -1
- package/dist/schemas/theme-provider.d.ts +36 -0
- package/dist/schemas/theme-provider.d.ts.map +1 -0
- package/dist/schemas/toast.d.ts +91 -0
- package/dist/schemas/toast.d.ts.map +1 -0
- package/dist/schemas/toggle-group.d.ts +58 -0
- package/dist/schemas/toggle-group.d.ts.map +1 -0
- package/dist/schemas/toggleGroup.json +88 -0
- package/dist/schemas/tooltip.d.ts +33 -0
- package/dist/schemas/tooltip.d.ts.map +1 -0
- package/dist/schemas/virtual-scroll.d.ts +67 -0
- package/dist/schemas/virtual-scroll.d.ts.map +1 -0
- package/dist/schemas.js +177 -7
- package/dist/schemas.mjs +166 -8
- package/dist/slider.js +16 -0
- package/dist/slider.mjs +3 -0
- package/dist/stepper.js +16 -0
- package/dist/stepper.mjs +3 -0
- package/dist/styles/.generated/built.d.ts +3 -0
- package/dist/styles/.generated/built.d.ts.map +1 -0
- package/dist/styles/inject-layer.d.ts +2 -0
- package/dist/styles/inject-layer.d.ts.map +1 -0
- package/dist/styles/inject.d.ts +2 -0
- package/dist/styles/inject.d.ts.map +1 -0
- package/dist/styles/layer.js +2 -2
- package/dist/styles/layer.mjs +1 -1
- package/dist/styles.css +1655 -162
- package/dist/styles.js +2 -2
- package/dist/styles.layered.css +1655 -162
- package/dist/styles.mjs +1 -1
- package/dist/table/Table.d.ts +20 -0
- package/dist/table/Table.d.ts.map +1 -0
- package/dist/table/TableHighlightContext.d.ts +11 -0
- package/dist/table/TableHighlightContext.d.ts.map +1 -0
- package/dist/table/TableRow.d.ts +17 -0
- package/dist/table/TableRow.d.ts.map +1 -0
- package/dist/table/TdColumn.d.ts +14 -0
- package/dist/table/TdColumn.d.ts.map +1 -0
- package/dist/table/index.d.ts +23 -0
- package/dist/table/index.d.ts.map +1 -0
- package/dist/table/types.d.ts +27 -0
- package/dist/table/types.d.ts.map +1 -0
- package/dist/table.js +7 -7
- package/dist/table.mjs +1 -1
- package/dist/tag-input.js +16 -0
- package/dist/tag-input.mjs +3 -0
- package/dist/text-area.js +3 -3
- package/dist/text-area.mjs +1 -1
- package/dist/toast/Toast.d.ts +8 -0
- package/dist/toast/Toast.d.ts.map +1 -0
- package/dist/toast/index.d.ts +6 -0
- package/dist/toast/index.d.ts.map +1 -0
- package/dist/{toast.d.ts → toast/useToast.d.ts} +4 -14
- package/dist/toast/useToast.d.ts.map +1 -0
- package/dist/toggle-group.js +16 -0
- package/dist/toggle-group.mjs +3 -0
- package/dist/utils/cn.d.ts +3 -5
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/scroll.d.ts +3 -4
- package/dist/utils/scroll.d.ts.map +1 -0
- package/package.json +104 -38
- package/scripts/setup-cursor-rules.cjs +15 -1
- package/dist/accordion.d.ts +0 -28
- package/dist/avatar.d.ts +0 -17
- package/dist/button.d.ts +0 -17
- package/dist/carousel.d.ts +0 -36
- package/dist/checkbox.d.ts +0 -21
- package/dist/chip.d.ts +0 -16
- package/dist/chunks/chunk-26BUGBOY.mjs +0 -57
- package/dist/chunks/chunk-CLGH2RTS.js +0 -7
- package/dist/chunks/chunk-ECVAVQUY.mjs +0 -243
- package/dist/chunks/chunk-UPCWJWXR.mjs +0 -5
- package/dist/chunks/chunk-WR55D4ZS.js +0 -80
- package/dist/client-only.d.ts +0 -13
- package/dist/countdown.d.ts +0 -27
- package/dist/counter.d.ts +0 -15
- package/dist/data-list.d.ts +0 -33
- package/dist/divider.d.ts +0 -14
- package/dist/drawer.d.ts +0 -42
- package/dist/ellipsis.d.ts +0 -16
- package/dist/error-boundary.d.ts +0 -20
- package/dist/hooks/useCheckDevice.d.mts +0 -47
- package/dist/hooks/useClickOutside.d.mts +0 -12
- package/dist/hooks/useDraggableBottomSheet.d.mts +0 -24
- package/dist/hooks/useDraggableWindow.d.mts +0 -21
- package/dist/hooks/useInView.d.mts +0 -14
- package/dist/hooks/useModal.d.mts +0 -2
- package/dist/index.d.mts +0 -77
- package/dist/infinite-scroll.d.ts +0 -26
- package/dist/marquee.d.ts +0 -12
- package/dist/modal/index.d.mts +0 -87
- package/dist/number-input.d.ts +0 -38
- package/dist/pagination.d.ts +0 -22
- package/dist/popover.d.mts +0 -25
- package/dist/popover.d.ts +0 -25
- package/dist/price-input.d.ts +0 -36
- package/dist/radio-group.d.ts +0 -29
- package/dist/schemas.d.mts +0 -1689
- package/dist/schemas.d.ts +0 -1689
- package/dist/select.d.ts +0 -31
- package/dist/skeleton.d.ts +0 -15
- package/dist/spinner.d.ts +0 -9
- package/dist/styles/layer.d.mts +0 -3
- package/dist/styles/layer.d.ts +0 -3
- package/dist/styles.d.mts +0 -3
- package/dist/styles.d.ts +0 -3
- package/dist/switch.d.ts +0 -15
- package/dist/tab.d.ts +0 -36
- package/dist/table.d.mts +0 -80
- package/dist/table.d.ts +0 -80
- package/dist/text-area.d.mts +0 -15
- package/dist/text-area.d.ts +0 -15
- package/dist/text-input.d.ts +0 -21
- package/dist/theme-provider.d.ts +0 -25
- package/dist/toast.d.mts +0 -42
- package/dist/tooltip.d.ts +0 -24
- package/dist/useModal-BsGIcP8t.d.mts +0 -128
- package/dist/useModal-BsGIcP8t.d.ts +0 -128
- package/dist/utils/cn.d.mts +0 -5
- package/dist/utils/scroll.d.mts +0 -4
- package/dist/virtual-scroll.d.ts +0 -34
- package/dist/chunks/{chunk-3VFBPFZF.mjs → chunk-CWMLTXOH.mjs} +2 -2
- package/dist/chunks/{chunk-U53UA76K.js → chunk-HFBTS42N.js} +2 -2
package/DESIGN.md
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# NEXUS Design System
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This document defines the visual identity and design principles for projects using `@nexus-cross/design-system`. AI agents should read this file to generate consistent, on-brand UI across the entire project.
|
|
6
|
+
|
|
7
|
+
## Visual Theme & Atmosphere
|
|
8
|
+
|
|
9
|
+
The interface prioritizes **clarity, density, and efficiency**. It targets professional data-driven applications — trading platforms, dashboards, and enterprise tools — where information density matters but readability must not be sacrificed.
|
|
10
|
+
|
|
11
|
+
Design philosophy:
|
|
12
|
+
- **Functional minimalism**: Every visual element serves a purpose. No decorative flourishes.
|
|
13
|
+
- **High contrast hierarchy**: Clear distinction between primary, secondary, and tertiary information.
|
|
14
|
+
- **Calm neutrals with intentional accent**: The UI stays quiet until interaction or status demands attention.
|
|
15
|
+
- **Dark-mode first**: Designed for prolonged screen use. Light mode is equally supported but dark mode is the primary context.
|
|
16
|
+
|
|
17
|
+
## Color Palette & Roles
|
|
18
|
+
|
|
19
|
+
### Background layers (depth ordering)
|
|
20
|
+
|
|
21
|
+
| Token | Role | Light | Dark |
|
|
22
|
+
|---|---|---|---|
|
|
23
|
+
| `bg-default` | Page-level background | `#FFFFFF` | `#1E232E` |
|
|
24
|
+
| `bg-subtle` | Recessed areas, sidebar backgrounds | `#F3F6F8` | `#161A21` |
|
|
25
|
+
| `bg-strong` | Maximum depth contrast | `#ECF0F2` | `#000000` |
|
|
26
|
+
|
|
27
|
+
### Surface layers (interactive containers)
|
|
28
|
+
|
|
29
|
+
| Token | Role | Light | Dark |
|
|
30
|
+
|---|---|---|---|
|
|
31
|
+
| `surface-default` | Cards, panels, modals | `#FFFFFF` | `#1E232E` |
|
|
32
|
+
| `surface-subtle` | Secondary panels, nested containers | `#F3F6F8` | `#252B39` |
|
|
33
|
+
| `surface-strong` | Emphasized containers, active sections | `#ECF0F2` | `#363B4C` |
|
|
34
|
+
| `surface-inverted` | High-contrast banners, tooltips | `#161A21` | `#F3F6F8` |
|
|
35
|
+
|
|
36
|
+
**Rule**: Always layer surfaces in order: `bg` → `surface-default` → `surface-subtle`. Never place `surface-subtle` directly on `bg-default` — use `surface-default` as an intermediate layer.
|
|
37
|
+
|
|
38
|
+
### Text hierarchy
|
|
39
|
+
|
|
40
|
+
| Token | Role | When to use |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `text-highlight` | Maximum emphasis | Titles, critical numbers, hero stats |
|
|
43
|
+
| `text-primary` | Default readable text | Body text, labels, headings |
|
|
44
|
+
| `text-secondary` | Supporting information | Descriptions, helper text, timestamps |
|
|
45
|
+
| `text-tertiary` | De-emphasized content | Placeholders, disabled labels |
|
|
46
|
+
| `text-muted` | Lowest priority | Watermarks, footnotes |
|
|
47
|
+
|
|
48
|
+
**Rule**: Never use `text-muted` for any content the user needs to read. It exists only for decorative or supplementary text.
|
|
49
|
+
|
|
50
|
+
### Accent colors
|
|
51
|
+
|
|
52
|
+
| Token | Role |
|
|
53
|
+
|---|---|
|
|
54
|
+
| `accent-primary` (teal/green) | Primary CTA, links, active states, brand identity |
|
|
55
|
+
| `accent-secondary` (purple) | Secondary actions, premium features, alternate highlights |
|
|
56
|
+
|
|
57
|
+
**Rule**: Use `accent-primary` for the single most important action on screen. If there are multiple CTAs, only ONE gets `accent-primary` — the rest use `outline` or `ghost` variants.
|
|
58
|
+
|
|
59
|
+
### Status colors
|
|
60
|
+
|
|
61
|
+
| Token | Role | Usage context |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| `status-success` | Positive outcomes | Completed actions, profit, online status |
|
|
64
|
+
| `status-warning` | Caution needed | Expiring items, approaching limits |
|
|
65
|
+
| `status-danger` | Errors or destructive | Failed actions, losses, delete confirmations |
|
|
66
|
+
| `status-info` | Neutral information | Tips, update notices, general alerts |
|
|
67
|
+
|
|
68
|
+
**Rule**: Status colors should only appear in context — on alerts, badges, inline messages, or status indicators. Never use status colors for decorative purposes or general theming.
|
|
69
|
+
|
|
70
|
+
## Typography Rules
|
|
71
|
+
|
|
72
|
+
- **Font**: System font stack (inherits from the consuming project).
|
|
73
|
+
- **Scale**: 8 levels from `text-xs` (0.75rem) to `text-xl` (1.25rem) for body, plus heading scale `h7`–`h1` and display `sm`–`lg`.
|
|
74
|
+
- **Weight system**: Regular (400) for body, Medium (500) for labels, Semi-bold (600) for headings, Bold (700) for display and h1–h2.
|
|
75
|
+
- **Letter spacing**: `-0.01em` for body text (tighter for readability at small sizes), `0` for headings and labels.
|
|
76
|
+
- **Line height**: Built into each typography token — do not override.
|
|
77
|
+
|
|
78
|
+
**Rule**: Use typography tokens (`text-text-sm`, `text-heading-h4`, etc.) instead of raw Tailwind sizes. The tokens include coordinated font-size, font-weight, line-height, and letter-spacing.
|
|
79
|
+
|
|
80
|
+
## Spacing & Layout
|
|
81
|
+
|
|
82
|
+
### Spacing scale
|
|
83
|
+
|
|
84
|
+
- **Padding**: `none` (0), `2xs` (4px), `xs` (8px), `sm` (12px), `md` (16px), `lg` (24px), `xl` (32px), `2xl` (40px)
|
|
85
|
+
- **Gap**: `none` (0), `xs` (4px), `sm` (8px), `md` (16px), `lg` (24px), `xl` (32px)
|
|
86
|
+
|
|
87
|
+
### Control sizes
|
|
88
|
+
|
|
89
|
+
| Size | Height | Use case |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| `xs` | 24px | Compact tables, inline actions |
|
|
92
|
+
| `sm` | 32px | Secondary actions, filters |
|
|
93
|
+
| `md` | 40px | Default inputs, buttons |
|
|
94
|
+
| `lg` | 48px | Primary CTAs, prominent inputs |
|
|
95
|
+
|
|
96
|
+
### Border radius
|
|
97
|
+
|
|
98
|
+
| Token | Value | Use case |
|
|
99
|
+
|---|---|---|
|
|
100
|
+
| `corner-none` | 0px | Tables, full-width elements |
|
|
101
|
+
| `corner-sm` | 4px | Chips, badges, small elements |
|
|
102
|
+
| `corner-md` | 8px | Buttons, inputs, cards (default) |
|
|
103
|
+
| `corner-lg` | 12px | Modals, large cards |
|
|
104
|
+
| `corner-xl` | 16px | Hero sections, featured cards |
|
|
105
|
+
| `corner-full` | 9999px | Avatars, pills, circular buttons |
|
|
106
|
+
|
|
107
|
+
**Rule**: Be consistent within a feature. If a card uses `corner-md`, its internal buttons should also use `corner-md` or smaller — never larger than their container.
|
|
108
|
+
|
|
109
|
+
### Breakpoints
|
|
110
|
+
|
|
111
|
+
| Token | Value | Context |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `screen-xs` | 320px | Small mobile |
|
|
114
|
+
| `screen-sm` | 640px | Mobile |
|
|
115
|
+
| `screen-md` | 768px | Tablet |
|
|
116
|
+
| `screen-lg` | 1024px | Desktop |
|
|
117
|
+
| `screen-xl` | 1280px | Wide desktop |
|
|
118
|
+
| `screen-2xl` | 1440px | Ultra-wide |
|
|
119
|
+
|
|
120
|
+
## Component Styling Principles
|
|
121
|
+
|
|
122
|
+
- **Buttons**: `corner-md` (8px) radius by default. Primary actions use `accent-primary` fill with white text. Ghost and outline variants for secondary actions.
|
|
123
|
+
- **Inputs**: `corner-md` radius, `border-default` border, `surface-default` background. Focus state uses `accent-primary` ring.
|
|
124
|
+
- **Cards/Panels**: `surface-default` background, `border-default` border (1px), `corner-md` or `corner-lg` radius. No drop shadows by default — use `shadow-sm` only on hover or elevated contexts.
|
|
125
|
+
- **Modals/Drawers**: `surface-default` background, `corner-lg` radius on visible corners. Overlay uses `opacity-overlay-dim` (0.5).
|
|
126
|
+
- **Chips/Tags**: `corner-sm` (4px) radius, compact padding. Use semantic variants (`accent`, `success`, `danger`) to convey meaning.
|
|
127
|
+
- **Tables**: No border-radius on the table itself. Use `surface-subtle` for alternating rows or header background. `border-default` for cell dividers.
|
|
128
|
+
|
|
129
|
+
## Elevation & Shadows
|
|
130
|
+
|
|
131
|
+
| Token | Value | Use case |
|
|
132
|
+
|---|---|---|
|
|
133
|
+
| `shadow-none` | `none` | Default state for most elements |
|
|
134
|
+
| `shadow-sm` | `0 1px 2px 0 rgb(0 0 0 / 0.12)` | Hover states, subtle lift |
|
|
135
|
+
| `shadow-md` | `0 1px 3px 0 rgb(0 0 0 / 0.12)` | Dropdown menus, popovers |
|
|
136
|
+
| `shadow-lg` | `0 2px 8px -1px rgb(0 0 0 / 0.12)` | Modals, drawers |
|
|
137
|
+
| `shadow-xl` | `0 4px 15px -3px rgb(0 0 0 / 0.12)` | Toast notifications |
|
|
138
|
+
|
|
139
|
+
**Rule**: Prefer borders over shadows for static elements. Shadows should imply interactivity or overlay behavior. A card sitting on a page uses a border, not a shadow.
|
|
140
|
+
|
|
141
|
+
## Animation & Motion
|
|
142
|
+
|
|
143
|
+
- **Transitions**: 150ms (fast), 200ms (normal), 300ms (slow). Use `cubic-bezier(0, 0, 0.2, 1)` (ease-out) for most transitions.
|
|
144
|
+
- **Enter animations**: 200ms with ease-out. Elements enter from the direction they were triggered (dropdown from top, drawer from side).
|
|
145
|
+
- **Exit animations**: 150ms with `cubic-bezier(0.4, 0, 1, 1)` (ease-in). Exits are faster than enters.
|
|
146
|
+
|
|
147
|
+
**Rule**: Only animate properties that benefit the user's understanding of state change (opacity, transform). Never animate color or background-color on large surfaces — it feels sluggish.
|
|
148
|
+
|
|
149
|
+
## Do's and Don'ts
|
|
150
|
+
|
|
151
|
+
### Colors
|
|
152
|
+
|
|
153
|
+
- **Do** use semantic token names (`bg-surface-default`, `text-text-primary`), not raw hex values.
|
|
154
|
+
- **Do** use `accent-primary` sparingly — one primary CTA per visible area.
|
|
155
|
+
- **Don't** use `status-danger` red for non-error purposes (e.g., decorative highlights).
|
|
156
|
+
- **Don't** mix `text-muted` with `bg-subtle` — the contrast ratio is too low for accessibility.
|
|
157
|
+
- **Don't** override dark mode colors manually. The token system handles light/dark switching automatically.
|
|
158
|
+
|
|
159
|
+
### Typography
|
|
160
|
+
|
|
161
|
+
- **Do** use the typography token scale. Every text element should map to a token.
|
|
162
|
+
- **Don't** use more than 3 different text sizes in a single card or section.
|
|
163
|
+
- **Don't** use `font-bold` (700) for body text. Bold is reserved for headings and display text.
|
|
164
|
+
|
|
165
|
+
### Layout
|
|
166
|
+
|
|
167
|
+
- **Do** use the spacing scale tokens for all padding, margin, and gap values.
|
|
168
|
+
- **Do** maintain consistent spacing within a component: if padding-x is `md`, padding-y should be `sm` or `md`, not `2xs`.
|
|
169
|
+
- **Don't** use arbitrary pixel values (e.g., `p-[13px]`). Snap to the nearest spacing token.
|
|
170
|
+
- **Don't** nest more than 3 surface layers deep. If you need more depth, reconsider the information architecture.
|
|
171
|
+
|
|
172
|
+
### Components
|
|
173
|
+
|
|
174
|
+
- **Do** use `@nexus-cross/design-system` components for any matching UI element. Never re-implement buttons, inputs, modals, etc.
|
|
175
|
+
- **Do** use `className` prop for style overrides. The `cn()` utility resolves prefix conflicts automatically.
|
|
176
|
+
- **Don't** use `!important` in className overrides — it's unnecessary and breaks the override system.
|
|
177
|
+
- **Don't** wrap design system components in extra `<div>` elements for styling. Use `className` directly.
|
|
178
|
+
- **Don't** import Radix UI, Headless UI, or similar libraries to build components that already exist in the design system.
|
|
179
|
+
|
|
180
|
+
### Interaction States
|
|
181
|
+
|
|
182
|
+
- **Do** provide visual feedback for all interactive elements: hover, focus, active, disabled.
|
|
183
|
+
- **Do** use `focus-visible` outlines (not `focus`) to avoid showing focus rings on click.
|
|
184
|
+
- **Don't** remove focus indicators entirely — they are required for keyboard accessibility.
|
|
185
|
+
- **Don't** use `opacity` below `0.4` for disabled states — it becomes invisible in some contexts.
|
|
@@ -119,10 +119,14 @@ Text input field. Supports label, description, prefix/suffix icons, clearable, c
|
|
|
119
119
|
|
|
120
120
|
## TextArea
|
|
121
121
|
|
|
122
|
-
Multi-line text input
|
|
122
|
+
Multi-line text input with label, description, character counter, and resize modes.
|
|
123
123
|
|
|
124
124
|
| Prop | Type | Default | Description |
|
|
125
125
|
|---|---|---|---|
|
|
126
|
+
| `label` | `string` | - | Label text above the textarea |
|
|
127
|
+
| `description` | `string` | - | Helper/error description below the textarea |
|
|
128
|
+
| `size` | `'lg'` \| `'md'` | - | Font size variant (lg: 16px, md: 14px) |
|
|
129
|
+
| `resize` | `'default'` \| `'auto'` \| `'none'` | - | Resize mode (default: manual, auto: auto-grow, none: fixed) |
|
|
126
130
|
| `error` | `boolean` | - | Error state (auto aria-invalid) |
|
|
127
131
|
| `showCount` | `boolean` | - | Show character count (requires maxLength) |
|
|
128
132
|
| `maxLength` | `number` | - | Maximum character count |
|
|
@@ -941,21 +945,25 @@ Text ellipsis. Built-in show more/less toggle.
|
|
|
941
945
|
|
|
942
946
|
## NumberInput
|
|
943
947
|
|
|
944
|
-
Number input
|
|
948
|
+
Number input with two variants: basic (chevron arrows) and bind (+/- buttons). Supports label, description, max display (click to fill), accelerated increment on long press. numberInputBind(ref, direction) binds acceleration to external buttons.
|
|
945
949
|
|
|
946
950
|
| Prop | Type | Default | Description |
|
|
947
951
|
|---|---|---|---|
|
|
952
|
+
| `variant` | `'basic'` \| `'bind'` | `"basic"` | Variant: basic (right chevron arrows) or bind (left/right +/- buttons) |
|
|
948
953
|
| `value` | `number` \| `string` | - | Current value |
|
|
949
|
-
| `size` | `'
|
|
954
|
+
| `size` | `'lg'` \| `'xl'` | `"lg"` | Size |
|
|
950
955
|
| `error` | `boolean` | - | Error state |
|
|
951
956
|
| `min` | `number` | - | Minimum value |
|
|
952
|
-
| `max` | `number` | - | Maximum value |
|
|
957
|
+
| `max` | `number` | - | Maximum value. When set, "Max {value}" is displayed in the header. Clicking it fills the input with the max value |
|
|
953
958
|
| `step` | `number` | `1` | Step increment |
|
|
954
959
|
| `digit` | `number` | `0` | Decimal places |
|
|
955
|
-
| `
|
|
960
|
+
| `label` | `string` | - | Label text displayed above input |
|
|
961
|
+
| `description` | `string` | - | Description text displayed below input |
|
|
962
|
+
| `showMax` | `boolean` | - | Show "Max {value}" in header (defaults to true when max is set) |
|
|
963
|
+
| `hideButtons` | `boolean` | `false` | Hide built-in buttons. Use with numberInputBind for external button event binding |
|
|
956
964
|
| `disabled` | `boolean` | - | Disabled |
|
|
957
|
-
| `readOnly` | `boolean` | - | Read-only (includes hiding
|
|
958
|
-
| `placeholder` | `string` | - | Placeholder |
|
|
965
|
+
| `readOnly` | `boolean` | - | Read-only (includes hiding buttons) |
|
|
966
|
+
| `placeholder` | `string` | - | Placeholder (default: "0") |
|
|
959
967
|
| `name` | `string` | - | Form field name |
|
|
960
968
|
| `id` | `string` | - | Element ID |
|
|
961
969
|
| `autoFocus` | `boolean` | - | Auto focus |
|
|
@@ -1019,6 +1027,214 @@ Price/amount input field with prefix, suffix, balance display, and auto-fill on
|
|
|
1019
1027
|
|
|
1020
1028
|
---
|
|
1021
1029
|
|
|
1030
|
+
## Badge
|
|
1031
|
+
|
|
1032
|
+
Badge indicator. Dot or count display. Wraps children when provided.
|
|
1033
|
+
|
|
1034
|
+
| Prop | Type | Default | Description |
|
|
1035
|
+
|---|---|---|---|
|
|
1036
|
+
| `count` | `number` | - | Badge count number |
|
|
1037
|
+
| `max` | `number` | `99` | Max count (shows "99+" when exceeded) |
|
|
1038
|
+
| `dot` | `boolean` | `false` | Show as dot instead of count |
|
|
1039
|
+
| `showZero` | `boolean` | `false` | Show badge when count is 0 |
|
|
1040
|
+
| `variant` | `'danger'` \| `'primary'` \| `'secondary'` \| `'info'` \| `'success'` \| `'warning'` | `"danger"` | Color variant |
|
|
1041
|
+
| `size` | `'sm'` \| `'md'` \| `'lg'` | `"md"` | Size |
|
|
1042
|
+
| `offset` | `any` | - | Position offset [x, y] in px |
|
|
1043
|
+
| `children` | `ReactNode` | - | Anchor element to attach badge to (ReactNode) |
|
|
1044
|
+
| `className` | `string` | - | Style override |
|
|
1045
|
+
|
|
1046
|
+
---
|
|
1047
|
+
|
|
1048
|
+
## Progress
|
|
1049
|
+
|
|
1050
|
+
Progress bar. Linear progress indicator with percentage display.
|
|
1051
|
+
|
|
1052
|
+
| Prop | Type | Default | Description |
|
|
1053
|
+
|---|---|---|---|
|
|
1054
|
+
| `value` | `number` | `0` | Current progress value |
|
|
1055
|
+
| `max` | `number` | `100` | Maximum value |
|
|
1056
|
+
| `variant` | `'primary'` \| `'success'` \| `'warning'` \| `'danger'` \| `'info'` | `"primary"` | Color variant |
|
|
1057
|
+
| `size` | `'sm'` \| `'md'` \| `'lg'` | `"md"` | Bar height |
|
|
1058
|
+
| `showValue` | `boolean` | `false` | Show percentage text |
|
|
1059
|
+
| `indeterminate` | `boolean` | `false` | Indeterminate loading animation |
|
|
1060
|
+
| `label` | `string` | - | Label text above the bar |
|
|
1061
|
+
| `className` | `string` | - | Style override |
|
|
1062
|
+
|
|
1063
|
+
---
|
|
1064
|
+
|
|
1065
|
+
## Alert
|
|
1066
|
+
|
|
1067
|
+
Alert / Banner. Inline notification with icon, title, description.
|
|
1068
|
+
|
|
1069
|
+
| Prop | Type | Default | Description |
|
|
1070
|
+
|---|---|---|---|
|
|
1071
|
+
| `variant` | `'info'` \| `'success'` \| `'warning'` \| `'danger'` | `"info"` | Alert type / color |
|
|
1072
|
+
| `title` | `string` | - | Alert title (bold) |
|
|
1073
|
+
| `children` | `ReactNode` | - | Alert description (ReactNode) |
|
|
1074
|
+
| `icon` | `ReactNode` | - | Custom icon (ReactNode). Auto icon by variant if omitted |
|
|
1075
|
+
| `closable` | `boolean` | `false` | Show close button |
|
|
1076
|
+
| `onClose` | `ReactNode` | - | Close callback () => void |
|
|
1077
|
+
| `action` | `ReactNode` | - | Action area (ReactNode, e.g. Button) |
|
|
1078
|
+
| `className` | `string` | - | Style override |
|
|
1079
|
+
|
|
1080
|
+
---
|
|
1081
|
+
|
|
1082
|
+
## EmptyState
|
|
1083
|
+
|
|
1084
|
+
Empty state placeholder. Shown when data is empty or unavailable.
|
|
1085
|
+
|
|
1086
|
+
| Prop | Type | Default | Description |
|
|
1087
|
+
|---|---|---|---|
|
|
1088
|
+
| `icon` | `ReactNode` | - | Custom icon (ReactNode). Default inbox icon |
|
|
1089
|
+
| `title` | `string` | - | Title text |
|
|
1090
|
+
| `description` | `string` | - | Description text |
|
|
1091
|
+
| `action` | `ReactNode` | - | Action area (ReactNode, e.g. Button) |
|
|
1092
|
+
| `size` | `'sm'` \| `'md'` \| `'lg'` | `"md"` | Overall size |
|
|
1093
|
+
| `children` | `ReactNode` | - | Additional content (ReactNode) |
|
|
1094
|
+
| `className` | `string` | - | Style override |
|
|
1095
|
+
|
|
1096
|
+
---
|
|
1097
|
+
|
|
1098
|
+
## Breadcrumb
|
|
1099
|
+
|
|
1100
|
+
Breadcrumb navigation. Shows current location path.
|
|
1101
|
+
|
|
1102
|
+
| Prop | Type | Default | Description |
|
|
1103
|
+
|---|---|---|---|
|
|
1104
|
+
| `items` | `object`[] | - | Breadcrumb items array (required) |
|
|
1105
|
+
| `separator` | `ReactNode` | - | Custom separator (ReactNode). Default: chevron |
|
|
1106
|
+
| `maxItems` | `number` | - | Max visible items (collapses middle with "...") |
|
|
1107
|
+
| `className` | `string` | - | Style override |
|
|
1108
|
+
|
|
1109
|
+
---
|
|
1110
|
+
|
|
1111
|
+
## Stepper
|
|
1112
|
+
|
|
1113
|
+
Stepper. Step-by-step progress indicator.
|
|
1114
|
+
|
|
1115
|
+
| Prop | Type | Default | Description |
|
|
1116
|
+
|---|---|---|---|
|
|
1117
|
+
| `steps` | `object`[] | - | Step items array (required) |
|
|
1118
|
+
| `current` | `number` | `0` | Current step index (0-based) |
|
|
1119
|
+
| `status` | `'process'` \| `'error'` | `"process"` | Current step status |
|
|
1120
|
+
| `orientation` | `'horizontal'` \| `'vertical'` | `"horizontal"` | Layout direction |
|
|
1121
|
+
| `size` | `'sm'` \| `'md'` | `"md"` | Size |
|
|
1122
|
+
| `className` | `string` | - | Style override |
|
|
1123
|
+
|
|
1124
|
+
---
|
|
1125
|
+
|
|
1126
|
+
## DropdownMenu
|
|
1127
|
+
|
|
1128
|
+
Dropdown menu. Based on Radix DropdownMenu. Action menu for context/more menus.
|
|
1129
|
+
|
|
1130
|
+
| Prop | Type | Default | Description |
|
|
1131
|
+
|---|---|---|---|
|
|
1132
|
+
| `children` | `ReactNode` | - | Trigger element (ReactNode, required) |
|
|
1133
|
+
| `items` | `object`[] | - | Menu items array (required) |
|
|
1134
|
+
| `align` | `'start'` \| `'center'` \| `'end'` | `"start"` | Alignment |
|
|
1135
|
+
| `side` | `'top'` \| `'right'` \| `'bottom'` \| `'left'` | `"bottom"` | Position |
|
|
1136
|
+
| `className` | `string` | - | Trigger wrapper style |
|
|
1137
|
+
| `contentClassName` | `string` | - | Content panel style |
|
|
1138
|
+
|
|
1139
|
+
---
|
|
1140
|
+
|
|
1141
|
+
## ToggleGroup
|
|
1142
|
+
|
|
1143
|
+
Toggle group / Segment control. Based on Radix ToggleGroup.
|
|
1144
|
+
|
|
1145
|
+
| Prop | Type | Default | Description |
|
|
1146
|
+
|---|---|---|---|
|
|
1147
|
+
| `type` | `'single'` \| `'multiple'` | `"single"` | Selection mode |
|
|
1148
|
+
| `items` | `object`[] | - | Toggle items array (required) |
|
|
1149
|
+
| `value` | `ReactNode` | - | Controlled value (string | string[]) |
|
|
1150
|
+
| `defaultValue` | `ReactNode` | - | Default value |
|
|
1151
|
+
| `onValueChange` | `ReactNode` | - | Value change callback |
|
|
1152
|
+
| `variant` | `'default'` \| `'outline'` | `"default"` | Style variant |
|
|
1153
|
+
| `size` | `'sm'` \| `'md'` \| `'lg'` | `"md"` | Size |
|
|
1154
|
+
| `disabled` | `boolean` | - | Disable all items |
|
|
1155
|
+
| `className` | `string` | - | Style override |
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
1159
|
+
## Slider
|
|
1160
|
+
|
|
1161
|
+
Slider / Range input. Based on Radix Slider. Supports single and range mode.
|
|
1162
|
+
|
|
1163
|
+
| Prop | Type | Default | Description |
|
|
1164
|
+
|---|---|---|---|
|
|
1165
|
+
| `value` | `number`[] | - | Controlled value (number[]). Use [50] for single, [20, 80] for range |
|
|
1166
|
+
| `defaultValue` | `number`[] | - | Default value |
|
|
1167
|
+
| `min` | `number` | `0` | Minimum |
|
|
1168
|
+
| `max` | `number` | `100` | Maximum |
|
|
1169
|
+
| `step` | `number` | `1` | Step increment |
|
|
1170
|
+
| `size` | `'sm'` \| `'md'` \| `'lg'` | `"md"` | Track height / thumb size |
|
|
1171
|
+
| `showValue` | `boolean` | `false` | Show current value text |
|
|
1172
|
+
| `formatValue` | `ReactNode` | - | Value format function (value: number) => string |
|
|
1173
|
+
| `label` | `string` | - | Label text |
|
|
1174
|
+
| `disabled` | `boolean` | - | Disabled |
|
|
1175
|
+
| `onValueChange` | `ReactNode` | - | Value change callback (value: number[]) => void |
|
|
1176
|
+
| `onValueCommit` | `ReactNode` | - | Committed value callback (on pointer up) |
|
|
1177
|
+
| `className` | `string` | - | Style override |
|
|
1178
|
+
|
|
1179
|
+
---
|
|
1180
|
+
|
|
1181
|
+
## TagInput
|
|
1182
|
+
|
|
1183
|
+
Tag input. Enter key to add, Backspace to delete last tag.
|
|
1184
|
+
|
|
1185
|
+
| Prop | Type | Default | Description |
|
|
1186
|
+
|---|---|---|---|
|
|
1187
|
+
| `value` | `string`[] | - | Controlled tags array |
|
|
1188
|
+
| `defaultValue` | `string`[] | - | Default tags |
|
|
1189
|
+
| `onChange` | `ReactNode` | - | Tags change callback (tags: string[]) => void |
|
|
1190
|
+
| `placeholder` | `string` | `"태그 입력 후 Enter"` | Input placeholder |
|
|
1191
|
+
| `max` | `number` | - | Maximum number of tags |
|
|
1192
|
+
| `disabled` | `boolean` | - | Disabled |
|
|
1193
|
+
| `allowDuplicates` | `boolean` | `false` | Allow duplicate tags |
|
|
1194
|
+
| `label` | `string` | - | Label text |
|
|
1195
|
+
| `description` | `string` | - | Helper text below input |
|
|
1196
|
+
| `size` | `'sm'` \| `'md'` \| `'lg'` | `"md"` | Size |
|
|
1197
|
+
| `className` | `string` | - | Style override |
|
|
1198
|
+
|
|
1199
|
+
---
|
|
1200
|
+
|
|
1201
|
+
## NxImage
|
|
1202
|
+
|
|
1203
|
+
Enhanced image. Lazy loading, fallback, aspect-ratio support.
|
|
1204
|
+
|
|
1205
|
+
| Prop | Type | Default | Description |
|
|
1206
|
+
|---|---|---|---|
|
|
1207
|
+
| `src` | `string` | - | Image source URL |
|
|
1208
|
+
| `alt` | `string` | - | Alt text |
|
|
1209
|
+
| `fallback` | `ReactNode` | - | Custom fallback element (ReactNode) |
|
|
1210
|
+
| `fallbackSrc` | `string` | - | Fallback image URL on error |
|
|
1211
|
+
| `aspectRatio` | `string` | - | CSS aspect-ratio (e.g. "16/9", "1/1") |
|
|
1212
|
+
| `objectFit` | `'cover'` \| `'contain'` \| `'fill'` \| `'none'` | `"cover"` | Object-fit mode |
|
|
1213
|
+
| `lazy` | `boolean` | `true` | Enable lazy loading (loading="lazy") |
|
|
1214
|
+
| `wrapperClassName` | `string` | - | Wrapper div style |
|
|
1215
|
+
| `className` | `string` | - | Image element style |
|
|
1216
|
+
|
|
1217
|
+
---
|
|
1218
|
+
|
|
1219
|
+
## DatePicker
|
|
1220
|
+
|
|
1221
|
+
DatePicker. Calendar popup for date selection. Based on react-day-picker.
|
|
1222
|
+
|
|
1223
|
+
| Prop | Type | Default | Description |
|
|
1224
|
+
|---|---|---|---|
|
|
1225
|
+
| `value` | `ReactNode` | - | Controlled date value (Date) |
|
|
1226
|
+
| `defaultValue` | `ReactNode` | - | Default date (Date) |
|
|
1227
|
+
| `onChange` | `ReactNode` | - | Date change callback (date: Date | undefined) => void |
|
|
1228
|
+
| `placeholder` | `string` | `"날짜 선택"` | Placeholder text |
|
|
1229
|
+
| `disabled` | `boolean` | `false` | Disabled |
|
|
1230
|
+
| `minDate` | `ReactNode` | - | Minimum selectable date (Date) |
|
|
1231
|
+
| `maxDate` | `ReactNode` | - | Maximum selectable date (Date) |
|
|
1232
|
+
| `locale` | `'ko'` \| `'en'` | `"ko"` | Calendar locale |
|
|
1233
|
+
| `formatStr` | `string` | `"yyyy-MM-dd"` | Date format string (date-fns format) |
|
|
1234
|
+
| `className` | `string` | - | Style override |
|
|
1235
|
+
|
|
1236
|
+
---
|
|
1237
|
+
|
|
1022
1238
|
## Hooks
|
|
1023
1239
|
|
|
1024
1240
|
### useModal
|
|
@@ -43,35 +43,50 @@ Dividers (2) → <Divider>
|
|
|
43
43
|
|---|---|---|
|
|
44
44
|
| Button | `<Button>` | `import { Button } from '@nexus-cross/design-system'` |
|
|
45
45
|
| Text input | `<TextInput>` | `import { TextInput } from '@nexus-cross/design-system'` |
|
|
46
|
+
| Price / currency input | `<PriceInput>` | `import { PriceInput } from '@nexus-cross/design-system'` |
|
|
46
47
|
| Text area | `<TextArea>` | `import { TextArea } from '@nexus-cross/design-system'` |
|
|
48
|
+
| Number input | `<NumberInput>` | `import { NumberInput } from '@nexus-cross/design-system'` |
|
|
47
49
|
| Select / Dropdown | `<Select>` + `<SelectItem>` | `import { Select, SelectItem } from '@nexus-cross/design-system'` |
|
|
50
|
+
| Dropdown menu / Context menu | `<DropdownMenu>` | `import { DropdownMenu } from '@nexus-cross/design-system'` |
|
|
48
51
|
| Checkbox | `<CheckBox>` | `import { CheckBox } from '@nexus-cross/design-system'` |
|
|
49
52
|
| Radio group | `<RadioGroup>` + `<RadioItem>` | `import { RadioGroup, RadioItem } from '@nexus-cross/design-system'` |
|
|
50
53
|
| Toggle / Switch | `<Switch>` | `import { Switch } from '@nexus-cross/design-system'` |
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
| Toast / Notification | `toast()` | `import { toast } from '@nexus-cross/design-system'` |
|
|
54
|
+
| Toggle group / Segmented control | `<ToggleGroup>` | `import { ToggleGroup } from '@nexus-cross/design-system'` |
|
|
55
|
+
| Slider / Range | `<Slider>` | `import { Slider } from '@nexus-cross/design-system'` |
|
|
56
|
+
| Tag input / Multi-value input | `<TagInput>` | `import { TagInput } from '@nexus-cross/design-system'` |
|
|
57
|
+
| Date picker | `<DatePicker>` | `import { DatePicker } from '@nexus-cross/design-system'` |
|
|
58
|
+
| Chip / Tag | `<Chip>` | `import { Chip } from '@nexus-cross/design-system'` |
|
|
59
|
+
| Badge / Status dot | `<Badge>` | `import { Badge } from '@nexus-cross/design-system'` |
|
|
60
|
+
| Avatar / Profile | `<Avatar>` | `import { Avatar } from '@nexus-cross/design-system'` |
|
|
61
|
+
| Image / Lazy image | `<NxImage>` | `import { NxImage } from '@nexus-cross/design-system'` |
|
|
60
62
|
| Table | `<Table>` | `import { Table, TableRow, TdColumn } from '@nexus-cross/design-system'` |
|
|
61
|
-
|
|
|
63
|
+
| Accordion / Collapsible | `<Accordion>` | `import { Accordion } from '@nexus-cross/design-system'` |
|
|
62
64
|
| Text ellipsis | `<Ellipsis>` | `import { Ellipsis } from '@nexus-cross/design-system'` |
|
|
63
|
-
| Pagination | `<Pagination>` | `import { Pagination } from '@nexus-cross/design-system'` |
|
|
64
|
-
| Number input | `<NumberInput>` | `import { NumberInput } from '@nexus-cross/design-system'` |
|
|
65
|
-
| Avatar / Profile | `<Avatar>` | `import { Avatar } from '@nexus-cross/design-system'` |
|
|
66
65
|
| Counter | `<Counter>` | `import { Counter } from '@nexus-cross/design-system'` |
|
|
67
66
|
| Countdown | `<Countdown>` | `import { Countdown } from '@nexus-cross/design-system'` |
|
|
68
|
-
|
|
|
67
|
+
| Data list | `<DataList>` | `import { DataList } from '@nexus-cross/design-system'` |
|
|
68
|
+
| Empty state / No data | `<EmptyState>` | `import { EmptyState } from '@nexus-cross/design-system'` |
|
|
69
69
|
| Tab | `<Tab>` | `import { Tab } from '@nexus-cross/design-system'` |
|
|
70
|
+
| Breadcrumb | `<Breadcrumb>` | `import { Breadcrumb } from '@nexus-cross/design-system'` |
|
|
71
|
+
| Stepper / Steps | `<Stepper>` | `import { Stepper } from '@nexus-cross/design-system'` |
|
|
72
|
+
| Pagination | `<Pagination>` | `import { Pagination } from '@nexus-cross/design-system'` |
|
|
70
73
|
| Carousel / Slider | `<Carousel>` | `import { Carousel, CarouselSlide } from '@nexus-cross/design-system'` |
|
|
74
|
+
| Modal / Dialog | `openModal()` | `import { openModal } from '@nexus-cross/design-system'` |
|
|
75
|
+
| Toast / Notification | `toast()` | `import { toast } from '@nexus-cross/design-system'` |
|
|
76
|
+
| Drawer / Bottom sheet | `<Drawer>` | `import { Drawer } from '@nexus-cross/design-system'` |
|
|
77
|
+
| Popover | `<Popover>` | `import { Popover } from '@nexus-cross/design-system'` |
|
|
78
|
+
| Tooltip | `<Tooltip>` | `import { Tooltip } from '@nexus-cross/design-system'` |
|
|
79
|
+
| Loading spinner | `<Spinner>` | `import { Spinner } from '@nexus-cross/design-system'` |
|
|
80
|
+
| Progress bar | `<Progress>` | `import { Progress } from '@nexus-cross/design-system'` |
|
|
81
|
+
| Alert / Banner | `<Alert>` | `import { Alert } from '@nexus-cross/design-system'` |
|
|
82
|
+
| Skeleton loader | `<Skeleton>` | `import { Skeleton } from '@nexus-cross/design-system'` |
|
|
83
|
+
| Divider | `<Divider>` | `import { Divider } from '@nexus-cross/design-system'` |
|
|
84
|
+
| Marquee | `<Marquee>` | `import { Marquee } from '@nexus-cross/design-system'` |
|
|
85
|
+
| Infinite scroll | `<InfiniteScroll>` | `import { InfiniteScroll } from '@nexus-cross/design-system'` |
|
|
71
86
|
| Virtual scroll list | `<VirtualList>` | `import { VirtualList } from '@nexus-cross/design-system'` |
|
|
72
87
|
| Virtual scroll grid | `<VirtualGrid>` | `import { VirtualGrid } from '@nexus-cross/design-system'` |
|
|
73
|
-
|
|
|
74
|
-
|
|
|
88
|
+
| Client-only render | `<ClientOnly>` | `import { ClientOnly } from '@nexus-cross/design-system'` |
|
|
89
|
+
| Error boundary | `<ErrorBoundary>` | `import { ErrorBoundary } from '@nexus-cross/design-system'` |
|
|
75
90
|
|
|
76
91
|
## Visual Pattern → Component Mapping
|
|
77
92
|
|
|
@@ -83,9 +98,21 @@ The table above maps by Figma element name, which can miss **visual patterns**.
|
|
|
83
98
|
| Icon-only button (hamburger, X, settings, app launcher, etc.) | `<Button variant="ghost">` or `<Button variant="outlined">` | Using native `<button>` |
|
|
84
99
|
| Horizontal filter/tab group (single selection) | `<Tab>` | Repeating `<button>` manually |
|
|
85
100
|
| Small label / badge / status indicator (Yes/No, Active, New, etc.) | `<Chip>` | Using native `<span>` |
|
|
101
|
+
| Numeric badge / notification count dot | `<Badge>` | Using absolute-positioned `<span>` manually |
|
|
86
102
|
| Number increment/decrement UI (+/- buttons) | `<NumberInput>` + `numberInputBind` | Using `<input type="number">` + custom buttons |
|
|
103
|
+
| Price / currency input with prefix ($, ₩) | `<PriceInput>` | Using `<TextInput>` + manual formatting |
|
|
104
|
+
| Multi-tag / multi-value input field | `<TagInput>` | Building custom chip array + input |
|
|
105
|
+
| Right-click or kebab menu | `<DropdownMenu>` | Using `<Popover>` + manual list |
|
|
106
|
+
| Segmented button group (multi-option toggle) | `<ToggleGroup>` | Using multiple `<Button>` manually |
|
|
107
|
+
| Step indicator / wizard progress | `<Stepper>` | Using numbered divs manually |
|
|
108
|
+
| Breadcrumb navigation trail | `<Breadcrumb>` | Using `<span>` + separator manually |
|
|
109
|
+
| Progress / loading bar | `<Progress>` | Using `<div>` with width percentage |
|
|
110
|
+
| Alert / info / warning / error banner | `<Alert>` | Using styled `<div>` with icon |
|
|
111
|
+
| Empty state / no data placeholder | `<EmptyState>` | Building custom empty UI per component |
|
|
87
112
|
| Data list with loading/empty states | `<DataList>` | Using `{list.map()}` + manual conditional rendering |
|
|
88
113
|
| Overflowing text | `<Ellipsis>` | Applying `truncate` / `line-clamp` directly |
|
|
114
|
+
| Range slider | `<Slider>` | Using native `<input type="range">` |
|
|
115
|
+
| Date selection | `<DatePicker>` | Using native `<input type="date">` |
|
|
89
116
|
|
|
90
117
|
## Utilities & Hooks
|
|
91
118
|
|
|
@@ -125,7 +152,7 @@ import { buttonVariants } from '@nexus-cross/design-system';
|
|
|
125
152
|
</a>
|
|
126
153
|
```
|
|
127
154
|
|
|
128
|
-
Available variant functions: `buttonVariants`, `chipVariants`, `switchVariants`, `textInputVariants`, `textAreaVariants`, `checkBoxVariants`, `radioGroupVariants`, `radioItemVariants`, `dividerVariants`, `selectTriggerVariants`, `selectContentVariants`, `tooltipContentVariants`, `popoverContentVariants`, `drawerContentVariants`
|
|
155
|
+
Available variant functions: `buttonVariants`, `chipVariants`, `badgeVariants`, `switchVariants`, `textInputVariants`, `textAreaVariants`, `priceInputVariants`, `numberInputVariants`, `checkBoxVariants`, `radioGroupVariants`, `radioItemVariants`, `dividerVariants`, `selectTriggerVariants`, `selectContentVariants`, `tooltipContentVariants`, `popoverContentVariants`, `drawerContentVariants`, `toggleGroupVariants`, `sliderVariants`, `tagInputVariants`, `progressVariants`, `alertVariants`, `emptyStateVariants`, `stepperVariants`, `tabListVariants`, `tabTriggerVariants`, `paginationVariants`
|
|
129
156
|
|
|
130
157
|
## When Customization Is Needed
|
|
131
158
|
|
package/dist/alert.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk5PQ3UCKF_js = require('./chunks/chunk-5PQ3UCKF.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Alert", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk5PQ3UCKF_js.Alert; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "alertVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunk5PQ3UCKF_js.alertVariants; }
|
|
16
|
+
});
|
package/dist/alert.mjs
ADDED
package/dist/badge.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkS2GMEC43_js = require('./chunks/chunk-S2GMEC43.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Badge", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkS2GMEC43_js.Badge; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "badgeVariants", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkS2GMEC43_js.badgeVariants; }
|
|
16
|
+
});
|
package/dist/badge.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3ZWN66YH_js = require('./chunks/chunk-3ZWN66YH.js');
|
|
4
|
+
require('./chunks/chunk-CZC76ZD5.js');
|
|
5
|
+
require('./chunks/chunk-JNMCYWGY.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "Breadcrumb", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunk3ZWN66YH_js.Breadcrumb; }
|
|
12
|
+
});
|