@mks2508/mks-ui 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -60
- 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 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -56
- package/dist/react/components/MorphingPopover/MorphingPopover.types.d.ts +44 -0
- package/dist/react/components/MorphingPopover/MorphingPopover.types.d.ts.map +1 -0
- package/dist/react/components/MorphingPopover/index.d.ts +46 -0
- package/dist/react/components/MorphingPopover/index.d.ts.map +1 -0
- package/dist/{components/ui/morphing-popover/morphing-popover.js → react/components/MorphingPopover/index.js} +47 -7
- package/dist/react/components/MorphingPopover/morphing-popover.module.js +5 -0
- package/dist/react/components/index.d.ts +9 -0
- package/dist/react/components/index.d.ts.map +1 -0
- package/dist/react/components/index.js +1 -0
- package/dist/react/hooks/Animation/UseAutoHeight.d.ts +30 -0
- package/dist/react/hooks/Animation/UseAutoHeight.d.ts.map +1 -0
- package/dist/{hooks/use-auto-height.js → react/hooks/Animation/UseAutoHeight.js} +16 -2
- package/dist/react/hooks/DOM/UseIsInView.d.ts +32 -0
- package/dist/react/hooks/DOM/UseIsInView.d.ts.map +1 -0
- package/dist/react/hooks/DOM/UseIsInView.js +33 -0
- package/dist/react/hooks/State/UseControlledState.d.ts +31 -0
- package/dist/react/hooks/State/UseControlledState.d.ts.map +1 -0
- package/dist/react/hooks/State/UseControlledState.js +34 -0
- package/dist/react/hooks/State/UseDataState.d.ts +21 -0
- package/dist/react/hooks/State/UseDataState.d.ts.map +1 -0
- package/dist/react/hooks/State/UseDataState.js +63 -0
- package/dist/react/hooks/index.d.ts +14 -0
- package/dist/react/hooks/index.d.ts.map +1 -0
- package/dist/react/hooks/index.js +4 -0
- package/dist/react/icons/index.d.ts +8 -0
- package/dist/react/icons/index.d.ts.map +1 -0
- package/dist/react/icons/lucide-animated/activity.d.ts +11 -0
- package/dist/react/icons/lucide-animated/activity.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/activity.js +2 -2
- package/dist/{icons → react/icons}/lucide-animated/arrow-down-to-line.d.ts +1 -1
- package/dist/react/icons/lucide-animated/arrow-down-to-line.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/arrow-down-to-line.js +1 -1
- package/dist/{icons → react/icons}/lucide-animated/arrow-up.d.ts +1 -1
- package/dist/react/icons/lucide-animated/arrow-up.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/arrow-up.js +1 -1
- package/dist/react/icons/lucide-animated/bell-electric.d.ts +11 -0
- package/dist/react/icons/lucide-animated/bell-electric.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/bell-electric.js +2 -2
- package/dist/react/icons/lucide-animated/bell.d.ts +11 -0
- package/dist/react/icons/lucide-animated/bell.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/bell.js +2 -2
- package/dist/react/icons/lucide-animated/bot.d.ts +11 -0
- package/dist/react/icons/lucide-animated/bot.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/bot.js +2 -2
- package/dist/react/icons/lucide-animated/box.d.ts +11 -0
- package/dist/react/icons/lucide-animated/box.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/box.js +2 -2
- package/dist/react/icons/lucide-animated/check.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/check.js +1 -1
- package/dist/react/icons/lucide-animated/circle-check.d.ts +11 -0
- package/dist/react/icons/lucide-animated/circle-check.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/circle-check.js +2 -2
- package/dist/react/icons/lucide-animated/delete.d.ts +11 -0
- package/dist/react/icons/lucide-animated/delete.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/delete.js +2 -2
- package/dist/react/icons/lucide-animated/download.d.ts +11 -0
- package/dist/react/icons/lucide-animated/download.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/download.js +2 -2
- package/dist/react/icons/lucide-animated/edit-2.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/edit-2.js +1 -1
- package/dist/react/icons/lucide-animated/globe.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/globe.js +1 -1
- package/dist/react/icons/lucide-animated/home.d.ts +11 -0
- package/dist/react/icons/lucide-animated/home.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/home.js +2 -2
- package/dist/react/icons/lucide-animated/index.d.ts +38 -0
- package/dist/react/icons/lucide-animated/index.d.ts.map +1 -0
- package/dist/react/icons/lucide-animated/layers.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/layers.js +1 -1
- package/dist/react/icons/lucide-animated/layout-panel-top.d.ts +11 -0
- package/dist/react/icons/lucide-animated/layout-panel-top.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/layout-panel-top.js +2 -2
- package/dist/{icons → react/icons}/lucide-animated/list.d.ts +1 -1
- package/dist/react/icons/lucide-animated/list.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/list.js +1 -1
- package/dist/react/icons/lucide-animated/package.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/package.js +1 -1
- package/dist/react/icons/lucide-animated/palette.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/palette.js +1 -1
- package/dist/react/icons/lucide-animated/plus.d.ts +11 -0
- package/dist/react/icons/lucide-animated/plus.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/plus.js +2 -2
- package/dist/react/icons/lucide-animated/refresh-cw.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/refresh-cw.js +1 -1
- package/dist/react/icons/lucide-animated/rocket.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/rocket.js +1 -1
- package/dist/react/icons/lucide-animated/save.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/save.js +1 -1
- package/dist/react/icons/lucide-animated/search.d.ts +11 -0
- package/dist/react/icons/lucide-animated/search.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/search.js +2 -2
- package/dist/react/icons/lucide-animated/settings.d.ts +11 -0
- package/dist/react/icons/lucide-animated/settings.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/settings.js +2 -2
- package/dist/{icons → react/icons}/lucide-animated/terminal.d.ts +1 -1
- package/dist/react/icons/lucide-animated/terminal.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/terminal.js +1 -1
- package/dist/react/icons/lucide-animated/trash-2.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/trash-2.js +1 -1
- package/dist/react/icons/lucide-animated/trending-down.d.ts +11 -0
- package/dist/react/icons/lucide-animated/trending-down.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/trending-down.js +2 -2
- package/dist/react/icons/lucide-animated/trending-up.d.ts +11 -0
- package/dist/react/icons/lucide-animated/trending-up.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/trending-up.js +2 -2
- package/dist/react/icons/lucide-animated/type.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/type.js +1 -1
- package/dist/react/icons/lucide-animated/upload.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/upload.js +1 -1
- package/dist/react/icons/lucide-animated/x.d.ts +11 -0
- package/dist/react/icons/lucide-animated/x.d.ts.map +1 -0
- package/dist/{icons → react/icons}/lucide-animated/x.js +2 -2
- package/dist/react/index.d.ts +19 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/lib/get-strict-context.d.ts +30 -0
- package/dist/react/lib/get-strict-context.d.ts.map +1 -0
- package/dist/react/lib/get-strict-context.js +40 -0
- package/dist/react/lib/index.d.ts +8 -0
- package/dist/react/lib/index.d.ts.map +1 -0
- package/dist/react/lib/index.js +2 -0
- package/dist/{lib → react/lib}/utils.d.ts +2 -2
- package/dist/react/lib/utils.d.ts.map +1 -0
- package/dist/{lib → react/lib}/utils.js +3 -3
- package/dist/react/primitives/AutoHeight/index.d.ts +31 -0
- package/dist/react/primitives/AutoHeight/index.d.ts.map +1 -0
- package/dist/react/primitives/AutoHeight/index.js +52 -0
- package/dist/react/primitives/CountingNumber/index.d.ts +44 -0
- package/dist/react/primitives/CountingNumber/index.d.ts.map +1 -0
- package/dist/react/primitives/CountingNumber/index.js +97 -0
- package/dist/react/primitives/Highlight/Highlight.types.d.ts +113 -0
- package/dist/react/primitives/Highlight/Highlight.types.d.ts.map +1 -0
- package/dist/react/primitives/Highlight/index.d.ts +48 -0
- package/dist/react/primitives/Highlight/index.d.ts.map +1 -0
- package/dist/{components/animate-ui/primitives/effects/highlight.js → react/primitives/Highlight/index.js} +45 -5
- package/dist/react/primitives/Slot/index.d.ts +53 -0
- package/dist/react/primitives/Slot/index.d.ts.map +1 -0
- package/dist/{components/animate-ui/primitives/animate/slot.js → react/primitives/Slot/index.js} +27 -4
- package/dist/react/primitives/index.d.ts +12 -0
- package/dist/react/primitives/index.d.ts.map +1 -0
- package/dist/react/primitives/index.js +4 -0
- package/dist/react/ui/Accordion/Accordion.styles.d.ts +47 -0
- package/dist/react/ui/Accordion/Accordion.styles.d.ts.map +1 -0
- package/dist/react/ui/Accordion/Accordion.styles.js +54 -0
- package/dist/react/ui/Accordion/Accordion.types.d.ts +160 -0
- package/dist/react/ui/Accordion/Accordion.types.d.ts.map +1 -0
- package/dist/react/ui/Accordion/index.d.ts +105 -0
- package/dist/react/ui/Accordion/index.d.ts.map +1 -0
- package/dist/react/ui/Accordion/index.js +266 -0
- package/dist/react/ui/AlertDialog/AlertDialog.styles.d.ts +28 -0
- package/dist/react/ui/AlertDialog/AlertDialog.styles.d.ts.map +1 -0
- package/dist/react/ui/AlertDialog/AlertDialog.styles.js +29 -0
- package/dist/react/ui/AlertDialog/AlertDialog.types.d.ts +235 -0
- package/dist/react/ui/AlertDialog/AlertDialog.types.d.ts.map +1 -0
- package/dist/react/ui/AlertDialog/index.d.ts +194 -0
- package/dist/react/ui/AlertDialog/index.d.ts.map +1 -0
- package/dist/react/ui/AlertDialog/index.js +319 -0
- package/dist/react/ui/Badge/Badge.styles.d.ts +16 -0
- package/dist/react/ui/Badge/Badge.styles.d.ts.map +1 -0
- package/dist/{components/ui/badge/badge.styles.js → react/ui/Badge/Badge.styles.js} +2 -6
- package/dist/react/ui/Badge/Badge.types.d.ts +21 -0
- package/dist/react/ui/Badge/Badge.types.d.ts.map +1 -0
- package/dist/react/ui/Badge/index.d.ts +20 -0
- package/dist/react/ui/Badge/index.d.ts.map +1 -0
- package/dist/react/ui/Badge/index.js +34 -0
- package/dist/react/ui/Button/Button.styles.d.ts +21 -0
- package/dist/react/ui/Button/Button.styles.d.ts.map +1 -0
- package/dist/{components/ui/button/button.styles.js → react/ui/Button/Button.styles.js} +3 -9
- package/dist/react/ui/Button/Button.types.d.ts +45 -0
- package/dist/react/ui/Button/Button.types.d.ts.map +1 -0
- package/dist/react/ui/Button/index.d.ts +22 -0
- package/dist/react/ui/Button/index.d.ts.map +1 -0
- package/dist/react/ui/Button/index.js +103 -0
- package/dist/react/ui/Card/Card.styles.d.ts +11 -0
- package/dist/react/ui/Card/Card.styles.d.ts.map +1 -0
- package/dist/react/ui/Card/Card.styles.js +24 -0
- package/dist/react/ui/Card/Card.types.d.ts +22 -0
- package/dist/react/ui/Card/Card.types.d.ts.map +1 -0
- package/dist/react/ui/Card/index.d.ts +36 -0
- package/dist/react/ui/Card/index.d.ts.map +1 -0
- package/dist/react/ui/Card/index.js +82 -0
- package/dist/react/ui/Checkbox/Checkbox.styles.d.ts +25 -0
- package/dist/react/ui/Checkbox/Checkbox.styles.d.ts.map +1 -0
- package/dist/react/ui/Checkbox/Checkbox.styles.js +34 -0
- package/dist/react/ui/Checkbox/Checkbox.types.d.ts +88 -0
- package/dist/react/ui/Checkbox/Checkbox.types.d.ts.map +1 -0
- package/dist/react/ui/Checkbox/index.d.ts +59 -0
- package/dist/react/ui/Checkbox/index.d.ts.map +1 -0
- package/dist/react/ui/Checkbox/index.js +158 -0
- package/dist/react/ui/Combobox/Combobox.styles.d.ts +7 -0
- package/dist/react/ui/Combobox/Combobox.styles.d.ts.map +1 -0
- package/dist/react/ui/Combobox/Combobox.styles.js +17 -0
- package/dist/react/ui/Combobox/Combobox.types.d.ts +49 -0
- package/dist/react/ui/Combobox/Combobox.types.d.ts.map +1 -0
- package/dist/react/ui/Combobox/index.d.ts +60 -0
- package/dist/react/ui/Combobox/index.d.ts.map +1 -0
- package/dist/{components/ui/combobox.js → react/ui/Combobox/index.js} +54 -16
- package/dist/react/ui/CornerBracket/CornerBracket.styles.d.ts +18 -0
- package/dist/react/ui/CornerBracket/CornerBracket.styles.d.ts.map +1 -0
- package/dist/react/ui/CornerBracket/CornerBracket.styles.js +30 -0
- package/dist/react/ui/CornerBracket/CornerBracket.types.d.ts +12 -0
- package/dist/react/ui/CornerBracket/CornerBracket.types.d.ts.map +1 -0
- package/dist/react/ui/CornerBracket/index.d.ts +23 -0
- package/dist/react/ui/CornerBracket/index.d.ts.map +1 -0
- package/dist/react/ui/CornerBracket/index.js +42 -0
- package/dist/react/ui/Dialog/Dialog.styles.d.ts +24 -0
- package/dist/react/ui/Dialog/Dialog.styles.d.ts.map +1 -0
- package/dist/react/ui/Dialog/Dialog.styles.js +29 -0
- package/dist/react/ui/Dialog/Dialog.types.d.ts +221 -0
- package/dist/react/ui/Dialog/Dialog.types.d.ts.map +1 -0
- package/dist/react/ui/Dialog/index.d.ts +138 -0
- package/dist/react/ui/Dialog/index.d.ts.map +1 -0
- package/dist/react/ui/Dialog/index.js +265 -0
- package/dist/react/ui/DropdownMenu/DropdownMenu.styles.d.ts +7 -0
- package/dist/react/ui/DropdownMenu/DropdownMenu.styles.d.ts.map +1 -0
- package/dist/react/ui/DropdownMenu/DropdownMenu.styles.js +16 -0
- package/dist/react/ui/DropdownMenu/DropdownMenu.types.d.ts +50 -0
- package/dist/react/ui/DropdownMenu/DropdownMenu.types.d.ts.map +1 -0
- package/dist/react/ui/DropdownMenu/index.d.ts +50 -0
- package/dist/react/ui/DropdownMenu/index.d.ts.map +1 -0
- package/dist/{components/ui/dropdown-menu.js → react/ui/DropdownMenu/index.js} +44 -14
- package/dist/react/ui/Field/Field.styles.d.ts +11 -0
- package/dist/react/ui/Field/Field.styles.d.ts.map +1 -0
- package/dist/react/ui/Field/Field.styles.js +27 -0
- package/dist/react/ui/Field/Field.types.d.ts +39 -0
- package/dist/react/ui/Field/Field.types.d.ts.map +1 -0
- package/dist/react/ui/Field/index.d.ts +56 -0
- package/dist/react/ui/Field/index.d.ts.map +1 -0
- package/dist/{components/ui/field.js → react/ui/Field/index.js} +55 -23
- package/dist/react/ui/Input/Input.styles.d.ts +7 -0
- package/dist/react/ui/Input/Input.styles.d.ts.map +1 -0
- package/dist/react/ui/Input/Input.styles.js +5 -0
- package/dist/react/ui/Input/Input.types.d.ts +9 -0
- package/dist/react/ui/Input/Input.types.d.ts.map +1 -0
- package/dist/react/ui/Input/index.d.ts +17 -0
- package/dist/react/ui/Input/index.d.ts.map +1 -0
- package/dist/react/ui/Input/index.js +29 -0
- package/dist/react/ui/InputGroup/InputGroup.styles.d.ts +15 -0
- package/dist/react/ui/InputGroup/InputGroup.styles.d.ts.map +1 -0
- package/dist/react/ui/InputGroup/InputGroup.styles.js +34 -0
- package/dist/react/ui/InputGroup/InputGroup.types.d.ts +28 -0
- package/dist/react/ui/InputGroup/InputGroup.types.d.ts.map +1 -0
- package/dist/react/ui/InputGroup/index.d.ts +28 -0
- package/dist/react/ui/InputGroup/index.d.ts.map +1 -0
- package/dist/react/ui/InputGroup/index.js +81 -0
- package/dist/react/ui/Label/Label.styles.d.ts +6 -0
- package/dist/react/ui/Label/Label.styles.d.ts.map +1 -0
- package/dist/react/ui/Label/Label.styles.js +5 -0
- package/dist/react/ui/Label/Label.types.d.ts +8 -0
- package/dist/react/ui/Label/Label.types.d.ts.map +1 -0
- package/dist/react/ui/Label/index.d.ts +14 -0
- package/dist/react/ui/Label/index.d.ts.map +1 -0
- package/dist/react/ui/Label/index.js +24 -0
- package/dist/react/ui/Menu/Menu.styles.d.ts +42 -0
- package/dist/react/ui/Menu/Menu.styles.d.ts.map +1 -0
- package/dist/react/ui/Menu/Menu.styles.js +32 -0
- package/dist/react/ui/Menu/Menu.types.d.ts +328 -0
- package/dist/react/ui/Menu/Menu.types.d.ts.map +1 -0
- package/dist/react/ui/Menu/index.d.ts +354 -0
- package/dist/react/ui/Menu/index.d.ts.map +1 -0
- package/dist/react/ui/Menu/index.js +636 -0
- package/dist/react/ui/Popover/Popover.styles.d.ts +23 -0
- package/dist/react/ui/Popover/Popover.styles.d.ts.map +1 -0
- package/dist/react/ui/Popover/Popover.styles.js +26 -0
- package/dist/react/ui/Popover/Popover.types.d.ts +204 -0
- package/dist/react/ui/Popover/Popover.types.d.ts.map +1 -0
- package/dist/react/ui/Popover/index.d.ts +133 -0
- package/dist/react/ui/Popover/index.d.ts.map +1 -0
- package/dist/react/ui/Popover/index.js +237 -0
- package/dist/react/ui/Progress/Progress.styles.d.ts +28 -0
- package/dist/react/ui/Progress/Progress.styles.d.ts.map +1 -0
- package/dist/react/ui/Progress/Progress.styles.js +30 -0
- package/dist/react/ui/Progress/Progress.types.d.ts +148 -0
- package/dist/react/ui/Progress/Progress.types.d.ts.map +1 -0
- package/dist/react/ui/Progress/index.d.ts +111 -0
- package/dist/react/ui/Progress/index.d.ts.map +1 -0
- package/dist/react/ui/Progress/index.js +170 -0
- package/dist/react/ui/Select/Select.styles.d.ts +7 -0
- package/dist/react/ui/Select/Select.styles.d.ts.map +1 -0
- package/dist/react/ui/Select/Select.styles.js +15 -0
- package/dist/react/ui/Select/Select.types.d.ts +28 -0
- package/dist/react/ui/Select/Select.types.d.ts.map +1 -0
- package/dist/react/ui/Select/index.d.ts +38 -0
- package/dist/react/ui/Select/index.d.ts.map +1 -0
- package/dist/{components/ui/select.js → react/ui/Select/index.js} +35 -13
- package/dist/react/ui/Separator/Separator.styles.d.ts +6 -0
- package/dist/react/ui/Separator/Separator.styles.d.ts.map +1 -0
- package/dist/react/ui/Separator/Separator.styles.js +5 -0
- package/dist/react/ui/Separator/Separator.types.d.ts +9 -0
- package/dist/react/ui/Separator/Separator.types.d.ts.map +1 -0
- package/dist/react/ui/Separator/index.d.ts +16 -0
- package/dist/react/ui/Separator/index.d.ts.map +1 -0
- package/dist/react/ui/Separator/index.js +29 -0
- package/dist/react/ui/Switch/Switch.styles.d.ts +26 -0
- package/dist/react/ui/Switch/Switch.styles.d.ts.map +1 -0
- package/dist/react/ui/Switch/Switch.styles.js +41 -0
- package/dist/react/ui/Switch/Switch.types.d.ts +130 -0
- package/dist/react/ui/Switch/Switch.types.d.ts.map +1 -0
- package/dist/react/ui/Switch/index.d.ts +79 -0
- package/dist/react/ui/Switch/index.d.ts.map +1 -0
- package/dist/react/ui/Switch/index.js +199 -0
- package/dist/react/ui/Tabs/Tabs.styles.d.ts +43 -0
- package/dist/react/ui/Tabs/Tabs.styles.d.ts.map +1 -0
- package/dist/react/ui/Tabs/Tabs.styles.js +26 -0
- package/dist/react/ui/Tabs/Tabs.types.d.ts +201 -0
- package/dist/react/ui/Tabs/Tabs.types.d.ts.map +1 -0
- package/dist/react/ui/Tabs/index.d.ts +141 -0
- package/dist/react/ui/Tabs/index.d.ts.map +1 -0
- package/dist/react/ui/Tabs/index.js +308 -0
- package/dist/react/ui/Textarea/Textarea.styles.d.ts +6 -0
- package/dist/react/ui/Textarea/Textarea.styles.d.ts.map +1 -0
- package/dist/react/ui/Textarea/Textarea.styles.js +5 -0
- package/dist/react/ui/Textarea/Textarea.types.d.ts +8 -0
- package/dist/react/ui/Textarea/Textarea.types.d.ts.map +1 -0
- package/dist/react/ui/Textarea/index.d.ts +14 -0
- package/dist/react/ui/Textarea/index.d.ts.map +1 -0
- package/dist/react/ui/Textarea/index.js +24 -0
- package/dist/react/ui/Tooltip/Tooltip.styles.d.ts +23 -0
- package/dist/react/ui/Tooltip/Tooltip.styles.d.ts.map +1 -0
- package/dist/react/ui/Tooltip/Tooltip.styles.js +26 -0
- package/dist/react/ui/Tooltip/Tooltip.types.d.ts +203 -0
- package/dist/react/ui/Tooltip/Tooltip.types.d.ts.map +1 -0
- package/dist/react/ui/Tooltip/index.d.ts +110 -0
- package/dist/react/ui/Tooltip/index.d.ts.map +1 -0
- package/dist/react/ui/Tooltip/index.js +219 -0
- package/dist/react/ui/index.d.ts +31 -0
- package/dist/react/ui/index.d.ts.map +1 -0
- package/dist/react/ui/index.js +37 -0
- package/dist/react.js +88 -0
- package/package.json +12 -13
- package/src/core/index.ts +7 -0
- package/src/core/types.ts +82 -0
- package/src/index.ts +20 -11
- package/src/react/components/MorphingPopover/MorphingPopover.types.ts +49 -0
- package/src/react/components/MorphingPopover/index.tsx +186 -0
- package/src/react/components/index.ts +9 -0
- package/src/{hooks/use-auto-height.tsx → react/hooks/Animation/UseAutoHeight.tsx} +24 -3
- package/src/react/hooks/DOM/UseIsInView.tsx +44 -0
- package/src/{hooks/use-controlled-state.tsx → react/hooks/State/UseControlledState.tsx} +26 -2
- package/src/{hooks/use-data-state.tsx → react/hooks/State/UseDataState.tsx} +22 -0
- package/src/react/hooks/index.ts +17 -0
- package/src/react/icons/index.ts +12 -0
- package/src/{icons → react/icons}/lucide-animated/activity.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/bell-electric.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/bell.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/bot.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/box.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/circle-check.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/delete.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/download.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/home.tsx +1 -1
- package/src/react/icons/lucide-animated/index.ts +38 -0
- package/src/{icons → react/icons}/lucide-animated/layout-panel-top.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/plus.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/search.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/settings.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/trending-down.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/trending-up.tsx +1 -1
- package/src/{icons → react/icons}/lucide-animated/x.tsx +1 -1
- package/src/react/index.ts +30 -0
- package/src/{lib → react/lib}/get-strict-context.tsx +20 -0
- package/src/react/lib/index.ts +8 -0
- package/src/{lib → react/lib}/utils.ts +2 -2
- package/src/{components/animate-ui/primitives/effects/auto-height.tsx → react/primitives/AutoHeight/index.tsx} +24 -5
- package/src/{components/animate-ui/primitives/texts/counting-number.tsx → react/primitives/CountingNumber/index.tsx} +35 -7
- package/src/react/primitives/Highlight/Highlight.types.ts +136 -0
- package/src/{components/animate-ui/primitives/effects/highlight.tsx → react/primitives/Highlight/index.tsx} +60 -123
- package/src/{components/animate-ui/primitives/animate/slot.tsx → react/primitives/Slot/index.tsx} +43 -11
- package/src/react/primitives/index.ts +13 -0
- package/src/react/ui/Accordion/Accordion.styles.ts +72 -0
- package/src/react/ui/Accordion/Accordion.types.ts +199 -0
- package/src/react/ui/Accordion/index.tsx +362 -0
- package/src/react/ui/AlertDialog/AlertDialog.styles.ts +38 -0
- package/src/react/ui/AlertDialog/AlertDialog.types.ts +296 -0
- package/src/react/ui/AlertDialog/index.tsx +540 -0
- package/src/react/ui/Badge/Badge.styles.ts +43 -0
- package/src/react/ui/Badge/Badge.types.ts +26 -0
- package/src/react/ui/Badge/index.tsx +34 -0
- package/src/react/ui/Button/Button.styles.ts +57 -0
- package/src/react/ui/Button/Button.types.ts +63 -0
- package/src/react/ui/Button/index.tsx +155 -0
- package/src/react/ui/Card/Card.styles.ts +32 -0
- package/src/react/ui/Card/Card.types.ts +39 -0
- package/src/react/ui/Card/index.tsx +130 -0
- package/src/react/ui/Checkbox/Checkbox.styles.ts +40 -0
- package/src/react/ui/Checkbox/Checkbox.types.ts +98 -0
- package/src/react/ui/Checkbox/index.tsx +233 -0
- package/src/react/ui/Combobox/Combobox.styles.ts +34 -0
- package/src/react/ui/Combobox/Combobox.types.ts +89 -0
- package/src/react/ui/Combobox/index.tsx +331 -0
- package/src/react/ui/CornerBracket/CornerBracket.styles.ts +38 -0
- package/src/react/ui/CornerBracket/CornerBracket.types.ts +15 -0
- package/src/react/ui/CornerBracket/index.tsx +49 -0
- package/src/react/ui/Dialog/Dialog.styles.ts +59 -0
- package/src/react/ui/Dialog/Dialog.types.ts +284 -0
- package/src/react/ui/Dialog/index.tsx +452 -0
- package/src/react/ui/DropdownMenu/DropdownMenu.styles.ts +35 -0
- package/src/react/ui/DropdownMenu/DropdownMenu.types.ts +81 -0
- package/src/react/ui/DropdownMenu/index.tsx +300 -0
- package/src/react/ui/Field/Field.styles.ts +47 -0
- package/src/react/ui/Field/Field.types.ts +60 -0
- package/src/react/ui/Field/index.tsx +254 -0
- package/src/{components/ui/input.tsx → react/ui/Input/Input.styles.ts} +8 -17
- package/src/react/ui/Input/Input.types.ts +10 -0
- package/src/react/ui/Input/index.tsx +32 -0
- package/src/react/ui/InputGroup/InputGroup.styles.ts +53 -0
- package/src/react/ui/InputGroup/InputGroup.types.ts +44 -0
- package/src/react/ui/InputGroup/index.tsx +147 -0
- package/src/react/ui/Label/Label.styles.ts +10 -0
- package/src/react/ui/Label/Label.types.ts +9 -0
- package/src/react/ui/Label/index.tsx +27 -0
- package/src/react/ui/Menu/Menu.styles.ts +71 -0
- package/src/react/ui/Menu/Menu.types.ts +425 -0
- package/src/react/ui/Menu/index.tsx +900 -0
- package/src/react/ui/Popover/Popover.styles.ts +55 -0
- package/src/react/ui/Popover/Popover.types.ts +261 -0
- package/src/react/ui/Popover/index.tsx +422 -0
- package/src/react/ui/Progress/Progress.styles.ts +36 -0
- package/src/react/ui/Progress/Progress.types.ts +162 -0
- package/src/react/ui/Progress/index.tsx +254 -0
- package/src/react/ui/Select/Select.styles.ts +30 -0
- package/src/react/ui/Select/Select.types.ts +51 -0
- package/src/react/ui/Select/index.tsx +225 -0
- package/src/react/ui/Separator/Separator.styles.ts +10 -0
- package/src/react/ui/Separator/Separator.types.ts +10 -0
- package/src/react/ui/Separator/index.tsx +37 -0
- package/src/react/ui/Switch/Switch.styles.ts +50 -0
- package/src/react/ui/Switch/Switch.types.ts +155 -0
- package/src/react/ui/Switch/index.tsx +253 -0
- package/src/react/ui/Tabs/Tabs.styles.ts +60 -0
- package/src/react/ui/Tabs/Tabs.types.ts +250 -0
- package/src/react/ui/Tabs/index.tsx +421 -0
- package/src/{components/ui/textarea.tsx → react/ui/Textarea/Textarea.styles.ts} +7 -15
- package/src/react/ui/Textarea/Textarea.types.ts +9 -0
- package/src/react/ui/Textarea/index.tsx +27 -0
- package/src/react/ui/Tooltip/Tooltip.styles.ts +43 -0
- package/src/react/ui/Tooltip/Tooltip.types.ts +253 -0
- package/src/react/ui/Tooltip/index.tsx +394 -0
- package/src/react/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/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/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/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/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/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/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/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/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/alert-dialog.d.ts +0 -21
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.js +0 -99
- 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/combobox.d.ts +0 -25
- package/dist/components/ui/combobox.d.ts.map +0 -1
- package/dist/components/ui/devenv-bracket.d.ts +0 -30
- package/dist/components/ui/devenv-bracket.d.ts.map +0 -1
- package/dist/components/ui/devenv-bracket.js +0 -66
- 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/index.d.ts +0 -25
- package/dist/components/ui/index.d.ts.map +0 -1
- package/dist/components/ui/index.js +0 -24
- 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/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/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/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/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/icons/index.d.ts +0 -8
- package/dist/icons/index.d.ts.map +0 -1
- package/dist/icons/lucide-animated/activity.d.ts +0 -11
- 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 +0 -11
- package/dist/icons/lucide-animated/bell-electric.d.ts.map +0 -1
- package/dist/icons/lucide-animated/bell.d.ts +0 -11
- package/dist/icons/lucide-animated/bell.d.ts.map +0 -1
- package/dist/icons/lucide-animated/bot.d.ts +0 -11
- package/dist/icons/lucide-animated/bot.d.ts.map +0 -1
- package/dist/icons/lucide-animated/box.d.ts +0 -11
- 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 +0 -11
- package/dist/icons/lucide-animated/circle-check.d.ts.map +0 -1
- package/dist/icons/lucide-animated/delete.d.ts +0 -11
- package/dist/icons/lucide-animated/delete.d.ts.map +0 -1
- package/dist/icons/lucide-animated/download.d.ts +0 -11
- 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 +0 -11
- 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 +0 -11
- 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 +0 -11
- 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 +0 -11
- package/dist/icons/lucide-animated/search.d.ts.map +0 -1
- package/dist/icons/lucide-animated/settings.d.ts +0 -11
- 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 +0 -11
- package/dist/icons/lucide-animated/trending-down.d.ts.map +0 -1
- package/dist/icons/lucide-animated/trending-up.d.ts +0 -11
- 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 +0 -11
- 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/alert-dialog.tsx +0 -177
- 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/combobox.tsx +0 -293
- package/src/components/ui/devenv-bracket.tsx +0 -81
- package/src/components/ui/dropdown-menu.tsx +0 -261
- package/src/components/ui/field.tsx +0 -227
- package/src/components/ui/index.ts +0 -28
- package/src/components/ui/input-group.tsx +0 -149
- package/src/components/ui/label.tsx +0 -18
- 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/select.tsx +0 -190
- package/src/components/ui/separator.tsx +0 -25
- package/src/components/ui/switch.tsx +0 -9
- package/src/components/ui/tabs.tsx +0 -9
- 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-yxDDcJHZ.css → react/components/MorphingPopover/morphing-popover.module-BkcZcmVy.css} +0 -0
- /package/dist/{icons → react/icons}/index.js +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/check.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/edit-2.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/globe.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/index.js +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/layers.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/package.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/palette.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/refresh-cw.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/rocket.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/save.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/trash-2.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/type.d.ts +0 -0
- /package/dist/{icons → react/icons}/lucide-animated/upload.d.ts +0 -0
- /package/src/{components/ui/morphing-popover → react/components/MorphingPopover}/morphing-popover.module.css +0 -0
- /package/src/{icons → react/icons}/lucide-animated/arrow-down-to-line.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/arrow-up.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/check.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/edit-2.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/globe.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/layers.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/list.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/package.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/palette.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/refresh-cw.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/rocket.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/save.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/terminal.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/trash-2.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/type.tsx +0 -0
- /package/src/{icons → react/icons}/lucide-animated/upload.tsx +0 -0
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Dialog as DialogPrimitive } from '@base-ui-components/react/dialog';
|
|
5
|
-
import { AnimatePresence, motion, type HTMLMotionProps } from 'motion/react';
|
|
6
|
-
|
|
7
|
-
import { useControlledState } from '@/hooks/use-controlled-state';
|
|
8
|
-
import { getStrictContext } from '@/lib/get-strict-context';
|
|
9
|
-
|
|
10
|
-
type DialogContextType = {
|
|
11
|
-
isOpen: boolean;
|
|
12
|
-
setIsOpen: DialogProps['onOpenChange'];
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
const [DialogProvider, useDialog] =
|
|
16
|
-
getStrictContext<DialogContextType>('DialogContext');
|
|
17
|
-
|
|
18
|
-
type DialogProps = React.ComponentProps<typeof DialogPrimitive.Root>;
|
|
19
|
-
|
|
20
|
-
function Dialog(props: DialogProps) {
|
|
21
|
-
const [isOpen, setIsOpen] = useControlledState({
|
|
22
|
-
value: props?.open,
|
|
23
|
-
defaultValue: props?.defaultOpen,
|
|
24
|
-
onChange: props?.onOpenChange,
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
return (
|
|
28
|
-
<DialogProvider value={{ isOpen, setIsOpen }}>
|
|
29
|
-
<DialogPrimitive.Root
|
|
30
|
-
data-slot="dialog"
|
|
31
|
-
{...props}
|
|
32
|
-
onOpenChange={setIsOpen}
|
|
33
|
-
/>
|
|
34
|
-
</DialogProvider>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type DialogTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger>;
|
|
39
|
-
|
|
40
|
-
function DialogTrigger(props: DialogTriggerProps) {
|
|
41
|
-
return <DialogPrimitive.Trigger data-slot="dialog-trigger" {...props} />;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
type DialogPortalProps = Omit<
|
|
45
|
-
React.ComponentProps<typeof DialogPrimitive.Portal>,
|
|
46
|
-
'keepMounted'
|
|
47
|
-
>;
|
|
48
|
-
|
|
49
|
-
function DialogPortal(props: DialogPortalProps) {
|
|
50
|
-
const { isOpen } = useDialog();
|
|
51
|
-
|
|
52
|
-
return (
|
|
53
|
-
<AnimatePresence>
|
|
54
|
-
{isOpen && (
|
|
55
|
-
<DialogPrimitive.Portal
|
|
56
|
-
data-slot="dialog-portal"
|
|
57
|
-
keepMounted
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
)}
|
|
61
|
-
</AnimatePresence>
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
type DialogBackdropProps = Omit<
|
|
66
|
-
React.ComponentProps<typeof DialogPrimitive.Backdrop>,
|
|
67
|
-
'render'
|
|
68
|
-
> &
|
|
69
|
-
HTMLMotionProps<'div'>;
|
|
70
|
-
|
|
71
|
-
function DialogBackdrop({
|
|
72
|
-
transition = { duration: 0.2, ease: 'easeInOut' },
|
|
73
|
-
...props
|
|
74
|
-
}: DialogBackdropProps) {
|
|
75
|
-
return (
|
|
76
|
-
<DialogPrimitive.Backdrop
|
|
77
|
-
data-slot="dialog-backdrop"
|
|
78
|
-
render={
|
|
79
|
-
<motion.div
|
|
80
|
-
key="dialog-backdrop"
|
|
81
|
-
initial={{ opacity: 0, filter: 'blur(4px)' }}
|
|
82
|
-
animate={{ opacity: 1, filter: 'blur(0px)' }}
|
|
83
|
-
exit={{ opacity: 0, filter: 'blur(4px)' }}
|
|
84
|
-
transition={transition}
|
|
85
|
-
{...props}
|
|
86
|
-
/>
|
|
87
|
-
}
|
|
88
|
-
/>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
type DialogFlipDirection = 'top' | 'bottom' | 'left' | 'right';
|
|
93
|
-
|
|
94
|
-
type DialogPopupProps = Omit<
|
|
95
|
-
React.ComponentProps<typeof DialogPrimitive.Popup>,
|
|
96
|
-
'render'
|
|
97
|
-
> &
|
|
98
|
-
HTMLMotionProps<'div'> & {
|
|
99
|
-
from?: DialogFlipDirection;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
function DialogPopup({
|
|
103
|
-
from = 'top',
|
|
104
|
-
initialFocus,
|
|
105
|
-
finalFocus,
|
|
106
|
-
transition = { type: 'spring', stiffness: 150, damping: 25 },
|
|
107
|
-
...props
|
|
108
|
-
}: DialogPopupProps) {
|
|
109
|
-
const initialRotation =
|
|
110
|
-
from === 'bottom' || from === 'left' ? '20deg' : '-20deg';
|
|
111
|
-
const isVertical = from === 'top' || from === 'bottom';
|
|
112
|
-
const rotateAxis = isVertical ? 'rotateX' : 'rotateY';
|
|
113
|
-
|
|
114
|
-
return (
|
|
115
|
-
<DialogPrimitive.Popup
|
|
116
|
-
initialFocus={initialFocus}
|
|
117
|
-
finalFocus={finalFocus}
|
|
118
|
-
render={
|
|
119
|
-
<motion.div
|
|
120
|
-
key="dialog-popup"
|
|
121
|
-
data-slot="dialog-popup"
|
|
122
|
-
initial={{
|
|
123
|
-
opacity: 0,
|
|
124
|
-
filter: 'blur(4px)',
|
|
125
|
-
transform: `perspective(500px) ${rotateAxis}(${initialRotation}) scale(0.8)`,
|
|
126
|
-
}}
|
|
127
|
-
animate={{
|
|
128
|
-
opacity: 1,
|
|
129
|
-
filter: 'blur(0px)',
|
|
130
|
-
transform: `perspective(500px) ${rotateAxis}(0deg) scale(1)`,
|
|
131
|
-
}}
|
|
132
|
-
exit={{
|
|
133
|
-
opacity: 0,
|
|
134
|
-
filter: 'blur(4px)',
|
|
135
|
-
transform: `perspective(500px) ${rotateAxis}(${initialRotation}) scale(0.8)`,
|
|
136
|
-
}}
|
|
137
|
-
transition={transition}
|
|
138
|
-
{...props}
|
|
139
|
-
/>
|
|
140
|
-
}
|
|
141
|
-
/>
|
|
142
|
-
);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
type DialogCloseProps = React.ComponentProps<typeof DialogPrimitive.Close>;
|
|
146
|
-
|
|
147
|
-
function DialogClose(props: DialogCloseProps) {
|
|
148
|
-
return <DialogPrimitive.Close data-slot="dialog-close" {...props} />;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
type DialogHeaderProps = React.ComponentProps<'div'>;
|
|
152
|
-
|
|
153
|
-
function DialogHeader(props: DialogHeaderProps) {
|
|
154
|
-
return <div data-slot="dialog-header" {...props} />;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
type DialogFooterProps = React.ComponentProps<'div'>;
|
|
158
|
-
|
|
159
|
-
function DialogFooter(props: DialogFooterProps) {
|
|
160
|
-
return <div data-slot="dialog-footer" {...props} />;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
type DialogTitleProps = React.ComponentProps<typeof DialogPrimitive.Title>;
|
|
164
|
-
|
|
165
|
-
function DialogTitle(props: DialogTitleProps) {
|
|
166
|
-
return <DialogPrimitive.Title data-slot="dialog-title" {...props} />;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
type DialogDescriptionProps = React.ComponentProps<
|
|
170
|
-
typeof DialogPrimitive.Description
|
|
171
|
-
>;
|
|
172
|
-
|
|
173
|
-
function DialogDescription(props: DialogDescriptionProps) {
|
|
174
|
-
return (
|
|
175
|
-
<DialogPrimitive.Description data-slot="dialog-description" {...props} />
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
export {
|
|
180
|
-
Dialog,
|
|
181
|
-
DialogPortal,
|
|
182
|
-
DialogBackdrop,
|
|
183
|
-
DialogClose,
|
|
184
|
-
DialogTrigger,
|
|
185
|
-
DialogPopup,
|
|
186
|
-
DialogHeader,
|
|
187
|
-
DialogFooter,
|
|
188
|
-
DialogTitle,
|
|
189
|
-
DialogDescription,
|
|
190
|
-
useDialog,
|
|
191
|
-
type DialogProps,
|
|
192
|
-
type DialogTriggerProps,
|
|
193
|
-
type DialogPortalProps,
|
|
194
|
-
type DialogCloseProps,
|
|
195
|
-
type DialogBackdropProps,
|
|
196
|
-
type DialogPopupProps,
|
|
197
|
-
type DialogHeaderProps,
|
|
198
|
-
type DialogFooterProps,
|
|
199
|
-
type DialogTitleProps,
|
|
200
|
-
type DialogDescriptionProps,
|
|
201
|
-
type DialogContextType,
|
|
202
|
-
type DialogFlipDirection,
|
|
203
|
-
};
|
|
@@ -1,463 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Menu as MenuPrimitive } from '@base-ui-components/react/menu';
|
|
5
|
-
import { AnimatePresence, motion, type HTMLMotionProps } from 'motion/react';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
Highlight,
|
|
9
|
-
HighlightItem,
|
|
10
|
-
type HighlightItemProps,
|
|
11
|
-
type HighlightProps,
|
|
12
|
-
} from '@/components/animate-ui/primitives/effects/highlight';
|
|
13
|
-
import { getStrictContext } from '@/lib/get-strict-context';
|
|
14
|
-
import { useControlledState } from '@/hooks/use-controlled-state';
|
|
15
|
-
import { useDataState } from '@/hooks/use-data-state';
|
|
16
|
-
|
|
17
|
-
type MenuActiveValueContextType = {
|
|
18
|
-
highlightedValue: string | null;
|
|
19
|
-
setHighlightedValue: (value: string | null) => void;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
type MenuContextType = {
|
|
23
|
-
isOpen: boolean;
|
|
24
|
-
setIsOpen: MenuProps['onOpenChange'];
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const [MenuActiveValueProvider, useMenuActiveValue] =
|
|
28
|
-
getStrictContext<MenuActiveValueContextType>('MenuActiveValueContext');
|
|
29
|
-
const [MenuProvider, useMenu] =
|
|
30
|
-
getStrictContext<MenuContextType>('MenuContext');
|
|
31
|
-
|
|
32
|
-
type MenuProps = React.ComponentProps<typeof MenuPrimitive.Root>;
|
|
33
|
-
|
|
34
|
-
function Menu(props: MenuProps) {
|
|
35
|
-
const [isOpen, setIsOpen] = useControlledState({
|
|
36
|
-
value: props?.open,
|
|
37
|
-
defaultValue: props?.defaultOpen,
|
|
38
|
-
onChange: props?.onOpenChange,
|
|
39
|
-
});
|
|
40
|
-
const [highlightedValue, setHighlightedValue] = React.useState<string | null>(
|
|
41
|
-
null,
|
|
42
|
-
);
|
|
43
|
-
|
|
44
|
-
return (
|
|
45
|
-
<MenuActiveValueProvider value={{ highlightedValue, setHighlightedValue }}>
|
|
46
|
-
<MenuProvider value={{ isOpen, setIsOpen }}>
|
|
47
|
-
<MenuPrimitive.Root
|
|
48
|
-
data-slot="menu"
|
|
49
|
-
{...props}
|
|
50
|
-
onOpenChange={setIsOpen}
|
|
51
|
-
/>
|
|
52
|
-
</MenuProvider>
|
|
53
|
-
</MenuActiveValueProvider>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
type MenuTriggerProps = React.ComponentProps<typeof MenuPrimitive.Trigger>;
|
|
58
|
-
|
|
59
|
-
function MenuTrigger(props: MenuTriggerProps) {
|
|
60
|
-
return <MenuPrimitive.Trigger data-slot="menu-trigger" {...props} />;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
type MenuPortalProps = Omit<
|
|
64
|
-
React.ComponentProps<typeof MenuPrimitive.Portal>,
|
|
65
|
-
'keepMounted'
|
|
66
|
-
>;
|
|
67
|
-
|
|
68
|
-
function MenuPortal(props: MenuPortalProps) {
|
|
69
|
-
const { isOpen } = useMenu();
|
|
70
|
-
|
|
71
|
-
return (
|
|
72
|
-
<AnimatePresence>
|
|
73
|
-
{isOpen && (
|
|
74
|
-
<MenuPrimitive.Portal keepMounted data-slot="menu-portal" {...props} />
|
|
75
|
-
)}
|
|
76
|
-
</AnimatePresence>
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
type MenuGroupProps = React.ComponentProps<typeof MenuPrimitive.Group>;
|
|
81
|
-
|
|
82
|
-
function MenuGroup(props: MenuGroupProps) {
|
|
83
|
-
return <MenuPrimitive.Group data-slot="menu-group" {...props} />;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
type MenuGroupLabelProps = React.ComponentProps<
|
|
87
|
-
typeof MenuPrimitive.GroupLabel
|
|
88
|
-
>;
|
|
89
|
-
|
|
90
|
-
function MenuGroupLabel(props: MenuGroupLabelProps) {
|
|
91
|
-
return <MenuPrimitive.GroupLabel data-slot="menu-group-label" {...props} />;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
type MenuSubmenuProps = React.ComponentProps<typeof MenuPrimitive.SubmenuRoot>;
|
|
95
|
-
|
|
96
|
-
function MenuSubmenu(props: MenuSubmenuProps) {
|
|
97
|
-
const [isOpen, setIsOpen] = useControlledState({
|
|
98
|
-
value: props?.open,
|
|
99
|
-
defaultValue: props?.defaultOpen,
|
|
100
|
-
onChange: props?.onOpenChange,
|
|
101
|
-
});
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<MenuProvider value={{ isOpen, setIsOpen }}>
|
|
105
|
-
<MenuPrimitive.SubmenuRoot
|
|
106
|
-
data-slot="menu-submenu"
|
|
107
|
-
{...props}
|
|
108
|
-
onOpenChange={setIsOpen}
|
|
109
|
-
/>
|
|
110
|
-
</MenuProvider>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
type MenuSubmenuTriggerProps = Omit<
|
|
115
|
-
React.ComponentProps<typeof MenuPrimitive.SubmenuTrigger>,
|
|
116
|
-
'render'
|
|
117
|
-
> &
|
|
118
|
-
HTMLMotionProps<'div'> & {
|
|
119
|
-
disabled?: boolean;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
function MenuSubmenuTrigger({
|
|
123
|
-
label,
|
|
124
|
-
id,
|
|
125
|
-
nativeButton,
|
|
126
|
-
...props
|
|
127
|
-
}: MenuSubmenuTriggerProps) {
|
|
128
|
-
const { setHighlightedValue } = useMenuActiveValue();
|
|
129
|
-
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
130
|
-
'highlighted',
|
|
131
|
-
undefined,
|
|
132
|
-
(value) => {
|
|
133
|
-
if (value === true) {
|
|
134
|
-
const el = highlightedRef.current;
|
|
135
|
-
const v = el?.dataset.value || el?.id || null;
|
|
136
|
-
if (v) setHighlightedValue(v);
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
return (
|
|
142
|
-
<MenuPrimitive.SubmenuTrigger
|
|
143
|
-
ref={highlightedRef}
|
|
144
|
-
label={label}
|
|
145
|
-
id={id}
|
|
146
|
-
nativeButton={nativeButton}
|
|
147
|
-
data-slot="menu-submenu-trigger"
|
|
148
|
-
{...props}
|
|
149
|
-
/>
|
|
150
|
-
);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
type MenuHighlightProps = Omit<
|
|
154
|
-
HighlightProps,
|
|
155
|
-
'controlledItems' | 'enabled' | 'hover'
|
|
156
|
-
> & {
|
|
157
|
-
animateOnHover?: boolean;
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
function MenuHighlight({
|
|
161
|
-
transition = { type: 'spring', stiffness: 350, damping: 35 },
|
|
162
|
-
...props
|
|
163
|
-
}: MenuHighlightProps) {
|
|
164
|
-
const { highlightedValue } = useMenuActiveValue();
|
|
165
|
-
|
|
166
|
-
return (
|
|
167
|
-
<Highlight
|
|
168
|
-
data-slot="menu-highlight"
|
|
169
|
-
click={false}
|
|
170
|
-
controlledItems
|
|
171
|
-
transition={transition}
|
|
172
|
-
value={highlightedValue}
|
|
173
|
-
{...props}
|
|
174
|
-
/>
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
type MenuHighlightItemProps = HighlightItemProps;
|
|
179
|
-
|
|
180
|
-
function MenuHighlightItem(props: MenuHighlightItemProps) {
|
|
181
|
-
return <HighlightItem data-slot="menu-highlight-item" {...props} />;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
type MenuPositionerProps = React.ComponentProps<
|
|
185
|
-
typeof MenuPrimitive.Positioner
|
|
186
|
-
>;
|
|
187
|
-
|
|
188
|
-
function MenuPositioner(props: MenuPositionerProps) {
|
|
189
|
-
return <MenuPrimitive.Positioner data-slot="menu-positioner" {...props} />;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
type MenuPopupProps = Omit<
|
|
193
|
-
React.ComponentProps<typeof MenuPrimitive.Popup>,
|
|
194
|
-
'render'
|
|
195
|
-
> &
|
|
196
|
-
HTMLMotionProps<'div'>;
|
|
197
|
-
|
|
198
|
-
function MenuPopup({
|
|
199
|
-
finalFocus,
|
|
200
|
-
id,
|
|
201
|
-
transition = { duration: 0.2 },
|
|
202
|
-
style,
|
|
203
|
-
...props
|
|
204
|
-
}: MenuPopupProps) {
|
|
205
|
-
return (
|
|
206
|
-
<MenuPrimitive.Popup
|
|
207
|
-
finalFocus={finalFocus}
|
|
208
|
-
id={id}
|
|
209
|
-
render={
|
|
210
|
-
<motion.div
|
|
211
|
-
key="menu-popup"
|
|
212
|
-
data-slot="menu-popup"
|
|
213
|
-
initial={{ opacity: 0, scale: 0.95 }}
|
|
214
|
-
animate={{ opacity: 1, scale: 1 }}
|
|
215
|
-
exit={{ opacity: 0, scale: 0.95 }}
|
|
216
|
-
transition={transition}
|
|
217
|
-
style={{ willChange: 'opacity, transform', ...style }}
|
|
218
|
-
{...props}
|
|
219
|
-
/>
|
|
220
|
-
}
|
|
221
|
-
/>
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
type MenuItemProps = Omit<
|
|
226
|
-
React.ComponentProps<typeof MenuPrimitive.Item>,
|
|
227
|
-
'render'
|
|
228
|
-
> &
|
|
229
|
-
HTMLMotionProps<'div'>;
|
|
230
|
-
|
|
231
|
-
function MenuItem({
|
|
232
|
-
disabled,
|
|
233
|
-
label,
|
|
234
|
-
closeOnClick,
|
|
235
|
-
nativeButton,
|
|
236
|
-
id,
|
|
237
|
-
...props
|
|
238
|
-
}: MenuItemProps) {
|
|
239
|
-
const { setHighlightedValue } = useMenuActiveValue();
|
|
240
|
-
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
241
|
-
'highlighted',
|
|
242
|
-
undefined,
|
|
243
|
-
(value) => {
|
|
244
|
-
if (value === true) {
|
|
245
|
-
const el = highlightedRef.current;
|
|
246
|
-
const v = el?.dataset.value || el?.id || null;
|
|
247
|
-
if (v) setHighlightedValue(v);
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
);
|
|
251
|
-
|
|
252
|
-
return (
|
|
253
|
-
<MenuPrimitive.Item
|
|
254
|
-
ref={highlightedRef}
|
|
255
|
-
label={label}
|
|
256
|
-
closeOnClick={closeOnClick}
|
|
257
|
-
nativeButton={nativeButton}
|
|
258
|
-
disabled={disabled}
|
|
259
|
-
id={id}
|
|
260
|
-
data-slot="menu-item"
|
|
261
|
-
{...props}
|
|
262
|
-
/>
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
type MenuCheckboxItemProps = Omit<
|
|
267
|
-
React.ComponentProps<typeof MenuPrimitive.CheckboxItem>,
|
|
268
|
-
'render'
|
|
269
|
-
>;
|
|
270
|
-
|
|
271
|
-
function MenuCheckboxItem({
|
|
272
|
-
label,
|
|
273
|
-
defaultChecked,
|
|
274
|
-
checked,
|
|
275
|
-
onCheckedChange,
|
|
276
|
-
disabled,
|
|
277
|
-
closeOnClick,
|
|
278
|
-
nativeButton,
|
|
279
|
-
id,
|
|
280
|
-
...props
|
|
281
|
-
}: MenuCheckboxItemProps) {
|
|
282
|
-
const { setHighlightedValue } = useMenuActiveValue();
|
|
283
|
-
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
284
|
-
'highlighted',
|
|
285
|
-
undefined,
|
|
286
|
-
(value) => {
|
|
287
|
-
if (value === true) {
|
|
288
|
-
const el = highlightedRef.current;
|
|
289
|
-
const v = el?.dataset.value || el?.id || null;
|
|
290
|
-
if (v) setHighlightedValue(v);
|
|
291
|
-
}
|
|
292
|
-
},
|
|
293
|
-
);
|
|
294
|
-
return (
|
|
295
|
-
<MenuPrimitive.CheckboxItem
|
|
296
|
-
ref={highlightedRef}
|
|
297
|
-
label={label}
|
|
298
|
-
checked={checked}
|
|
299
|
-
defaultChecked={defaultChecked}
|
|
300
|
-
onCheckedChange={onCheckedChange}
|
|
301
|
-
disabled={disabled}
|
|
302
|
-
closeOnClick={closeOnClick}
|
|
303
|
-
nativeButton={nativeButton}
|
|
304
|
-
id={id}
|
|
305
|
-
data-slot="menu-checkbox-item"
|
|
306
|
-
{...props}
|
|
307
|
-
/>
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
type MenuCheckboxItemIndicatorProps = Omit<
|
|
312
|
-
React.ComponentProps<typeof MenuPrimitive.CheckboxItemIndicator>,
|
|
313
|
-
'render'
|
|
314
|
-
> &
|
|
315
|
-
HTMLMotionProps<'div'>;
|
|
316
|
-
|
|
317
|
-
function MenuCheckboxItemIndicator({
|
|
318
|
-
keepMounted,
|
|
319
|
-
...props
|
|
320
|
-
}: MenuCheckboxItemIndicatorProps) {
|
|
321
|
-
return (
|
|
322
|
-
<MenuPrimitive.CheckboxItemIndicator
|
|
323
|
-
data-slot="menu-checkbox-item-indicator"
|
|
324
|
-
keepMounted={keepMounted}
|
|
325
|
-
render={
|
|
326
|
-
<motion.div data-slot="menu-checkbox-item-indicator" {...props} />
|
|
327
|
-
}
|
|
328
|
-
/>
|
|
329
|
-
);
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
type MenuRadioGroupProps = React.ComponentProps<
|
|
333
|
-
typeof MenuPrimitive.RadioGroup
|
|
334
|
-
>;
|
|
335
|
-
|
|
336
|
-
function MenuRadioGroup(props: MenuRadioGroupProps) {
|
|
337
|
-
return <MenuPrimitive.RadioGroup data-slot="menu-radio-group" {...props} />;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
type MenuRadioItemProps = Omit<
|
|
341
|
-
React.ComponentProps<typeof MenuPrimitive.RadioItem>,
|
|
342
|
-
'render'
|
|
343
|
-
>;
|
|
344
|
-
|
|
345
|
-
function MenuRadioItem({
|
|
346
|
-
value,
|
|
347
|
-
disabled,
|
|
348
|
-
label,
|
|
349
|
-
closeOnClick,
|
|
350
|
-
nativeButton,
|
|
351
|
-
id,
|
|
352
|
-
...props
|
|
353
|
-
}: MenuRadioItemProps) {
|
|
354
|
-
const { setHighlightedValue } = useMenuActiveValue();
|
|
355
|
-
const [, highlightedRef] = useDataState<HTMLDivElement>(
|
|
356
|
-
'highlighted',
|
|
357
|
-
undefined,
|
|
358
|
-
(value) => {
|
|
359
|
-
if (value === true) {
|
|
360
|
-
const el = highlightedRef.current;
|
|
361
|
-
const v = el?.dataset.value || el?.id || null;
|
|
362
|
-
if (v) setHighlightedValue(v);
|
|
363
|
-
}
|
|
364
|
-
},
|
|
365
|
-
);
|
|
366
|
-
return (
|
|
367
|
-
<MenuPrimitive.RadioItem
|
|
368
|
-
ref={highlightedRef}
|
|
369
|
-
value={value}
|
|
370
|
-
disabled={disabled}
|
|
371
|
-
label={label}
|
|
372
|
-
closeOnClick={closeOnClick}
|
|
373
|
-
nativeButton={nativeButton}
|
|
374
|
-
id={id}
|
|
375
|
-
data-slot="menu-radio-item"
|
|
376
|
-
{...props}
|
|
377
|
-
/>
|
|
378
|
-
);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
type MenuRadioItemIndicatorProps = Omit<
|
|
382
|
-
React.ComponentProps<typeof MenuPrimitive.RadioItemIndicator>,
|
|
383
|
-
'render'
|
|
384
|
-
> &
|
|
385
|
-
HTMLMotionProps<'div'>;
|
|
386
|
-
|
|
387
|
-
function MenuRadioItemIndicator({
|
|
388
|
-
keepMounted,
|
|
389
|
-
...props
|
|
390
|
-
}: MenuRadioItemIndicatorProps) {
|
|
391
|
-
return (
|
|
392
|
-
<MenuPrimitive.RadioItemIndicator
|
|
393
|
-
data-slot="menu-radio-item-indicator"
|
|
394
|
-
keepMounted={keepMounted}
|
|
395
|
-
render={<motion.div data-slot="menu-radio-item-indicator" {...props} />}
|
|
396
|
-
/>
|
|
397
|
-
);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
type MenuShortcutProps = React.ComponentProps<'span'>;
|
|
401
|
-
|
|
402
|
-
function MenuShortcut(props: MenuShortcutProps) {
|
|
403
|
-
return <span data-slot="menu-shortcut" {...props} />;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
type MenuArrowProps = React.ComponentProps<typeof MenuPrimitive.Arrow>;
|
|
407
|
-
|
|
408
|
-
function MenuArrow(props: MenuArrowProps) {
|
|
409
|
-
return <MenuPrimitive.Arrow data-slot="menu-arrow" {...props} />;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
type MenuSeparatorProps = React.ComponentProps<typeof MenuPrimitive.Separator>;
|
|
413
|
-
|
|
414
|
-
function MenuSeparator(props: MenuSeparatorProps) {
|
|
415
|
-
return <MenuPrimitive.Separator data-slot="menu-separator" {...props} />;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
export {
|
|
419
|
-
Menu,
|
|
420
|
-
MenuTrigger,
|
|
421
|
-
MenuPortal,
|
|
422
|
-
MenuPositioner,
|
|
423
|
-
MenuPopup,
|
|
424
|
-
MenuArrow,
|
|
425
|
-
MenuItem,
|
|
426
|
-
MenuCheckboxItem,
|
|
427
|
-
MenuCheckboxItemIndicator,
|
|
428
|
-
MenuRadioGroup,
|
|
429
|
-
MenuRadioItem,
|
|
430
|
-
MenuRadioItemIndicator,
|
|
431
|
-
MenuGroup,
|
|
432
|
-
MenuGroupLabel,
|
|
433
|
-
MenuSeparator,
|
|
434
|
-
MenuShortcut,
|
|
435
|
-
MenuHighlight,
|
|
436
|
-
MenuHighlightItem,
|
|
437
|
-
MenuSubmenu,
|
|
438
|
-
MenuSubmenuTrigger,
|
|
439
|
-
useMenuActiveValue,
|
|
440
|
-
useMenu,
|
|
441
|
-
type MenuProps,
|
|
442
|
-
type MenuTriggerProps,
|
|
443
|
-
type MenuPortalProps,
|
|
444
|
-
type MenuPositionerProps,
|
|
445
|
-
type MenuPopupProps,
|
|
446
|
-
type MenuArrowProps,
|
|
447
|
-
type MenuItemProps,
|
|
448
|
-
type MenuCheckboxItemProps,
|
|
449
|
-
type MenuCheckboxItemIndicatorProps,
|
|
450
|
-
type MenuRadioItemProps,
|
|
451
|
-
type MenuRadioItemIndicatorProps,
|
|
452
|
-
type MenuRadioGroupProps,
|
|
453
|
-
type MenuGroupProps,
|
|
454
|
-
type MenuGroupLabelProps,
|
|
455
|
-
type MenuSeparatorProps,
|
|
456
|
-
type MenuShortcutProps,
|
|
457
|
-
type MenuHighlightProps,
|
|
458
|
-
type MenuHighlightItemProps,
|
|
459
|
-
type MenuSubmenuProps,
|
|
460
|
-
type MenuSubmenuTriggerProps,
|
|
461
|
-
type MenuActiveValueContextType,
|
|
462
|
-
type MenuContextType,
|
|
463
|
-
};
|