@mks2508/mks-ui 0.1.4 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -11
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/types.d.ts +79 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/index.d.ts +19 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -72
- package/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts +44 -0
- package/dist/react-ui/components/MorphingPopover/MorphingPopover.types.d.ts.map +1 -0
- package/dist/react-ui/components/MorphingPopover/index.d.ts +46 -0
- package/dist/react-ui/components/MorphingPopover/index.d.ts.map +1 -0
- package/dist/{components/ui/morphing-popover/morphing-popover.js → react-ui/components/MorphingPopover/index.js} +46 -6
- package/dist/react-ui/components/MorphingPopover/morphing-popover.module.js +5 -0
- package/dist/react-ui/components/index.d.ts +9 -0
- package/dist/react-ui/components/index.d.ts.map +1 -0
- package/dist/react-ui/components/index.js +1 -0
- package/dist/react-ui/hooks/Animation/UseAutoHeight.d.ts +30 -0
- package/dist/react-ui/hooks/Animation/UseAutoHeight.d.ts.map +1 -0
- package/dist/{hooks/use-auto-height.js → react-ui/hooks/Animation/UseAutoHeight.js} +15 -1
- package/dist/react-ui/hooks/DOM/UseIsInView.d.ts +32 -0
- package/dist/react-ui/hooks/DOM/UseIsInView.d.ts.map +1 -0
- package/dist/react-ui/hooks/DOM/UseIsInView.js +33 -0
- package/dist/react-ui/hooks/State/UseControlledState.d.ts +31 -0
- package/dist/react-ui/hooks/State/UseControlledState.d.ts.map +1 -0
- package/dist/react-ui/hooks/State/UseControlledState.js +34 -0
- package/dist/react-ui/hooks/State/UseDataState.d.ts +21 -0
- package/dist/react-ui/hooks/State/UseDataState.d.ts.map +1 -0
- package/dist/{hooks/use-data-state.js → react-ui/hooks/State/UseDataState.js} +22 -1
- package/dist/react-ui/hooks/index.d.ts +14 -0
- package/dist/react-ui/hooks/index.d.ts.map +1 -0
- package/dist/react-ui/hooks/index.js +4 -0
- package/dist/react-ui/icons/index.d.ts +8 -0
- package/dist/react-ui/icons/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/activity.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/activity.js +1 -1
- package/dist/react-ui/icons/lucide-animated/arrow-down-to-line.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/arrow-down-to-line.js +1 -1
- package/dist/react-ui/icons/lucide-animated/arrow-up.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/arrow-up.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell-electric.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/bell-electric.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/bell.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bot.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/bot.js +1 -1
- package/dist/react-ui/icons/lucide-animated/box.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/box.js +1 -1
- package/dist/react-ui/icons/lucide-animated/check.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/check.js +1 -1
- package/dist/react-ui/icons/lucide-animated/circle-check.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/circle-check.js +1 -1
- package/dist/react-ui/icons/lucide-animated/delete.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/delete.js +1 -1
- package/dist/react-ui/icons/lucide-animated/download.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/download.js +1 -1
- package/dist/react-ui/icons/lucide-animated/edit-2.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/edit-2.js +1 -1
- package/dist/react-ui/icons/lucide-animated/globe.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/globe.js +1 -1
- package/dist/react-ui/icons/lucide-animated/home.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/home.js +1 -1
- package/dist/react-ui/icons/lucide-animated/index.d.ts +38 -0
- package/dist/react-ui/icons/lucide-animated/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/layers.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/layers.js +1 -1
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/layout-panel-top.js +1 -1
- package/dist/react-ui/icons/lucide-animated/list.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/list.js +1 -1
- package/dist/react-ui/icons/lucide-animated/package.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/package.js +1 -1
- package/dist/react-ui/icons/lucide-animated/palette.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/palette.js +1 -1
- package/dist/react-ui/icons/lucide-animated/plus.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/plus.js +1 -1
- package/dist/react-ui/icons/lucide-animated/refresh-cw.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/refresh-cw.js +1 -1
- package/dist/react-ui/icons/lucide-animated/rocket.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/rocket.js +1 -1
- package/dist/react-ui/icons/lucide-animated/save.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/save.js +1 -1
- package/dist/react-ui/icons/lucide-animated/search.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/search.js +1 -1
- package/dist/react-ui/icons/lucide-animated/settings.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/settings.js +1 -1
- package/dist/react-ui/icons/lucide-animated/terminal.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/terminal.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trash-2.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/trash-2.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-down.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/trending-down.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-up.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/trending-up.js +1 -1
- package/dist/react-ui/icons/lucide-animated/type.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/type.js +1 -1
- package/dist/react-ui/icons/lucide-animated/upload.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/upload.js +1 -1
- package/dist/react-ui/icons/lucide-animated/x.d.ts.map +1 -0
- package/dist/{icons → react-ui/icons}/lucide-animated/x.js +1 -1
- package/dist/react-ui/index.d.ts +19 -0
- package/dist/react-ui/index.d.ts.map +1 -0
- package/dist/react-ui/index.js +88 -0
- package/dist/react-ui/lib/get-strict-context.d.ts +30 -0
- package/dist/react-ui/lib/get-strict-context.d.ts.map +1 -0
- package/dist/react-ui/lib/get-strict-context.js +40 -0
- package/dist/react-ui/lib/index.d.ts +8 -0
- package/dist/react-ui/lib/index.d.ts.map +1 -0
- package/dist/react-ui/lib/index.js +2 -0
- package/dist/{lib → react-ui/lib}/utils.d.ts +2 -2
- package/dist/react-ui/lib/utils.d.ts.map +1 -0
- package/dist/{lib → react-ui/lib}/utils.js +3 -3
- package/dist/react-ui/primitives/AutoHeight/index.d.ts +31 -0
- package/dist/react-ui/primitives/AutoHeight/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/AutoHeight/index.js +52 -0
- package/dist/react-ui/primitives/CountingNumber/index.d.ts +44 -0
- package/dist/react-ui/primitives/CountingNumber/index.d.ts.map +1 -0
- package/dist/{components/animate-ui/primitives/texts/counting-number.js → react-ui/primitives/CountingNumber/index.js} +21 -2
- package/dist/react-ui/primitives/Highlight/Highlight.types.d.ts +113 -0
- package/dist/react-ui/primitives/Highlight/Highlight.types.d.ts.map +1 -0
- package/dist/react-ui/primitives/Highlight/index.d.ts +48 -0
- package/dist/react-ui/primitives/Highlight/index.d.ts.map +1 -0
- package/dist/{components/animate-ui/primitives/effects/highlight.js → react-ui/primitives/Highlight/index.js} +42 -2
- package/dist/react-ui/primitives/Slot/index.d.ts +53 -0
- package/dist/react-ui/primitives/Slot/index.d.ts.map +1 -0
- package/dist/{components/animate-ui/primitives/animate/slot.js → react-ui/primitives/Slot/index.js} +25 -2
- package/dist/react-ui/primitives/index.d.ts +12 -0
- package/dist/react-ui/primitives/index.d.ts.map +1 -0
- package/dist/react-ui/primitives/index.js +4 -0
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts +47 -0
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Accordion/Accordion.styles.js +54 -0
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts +160 -0
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Accordion/index.d.ts +105 -0
- package/dist/react-ui/ui/Accordion/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Accordion/index.js +266 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts +28 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.js +29 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts +235 -0
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts.map +1 -0
- package/dist/react-ui/ui/AlertDialog/index.d.ts +194 -0
- package/dist/react-ui/ui/AlertDialog/index.d.ts.map +1 -0
- package/dist/react-ui/ui/AlertDialog/index.js +319 -0
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts +16 -0
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts.map +1 -0
- package/dist/{components/ui/badge/badge.styles.js → react-ui/ui/Badge/Badge.styles.js} +2 -6
- package/dist/react-ui/ui/Badge/Badge.types.d.ts +21 -0
- package/dist/react-ui/ui/Badge/Badge.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Badge/index.d.ts +20 -0
- package/dist/react-ui/ui/Badge/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Badge/index.js +34 -0
- package/dist/react-ui/ui/Button/Button.styles.d.ts +21 -0
- package/dist/react-ui/ui/Button/Button.styles.d.ts.map +1 -0
- package/dist/{components/ui/button/button.styles.js → react-ui/ui/Button/Button.styles.js} +3 -9
- package/dist/react-ui/ui/Button/Button.types.d.ts +45 -0
- package/dist/react-ui/ui/Button/Button.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Button/index.d.ts +22 -0
- package/dist/react-ui/ui/Button/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Button/index.js +103 -0
- package/dist/react-ui/ui/Card/Card.styles.d.ts +11 -0
- package/dist/react-ui/ui/Card/Card.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Card/Card.styles.js +24 -0
- package/dist/react-ui/ui/Card/Card.types.d.ts +22 -0
- package/dist/react-ui/ui/Card/Card.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Card/index.d.ts +36 -0
- package/dist/react-ui/ui/Card/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Card/index.js +82 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts +25 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.js +34 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts +88 -0
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Checkbox/index.d.ts +59 -0
- package/dist/react-ui/ui/Checkbox/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Checkbox/index.js +158 -0
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts +7 -0
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Combobox/Combobox.styles.js +17 -0
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts +49 -0
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Combobox/index.d.ts +60 -0
- package/dist/react-ui/ui/Combobox/index.d.ts.map +1 -0
- package/dist/{components/ui/combobox.js → react-ui/ui/Combobox/index.js} +53 -15
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +18 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +30 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts +12 -0
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts.map +1 -0
- package/dist/react-ui/ui/CornerBracket/index.d.ts +23 -0
- package/dist/react-ui/ui/CornerBracket/index.d.ts.map +1 -0
- package/dist/react-ui/ui/CornerBracket/index.js +42 -0
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts +24 -0
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Dialog/Dialog.styles.js +29 -0
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +221 -0
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Dialog/index.d.ts +138 -0
- package/dist/react-ui/ui/Dialog/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Dialog/index.js +265 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts +7 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.js +16 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts +50 -0
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts.map +1 -0
- package/dist/react-ui/ui/DropdownMenu/index.d.ts +50 -0
- package/dist/react-ui/ui/DropdownMenu/index.d.ts.map +1 -0
- package/dist/{components/ui/dropdown-menu.js → react-ui/ui/DropdownMenu/index.js} +43 -13
- package/dist/react-ui/ui/Field/Field.styles.d.ts +11 -0
- package/dist/react-ui/ui/Field/Field.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Field/Field.styles.js +27 -0
- package/dist/react-ui/ui/Field/Field.types.d.ts +39 -0
- package/dist/react-ui/ui/Field/Field.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Field/index.d.ts +56 -0
- package/dist/react-ui/ui/Field/index.d.ts.map +1 -0
- package/dist/{components/ui/field.js → react-ui/ui/Field/index.js} +54 -22
- package/dist/react-ui/ui/Input/Input.styles.d.ts +7 -0
- package/dist/react-ui/ui/Input/Input.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Input/Input.styles.js +5 -0
- package/dist/react-ui/ui/Input/Input.types.d.ts +9 -0
- package/dist/react-ui/ui/Input/Input.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Input/index.d.ts +17 -0
- package/dist/react-ui/ui/Input/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Input/index.js +29 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts +15 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.js +34 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts +28 -0
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts.map +1 -0
- package/dist/react-ui/ui/InputGroup/index.d.ts +28 -0
- package/dist/react-ui/ui/InputGroup/index.d.ts.map +1 -0
- package/dist/react-ui/ui/InputGroup/index.js +81 -0
- package/dist/react-ui/ui/Label/Label.styles.d.ts +6 -0
- package/dist/react-ui/ui/Label/Label.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Label/Label.styles.js +5 -0
- package/dist/react-ui/ui/Label/Label.types.d.ts +8 -0
- package/dist/react-ui/ui/Label/Label.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Label/index.d.ts +14 -0
- package/dist/react-ui/ui/Label/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Label/index.js +24 -0
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts +42 -0
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Menu/Menu.styles.js +32 -0
- package/dist/react-ui/ui/Menu/Menu.types.d.ts +328 -0
- package/dist/react-ui/ui/Menu/Menu.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Menu/index.d.ts +354 -0
- package/dist/react-ui/ui/Menu/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Menu/index.js +636 -0
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts +23 -0
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Popover/Popover.styles.js +26 -0
- package/dist/react-ui/ui/Popover/Popover.types.d.ts +204 -0
- package/dist/react-ui/ui/Popover/Popover.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Popover/index.d.ts +133 -0
- package/dist/react-ui/ui/Popover/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Popover/index.js +237 -0
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts +28 -0
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Progress/Progress.styles.js +30 -0
- package/dist/react-ui/ui/Progress/Progress.types.d.ts +148 -0
- package/dist/react-ui/ui/Progress/Progress.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Progress/index.d.ts +111 -0
- package/dist/react-ui/ui/Progress/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Progress/index.js +170 -0
- package/dist/react-ui/ui/Select/Select.styles.d.ts +7 -0
- package/dist/react-ui/ui/Select/Select.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Select/Select.styles.js +15 -0
- package/dist/react-ui/ui/Select/Select.types.d.ts +28 -0
- package/dist/react-ui/ui/Select/Select.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Select/index.d.ts +38 -0
- package/dist/react-ui/ui/Select/index.d.ts.map +1 -0
- package/dist/{components/ui/select.js → react-ui/ui/Select/index.js} +34 -12
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts +6 -0
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Separator/Separator.styles.js +5 -0
- package/dist/react-ui/ui/Separator/Separator.types.d.ts +9 -0
- package/dist/react-ui/ui/Separator/Separator.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Separator/index.d.ts +16 -0
- package/dist/react-ui/ui/Separator/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Separator/index.js +29 -0
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts +26 -0
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Switch/Switch.styles.js +41 -0
- package/dist/react-ui/ui/Switch/Switch.types.d.ts +130 -0
- package/dist/react-ui/ui/Switch/Switch.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Switch/index.d.ts +79 -0
- package/dist/react-ui/ui/Switch/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Switch/index.js +199 -0
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +43 -0
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Tabs/Tabs.styles.js +26 -0
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +201 -0
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Tabs/index.d.ts +141 -0
- package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Tabs/index.js +308 -0
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts +6 -0
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Textarea/Textarea.styles.js +5 -0
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts +8 -0
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Textarea/index.d.ts +14 -0
- package/dist/react-ui/ui/Textarea/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Textarea/index.js +24 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts +23 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts.map +1 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.js +26 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +203 -0
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts.map +1 -0
- package/dist/react-ui/ui/Tooltip/index.d.ts +110 -0
- package/dist/react-ui/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/react-ui/ui/Tooltip/index.js +219 -0
- package/dist/react-ui/ui/index.d.ts +31 -0
- package/dist/react-ui/ui/index.d.ts.map +1 -0
- package/dist/react-ui/ui/index.js +37 -0
- package/package.json +12 -9
- package/src/core/index.ts +7 -0
- package/src/core/types.ts +82 -0
- package/src/index.ts +20 -14
- package/src/react-ui/components/MorphingPopover/MorphingPopover.types.ts +49 -0
- package/src/react-ui/components/MorphingPopover/index.tsx +186 -0
- package/src/react-ui/components/index.ts +9 -0
- package/src/{hooks/use-auto-height.tsx → react-ui/hooks/Animation/UseAutoHeight.tsx} +24 -3
- package/src/react-ui/hooks/DOM/UseIsInView.tsx +44 -0
- package/src/{hooks/use-controlled-state.tsx → react-ui/hooks/State/UseControlledState.tsx} +26 -2
- package/src/{hooks/use-data-state.tsx → react-ui/hooks/State/UseDataState.tsx} +22 -0
- package/src/react-ui/hooks/index.ts +17 -0
- package/src/react-ui/icons/index.ts +12 -0
- package/src/{icons → react-ui/icons}/lucide-animated/activity.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/bell-electric.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/bell.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/bot.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/box.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/circle-check.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/delete.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/download.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/home.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/index.ts +38 -0
- package/src/{icons → react-ui/icons}/lucide-animated/layout-panel-top.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/plus.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/search.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/settings.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/trending-down.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/trending-up.tsx +1 -1
- package/src/{icons → react-ui/icons}/lucide-animated/x.tsx +1 -1
- package/src/react-ui/index.ts +30 -0
- package/src/{lib → react-ui/lib}/get-strict-context.tsx +20 -0
- package/src/react-ui/lib/index.ts +8 -0
- package/src/{lib → react-ui/lib}/utils.ts +2 -2
- package/src/{components/animate-ui/primitives/effects/auto-height.tsx → react-ui/primitives/AutoHeight/index.tsx} +24 -5
- package/src/{components/animate-ui/primitives/texts/counting-number.tsx → react-ui/primitives/CountingNumber/index.tsx} +35 -7
- package/src/react-ui/primitives/Highlight/Highlight.types.ts +136 -0
- package/src/{components/animate-ui/primitives/effects/highlight.tsx → react-ui/primitives/Highlight/index.tsx} +60 -123
- package/src/{components/animate-ui/primitives/animate/slot.tsx → react-ui/primitives/Slot/index.tsx} +43 -11
- package/src/react-ui/primitives/index.ts +13 -0
- package/src/react-ui/ui/Accordion/Accordion.styles.ts +72 -0
- package/src/react-ui/ui/Accordion/Accordion.types.ts +199 -0
- package/src/react-ui/ui/Accordion/index.tsx +362 -0
- package/src/react-ui/ui/AlertDialog/AlertDialog.styles.ts +38 -0
- package/src/react-ui/ui/AlertDialog/AlertDialog.types.ts +296 -0
- package/src/react-ui/ui/AlertDialog/index.tsx +540 -0
- package/src/react-ui/ui/Badge/Badge.styles.ts +43 -0
- package/src/react-ui/ui/Badge/Badge.types.ts +26 -0
- package/src/react-ui/ui/Badge/index.tsx +34 -0
- package/src/react-ui/ui/Button/Button.styles.ts +57 -0
- package/src/react-ui/ui/Button/Button.types.ts +63 -0
- package/src/react-ui/ui/Button/index.tsx +155 -0
- package/src/react-ui/ui/Card/Card.styles.ts +32 -0
- package/src/react-ui/ui/Card/Card.types.ts +39 -0
- package/src/react-ui/ui/Card/index.tsx +130 -0
- package/src/react-ui/ui/Checkbox/Checkbox.styles.ts +40 -0
- package/src/react-ui/ui/Checkbox/Checkbox.types.ts +98 -0
- package/src/react-ui/ui/Checkbox/index.tsx +233 -0
- package/src/react-ui/ui/Combobox/Combobox.styles.ts +34 -0
- package/src/react-ui/ui/Combobox/Combobox.types.ts +89 -0
- package/src/react-ui/ui/Combobox/index.tsx +331 -0
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +38 -0
- package/src/react-ui/ui/CornerBracket/CornerBracket.types.ts +15 -0
- package/src/react-ui/ui/CornerBracket/index.tsx +49 -0
- package/src/react-ui/ui/Dialog/Dialog.styles.ts +59 -0
- package/src/react-ui/ui/Dialog/Dialog.types.ts +284 -0
- package/src/react-ui/ui/Dialog/index.tsx +452 -0
- package/src/react-ui/ui/DropdownMenu/DropdownMenu.styles.ts +35 -0
- package/src/react-ui/ui/DropdownMenu/DropdownMenu.types.ts +81 -0
- package/src/react-ui/ui/DropdownMenu/index.tsx +300 -0
- package/src/react-ui/ui/Field/Field.styles.ts +47 -0
- package/src/react-ui/ui/Field/Field.types.ts +60 -0
- package/src/react-ui/ui/Field/index.tsx +254 -0
- package/src/{components/ui/input.tsx → react-ui/ui/Input/Input.styles.ts} +8 -17
- package/src/react-ui/ui/Input/Input.types.ts +10 -0
- package/src/react-ui/ui/Input/index.tsx +32 -0
- package/src/react-ui/ui/InputGroup/InputGroup.styles.ts +53 -0
- package/src/react-ui/ui/InputGroup/InputGroup.types.ts +44 -0
- package/src/react-ui/ui/InputGroup/index.tsx +147 -0
- package/src/react-ui/ui/Label/Label.styles.ts +10 -0
- package/src/react-ui/ui/Label/Label.types.ts +9 -0
- package/src/react-ui/ui/Label/index.tsx +27 -0
- package/src/react-ui/ui/Menu/Menu.styles.ts +71 -0
- package/src/react-ui/ui/Menu/Menu.types.ts +425 -0
- package/src/react-ui/ui/Menu/index.tsx +900 -0
- package/src/react-ui/ui/Popover/Popover.styles.ts +55 -0
- package/src/react-ui/ui/Popover/Popover.types.ts +261 -0
- package/src/react-ui/ui/Popover/index.tsx +422 -0
- package/src/react-ui/ui/Progress/Progress.styles.ts +36 -0
- package/src/react-ui/ui/Progress/Progress.types.ts +162 -0
- package/src/react-ui/ui/Progress/index.tsx +254 -0
- package/src/react-ui/ui/Select/Select.styles.ts +30 -0
- package/src/react-ui/ui/Select/Select.types.ts +51 -0
- package/src/react-ui/ui/Select/index.tsx +225 -0
- package/src/react-ui/ui/Separator/Separator.styles.ts +10 -0
- package/src/react-ui/ui/Separator/Separator.types.ts +10 -0
- package/src/react-ui/ui/Separator/index.tsx +37 -0
- package/src/react-ui/ui/Switch/Switch.styles.ts +50 -0
- package/src/react-ui/ui/Switch/Switch.types.ts +155 -0
- package/src/react-ui/ui/Switch/index.tsx +253 -0
- package/src/react-ui/ui/Tabs/Tabs.styles.ts +60 -0
- package/src/react-ui/ui/Tabs/Tabs.types.ts +250 -0
- package/src/react-ui/ui/Tabs/index.tsx +421 -0
- package/src/{components/ui/textarea.tsx → react-ui/ui/Textarea/Textarea.styles.ts} +7 -15
- package/src/react-ui/ui/Textarea/Textarea.types.ts +9 -0
- package/src/react-ui/ui/Textarea/index.tsx +27 -0
- package/src/react-ui/ui/Tooltip/Tooltip.styles.ts +43 -0
- package/src/react-ui/ui/Tooltip/Tooltip.types.ts +253 -0
- package/src/react-ui/ui/Tooltip/index.tsx +394 -0
- package/src/react-ui/ui/index.ts +34 -0
- package/dist/components/animate-ui/primitives/animate/slot.d.ts +0 -18
- package/dist/components/animate-ui/primitives/animate/slot.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/accordion.d.ts +0 -22
- package/dist/components/animate-ui/primitives/base/accordion.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/accordion.js +0 -132
- package/dist/components/animate-ui/primitives/base/alert-dialog.d.ts +0 -33
- package/dist/components/animate-ui/primitives/base/alert-dialog.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/alert-dialog.js +0 -132
- package/dist/components/animate-ui/primitives/base/checkbox.d.ts +0 -15
- package/dist/components/animate-ui/primitives/base/checkbox.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/checkbox.js +0 -101
- package/dist/components/animate-ui/primitives/base/dialog.d.ts +0 -33
- package/dist/components/animate-ui/primitives/base/dialog.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/dialog.js +0 -132
- package/dist/components/animate-ui/primitives/base/menu.d.ts +0 -60
- package/dist/components/animate-ui/primitives/base/menu.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/menu.js +0 -266
- package/dist/components/animate-ui/primitives/base/popover.d.ts +0 -30
- package/dist/components/animate-ui/primitives/base/popover.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/popover.js +0 -109
- package/dist/components/animate-ui/primitives/base/progress.d.ts +0 -297
- package/dist/components/animate-ui/primitives/base/progress.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/progress.js +0 -63
- package/dist/components/animate-ui/primitives/base/switch.d.ts +0 -23
- package/dist/components/animate-ui/primitives/base/switch.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/switch.js +0 -90
- package/dist/components/animate-ui/primitives/base/tabs.d.ts +0 -33
- package/dist/components/animate-ui/primitives/base/tabs.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/tabs.js +0 -132
- package/dist/components/animate-ui/primitives/base/tooltip.d.ts +0 -31
- package/dist/components/animate-ui/primitives/base/tooltip.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/base/tooltip.js +0 -116
- package/dist/components/animate-ui/primitives/effects/auto-height.d.ts +0 -12
- package/dist/components/animate-ui/primitives/effects/auto-height.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/effects/auto-height.js +0 -37
- package/dist/components/animate-ui/primitives/effects/highlight.d.ts +0 -92
- package/dist/components/animate-ui/primitives/effects/highlight.d.ts.map +0 -1
- package/dist/components/animate-ui/primitives/texts/counting-number.d.ts +0 -16
- package/dist/components/animate-ui/primitives/texts/counting-number.d.ts.map +0 -1
- package/dist/components/ui/accordion.d.ts +0 -9
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -1
- package/dist/components/ui/alert-dialog.d.ts +0 -9
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.js +0 -1
- package/dist/components/ui/auto-height.d.ts +0 -9
- package/dist/components/ui/auto-height.d.ts.map +0 -1
- package/dist/components/ui/auto-height.js +0 -1
- package/dist/components/ui/badge/badge.d.ts +0 -37
- package/dist/components/ui/badge/badge.d.ts.map +0 -1
- package/dist/components/ui/badge/badge.js +0 -52
- package/dist/components/ui/badge/badge.styles.d.ts +0 -23
- package/dist/components/ui/badge/badge.styles.d.ts.map +0 -1
- package/dist/components/ui/badge/badge.types.d.ts +0 -38
- package/dist/components/ui/badge/badge.types.d.ts.map +0 -1
- package/dist/components/ui/badge/index.d.ts +0 -8
- package/dist/components/ui/badge/index.d.ts.map +0 -1
- package/dist/components/ui/badge/index.js +0 -2
- package/dist/components/ui/button/button.d.ts +0 -79
- package/dist/components/ui/button/button.d.ts.map +0 -1
- package/dist/components/ui/button/button.js +0 -161
- package/dist/components/ui/button/button.styles.d.ts +0 -33
- package/dist/components/ui/button/button.styles.d.ts.map +0 -1
- package/dist/components/ui/button/button.types.d.ts +0 -103
- package/dist/components/ui/button/button.types.d.ts.map +0 -1
- package/dist/components/ui/button/index.d.ts +0 -7
- package/dist/components/ui/button/index.d.ts.map +0 -1
- package/dist/components/ui/button/index.js +0 -2
- package/dist/components/ui/card.d.ts +0 -14
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/card.js +0 -67
- package/dist/components/ui/checkbox.d.ts +0 -9
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/checkbox.js +0 -1
- package/dist/components/ui/combobox.d.ts +0 -25
- package/dist/components/ui/combobox.d.ts.map +0 -1
- package/dist/components/ui/corner-bracket.d.ts +0 -34
- package/dist/components/ui/corner-bracket.d.ts.map +0 -1
- package/dist/components/ui/corner-bracket.js +0 -70
- package/dist/components/ui/counting-number.d.ts +0 -9
- package/dist/components/ui/counting-number.d.ts.map +0 -1
- package/dist/components/ui/counting-number.js +0 -1
- package/dist/components/ui/dialog.d.ts +0 -9
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/dialog.js +0 -1
- package/dist/components/ui/dropdown-menu.d.ts +0 -30
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/field.d.ts +0 -25
- package/dist/components/ui/field.d.ts.map +0 -1
- package/dist/components/ui/highlight.d.ts +0 -9
- package/dist/components/ui/highlight.d.ts.map +0 -1
- package/dist/components/ui/highlight.js +0 -1
- package/dist/components/ui/index.d.ts +0 -36
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -47
- package/dist/components/ui/input-group.d.ts +0 -19
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input-group.js +0 -84
- package/dist/components/ui/input.d.ts +0 -4
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/input.js +0 -17
- package/dist/components/ui/label.d.ts +0 -4
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/label.js +0 -15
- package/dist/components/ui/menu.d.ts +0 -9
- package/dist/components/ui/menu.d.ts.map +0 -1
- package/dist/components/ui/menu.js +0 -1
- package/dist/components/ui/morphing-popover/index.d.ts +0 -10
- package/dist/components/ui/morphing-popover/index.d.ts.map +0 -1
- package/dist/components/ui/morphing-popover/index.js +0 -1
- package/dist/components/ui/morphing-popover/morphing-popover.d.ts +0 -54
- package/dist/components/ui/morphing-popover/morphing-popover.d.ts.map +0 -1
- package/dist/components/ui/morphing-popover/morphing-popover.module.js +0 -5
- package/dist/components/ui/popover.d.ts +0 -9
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/popover.js +0 -1
- package/dist/components/ui/progress.d.ts +0 -9
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/progress.js +0 -1
- package/dist/components/ui/select.d.ts +0 -16
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -4
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/separator.js +0 -18
- package/dist/components/ui/slot.d.ts +0 -9
- package/dist/components/ui/slot.d.ts.map +0 -1
- package/dist/components/ui/slot.js +0 -1
- package/dist/components/ui/switch.d.ts +0 -9
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/switch.js +0 -1
- package/dist/components/ui/tabs.d.ts +0 -9
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js +0 -1
- package/dist/components/ui/textarea.d.ts +0 -4
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/textarea.js +0 -15
- package/dist/components/ui/tooltip.d.ts +0 -9
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/components/ui/tooltip.js +0 -1
- package/dist/hooks/index.d.ts +0 -10
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/index.js +0 -4
- package/dist/hooks/use-auto-height.d.ts +0 -11
- package/dist/hooks/use-auto-height.d.ts.map +0 -1
- package/dist/hooks/use-controlled-state.d.ts +0 -9
- package/dist/hooks/use-controlled-state.d.ts.map +0 -1
- package/dist/hooks/use-controlled-state.js +0 -17
- package/dist/hooks/use-data-state.d.ts +0 -5
- package/dist/hooks/use-data-state.d.ts.map +0 -1
- package/dist/hooks/use-is-in-view.d.ts +0 -13
- package/dist/hooks/use-is-in-view.d.ts.map +0 -1
- package/dist/hooks/use-is-in-view.js +0 -20
- package/dist/icons/index.d.ts +0 -8
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/lucide-animated/activity.d.ts.map +0 -1
- package/dist/icons/lucide-animated/arrow-down-to-line.d.ts.map +0 -1
- package/dist/icons/lucide-animated/arrow-up.d.ts.map +0 -1
- package/dist/icons/lucide-animated/bell-electric.d.ts.map +0 -1
- package/dist/icons/lucide-animated/bell.d.ts.map +0 -1
- package/dist/icons/lucide-animated/bot.d.ts.map +0 -1
- package/dist/icons/lucide-animated/box.d.ts.map +0 -1
- package/dist/icons/lucide-animated/check.d.ts.map +0 -1
- package/dist/icons/lucide-animated/circle-check.d.ts.map +0 -1
- package/dist/icons/lucide-animated/delete.d.ts.map +0 -1
- package/dist/icons/lucide-animated/download.d.ts.map +0 -1
- package/dist/icons/lucide-animated/edit-2.d.ts.map +0 -1
- package/dist/icons/lucide-animated/globe.d.ts.map +0 -1
- package/dist/icons/lucide-animated/home.d.ts.map +0 -1
- package/dist/icons/lucide-animated/index.d.ts +0 -38
- package/dist/icons/lucide-animated/index.d.ts.map +0 -1
- package/dist/icons/lucide-animated/layers.d.ts.map +0 -1
- package/dist/icons/lucide-animated/layout-panel-top.d.ts.map +0 -1
- package/dist/icons/lucide-animated/list.d.ts.map +0 -1
- package/dist/icons/lucide-animated/package.d.ts.map +0 -1
- package/dist/icons/lucide-animated/palette.d.ts.map +0 -1
- package/dist/icons/lucide-animated/plus.d.ts.map +0 -1
- package/dist/icons/lucide-animated/refresh-cw.d.ts.map +0 -1
- package/dist/icons/lucide-animated/rocket.d.ts.map +0 -1
- package/dist/icons/lucide-animated/save.d.ts.map +0 -1
- package/dist/icons/lucide-animated/search.d.ts.map +0 -1
- package/dist/icons/lucide-animated/settings.d.ts.map +0 -1
- package/dist/icons/lucide-animated/terminal.d.ts.map +0 -1
- package/dist/icons/lucide-animated/trash-2.d.ts.map +0 -1
- package/dist/icons/lucide-animated/trending-down.d.ts.map +0 -1
- package/dist/icons/lucide-animated/trending-up.d.ts.map +0 -1
- package/dist/icons/lucide-animated/type.d.ts.map +0 -1
- package/dist/icons/lucide-animated/upload.d.ts.map +0 -1
- package/dist/icons/lucide-animated/x.d.ts.map +0 -1
- package/dist/lib/get-strict-context.d.ts +0 -10
- package/dist/lib/get-strict-context.d.ts.map +0 -1
- package/dist/lib/get-strict-context.js +0 -20
- package/dist/lib/utils.d.ts.map +0 -1
- package/src/components/animate-ui/primitives/base/accordion.tsx +0 -179
- package/src/components/animate-ui/primitives/base/alert-dialog.tsx +0 -218
- package/src/components/animate-ui/primitives/base/checkbox.tsx +0 -153
- package/src/components/animate-ui/primitives/base/dialog.tsx +0 -203
- package/src/components/animate-ui/primitives/base/menu.tsx +0 -463
- package/src/components/animate-ui/primitives/base/popover.tsx +0 -167
- package/src/components/animate-ui/primitives/base/progress.tsx +0 -103
- package/src/components/animate-ui/primitives/base/switch.tsx +0 -158
- package/src/components/animate-ui/primitives/base/tabs.tsx +0 -202
- package/src/components/animate-ui/primitives/base/tooltip.tsx +0 -209
- package/src/components/ui/accordion.tsx +0 -9
- package/src/components/ui/alert-dialog.tsx +0 -9
- package/src/components/ui/auto-height.tsx +0 -9
- package/src/components/ui/badge/badge.styles.ts +0 -46
- package/src/components/ui/badge/badge.tsx +0 -52
- package/src/components/ui/badge/badge.types.ts +0 -41
- package/src/components/ui/badge/index.ts +0 -8
- package/src/components/ui/button/button.styles.ts +0 -66
- package/src/components/ui/button/button.tsx +0 -209
- package/src/components/ui/button/button.types.ts +0 -125
- package/src/components/ui/button/index.ts +0 -7
- package/src/components/ui/card.tsx +0 -108
- package/src/components/ui/checkbox.tsx +0 -9
- package/src/components/ui/combobox.tsx +0 -293
- package/src/components/ui/corner-bracket.tsx +0 -85
- package/src/components/ui/counting-number.tsx +0 -9
- package/src/components/ui/dialog.tsx +0 -9
- package/src/components/ui/dropdown-menu.tsx +0 -261
- package/src/components/ui/field.tsx +0 -227
- package/src/components/ui/highlight.tsx +0 -9
- package/src/components/ui/index.ts +0 -43
- package/src/components/ui/input-group.tsx +0 -149
- package/src/components/ui/label.tsx +0 -18
- package/src/components/ui/menu.tsx +0 -9
- package/src/components/ui/morphing-popover/index.ts +0 -10
- package/src/components/ui/morphing-popover/morphing-popover.tsx +0 -183
- package/src/components/ui/popover.tsx +0 -9
- package/src/components/ui/progress.tsx +0 -9
- package/src/components/ui/select.tsx +0 -190
- package/src/components/ui/separator.tsx +0 -25
- package/src/components/ui/slot.tsx +0 -9
- package/src/components/ui/switch.tsx +0 -9
- package/src/components/ui/tabs.tsx +0 -9
- package/src/components/ui/tooltip.tsx +0 -9
- package/src/hooks/index.ts +0 -10
- package/src/hooks/use-is-in-view.tsx +0 -25
- package/src/icons/index.ts +0 -12
- package/src/icons/lucide-animated/index.ts +0 -38
- /package/dist/{components/ui/morphing-popover/morphing-popover.module-CE9GIgKo.css → react-ui/components/MorphingPopover/morphing-popover.module-CgbYV_HS.css} +0 -0
- /package/dist/{icons → react-ui/icons}/index.js +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/activity.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/arrow-down-to-line.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/arrow-up.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/bell-electric.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/bell.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/bot.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/box.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/check.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/circle-check.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/delete.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/download.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/edit-2.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/globe.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/home.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/index.js +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/layers.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/layout-panel-top.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/list.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/package.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/palette.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/plus.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/refresh-cw.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/rocket.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/save.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/search.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/settings.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/terminal.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/trash-2.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/trending-down.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/trending-up.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/type.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/upload.d.ts +0 -0
- /package/dist/{icons → react-ui/icons}/lucide-animated/x.d.ts +0 -0
- /package/src/{components/ui/morphing-popover → react-ui/components/MorphingPopover}/morphing-popover.module.css +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/arrow-down-to-line.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/arrow-up.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/check.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/edit-2.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/globe.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/layers.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/list.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/package.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/palette.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/refresh-cw.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/rocket.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/save.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/terminal.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/trash-2.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/type.tsx +0 -0
- /package/src/{icons → react-ui/icons}/lucide-animated/upload.tsx +0 -0
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Menu component -- animated dropdown/context menu built on base-ui Menu
|
|
5
|
+
* with motion transitions, highlight tracking, and the v0.2.0 slot system.
|
|
6
|
+
*
|
|
7
|
+
* Provides sub-components for triggers, items, checkbox items, radio groups,
|
|
8
|
+
* submenus, keyboard shortcut hints, separators, and animated highlights.
|
|
9
|
+
*
|
|
10
|
+
* @module @mks2508/mks-ui/react/ui/Menu
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Menu>
|
|
15
|
+
* <MenuTrigger>Open Menu</MenuTrigger>
|
|
16
|
+
* <MenuPortal>
|
|
17
|
+
* <MenuPositioner sideOffset={8}>
|
|
18
|
+
* <MenuPopup className="rounded-lg border bg-zinc-900 p-1 shadow-xl">
|
|
19
|
+
* <MenuHighlight className="rounded-md bg-white/10" />
|
|
20
|
+
* <MenuHighlightItem>
|
|
21
|
+
* <MenuItem id="edit">Edit</MenuItem>
|
|
22
|
+
* </MenuHighlightItem>
|
|
23
|
+
* <MenuSeparator className="my-1 border-white/10" />
|
|
24
|
+
* <MenuHighlightItem>
|
|
25
|
+
* <MenuItem id="delete">Delete</MenuItem>
|
|
26
|
+
* </MenuHighlightItem>
|
|
27
|
+
* </MenuPopup>
|
|
28
|
+
* </MenuPositioner>
|
|
29
|
+
* </MenuPortal>
|
|
30
|
+
* </Menu>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
import * as React from 'react';
|
|
35
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
36
|
+
import { AnimatePresence, motion } from 'motion/react';
|
|
37
|
+
|
|
38
|
+
import {
|
|
39
|
+
Highlight,
|
|
40
|
+
HighlightItem,
|
|
41
|
+
} from '@/react-ui/primitives/Highlight';
|
|
42
|
+
import { getStrictContext } from '@/react-ui/lib/get-strict-context';
|
|
43
|
+
import { useControlledState } from '@/react-ui/hooks/State/UseControlledState';
|
|
44
|
+
import { useDataState } from '@/react-ui/hooks/State/UseDataState';
|
|
45
|
+
import { cn } from '@/react-ui/lib/utils';
|
|
46
|
+
import { menuStyles } from './Menu.styles';
|
|
47
|
+
|
|
48
|
+
import type {
|
|
49
|
+
MenuActiveValueContextType,
|
|
50
|
+
MenuContextType,
|
|
51
|
+
IMenuProps,
|
|
52
|
+
IMenuTriggerProps,
|
|
53
|
+
IMenuPortalProps,
|
|
54
|
+
IMenuGroupProps,
|
|
55
|
+
IMenuGroupLabelProps,
|
|
56
|
+
IMenuSubmenuProps,
|
|
57
|
+
IMenuSubmenuTriggerProps,
|
|
58
|
+
IMenuHighlightProps,
|
|
59
|
+
IMenuHighlightItemProps,
|
|
60
|
+
IMenuPositionerProps,
|
|
61
|
+
IMenuPopupProps,
|
|
62
|
+
IMenuItemProps,
|
|
63
|
+
IMenuCheckboxItemProps,
|
|
64
|
+
IMenuCheckboxItemIndicatorProps,
|
|
65
|
+
IMenuRadioGroupProps,
|
|
66
|
+
IMenuRadioItemProps,
|
|
67
|
+
IMenuRadioItemIndicatorProps,
|
|
68
|
+
IMenuShortcutProps,
|
|
69
|
+
IMenuArrowProps,
|
|
70
|
+
IMenuSeparatorProps,
|
|
71
|
+
} from './Menu.types';
|
|
72
|
+
|
|
73
|
+
// ---------------------------------------------------------------------------
|
|
74
|
+
// Context
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
const [MenuActiveValueProvider, useMenuActiveValue] =
|
|
78
|
+
getStrictContext<MenuActiveValueContextType>('MenuActiveValueContext');
|
|
79
|
+
|
|
80
|
+
const [MenuProvider, useMenu] =
|
|
81
|
+
getStrictContext<MenuContextType>('MenuContext');
|
|
82
|
+
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// Menu (Root)
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Root Menu component -- provides open/close state and highlighted-value context.
|
|
89
|
+
* Wraps base-ui Menu.Root with controlled state management.
|
|
90
|
+
*
|
|
91
|
+
* @param open - Controlled open state
|
|
92
|
+
* @param defaultOpen - Uncontrolled initial open state
|
|
93
|
+
* @param onOpenChange - Callback when open state changes
|
|
94
|
+
* @param slots - Partial class overrides per slot
|
|
95
|
+
* @param config - Menu behavior / animation configuration
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```tsx
|
|
99
|
+
* <Menu slots={{ popup: 'bg-zinc-900' }}>
|
|
100
|
+
* <MenuTrigger>Actions</MenuTrigger>
|
|
101
|
+
* <MenuPortal>...</MenuPortal>
|
|
102
|
+
* </Menu>
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
function Menu({ slots, config, ...props }: IMenuProps) {
|
|
106
|
+
const [isOpen, setIsOpen] = useControlledState({
|
|
107
|
+
value: props?.open,
|
|
108
|
+
defaultValue: props?.defaultOpen,
|
|
109
|
+
onChange: props?.onOpenChange,
|
|
110
|
+
});
|
|
111
|
+
const [highlightedValue, setHighlightedValue] = React.useState<string | null>(
|
|
112
|
+
null,
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<MenuActiveValueProvider value={{ highlightedValue, setHighlightedValue }}>
|
|
117
|
+
<MenuProvider value={{ isOpen, setIsOpen }}>
|
|
118
|
+
<MenuPrimitive.Root
|
|
119
|
+
data-slot="menu"
|
|
120
|
+
{...props}
|
|
121
|
+
onOpenChange={setIsOpen}
|
|
122
|
+
/>
|
|
123
|
+
</MenuProvider>
|
|
124
|
+
</MenuActiveValueProvider>
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ---------------------------------------------------------------------------
|
|
129
|
+
// MenuTrigger
|
|
130
|
+
// ---------------------------------------------------------------------------
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* MenuTrigger -- the interactive element that toggles the menu open/closed.
|
|
134
|
+
* Renders a base-ui Menu.Trigger with the `trigger` slot classes.
|
|
135
|
+
*
|
|
136
|
+
* @param slots - Partial class overrides per slot
|
|
137
|
+
* @param className - Additional class names
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```tsx
|
|
141
|
+
* <MenuTrigger className="rounded-md px-3 py-1.5">
|
|
142
|
+
* Open Menu
|
|
143
|
+
* </MenuTrigger>
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
function MenuTrigger({ slots, className, ...props }: IMenuTriggerProps) {
|
|
147
|
+
return (
|
|
148
|
+
<MenuPrimitive.Trigger
|
|
149
|
+
data-slot="menu-trigger"
|
|
150
|
+
className={cn(menuStyles.trigger, slots?.trigger, className)}
|
|
151
|
+
{...props}
|
|
152
|
+
/>
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
// MenuPortal
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* MenuPortal -- wraps menu content in a portal with AnimatePresence.
|
|
162
|
+
* Internally keeps the portal mounted and uses AnimatePresence for
|
|
163
|
+
* smooth enter/exit transitions of children.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```tsx
|
|
167
|
+
* <MenuPortal>
|
|
168
|
+
* <MenuPositioner>
|
|
169
|
+
* <MenuPopup>...</MenuPopup>
|
|
170
|
+
* </MenuPositioner>
|
|
171
|
+
* </MenuPortal>
|
|
172
|
+
* ```
|
|
173
|
+
*/
|
|
174
|
+
function MenuPortal(props: IMenuPortalProps) {
|
|
175
|
+
const { isOpen } = useMenu();
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<AnimatePresence>
|
|
179
|
+
{isOpen && (
|
|
180
|
+
<MenuPrimitive.Portal keepMounted data-slot="menu-portal" {...props} />
|
|
181
|
+
)}
|
|
182
|
+
</AnimatePresence>
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
// ---------------------------------------------------------------------------
|
|
187
|
+
// MenuGroup
|
|
188
|
+
// ---------------------------------------------------------------------------
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* MenuGroup -- logical grouping of related menu items.
|
|
192
|
+
* Renders a base-ui Menu.Group with the `group` slot classes.
|
|
193
|
+
*
|
|
194
|
+
* @param slots - Partial class overrides per slot
|
|
195
|
+
* @param className - Additional class names
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```tsx
|
|
199
|
+
* <MenuGroup>
|
|
200
|
+
* <MenuGroupLabel>Editing</MenuGroupLabel>
|
|
201
|
+
* <MenuItem id="cut">Cut</MenuItem>
|
|
202
|
+
* <MenuItem id="copy">Copy</MenuItem>
|
|
203
|
+
* </MenuGroup>
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
function MenuGroup({ slots, className, ...props }: IMenuGroupProps) {
|
|
207
|
+
return (
|
|
208
|
+
<MenuPrimitive.Group
|
|
209
|
+
data-slot="menu-group"
|
|
210
|
+
className={cn(menuStyles.group, slots?.group, className)}
|
|
211
|
+
{...props}
|
|
212
|
+
/>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// ---------------------------------------------------------------------------
|
|
217
|
+
// MenuGroupLabel
|
|
218
|
+
// ---------------------------------------------------------------------------
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* MenuGroupLabel -- heading text for a MenuGroup.
|
|
222
|
+
* Renders a base-ui Menu.GroupLabel with the `groupLabel` slot classes.
|
|
223
|
+
*
|
|
224
|
+
* @param slots - Partial class overrides per slot
|
|
225
|
+
* @param className - Additional class names
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```tsx
|
|
229
|
+
* <MenuGroupLabel className="text-xs font-medium uppercase tracking-wider">
|
|
230
|
+
* Navigation
|
|
231
|
+
* </MenuGroupLabel>
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
function MenuGroupLabel({ slots, className, ...props }: IMenuGroupLabelProps) {
|
|
235
|
+
return (
|
|
236
|
+
<MenuPrimitive.GroupLabel
|
|
237
|
+
data-slot="menu-group-label"
|
|
238
|
+
className={cn(menuStyles.groupLabel, slots?.groupLabel, className)}
|
|
239
|
+
{...props}
|
|
240
|
+
/>
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// ---------------------------------------------------------------------------
|
|
245
|
+
// MenuSubmenu
|
|
246
|
+
// ---------------------------------------------------------------------------
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* MenuSubmenu -- a nested sub-menu with its own open/close state.
|
|
250
|
+
* Wraps base-ui Menu.SubmenuRoot and provides a scoped MenuProvider.
|
|
251
|
+
*
|
|
252
|
+
* @param open - Controlled open state
|
|
253
|
+
* @param defaultOpen - Uncontrolled initial open state
|
|
254
|
+
* @param onOpenChange - Callback when open state changes
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```tsx
|
|
258
|
+
* <MenuSubmenu>
|
|
259
|
+
* <MenuSubmenuTrigger>More Actions</MenuSubmenuTrigger>
|
|
260
|
+
* <MenuPortal>
|
|
261
|
+
* <MenuPositioner>
|
|
262
|
+
* <MenuPopup>
|
|
263
|
+
* <MenuItem id="archive">Archive</MenuItem>
|
|
264
|
+
* </MenuPopup>
|
|
265
|
+
* </MenuPositioner>
|
|
266
|
+
* </MenuPortal>
|
|
267
|
+
* </MenuSubmenu>
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
function MenuSubmenu(props: IMenuSubmenuProps) {
|
|
271
|
+
const [isOpen, setIsOpen] = useControlledState({
|
|
272
|
+
value: props?.open,
|
|
273
|
+
defaultValue: props?.defaultOpen,
|
|
274
|
+
onChange: props?.onOpenChange,
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
return (
|
|
278
|
+
<MenuProvider value={{ isOpen, setIsOpen }}>
|
|
279
|
+
<MenuPrimitive.SubmenuRoot
|
|
280
|
+
data-slot="menu-submenu"
|
|
281
|
+
{...props}
|
|
282
|
+
onOpenChange={setIsOpen}
|
|
283
|
+
/>
|
|
284
|
+
</MenuProvider>
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// ---------------------------------------------------------------------------
|
|
289
|
+
// MenuSubmenuTrigger
|
|
290
|
+
// ---------------------------------------------------------------------------
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* MenuSubmenuTrigger -- the item that opens a submenu on hover/focus.
|
|
294
|
+
* Tracks its own highlighted state via useDataState for highlight integration.
|
|
295
|
+
*
|
|
296
|
+
* @param label - Accessible label for the trigger
|
|
297
|
+
* @param id - Unique identifier used for highlight tracking
|
|
298
|
+
* @param disabled - Whether the trigger is disabled
|
|
299
|
+
* @param slots - Partial class overrides per slot
|
|
300
|
+
* @param className - Additional class names
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```tsx
|
|
304
|
+
* <MenuSubmenuTrigger id="more" label="More actions">
|
|
305
|
+
* More...
|
|
306
|
+
* </MenuSubmenuTrigger>
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
function MenuSubmenuTrigger({
|
|
310
|
+
label,
|
|
311
|
+
id,
|
|
312
|
+
nativeButton,
|
|
313
|
+
slots,
|
|
314
|
+
className,
|
|
315
|
+
...props
|
|
316
|
+
}: IMenuSubmenuTriggerProps) {
|
|
317
|
+
const { setHighlightedValue } = useMenuActiveValue();
|
|
318
|
+
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
319
|
+
'highlighted',
|
|
320
|
+
undefined,
|
|
321
|
+
(value) => {
|
|
322
|
+
if (value === true) {
|
|
323
|
+
const el = highlightedRef.current;
|
|
324
|
+
const v = el?.dataset.value || el?.id || null;
|
|
325
|
+
if (v) setHighlightedValue(v);
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
);
|
|
329
|
+
|
|
330
|
+
return (
|
|
331
|
+
<MenuPrimitive.SubmenuTrigger
|
|
332
|
+
ref={highlightedRef}
|
|
333
|
+
label={label}
|
|
334
|
+
id={id}
|
|
335
|
+
nativeButton={nativeButton}
|
|
336
|
+
data-slot="menu-submenu-trigger"
|
|
337
|
+
className={cn(menuStyles.submenuTrigger, slots?.submenuTrigger, className)}
|
|
338
|
+
{...(props as any)}
|
|
339
|
+
/>
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// ---------------------------------------------------------------------------
|
|
344
|
+
// MenuHighlight
|
|
345
|
+
// ---------------------------------------------------------------------------
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* MenuHighlight -- animated background that follows the currently
|
|
349
|
+
* focused/highlighted menu item. Wraps the Highlight primitive with
|
|
350
|
+
* menu-specific defaults (spring transition, no click activation).
|
|
351
|
+
*
|
|
352
|
+
* @param transition - Motion transition config (default: spring 350/35)
|
|
353
|
+
* @param animateOnHover - Whether to activate on hover
|
|
354
|
+
* @param slots - Partial class overrides per slot
|
|
355
|
+
* @param className - Additional class names
|
|
356
|
+
*
|
|
357
|
+
* @example
|
|
358
|
+
* ```tsx
|
|
359
|
+
* <MenuHighlight className="rounded-md bg-white/10" />
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
function MenuHighlight({
|
|
363
|
+
transition = { type: 'spring', stiffness: 350, damping: 35 },
|
|
364
|
+
slots,
|
|
365
|
+
className,
|
|
366
|
+
...props
|
|
367
|
+
}: IMenuHighlightProps) {
|
|
368
|
+
const { highlightedValue } = useMenuActiveValue();
|
|
369
|
+
|
|
370
|
+
return (
|
|
371
|
+
<Highlight
|
|
372
|
+
data-slot="menu-highlight"
|
|
373
|
+
click={false}
|
|
374
|
+
controlledItems
|
|
375
|
+
transition={transition}
|
|
376
|
+
value={highlightedValue}
|
|
377
|
+
className={cn(menuStyles.highlight, slots?.highlight, className)}
|
|
378
|
+
{...props}
|
|
379
|
+
/>
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// ---------------------------------------------------------------------------
|
|
384
|
+
// MenuHighlightItem
|
|
385
|
+
// ---------------------------------------------------------------------------
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* MenuHighlightItem -- wraps a MenuItem for highlight position tracking.
|
|
389
|
+
* Must be placed inside a MenuHighlight context.
|
|
390
|
+
*
|
|
391
|
+
* @param slots - Partial class overrides per slot
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```tsx
|
|
395
|
+
* <MenuHighlight className="rounded bg-white/10">
|
|
396
|
+
* <MenuHighlightItem>
|
|
397
|
+
* <MenuItem id="edit">Edit</MenuItem>
|
|
398
|
+
* </MenuHighlightItem>
|
|
399
|
+
* </MenuHighlight>
|
|
400
|
+
* ```
|
|
401
|
+
*/
|
|
402
|
+
function MenuHighlightItem({ slots, ...props }: IMenuHighlightItemProps) {
|
|
403
|
+
return <HighlightItem data-slot="menu-highlight-item" {...props} />;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// ---------------------------------------------------------------------------
|
|
407
|
+
// MenuPositioner
|
|
408
|
+
// ---------------------------------------------------------------------------
|
|
409
|
+
|
|
410
|
+
/**
|
|
411
|
+
* MenuPositioner -- positions the popup relative to the trigger element.
|
|
412
|
+
* Thin wrapper over base-ui Menu.Positioner.
|
|
413
|
+
*
|
|
414
|
+
* @param sideOffset - Gap between trigger and popup
|
|
415
|
+
* @param align - Alignment along the trigger edge
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```tsx
|
|
419
|
+
* <MenuPositioner sideOffset={8} align="start">
|
|
420
|
+
* <MenuPopup>...</MenuPopup>
|
|
421
|
+
* </MenuPositioner>
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
function MenuPositioner(props: IMenuPositionerProps) {
|
|
425
|
+
return <MenuPrimitive.Positioner data-slot="menu-positioner" {...props} />;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
// ---------------------------------------------------------------------------
|
|
429
|
+
// MenuPopup
|
|
430
|
+
// ---------------------------------------------------------------------------
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* MenuPopup -- the visible flyout surface containing menu items.
|
|
434
|
+
* Uses Motion for animated entrance (scale + opacity) and exit.
|
|
435
|
+
*
|
|
436
|
+
* @param transition - Motion transition config (default: 0.2s duration)
|
|
437
|
+
* @param slots - Partial class overrides per slot
|
|
438
|
+
* @param className - Additional class names
|
|
439
|
+
* @param style - Inline styles merged with will-change hint
|
|
440
|
+
*
|
|
441
|
+
* @example
|
|
442
|
+
* ```tsx
|
|
443
|
+
* <MenuPopup className="min-w-[180px] rounded-lg border bg-zinc-900 p-1 shadow-xl">
|
|
444
|
+
* <MenuItem id="edit">Edit</MenuItem>
|
|
445
|
+
* <MenuItem id="delete">Delete</MenuItem>
|
|
446
|
+
* </MenuPopup>
|
|
447
|
+
* ```
|
|
448
|
+
*/
|
|
449
|
+
function MenuPopup({
|
|
450
|
+
finalFocus,
|
|
451
|
+
id,
|
|
452
|
+
transition = { duration: 0.2 },
|
|
453
|
+
style,
|
|
454
|
+
slots,
|
|
455
|
+
className,
|
|
456
|
+
...props
|
|
457
|
+
}: IMenuPopupProps) {
|
|
458
|
+
return (
|
|
459
|
+
<MenuPrimitive.Popup
|
|
460
|
+
finalFocus={finalFocus}
|
|
461
|
+
id={id}
|
|
462
|
+
render={
|
|
463
|
+
<motion.div
|
|
464
|
+
key="menu-popup"
|
|
465
|
+
data-slot="menu-popup"
|
|
466
|
+
initial={{ opacity: 0, scale: 0.95 }}
|
|
467
|
+
animate={{ opacity: 1, scale: 1 }}
|
|
468
|
+
exit={{ opacity: 0, scale: 0.95 }}
|
|
469
|
+
transition={transition}
|
|
470
|
+
style={{ willChange: 'opacity, transform', ...style }}
|
|
471
|
+
className={cn(menuStyles.popup, slots?.popup, className)}
|
|
472
|
+
{...(props as any)}
|
|
473
|
+
/>
|
|
474
|
+
}
|
|
475
|
+
/>
|
|
476
|
+
);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
// ---------------------------------------------------------------------------
|
|
480
|
+
// MenuItem
|
|
481
|
+
// ---------------------------------------------------------------------------
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* MenuItem -- a single actionable row within the menu.
|
|
485
|
+
* Tracks highlight state via useDataState for animated highlight integration.
|
|
486
|
+
*
|
|
487
|
+
* @param id - Unique identifier, also used as highlight tracking value
|
|
488
|
+
* @param label - Accessible label
|
|
489
|
+
* @param disabled - Whether the item is disabled
|
|
490
|
+
* @param closeOnClick - Close menu when this item is clicked
|
|
491
|
+
* @param slots - Partial class overrides per slot
|
|
492
|
+
* @param className - Additional class names
|
|
493
|
+
*
|
|
494
|
+
* @example
|
|
495
|
+
* ```tsx
|
|
496
|
+
* <MenuItem id="edit" label="Edit document">
|
|
497
|
+
* <PencilIcon className="mr-2 size-4" />
|
|
498
|
+
* Edit
|
|
499
|
+
* <MenuShortcut>Ctrl+E</MenuShortcut>
|
|
500
|
+
* </MenuItem>
|
|
501
|
+
* ```
|
|
502
|
+
*/
|
|
503
|
+
function MenuItem({
|
|
504
|
+
disabled,
|
|
505
|
+
label,
|
|
506
|
+
closeOnClick,
|
|
507
|
+
nativeButton,
|
|
508
|
+
id,
|
|
509
|
+
slots,
|
|
510
|
+
className,
|
|
511
|
+
...props
|
|
512
|
+
}: IMenuItemProps) {
|
|
513
|
+
const { setHighlightedValue } = useMenuActiveValue();
|
|
514
|
+
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
515
|
+
'highlighted',
|
|
516
|
+
undefined,
|
|
517
|
+
(value) => {
|
|
518
|
+
if (value === true) {
|
|
519
|
+
const el = highlightedRef.current;
|
|
520
|
+
const v = el?.dataset.value || el?.id || null;
|
|
521
|
+
if (v) setHighlightedValue(v);
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
);
|
|
525
|
+
|
|
526
|
+
return (
|
|
527
|
+
<MenuPrimitive.Item
|
|
528
|
+
ref={highlightedRef}
|
|
529
|
+
label={label}
|
|
530
|
+
closeOnClick={closeOnClick}
|
|
531
|
+
nativeButton={nativeButton}
|
|
532
|
+
disabled={disabled}
|
|
533
|
+
id={id}
|
|
534
|
+
data-slot="menu-item"
|
|
535
|
+
className={cn(menuStyles.item, slots?.item, className)}
|
|
536
|
+
{...(props as any)}
|
|
537
|
+
/>
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// ---------------------------------------------------------------------------
|
|
542
|
+
// MenuCheckboxItem
|
|
543
|
+
// ---------------------------------------------------------------------------
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* MenuCheckboxItem -- a toggleable checkbox item within the menu.
|
|
547
|
+
* Tracks highlight state for animated highlight integration.
|
|
548
|
+
*
|
|
549
|
+
* @param checked - Controlled checked state
|
|
550
|
+
* @param defaultChecked - Uncontrolled initial checked state
|
|
551
|
+
* @param onCheckedChange - Callback when checked state changes
|
|
552
|
+
* @param disabled - Whether the item is disabled
|
|
553
|
+
* @param slots - Partial class overrides per slot
|
|
554
|
+
* @param className - Additional class names
|
|
555
|
+
*
|
|
556
|
+
* @example
|
|
557
|
+
* ```tsx
|
|
558
|
+
* <MenuCheckboxItem checked={showGrid} onCheckedChange={setShowGrid}>
|
|
559
|
+
* <MenuCheckboxItemIndicator>
|
|
560
|
+
* <CheckIcon />
|
|
561
|
+
* </MenuCheckboxItemIndicator>
|
|
562
|
+
* Show Grid
|
|
563
|
+
* </MenuCheckboxItem>
|
|
564
|
+
* ```
|
|
565
|
+
*/
|
|
566
|
+
function MenuCheckboxItem({
|
|
567
|
+
label,
|
|
568
|
+
defaultChecked,
|
|
569
|
+
checked,
|
|
570
|
+
onCheckedChange,
|
|
571
|
+
disabled,
|
|
572
|
+
closeOnClick,
|
|
573
|
+
nativeButton,
|
|
574
|
+
id,
|
|
575
|
+
slots,
|
|
576
|
+
className,
|
|
577
|
+
...props
|
|
578
|
+
}: IMenuCheckboxItemProps) {
|
|
579
|
+
const { setHighlightedValue } = useMenuActiveValue();
|
|
580
|
+
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
581
|
+
'highlighted',
|
|
582
|
+
undefined,
|
|
583
|
+
(value) => {
|
|
584
|
+
if (value === true) {
|
|
585
|
+
const el = highlightedRef.current;
|
|
586
|
+
const v = el?.dataset.value || el?.id || null;
|
|
587
|
+
if (v) setHighlightedValue(v);
|
|
588
|
+
}
|
|
589
|
+
},
|
|
590
|
+
);
|
|
591
|
+
|
|
592
|
+
return (
|
|
593
|
+
<MenuPrimitive.CheckboxItem
|
|
594
|
+
ref={highlightedRef}
|
|
595
|
+
label={label}
|
|
596
|
+
checked={checked}
|
|
597
|
+
defaultChecked={defaultChecked}
|
|
598
|
+
onCheckedChange={onCheckedChange}
|
|
599
|
+
disabled={disabled}
|
|
600
|
+
closeOnClick={closeOnClick}
|
|
601
|
+
nativeButton={nativeButton}
|
|
602
|
+
id={id}
|
|
603
|
+
data-slot="menu-checkbox-item"
|
|
604
|
+
className={cn(menuStyles.checkboxItem, slots?.checkboxItem, className)}
|
|
605
|
+
{...props}
|
|
606
|
+
/>
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
// ---------------------------------------------------------------------------
|
|
611
|
+
// MenuCheckboxItemIndicator
|
|
612
|
+
// ---------------------------------------------------------------------------
|
|
613
|
+
|
|
614
|
+
/**
|
|
615
|
+
* MenuCheckboxItemIndicator -- the visual check/indeterminate icon.
|
|
616
|
+
* Renders via a motion.div for animated enter/exit transitions.
|
|
617
|
+
*
|
|
618
|
+
* @param keepMounted - Keep in DOM when unchecked (for exit animations)
|
|
619
|
+
*
|
|
620
|
+
* @example
|
|
621
|
+
* ```tsx
|
|
622
|
+
* <MenuCheckboxItemIndicator
|
|
623
|
+
* initial={{ opacity: 0, scale: 0.8 }}
|
|
624
|
+
* animate={{ opacity: 1, scale: 1 }}
|
|
625
|
+
* >
|
|
626
|
+
* <CheckIcon className="size-4" />
|
|
627
|
+
* </MenuCheckboxItemIndicator>
|
|
628
|
+
* ```
|
|
629
|
+
*/
|
|
630
|
+
function MenuCheckboxItemIndicator({
|
|
631
|
+
keepMounted,
|
|
632
|
+
...props
|
|
633
|
+
}: IMenuCheckboxItemIndicatorProps) {
|
|
634
|
+
return (
|
|
635
|
+
<MenuPrimitive.CheckboxItemIndicator
|
|
636
|
+
data-slot="menu-checkbox-item-indicator"
|
|
637
|
+
keepMounted={keepMounted}
|
|
638
|
+
render={
|
|
639
|
+
<motion.div data-slot="menu-checkbox-item-indicator" {...(props as any)} />
|
|
640
|
+
}
|
|
641
|
+
/>
|
|
642
|
+
);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// ---------------------------------------------------------------------------
|
|
646
|
+
// MenuRadioGroup
|
|
647
|
+
// ---------------------------------------------------------------------------
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* MenuRadioGroup -- groups radio items for single-selection within a menu.
|
|
651
|
+
* Wraps base-ui Menu.RadioGroup.
|
|
652
|
+
*
|
|
653
|
+
* @param value - Controlled selected value
|
|
654
|
+
* @param defaultValue - Uncontrolled initial selected value
|
|
655
|
+
* @param onValueChange - Callback when selection changes
|
|
656
|
+
*
|
|
657
|
+
* @example
|
|
658
|
+
* ```tsx
|
|
659
|
+
* <MenuRadioGroup value={sortBy} onValueChange={setSortBy}>
|
|
660
|
+
* <MenuRadioItem value="name">Name</MenuRadioItem>
|
|
661
|
+
* <MenuRadioItem value="date">Date</MenuRadioItem>
|
|
662
|
+
* <MenuRadioItem value="size">Size</MenuRadioItem>
|
|
663
|
+
* </MenuRadioGroup>
|
|
664
|
+
* ```
|
|
665
|
+
*/
|
|
666
|
+
function MenuRadioGroup(props: IMenuRadioGroupProps) {
|
|
667
|
+
return <MenuPrimitive.RadioGroup data-slot="menu-radio-group" {...props} />;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
// ---------------------------------------------------------------------------
|
|
671
|
+
// MenuRadioItem
|
|
672
|
+
// ---------------------------------------------------------------------------
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* MenuRadioItem -- a single option within a MenuRadioGroup.
|
|
676
|
+
* Tracks highlight state for animated highlight integration.
|
|
677
|
+
*
|
|
678
|
+
* @param value - The value this item represents
|
|
679
|
+
* @param disabled - Whether the item is disabled
|
|
680
|
+
* @param label - Accessible label
|
|
681
|
+
* @param slots - Partial class overrides per slot
|
|
682
|
+
* @param className - Additional class names
|
|
683
|
+
*
|
|
684
|
+
* @example
|
|
685
|
+
* ```tsx
|
|
686
|
+
* <MenuRadioItem value="name">
|
|
687
|
+
* <MenuRadioItemIndicator>
|
|
688
|
+
* <DotIcon />
|
|
689
|
+
* </MenuRadioItemIndicator>
|
|
690
|
+
* Sort by Name
|
|
691
|
+
* </MenuRadioItem>
|
|
692
|
+
* ```
|
|
693
|
+
*/
|
|
694
|
+
function MenuRadioItem({
|
|
695
|
+
value,
|
|
696
|
+
disabled,
|
|
697
|
+
label,
|
|
698
|
+
closeOnClick,
|
|
699
|
+
nativeButton,
|
|
700
|
+
id,
|
|
701
|
+
slots,
|
|
702
|
+
className,
|
|
703
|
+
...props
|
|
704
|
+
}: IMenuRadioItemProps) {
|
|
705
|
+
const { setHighlightedValue } = useMenuActiveValue();
|
|
706
|
+
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
707
|
+
'highlighted',
|
|
708
|
+
undefined,
|
|
709
|
+
(value) => {
|
|
710
|
+
if (value === true) {
|
|
711
|
+
const el = highlightedRef.current;
|
|
712
|
+
const v = el?.dataset.value || el?.id || null;
|
|
713
|
+
if (v) setHighlightedValue(v);
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
);
|
|
717
|
+
|
|
718
|
+
return (
|
|
719
|
+
<MenuPrimitive.RadioItem
|
|
720
|
+
ref={highlightedRef}
|
|
721
|
+
value={value}
|
|
722
|
+
disabled={disabled}
|
|
723
|
+
label={label}
|
|
724
|
+
closeOnClick={closeOnClick}
|
|
725
|
+
nativeButton={nativeButton}
|
|
726
|
+
id={id}
|
|
727
|
+
data-slot="menu-radio-item"
|
|
728
|
+
className={cn(menuStyles.radioItem, slots?.radioItem, className)}
|
|
729
|
+
{...props}
|
|
730
|
+
/>
|
|
731
|
+
);
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
// ---------------------------------------------------------------------------
|
|
735
|
+
// MenuRadioItemIndicator
|
|
736
|
+
// ---------------------------------------------------------------------------
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* MenuRadioItemIndicator -- the selection dot/icon for a radio item.
|
|
740
|
+
* Renders via a motion.div for animated enter/exit transitions.
|
|
741
|
+
*
|
|
742
|
+
* @param keepMounted - Keep in DOM when unselected (for exit animations)
|
|
743
|
+
*
|
|
744
|
+
* @example
|
|
745
|
+
* ```tsx
|
|
746
|
+
* <MenuRadioItemIndicator
|
|
747
|
+
* initial={{ opacity: 0 }}
|
|
748
|
+
* animate={{ opacity: 1 }}
|
|
749
|
+
* >
|
|
750
|
+
* <DotFilledIcon className="size-4" />
|
|
751
|
+
* </MenuRadioItemIndicator>
|
|
752
|
+
* ```
|
|
753
|
+
*/
|
|
754
|
+
function MenuRadioItemIndicator({
|
|
755
|
+
keepMounted,
|
|
756
|
+
...props
|
|
757
|
+
}: IMenuRadioItemIndicatorProps) {
|
|
758
|
+
return (
|
|
759
|
+
<MenuPrimitive.RadioItemIndicator
|
|
760
|
+
data-slot="menu-radio-item-indicator"
|
|
761
|
+
keepMounted={keepMounted}
|
|
762
|
+
render={<motion.div data-slot="menu-radio-item-indicator" {...(props as any)} />}
|
|
763
|
+
/>
|
|
764
|
+
);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
// ---------------------------------------------------------------------------
|
|
768
|
+
// MenuShortcut
|
|
769
|
+
// ---------------------------------------------------------------------------
|
|
770
|
+
|
|
771
|
+
/**
|
|
772
|
+
* MenuShortcut -- displays a keyboard shortcut hint aligned to the right.
|
|
773
|
+
* Renders a plain `<span>` with the `shortcut` slot classes.
|
|
774
|
+
*
|
|
775
|
+
* @param slots - Partial class overrides per slot
|
|
776
|
+
* @param className - Additional class names
|
|
777
|
+
*
|
|
778
|
+
* @example
|
|
779
|
+
* ```tsx
|
|
780
|
+
* <MenuItem id="copy">
|
|
781
|
+
* Copy
|
|
782
|
+
* <MenuShortcut>Ctrl+C</MenuShortcut>
|
|
783
|
+
* </MenuItem>
|
|
784
|
+
* ```
|
|
785
|
+
*/
|
|
786
|
+
function MenuShortcut({ slots, className, ...props }: IMenuShortcutProps) {
|
|
787
|
+
return (
|
|
788
|
+
<span
|
|
789
|
+
data-slot="menu-shortcut"
|
|
790
|
+
className={cn(menuStyles.shortcut, slots?.shortcut, className)}
|
|
791
|
+
{...props}
|
|
792
|
+
/>
|
|
793
|
+
);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// ---------------------------------------------------------------------------
|
|
797
|
+
// MenuArrow
|
|
798
|
+
// ---------------------------------------------------------------------------
|
|
799
|
+
|
|
800
|
+
/**
|
|
801
|
+
* MenuArrow -- the directional caret/arrow on the popup edge.
|
|
802
|
+
* Wraps base-ui Menu.Arrow.
|
|
803
|
+
*
|
|
804
|
+
* @example
|
|
805
|
+
* ```tsx
|
|
806
|
+
* <MenuPopup>
|
|
807
|
+
* <MenuArrow className="fill-zinc-800" />
|
|
808
|
+
* <MenuItem id="edit">Edit</MenuItem>
|
|
809
|
+
* </MenuPopup>
|
|
810
|
+
* ```
|
|
811
|
+
*/
|
|
812
|
+
function MenuArrow(props: IMenuArrowProps) {
|
|
813
|
+
return <MenuPrimitive.Arrow data-slot="menu-arrow" {...props} />;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
// ---------------------------------------------------------------------------
|
|
817
|
+
// MenuSeparator
|
|
818
|
+
// ---------------------------------------------------------------------------
|
|
819
|
+
|
|
820
|
+
/**
|
|
821
|
+
* MenuSeparator -- a horizontal divider between menu items or groups.
|
|
822
|
+
* Renders a base-ui Menu.Separator with the `separator` slot classes.
|
|
823
|
+
*
|
|
824
|
+
* @param slots - Partial class overrides per slot
|
|
825
|
+
* @param className - Additional class names
|
|
826
|
+
*
|
|
827
|
+
* @example
|
|
828
|
+
* ```tsx
|
|
829
|
+
* <MenuItem id="edit">Edit</MenuItem>
|
|
830
|
+
* <MenuSeparator className="my-1 h-px bg-white/10" />
|
|
831
|
+
* <MenuItem id="delete">Delete</MenuItem>
|
|
832
|
+
* ```
|
|
833
|
+
*/
|
|
834
|
+
function MenuSeparator({ slots, className, ...props }: IMenuSeparatorProps) {
|
|
835
|
+
return (
|
|
836
|
+
<MenuPrimitive.Separator
|
|
837
|
+
data-slot="menu-separator"
|
|
838
|
+
className={cn(menuStyles.separator, slots?.separator, className)}
|
|
839
|
+
{...props}
|
|
840
|
+
/>
|
|
841
|
+
);
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// ---------------------------------------------------------------------------
|
|
845
|
+
// Exports
|
|
846
|
+
// ---------------------------------------------------------------------------
|
|
847
|
+
|
|
848
|
+
export {
|
|
849
|
+
Menu,
|
|
850
|
+
MenuTrigger,
|
|
851
|
+
MenuPortal,
|
|
852
|
+
MenuPositioner,
|
|
853
|
+
MenuPopup,
|
|
854
|
+
MenuArrow,
|
|
855
|
+
MenuItem,
|
|
856
|
+
MenuCheckboxItem,
|
|
857
|
+
MenuCheckboxItemIndicator,
|
|
858
|
+
MenuRadioGroup,
|
|
859
|
+
MenuRadioItem,
|
|
860
|
+
MenuRadioItemIndicator,
|
|
861
|
+
MenuGroup,
|
|
862
|
+
MenuGroupLabel,
|
|
863
|
+
MenuSeparator,
|
|
864
|
+
MenuShortcut,
|
|
865
|
+
MenuHighlight,
|
|
866
|
+
MenuHighlightItem,
|
|
867
|
+
MenuSubmenu,
|
|
868
|
+
MenuSubmenuTrigger,
|
|
869
|
+
useMenuActiveValue,
|
|
870
|
+
useMenu,
|
|
871
|
+
};
|
|
872
|
+
|
|
873
|
+
// Re-export all types
|
|
874
|
+
export type {
|
|
875
|
+
IMenuProps,
|
|
876
|
+
IMenuTriggerProps,
|
|
877
|
+
IMenuPortalProps,
|
|
878
|
+
IMenuPositionerProps,
|
|
879
|
+
IMenuPopupProps,
|
|
880
|
+
IMenuArrowProps,
|
|
881
|
+
IMenuItemProps,
|
|
882
|
+
IMenuCheckboxItemProps,
|
|
883
|
+
IMenuCheckboxItemIndicatorProps,
|
|
884
|
+
IMenuRadioItemProps,
|
|
885
|
+
IMenuRadioItemIndicatorProps,
|
|
886
|
+
IMenuRadioGroupProps,
|
|
887
|
+
IMenuGroupProps,
|
|
888
|
+
IMenuGroupLabelProps,
|
|
889
|
+
IMenuSeparatorProps,
|
|
890
|
+
IMenuShortcutProps,
|
|
891
|
+
IMenuHighlightProps,
|
|
892
|
+
IMenuHighlightItemProps,
|
|
893
|
+
IMenuSubmenuProps,
|
|
894
|
+
IMenuSubmenuTriggerProps,
|
|
895
|
+
IMenuConfig,
|
|
896
|
+
MenuActiveValueContextType,
|
|
897
|
+
MenuContextType,
|
|
898
|
+
} from './Menu.types';
|
|
899
|
+
|
|
900
|
+
export type { MenuSlot } from './Menu.styles';
|