@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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style slots and CVA variants for the Accordion component.
|
|
3
|
+
*
|
|
4
|
+
* Defines the visual regions (slots) and variant-based styling
|
|
5
|
+
* using Class Variance Authority (CVA).
|
|
6
|
+
*
|
|
7
|
+
* @module @mks2508/mks-ui/react/ui/Accordion/Accordion.styles
|
|
8
|
+
*/
|
|
9
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
10
|
+
import type { StyleSlots } from '../../../core/types';
|
|
11
|
+
import type { AccordionSlot } from './Accordion.types';
|
|
12
|
+
/**
|
|
13
|
+
* Default Tailwind classes for each visual region of the Accordion.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { AccordionStyles } from '@mks2508/mks-ui';
|
|
18
|
+
*
|
|
19
|
+
* // Access individual slot defaults
|
|
20
|
+
* console.log(AccordionStyles.root); // base root classes
|
|
21
|
+
* console.log(AccordionStyles.trigger); // base trigger classes
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const AccordionStyles: StyleSlots<AccordionSlot>;
|
|
25
|
+
/**
|
|
26
|
+
* CVA variants for the Accordion root element.
|
|
27
|
+
*
|
|
28
|
+
* Provides `default` and `bordered` visual variants that control
|
|
29
|
+
* the overall appearance of the accordion container.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* import { accordionVariants } from '@mks2508/mks-ui';
|
|
34
|
+
*
|
|
35
|
+
* // Get class string for bordered variant
|
|
36
|
+
* const classes = accordionVariants({ variant: 'bordered' });
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const accordionVariants: (props?: ({
|
|
40
|
+
variant?: "default" | "bordered" | null | undefined;
|
|
41
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Variant props extracted from {@link accordionVariants}.
|
|
44
|
+
* Use this to type-check the `variant` prop on the Accordion root.
|
|
45
|
+
*/
|
|
46
|
+
export type AccordionVariantProps = VariantProps<typeof accordionVariants>;
|
|
47
|
+
//# sourceMappingURL=Accordion.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.styles.d.ts","sourceRoot":"","sources":["../../../../src/react/ui/Accordion/Accordion.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe,EAAE,UAAU,CAAC,aAAa,CAOrD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB;;8EAgB5B,CAAC;AAEH;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
//#region src/react/ui/Accordion/Accordion.styles.ts
|
|
4
|
+
/**
|
|
5
|
+
* Style slots and CVA variants for the Accordion component.
|
|
6
|
+
*
|
|
7
|
+
* Defines the visual regions (slots) and variant-based styling
|
|
8
|
+
* using Class Variance Authority (CVA).
|
|
9
|
+
*
|
|
10
|
+
* @module @mks2508/mks-ui/react/ui/Accordion/Accordion.styles
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* Default Tailwind classes for each visual region of the Accordion.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* import { AccordionStyles } from '@mks2508/mks-ui';
|
|
18
|
+
*
|
|
19
|
+
* // Access individual slot defaults
|
|
20
|
+
* console.log(AccordionStyles.root); // base root classes
|
|
21
|
+
* console.log(AccordionStyles.trigger); // base trigger classes
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
const AccordionStyles = {
|
|
25
|
+
root: "flex flex-col",
|
|
26
|
+
item: "border-b border-border",
|
|
27
|
+
header: "flex",
|
|
28
|
+
trigger: "flex flex-1 items-center justify-between py-4 text-sm font-medium transition-all hover:underline [&[data-panel-open]>svg]:rotate-180",
|
|
29
|
+
panel: "overflow-hidden text-sm"
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* CVA variants for the Accordion root element.
|
|
33
|
+
*
|
|
34
|
+
* Provides `default` and `bordered` visual variants that control
|
|
35
|
+
* the overall appearance of the accordion container.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import { accordionVariants } from '@mks2508/mks-ui';
|
|
40
|
+
*
|
|
41
|
+
* // Get class string for bordered variant
|
|
42
|
+
* const classes = accordionVariants({ variant: 'bordered' });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
const accordionVariants = cva(AccordionStyles.root, {
|
|
46
|
+
variants: { variant: {
|
|
47
|
+
default: "",
|
|
48
|
+
bordered: "rounded-lg border border-border"
|
|
49
|
+
} },
|
|
50
|
+
defaultVariants: { variant: "default" }
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { AccordionStyles, accordionVariants };
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the Accordion component.
|
|
3
|
+
*
|
|
4
|
+
* All interfaces follow the IPrefix convention. Type aliases do not.
|
|
5
|
+
* Slot types define the visual regions available for style overrides.
|
|
6
|
+
*
|
|
7
|
+
* @module @mks2508/mks-ui/react/ui/Accordion/Accordion.types
|
|
8
|
+
*/
|
|
9
|
+
import type { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
|
|
10
|
+
import type { HTMLMotionProps } from 'motion/react';
|
|
11
|
+
import type { IBaseConfig, SlotOverrides } from '../../../core/types';
|
|
12
|
+
import type { AccordionVariantProps } from './Accordion.styles';
|
|
13
|
+
/**
|
|
14
|
+
* Named visual regions of the Accordion that can be styled via the `slots` prop.
|
|
15
|
+
*
|
|
16
|
+
* | Slot | Element |
|
|
17
|
+
* |-------------|---------------------------------------------|
|
|
18
|
+
* | `root` | Outer accordion container |
|
|
19
|
+
* | `item` | Individual collapsible section |
|
|
20
|
+
* | `header` | Header wrapper around the trigger |
|
|
21
|
+
* | `trigger` | Clickable element that toggles the panel |
|
|
22
|
+
* | `panel` | Collapsible content area with animation |
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <Accordion slots={{ trigger: 'text-cyan-400', panel: 'bg-zinc-900/50' }} />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export type AccordionSlot = 'root' | 'item' | 'header' | 'trigger' | 'panel';
|
|
30
|
+
/**
|
|
31
|
+
* Internal context for the Accordion root, tracks the current value.
|
|
32
|
+
*/
|
|
33
|
+
export type AccordionContextType = {
|
|
34
|
+
/** Currently expanded item value(s). */
|
|
35
|
+
value: string | string[] | undefined;
|
|
36
|
+
/** Setter to update the expanded item value(s). */
|
|
37
|
+
setValue: (value: string | string[] | undefined) => void;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Internal context for an individual AccordionItem, tracks open state.
|
|
41
|
+
*/
|
|
42
|
+
export type AccordionItemContextType = {
|
|
43
|
+
/** Whether this item's panel is currently expanded. */
|
|
44
|
+
isOpen: boolean;
|
|
45
|
+
/** Setter to toggle this item's open state. */
|
|
46
|
+
setIsOpen: (open: boolean) => void;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Behavioral configuration for the Accordion component.
|
|
50
|
+
* Extends {@link IBaseConfig} with accordion-specific options.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```tsx
|
|
54
|
+
* <Accordion config={{ keepRendered: true, animation: { duration: 0.4 } }} />
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
export interface IAccordionConfig extends IBaseConfig {
|
|
58
|
+
/**
|
|
59
|
+
* When `true`, accordion panels remain in the DOM when collapsed
|
|
60
|
+
* (hidden visually but not unmounted). Useful for preserving
|
|
61
|
+
* form state or avoiding expensive re-renders.
|
|
62
|
+
*
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
keepRendered?: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Props for the root Accordion component.
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```tsx
|
|
72
|
+
* <Accordion
|
|
73
|
+
* variant="bordered"
|
|
74
|
+
* defaultValue={['item-1']}
|
|
75
|
+
* slots={{ root: 'bg-muted/30', trigger: 'font-semibold' }}
|
|
76
|
+
* >
|
|
77
|
+
* <AccordionItem value="item-1">...</AccordionItem>
|
|
78
|
+
* </Accordion>
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export interface IAccordionProps extends Omit<React.ComponentProps<typeof AccordionPrimitive.Root>, 'className'>, AccordionVariantProps {
|
|
82
|
+
/** Additional CSS class applied to the root element. */
|
|
83
|
+
className?: string;
|
|
84
|
+
/** Style overrides for individual visual regions. */
|
|
85
|
+
slots?: SlotOverrides<AccordionSlot>;
|
|
86
|
+
/** Behavioral configuration. */
|
|
87
|
+
config?: IAccordionConfig;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Props for an individual AccordionItem.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```tsx
|
|
94
|
+
* <AccordionItem value="item-1" className="border-none">
|
|
95
|
+
* <AccordionHeader>...</AccordionHeader>
|
|
96
|
+
* <AccordionPanel>Content</AccordionPanel>
|
|
97
|
+
* </AccordionItem>
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export interface IAccordionItemProps extends React.ComponentProps<typeof AccordionPrimitive.Item> {
|
|
101
|
+
/** Style overrides for individual visual regions. */
|
|
102
|
+
slots?: SlotOverrides<AccordionSlot>;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Props for the AccordionHeader wrapper.
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```tsx
|
|
109
|
+
* <AccordionHeader className="bg-muted/20">
|
|
110
|
+
* <AccordionTrigger>Section Title</AccordionTrigger>
|
|
111
|
+
* </AccordionHeader>
|
|
112
|
+
* ```
|
|
113
|
+
*/
|
|
114
|
+
export interface IAccordionHeaderProps extends React.ComponentProps<typeof AccordionPrimitive.Header> {
|
|
115
|
+
/** Style overrides for individual visual regions. */
|
|
116
|
+
slots?: SlotOverrides<AccordionSlot>;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Props for the AccordionTrigger button.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* ```tsx
|
|
123
|
+
* <AccordionTrigger className="text-foreground hover:text-primary">
|
|
124
|
+
* Click to expand
|
|
125
|
+
* </AccordionTrigger>
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
export interface IAccordionTriggerProps extends React.ComponentProps<typeof AccordionPrimitive.Trigger> {
|
|
129
|
+
/** Style overrides for individual visual regions. */
|
|
130
|
+
slots?: SlotOverrides<AccordionSlot>;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Props for the AccordionPanel collapsible content area.
|
|
134
|
+
*
|
|
135
|
+
* Extends Motion's HTMLMotionProps for full animation control.
|
|
136
|
+
* The `keepMounted` and `render` props from the base primitive are
|
|
137
|
+
* omitted because they are managed internally by the animation logic.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```tsx
|
|
141
|
+
* <AccordionPanel
|
|
142
|
+
* keepRendered
|
|
143
|
+
* transition={{ duration: 0.5, ease: 'easeOut' }}
|
|
144
|
+
* >
|
|
145
|
+
* <p>Collapsible content here.</p>
|
|
146
|
+
* </AccordionPanel>
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
export interface IAccordionPanelProps extends Omit<Omit<React.ComponentProps<typeof AccordionPrimitive.Panel>, 'keepMounted' | 'render'>, keyof HTMLMotionProps<'div'>>, HTMLMotionProps<'div'> {
|
|
150
|
+
/**
|
|
151
|
+
* When `true`, the panel stays mounted in the DOM even when collapsed.
|
|
152
|
+
* Useful for preserving internal state (e.g. form inputs).
|
|
153
|
+
*
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
keepRendered?: boolean;
|
|
157
|
+
/** Style overrides for individual visual regions. */
|
|
158
|
+
slots?: SlotOverrides<AccordionSlot>;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=Accordion.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.types.d.ts","sourceRoot":"","sources":["../../../../src/react/ui/Accordion/Accordion.types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAMhE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AAM7E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,wCAAwC;IACxC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,mDAAmD;IACnD,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,uDAAuD;IACvD,MAAM,EAAE,OAAO,CAAC;IAChB,+CAA+C;IAC/C,SAAS,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAAC;AAMF;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAMD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eACf,SAAQ,IAAI,CACR,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,EACpD,WAAW,CACZ,EACD,qBAAqB;IACvB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACrC,gCAAgC;IAChC,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,mBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC;IAC5D,qDAAqD;IACrD,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,qBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,MAAM,CAAC;IAC9D,qDAAqD;IACrD,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACtC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,sBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC;IAC/D,qDAAqD;IACrD,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,oBACf,SAAQ,IAAI,CACR,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,KAAK,CAAC,EAAE,aAAa,GAAG,QAAQ,CAAC,EACrF,MAAM,eAAe,CAAC,KAAK,CAAC,CAC7B,EACD,eAAe,CAAC,KAAK,CAAC;IACxB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qDAAqD;IACrD,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CACtC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import type { AccordionItemContextType, IAccordionProps, IAccordionItemProps, IAccordionHeaderProps, IAccordionTriggerProps, IAccordionPanelProps } from './Accordion.types';
|
|
2
|
+
declare const useAccordionItem: () => AccordionItemContextType;
|
|
3
|
+
/**
|
|
4
|
+
* Root Accordion container. Manages which items are expanded and
|
|
5
|
+
* provides context to child components.
|
|
6
|
+
*
|
|
7
|
+
* Supports both controlled (`value` + `onValueChange`) and uncontrolled
|
|
8
|
+
* (`defaultValue`) usage patterns.
|
|
9
|
+
*
|
|
10
|
+
* @param props - {@link IAccordionProps}
|
|
11
|
+
* @returns The rendered accordion container
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* // Uncontrolled with default expansion
|
|
16
|
+
* <Accordion defaultValue={['item-1']}>
|
|
17
|
+
* <AccordionItem value="item-1">...</AccordionItem>
|
|
18
|
+
* <AccordionItem value="item-2">...</AccordionItem>
|
|
19
|
+
* </Accordion>
|
|
20
|
+
*
|
|
21
|
+
* // Controlled
|
|
22
|
+
* const [value, setValue] = useState<string[]>(['item-1']);
|
|
23
|
+
* <Accordion value={value} onValueChange={setValue} variant="bordered">
|
|
24
|
+
* ...
|
|
25
|
+
* </Accordion>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
declare function Accordion({ variant, className, slots, config: _config, ...props }: IAccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
/**
|
|
30
|
+
* Individual collapsible section within an Accordion.
|
|
31
|
+
* Tracks its own open/closed state derived from the parent context.
|
|
32
|
+
*
|
|
33
|
+
* @param props - {@link IAccordionItemProps}
|
|
34
|
+
* @returns The rendered accordion item
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <AccordionItem value="section-1" className="border-primary/20">
|
|
39
|
+
* <AccordionHeader>
|
|
40
|
+
* <AccordionTrigger>Section Title</AccordionTrigger>
|
|
41
|
+
* </AccordionHeader>
|
|
42
|
+
* <AccordionPanel>Section content</AccordionPanel>
|
|
43
|
+
* </AccordionItem>
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function AccordionItem({ slots, className, ...props }: IAccordionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
/**
|
|
48
|
+
* Header wrapper for an accordion trigger. Provides semantic structure
|
|
49
|
+
* and consistent spacing around the trigger element.
|
|
50
|
+
*
|
|
51
|
+
* @param props - {@link IAccordionHeaderProps}
|
|
52
|
+
* @returns The rendered accordion header
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <AccordionHeader className="bg-muted/10">
|
|
57
|
+
* <AccordionTrigger>Section Title</AccordionTrigger>
|
|
58
|
+
* </AccordionHeader>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare function AccordionHeader({ slots, className, ...props }: IAccordionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
/**
|
|
63
|
+
* Clickable trigger that toggles the associated AccordionPanel.
|
|
64
|
+
* Rendered as a button for accessibility.
|
|
65
|
+
*
|
|
66
|
+
* @param props - {@link IAccordionTriggerProps}
|
|
67
|
+
* @returns The rendered accordion trigger
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <AccordionTrigger className="text-foreground hover:text-primary">
|
|
72
|
+
* Click to expand
|
|
73
|
+
* </AccordionTrigger>
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
declare function AccordionTrigger({ slots, className, ...props }: IAccordionTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
77
|
+
/**
|
|
78
|
+
* Animated collapsible panel that shows/hides content with a smooth
|
|
79
|
+
* height transition powered by Motion (Framer Motion).
|
|
80
|
+
*
|
|
81
|
+
* Uses a mask-image technique for a polished reveal/hide effect.
|
|
82
|
+
* When `keepRendered` is `true`, the panel stays in the DOM even when
|
|
83
|
+
* collapsed (useful for preserving form state).
|
|
84
|
+
*
|
|
85
|
+
* @param props - {@link IAccordionPanelProps}
|
|
86
|
+
* @returns The rendered animated accordion panel
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* // Standard panel (unmounts on collapse)
|
|
91
|
+
* <AccordionPanel>
|
|
92
|
+
* <p>Content revealed on expand</p>
|
|
93
|
+
* </AccordionPanel>
|
|
94
|
+
*
|
|
95
|
+
* // Persistent panel (stays mounted)
|
|
96
|
+
* <AccordionPanel keepRendered transition={{ duration: 0.5 }}>
|
|
97
|
+
* <form>...</form>
|
|
98
|
+
* </AccordionPanel>
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
declare function AccordionPanel({ transition, hiddenUntilFound, keepRendered, slots, className, ...props }: IAccordionPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
export { Accordion, AccordionItem, AccordionHeader, AccordionTrigger, AccordionPanel, useAccordionItem, };
|
|
103
|
+
export type { IAccordionProps, IAccordionItemProps, IAccordionHeaderProps, IAccordionTriggerProps, IAccordionPanelProps, IAccordionConfig, AccordionSlot, AccordionContextType, AccordionItemContextType, } from './Accordion.types';
|
|
104
|
+
export { AccordionStyles, accordionVariants, type AccordionVariantProps, } from './Accordion.styles';
|
|
105
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react/ui/Accordion/index.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAEV,wBAAwB,EACxB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAS3B,QAAA,MAA8B,gBAAgB,gCACsB,CAAC;AAMrE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,EAAE,OAAO,EACf,GAAG,KAAK,EACT,EAAE,eAAe,2CAmBjB;AAMD;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,aAAa,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAmBzE;AAMD;;;;;;;;;;;;;GAaG;AACH,iBAAS,eAAe,CAAC,EACvB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAQvB;AAMD;;;;;;;;;;;;;GAaG;AACH,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,sBAAsB,2CAQxB;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,iBAAS,cAAc,CAAC,EACtB,UAAkD,EAClD,gBAAgB,EAChB,YAAoB,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,oBAAoB,2CAgEtB;AAMD,OAAO,EACL,SAAS,EACT,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,CAAC;AAGF,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,KAAK,qBAAqB,GAC3B,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { getStrictContext } from "../../lib/get-strict-context.js";
|
|
5
|
+
import { useControlledState } from "../../hooks/State/UseControlledState.js";
|
|
6
|
+
import { AccordionStyles, accordionVariants } from "./Accordion.styles.js";
|
|
7
|
+
import * as React from "../../../react";
|
|
8
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Accordion } from "@base-ui/react/accordion";
|
|
11
|
+
|
|
12
|
+
//#region src/react/ui/Accordion/index.tsx
|
|
13
|
+
/**
|
|
14
|
+
* Accordion component with animated expand/collapse panels.
|
|
15
|
+
*
|
|
16
|
+
* Built on top of Base UI's Accordion primitive with Motion (Framer Motion)
|
|
17
|
+
* animations. Supports controlled and uncontrolled modes, multiple expanded
|
|
18
|
+
* items, and the StyleSlots pattern for granular style overrides.
|
|
19
|
+
*
|
|
20
|
+
* @module @mks2508/mks-ui/react/ui/Accordion
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* import {
|
|
25
|
+
* Accordion,
|
|
26
|
+
* AccordionItem,
|
|
27
|
+
* AccordionHeader,
|
|
28
|
+
* AccordionTrigger,
|
|
29
|
+
* AccordionPanel,
|
|
30
|
+
* } from '@mks2508/mks-ui';
|
|
31
|
+
*
|
|
32
|
+
* function FAQ() {
|
|
33
|
+
* return (
|
|
34
|
+
* <Accordion variant="bordered" defaultValue={['q1']}>
|
|
35
|
+
* <AccordionItem value="q1">
|
|
36
|
+
* <AccordionHeader>
|
|
37
|
+
* <AccordionTrigger>What is mks-ui?</AccordionTrigger>
|
|
38
|
+
* </AccordionHeader>
|
|
39
|
+
* <AccordionPanel>
|
|
40
|
+
* A modern React component library with animations.
|
|
41
|
+
* </AccordionPanel>
|
|
42
|
+
* </AccordionItem>
|
|
43
|
+
* </Accordion>
|
|
44
|
+
* );
|
|
45
|
+
* }
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
const [AccordionProvider, useAccordion] = getStrictContext("AccordionContext");
|
|
49
|
+
const [AccordionItemProvider, useAccordionItem] = getStrictContext("AccordionItemContext");
|
|
50
|
+
/**
|
|
51
|
+
* Root Accordion container. Manages which items are expanded and
|
|
52
|
+
* provides context to child components.
|
|
53
|
+
*
|
|
54
|
+
* Supports both controlled (`value` + `onValueChange`) and uncontrolled
|
|
55
|
+
* (`defaultValue`) usage patterns.
|
|
56
|
+
*
|
|
57
|
+
* @param props - {@link IAccordionProps}
|
|
58
|
+
* @returns The rendered accordion container
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* // Uncontrolled with default expansion
|
|
63
|
+
* <Accordion defaultValue={['item-1']}>
|
|
64
|
+
* <AccordionItem value="item-1">...</AccordionItem>
|
|
65
|
+
* <AccordionItem value="item-2">...</AccordionItem>
|
|
66
|
+
* </Accordion>
|
|
67
|
+
*
|
|
68
|
+
* // Controlled
|
|
69
|
+
* const [value, setValue] = useState<string[]>(['item-1']);
|
|
70
|
+
* <Accordion value={value} onValueChange={setValue} variant="bordered">
|
|
71
|
+
* ...
|
|
72
|
+
* </Accordion>
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
function Accordion$1({ variant, className, slots, config: _config, ...props }) {
|
|
76
|
+
const [value, setValue] = useControlledState({
|
|
77
|
+
value: props?.value,
|
|
78
|
+
defaultValue: props?.defaultValue,
|
|
79
|
+
onChange: props?.onValueChange
|
|
80
|
+
});
|
|
81
|
+
return /* @__PURE__ */ jsx(AccordionProvider, {
|
|
82
|
+
value: {
|
|
83
|
+
value,
|
|
84
|
+
setValue
|
|
85
|
+
},
|
|
86
|
+
children: /* @__PURE__ */ jsx(Accordion.Root, {
|
|
87
|
+
"data-slot": "accordion",
|
|
88
|
+
className: cn(accordionVariants({ variant }), slots?.root, className),
|
|
89
|
+
...props,
|
|
90
|
+
onValueChange: setValue
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Individual collapsible section within an Accordion.
|
|
96
|
+
* Tracks its own open/closed state derived from the parent context.
|
|
97
|
+
*
|
|
98
|
+
* @param props - {@link IAccordionItemProps}
|
|
99
|
+
* @returns The rendered accordion item
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```tsx
|
|
103
|
+
* <AccordionItem value="section-1" className="border-primary/20">
|
|
104
|
+
* <AccordionHeader>
|
|
105
|
+
* <AccordionTrigger>Section Title</AccordionTrigger>
|
|
106
|
+
* </AccordionHeader>
|
|
107
|
+
* <AccordionPanel>Section content</AccordionPanel>
|
|
108
|
+
* </AccordionItem>
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
function AccordionItem({ slots, className, ...props }) {
|
|
112
|
+
const { value } = useAccordion();
|
|
113
|
+
const [isOpen, setIsOpen] = React.useState(value?.includes(props?.value) ?? false);
|
|
114
|
+
React.useEffect(() => {
|
|
115
|
+
setIsOpen(value?.includes(props?.value) ?? false);
|
|
116
|
+
}, [value, props?.value]);
|
|
117
|
+
return /* @__PURE__ */ jsx(AccordionItemProvider, {
|
|
118
|
+
value: {
|
|
119
|
+
isOpen,
|
|
120
|
+
setIsOpen
|
|
121
|
+
},
|
|
122
|
+
children: /* @__PURE__ */ jsx(Accordion.Item, {
|
|
123
|
+
"data-slot": "accordion-item",
|
|
124
|
+
className: cn(AccordionStyles.item, slots?.item, className),
|
|
125
|
+
...props
|
|
126
|
+
})
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Header wrapper for an accordion trigger. Provides semantic structure
|
|
131
|
+
* and consistent spacing around the trigger element.
|
|
132
|
+
*
|
|
133
|
+
* @param props - {@link IAccordionHeaderProps}
|
|
134
|
+
* @returns The rendered accordion header
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```tsx
|
|
138
|
+
* <AccordionHeader className="bg-muted/10">
|
|
139
|
+
* <AccordionTrigger>Section Title</AccordionTrigger>
|
|
140
|
+
* </AccordionHeader>
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
function AccordionHeader({ slots, className, ...props }) {
|
|
144
|
+
return /* @__PURE__ */ jsx(Accordion.Header, {
|
|
145
|
+
"data-slot": "accordion-header",
|
|
146
|
+
className: cn(AccordionStyles.header, slots?.header, className),
|
|
147
|
+
...props
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Clickable trigger that toggles the associated AccordionPanel.
|
|
152
|
+
* Rendered as a button for accessibility.
|
|
153
|
+
*
|
|
154
|
+
* @param props - {@link IAccordionTriggerProps}
|
|
155
|
+
* @returns The rendered accordion trigger
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* ```tsx
|
|
159
|
+
* <AccordionTrigger className="text-foreground hover:text-primary">
|
|
160
|
+
* Click to expand
|
|
161
|
+
* </AccordionTrigger>
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
function AccordionTrigger({ slots, className, ...props }) {
|
|
165
|
+
return /* @__PURE__ */ jsx(Accordion.Trigger, {
|
|
166
|
+
"data-slot": "accordion-trigger",
|
|
167
|
+
className: cn(AccordionStyles.trigger, slots?.trigger, className),
|
|
168
|
+
...props
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Animated collapsible panel that shows/hides content with a smooth
|
|
173
|
+
* height transition powered by Motion (Framer Motion).
|
|
174
|
+
*
|
|
175
|
+
* Uses a mask-image technique for a polished reveal/hide effect.
|
|
176
|
+
* When `keepRendered` is `true`, the panel stays in the DOM even when
|
|
177
|
+
* collapsed (useful for preserving form state).
|
|
178
|
+
*
|
|
179
|
+
* @param props - {@link IAccordionPanelProps}
|
|
180
|
+
* @returns The rendered animated accordion panel
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* ```tsx
|
|
184
|
+
* // Standard panel (unmounts on collapse)
|
|
185
|
+
* <AccordionPanel>
|
|
186
|
+
* <p>Content revealed on expand</p>
|
|
187
|
+
* </AccordionPanel>
|
|
188
|
+
*
|
|
189
|
+
* // Persistent panel (stays mounted)
|
|
190
|
+
* <AccordionPanel keepRendered transition={{ duration: 0.5 }}>
|
|
191
|
+
* <form>...</form>
|
|
192
|
+
* </AccordionPanel>
|
|
193
|
+
* ```
|
|
194
|
+
*/
|
|
195
|
+
function AccordionPanel({ transition = {
|
|
196
|
+
duration: .35,
|
|
197
|
+
ease: "easeInOut"
|
|
198
|
+
}, hiddenUntilFound, keepRendered = false, slots, className, ...props }) {
|
|
199
|
+
const { isOpen } = useAccordionItem();
|
|
200
|
+
const maskStyle = {
|
|
201
|
+
maskImage: "linear-gradient(black var(--mask-stop), transparent var(--mask-stop))",
|
|
202
|
+
WebkitMaskImage: "linear-gradient(black var(--mask-stop), transparent var(--mask-stop))",
|
|
203
|
+
overflow: "hidden"
|
|
204
|
+
};
|
|
205
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: keepRendered ? /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
206
|
+
hidden: false,
|
|
207
|
+
hiddenUntilFound,
|
|
208
|
+
keepMounted: true,
|
|
209
|
+
render: /* @__PURE__ */ jsx(motion.div, {
|
|
210
|
+
"data-slot": "accordion-panel",
|
|
211
|
+
className: cn(AccordionStyles.panel, slots?.panel, className),
|
|
212
|
+
initial: {
|
|
213
|
+
height: 0,
|
|
214
|
+
opacity: 0,
|
|
215
|
+
"--mask-stop": "0%",
|
|
216
|
+
y: 20
|
|
217
|
+
},
|
|
218
|
+
animate: isOpen ? {
|
|
219
|
+
height: "auto",
|
|
220
|
+
opacity: 1,
|
|
221
|
+
"--mask-stop": "100%",
|
|
222
|
+
y: 0
|
|
223
|
+
} : {
|
|
224
|
+
height: 0,
|
|
225
|
+
opacity: 0,
|
|
226
|
+
"--mask-stop": "0%",
|
|
227
|
+
y: 20
|
|
228
|
+
},
|
|
229
|
+
transition,
|
|
230
|
+
style: maskStyle,
|
|
231
|
+
...props
|
|
232
|
+
}, "accordion-panel")
|
|
233
|
+
}) : isOpen && /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
234
|
+
hidden: false,
|
|
235
|
+
hiddenUntilFound,
|
|
236
|
+
keepMounted: true,
|
|
237
|
+
render: /* @__PURE__ */ jsx(motion.div, {
|
|
238
|
+
"data-slot": "accordion-panel",
|
|
239
|
+
className: cn(AccordionStyles.panel, slots?.panel, className),
|
|
240
|
+
initial: {
|
|
241
|
+
height: 0,
|
|
242
|
+
opacity: 0,
|
|
243
|
+
"--mask-stop": "0%",
|
|
244
|
+
y: 20
|
|
245
|
+
},
|
|
246
|
+
animate: {
|
|
247
|
+
height: "auto",
|
|
248
|
+
opacity: 1,
|
|
249
|
+
"--mask-stop": "100%",
|
|
250
|
+
y: 0
|
|
251
|
+
},
|
|
252
|
+
exit: {
|
|
253
|
+
height: 0,
|
|
254
|
+
opacity: 0,
|
|
255
|
+
"--mask-stop": "0%",
|
|
256
|
+
y: 20
|
|
257
|
+
},
|
|
258
|
+
transition,
|
|
259
|
+
style: maskStyle,
|
|
260
|
+
...props
|
|
261
|
+
}, "accordion-panel")
|
|
262
|
+
}) });
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
//#endregion
|
|
266
|
+
export { Accordion$1 as Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionTrigger, useAccordionItem };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style slots for the AlertDialog component.
|
|
3
|
+
*
|
|
4
|
+
* Defines the visual regions (slots) available for style overrides.
|
|
5
|
+
* AlertDialog does not use CVA variants since its visual appearance
|
|
6
|
+
* is primarily controlled by the `from` flip direction prop.
|
|
7
|
+
*
|
|
8
|
+
* @module @mks2508/mks-ui/react/ui/AlertDialog/AlertDialog.styles
|
|
9
|
+
*/
|
|
10
|
+
import type { StyleSlots } from '../../../core/types';
|
|
11
|
+
import type { AlertDialogSlot } from './AlertDialog.types';
|
|
12
|
+
/**
|
|
13
|
+
* Default Tailwind classes for each visual region of the AlertDialog.
|
|
14
|
+
*
|
|
15
|
+
* These classes are applied as base styles and can be overridden
|
|
16
|
+
* via the `slots` prop on individual sub-components.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { AlertDialogStyles } from '@mks2508/mks-ui';
|
|
21
|
+
*
|
|
22
|
+
* // Access individual slot defaults
|
|
23
|
+
* console.log(AlertDialogStyles.backdrop); // backdrop base classes
|
|
24
|
+
* console.log(AlertDialogStyles.popup); // popup container classes
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare const AlertDialogStyles: StyleSlots<AlertDialogSlot>;
|
|
28
|
+
//# sourceMappingURL=AlertDialog.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlertDialog.styles.d.ts","sourceRoot":"","sources":["../../../../src/react/ui/AlertDialog/AlertDialog.styles.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,UAAU,CAAC,eAAe,CASzD,CAAC"}
|