@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,209 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { Tooltip as TooltipPrimitive } from '@base-ui-components/react/tooltip';
|
|
5
|
-
import {
|
|
6
|
-
AnimatePresence,
|
|
7
|
-
motion,
|
|
8
|
-
useMotionValue,
|
|
9
|
-
useSpring,
|
|
10
|
-
type HTMLMotionProps,
|
|
11
|
-
type MotionValue,
|
|
12
|
-
type SpringOptions,
|
|
13
|
-
} from 'motion/react';
|
|
14
|
-
|
|
15
|
-
import { getStrictContext } from '@/lib/get-strict-context';
|
|
16
|
-
import { useControlledState } from '@/hooks/use-controlled-state';
|
|
17
|
-
|
|
18
|
-
type TooltipContextType = {
|
|
19
|
-
isOpen: boolean;
|
|
20
|
-
setIsOpen: TooltipProps['onOpenChange'];
|
|
21
|
-
x: MotionValue<number>;
|
|
22
|
-
y: MotionValue<number>;
|
|
23
|
-
followCursor?: boolean | 'x' | 'y';
|
|
24
|
-
followCursorSpringOptions?: SpringOptions;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const [LocalTooltipProvider, useTooltip] =
|
|
28
|
-
getStrictContext<TooltipContextType>('TooltipContext');
|
|
29
|
-
|
|
30
|
-
type TooltipProviderProps = React.ComponentProps<
|
|
31
|
-
typeof TooltipPrimitive.Provider
|
|
32
|
-
>;
|
|
33
|
-
|
|
34
|
-
function TooltipProvider(props: TooltipProviderProps) {
|
|
35
|
-
return <TooltipPrimitive.Provider data-slot="tooltip-provider" {...props} />;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
type TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root> & {
|
|
39
|
-
followCursor?: boolean | 'x' | 'y';
|
|
40
|
-
followCursorSpringOptions?: SpringOptions;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
function Tooltip({
|
|
44
|
-
followCursor = false,
|
|
45
|
-
followCursorSpringOptions = { stiffness: 200, damping: 17 },
|
|
46
|
-
...props
|
|
47
|
-
}: TooltipProps) {
|
|
48
|
-
const [isOpen, setIsOpen] = useControlledState({
|
|
49
|
-
value: props?.open,
|
|
50
|
-
defaultValue: props?.defaultOpen,
|
|
51
|
-
onChange: props?.onOpenChange,
|
|
52
|
-
});
|
|
53
|
-
const x = useMotionValue(0);
|
|
54
|
-
const y = useMotionValue(0);
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<LocalTooltipProvider
|
|
58
|
-
value={{
|
|
59
|
-
isOpen,
|
|
60
|
-
setIsOpen,
|
|
61
|
-
x,
|
|
62
|
-
y,
|
|
63
|
-
followCursor,
|
|
64
|
-
followCursorSpringOptions,
|
|
65
|
-
}}
|
|
66
|
-
>
|
|
67
|
-
<TooltipPrimitive.Root
|
|
68
|
-
data-slot="tooltip"
|
|
69
|
-
{...props}
|
|
70
|
-
onOpenChange={setIsOpen}
|
|
71
|
-
/>
|
|
72
|
-
</LocalTooltipProvider>
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
type TooltipTriggerProps = React.ComponentProps<
|
|
77
|
-
typeof TooltipPrimitive.Trigger
|
|
78
|
-
>;
|
|
79
|
-
|
|
80
|
-
function TooltipTrigger({ onMouseMove, ...props }: TooltipTriggerProps) {
|
|
81
|
-
const { x, y, followCursor } = useTooltip();
|
|
82
|
-
|
|
83
|
-
const handleMouseMove = (
|
|
84
|
-
event: Parameters<NonNullable<TooltipTriggerProps['onMouseMove']>>[0],
|
|
85
|
-
) => {
|
|
86
|
-
onMouseMove?.(event);
|
|
87
|
-
|
|
88
|
-
const target = event.currentTarget.getBoundingClientRect();
|
|
89
|
-
|
|
90
|
-
if (followCursor === 'x' || followCursor === true) {
|
|
91
|
-
const eventOffsetX = event.clientX - target.left;
|
|
92
|
-
const offsetXFromCenter = (eventOffsetX - target.width / 2) / 2;
|
|
93
|
-
x.set(offsetXFromCenter);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (followCursor === 'y' || followCursor === true) {
|
|
97
|
-
const eventOffsetY = event.clientY - target.top;
|
|
98
|
-
const offsetYFromCenter = (eventOffsetY - target.height / 2) / 2;
|
|
99
|
-
y.set(offsetYFromCenter);
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<TooltipPrimitive.Trigger
|
|
105
|
-
data-slot="tooltip-trigger"
|
|
106
|
-
onMouseMove={handleMouseMove}
|
|
107
|
-
{...props}
|
|
108
|
-
/>
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
type TooltipPortalProps = Omit<
|
|
113
|
-
React.ComponentProps<typeof TooltipPrimitive.Portal>,
|
|
114
|
-
'keepMounted'
|
|
115
|
-
>;
|
|
116
|
-
|
|
117
|
-
function TooltipPortal(props: TooltipPortalProps) {
|
|
118
|
-
const { isOpen } = useTooltip();
|
|
119
|
-
|
|
120
|
-
return (
|
|
121
|
-
<AnimatePresence>
|
|
122
|
-
{isOpen && (
|
|
123
|
-
<TooltipPrimitive.Portal
|
|
124
|
-
keepMounted
|
|
125
|
-
data-slot="tooltip-portal"
|
|
126
|
-
{...props}
|
|
127
|
-
/>
|
|
128
|
-
)}
|
|
129
|
-
</AnimatePresence>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
type TooltipPositionerProps = React.ComponentProps<
|
|
134
|
-
typeof TooltipPrimitive.Positioner
|
|
135
|
-
>;
|
|
136
|
-
|
|
137
|
-
function TooltipPositioner(props: TooltipPositionerProps) {
|
|
138
|
-
return (
|
|
139
|
-
<TooltipPrimitive.Positioner data-slot="tooltip-positioner" {...props} />
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
type TooltipPopupProps = Omit<
|
|
144
|
-
React.ComponentProps<typeof TooltipPrimitive.Popup>,
|
|
145
|
-
'render'
|
|
146
|
-
> &
|
|
147
|
-
HTMLMotionProps<'div'>;
|
|
148
|
-
|
|
149
|
-
function TooltipPopup({
|
|
150
|
-
transition = { type: 'spring', stiffness: 300, damping: 25 },
|
|
151
|
-
style,
|
|
152
|
-
...props
|
|
153
|
-
}: TooltipPopupProps) {
|
|
154
|
-
const { x, y, followCursor, followCursorSpringOptions } = useTooltip();
|
|
155
|
-
const translateX = useSpring(x, followCursorSpringOptions);
|
|
156
|
-
const translateY = useSpring(y, followCursorSpringOptions);
|
|
157
|
-
|
|
158
|
-
return (
|
|
159
|
-
<TooltipPrimitive.Popup
|
|
160
|
-
render={
|
|
161
|
-
<motion.div
|
|
162
|
-
key="tooltip-popup"
|
|
163
|
-
data-slot="tooltip-popup"
|
|
164
|
-
initial={{ opacity: 0, scale: 0.5 }}
|
|
165
|
-
animate={{ opacity: 1, scale: 1 }}
|
|
166
|
-
exit={{ opacity: 0, scale: 0.5 }}
|
|
167
|
-
transition={transition}
|
|
168
|
-
style={{
|
|
169
|
-
x:
|
|
170
|
-
followCursor === 'x' || followCursor === true
|
|
171
|
-
? translateX
|
|
172
|
-
: undefined,
|
|
173
|
-
y:
|
|
174
|
-
followCursor === 'y' || followCursor === true
|
|
175
|
-
? translateY
|
|
176
|
-
: undefined,
|
|
177
|
-
...style,
|
|
178
|
-
}}
|
|
179
|
-
{...props}
|
|
180
|
-
/>
|
|
181
|
-
}
|
|
182
|
-
/>
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
type TooltipArrowProps = React.ComponentProps<typeof TooltipPrimitive.Arrow>;
|
|
187
|
-
|
|
188
|
-
function TooltipArrow(props: TooltipArrowProps) {
|
|
189
|
-
return <TooltipPrimitive.Arrow data-slot="tooltip-arrow" {...props} />;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
export {
|
|
193
|
-
TooltipProvider,
|
|
194
|
-
Tooltip,
|
|
195
|
-
TooltipTrigger,
|
|
196
|
-
TooltipPortal,
|
|
197
|
-
TooltipPositioner,
|
|
198
|
-
TooltipPopup,
|
|
199
|
-
TooltipArrow,
|
|
200
|
-
useTooltip,
|
|
201
|
-
type TooltipProviderProps,
|
|
202
|
-
type TooltipProps,
|
|
203
|
-
type TooltipTriggerProps,
|
|
204
|
-
type TooltipPortalProps,
|
|
205
|
-
type TooltipPositionerProps,
|
|
206
|
-
type TooltipPopupProps,
|
|
207
|
-
type TooltipArrowProps,
|
|
208
|
-
type TooltipContextType,
|
|
209
|
-
};
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import * as React from "react"
|
|
4
|
-
import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog"
|
|
5
|
-
|
|
6
|
-
import { cn } from "@/lib/utils"
|
|
7
|
-
import { Button } from "@/components/ui/button"
|
|
8
|
-
|
|
9
|
-
function AlertDialog({ ...props }: AlertDialogPrimitive.Root.Props) {
|
|
10
|
-
return <AlertDialogPrimitive.Root data-slot="alert-dialog" {...props} />
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function AlertDialogTrigger({ ...props }: AlertDialogPrimitive.Trigger.Props) {
|
|
14
|
-
return (
|
|
15
|
-
<AlertDialogPrimitive.Trigger data-slot="alert-dialog-trigger" {...props} />
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function AlertDialogPortal({ ...props }: AlertDialogPrimitive.Portal.Props) {
|
|
20
|
-
return (
|
|
21
|
-
<AlertDialogPrimitive.Portal data-slot="alert-dialog-portal" {...props} />
|
|
22
|
-
)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function AlertDialogOverlay({
|
|
26
|
-
className,
|
|
27
|
-
...props
|
|
28
|
-
}: AlertDialogPrimitive.Backdrop.Props) {
|
|
29
|
-
return (
|
|
30
|
-
<AlertDialogPrimitive.Backdrop
|
|
31
|
-
data-slot="alert-dialog-overlay"
|
|
32
|
-
className={cn(
|
|
33
|
-
"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50",
|
|
34
|
-
className
|
|
35
|
-
)}
|
|
36
|
-
{...props}
|
|
37
|
-
/>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function AlertDialogContent({
|
|
42
|
-
className,
|
|
43
|
-
size = "default",
|
|
44
|
-
...props
|
|
45
|
-
}: AlertDialogPrimitive.Popup.Props & {
|
|
46
|
-
size?: "default" | "sm"
|
|
47
|
-
}) {
|
|
48
|
-
return (
|
|
49
|
-
<AlertDialogPortal>
|
|
50
|
-
<AlertDialogOverlay />
|
|
51
|
-
<AlertDialogPrimitive.Popup
|
|
52
|
-
data-slot="alert-dialog-content"
|
|
53
|
-
data-size={size}
|
|
54
|
-
className={cn(
|
|
55
|
-
"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 bg-background ring-foreground/10 gap-4 rounded-xl p-4 ring-1 duration-100 data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 outline-none",
|
|
56
|
-
className
|
|
57
|
-
)}
|
|
58
|
-
{...props}
|
|
59
|
-
/>
|
|
60
|
-
</AlertDialogPortal>
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function AlertDialogHeader({
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}: React.ComponentProps<"div">) {
|
|
68
|
-
return (
|
|
69
|
-
<div
|
|
70
|
-
data-slot="alert-dialog-header"
|
|
71
|
-
className={cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className)}
|
|
72
|
-
{...props}
|
|
73
|
-
/>
|
|
74
|
-
)
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
function AlertDialogFooter({
|
|
78
|
-
className,
|
|
79
|
-
...props
|
|
80
|
-
}: React.ComponentProps<"div">) {
|
|
81
|
-
return (
|
|
82
|
-
<div
|
|
83
|
-
data-slot="alert-dialog-footer"
|
|
84
|
-
className={cn(
|
|
85
|
-
"bg-muted/50 -mx-4 -mb-4 rounded-b-xl border-t p-4 flex flex-col-reverse gap-2 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end",
|
|
86
|
-
className
|
|
87
|
-
)}
|
|
88
|
-
{...props}
|
|
89
|
-
/>
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function AlertDialogMedia({
|
|
94
|
-
className,
|
|
95
|
-
...props
|
|
96
|
-
}: React.ComponentProps<"div">) {
|
|
97
|
-
return (
|
|
98
|
-
<div
|
|
99
|
-
data-slot="alert-dialog-media"
|
|
100
|
-
className={cn("bg-muted mb-2 inline-flex size-10 items-center justify-center rounded-md sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className)}
|
|
101
|
-
{...props}
|
|
102
|
-
/>
|
|
103
|
-
)
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
function AlertDialogTitle({
|
|
107
|
-
className,
|
|
108
|
-
...props
|
|
109
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {
|
|
110
|
-
return (
|
|
111
|
-
<AlertDialogPrimitive.Title
|
|
112
|
-
data-slot="alert-dialog-title"
|
|
113
|
-
className={cn("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className)}
|
|
114
|
-
{...props}
|
|
115
|
-
/>
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
function AlertDialogDescription({
|
|
120
|
-
className,
|
|
121
|
-
...props
|
|
122
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {
|
|
123
|
-
return (
|
|
124
|
-
<AlertDialogPrimitive.Description
|
|
125
|
-
data-slot="alert-dialog-description"
|
|
126
|
-
className={cn("text-muted-foreground *:[a]:hover:text-foreground text-sm text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3", className)}
|
|
127
|
-
{...props}
|
|
128
|
-
/>
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function AlertDialogAction({
|
|
133
|
-
className,
|
|
134
|
-
...props
|
|
135
|
-
}: React.ComponentProps<typeof Button>) {
|
|
136
|
-
return (
|
|
137
|
-
<Button
|
|
138
|
-
data-slot="alert-dialog-action"
|
|
139
|
-
className={cn(className)}
|
|
140
|
-
{...props}
|
|
141
|
-
/>
|
|
142
|
-
)
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function AlertDialogCancel({
|
|
146
|
-
className,
|
|
147
|
-
variant = "outline",
|
|
148
|
-
children,
|
|
149
|
-
...props
|
|
150
|
-
}: React.ComponentProps<typeof AlertDialogPrimitive.Close> & {
|
|
151
|
-
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "success" | "warning"
|
|
152
|
-
}) {
|
|
153
|
-
return (
|
|
154
|
-
<AlertDialogPrimitive.Close
|
|
155
|
-
data-slot="alert-dialog-cancel"
|
|
156
|
-
className={cn(className)}
|
|
157
|
-
{...props}
|
|
158
|
-
>
|
|
159
|
-
<Button variant={variant}>{children || "Cancel"}</Button>
|
|
160
|
-
</AlertDialogPrimitive.Close>
|
|
161
|
-
)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export {
|
|
165
|
-
AlertDialog,
|
|
166
|
-
AlertDialogAction,
|
|
167
|
-
AlertDialogCancel,
|
|
168
|
-
AlertDialogContent,
|
|
169
|
-
AlertDialogDescription,
|
|
170
|
-
AlertDialogFooter,
|
|
171
|
-
AlertDialogHeader,
|
|
172
|
-
AlertDialogMedia,
|
|
173
|
-
AlertDialogOverlay,
|
|
174
|
-
AlertDialogPortal,
|
|
175
|
-
AlertDialogTitle,
|
|
176
|
-
AlertDialogTrigger,
|
|
177
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Variantes de estilo para el componente Badge usando CVA (Class Variance Authority).
|
|
5
|
-
*
|
|
6
|
-
* Define las combinaciones de variantes visuales soportadas:
|
|
7
|
-
* - variant: default, secondary, destructive, outline
|
|
8
|
-
* - size: default, sm, lg
|
|
9
|
-
*
|
|
10
|
-
* @see {@link https://cva.style/docs/getting-started/variants}
|
|
11
|
-
*/
|
|
12
|
-
export const badgeVariants = cva(
|
|
13
|
-
"inline-flex items-center justify-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
default:
|
|
18
|
-
"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
19
|
-
secondary:
|
|
20
|
-
"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
|
-
destructive:
|
|
22
|
-
"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
23
|
-
outline: "text-foreground",
|
|
24
|
-
},
|
|
25
|
-
size: {
|
|
26
|
-
default: "h-6 px-2.5 py-0.5",
|
|
27
|
-
sm: "h-5 px-2 text-[10px]",
|
|
28
|
-
lg: "h-7 px-3 text-sm",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
variant: "default",
|
|
33
|
-
size: "default",
|
|
34
|
-
},
|
|
35
|
-
}
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Estilos estáticos para el componente Badge.
|
|
40
|
-
*
|
|
41
|
-
* Útil cuando se necesitan clases específicas fuera del sistema de variantes.
|
|
42
|
-
*/
|
|
43
|
-
export const badgeStyles = {
|
|
44
|
-
base: "inline-flex items-center justify-center rounded-full border font-semibold transition-colors",
|
|
45
|
-
focus: "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
46
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { cn } from "@/lib/utils";
|
|
4
|
-
import { badgeVariants } from "./badge.styles";
|
|
5
|
-
import type { IBadgeProps } from "./badge.types";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Componente Badge para mostrar etiquetas de estado, categorías o indicadores.
|
|
9
|
-
*
|
|
10
|
-
* El Badge es un componente visual que muestra información contextual como
|
|
11
|
-
* estados, categorías, contadores o etiquetas. Soporta múltiples variantes
|
|
12
|
-
* de color y tamaños.
|
|
13
|
-
*
|
|
14
|
-
* @param props - Props del componente incluyendo variantes de estilo
|
|
15
|
-
* @returns Elemento div renderizado como badge
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* import { Badge } from "@/components/ui/badge";
|
|
20
|
-
*
|
|
21
|
-
* function Example() {
|
|
22
|
-
* return (
|
|
23
|
-
* <div className="flex gap-2">
|
|
24
|
-
* <Badge>Default</Badge>
|
|
25
|
-
* <Badge variant="secondary">Secondary</Badge>
|
|
26
|
-
* <Badge variant="destructive">Destructive</Badge>
|
|
27
|
-
* <Badge variant="outline">Outline</Badge>
|
|
28
|
-
* <Badge size="sm">Small</Badge>
|
|
29
|
-
* <Badge size="lg">Large</Badge>
|
|
30
|
-
* </div>
|
|
31
|
-
* );
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*
|
|
35
|
-
* @see {@link IBadgeProps}
|
|
36
|
-
* @see {@link badgeVariants}
|
|
37
|
-
*/
|
|
38
|
-
function Badge({ className, variant, size, ...props }: IBadgeProps) {
|
|
39
|
-
return (
|
|
40
|
-
<div
|
|
41
|
-
data-slot="badge"
|
|
42
|
-
data-variant={variant}
|
|
43
|
-
data-size={size}
|
|
44
|
-
className={cn(badgeVariants({ variant, size }), className)}
|
|
45
|
-
{...props}
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { Badge };
|
|
51
|
-
export { badgeVariants } from "./badge.styles";
|
|
52
|
-
export type { IBadgeProps, BadgeVariant, BadgeSize } from "./badge.types";
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { VariantProps } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Props para el componente Badge.
|
|
5
|
-
*
|
|
6
|
-
* @interface IBadgeProps
|
|
7
|
-
* @extends React.HTMLAttributes<HTMLDivElement>
|
|
8
|
-
* @extends VariantProps<typeof badgeVariants>
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* // Badge por defecto
|
|
13
|
-
* <Badge>Nuevo</Badge>
|
|
14
|
-
*
|
|
15
|
-
* // Badge con variante destructiva
|
|
16
|
-
* <Badge variant="destructive">Error</Badge>
|
|
17
|
-
*
|
|
18
|
-
* // Badge con tamaño pequeño
|
|
19
|
-
* <Badge size="sm">Mini</Badge>
|
|
20
|
-
*
|
|
21
|
-
* // Badge con variante outline
|
|
22
|
-
* <Badge variant="outline">Borrador</Badge>
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
export interface IBadgeProps
|
|
26
|
-
extends React.HTMLAttributes<HTMLDivElement>,
|
|
27
|
-
VariantProps<typeof import("./badge.styles").badgeVariants> {}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Variantes disponibles para el componente Badge.
|
|
31
|
-
*
|
|
32
|
-
* @type BadgeVariant
|
|
33
|
-
*/
|
|
34
|
-
export type BadgeVariant = "default" | "secondary" | "destructive" | "outline";
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Tamaños disponibles para el componente Badge.
|
|
38
|
-
*
|
|
39
|
-
* @type BadgeSize
|
|
40
|
-
*/
|
|
41
|
-
export type BadgeSize = "default" | "sm" | "lg";
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Variantes de estilo para el componente Button usando CVA (Class Variance Authority).
|
|
5
|
-
*
|
|
6
|
-
* Define las combinaciones de variantes visuales soportadas:
|
|
7
|
-
* - variant: default, secondary, destructive, outline, ghost, link, success, warning
|
|
8
|
-
* - size: default, sm, lg, icon
|
|
9
|
-
*
|
|
10
|
-
* @see {@link https://cva.style/docs/getting-started/variants}
|
|
11
|
-
*/
|
|
12
|
-
export const buttonVariants = cva(
|
|
13
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 active:scale-[0.98]",
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
variant: {
|
|
17
|
-
default:
|
|
18
|
-
"bg-primary text-primary-foreground hover:bg-primary/90",
|
|
19
|
-
secondary:
|
|
20
|
-
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
21
|
-
destructive:
|
|
22
|
-
"bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
23
|
-
outline:
|
|
24
|
-
"border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
25
|
-
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
26
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
27
|
-
success:
|
|
28
|
-
"bg-emerald-600 text-white hover:bg-emerald-700 focus-visible:ring-emerald-600",
|
|
29
|
-
warning:
|
|
30
|
-
"bg-amber-500 text-white hover:bg-amber-600 focus-visible:ring-amber-500",
|
|
31
|
-
},
|
|
32
|
-
size: {
|
|
33
|
-
default: "h-10 px-4 py-2",
|
|
34
|
-
sm: "h-9 rounded-md px-3 text-xs",
|
|
35
|
-
lg: "h-11 rounded-md px-8 text-base",
|
|
36
|
-
icon: "h-10 w-10 p-0",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
variant: "default",
|
|
41
|
-
size: "default",
|
|
42
|
-
},
|
|
43
|
-
}
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Estilos estáticos para el componente Button.
|
|
48
|
-
*
|
|
49
|
-
* Útil cuando se necesitan clases específicas fuera del sistema de variantes.
|
|
50
|
-
*/
|
|
51
|
-
export const buttonStyles = {
|
|
52
|
-
base: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-all",
|
|
53
|
-
focus:
|
|
54
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
55
|
-
disabled: "disabled:pointer-events-none disabled:opacity-50",
|
|
56
|
-
icon: "[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
57
|
-
pressed: "active:scale-[0.98]",
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Clases para estados específicos del botón.
|
|
62
|
-
*/
|
|
63
|
-
export const buttonStateStyles = {
|
|
64
|
-
pressed: "scale-[0.98]",
|
|
65
|
-
disabled: "opacity-50 pointer-events-none",
|
|
66
|
-
};
|