@nexub/react 3.0.0 → 3.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/dist/components/Accordion/Accordion.d.ts +10 -0
- package/dist/{chunk-DOVZNUSH.js → components/Accordion/Accordion.js} +12 -17
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +1 -5
- package/dist/components/Alert/Alert.d.ts +14 -0
- package/dist/{chunk-U422B6UE.js → components/Alert/Alert.js} +8 -15
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/index.js +1 -7
- package/dist/components/AlertDialog/AlertDialog.d.ts +15 -0
- package/dist/{chunk-PDQTKE2C.js → components/AlertDialog/AlertDialog.js} +32 -42
- package/dist/components/AlertDialog/index.d.ts +1 -0
- package/dist/components/AlertDialog/index.js +1 -9
- package/dist/components/Amount/Amount.d.ts +22 -0
- package/dist/{chunk-IBBICKEZ.js → components/Amount/Amount.js} +10 -21
- package/dist/components/Amount/index.d.ts +2 -0
- package/dist/components/Amount/index.js +1 -8
- package/dist/components/AppShell/AppShell.d.ts +8 -0
- package/dist/{chunk-EPJ4CMZP.js → components/AppShell/AppShell.js} +8 -14
- package/dist/components/AppShell/index.d.ts +1 -0
- package/dist/components/AppShell/index.js +1 -5
- package/dist/components/AspectRatio/AspectRatio.d.ts +5 -0
- package/dist/{chunk-52CXVN3U.js → components/AspectRatio/AspectRatio.js} +4 -10
- package/dist/components/AspectRatio/index.d.ts +2 -0
- package/dist/components/AspectRatio/index.js +1 -5
- package/dist/components/Autocomplete/Autocomplete.d.ts +18 -0
- package/dist/{chunk-E7RLUHG3.js → components/Autocomplete/Autocomplete.js} +4 -11
- package/dist/components/Autocomplete/index.d.ts +2 -0
- package/dist/components/Autocomplete/index.js +1 -7
- package/dist/components/Avatar/Avatar.d.ts +13 -0
- package/dist/{chunk-AYG7HBDZ.js → components/Avatar/Avatar.js} +8 -13
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Avatar/index.js +1 -7
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +12 -0
- package/dist/{chunk-BMUAR6H2.js → components/AvatarGroup/AvatarGroup.js} +9 -18
- package/dist/components/AvatarGroup/index.d.ts +2 -0
- package/dist/components/AvatarGroup/index.js +1 -8
- package/dist/components/Badge/Badge.d.ts +12 -0
- package/dist/{chunk-FBUKWIWR.js → components/Badge/Badge.js} +7 -13
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +1 -6
- package/dist/components/Box/Box.d.ts +5 -0
- package/dist/{chunk-ZCHZNGWU.js → components/Box/Box.js} +3 -9
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Box/index.js +1 -5
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +21 -0
- package/dist/{chunk-SQGRT72E.js → components/Breadcrumb/Breadcrumb.js} +12 -19
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Breadcrumb/index.js +1 -6
- package/dist/components/Button/Button.d.ts +30 -0
- package/dist/{chunk-GHLMHKMV.js → components/Button/Button.js} +19 -37
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +1 -9
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +6 -0
- package/dist/{chunk-7EQ2LIYD.js → components/ButtonGroup/ButtonGroup.js} +3 -9
- package/dist/components/ButtonGroup/index.d.ts +2 -0
- package/dist/components/ButtonGroup/index.js +1 -6
- package/dist/components/Card/Card.d.ts +27 -0
- package/dist/{chunk-T466ZB34.js → components/Card/Card.js} +18 -46
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +1 -8
- package/dist/components/Chart/Chart.d.ts +81 -0
- package/dist/components/Chart/Chart.js +174 -0
- package/dist/components/Chart/index.d.ts +2 -0
- package/dist/components/Chart/index.js +9 -0
- package/dist/components/CheckList/CheckList.d.ts +10 -0
- package/dist/{chunk-T3RBFJML.js → components/CheckList/CheckList.js} +4 -10
- package/dist/components/CheckList/index.d.ts +2 -0
- package/dist/components/CheckList/index.js +1 -6
- package/dist/components/Checkbox/Checkbox.d.ts +5 -0
- package/dist/{chunk-JOOKMCAF.js → components/Checkbox/Checkbox.js} +4 -9
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.js +1 -5
- package/dist/components/CheckboxCard/CheckboxCard.d.ts +9 -0
- package/dist/{chunk-EYGT5IX4.js → components/CheckboxCard/CheckboxCard.js} +7 -12
- package/dist/components/CheckboxCard/index.d.ts +2 -0
- package/dist/components/CheckboxCard/index.js +1 -6
- package/dist/components/Chip/Chip.d.ts +12 -0
- package/dist/{chunk-PFDUHXT5.js → components/Chip/Chip.js} +8 -15
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.js +1 -7
- package/dist/components/Citation/Citation.d.ts +44 -0
- package/dist/{chunk-IA2362SO.js → components/Citation/Citation.js} +12 -21
- package/dist/components/Citation/index.d.ts +2 -0
- package/dist/components/Citation/index.js +1 -11
- package/dist/components/Code/Code.d.ts +6 -0
- package/dist/{chunk-NX44VGON.js → components/Code/Code.js} +3 -9
- package/dist/components/Code/index.d.ts +2 -0
- package/dist/components/Code/index.js +1 -5
- package/dist/components/Collapsible/Collapsible.d.ts +7 -0
- package/dist/{chunk-4WIUGX5Z.js → components/Collapsible/Collapsible.js} +10 -15
- package/dist/components/Collapsible/index.d.ts +1 -0
- package/dist/components/Collapsible/index.js +1 -5
- package/dist/components/Combobox/Combobox.d.ts +75 -0
- package/dist/{chunk-XWELMPYD.js → components/Combobox/Combobox.js} +11 -16
- package/dist/components/Combobox/index.d.ts +1 -0
- package/dist/components/Combobox/index.js +1 -6
- package/dist/components/CommandPalette/CommandPalette.d.ts +73 -0
- package/dist/{chunk-LASPHHH6.js → components/CommandPalette/CommandPalette.js} +16 -28
- package/dist/components/CommandPalette/index.d.ts +2 -0
- package/dist/components/CommandPalette/index.js +1 -8
- package/dist/components/Container/Container.d.ts +10 -0
- package/dist/{chunk-EQ5ASTJM.js → components/Container/Container.js} +7 -12
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Container/index.js +1 -6
- package/dist/components/ContextMenu/ContextMenu.d.ts +18 -0
- package/dist/{chunk-CUCTSWR2.js → components/ContextMenu/ContextMenu.js} +42 -53
- package/dist/components/ContextMenu/index.d.ts +1 -0
- package/dist/components/ContextMenu/index.js +1 -6
- package/dist/components/CountryBadge/CountryBadge.d.ts +8 -0
- package/dist/{chunk-JZCZ2SDT.js → components/CountryBadge/CountryBadge.js} +5 -13
- package/dist/components/CountryBadge/index.d.ts +2 -0
- package/dist/components/CountryBadge/index.js +1 -6
- package/dist/components/DataTable/DataTable.d.ts +24 -0
- package/dist/{chunk-A7PS3EZO.js → components/DataTable/DataTable.js} +15 -27
- package/dist/components/DataTable/index.d.ts +2 -0
- package/dist/components/DataTable/index.js +1 -8
- package/dist/components/DatePicker/DatePicker.d.ts +39 -0
- package/dist/{chunk-OY5CWWIM.js → components/DatePicker/DatePicker.js} +11 -24
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +1 -9
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +20 -0
- package/dist/{chunk-YYAXXJH3.js → components/DateRangePicker/DateRangePicker.js} +9 -23
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/DateRangePicker/index.js +1 -9
- package/dist/components/Dialog/Dialog.d.ts +21 -0
- package/dist/{chunk-CEFGILJY.js → components/Dialog/Dialog.js} +28 -38
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Dialog/index.js +1 -7
- package/dist/components/Drawer/Drawer.d.ts +94 -0
- package/dist/components/Drawer/Drawer.js +131 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Drawer/index.js +1 -9
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +18 -0
- package/dist/{chunk-GWFIMQBC.js → components/DropdownMenu/DropdownMenu.js} +42 -53
- package/dist/components/DropdownMenu/index.d.ts +1 -0
- package/dist/components/DropdownMenu/index.js +1 -7
- package/dist/components/EmptyState/EmptyState.d.ts +8 -0
- package/dist/{chunk-AWTSLASB.js → components/EmptyState/EmptyState.js} +8 -14
- package/dist/components/EmptyState/index.d.ts +1 -0
- package/dist/components/EmptyState/index.js +1 -5
- package/dist/components/ErrorState/ErrorState.d.ts +10 -0
- package/dist/{chunk-NX5ZJSRU.js → components/ErrorState/ErrorState.js} +6 -13
- package/dist/components/ErrorState/index.d.ts +2 -0
- package/dist/components/ErrorState/index.js +1 -6
- package/dist/components/EyebrowChip/EyebrowChip.d.ts +11 -0
- package/dist/{chunk-MXXJOAWQ.js → components/EyebrowChip/EyebrowChip.js} +7 -13
- package/dist/components/EyebrowChip/index.d.ts +2 -0
- package/dist/components/EyebrowChip/index.js +1 -8
- package/dist/components/FileUpload/FileUpload.d.ts +16 -0
- package/dist/{chunk-LR6KNEKL.js → components/FileUpload/FileUpload.js} +12 -19
- package/dist/components/FileUpload/index.d.ts +2 -0
- package/dist/components/FileUpload/index.js +1 -6
- package/dist/components/FilterChip/FilterChip.d.ts +8 -0
- package/dist/{chunk-36QSSD7I.js → components/FilterChip/FilterChip.js} +6 -15
- package/dist/components/FilterChip/index.d.ts +2 -0
- package/dist/components/FilterChip/index.js +1 -7
- package/dist/components/Flag/Flag.d.ts +7 -0
- package/dist/{chunk-HOQPHAGW.js → components/Flag/Flag.js} +4 -10
- package/dist/components/Flag/index.d.ts +2 -0
- package/dist/components/Flag/index.js +1 -6
- package/dist/components/Flex/Flex.d.ts +10 -0
- package/dist/{chunk-BOO4VH3M.js → components/Flex/Flex.js} +5 -13
- package/dist/components/Flex/index.d.ts +2 -0
- package/dist/components/Flex/index.js +1 -6
- package/dist/components/FormError/FormError.d.ts +3 -0
- package/dist/{chunk-H2X6MSNY.js → components/FormError/FormError.js} +3 -9
- package/dist/components/FormError/index.d.ts +2 -0
- package/dist/components/FormError/index.js +1 -6
- package/dist/components/FormField/FormField.d.ts +46 -0
- package/dist/{chunk-FT73REUG.js → components/FormField/FormField.js} +9 -20
- package/dist/components/FormField/index.d.ts +2 -0
- package/dist/components/FormField/index.js +1 -11
- package/dist/components/GradientDivider/GradientDivider.d.ts +6 -0
- package/dist/{chunk-FDRAGYDV.js → components/GradientDivider/GradientDivider.js} +7 -13
- package/dist/components/GradientDivider/index.d.ts +2 -0
- package/dist/components/GradientDivider/index.js +1 -5
- package/dist/components/Grid/Grid.d.ts +9 -0
- package/dist/{chunk-F5S2KP3Z.js → components/Grid/Grid.js} +5 -13
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.js +1 -6
- package/dist/components/Heading/Heading.d.ts +17 -0
- package/dist/{chunk-Z7OR2LYG.js → components/Heading/Heading.js} +8 -16
- package/dist/components/Heading/index.d.ts +2 -0
- package/dist/components/Heading/index.js +1 -9
- package/dist/components/HelperText/HelperText.d.ts +6 -0
- package/dist/{chunk-QKGQBJ4U.js → components/HelperText/HelperText.js} +4 -12
- package/dist/components/HelperText/index.d.ts +2 -0
- package/dist/components/HelperText/index.js +1 -9
- package/dist/components/HoverCard/HoverCard.d.ts +10 -0
- package/dist/{chunk-KL55E5PE.js → components/HoverCard/HoverCard.js} +15 -22
- package/dist/components/HoverCard/index.d.ts +1 -0
- package/dist/components/HoverCard/index.js +1 -7
- package/dist/components/IconButton/IconButton.d.ts +11 -0
- package/dist/{chunk-RH2HEPC7.js → components/IconButton/IconButton.js} +7 -17
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/IconButton/index.js +1 -8
- package/dist/components/Input/Input.d.ts +21 -0
- package/dist/{chunk-G7VMAWAX.js → components/Input/Input.js} +10 -21
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.js +1 -10
- package/dist/components/Kbd/Kbd.d.ts +4 -0
- package/dist/{chunk-OM62PQSE.js → components/Kbd/Kbd.js} +3 -9
- package/dist/components/Kbd/index.d.ts +2 -0
- package/dist/components/Kbd/index.js +1 -6
- package/dist/components/KeyboardShortcut/KeyboardShortcut.d.ts +5 -0
- package/dist/{chunk-PR3CEPFG.js → components/KeyboardShortcut/KeyboardShortcut.js} +4 -12
- package/dist/components/KeyboardShortcut/index.d.ts +2 -0
- package/dist/components/KeyboardShortcut/index.js +1 -6
- package/dist/components/Label/Label.d.ts +15 -0
- package/dist/{chunk-BM5PGGK2.js → components/Label/Label.js} +7 -15
- package/dist/components/Label/index.d.ts +2 -0
- package/dist/components/Label/index.js +1 -10
- package/dist/components/Link/Link.d.ts +11 -0
- package/dist/{chunk-QCLE5VQW.js → components/Link/Link.js} +6 -12
- package/dist/components/Link/index.d.ts +2 -0
- package/dist/components/Link/index.js +1 -6
- package/dist/components/Logo/Logo.d.ts +15 -0
- package/dist/{chunk-ZGJF4HAT.js → components/Logo/Logo.js} +8 -14
- package/dist/components/Logo/index.d.ts +2 -0
- package/dist/components/Logo/index.js +1 -6
- package/dist/components/MediaCard/MediaCard.d.ts +24 -0
- package/dist/{chunk-5DHLFPC4.js → components/MediaCard/MediaCard.js} +5 -13
- package/dist/components/MediaCard/index.d.ts +2 -0
- package/dist/components/MediaCard/index.js +1 -6
- package/dist/components/Menubar/Menubar.d.ts +1 -0
- package/dist/{chunk-PPECMYKJ.js → components/Menubar/Menubar.js} +50 -61
- package/dist/components/Menubar/index.d.ts +1 -0
- package/dist/components/Menubar/index.js +1 -6
- package/dist/components/MessageBubble/MessageBubble.d.ts +43 -0
- package/dist/{chunk-RNS35DNZ.js → components/MessageBubble/MessageBubble.js} +13 -27
- package/dist/components/MessageBubble/index.d.ts +2 -0
- package/dist/components/MessageBubble/index.js +1 -13
- package/dist/components/MoneyInput/MoneyInput.d.ts +19 -0
- package/dist/{chunk-FOFNTKCK.js → components/MoneyInput/MoneyInput.js} +8 -24
- package/dist/components/MoneyInput/index.d.ts +2 -0
- package/dist/components/MoneyInput/index.js +1 -11
- package/dist/components/Motion/Collapse.d.ts +29 -0
- package/dist/components/Motion/Collapse.js +103 -0
- package/dist/components/Motion/Fade.d.ts +16 -0
- package/dist/components/Motion/Fade.js +42 -0
- package/dist/components/Motion/Float.d.ts +8 -0
- package/dist/components/Motion/Float.js +14 -0
- package/dist/components/Motion/ListTransition.d.ts +46 -0
- package/dist/components/Motion/ListTransition.js +110 -0
- package/dist/components/Motion/Marquee.d.ts +13 -0
- package/dist/components/Motion/Marquee.js +13 -0
- package/dist/components/Motion/Reveal.d.ts +12 -0
- package/dist/components/Motion/Reveal.js +32 -0
- package/dist/components/Motion/Scale.d.ts +22 -0
- package/dist/components/Motion/Scale.js +45 -0
- package/dist/components/Motion/Slide.d.ts +22 -0
- package/dist/components/Motion/Slide.js +59 -0
- package/dist/components/Motion/index.d.ts +18 -0
- package/dist/components/Motion/index.js +12 -10
- package/dist/components/Motion/motion.types.d.ts +25 -0
- package/dist/components/Motion/motion.types.js +1 -0
- package/dist/components/Motion/useMotion.d.ts +41 -0
- package/dist/components/Motion/useMotion.js +102 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +12 -0
- package/dist/{chunk-FXVI4RCJ.js → components/NavigationMenu/NavigationMenu.js} +21 -28
- package/dist/components/NavigationMenu/index.d.ts +1 -0
- package/dist/components/NavigationMenu/index.js +1 -6
- package/dist/components/NavigationRail/NavigationRail.d.ts +19 -0
- package/dist/{chunk-5MGCYR4G.js → components/NavigationRail/NavigationRail.js} +7 -14
- package/dist/components/NavigationRail/index.d.ts +2 -0
- package/dist/components/NavigationRail/index.js +1 -6
- package/dist/components/NexubProvider/NexubProvider.d.ts +34 -0
- package/dist/{chunk-VMSWIC3O.js → components/NexubProvider/NexubProvider.js} +7 -9
- package/dist/components/NexubProvider/index.d.ts +2 -0
- package/dist/components/NexubProvider/index.js +1 -8
- package/dist/components/NumberInput/NumberInput.d.ts +15 -0
- package/dist/{chunk-V3EWVSVI.js → components/NumberInput/NumberInput.js} +9 -20
- package/dist/components/NumberInput/index.d.ts +2 -0
- package/dist/components/NumberInput/index.js +1 -8
- package/dist/components/NumberTicker/NumberTicker.d.ts +25 -0
- package/dist/{chunk-2G3XUIQZ.js → components/NumberTicker/NumberTicker.js} +30 -19
- package/dist/components/NumberTicker/index.d.ts +2 -0
- package/dist/components/NumberTicker/index.js +1 -7
- package/dist/components/PageHeader/PageHeader.d.ts +10 -0
- package/dist/{chunk-SEW66BU7.js → components/PageHeader/PageHeader.js} +3 -9
- package/dist/components/PageHeader/index.d.ts +2 -0
- package/dist/components/PageHeader/index.js +1 -5
- package/dist/components/Pagination/Pagination.d.ts +9 -0
- package/dist/{chunk-NLVP74RX.js → components/Pagination/Pagination.js} +7 -17
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +1 -7
- package/dist/components/PasswordInput/PasswordInput.d.ts +9 -0
- package/dist/{chunk-OGHOT6XN.js → components/PasswordInput/PasswordInput.js} +7 -18
- package/dist/components/PasswordInput/index.d.ts +2 -0
- package/dist/components/PasswordInput/index.js +1 -10
- package/dist/components/Popover/Popover.d.ts +13 -0
- package/dist/{chunk-MPJG4WFP.js → components/Popover/Popover.js} +20 -29
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Popover/index.js +1 -7
- package/dist/components/Progress/Progress.d.ts +17 -0
- package/dist/{chunk-HXNUIIXB.js → components/Progress/Progress.js} +9 -16
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/index.js +1 -8
- package/dist/components/PromptInput/PromptInput.d.ts +33 -0
- package/dist/{chunk-ZUMC7SX5.js → components/PromptInput/PromptInput.js} +12 -30
- package/dist/components/PromptInput/index.d.ts +2 -0
- package/dist/components/PromptInput/index.js +1 -12
- package/dist/components/RadioCard/RadioCard.d.ts +11 -0
- package/dist/{chunk-YNLXG574.js → components/RadioCard/RadioCard.js} +11 -16
- package/dist/components/RadioCard/index.d.ts +2 -0
- package/dist/components/RadioCard/index.js +1 -7
- package/dist/components/RadioCard/selectableCard.d.ts +29 -0
- package/dist/{chunk-6SPCGCDG.js → components/RadioCard/selectableCard.js} +6 -11
- package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
- package/dist/{chunk-QQR4PPF3.js → components/RadioGroup/RadioGroup.js} +8 -13
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/RadioGroup/index.js +1 -5
- package/dist/components/Rating/Rating.d.ts +12 -0
- package/dist/{chunk-VCCQ64G7.js → components/Rating/Rating.js} +9 -18
- package/dist/components/Rating/index.d.ts +2 -0
- package/dist/components/Rating/index.js +1 -9
- package/dist/components/ScrollArea/ScrollArea.d.ts +6 -0
- package/dist/{chunk-2DZWTBDL.js → components/ScrollArea/ScrollArea.js} +4 -9
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/index.js +1 -5
- package/dist/components/SearchInput/SearchInput.d.ts +6 -0
- package/dist/{chunk-YVS6AVPD.js → components/SearchInput/SearchInput.js} +7 -18
- package/dist/components/SearchInput/index.d.ts +2 -0
- package/dist/components/SearchInput/index.js +1 -10
- package/dist/components/Section/Section.d.ts +10 -0
- package/dist/{chunk-EIV37DAQ.js → components/Section/Section.js} +6 -12
- package/dist/components/Section/index.d.ts +2 -0
- package/dist/components/Section/index.js +1 -6
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +12 -0
- package/dist/{chunk-KRIRCSUB.js → components/SegmentedControl/SegmentedControl.js} +12 -21
- package/dist/components/SegmentedControl/index.d.ts +2 -0
- package/dist/components/SegmentedControl/index.js +1 -8
- package/dist/components/Select/Select.d.ts +16 -0
- package/dist/{chunk-M5PDVHFN.js → components/Select/Select.js} +35 -48
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Select/index.js +1 -7
- package/dist/components/Separator/Separator.d.ts +12 -0
- package/dist/{chunk-YVCUKIAC.js → components/Separator/Separator.js} +6 -12
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Separator/index.js +1 -6
- package/dist/components/Sidebar/Sidebar.d.ts +25 -0
- package/dist/{chunk-NAESV7K3.js → components/Sidebar/Sidebar.js} +11 -18
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Sidebar/index.js +1 -6
- package/dist/components/Skeleton/Skeleton.d.ts +14 -0
- package/dist/{chunk-3C4WVTAN.js → components/Skeleton/Skeleton.js} +7 -13
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.js +1 -6
- package/dist/components/Slider/Slider.d.ts +7 -0
- package/dist/{chunk-5QWRBJSZ.js → components/Slider/Slider.js} +4 -9
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.js +1 -5
- package/dist/components/Spinner/Spinner.d.ts +12 -0
- package/dist/{chunk-P3SAE4T2.js → components/Spinner/Spinner.js} +8 -15
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.js +1 -7
- package/dist/components/SplitButton/SplitButton.d.ts +15 -0
- package/dist/{chunk-ILIM4BLN.js → components/SplitButton/SplitButton.js} +7 -18
- package/dist/components/SplitButton/index.d.ts +2 -0
- package/dist/components/SplitButton/index.js +1 -11
- package/dist/components/Stack/Stack.d.ts +11 -0
- package/dist/{chunk-ST4O3EQ3.js → components/Stack/Stack.js} +4 -12
- package/dist/components/Stack/index.d.ts +2 -0
- package/dist/components/Stack/index.js +1 -6
- package/dist/components/StreamingText/StreamingText.d.ts +19 -0
- package/dist/{chunk-4ESZQDPB.js → components/StreamingText/StreamingText.js} +5 -10
- package/dist/components/StreamingText/index.d.ts +2 -0
- package/dist/components/StreamingText/index.js +1 -5
- package/dist/components/Switch/Switch.d.ts +12 -0
- package/dist/{chunk-EWW6PWTK.js → components/Switch/Switch.js} +9 -12
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.js +1 -5
- package/dist/components/Table/Table.d.ts +18 -0
- package/dist/{chunk-KA6RZ7VN.js → components/Table/Table.js} +13 -18
- package/dist/components/Table/index.d.ts +2 -0
- package/dist/components/Table/index.js +1 -6
- package/dist/components/Tabs/Tabs.d.ts +8 -0
- package/dist/{chunk-BIWSXGTZ.js → components/Tabs/Tabs.js} +14 -23
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Tabs/index.js +1 -8
- package/dist/components/Text/Text.d.ts +13 -0
- package/dist/{chunk-UYINKNCI.js → components/Text/Text.js} +7 -13
- package/dist/components/Text/index.d.ts +2 -0
- package/dist/components/Text/index.js +1 -6
- package/dist/components/TextGradient/TextGradient.d.ts +4 -0
- package/dist/{chunk-IDPRAXCG.js → components/TextGradient/TextGradient.js} +3 -9
- package/dist/components/TextGradient/index.d.ts +2 -0
- package/dist/components/TextGradient/index.js +1 -5
- package/dist/components/Textarea/Textarea.d.ts +13 -0
- package/dist/{chunk-HL64PWVQ.js → components/Textarea/Textarea.js} +8 -17
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/Textarea/index.js +1 -7
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +69 -0
- package/dist/{chunk-ZBRRQHZG.js → components/ThemeProvider/ThemeProvider.js} +11 -15
- package/dist/components/ThemeProvider/index.d.ts +2 -0
- package/dist/components/ThemeProvider/index.js +1 -7
- package/dist/components/ThinkingIndicator/ThinkingIndicator.d.ts +18 -0
- package/dist/{chunk-VX56VQMF.js → components/ThinkingIndicator/ThinkingIndicator.js} +6 -13
- package/dist/components/ThinkingIndicator/index.d.ts +2 -0
- package/dist/components/ThinkingIndicator/index.js +1 -6
- package/dist/components/Toast/Toast.d.ts +17 -0
- package/dist/components/Toast/Toast.js +82 -0
- package/dist/components/Toast/Toaster.d.ts +21 -0
- package/dist/{chunk-MQGBAWSJ.js → components/Toast/Toaster.js} +27 -189
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/index.js +3 -10
- package/dist/components/Toast/useToast.d.ts +45 -0
- package/dist/components/Toast/useToast.js +74 -0
- package/dist/components/Toggle/Toggle.d.ts +10 -0
- package/dist/{chunk-NMSQDI4A.js → components/Toggle/Toggle.js} +7 -12
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Toggle/index.js +1 -7
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +16 -0
- package/dist/{chunk-UOBWHPXG.js → components/ToggleGroup/ToggleGroup.js} +10 -17
- package/dist/components/ToggleGroup/index.d.ts +1 -0
- package/dist/components/ToggleGroup/index.js +1 -6
- package/dist/components/Toolbar/Toolbar.d.ts +18 -0
- package/dist/{chunk-WGW7TZOV.js → components/Toolbar/Toolbar.js} +15 -22
- package/dist/components/Toolbar/index.d.ts +2 -0
- package/dist/components/Toolbar/index.js +1 -6
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/{chunk-6SWOLUMF.js → components/Tooltip/Tooltip.js} +16 -21
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -10
- package/dist/components/TopNav/TopNav.d.ts +20 -0
- package/dist/{chunk-BNG3Y5I7.js → components/TopNav/TopNav.js} +11 -20
- package/dist/components/TopNav/index.d.ts +2 -0
- package/dist/components/TopNav/index.js +1 -7
- package/dist/components/VisuallyHidden/VisuallyHidden.d.ts +2 -0
- package/dist/components/VisuallyHidden/VisuallyHidden.js +5 -0
- package/dist/components/VisuallyHidden/index.d.ts +2 -0
- package/dist/components/VisuallyHidden/index.js +2 -5
- package/dist/hooks/useClassScrollLock.d.ts +6 -0
- package/dist/{chunk-47UGX37F.js → hooks/useClassScrollLock.js} +2 -5
- package/dist/hooks/useControllableState.d.ts +7 -0
- package/dist/{chunk-JLUCMNVS.js → hooks/useControllableState.js} +2 -7
- package/dist/hooks/useDisclosure.d.ts +6 -0
- package/dist/hooks/useDisclosure.js +12 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +2 -0
- package/dist/hooks/useIsomorphicLayoutEffect.js +5 -0
- package/dist/hooks/useMediaQuery.d.ts +1 -0
- package/dist/hooks/useMediaQuery.js +17 -0
- package/dist/hooks/useMergedRefs.d.ts +2 -0
- package/dist/{chunk-MNEXMMLM.js → hooks/useMergedRefs.js} +1 -4
- package/dist/hooks/usePointerSheen.d.ts +8 -0
- package/dist/hooks/usePointerSheen.js +25 -0
- package/dist/hooks/useSlidingIndicator.d.ts +8 -0
- package/dist/{chunk-6UKNUI46.js → hooks/useSlidingIndicator.js} +2 -7
- package/dist/index.d.ts +198 -1849
- package/dist/index.js +123 -413
- package/dist/styles.css +1 -1
- package/dist/utils/cn.d.ts +2 -0
- package/dist/{chunk-WRVFNYO3.js → utils/cn.js} +8 -11
- package/dist/utils/control.d.ts +20 -0
- package/dist/utils/control.js +41 -0
- package/dist/utils/deprecated.d.ts +6 -0
- package/dist/utils/deprecated.js +16 -0
- package/dist/utils/glass.d.ts +9 -0
- package/dist/utils/glass.js +4 -0
- package/dist/utils/layout.d.ts +14 -0
- package/dist/{chunk-VLQGQFW7.js → utils/layout.js} +5 -9
- package/dist/utils/money.d.ts +1 -0
- package/dist/{chunk-R3SUPKKI.js → utils/money.js} +3 -6
- package/dist/utils/surface.d.ts +11 -0
- package/dist/{chunk-5FWJXSXT.js → utils/surface.js} +9 -13
- package/dist/utils/viewTransition.d.ts +5 -0
- package/dist/utils/viewTransition.js +8 -0
- package/dist/{chunk-PZL6AJH5.js → vendor/vaul.js} +2 -140
- package/package.json +15 -7
- package/dist/chunk-4B4XWDAH.js +0 -1
- package/dist/chunk-4GVGS5N4.js +0 -468
- package/dist/chunk-52ZVJPF7.js +0 -1
- package/dist/chunk-A3O23F2B.js +0 -1
- package/dist/chunk-ADO2DB6Q.js +0 -1
- package/dist/chunk-BV3U3ATL.js +0 -1
- package/dist/chunk-CAOLGXA5.js +0 -1
- package/dist/chunk-DEIBF3P7.js +0 -8
- package/dist/chunk-EV43I5J6.js +0 -1
- package/dist/chunk-HI7GBSW2.js +0 -1
- package/dist/chunk-HY3JWSG4.js +0 -1
- package/dist/chunk-IZ6ZPEZ2.js +0 -1
- package/dist/chunk-KLTQJZOX.js +0 -1
- package/dist/chunk-LVPU7455.js +0 -1
- package/dist/chunk-NHUQLIHL.js +0 -9
- package/dist/chunk-NZ7UK3G6.js +0 -1
- package/dist/chunk-P26VJEIW.js +0 -1
- package/dist/chunk-PICMOOAZ.js +0 -1
- package/dist/chunk-VALIDQXU.js +0 -31
- package/dist/chunk-WLRRMT6W.js +0 -1
- package/dist/chunk-XYXMPHND.js +0 -1
- package/dist/chunk-YJU4ZRQZ.js +0 -1
- package/dist/chunk-ZT3NWE5U.js +0 -1
- package/dist/chunk-ZXLACKEB.js +0 -8
|
@@ -1,42 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-DEIBF3P7.js";
|
|
5
|
-
import {
|
|
6
|
-
cn
|
|
7
|
-
} from "./chunk-WRVFNYO3.js";
|
|
8
|
-
|
|
9
|
-
// src/components/Card/Card.tsx
|
|
10
|
-
import * as React2 from "react";
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
11
4
|
import { Slot } from "@radix-ui/react-slot";
|
|
12
5
|
import { cva } from "class-variance-authority";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import
|
|
16
|
-
|
|
17
|
-
const frame = React.useRef(0);
|
|
18
|
-
React.useEffect(() => () => cancelAnimationFrame(frame.current), []);
|
|
19
|
-
const handler = React.useCallback(
|
|
20
|
-
(event) => {
|
|
21
|
-
onPointerMove?.(event);
|
|
22
|
-
if (event.pointerType === "touch") return;
|
|
23
|
-
const el = event.currentTarget;
|
|
24
|
-
const { clientX, clientY } = event;
|
|
25
|
-
cancelAnimationFrame(frame.current);
|
|
26
|
-
frame.current = requestAnimationFrame(() => {
|
|
27
|
-
const r = el.getBoundingClientRect();
|
|
28
|
-
el.style.setProperty("--nx-mx", `${clientX - r.left}px`);
|
|
29
|
-
el.style.setProperty("--nx-my", `${clientY - r.top}px`);
|
|
30
|
-
});
|
|
31
|
-
},
|
|
32
|
-
[onPointerMove]
|
|
33
|
-
);
|
|
34
|
-
return enabled ? handler : onPointerMove;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// src/components/Card/Card.tsx
|
|
38
|
-
import { jsx } from "react/jsx-runtime";
|
|
39
|
-
var cardVariants = cva(
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
import { glassSurfaceClass } from "../../utils/glass.js";
|
|
8
|
+
import { usePointerSheen } from "../../hooks/usePointerSheen.js";
|
|
9
|
+
const cardVariants = cva(
|
|
40
10
|
// In-flow content: tone + a soft alpha hairline, no shadow (shadows are for floating layers).
|
|
41
11
|
// A CardLink inside stretches over the card; the card then carries its focus ring.
|
|
42
12
|
"rounded-[var(--card-radius,var(--shape-container))] bg-[var(--card-bg,var(--color-surface-elevated))] border border-[color:var(--card-border,color-mix(in_srgb,var(--color-outline-variant)_60%,transparent))] text-[var(--card-fg,var(--color-on-surface))] has-[[data-card-link]]:relative has-[[data-card-link]:focus-visible]:outline has-[[data-card-link]:focus-visible]:outline-[3px] has-[[data-card-link]:focus-visible]:outline-offset-2 has-[[data-card-link]:focus-visible]:outline-[var(--color-primary)]",
|
|
@@ -47,7 +17,10 @@ var cardVariants = cva(
|
|
|
47
17
|
surface: "bg-[var(--card-bg,var(--color-surface-elevated))] shadow-elevation-1",
|
|
48
18
|
// Lift on hover (spring, elevation 1 → 2), sink on press, state layer
|
|
49
19
|
// tint; see .nx-lift in themes/base.css.
|
|
50
|
-
interactive: "nx-state-layer nx-lift cursor-pointer bg-[var(--card-bg,var(--color-surface-elevated))] shadow-elevation-1"
|
|
20
|
+
interactive: "nx-state-layer nx-lift cursor-pointer bg-[var(--card-bg,var(--color-surface-elevated))] shadow-elevation-1",
|
|
21
|
+
// Marketing mode (@nexub/themes/marketing): 24px corners, soft shadow,
|
|
22
|
+
// lift on hover, product accent via `accent`. Elsewhere a flat card.
|
|
23
|
+
showcase: "nx-mkt-showcase"
|
|
51
24
|
},
|
|
52
25
|
// Material. 'glass' needs data-material="glass" on the element (set in the
|
|
53
26
|
// component) for the --glass-* vars to resolve. Single box-shadow carries
|
|
@@ -64,7 +37,7 @@ var cardVariants = cva(
|
|
|
64
37
|
}
|
|
65
38
|
}
|
|
66
39
|
);
|
|
67
|
-
|
|
40
|
+
const toneBorderMap = {
|
|
68
41
|
neutral: "",
|
|
69
42
|
info: "border-s-4 border-s-[var(--color-info)]",
|
|
70
43
|
success: "border-s-4 border-s-[var(--color-success)]",
|
|
@@ -75,8 +48,8 @@ var toneBorderMap = {
|
|
|
75
48
|
payub: "border-s-4 border-s-[var(--color-payub)]",
|
|
76
49
|
founderub: "border-s-4 border-s-[var(--color-founderub)]"
|
|
77
50
|
};
|
|
78
|
-
|
|
79
|
-
({ className, variant = "flat", surface = "solid", effect = "none", tone, asChild = false, onPointerMove, children, ...props }, ref) => {
|
|
51
|
+
const Card = React.forwardRef(
|
|
52
|
+
({ className, variant = "flat", surface = "solid", effect = "none", tone, accent, asChild = false, onPointerMove, children, ...props }, ref) => {
|
|
80
53
|
const Comp = asChild ? Slot : "div";
|
|
81
54
|
const toneStyle = tone ? toneBorderMap[tone] : "";
|
|
82
55
|
const sheen = effect === "sheen";
|
|
@@ -88,6 +61,7 @@ var Card = React2.forwardRef(
|
|
|
88
61
|
className: cn(cardVariants({ variant, surface }), toneStyle, sheen && "nx-sheen", className),
|
|
89
62
|
onPointerMove: handlePointerMove,
|
|
90
63
|
"data-tone": tone,
|
|
64
|
+
"data-product": accent,
|
|
91
65
|
"data-material": surface === "glass" ? "glass" : void 0,
|
|
92
66
|
...props,
|
|
93
67
|
children
|
|
@@ -96,7 +70,7 @@ var Card = React2.forwardRef(
|
|
|
96
70
|
}
|
|
97
71
|
);
|
|
98
72
|
Card.displayName = "Card";
|
|
99
|
-
|
|
73
|
+
const CardLink = React.forwardRef(
|
|
100
74
|
({ className, asChild = false, ...props }, ref) => {
|
|
101
75
|
const Comp = asChild ? Slot : "a";
|
|
102
76
|
return /* @__PURE__ */ jsx(
|
|
@@ -114,10 +88,8 @@ var CardLink = React2.forwardRef(
|
|
|
114
88
|
}
|
|
115
89
|
);
|
|
116
90
|
CardLink.displayName = "CardLink";
|
|
117
|
-
|
|
118
91
|
export {
|
|
119
|
-
usePointerSheen,
|
|
120
|
-
cardVariants,
|
|
121
92
|
Card,
|
|
122
|
-
CardLink
|
|
93
|
+
CardLink,
|
|
94
|
+
cardVariants
|
|
123
95
|
};
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
Card,
|
|
4
|
-
CardLink,
|
|
5
|
-
cardVariants
|
|
6
|
-
} from "../../chunk-T466ZB34.js";
|
|
7
|
-
import "../../chunk-DEIBF3P7.js";
|
|
8
|
-
import "../../chunk-WRVFNYO3.js";
|
|
1
|
+
import { Card, CardLink, cardVariants } from "./Card.js";
|
|
9
2
|
export {
|
|
10
3
|
Card,
|
|
11
4
|
CardLink,
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/** A colour from the categorical chart palette, 1–8. */
|
|
3
|
+
export type ChartColor = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
4
|
+
export interface ChartSeries {
|
|
5
|
+
/** Key of the value in each data row. */
|
|
6
|
+
key: string;
|
|
7
|
+
/** Name shown in the legend and the data table. Defaults to `key`. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Palette colour, 1–8. Defaults to the series' position. */
|
|
10
|
+
color?: ChartColor;
|
|
11
|
+
}
|
|
12
|
+
/** Rounds up to 1, 2, 2.5 or 5 × 10ⁿ so the four gridlines get round labels. */
|
|
13
|
+
export declare function niceMax(max: number): number;
|
|
14
|
+
declare const PLOT_HEIGHT: {
|
|
15
|
+
readonly sm: "h-32";
|
|
16
|
+
readonly md: "h-48";
|
|
17
|
+
readonly lg: "h-64";
|
|
18
|
+
};
|
|
19
|
+
export interface ChartLegendProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
20
|
+
items: {
|
|
21
|
+
label: string;
|
|
22
|
+
color?: ChartColor;
|
|
23
|
+
}[];
|
|
24
|
+
}
|
|
25
|
+
/** A row of colour dots and labels. Charts render one for you when `legend` is on. */
|
|
26
|
+
export declare function ChartLegend({ items, className, ...props }: ChartLegendProps): React.JSX.Element;
|
|
27
|
+
interface CartesianProps<T> extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
28
|
+
/** One row per category, in order. */
|
|
29
|
+
data: T[];
|
|
30
|
+
/** Key of the category label in each row (the x axis). */
|
|
31
|
+
index: keyof T & string;
|
|
32
|
+
/** The values to plot, one entry per series. */
|
|
33
|
+
series: ChartSeries[];
|
|
34
|
+
/** Accessible name of the chart, e.g. "Revenue by month". */
|
|
35
|
+
title: string;
|
|
36
|
+
/** Formats axis labels, the hover text and the data table. */
|
|
37
|
+
valueFormat?: (value: number) => string;
|
|
38
|
+
/** Height of the plot area. */
|
|
39
|
+
size?: keyof typeof PLOT_HEIGHT;
|
|
40
|
+
/** Show the legend above the chart. Defaults to on for more than one series. */
|
|
41
|
+
legend?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface BarChartProps<T> extends CartesianProps<T> {
|
|
44
|
+
/** Stack the series in one bar per category instead of side by side. */
|
|
45
|
+
stacked?: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Bars per category, grouped or stacked. Values must be 0 or more. */
|
|
48
|
+
export declare function BarChart<T extends object>({ stacked, ...props }: BarChartProps<T>): React.JSX.Element;
|
|
49
|
+
export interface LineChartProps<T> extends CartesianProps<T> {
|
|
50
|
+
/** Fill the area under each line. */
|
|
51
|
+
area?: boolean;
|
|
52
|
+
}
|
|
53
|
+
/** One line per series across the categories. Values must be 0 or more. */
|
|
54
|
+
export declare function LineChart<T extends object>({ area, ...props }: LineChartProps<T>): React.JSX.Element;
|
|
55
|
+
export interface DonutChartProps extends Omit<React.HTMLAttributes<HTMLElement>, 'title'> {
|
|
56
|
+
data: {
|
|
57
|
+
label: string;
|
|
58
|
+
value: number;
|
|
59
|
+
color?: ChartColor;
|
|
60
|
+
}[];
|
|
61
|
+
/** Accessible name of the chart. */
|
|
62
|
+
title: string;
|
|
63
|
+
/** Content in the hole, such as the total. */
|
|
64
|
+
center?: React.ReactNode;
|
|
65
|
+
valueFormat?: (value: number) => string;
|
|
66
|
+
/** Show the legend beside the donut. Default on. */
|
|
67
|
+
legend?: boolean;
|
|
68
|
+
}
|
|
69
|
+
/** Parts of a whole. Keep it to six slices or fewer; group the rest as "Other". */
|
|
70
|
+
export declare function DonutChart({ data, title, center, valueFormat, legend, className, ...props }: DonutChartProps): React.JSX.Element;
|
|
71
|
+
export interface SparklineProps extends Omit<React.SVGAttributes<SVGSVGElement>, 'values' | 'color'> {
|
|
72
|
+
values: number[];
|
|
73
|
+
/** Accessible summary, e.g. "Revenue, last 12 weeks, up 8%". Without it the sparkline is decorative. */
|
|
74
|
+
label?: string;
|
|
75
|
+
color?: ChartColor;
|
|
76
|
+
/** Fill the area under the line. */
|
|
77
|
+
area?: boolean;
|
|
78
|
+
}
|
|
79
|
+
/** A tiny trend line with no axes, for stat cards and table cells. Fills its box (default 6rem × 2rem). */
|
|
80
|
+
export declare function Sparkline({ values, label, color, area, className, ...props }: SparklineProps): React.JSX.Element;
|
|
81
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
const FILL = ["fill-chart-1", "fill-chart-2", "fill-chart-3", "fill-chart-4", "fill-chart-5", "fill-chart-6", "fill-chart-7", "fill-chart-8"];
|
|
5
|
+
const STROKE = ["stroke-chart-1", "stroke-chart-2", "stroke-chart-3", "stroke-chart-4", "stroke-chart-5", "stroke-chart-6", "stroke-chart-7", "stroke-chart-8"];
|
|
6
|
+
const BG = ["bg-chart-1", "bg-chart-2", "bg-chart-3", "bg-chart-4", "bg-chart-5", "bg-chart-6", "bg-chart-7", "bg-chart-8"];
|
|
7
|
+
const colorIndex = (color, i) => ((color ?? i % 8 + 1) - 1) % 8;
|
|
8
|
+
function niceMax(max) {
|
|
9
|
+
if (!(max > 0)) return 1;
|
|
10
|
+
const pow = 10 ** Math.floor(Math.log10(max));
|
|
11
|
+
const step = [1, 2, 2.5, 5, 10].find((s) => s * pow >= max);
|
|
12
|
+
return step * pow;
|
|
13
|
+
}
|
|
14
|
+
const defaultFormat = (n) => n.toLocaleString();
|
|
15
|
+
const PLOT_HEIGHT = { sm: "h-32", md: "h-48", lg: "h-64" };
|
|
16
|
+
const VB_W = 300;
|
|
17
|
+
const VB_H = 100;
|
|
18
|
+
function ChartLegend({ items, className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx("ul", { className: cn("flex flex-wrap gap-x-4 gap-y-1 text-label-md text-[var(--color-on-surface-variant)]", className), ...props, children: items.map((item, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-1.5", children: [
|
|
20
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", className: cn("size-2.5 shrink-0 rounded-full", BG[colorIndex(item.color, i)]) }),
|
|
21
|
+
item.label
|
|
22
|
+
] }, item.label)) });
|
|
23
|
+
}
|
|
24
|
+
function Frame({
|
|
25
|
+
data,
|
|
26
|
+
index,
|
|
27
|
+
series,
|
|
28
|
+
title,
|
|
29
|
+
valueFormat = defaultFormat,
|
|
30
|
+
size = "md",
|
|
31
|
+
legend,
|
|
32
|
+
max,
|
|
33
|
+
className,
|
|
34
|
+
children,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
const labels = series.map((s) => s.label ?? s.key);
|
|
38
|
+
const ticks = [1, 0.75, 0.5, 0.25, 0];
|
|
39
|
+
return /* @__PURE__ */ jsxs("figure", { "aria-label": title, className: cn("m-0 flex flex-col gap-3", className), ...props, children: [
|
|
40
|
+
(legend ?? series.length > 1) && /* @__PURE__ */ jsx(ChartLegend, { "aria-hidden": "true", items: series.map((s, i) => ({ label: labels[i], color: s.color })) }),
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { "aria-hidden": "true", className: "flex gap-2", children: [
|
|
42
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex flex-col justify-between text-end text-label-sm tabular-nums text-[var(--color-on-surface-muted)]", PLOT_HEIGHT[size]), children: ticks.map((t) => /* @__PURE__ */ jsx("span", { className: "flex h-0 items-center justify-end", children: valueFormat(max * t) }, t)) }),
|
|
43
|
+
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-1", children: [
|
|
44
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: `0 0 ${VB_W} ${VB_H}`, preserveAspectRatio: "none", className: cn("w-full overflow-visible rtl:-scale-x-100", PLOT_HEIGHT[size]), children: [
|
|
45
|
+
ticks.map((t) => /* @__PURE__ */ jsx(
|
|
46
|
+
"line",
|
|
47
|
+
{
|
|
48
|
+
x1: "0",
|
|
49
|
+
x2: VB_W,
|
|
50
|
+
y1: VB_H * (1 - t),
|
|
51
|
+
y2: VB_H * (1 - t),
|
|
52
|
+
strokeWidth: "1",
|
|
53
|
+
vectorEffect: "non-scaling-stroke",
|
|
54
|
+
className: t === 0 ? "stroke-[var(--color-outline)]" : "stroke-[var(--color-outline-variant)]"
|
|
55
|
+
},
|
|
56
|
+
t
|
|
57
|
+
)),
|
|
58
|
+
children
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx("div", { className: "grid auto-cols-fr grid-flow-col text-center text-label-sm text-[var(--color-on-surface-muted)]", children: data.map((row, i) => /* @__PURE__ */ jsx("span", { className: "truncate px-0.5", children: String(row[index]) }, i)) })
|
|
61
|
+
] })
|
|
62
|
+
] }),
|
|
63
|
+
/* @__PURE__ */ jsxs("table", { className: "sr-only", children: [
|
|
64
|
+
/* @__PURE__ */ jsx("caption", { children: title }),
|
|
65
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
66
|
+
/* @__PURE__ */ jsx("th", { scope: "col", children: index }),
|
|
67
|
+
labels.map((l) => /* @__PURE__ */ jsx("th", { scope: "col", children: l }, l))
|
|
68
|
+
] }) }),
|
|
69
|
+
/* @__PURE__ */ jsx("tbody", { children: data.map((row, i) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
70
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: String(row[index]) }),
|
|
71
|
+
series.map((s) => /* @__PURE__ */ jsx("td", { children: valueFormat(Number(row[s.key]) || 0) }, s.key))
|
|
72
|
+
] }, i)) })
|
|
73
|
+
] })
|
|
74
|
+
] });
|
|
75
|
+
}
|
|
76
|
+
const valueOf = (row, key) => Math.max(0, Number(row[key]) || 0);
|
|
77
|
+
function BarChart({ stacked = false, ...props }) {
|
|
78
|
+
const { data, series, index, valueFormat = defaultFormat } = props;
|
|
79
|
+
const max = niceMax(Math.max(0, ...data.map((row) => stacked ? series.reduce((sum, s) => sum + valueOf(row, s.key), 0) : Math.max(0, ...series.map((s) => valueOf(row, s.key))))));
|
|
80
|
+
const slot = VB_W / Math.max(1, data.length);
|
|
81
|
+
const groupW = slot * 0.7;
|
|
82
|
+
const barW = stacked ? groupW : groupW / series.length;
|
|
83
|
+
return /* @__PURE__ */ jsx(Frame, { ...props, max, children: data.map((row, i) => {
|
|
84
|
+
let base = 0;
|
|
85
|
+
return /* @__PURE__ */ jsx("g", { children: series.map((s, j) => {
|
|
86
|
+
const v = valueOf(row, s.key);
|
|
87
|
+
const h = v / max * VB_H;
|
|
88
|
+
const x = i * slot + (slot - groupW) / 2 + (stacked ? 0 : j * barW);
|
|
89
|
+
const y = VB_H - base - h;
|
|
90
|
+
if (stacked) base += h;
|
|
91
|
+
return /* @__PURE__ */ jsx("rect", { x, y, width: Math.max(0, barW - (stacked ? 0 : 1)), height: h, className: FILL[colorIndex(s.color, j)], children: /* @__PURE__ */ jsx("title", { children: `${String(row[index])} \xB7 ${s.label ?? s.key}: ${valueFormat(v)}` }) }, s.key);
|
|
92
|
+
}) }, i);
|
|
93
|
+
}) });
|
|
94
|
+
}
|
|
95
|
+
function LineChart({ area = false, ...props }) {
|
|
96
|
+
const { data, series, index, valueFormat = defaultFormat } = props;
|
|
97
|
+
const max = niceMax(Math.max(0, ...data.flatMap((row) => series.map((s) => valueOf(row, s.key)))));
|
|
98
|
+
const slot = VB_W / Math.max(1, data.length);
|
|
99
|
+
const x = (i) => i * slot + slot / 2;
|
|
100
|
+
const y = (v) => VB_H - v / max * VB_H;
|
|
101
|
+
return /* @__PURE__ */ jsx(Frame, { ...props, max, children: series.map((s, j) => {
|
|
102
|
+
const c = colorIndex(s.color, j);
|
|
103
|
+
const pts = data.map((row, i) => `${x(i)},${y(valueOf(row, s.key))}`);
|
|
104
|
+
return /* @__PURE__ */ jsxs("g", { children: [
|
|
105
|
+
area && data.length > 0 && /* @__PURE__ */ jsx("polygon", { points: `${x(0)},${VB_H} ${pts.join(" ")} ${x(data.length - 1)},${VB_H}`, className: cn(FILL[c], "opacity-15") }),
|
|
106
|
+
/* @__PURE__ */ jsx("polyline", { points: pts.join(" "), fill: "none", strokeWidth: "2", strokeLinejoin: "round", strokeLinecap: "round", vectorEffect: "non-scaling-stroke", className: STROKE[c] }),
|
|
107
|
+
data.map((row, i) => (
|
|
108
|
+
// A wide, invisible hit area per point carries the hover text.
|
|
109
|
+
/* @__PURE__ */ jsx("rect", { x: x(i) - slot / 2, y: "0", width: slot, height: VB_H, className: "fill-transparent", children: /* @__PURE__ */ jsx("title", { children: `${String(row[index])} \xB7 ${s.label ?? s.key}: ${valueFormat(valueOf(row, s.key))}` }) }, i)
|
|
110
|
+
))
|
|
111
|
+
] }, s.key);
|
|
112
|
+
}) });
|
|
113
|
+
}
|
|
114
|
+
function DonutChart({ data, title, center, valueFormat = defaultFormat, legend = true, className, ...props }) {
|
|
115
|
+
const total = data.reduce((sum, d) => sum + Math.max(0, d.value), 0) || 1;
|
|
116
|
+
const r = 15.9155;
|
|
117
|
+
let offset = 25;
|
|
118
|
+
return /* @__PURE__ */ jsxs("figure", { "aria-label": title, className: cn("m-0 flex flex-wrap items-center gap-6", className), ...props, children: [
|
|
119
|
+
/* @__PURE__ */ jsxs("div", { "aria-hidden": "true", className: "relative size-40 shrink-0", children: [
|
|
120
|
+
/* @__PURE__ */ jsxs("svg", { viewBox: "0 0 42 42", className: "size-full rtl:-scale-x-100", children: [
|
|
121
|
+
/* @__PURE__ */ jsx("circle", { cx: "21", cy: "21", r, fill: "none", strokeWidth: "6", className: "stroke-[var(--color-surface-container-high)]" }),
|
|
122
|
+
data.map((d, i) => {
|
|
123
|
+
const pct = Math.max(0, d.value) / total * 100;
|
|
124
|
+
const dash = `${pct} ${100 - pct}`;
|
|
125
|
+
const el = /* @__PURE__ */ jsx("circle", { cx: "21", cy: "21", r, fill: "none", strokeWidth: "6", strokeDasharray: dash, strokeDashoffset: offset, className: STROKE[colorIndex(d.color, i)], children: /* @__PURE__ */ jsx("title", { children: `${d.label}: ${valueFormat(d.value)} (${Math.round(pct)}%)` }) }, d.label);
|
|
126
|
+
offset -= pct;
|
|
127
|
+
return el;
|
|
128
|
+
})
|
|
129
|
+
] }),
|
|
130
|
+
center != null && /* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center text-center text-title-md text-[var(--color-on-surface)]", children: center })
|
|
131
|
+
] }),
|
|
132
|
+
legend && /* @__PURE__ */ jsx(ChartLegend, { "aria-hidden": "true", className: "flex-col", items: data.map((d) => ({ label: d.label, color: d.color })) }),
|
|
133
|
+
/* @__PURE__ */ jsxs("table", { className: "sr-only", children: [
|
|
134
|
+
/* @__PURE__ */ jsx("caption", { children: title }),
|
|
135
|
+
/* @__PURE__ */ jsx("tbody", { children: data.map((d) => /* @__PURE__ */ jsxs("tr", { children: [
|
|
136
|
+
/* @__PURE__ */ jsx("th", { scope: "row", children: d.label }),
|
|
137
|
+
/* @__PURE__ */ jsx("td", { children: valueFormat(d.value) }),
|
|
138
|
+
/* @__PURE__ */ jsxs("td", { children: [
|
|
139
|
+
Math.round(Math.max(0, d.value) / total * 100),
|
|
140
|
+
"%"
|
|
141
|
+
] })
|
|
142
|
+
] }, d.label)) })
|
|
143
|
+
] })
|
|
144
|
+
] });
|
|
145
|
+
}
|
|
146
|
+
function Sparkline({ values, label, color = 1, area = false, className, ...props }) {
|
|
147
|
+
const min = Math.min(...values);
|
|
148
|
+
const span = Math.max(...values) - min || 1;
|
|
149
|
+
const step = values.length > 1 ? VB_W / (values.length - 1) : 0;
|
|
150
|
+
const pts = values.map((v, i) => `${i * step},${VB_H - 4 - (v - min) / span * (VB_H - 8)}`).join(" ");
|
|
151
|
+
const c = colorIndex(color, 0);
|
|
152
|
+
return /* @__PURE__ */ jsxs(
|
|
153
|
+
"svg",
|
|
154
|
+
{
|
|
155
|
+
viewBox: `0 0 ${VB_W} ${VB_H}`,
|
|
156
|
+
preserveAspectRatio: "none",
|
|
157
|
+
...label ? { role: "img", "aria-label": label } : { "aria-hidden": true },
|
|
158
|
+
className: cn("h-8 w-24 overflow-visible rtl:-scale-x-100", className),
|
|
159
|
+
...props,
|
|
160
|
+
children: [
|
|
161
|
+
area && values.length > 1 && /* @__PURE__ */ jsx("polygon", { points: `0,${VB_H} ${pts} ${VB_W},${VB_H}`, className: cn(FILL[c], "opacity-15") }),
|
|
162
|
+
/* @__PURE__ */ jsx("polyline", { points: pts, fill: "none", strokeWidth: "1.5", strokeLinejoin: "round", strokeLinecap: "round", vectorEffect: "non-scaling-stroke", className: STROKE[c] })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
export {
|
|
168
|
+
BarChart,
|
|
169
|
+
ChartLegend,
|
|
170
|
+
DonutChart,
|
|
171
|
+
LineChart,
|
|
172
|
+
Sparkline,
|
|
173
|
+
niceMax
|
|
174
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface CheckListProps extends React.HTMLAttributes<HTMLUListElement> {
|
|
3
|
+
items?: string[];
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare const CheckList: React.ForwardRefExoticComponent<CheckListProps & React.RefAttributes<HTMLUListElement>>;
|
|
7
|
+
export interface CheckListItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const CheckListItem: React.ForwardRefExoticComponent<CheckListItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-WRVFNYO3.js";
|
|
5
|
-
|
|
6
|
-
// src/components/CheckList/CheckList.tsx
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
2
|
import * as React from "react";
|
|
8
3
|
import { Check } from "@nexub/icons";
|
|
9
|
-
import {
|
|
10
|
-
|
|
4
|
+
import { cn } from "../../utils/cn.js";
|
|
5
|
+
const CheckList = React.forwardRef(
|
|
11
6
|
({ className, items, children, ...props }, ref) => {
|
|
12
7
|
return /* @__PURE__ */ jsxs(
|
|
13
8
|
"ul",
|
|
@@ -24,7 +19,7 @@ var CheckList = React.forwardRef(
|
|
|
24
19
|
}
|
|
25
20
|
);
|
|
26
21
|
CheckList.displayName = "CheckList";
|
|
27
|
-
|
|
22
|
+
const CheckListItem = React.forwardRef(
|
|
28
23
|
({ className, children, ...props }, ref) => {
|
|
29
24
|
return /* @__PURE__ */ jsxs(
|
|
30
25
|
"li",
|
|
@@ -47,7 +42,6 @@ var CheckListItem = React.forwardRef(
|
|
|
47
42
|
}
|
|
48
43
|
);
|
|
49
44
|
CheckListItem.displayName = "CheckListItem";
|
|
50
|
-
|
|
51
45
|
export {
|
|
52
46
|
CheckList,
|
|
53
47
|
CheckListItem
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
3
|
+
export interface CheckboxProps extends RadixCheckbox.CheckboxProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
cn
|
|
4
|
-
} from "./chunk-WRVFNYO3.js";
|
|
5
|
-
|
|
6
|
-
// src/components/Checkbox/Checkbox.tsx
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
3
|
import * as React from "react";
|
|
8
4
|
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
9
5
|
import { Minus } from "@nexub/icons";
|
|
10
|
-
import {
|
|
11
|
-
|
|
6
|
+
import { cn } from "../../utils/cn.js";
|
|
7
|
+
const Checkbox = React.forwardRef(
|
|
12
8
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
13
9
|
RadixCheckbox.Root,
|
|
14
10
|
{
|
|
@@ -32,7 +28,6 @@ var Checkbox = React.forwardRef(
|
|
|
32
28
|
)
|
|
33
29
|
);
|
|
34
30
|
Checkbox.displayName = "Checkbox";
|
|
35
|
-
|
|
36
31
|
export {
|
|
37
32
|
Checkbox
|
|
38
33
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadixCheckbox from '@radix-ui/react-checkbox';
|
|
3
|
+
import { type SelectableCardContentProps } from '../RadioCard/selectableCard.js';
|
|
4
|
+
export interface CheckboxCardProps extends Omit<RadixCheckbox.CheckboxProps, 'title' | 'children' | 'checked' | 'defaultChecked' | 'onCheckedChange'>, SelectableCardContentProps {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const CheckboxCard: React.ForwardRefExoticComponent<CheckboxCardProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
2
6
|
import {
|
|
3
7
|
SelectableCardContent,
|
|
4
8
|
selectableCardClass,
|
|
5
9
|
useCardIds
|
|
6
|
-
} from "
|
|
7
|
-
|
|
8
|
-
cn
|
|
9
|
-
} from "./chunk-WRVFNYO3.js";
|
|
10
|
-
|
|
11
|
-
// src/components/CheckboxCard/CheckboxCard.tsx
|
|
12
|
-
import * as React from "react";
|
|
13
|
-
import * as RadixCheckbox from "@radix-ui/react-checkbox";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
|
-
var CheckboxCard = React.forwardRef(
|
|
10
|
+
} from "../RadioCard/selectableCard.js";
|
|
11
|
+
const CheckboxCard = React.forwardRef(
|
|
16
12
|
({ className, icon, title, description, children, onCheckedChange, ...props }, ref) => {
|
|
17
13
|
const ids = useCardIds(description != null);
|
|
18
14
|
return /* @__PURE__ */ jsx(
|
|
@@ -41,7 +37,6 @@ var CheckboxCard = React.forwardRef(
|
|
|
41
37
|
}
|
|
42
38
|
);
|
|
43
39
|
CheckboxCard.displayName = "CheckboxCard";
|
|
44
|
-
|
|
45
40
|
export {
|
|
46
41
|
CheckboxCard
|
|
47
42
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import type { ToneValue } from '../Button/Button.js';
|
|
4
|
+
export declare const chipVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "md" | null | undefined;
|
|
6
|
+
tone?: "neutral" | "info" | "success" | "warning" | "danger" | "leap" | "bookub" | "payub" | "founderub" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export interface ChipProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof chipVariants> {
|
|
9
|
+
tone?: ToneValue;
|
|
10
|
+
onRemove?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
useNexubMessages
|
|
4
|
-
} from "./chunk-VMSWIC3O.js";
|
|
5
|
-
import {
|
|
6
|
-
cn
|
|
7
|
-
} from "./chunk-WRVFNYO3.js";
|
|
8
|
-
|
|
9
|
-
// src/components/Chip/Chip.tsx
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
3
|
import * as React from "react";
|
|
11
4
|
import { cva } from "class-variance-authority";
|
|
12
|
-
import {
|
|
13
|
-
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
import { useNexubMessages } from "../NexubProvider/NexubProvider.js";
|
|
7
|
+
const chipVariants = cva(
|
|
14
8
|
"inline-flex items-center gap-1 rounded-shape-control select-none",
|
|
15
9
|
{
|
|
16
10
|
variants: {
|
|
@@ -37,7 +31,7 @@ var chipVariants = cva(
|
|
|
37
31
|
}
|
|
38
32
|
}
|
|
39
33
|
);
|
|
40
|
-
|
|
34
|
+
const Chip = React.forwardRef(
|
|
41
35
|
({ className, size, tone = "neutral", onRemove, children, ...props }, ref) => {
|
|
42
36
|
const messages = useNexubMessages();
|
|
43
37
|
return /* @__PURE__ */ jsxs(
|
|
@@ -89,8 +83,7 @@ var Chip = React.forwardRef(
|
|
|
89
83
|
}
|
|
90
84
|
);
|
|
91
85
|
Chip.displayName = "Chip";
|
|
92
|
-
|
|
93
86
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
87
|
+
Chip,
|
|
88
|
+
chipVariants
|
|
96
89
|
};
|