@nexub/react 2.9.0 → 3.1.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/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-FRGFO4DS.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 +196 -1900
- package/dist/index.js +116 -438
- 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/{chunk-VLME3JFF.js → utils/deprecated.js} +1 -5
- 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-CQQ5UAO3.js +0 -91
- 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-PXISQY4H.js +0 -59
- package/dist/chunk-VALIDQXU.js +0 -31
- package/dist/chunk-WLRRMT6W.js +0 -1
- package/dist/chunk-XIKO5XFW.js +0 -89
- package/dist/chunk-XYXMPHND.js +0 -1
- package/dist/chunk-YJU4ZRQZ.js +0 -1
- package/dist/chunk-Z46ISXJ6.js +0 -57
- package/dist/chunk-ZT3NWE5U.js +0 -1
- package/dist/chunk-ZXLACKEB.js +0 -8
- package/dist/components/Banner/index.js +0 -12
- package/dist/components/Callout/index.js +0 -11
- package/dist/components/StatusPill/index.js +0 -11
- package/dist/components/Tag/index.js +0 -11
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ListTransitionProps extends React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
/** List element. @default 'div' */
|
|
4
|
+
as?: React.ElementType;
|
|
5
|
+
/** Element wrapping each item, e.g. `'li'` inside a `'ul'`. @default 'div' */
|
|
6
|
+
itemAs?: React.ElementType;
|
|
7
|
+
/** Animate the items present on first render too. @default false */
|
|
8
|
+
appear?: boolean;
|
|
9
|
+
/** Keyed children. Items without a key are rendered but never animated. */
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* ListTransition — animates keyed items in and out of a list.
|
|
14
|
+
* New items grow in from zero height and fade in; removed items stay in place
|
|
15
|
+
* while they collapse and fade out, then unmount. Uses CSS keyframes on the
|
|
16
|
+
* spring tokens (`nx-list-item` in `@nexub/themes/base`); reduced motion keeps
|
|
17
|
+
* only the fade.
|
|
18
|
+
*
|
|
19
|
+
* Space items with padding inside each item, not `gap`, so a collapsing item
|
|
20
|
+
* takes its spacing with it.
|
|
21
|
+
*
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <ListTransition as="ul" itemAs="li">
|
|
24
|
+
* {items.map((item) => <Row key={item.id} item={item} />)}
|
|
25
|
+
* </ListTransition>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const ListTransition: React.ForwardRefExoticComponent<ListTransitionProps & React.RefAttributes<HTMLElement>>;
|
|
29
|
+
export interface SkeletonSwapProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
/** While true the skeleton shows; flipping to false crossfades to the content. */
|
|
31
|
+
loading: boolean;
|
|
32
|
+
/** Placeholder shown while loading, usually `Skeleton`s shaped like the content. */
|
|
33
|
+
skeleton: React.ReactNode;
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* SkeletonSwap — crossfades from a skeleton to the loaded content in place,
|
|
38
|
+
* instead of popping. Sets `aria-busy` while loading.
|
|
39
|
+
*
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <SkeletonSwap loading={isLoading} skeleton={<Skeleton shape="rect" height={120} />}>
|
|
42
|
+
* <Card>…</Card>
|
|
43
|
+
* </SkeletonSwap>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare const SkeletonSwap: React.ForwardRefExoticComponent<SkeletonSwapProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { SPRING_MS } from "./useMotion.js";
|
|
5
|
+
const EXIT_FALLBACK_MS = SPRING_MS.effects.default + 50;
|
|
6
|
+
function keyed(children) {
|
|
7
|
+
const out = [];
|
|
8
|
+
React.Children.forEach(children, (child, i) => {
|
|
9
|
+
const key = React.isValidElement(child) && child.key != null ? child.key : `__nx-${i}`;
|
|
10
|
+
out.push({ key, node: child });
|
|
11
|
+
});
|
|
12
|
+
return out;
|
|
13
|
+
}
|
|
14
|
+
function merge(prev, next) {
|
|
15
|
+
const before = new Map(prev.map((p) => [p.key, p]));
|
|
16
|
+
const nextKeys = new Set(next.map((n) => n.key));
|
|
17
|
+
const result = next.map((n) => {
|
|
18
|
+
const old = before.get(n.key);
|
|
19
|
+
return { ...n, state: !old || old.state === "exit" ? "enter" : old.state };
|
|
20
|
+
});
|
|
21
|
+
prev.forEach((p, i) => {
|
|
22
|
+
if (nextKeys.has(p.key)) return;
|
|
23
|
+
let at = 0;
|
|
24
|
+
for (let j = i - 1; j >= 0; j--) {
|
|
25
|
+
const idx = result.findIndex((r) => r.key === prev[j].key);
|
|
26
|
+
if (idx !== -1) {
|
|
27
|
+
at = idx + 1;
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
result.splice(at, 0, { ...p, state: "exit" });
|
|
32
|
+
});
|
|
33
|
+
return result;
|
|
34
|
+
}
|
|
35
|
+
const ListTransition = React.forwardRef(function ListTransition2({ as: Tag = "div", itemAs: Item = "div", appear = false, children, ...rest }, ref) {
|
|
36
|
+
const next = keyed(children);
|
|
37
|
+
const [entries, setEntries] = React.useState(
|
|
38
|
+
() => next.map((n) => ({ ...n, state: appear ? "enter" : "idle" }))
|
|
39
|
+
);
|
|
40
|
+
const [prevChildren, setPrevChildren] = React.useState(children);
|
|
41
|
+
let rendered = entries;
|
|
42
|
+
if (children !== prevChildren) {
|
|
43
|
+
rendered = merge(entries, next);
|
|
44
|
+
setPrevChildren(children);
|
|
45
|
+
setEntries(rendered);
|
|
46
|
+
}
|
|
47
|
+
const remove = React.useCallback((key) => {
|
|
48
|
+
setEntries((list) => list.filter((e) => !(e.key === key && e.state === "exit")));
|
|
49
|
+
}, []);
|
|
50
|
+
const settle = React.useCallback((key) => {
|
|
51
|
+
setEntries((list) => list.map((e) => e.key === key && e.state === "enter" ? { ...e, state: "idle" } : e));
|
|
52
|
+
}, []);
|
|
53
|
+
const exiting = rendered.filter((e) => e.state === "exit").map((e) => e.key).join("|");
|
|
54
|
+
React.useEffect(() => {
|
|
55
|
+
if (!exiting) return;
|
|
56
|
+
const keys = rendered.filter((e) => e.state === "exit").map((e) => e.key);
|
|
57
|
+
const t = setTimeout(() => keys.forEach(remove), EXIT_FALLBACK_MS);
|
|
58
|
+
return () => clearTimeout(t);
|
|
59
|
+
}, [exiting, remove]);
|
|
60
|
+
return /* @__PURE__ */ jsx(Tag, { ref, ...rest, children: rendered.map((e) => /* @__PURE__ */ jsx(
|
|
61
|
+
Item,
|
|
62
|
+
{
|
|
63
|
+
className: "nx-list-item",
|
|
64
|
+
"data-state": e.state === "idle" ? void 0 : e.state,
|
|
65
|
+
"aria-hidden": e.state === "exit" ? true : void 0,
|
|
66
|
+
onAnimationEnd: (ev) => {
|
|
67
|
+
if (ev.target !== ev.currentTarget) return;
|
|
68
|
+
if (e.state === "exit") remove(e.key);
|
|
69
|
+
else if (e.state === "enter") settle(e.key);
|
|
70
|
+
},
|
|
71
|
+
children: /* @__PURE__ */ jsx("div", { className: "nx-list-item-inner", children: e.node })
|
|
72
|
+
},
|
|
73
|
+
e.key
|
|
74
|
+
)) });
|
|
75
|
+
});
|
|
76
|
+
ListTransition.displayName = "ListTransition";
|
|
77
|
+
const SkeletonSwap = React.forwardRef(function SkeletonSwap2({ loading, skeleton, children, className, ...rest }, ref) {
|
|
78
|
+
const [phase, setPhase] = React.useState(loading ? "loading" : "done");
|
|
79
|
+
const [prevLoading, setPrevLoading] = React.useState(loading);
|
|
80
|
+
let current = phase;
|
|
81
|
+
if (loading !== prevLoading) {
|
|
82
|
+
current = loading ? "loading" : "out";
|
|
83
|
+
setPrevLoading(loading);
|
|
84
|
+
setPhase(current);
|
|
85
|
+
}
|
|
86
|
+
React.useEffect(() => {
|
|
87
|
+
if (current !== "out") return;
|
|
88
|
+
const t = setTimeout(() => setPhase("done"), SPRING_MS.effects.default + 50);
|
|
89
|
+
return () => clearTimeout(t);
|
|
90
|
+
}, [current]);
|
|
91
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: className ? `nx-swap ${className}` : "nx-swap", "aria-busy": loading || void 0, ...rest, children: [
|
|
92
|
+
current !== "loading" && /* @__PURE__ */ jsx("div", { className: current === "out" ? "nx-swap-in" : void 0, children }),
|
|
93
|
+
current !== "done" && /* @__PURE__ */ jsx(
|
|
94
|
+
"div",
|
|
95
|
+
{
|
|
96
|
+
className: current === "out" ? "nx-swap-out" : void 0,
|
|
97
|
+
"aria-hidden": "true",
|
|
98
|
+
onAnimationEnd: (e) => {
|
|
99
|
+
if (e.target === e.currentTarget) setPhase("done");
|
|
100
|
+
},
|
|
101
|
+
children: skeleton
|
|
102
|
+
}
|
|
103
|
+
)
|
|
104
|
+
] });
|
|
105
|
+
});
|
|
106
|
+
SkeletonSwap.displayName = "SkeletonSwap";
|
|
107
|
+
export {
|
|
108
|
+
ListTransition,
|
|
109
|
+
SkeletonSwap
|
|
110
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface MarqueeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
speed?: 'slow' | 'normal' | 'fast';
|
|
4
|
+
/** Classes for each copy of the row (gap, alignment). @default 'gap-12 pe-12 items-center' */
|
|
5
|
+
rowClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* A row that scrolls sideways forever (logo strips, tool lists), in marketing
|
|
9
|
+
* mode (@nexub/themes/marketing). It pauses on hover and while focus is inside,
|
|
10
|
+
* and stands still under reduced motion. The second copy of the row is
|
|
11
|
+
* hidden from assistive technology and can't be focused.
|
|
12
|
+
*/
|
|
13
|
+
export declare const Marquee: React.ForwardRefExoticComponent<MarqueeProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
const Marquee = React.forwardRef(
|
|
5
|
+
({ speed = "normal", rowClassName = "gap-12 pe-12 items-center", className, children, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, "data-speed": speed, className: cn("nx-mkt-marquee", className), ...props, children: /* @__PURE__ */ jsxs("div", { className: "nx-mkt-marquee-track", children: [
|
|
6
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex shrink-0", rowClassName), children }),
|
|
7
|
+
/* @__PURE__ */ jsx("div", { className: cn("flex shrink-0", rowClassName), "aria-hidden": "true", inert: true, children })
|
|
8
|
+
] }) })
|
|
9
|
+
);
|
|
10
|
+
Marquee.displayName = "Marquee";
|
|
11
|
+
export {
|
|
12
|
+
Marquee
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface RevealProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Fades its content up as it scrolls into view, in marketing mode
|
|
7
|
+
* (@nexub/themes/marketing). Uses a CSS scroll-driven animation where the
|
|
8
|
+
* browser supports one; elsewhere an IntersectionObserver plays the same
|
|
9
|
+
* animation once. Content that starts on screen, and every visitor without
|
|
10
|
+
* JS or with reduced motion, just sees it.
|
|
11
|
+
*/
|
|
12
|
+
export declare const Reveal: React.ForwardRefExoticComponent<RevealProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
5
|
+
import { cn } from "../../utils/cn.js";
|
|
6
|
+
import { useMergedRefs } from "../../hooks/useMergedRefs.js";
|
|
7
|
+
const Reveal = React.forwardRef(
|
|
8
|
+
({ asChild = false, className, ...props }, ref) => {
|
|
9
|
+
const self = React.useRef(null);
|
|
10
|
+
React.useEffect(() => {
|
|
11
|
+
const el = self.current;
|
|
12
|
+
if (!el || typeof IntersectionObserver === "undefined") return;
|
|
13
|
+
if (CSS.supports?.("animation-timeline: view()")) return;
|
|
14
|
+
if (window.matchMedia?.("(prefers-reduced-motion: reduce)").matches) return;
|
|
15
|
+
if (el.getBoundingClientRect().top < window.innerHeight) return;
|
|
16
|
+
el.dataset.reveal = "pending";
|
|
17
|
+
const io = new IntersectionObserver(([entry]) => {
|
|
18
|
+
if (!entry?.isIntersecting) return;
|
|
19
|
+
el.dataset.reveal = "done";
|
|
20
|
+
io.disconnect();
|
|
21
|
+
}, { threshold: 0.15 });
|
|
22
|
+
io.observe(el);
|
|
23
|
+
return () => io.disconnect();
|
|
24
|
+
}, []);
|
|
25
|
+
const Comp = asChild ? Slot : "div";
|
|
26
|
+
return /* @__PURE__ */ jsx(Comp, { ref: useMergedRefs(ref, self), className: cn("nx-mkt-reveal", className), ...props });
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
Reveal.displayName = "Reveal";
|
|
30
|
+
export {
|
|
31
|
+
Reveal
|
|
32
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MotionBaseProps } from './motion.types.js';
|
|
3
|
+
export interface ScaleProps extends MotionBaseProps, React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* The scale value at the start/end of the animation (when `in={false}`).
|
|
6
|
+
* @default 0.95
|
|
7
|
+
*/
|
|
8
|
+
initialScale?: number;
|
|
9
|
+
/** Wrapper element tag. @default 'div' */
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Scale — animates opacity + scale(x) from `initialScale` to 1 on the spring
|
|
14
|
+
* tokens. Reduced motion keeps the fade and drops the scale.
|
|
15
|
+
*
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Scale in={isOpen} initialScale={0.9}>
|
|
18
|
+
* <Menu />
|
|
19
|
+
* </Scale>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const Scale: React.ForwardRefExoticComponent<ScaleProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useMotion } from "./useMotion.js";
|
|
5
|
+
const Scale = React.forwardRef(function Scale2({
|
|
6
|
+
in: visible,
|
|
7
|
+
duration = "fast",
|
|
8
|
+
easing,
|
|
9
|
+
unmountOnExit = false,
|
|
10
|
+
initialScale = 0.95,
|
|
11
|
+
children,
|
|
12
|
+
style,
|
|
13
|
+
as: Tag = "div",
|
|
14
|
+
...rest
|
|
15
|
+
}, ref) {
|
|
16
|
+
const { phase, mounted, reduced, transitionStyle, handleTransitionEnd } = useMotion({
|
|
17
|
+
visible,
|
|
18
|
+
duration,
|
|
19
|
+
easing,
|
|
20
|
+
unmountOnExit
|
|
21
|
+
});
|
|
22
|
+
if (!mounted) return null;
|
|
23
|
+
const isEntered = phase === "entered";
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Tag,
|
|
26
|
+
{
|
|
27
|
+
ref,
|
|
28
|
+
onTransitionEnd: handleTransitionEnd,
|
|
29
|
+
style: {
|
|
30
|
+
opacity: isEntered ? 1 : 0,
|
|
31
|
+
transform: isEntered || reduced ? "scale(1)" : `scale(${initialScale})`,
|
|
32
|
+
transformOrigin: "top center",
|
|
33
|
+
willChange: "opacity, transform",
|
|
34
|
+
...transitionStyle,
|
|
35
|
+
...style
|
|
36
|
+
},
|
|
37
|
+
...rest,
|
|
38
|
+
children
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
Scale.displayName = "Scale";
|
|
43
|
+
export {
|
|
44
|
+
Scale
|
|
45
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MotionBaseProps } from './motion.types.js';
|
|
3
|
+
export type SlideDirection = 'up' | 'down' | 'left' | 'right';
|
|
4
|
+
export interface SlideProps extends MotionBaseProps, React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/** Direction the element slides in from. @default 'up' */
|
|
6
|
+
direction?: SlideDirection;
|
|
7
|
+
/** Distance of the slide offset. @default '12px' */
|
|
8
|
+
distance?: string;
|
|
9
|
+
/** Wrapper element tag. @default 'div' */
|
|
10
|
+
as?: React.ElementType;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Slide — animates opacity + translate from a given direction on the spring
|
|
14
|
+
* tokens. Reduced motion keeps the fade and drops the travel.
|
|
15
|
+
*
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Slide in={isOpen} direction="up">
|
|
18
|
+
* <Card />
|
|
19
|
+
* </Slide>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const Slide: React.ForwardRefExoticComponent<SlideProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { useMotion } from "./useMotion.js";
|
|
5
|
+
const directionTransform = {
|
|
6
|
+
up: { from: "translateY(12px)", to: "translateY(0)" },
|
|
7
|
+
down: { from: "translateY(-12px)", to: "translateY(0)" },
|
|
8
|
+
left: { from: "translateX(12px)", to: "translateX(0)" },
|
|
9
|
+
right: { from: "translateX(-12px)", to: "translateX(0)" }
|
|
10
|
+
};
|
|
11
|
+
const Slide = React.forwardRef(function Slide2({
|
|
12
|
+
in: visible,
|
|
13
|
+
duration = "normal",
|
|
14
|
+
easing,
|
|
15
|
+
unmountOnExit = false,
|
|
16
|
+
direction = "up",
|
|
17
|
+
distance,
|
|
18
|
+
children,
|
|
19
|
+
style,
|
|
20
|
+
as: Tag = "div",
|
|
21
|
+
...rest
|
|
22
|
+
}, ref) {
|
|
23
|
+
const { phase, mounted, reduced, transitionStyle, handleTransitionEnd } = useMotion({
|
|
24
|
+
visible,
|
|
25
|
+
duration,
|
|
26
|
+
easing,
|
|
27
|
+
unmountOnExit
|
|
28
|
+
});
|
|
29
|
+
if (!mounted) return null;
|
|
30
|
+
const isEntered = phase === "entered";
|
|
31
|
+
const dt = directionTransform[direction];
|
|
32
|
+
let fromTransform = dt.from;
|
|
33
|
+
if (distance) {
|
|
34
|
+
if (direction === "up") fromTransform = `translateY(${distance})`;
|
|
35
|
+
if (direction === "down") fromTransform = `translateY(-${distance})`;
|
|
36
|
+
if (direction === "left") fromTransform = `translateX(${distance})`;
|
|
37
|
+
if (direction === "right") fromTransform = `translateX(-${distance})`;
|
|
38
|
+
}
|
|
39
|
+
return /* @__PURE__ */ jsx(
|
|
40
|
+
Tag,
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
onTransitionEnd: handleTransitionEnd,
|
|
44
|
+
style: {
|
|
45
|
+
opacity: isEntered ? 1 : 0,
|
|
46
|
+
transform: isEntered || reduced ? dt.to : fromTransform,
|
|
47
|
+
willChange: "opacity, transform",
|
|
48
|
+
...transitionStyle,
|
|
49
|
+
...style
|
|
50
|
+
},
|
|
51
|
+
...rest,
|
|
52
|
+
children
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
Slide.displayName = "Slide";
|
|
57
|
+
export {
|
|
58
|
+
Slide
|
|
59
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { Fade } from './Fade.js';
|
|
2
|
+
export type { FadeProps } from './Fade.js';
|
|
3
|
+
export { Slide } from './Slide.js';
|
|
4
|
+
export type { SlideProps, SlideDirection } from './Slide.js';
|
|
5
|
+
export { Scale } from './Scale.js';
|
|
6
|
+
export type { ScaleProps } from './Scale.js';
|
|
7
|
+
export { Collapse } from './Collapse.js';
|
|
8
|
+
export type { CollapseProps } from './Collapse.js';
|
|
9
|
+
export { ListTransition, SkeletonSwap } from './ListTransition.js';
|
|
10
|
+
export type { ListTransitionProps, SkeletonSwapProps } from './ListTransition.js';
|
|
11
|
+
export { usePrefersReducedMotion } from './useMotion.js';
|
|
12
|
+
export type { MotionDuration, MotionEasing, MotionBaseProps } from './motion.types.js';
|
|
13
|
+
export { Reveal } from './Reveal.js';
|
|
14
|
+
export type { RevealProps } from './Reveal.js';
|
|
15
|
+
export { Float } from './Float.js';
|
|
16
|
+
export type { FloatProps } from './Float.js';
|
|
17
|
+
export { Marquee } from './Marquee.js';
|
|
18
|
+
export type { MarqueeProps } from './Marquee.js';
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "../../chunk-4GVGS5N4.js";
|
|
1
|
+
import { Fade } from "./Fade.js";
|
|
2
|
+
import { Slide } from "./Slide.js";
|
|
3
|
+
import { Scale } from "./Scale.js";
|
|
4
|
+
import { Collapse } from "./Collapse.js";
|
|
5
|
+
import { ListTransition, SkeletonSwap } from "./ListTransition.js";
|
|
6
|
+
import { usePrefersReducedMotion } from "./useMotion.js";
|
|
7
|
+
import { Reveal } from "./Reveal.js";
|
|
8
|
+
import { Float } from "./Float.js";
|
|
9
|
+
import { Marquee } from "./Marquee.js";
|
|
11
10
|
export {
|
|
12
11
|
Collapse,
|
|
13
12
|
Fade,
|
|
13
|
+
Float,
|
|
14
14
|
ListTransition,
|
|
15
|
+
Marquee,
|
|
16
|
+
Reveal,
|
|
15
17
|
Scale,
|
|
16
18
|
SkeletonSwap,
|
|
17
19
|
Slide,
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type MotionDuration = 'instant' | 'fast' | 'normal' | 'slow' | 'slower';
|
|
2
|
+
export type MotionEasing = 'linear' | 'in' | 'out' | 'in-out' | 'out-expo' | 'spring';
|
|
3
|
+
export interface MotionBaseProps {
|
|
4
|
+
/** Whether the component is visible / mounted. */
|
|
5
|
+
in: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Speed on the spring tokens: `fast` → fast, `normal` → default,
|
|
8
|
+
* `slow`/`slower` → slow springs. `instant` turns motion off.
|
|
9
|
+
* @default 'normal'
|
|
10
|
+
*/
|
|
11
|
+
duration?: MotionDuration;
|
|
12
|
+
/**
|
|
13
|
+
* Legacy: set it to use the old `--duration-*` + `--ease-{value}` tokens
|
|
14
|
+
* instead of springs. Omit it to ride the spring tokens.
|
|
15
|
+
*/
|
|
16
|
+
easing?: MotionEasing;
|
|
17
|
+
/**
|
|
18
|
+
* Remove the element from the DOM when `in` becomes false
|
|
19
|
+
* (after the exit transition completes).
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
22
|
+
unmountOnExit?: boolean;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
import * as React from 'react';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import * as React from "react";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { MotionDuration, MotionEasing } from './motion.types.js';
|
|
3
|
+
export declare const DURATION_MS: Record<MotionDuration, number>;
|
|
4
|
+
export type SpringSpeed = 'fast' | 'default' | 'slow';
|
|
5
|
+
export type SpringFamily = 'spatial' | 'effects' | 'expressive';
|
|
6
|
+
/** `duration` → spring speed. `instant` is handled separately (no motion). */
|
|
7
|
+
export declare const SPRING_SPEED: Record<Exclude<MotionDuration, 'instant'>, SpringSpeed>;
|
|
8
|
+
export declare const SPRING_MS: Record<SpringFamily, Record<SpringSpeed, number>>;
|
|
9
|
+
/** One `transition` entry riding a spring token. */
|
|
10
|
+
export declare const spring: (property: string, family: SpringFamily, speed: SpringSpeed) => string;
|
|
11
|
+
/** True when the user asked the OS for reduced motion. False during SSR. */
|
|
12
|
+
export declare function usePrefersReducedMotion(): boolean;
|
|
13
|
+
export type TransitionPhase = 'exited' | 'entering' | 'entered' | 'exiting';
|
|
14
|
+
export interface UseMotionReturn {
|
|
15
|
+
phase: TransitionPhase;
|
|
16
|
+
mounted: boolean;
|
|
17
|
+
/** Reduced motion is on: keep the crossfade, drop travel and scale. */
|
|
18
|
+
reduced: boolean;
|
|
19
|
+
transitionStyle: React.CSSProperties;
|
|
20
|
+
/** Attach to onTransitionEnd so the hook can move exiting → exited. */
|
|
21
|
+
handleTransitionEnd: (e?: React.TransitionEvent) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Lightweight hook that drives a 4-phase CSS transition state machine.
|
|
25
|
+
*
|
|
26
|
+
* exited ─► entering ─► entered
|
|
27
|
+
* │
|
|
28
|
+
* (in=false)
|
|
29
|
+
* ▼
|
|
30
|
+
* exiting ─► (onTransitionEnd) ─► exited
|
|
31
|
+
*
|
|
32
|
+
* Enter rides the springs (opacity on `effects`, transform on `spatial`).
|
|
33
|
+
* Exit is quicker and never overshoots (`effects` fast for both).
|
|
34
|
+
* Passing `easing` opts back into the legacy duration + easing tokens.
|
|
35
|
+
*/
|
|
36
|
+
export declare function useMotion({ visible, duration, easing, unmountOnExit, }: {
|
|
37
|
+
visible: boolean;
|
|
38
|
+
duration?: MotionDuration;
|
|
39
|
+
easing?: MotionEasing;
|
|
40
|
+
unmountOnExit?: boolean;
|
|
41
|
+
}): UseMotionReturn;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useMediaQuery } from "../../hooks/useMediaQuery.js";
|
|
4
|
+
const DURATION_MS = {
|
|
5
|
+
instant: 0,
|
|
6
|
+
fast: 150,
|
|
7
|
+
normal: 200,
|
|
8
|
+
slow: 300,
|
|
9
|
+
slower: 500
|
|
10
|
+
};
|
|
11
|
+
const SPRING_SPEED = {
|
|
12
|
+
fast: "fast",
|
|
13
|
+
normal: "default",
|
|
14
|
+
slow: "slow",
|
|
15
|
+
slower: "slow"
|
|
16
|
+
};
|
|
17
|
+
const SPRING_MS = {
|
|
18
|
+
spatial: { fast: 224, default: 317, slow: 484 },
|
|
19
|
+
effects: { fast: 150, default: 231, slow: 327 },
|
|
20
|
+
expressive: { fast: 364, default: 435, slow: 600 }
|
|
21
|
+
};
|
|
22
|
+
const FALLBACK_MARGIN_MS = 50;
|
|
23
|
+
const spring = (property, family, speed) => `${property} var(--motion-spring-${family}-${speed}-duration) var(--motion-spring-${family}-${speed}-easing)`;
|
|
24
|
+
function usePrefersReducedMotion() {
|
|
25
|
+
return useMediaQuery("(prefers-reduced-motion: reduce)");
|
|
26
|
+
}
|
|
27
|
+
function useMotion({
|
|
28
|
+
visible,
|
|
29
|
+
duration = "normal",
|
|
30
|
+
easing,
|
|
31
|
+
unmountOnExit = false
|
|
32
|
+
}) {
|
|
33
|
+
const [phase, setPhase] = React.useState(
|
|
34
|
+
visible ? "entered" : "exited"
|
|
35
|
+
);
|
|
36
|
+
const reduced = usePrefersReducedMotion();
|
|
37
|
+
const rafRef = React.useRef(null);
|
|
38
|
+
const isMounted = React.useRef(true);
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
isMounted.current = true;
|
|
41
|
+
return () => {
|
|
42
|
+
isMounted.current = false;
|
|
43
|
+
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
44
|
+
};
|
|
45
|
+
}, []);
|
|
46
|
+
const prevVisible = React.useRef(visible);
|
|
47
|
+
React.useEffect(() => {
|
|
48
|
+
if (prevVisible.current === visible) return;
|
|
49
|
+
prevVisible.current = visible;
|
|
50
|
+
if (visible) {
|
|
51
|
+
setPhase("entering");
|
|
52
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
53
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
54
|
+
if (isMounted.current) setPhase("entered");
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
} else {
|
|
58
|
+
setPhase("exiting");
|
|
59
|
+
}
|
|
60
|
+
}, [visible]);
|
|
61
|
+
const legacy = easing !== void 0;
|
|
62
|
+
const exitMs = duration === "instant" ? 0 : legacy ? DURATION_MS[duration] : SPRING_MS.effects.fast;
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
if (phase !== "exiting") return;
|
|
65
|
+
const t = setTimeout(() => setPhase("exited"), exitMs + FALLBACK_MARGIN_MS);
|
|
66
|
+
return () => clearTimeout(t);
|
|
67
|
+
}, [phase, exitMs]);
|
|
68
|
+
const handleTransitionEnd = React.useCallback((e) => {
|
|
69
|
+
if (!isMounted.current) return;
|
|
70
|
+
if (e && e.target !== e.currentTarget) return;
|
|
71
|
+
setPhase((prev) => prev === "exiting" ? "exited" : prev);
|
|
72
|
+
}, []);
|
|
73
|
+
const mounted = unmountOnExit ? phase !== "exited" : true;
|
|
74
|
+
let transitionStyle;
|
|
75
|
+
if (duration === "instant") {
|
|
76
|
+
transitionStyle = { transition: "none" };
|
|
77
|
+
} else if (legacy) {
|
|
78
|
+
transitionStyle = {
|
|
79
|
+
transitionDuration: `var(--duration-${duration})`,
|
|
80
|
+
transitionTimingFunction: `var(--ease-${easing})`,
|
|
81
|
+
transitionProperty: "opacity, transform"
|
|
82
|
+
};
|
|
83
|
+
} else if (phase === "exiting" || phase === "exited") {
|
|
84
|
+
transitionStyle = {
|
|
85
|
+
transition: [spring("opacity", "effects", "fast"), spring("transform", "effects", "fast")].join(", ")
|
|
86
|
+
};
|
|
87
|
+
} else {
|
|
88
|
+
const speed = SPRING_SPEED[duration];
|
|
89
|
+
transitionStyle = {
|
|
90
|
+
transition: [spring("opacity", "effects", speed), spring("transform", "spatial", speed)].join(", ")
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
return { phase, mounted, reduced, transitionStyle, handleTransitionEnd };
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
DURATION_MS,
|
|
97
|
+
SPRING_MS,
|
|
98
|
+
SPRING_SPEED,
|
|
99
|
+
spring,
|
|
100
|
+
useMotion,
|
|
101
|
+
usePrefersReducedMotion
|
|
102
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadixNav from '@radix-ui/react-navigation-menu';
|
|
3
|
+
export declare const NavigationMenu: {
|
|
4
|
+
Root: React.ForwardRefExoticComponent<RadixNav.NavigationMenuProps & React.RefAttributes<HTMLElement>>;
|
|
5
|
+
List: React.ForwardRefExoticComponent<RadixNav.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>>;
|
|
6
|
+
Item: React.ForwardRefExoticComponent<RadixNav.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
7
|
+
Trigger: React.ForwardRefExoticComponent<RadixNav.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
Content: React.ForwardRefExoticComponent<RadixNav.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
Link: React.ForwardRefExoticComponent<RadixNav.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
10
|
+
Viewport: React.ForwardRefExoticComponent<RadixNav.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
Indicator: React.ForwardRefExoticComponent<RadixNav.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
};
|