@mks2508/mks-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/components/animate-ui/primitives/animate/slot.d.ts +18 -0
- package/dist/components/animate-ui/primitives/animate/slot.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/animate/slot.js +47 -0
- package/dist/components/animate-ui/primitives/animate/slot.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/accordion.d.ts +22 -0
- package/dist/components/animate-ui/primitives/base/accordion.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/accordion.js +52 -0
- package/dist/components/animate-ui/primitives/base/accordion.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/alert-dialog.d.ts +33 -0
- package/dist/components/animate-ui/primitives/base/alert-dialog.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/alert-dialog.js +60 -0
- package/dist/components/animate-ui/primitives/base/alert-dialog.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/checkbox.d.ts +15 -0
- package/dist/components/animate-ui/primitives/base/checkbox.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/checkbox.js +41 -0
- package/dist/components/animate-ui/primitives/base/checkbox.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/dialog.d.ts +33 -0
- package/dist/components/animate-ui/primitives/base/dialog.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/dialog.js +60 -0
- package/dist/components/animate-ui/primitives/base/dialog.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/menu.d.ts +60 -0
- package/dist/components/animate-ui/primitives/base/menu.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/menu.js +122 -0
- package/dist/components/animate-ui/primitives/base/menu.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/popover.d.ts +30 -0
- package/dist/components/animate-ui/primitives/base/popover.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/popover.js +45 -0
- package/dist/components/animate-ui/primitives/base/popover.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/progress.d.ts +297 -0
- package/dist/components/animate-ui/primitives/base/progress.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/progress.js +27 -0
- package/dist/components/animate-ui/primitives/base/progress.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/switch.d.ts +23 -0
- package/dist/components/animate-ui/primitives/base/switch.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/switch.js +36 -0
- package/dist/components/animate-ui/primitives/base/switch.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/tabs.d.ts +33 -0
- package/dist/components/animate-ui/primitives/base/tabs.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/tabs.js +53 -0
- package/dist/components/animate-ui/primitives/base/tabs.js.map +1 -0
- package/dist/components/animate-ui/primitives/base/tooltip.d.ts +31 -0
- package/dist/components/animate-ui/primitives/base/tooltip.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/base/tooltip.js +71 -0
- package/dist/components/animate-ui/primitives/base/tooltip.js.map +1 -0
- package/dist/components/animate-ui/primitives/effects/auto-height.d.ts +12 -0
- package/dist/components/animate-ui/primitives/effects/auto-height.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/effects/auto-height.js +18 -0
- package/dist/components/animate-ui/primitives/effects/auto-height.js.map +1 -0
- package/dist/components/animate-ui/primitives/effects/highlight.d.ts +92 -0
- package/dist/components/animate-ui/primitives/effects/highlight.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/effects/highlight.js +315 -0
- package/dist/components/animate-ui/primitives/effects/highlight.js.map +1 -0
- package/dist/components/animate-ui/primitives/texts/counting-number.d.ts +16 -0
- package/dist/components/animate-ui/primitives/texts/counting-number.d.ts.map +1 -0
- package/dist/components/animate-ui/primitives/texts/counting-number.js +69 -0
- package/dist/components/animate-ui/primitives/texts/counting-number.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +21 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +43 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/badge/badge.d.ts +37 -0
- package/dist/components/ui/badge/badge.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.js +40 -0
- package/dist/components/ui/badge/badge.js.map +1 -0
- package/dist/components/ui/badge/badge.styles.d.ts +23 -0
- package/dist/components/ui/badge/badge.styles.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.styles.js +39 -0
- package/dist/components/ui/badge/badge.styles.js.map +1 -0
- package/dist/components/ui/badge/badge.types.d.ts +38 -0
- package/dist/components/ui/badge/badge.types.d.ts.map +1 -0
- package/dist/components/ui/badge/badge.types.js +2 -0
- package/dist/components/ui/badge/badge.types.js.map +1 -0
- package/dist/components/ui/badge/index.d.ts +8 -0
- package/dist/components/ui/badge/index.d.ts.map +1 -0
- package/dist/components/ui/badge/index.js +7 -0
- package/dist/components/ui/badge/index.js.map +1 -0
- package/dist/components/ui/button/button.d.ts +79 -0
- package/dist/components/ui/button/button.d.ts.map +1 -0
- package/dist/components/ui/button/button.js +121 -0
- package/dist/components/ui/button/button.js.map +1 -0
- package/dist/components/ui/button/button.styles.d.ts +33 -0
- package/dist/components/ui/button/button.styles.d.ts.map +1 -0
- package/dist/components/ui/button/button.styles.js +54 -0
- package/dist/components/ui/button/button.styles.js.map +1 -0
- package/dist/components/ui/button/button.types.d.ts +103 -0
- package/dist/components/ui/button/button.types.d.ts.map +1 -0
- package/dist/components/ui/button/button.types.js +2 -0
- package/dist/components/ui/button/button.types.js.map +1 -0
- package/dist/components/ui/button/index.d.ts +7 -0
- package/dist/components/ui/button/index.d.ts.map +1 -0
- package/dist/components/ui/button/index.js +7 -0
- package/dist/components/ui/button/index.js.map +1 -0
- package/dist/components/ui/card.d.ts +14 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +38 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +62 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/devenv-bracket.d.ts +30 -0
- package/dist/components/ui/devenv-bracket.d.ts.map +1 -0
- package/dist/components/ui/devenv-bracket.js +49 -0
- package/dist/components/ui/devenv-bracket.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +53 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/field.d.ts +25 -0
- package/dist/components/ui/field.d.ts.map +1 -0
- package/dist/components/ui/field.js +69 -0
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/index.d.ts +23 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +25 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +58 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +8 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +7 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/morphing-popover/index.d.ts +10 -0
- package/dist/components/ui/morphing-popover/index.d.ts.map +1 -0
- package/dist/components/ui/morphing-popover/index.js +9 -0
- package/dist/components/ui/morphing-popover/index.js.map +1 -0
- package/dist/components/ui/morphing-popover/morphing-popover.d.ts +54 -0
- package/dist/components/ui/morphing-popover/morphing-popover.d.ts.map +1 -0
- package/dist/components/ui/morphing-popover/morphing-popover.js +50 -0
- package/dist/components/ui/morphing-popover/morphing-popover.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +35 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +9 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +7 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/hooks/use-auto-height.d.ts +11 -0
- package/dist/hooks/use-auto-height.d.ts.map +1 -0
- package/dist/hooks/use-auto-height.js +75 -0
- package/dist/hooks/use-auto-height.js.map +1 -0
- package/dist/hooks/use-controlled-state.d.ts +9 -0
- package/dist/hooks/use-controlled-state.d.ts.map +1 -0
- package/dist/hooks/use-controlled-state.js +16 -0
- package/dist/hooks/use-controlled-state.js.map +1 -0
- package/dist/hooks/use-data-state.d.ts +5 -0
- package/dist/hooks/use-data-state.d.ts.map +1 -0
- package/dist/hooks/use-data-state.js +45 -0
- package/dist/hooks/use-data-state.js.map +1 -0
- package/dist/hooks/use-is-in-view.d.ts +13 -0
- package/dist/hooks/use-is-in-view.d.ts.map +1 -0
- package/dist/hooks/use-is-in-view.js +15 -0
- package/dist/hooks/use-is-in-view.js.map +1 -0
- package/dist/icons/index.d.ts +8 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +11 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/lucide-animated/activity.d.ts +11 -0
- package/dist/icons/lucide-animated/activity.d.ts.map +1 -0
- package/dist/icons/lucide-animated/activity.js +57 -0
- package/dist/icons/lucide-animated/activity.js.map +1 -0
- package/dist/icons/lucide-animated/arrow-down-to-line.d.ts +23 -0
- package/dist/icons/lucide-animated/arrow-down-to-line.d.ts.map +1 -0
- package/dist/icons/lucide-animated/arrow-down-to-line.js +23 -0
- package/dist/icons/lucide-animated/arrow-down-to-line.js.map +1 -0
- package/dist/icons/lucide-animated/arrow-up.d.ts +23 -0
- package/dist/icons/lucide-animated/arrow-up.d.ts.map +1 -0
- package/dist/icons/lucide-animated/arrow-up.js +23 -0
- package/dist/icons/lucide-animated/arrow-up.js.map +1 -0
- package/dist/icons/lucide-animated/bell-electric.d.ts +11 -0
- package/dist/icons/lucide-animated/bell-electric.d.ts.map +1 -0
- package/dist/icons/lucide-animated/bell-electric.js +58 -0
- package/dist/icons/lucide-animated/bell-electric.js.map +1 -0
- package/dist/icons/lucide-animated/bell.d.ts +11 -0
- package/dist/icons/lucide-animated/bell.d.ts.map +1 -0
- package/dist/icons/lucide-animated/bell.js +43 -0
- package/dist/icons/lucide-animated/bell.js.map +1 -0
- package/dist/icons/lucide-animated/bot.d.ts +11 -0
- package/dist/icons/lucide-animated/bot.d.ts.map +1 -0
- package/dist/icons/lucide-animated/bot.js +58 -0
- package/dist/icons/lucide-animated/bot.js.map +1 -0
- package/dist/icons/lucide-animated/box.d.ts +11 -0
- package/dist/icons/lucide-animated/box.d.ts.map +1 -0
- package/dist/icons/lucide-animated/box.js +54 -0
- package/dist/icons/lucide-animated/box.js.map +1 -0
- package/dist/icons/lucide-animated/check.d.ts +7 -0
- package/dist/icons/lucide-animated/check.d.ts.map +1 -0
- package/dist/icons/lucide-animated/check.js +10 -0
- package/dist/icons/lucide-animated/check.js.map +1 -0
- package/dist/icons/lucide-animated/circle-check.d.ts +11 -0
- package/dist/icons/lucide-animated/circle-check.d.ts.map +1 -0
- package/dist/icons/lucide-animated/circle-check.js +54 -0
- package/dist/icons/lucide-animated/circle-check.js.map +1 -0
- package/dist/icons/lucide-animated/delete.d.ts +11 -0
- package/dist/icons/lucide-animated/delete.d.ts.map +1 -0
- package/dist/icons/lucide-animated/delete.js +54 -0
- package/dist/icons/lucide-animated/delete.js.map +1 -0
- package/dist/icons/lucide-animated/download.d.ts +11 -0
- package/dist/icons/lucide-animated/download.d.ts.map +1 -0
- package/dist/icons/lucide-animated/download.js +48 -0
- package/dist/icons/lucide-animated/download.js.map +1 -0
- package/dist/icons/lucide-animated/edit-2.d.ts +7 -0
- package/dist/icons/lucide-animated/edit-2.d.ts.map +1 -0
- package/dist/icons/lucide-animated/edit-2.js +10 -0
- package/dist/icons/lucide-animated/edit-2.js.map +1 -0
- package/dist/icons/lucide-animated/globe.d.ts +7 -0
- package/dist/icons/lucide-animated/globe.d.ts.map +1 -0
- package/dist/icons/lucide-animated/globe.js +10 -0
- package/dist/icons/lucide-animated/globe.js.map +1 -0
- package/dist/icons/lucide-animated/home.d.ts +11 -0
- package/dist/icons/lucide-animated/home.d.ts.map +1 -0
- package/dist/icons/lucide-animated/home.js +50 -0
- package/dist/icons/lucide-animated/home.js.map +1 -0
- package/dist/icons/lucide-animated/index.d.ts +38 -0
- package/dist/icons/lucide-animated/index.d.ts.map +1 -0
- package/dist/icons/lucide-animated/index.js +38 -0
- package/dist/icons/lucide-animated/index.js.map +1 -0
- package/dist/icons/lucide-animated/layers.d.ts +7 -0
- package/dist/icons/lucide-animated/layers.d.ts.map +1 -0
- package/dist/icons/lucide-animated/layers.js +10 -0
- package/dist/icons/lucide-animated/layers.js.map +1 -0
- package/dist/icons/lucide-animated/layout-panel-top.d.ts +11 -0
- package/dist/icons/lucide-animated/layout-panel-top.d.ts.map +1 -0
- package/dist/icons/lucide-animated/layout-panel-top.js +68 -0
- package/dist/icons/lucide-animated/layout-panel-top.js.map +1 -0
- package/dist/icons/lucide-animated/list.d.ts +23 -0
- package/dist/icons/lucide-animated/list.d.ts.map +1 -0
- package/dist/icons/lucide-animated/list.js +23 -0
- package/dist/icons/lucide-animated/list.js.map +1 -0
- package/dist/icons/lucide-animated/package.d.ts +7 -0
- package/dist/icons/lucide-animated/package.d.ts.map +1 -0
- package/dist/icons/lucide-animated/package.js +10 -0
- package/dist/icons/lucide-animated/package.js.map +1 -0
- package/dist/icons/lucide-animated/palette.d.ts +7 -0
- package/dist/icons/lucide-animated/palette.d.ts.map +1 -0
- package/dist/icons/lucide-animated/palette.js +10 -0
- package/dist/icons/lucide-animated/palette.js.map +1 -0
- package/dist/icons/lucide-animated/plus.d.ts +11 -0
- package/dist/icons/lucide-animated/plus.d.ts.map +1 -0
- package/dist/icons/lucide-animated/plus.js +43 -0
- package/dist/icons/lucide-animated/plus.js.map +1 -0
- package/dist/icons/lucide-animated/refresh-cw.d.ts +7 -0
- package/dist/icons/lucide-animated/refresh-cw.d.ts.map +1 -0
- package/dist/icons/lucide-animated/refresh-cw.js +10 -0
- package/dist/icons/lucide-animated/refresh-cw.js.map +1 -0
- package/dist/icons/lucide-animated/rocket.d.ts +7 -0
- package/dist/icons/lucide-animated/rocket.d.ts.map +1 -0
- package/dist/icons/lucide-animated/rocket.js +10 -0
- package/dist/icons/lucide-animated/rocket.js.map +1 -0
- package/dist/icons/lucide-animated/save.d.ts +7 -0
- package/dist/icons/lucide-animated/save.d.ts.map +1 -0
- package/dist/icons/lucide-animated/save.js +10 -0
- package/dist/icons/lucide-animated/save.js.map +1 -0
- package/dist/icons/lucide-animated/search.d.ts +11 -0
- package/dist/icons/lucide-animated/search.d.ts.map +1 -0
- package/dist/icons/lucide-animated/search.js +45 -0
- package/dist/icons/lucide-animated/search.js.map +1 -0
- package/dist/icons/lucide-animated/settings.d.ts +11 -0
- package/dist/icons/lucide-animated/settings.d.ts.map +1 -0
- package/dist/icons/lucide-animated/settings.js +43 -0
- package/dist/icons/lucide-animated/settings.js.map +1 -0
- package/dist/icons/lucide-animated/terminal.d.ts +24 -0
- package/dist/icons/lucide-animated/terminal.d.ts.map +1 -0
- package/dist/icons/lucide-animated/terminal.js +5 -0
- package/dist/icons/lucide-animated/terminal.js.map +1 -0
- package/dist/icons/lucide-animated/trash-2.d.ts +7 -0
- package/dist/icons/lucide-animated/trash-2.d.ts.map +1 -0
- package/dist/icons/lucide-animated/trash-2.js +10 -0
- package/dist/icons/lucide-animated/trash-2.js.map +1 -0
- package/dist/icons/lucide-animated/trending-down.d.ts +11 -0
- package/dist/icons/lucide-animated/trending-down.d.ts.map +1 -0
- package/dist/icons/lucide-animated/trending-down.js +87 -0
- package/dist/icons/lucide-animated/trending-down.js.map +1 -0
- package/dist/icons/lucide-animated/trending-up.d.ts +11 -0
- package/dist/icons/lucide-animated/trending-up.d.ts.map +1 -0
- package/dist/icons/lucide-animated/trending-up.js +87 -0
- package/dist/icons/lucide-animated/trending-up.js.map +1 -0
- package/dist/icons/lucide-animated/type.d.ts +7 -0
- package/dist/icons/lucide-animated/type.d.ts.map +1 -0
- package/dist/icons/lucide-animated/type.js +10 -0
- package/dist/icons/lucide-animated/type.js.map +1 -0
- package/dist/icons/lucide-animated/upload.d.ts +7 -0
- package/dist/icons/lucide-animated/upload.d.ts.map +1 -0
- package/dist/icons/lucide-animated/upload.js +10 -0
- package/dist/icons/lucide-animated/upload.js.map +1 -0
- package/dist/icons/lucide-animated/x.d.ts +11 -0
- package/dist/icons/lucide-animated/x.d.ts.map +1 -0
- package/dist/icons/lucide-animated/x.js +46 -0
- package/dist/icons/lucide-animated/x.js.map +1 -0
- package/dist/index.css +129 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/get-strict-context.d.ts +10 -0
- package/dist/lib/get-strict-context.d.ts.map +1 -0
- package/dist/lib/get-strict-context.js +16 -0
- package/dist/lib/get-strict-context.js.map +1 -0
- package/dist/lib/utils.d.ts +20 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +23 -0
- package/dist/lib/utils.js.map +1 -0
- package/package.json +84 -0
- package/src/assets/react.svg +1 -0
- package/src/components/animate-ui/primitives/animate/slot.tsx +96 -0
- package/src/components/animate-ui/primitives/base/accordion.tsx +179 -0
- package/src/components/animate-ui/primitives/base/alert-dialog.tsx +218 -0
- package/src/components/animate-ui/primitives/base/checkbox.tsx +153 -0
- package/src/components/animate-ui/primitives/base/dialog.tsx +203 -0
- package/src/components/animate-ui/primitives/base/menu.tsx +463 -0
- package/src/components/animate-ui/primitives/base/popover.tsx +167 -0
- package/src/components/animate-ui/primitives/base/progress.tsx +103 -0
- package/src/components/animate-ui/primitives/base/switch.tsx +158 -0
- package/src/components/animate-ui/primitives/base/tabs.tsx +202 -0
- package/src/components/animate-ui/primitives/base/tooltip.tsx +209 -0
- package/src/components/animate-ui/primitives/effects/auto-height.tsx +55 -0
- package/src/components/animate-ui/primitives/effects/highlight.tsx +640 -0
- package/src/components/animate-ui/primitives/texts/counting-number.tsx +119 -0
- package/src/components/ui/alert-dialog.tsx +177 -0
- package/src/components/ui/badge/badge.styles.ts +46 -0
- package/src/components/ui/badge/badge.tsx +52 -0
- package/src/components/ui/badge/badge.types.ts +41 -0
- package/src/components/ui/badge/index.ts +8 -0
- package/src/components/ui/button/button.styles.ts +66 -0
- package/src/components/ui/button/button.tsx +209 -0
- package/src/components/ui/button/button.types.ts +125 -0
- package/src/components/ui/button/index.ts +7 -0
- package/src/components/ui/card.tsx +108 -0
- package/src/components/ui/combobox.tsx +293 -0
- package/src/components/ui/devenv-bracket.tsx +81 -0
- package/src/components/ui/dropdown-menu.tsx +261 -0
- package/src/components/ui/field.tsx +227 -0
- package/src/components/ui/index.ts +26 -0
- package/src/components/ui/input-group.tsx +149 -0
- package/src/components/ui/input.tsx +20 -0
- package/src/components/ui/label.tsx +18 -0
- package/src/components/ui/morphing-popover/index.ts +10 -0
- package/src/components/ui/morphing-popover/morphing-popover.module.css +153 -0
- package/src/components/ui/morphing-popover/morphing-popover.tsx +183 -0
- package/src/components/ui/select.tsx +190 -0
- package/src/components/ui/separator.tsx +25 -0
- package/src/components/ui/textarea.tsx +18 -0
- package/src/hooks/use-auto-height.tsx +102 -0
- package/src/hooks/use-controlled-state.tsx +33 -0
- package/src/hooks/use-data-state.tsx +54 -0
- package/src/hooks/use-is-in-view.tsx +25 -0
- package/src/icons/index.ts +12 -0
- package/src/icons/lucide-animated/activity.tsx +109 -0
- package/src/icons/lucide-animated/arrow-down-to-line.tsx +51 -0
- package/src/icons/lucide-animated/arrow-up.tsx +50 -0
- package/src/icons/lucide-animated/bell-electric.tsx +124 -0
- package/src/icons/lucide-animated/bell.tsx +93 -0
- package/src/icons/lucide-animated/bot.tsx +122 -0
- package/src/icons/lucide-animated/box.tsx +117 -0
- package/src/icons/lucide-animated/check.tsx +21 -0
- package/src/icons/lucide-animated/circle-check.tsx +107 -0
- package/src/icons/lucide-animated/delete.tsx +133 -0
- package/src/icons/lucide-animated/download.tsx +99 -0
- package/src/icons/lucide-animated/edit-2.tsx +21 -0
- package/src/icons/lucide-animated/globe.tsx +23 -0
- package/src/icons/lucide-animated/home.tsx +103 -0
- package/src/icons/lucide-animated/index.ts +38 -0
- package/src/icons/lucide-animated/layers.tsx +23 -0
- package/src/icons/lucide-animated/layout-panel-top.tsx +143 -0
- package/src/icons/lucide-animated/list.tsx +54 -0
- package/src/icons/lucide-animated/package.tsx +24 -0
- package/src/icons/lucide-animated/palette.tsx +25 -0
- package/src/icons/lucide-animated/plus.tsx +92 -0
- package/src/icons/lucide-animated/refresh-cw.tsx +24 -0
- package/src/icons/lucide-animated/rocket.tsx +24 -0
- package/src/icons/lucide-animated/save.tsx +23 -0
- package/src/icons/lucide-animated/search.tsx +94 -0
- package/src/icons/lucide-animated/settings.tsx +92 -0
- package/src/icons/lucide-animated/terminal.tsx +46 -0
- package/src/icons/lucide-animated/trash-2.tsx +25 -0
- package/src/icons/lucide-animated/trending-down.tsx +151 -0
- package/src/icons/lucide-animated/trending-up.tsx +150 -0
- package/src/icons/lucide-animated/type.tsx +23 -0
- package/src/icons/lucide-animated/upload.tsx +23 -0
- package/src/icons/lucide-animated/x.tsx +102 -0
- package/src/index.css +129 -0
- package/src/index.ts +20 -0
- package/src/lib/get-strict-context.tsx +36 -0
- package/src/lib/utils.ts +24 -0
- package/src/types/css-modules.d.ts +18 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
/**
|
|
3
|
+
* Variantes de estilo para el componente Badge usando CVA (Class Variance Authority).
|
|
4
|
+
*
|
|
5
|
+
* Define las combinaciones de variantes visuales soportadas:
|
|
6
|
+
* - variant: default, secondary, destructive, outline
|
|
7
|
+
* - size: default, sm, lg
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://cva.style/docs/getting-started/variants}
|
|
10
|
+
*/
|
|
11
|
+
export const badgeVariants = cva("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", {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
15
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
17
|
+
outline: "text-foreground",
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-6 px-2.5 py-0.5",
|
|
21
|
+
sm: "h-5 px-2 text-[10px]",
|
|
22
|
+
lg: "h-7 px-3 text-sm",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
variant: "default",
|
|
27
|
+
size: "default",
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* Estilos estáticos para el componente Badge.
|
|
32
|
+
*
|
|
33
|
+
* Útil cuando se necesitan clases específicas fuera del sistema de variantes.
|
|
34
|
+
*/
|
|
35
|
+
export const badgeStyles = {
|
|
36
|
+
base: "inline-flex items-center justify-center rounded-full border font-semibold transition-colors",
|
|
37
|
+
focus: "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=badge.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.styles.js","sourceRoot":"","sources":["../../../../src/components/ui/badge/badge.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,CAC9B,uLAAuL,EACvL;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,2EAA2E;YAC7E,SAAS,EACP,iFAAiF;YACnF,WAAW,EACT,uFAAuF;YACzF,OAAO,EAAE,iBAAiB;SAC3B;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,mBAAmB;YAC5B,EAAE,EAAE,sBAAsB;YAC1B,EAAE,EAAE,kBAAkB;SACvB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,6FAA6F;IACnG,KAAK,EAAE,qEAAqE;CAC7E,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
/**
|
|
3
|
+
* Props para el componente Badge.
|
|
4
|
+
*
|
|
5
|
+
* @interface IBadgeProps
|
|
6
|
+
* @extends React.HTMLAttributes<HTMLDivElement>
|
|
7
|
+
* @extends VariantProps<typeof badgeVariants>
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* // Badge por defecto
|
|
12
|
+
* <Badge>Nuevo</Badge>
|
|
13
|
+
*
|
|
14
|
+
* // Badge con variante destructiva
|
|
15
|
+
* <Badge variant="destructive">Error</Badge>
|
|
16
|
+
*
|
|
17
|
+
* // Badge con tamaño pequeño
|
|
18
|
+
* <Badge size="sm">Mini</Badge>
|
|
19
|
+
*
|
|
20
|
+
* // Badge con variante outline
|
|
21
|
+
* <Badge variant="outline">Borrador</Badge>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export interface IBadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof import("./badge.styles").badgeVariants> {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Variantes disponibles para el componente Badge.
|
|
28
|
+
*
|
|
29
|
+
* @type BadgeVariant
|
|
30
|
+
*/
|
|
31
|
+
export type BadgeVariant = "default" | "secondary" | "destructive" | "outline";
|
|
32
|
+
/**
|
|
33
|
+
* Tamaños disponibles para el componente Badge.
|
|
34
|
+
*
|
|
35
|
+
* @type BadgeSize
|
|
36
|
+
*/
|
|
37
|
+
export type BadgeSize = "default" | "sm" | "lg";
|
|
38
|
+
//# sourceMappingURL=badge.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge/badge.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAC1C,YAAY,CAAC,cAAc,gBAAgB,EAAE,aAAa,CAAC;CAAG;AAElE;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,GAAG,SAAS,CAAC;AAE/E;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.types.js","sourceRoot":"","sources":["../../../../src/components/ui/badge/badge.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/badge/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC/C,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/badge/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { IButtonProps } from "./button.types";
|
|
2
|
+
/**
|
|
3
|
+
* Componente Button basado en Base UI.
|
|
4
|
+
*
|
|
5
|
+
* Un componente de botón que puede renderizarse como otra etiqueta
|
|
6
|
+
* o mantenerse enfocable cuando está deshabilitado.
|
|
7
|
+
*
|
|
8
|
+
* Características:
|
|
9
|
+
* - Soporte para múltiples variantes de estilo (default, secondary, destructive, outline, ghost, link, success, warning)
|
|
10
|
+
* - Múltiples tamaños (default, sm, lg, icon)
|
|
11
|
+
* - Patrón asChild para composición con otros elementos
|
|
12
|
+
* - Renderizado flexible con la prop `render`
|
|
13
|
+
* - Estados accesibles (disabled, pressed)
|
|
14
|
+
* - Clases y estilos dinámicos basados en estado
|
|
15
|
+
*
|
|
16
|
+
* @param props - Props del componente incluyendo variantes de estilo y comportamiento
|
|
17
|
+
* @returns Elemento button renderizado (o elemento personalizado si se usa `asChild` o `render`)
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* import { Button } from "@/components/ui/button";
|
|
22
|
+
*
|
|
23
|
+
* function Example() {
|
|
24
|
+
* return (
|
|
25
|
+
* <div className="flex gap-2">
|
|
26
|
+
* <Button>Default</Button>
|
|
27
|
+
* <Button variant="secondary">Secondary</Button>
|
|
28
|
+
* <Button variant="destructive">Delete</Button>
|
|
29
|
+
* <Button variant="success">Saved</Button>
|
|
30
|
+
* <Button variant="warning">Warning</Button>
|
|
31
|
+
* <Button variant="outline">Outline</Button>
|
|
32
|
+
* <Button variant="ghost">Ghost</Button>
|
|
33
|
+
* <Button variant="link">Link</Button>
|
|
34
|
+
* <Button size="sm">Small</Button>
|
|
35
|
+
* <Button size="lg">Large</Button>
|
|
36
|
+
* <Button size="icon">
|
|
37
|
+
* <Icon />
|
|
38
|
+
* </Button>
|
|
39
|
+
* <Button disabled>Disabled</Button>
|
|
40
|
+
* <Button disabled focusableWhenDisabled>
|
|
41
|
+
* Loading...
|
|
42
|
+
* </Button>
|
|
43
|
+
* <Button asChild>
|
|
44
|
+
* <a href="/link">Link Button</a>
|
|
45
|
+
* </Button>
|
|
46
|
+
* </div>
|
|
47
|
+
* );
|
|
48
|
+
* }
|
|
49
|
+
* ```
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* // Button con renderizado personalizado
|
|
54
|
+
* <Button render={<div />} nativeButton={false}>
|
|
55
|
+
* Custom container
|
|
56
|
+
* </Button>
|
|
57
|
+
*
|
|
58
|
+
* // Button con clases dinámicas basadas en estado
|
|
59
|
+
* <Button
|
|
60
|
+
* className={(state) =>
|
|
61
|
+
* cn(
|
|
62
|
+
* "transition-transform",
|
|
63
|
+
* state.pressed && "scale-95"
|
|
64
|
+
* )
|
|
65
|
+
* }
|
|
66
|
+
* >
|
|
67
|
+
* Press me
|
|
68
|
+
* </Button>
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @see {@link IButtonProps}
|
|
72
|
+
* @see {@link buttonVariants}
|
|
73
|
+
* @see {@link https://base-ui.com/react/components/button}
|
|
74
|
+
*/
|
|
75
|
+
declare function Button({ className, variant, size, focusableWhenDisabled, nativeButton, asChild, render, style, children, disabled, onPointerDown, onPointerUp, onPointerLeave, ...props }: IButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export { Button };
|
|
77
|
+
export { buttonVariants, buttonStateStyles } from "./button.styles";
|
|
78
|
+
export type { IButtonProps, IButtonState, ButtonVariant, ButtonSize, } from "./button.types";
|
|
79
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAmBjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,qBAAqB,EACrB,YAAY,EACZ,OAAe,EACf,MAAM,EACN,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,EACd,GAAG,KAAK,EACT,EAAE,YAAY,2CAqFd;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpE,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,UAAU,GACX,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
5
|
+
import { cn } from "@/lib/utils";
|
|
6
|
+
import { buttonVariants, buttonStateStyles } from "./button.styles";
|
|
7
|
+
/**
|
|
8
|
+
* Slot component para el patrón asChild.
|
|
9
|
+
* Permite componer el botón con otro elemento pasando todas las props y handlers.
|
|
10
|
+
*/
|
|
11
|
+
function Slot({ children, ...props }) {
|
|
12
|
+
const child = React.Children.only(children);
|
|
13
|
+
return React.cloneElement(child, {
|
|
14
|
+
...props,
|
|
15
|
+
...child.props,
|
|
16
|
+
className: cn(props.className, child.props.className),
|
|
17
|
+
style: { ...props.style, ...child.props.style },
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Componente Button basado en Base UI.
|
|
22
|
+
*
|
|
23
|
+
* Un componente de botón que puede renderizarse como otra etiqueta
|
|
24
|
+
* o mantenerse enfocable cuando está deshabilitado.
|
|
25
|
+
*
|
|
26
|
+
* Características:
|
|
27
|
+
* - Soporte para múltiples variantes de estilo (default, secondary, destructive, outline, ghost, link, success, warning)
|
|
28
|
+
* - Múltiples tamaños (default, sm, lg, icon)
|
|
29
|
+
* - Patrón asChild para composición con otros elementos
|
|
30
|
+
* - Renderizado flexible con la prop `render`
|
|
31
|
+
* - Estados accesibles (disabled, pressed)
|
|
32
|
+
* - Clases y estilos dinámicos basados en estado
|
|
33
|
+
*
|
|
34
|
+
* @param props - Props del componente incluyendo variantes de estilo y comportamiento
|
|
35
|
+
* @returns Elemento button renderizado (o elemento personalizado si se usa `asChild` o `render`)
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* import { Button } from "@/components/ui/button";
|
|
40
|
+
*
|
|
41
|
+
* function Example() {
|
|
42
|
+
* return (
|
|
43
|
+
* <div className="flex gap-2">
|
|
44
|
+
* <Button>Default</Button>
|
|
45
|
+
* <Button variant="secondary">Secondary</Button>
|
|
46
|
+
* <Button variant="destructive">Delete</Button>
|
|
47
|
+
* <Button variant="success">Saved</Button>
|
|
48
|
+
* <Button variant="warning">Warning</Button>
|
|
49
|
+
* <Button variant="outline">Outline</Button>
|
|
50
|
+
* <Button variant="ghost">Ghost</Button>
|
|
51
|
+
* <Button variant="link">Link</Button>
|
|
52
|
+
* <Button size="sm">Small</Button>
|
|
53
|
+
* <Button size="lg">Large</Button>
|
|
54
|
+
* <Button size="icon">
|
|
55
|
+
* <Icon />
|
|
56
|
+
* </Button>
|
|
57
|
+
* <Button disabled>Disabled</Button>
|
|
58
|
+
* <Button disabled focusableWhenDisabled>
|
|
59
|
+
* Loading...
|
|
60
|
+
* </Button>
|
|
61
|
+
* <Button asChild>
|
|
62
|
+
* <a href="/link">Link Button</a>
|
|
63
|
+
* </Button>
|
|
64
|
+
* </div>
|
|
65
|
+
* );
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* // Button con renderizado personalizado
|
|
72
|
+
* <Button render={<div />} nativeButton={false}>
|
|
73
|
+
* Custom container
|
|
74
|
+
* </Button>
|
|
75
|
+
*
|
|
76
|
+
* // Button con clases dinámicas basadas en estado
|
|
77
|
+
* <Button
|
|
78
|
+
* className={(state) =>
|
|
79
|
+
* cn(
|
|
80
|
+
* "transition-transform",
|
|
81
|
+
* state.pressed && "scale-95"
|
|
82
|
+
* )
|
|
83
|
+
* }
|
|
84
|
+
* >
|
|
85
|
+
* Press me
|
|
86
|
+
* </Button>
|
|
87
|
+
* ```
|
|
88
|
+
*
|
|
89
|
+
* @see {@link IButtonProps}
|
|
90
|
+
* @see {@link buttonVariants}
|
|
91
|
+
* @see {@link https://base-ui.com/react/components/button}
|
|
92
|
+
*/
|
|
93
|
+
function Button({ className, variant, size, focusableWhenDisabled, nativeButton, asChild = false, render, style, children, disabled, onPointerDown, onPointerUp, onPointerLeave, ...props }) {
|
|
94
|
+
const [pressed, setPressed] = React.useState(false);
|
|
95
|
+
const handlePointerDown = React.useCallback((e) => {
|
|
96
|
+
setPressed(true);
|
|
97
|
+
onPointerDown?.(e);
|
|
98
|
+
}, [onPointerDown]);
|
|
99
|
+
const handlePointerUp = React.useCallback((e) => {
|
|
100
|
+
setPressed(false);
|
|
101
|
+
onPointerUp?.(e);
|
|
102
|
+
}, [onPointerUp]);
|
|
103
|
+
const handlePointerLeave = React.useCallback((e) => {
|
|
104
|
+
setPressed(false);
|
|
105
|
+
onPointerLeave?.(e);
|
|
106
|
+
}, [onPointerLeave]);
|
|
107
|
+
const state = {
|
|
108
|
+
disabled: disabled ?? false,
|
|
109
|
+
pressed,
|
|
110
|
+
};
|
|
111
|
+
const baseClassName = cn(buttonVariants({ variant, size }), typeof className === "function" ? className(state) : className, pressed && buttonStateStyles.pressed);
|
|
112
|
+
const baseStyle = typeof style === "function" ? style(state) : style;
|
|
113
|
+
// Si asChild está activo, usamos el patrón Slot
|
|
114
|
+
if (asChild && React.isValidElement(children)) {
|
|
115
|
+
return (_jsx(ButtonPrimitive, { "data-slot": "button", "data-variant": variant, "data-size": size, "data-pressed": pressed, disabled: disabled, focusableWhenDisabled: focusableWhenDisabled, className: baseClassName, style: baseStyle, onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave, ...props, children: _jsx(Slot, { className: baseClassName, style: baseStyle, children: children }) }));
|
|
116
|
+
}
|
|
117
|
+
return (_jsx(ButtonPrimitive, { "data-slot": "button", "data-variant": variant, "data-size": size, "data-pressed": pressed, disabled: disabled, focusableWhenDisabled: focusableWhenDisabled, nativeButton: nativeButton, render: render, className: baseClassName, style: baseStyle, onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, onPointerLeave: handlePointerLeave, ...props, children: children }));
|
|
118
|
+
}
|
|
119
|
+
export { Button };
|
|
120
|
+
export { buttonVariants, buttonStateStyles } from "./button.styles";
|
|
121
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/ui/button/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;GAGG;AACH,SAAS,IAAI,CAAC,EACZ,QAAQ,EACR,GAAG,KAAK,EAC6D;IACrE,MAAM,KAAK,GAA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E,MAAa,EACrB,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,SAAS,EAChB,aAAa,EAAE,iBAAiB,EAChC,WAAW,EAAE,eAAe,EAC5B,cAAc,EAAE,kBAAkB,KAC9B,KAAK,YAER,QAAQ,GACO,CACnB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Variantes de estilo para el componente Button usando CVA (Class Variance Authority).
|
|
3
|
+
*
|
|
4
|
+
* Define las combinaciones de variantes visuales soportadas:
|
|
5
|
+
* - variant: default, secondary, destructive, outline, ghost, link, success, warning
|
|
6
|
+
* - size: default, sm, lg, icon
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://cva.style/docs/getting-started/variants}
|
|
9
|
+
*/
|
|
10
|
+
export declare const buttonVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "success" | "warning" | null | undefined;
|
|
12
|
+
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Estilos estáticos para el componente Button.
|
|
16
|
+
*
|
|
17
|
+
* Útil cuando se necesitan clases específicas fuera del sistema de variantes.
|
|
18
|
+
*/
|
|
19
|
+
export declare const buttonStyles: {
|
|
20
|
+
base: string;
|
|
21
|
+
focus: string;
|
|
22
|
+
disabled: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
pressed: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Clases para estados específicos del botón.
|
|
28
|
+
*/
|
|
29
|
+
export declare const buttonStateStyles: {
|
|
30
|
+
pressed: string;
|
|
31
|
+
disabled: string;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=button.styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/button.styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;8EAgC1B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;CAOxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
/**
|
|
3
|
+
* Variantes de estilo para el componente Button usando CVA (Class Variance Authority).
|
|
4
|
+
*
|
|
5
|
+
* Define las combinaciones de variantes visuales soportadas:
|
|
6
|
+
* - variant: default, secondary, destructive, outline, ghost, link, success, warning
|
|
7
|
+
* - size: default, sm, lg, icon
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://cva.style/docs/getting-started/variants}
|
|
10
|
+
*/
|
|
11
|
+
export const buttonVariants = cva("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]", {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
17
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
18
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
19
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
20
|
+
success: "bg-emerald-600 text-white hover:bg-emerald-700 focus-visible:ring-emerald-600",
|
|
21
|
+
warning: "bg-amber-500 text-white hover:bg-amber-600 focus-visible:ring-amber-500",
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
default: "h-10 px-4 py-2",
|
|
25
|
+
sm: "h-9 rounded-md px-3 text-xs",
|
|
26
|
+
lg: "h-11 rounded-md px-8 text-base",
|
|
27
|
+
icon: "h-10 w-10 p-0",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "default",
|
|
32
|
+
size: "default",
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* Estilos estáticos para el componente Button.
|
|
37
|
+
*
|
|
38
|
+
* Útil cuando se necesitan clases específicas fuera del sistema de variantes.
|
|
39
|
+
*/
|
|
40
|
+
export const buttonStyles = {
|
|
41
|
+
base: "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-all",
|
|
42
|
+
focus: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
43
|
+
disabled: "disabled:pointer-events-none disabled:opacity-50",
|
|
44
|
+
icon: "[&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
45
|
+
pressed: "active:scale-[0.98]",
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Clases para estados específicos del botón.
|
|
49
|
+
*/
|
|
50
|
+
export const buttonStateStyles = {
|
|
51
|
+
pressed: "scale-[0.98]",
|
|
52
|
+
disabled: "opacity-50 pointer-events-none",
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=button.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.styles.js","sourceRoot":"","sources":["../../../../src/components/ui/button/button.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAC/B,qUAAqU,EACrU;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EACL,wDAAwD;YAC1D,SAAS,EACP,8DAA8D;YAChE,WAAW,EACT,oEAAoE;YACtE,OAAO,EACL,gFAAgF;YAClF,KAAK,EAAE,8CAA8C;YACrD,IAAI,EAAE,iDAAiD;YACvD,OAAO,EACL,+EAA+E;YACjF,OAAO,EACL,yEAAyE;SAC5E;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,gBAAgB;YACzB,EAAE,EAAE,6BAA6B;YACjC,EAAE,EAAE,gCAAgC;YACpC,IAAI,EAAE,eAAe;SACtB;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,uGAAuG;IAC7G,KAAK,EACH,qGAAqG;IACvG,QAAQ,EAAE,kDAAkD;IAC5D,IAAI,EAAE,8CAA8C;IACpD,OAAO,EAAE,qBAAqB;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO,EAAE,cAAc;IACvB,QAAQ,EAAE,gCAAgC;CAC3C,CAAC"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
/**
|
|
3
|
+
* Estados del componente Button.
|
|
4
|
+
*
|
|
5
|
+
* @interface IButtonState
|
|
6
|
+
*/
|
|
7
|
+
export interface IButtonState {
|
|
8
|
+
/** Indica si el botón está deshabilitado */
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
/** Indica si el botón está siendo presionado */
|
|
11
|
+
pressed: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Props para el componente Button basado en Base UI.
|
|
15
|
+
*
|
|
16
|
+
* @interface IButtonProps
|
|
17
|
+
* @extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style">
|
|
18
|
+
* @extends VariantProps<typeof import("./button.styles").buttonVariants>
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // Button por defecto
|
|
23
|
+
* <Button>Click me</Button>
|
|
24
|
+
*
|
|
25
|
+
* // Button con variante destructiva
|
|
26
|
+
* <Button variant="destructive">Delete</Button>
|
|
27
|
+
*
|
|
28
|
+
* // Button con variante success
|
|
29
|
+
* <Button variant="success">Saved</Button>
|
|
30
|
+
*
|
|
31
|
+
* // Button deshabilitado pero enfocable
|
|
32
|
+
* <Button disabled focusableWhenDisabled>Loading...</Button>
|
|
33
|
+
*
|
|
34
|
+
* // Button renderizado como div
|
|
35
|
+
* <Button render={<div />} nativeButton={false}>
|
|
36
|
+
* Custom content
|
|
37
|
+
* </Button>
|
|
38
|
+
*
|
|
39
|
+
* // Button con asChild (composición)
|
|
40
|
+
* <Button asChild>
|
|
41
|
+
* <a href="/link">Link Button</a>
|
|
42
|
+
* </Button>
|
|
43
|
+
*
|
|
44
|
+
* // Button con clase basada en estado
|
|
45
|
+
* <Button className={(state) => state.pressed ? "scale-95" : ""}>
|
|
46
|
+
* Pressable
|
|
47
|
+
* </Button>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export interface IButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style">, VariantProps<typeof import("./button.styles").buttonVariants> {
|
|
51
|
+
/**
|
|
52
|
+
* Si el botón debe ser enfocable cuando está deshabilitado.
|
|
53
|
+
* Útil para mantener el foco durante estados de carga.
|
|
54
|
+
*
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
focusableWhenDisabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Si el componente renderiza un elemento `<button>` nativo al reemplazarlo
|
|
60
|
+
* mediante la prop `render`. Establecer en `false` si el elemento renderizado
|
|
61
|
+
* no es un botón (por ejemplo, un `<div>`).
|
|
62
|
+
*
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
nativeButton?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Permite componer el botón con otro elemento (patrón asChild).
|
|
68
|
+
* El componente hijo recibirá todas las props y event handlers del botón.
|
|
69
|
+
*
|
|
70
|
+
* @default false
|
|
71
|
+
*/
|
|
72
|
+
asChild?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Permite reemplazar el elemento HTML del componente con una etiqueta diferente
|
|
75
|
+
* o componerlo con otro componente. Ignorado si `asChild` es true.
|
|
76
|
+
*
|
|
77
|
+
* Puede ser un `ReactElement` o una función que retorne el elemento a renderizar.
|
|
78
|
+
*/
|
|
79
|
+
render?: React.ReactElement | ((props: React.HTMLProps<HTMLElement>, state: IButtonState) => React.ReactElement);
|
|
80
|
+
/**
|
|
81
|
+
* Clase CSS aplicada al elemento, o una función que retorna una clase
|
|
82
|
+
* basada en el estado del componente.
|
|
83
|
+
*/
|
|
84
|
+
className?: string | ((state: IButtonState) => string | undefined);
|
|
85
|
+
/**
|
|
86
|
+
* Estilos CSS aplicados al elemento, o una función que retorna estilos
|
|
87
|
+
* basados en el estado del componente.
|
|
88
|
+
*/
|
|
89
|
+
style?: React.CSSProperties | ((state: IButtonState) => React.CSSProperties | undefined);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Variantes disponibles para el componente Button.
|
|
93
|
+
*
|
|
94
|
+
* @type ButtonVariant
|
|
95
|
+
*/
|
|
96
|
+
export type ButtonVariant = "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "success" | "warning";
|
|
97
|
+
/**
|
|
98
|
+
* Tamaños disponibles para el componente Button.
|
|
99
|
+
*
|
|
100
|
+
* @type ButtonSize
|
|
101
|
+
*/
|
|
102
|
+
export type ButtonSize = "default" | "sm" | "lg" | "icon";
|
|
103
|
+
//# sourceMappingURL=button.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.types.d.ts","sourceRoot":"","sources":["../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SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.types.js","sourceRoot":"","sources":["../../../../src/components/ui/button/button.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ui/button/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const cardVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "glass" | "glass-accent" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Card({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof cardVariants>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, cardVariants, };
|
|
14
|
+
//# sourceMappingURL=card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,YAAY;;8EAcjB,CAAA;AAED,iBAAS,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,2CAS9G;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQtE;AAED,iBAAS,eAAe,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQ5E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAWvE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQxE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,2CAQvE;AAED,OAAO,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,WAAW,EACX,YAAY,GACb,CAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "@/lib/utils";
|
|
4
|
+
const cardVariants = cva("flex flex-col gap-6 rounded-xl border transition-all", {
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
default: "bg-card text-card-foreground py-6 shadow-sm",
|
|
8
|
+
"glass": "bg-card/70 backdrop-blur-md border-border shadow-[0_4px_20px_rgba(0,0,0,0.19)]",
|
|
9
|
+
"glass-accent": "bg-card/70 backdrop-blur-md border-border-primary shadow-[0_4px_20px_rgba(212,12,103,0.25)]",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
variant: "default",
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
function Card({ className, variant, ...props }) {
|
|
17
|
+
return (_jsx("div", { "data-slot": "card", "data-variant": variant, className: cn(cardVariants({ variant }), className), ...props }));
|
|
18
|
+
}
|
|
19
|
+
function CardHeader({ className, ...props }) {
|
|
20
|
+
return (_jsx("div", { "data-slot": "card-header", className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className), ...props }));
|
|
21
|
+
}
|
|
22
|
+
function CardTitle({ className, ...props }) {
|
|
23
|
+
return (_jsx("div", { "data-slot": "card-title", className: cn("leading-none font-semibold", className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function CardDescription({ className, ...props }) {
|
|
26
|
+
return (_jsx("div", { "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function CardAction({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function CardContent({ className, ...props }) {
|
|
32
|
+
return (_jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
function CardFooter({ className, ...props }) {
|
|
35
|
+
return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className), ...props }));
|
|
36
|
+
}
|
|
37
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, cardVariants, };
|
|
38
|
+
//# sourceMappingURL=card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/ui/card.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA;AAEhC,MAAM,YAAY,GAAG,GAAG,CACtB,sDAAsD,EACtD;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,6CAA6C;YACtD,OAAO,EAAE,gFAAgF;YACzF,cAAc,EAAE,6FAA6F;SAC9G;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;KACnB;CACF,CACF,CAAA;AAED,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAmE;IAC7G,OAAO,CACL,2BACY,MAAM,kBACF,OAAO,EACrB,SAAS,EAAE,EAAE,CAAC,YAAY,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,CAAC,KAC/C,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B;IACtE,OAAO,CACL,2BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CACX,0JAA0J,EAC1J,SAAS,CACV,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED,SAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EA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