@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,293 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { Combobox as ComboboxPrimitive } from "@base-ui/react"
|
|
3
|
+
|
|
4
|
+
import { cn } from "@/lib/utils"
|
|
5
|
+
import { Button } from "@/components/ui/button"
|
|
6
|
+
import {
|
|
7
|
+
InputGroup,
|
|
8
|
+
InputGroupAddon,
|
|
9
|
+
InputGroupButton,
|
|
10
|
+
InputGroupInput,
|
|
11
|
+
} from "@/components/ui/input-group"
|
|
12
|
+
import { HugeiconsIcon } from "@hugeicons/react"
|
|
13
|
+
import { ArrowDown01Icon, Cancel01Icon, Tick02Icon } from "@hugeicons/core-free-icons"
|
|
14
|
+
|
|
15
|
+
const Combobox = ComboboxPrimitive.Root
|
|
16
|
+
|
|
17
|
+
function ComboboxValue({ ...props }: ComboboxPrimitive.Value.Props) {
|
|
18
|
+
return <ComboboxPrimitive.Value data-slot="combobox-value" {...props} />
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function ComboboxTrigger({
|
|
22
|
+
className,
|
|
23
|
+
children,
|
|
24
|
+
...props
|
|
25
|
+
}: ComboboxPrimitive.Trigger.Props) {
|
|
26
|
+
return (
|
|
27
|
+
<ComboboxPrimitive.Trigger
|
|
28
|
+
data-slot="combobox-trigger"
|
|
29
|
+
className={cn("[&_svg:not([class*='size-'])]:size-4", className)}
|
|
30
|
+
{...props}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
<HugeiconsIcon icon={ArrowDown01Icon} strokeWidth={2} className="text-muted-foreground size-4 pointer-events-none" />
|
|
34
|
+
</ComboboxPrimitive.Trigger>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function ComboboxClear({ className, ...props }: ComboboxPrimitive.Clear.Props) {
|
|
39
|
+
return (
|
|
40
|
+
<ComboboxPrimitive.Clear
|
|
41
|
+
data-slot="combobox-clear"
|
|
42
|
+
// TODO: Restore when Button component is available
|
|
43
|
+
// render={<InputGroupButton variant="ghost" size="icon-xs" />}
|
|
44
|
+
render={<InputGroupButton size="icon-xs" />}
|
|
45
|
+
className={cn(className)}
|
|
46
|
+
{...props}
|
|
47
|
+
>
|
|
48
|
+
<HugeiconsIcon icon={Cancel01Icon} strokeWidth={2} className="pointer-events-none" />
|
|
49
|
+
</ComboboxPrimitive.Clear>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function ComboboxInput({
|
|
54
|
+
className,
|
|
55
|
+
children,
|
|
56
|
+
disabled = false,
|
|
57
|
+
showTrigger = true,
|
|
58
|
+
showClear = false,
|
|
59
|
+
...props
|
|
60
|
+
}: ComboboxPrimitive.Input.Props & {
|
|
61
|
+
showTrigger?: boolean
|
|
62
|
+
showClear?: boolean
|
|
63
|
+
}) {
|
|
64
|
+
return (
|
|
65
|
+
<InputGroup className={cn("w-auto", className)}>
|
|
66
|
+
<ComboboxPrimitive.Input
|
|
67
|
+
render={<InputGroupInput disabled={disabled} />}
|
|
68
|
+
{...props}
|
|
69
|
+
/>
|
|
70
|
+
<InputGroupAddon align="inline-end">
|
|
71
|
+
{showTrigger && (
|
|
72
|
+
<InputGroupButton
|
|
73
|
+
size="icon-xs"
|
|
74
|
+
data-slot="input-group-button"
|
|
75
|
+
className="group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent"
|
|
76
|
+
disabled={disabled}
|
|
77
|
+
>
|
|
78
|
+
<ComboboxTrigger />
|
|
79
|
+
</InputGroupButton>
|
|
80
|
+
)}
|
|
81
|
+
{showClear && <ComboboxClear disabled={disabled} />}
|
|
82
|
+
</InputGroupAddon>
|
|
83
|
+
{children}
|
|
84
|
+
</InputGroup>
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function ComboboxContent({
|
|
89
|
+
className,
|
|
90
|
+
side = "bottom",
|
|
91
|
+
sideOffset = 6,
|
|
92
|
+
align = "start",
|
|
93
|
+
alignOffset = 0,
|
|
94
|
+
anchor,
|
|
95
|
+
...props
|
|
96
|
+
}: ComboboxPrimitive.Popup.Props &
|
|
97
|
+
Pick<
|
|
98
|
+
ComboboxPrimitive.Positioner.Props,
|
|
99
|
+
"side" | "align" | "sideOffset" | "alignOffset" | "anchor"
|
|
100
|
+
>) {
|
|
101
|
+
return (
|
|
102
|
+
<ComboboxPrimitive.Portal>
|
|
103
|
+
<ComboboxPrimitive.Positioner
|
|
104
|
+
side={side}
|
|
105
|
+
sideOffset={sideOffset}
|
|
106
|
+
align={align}
|
|
107
|
+
alignOffset={alignOffset}
|
|
108
|
+
anchor={anchor}
|
|
109
|
+
className="isolate z-50"
|
|
110
|
+
>
|
|
111
|
+
<ComboboxPrimitive.Popup
|
|
112
|
+
data-slot="combobox-content"
|
|
113
|
+
data-chips={!!anchor}
|
|
114
|
+
className={cn("bg-popover text-popover-foreground 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:border-input/30 overflow-hidden rounded-lg shadow-md ring-1 duration-100 *:data-[slot=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:shadow-none data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+--spacing(7))] origin-(--transform-origin) data-[chips=true]:min-w-(--anchor-width)", className )}
|
|
115
|
+
{...props}
|
|
116
|
+
/>
|
|
117
|
+
</ComboboxPrimitive.Positioner>
|
|
118
|
+
</ComboboxPrimitive.Portal>
|
|
119
|
+
)
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function ComboboxList({ className, ...props }: ComboboxPrimitive.List.Props) {
|
|
123
|
+
return (
|
|
124
|
+
<ComboboxPrimitive.List
|
|
125
|
+
data-slot="combobox-list"
|
|
126
|
+
className={cn(
|
|
127
|
+
"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 p-1 data-empty:p-0 overflow-y-auto overscroll-contain",
|
|
128
|
+
className
|
|
129
|
+
)}
|
|
130
|
+
{...props}
|
|
131
|
+
/>
|
|
132
|
+
)
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function ComboboxItem({
|
|
136
|
+
className,
|
|
137
|
+
children,
|
|
138
|
+
...props
|
|
139
|
+
}: ComboboxPrimitive.Item.Props) {
|
|
140
|
+
return (
|
|
141
|
+
<ComboboxPrimitive.Item
|
|
142
|
+
data-slot="combobox-item"
|
|
143
|
+
className={cn(
|
|
144
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
145
|
+
className
|
|
146
|
+
)}
|
|
147
|
+
{...props}
|
|
148
|
+
>
|
|
149
|
+
{children}
|
|
150
|
+
<ComboboxPrimitive.ItemIndicator
|
|
151
|
+
render={<span className="pointer-events-none absolute right-2 flex size-4 items-center justify-center" />}
|
|
152
|
+
>
|
|
153
|
+
<HugeiconsIcon icon={Tick02Icon} strokeWidth={2} className="pointer-events-none" />
|
|
154
|
+
</ComboboxPrimitive.ItemIndicator>
|
|
155
|
+
</ComboboxPrimitive.Item>
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function ComboboxGroup({ className, ...props }: ComboboxPrimitive.Group.Props) {
|
|
160
|
+
return (
|
|
161
|
+
<ComboboxPrimitive.Group
|
|
162
|
+
data-slot="combobox-group"
|
|
163
|
+
className={cn(className)}
|
|
164
|
+
{...props}
|
|
165
|
+
/>
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function ComboboxLabel({
|
|
170
|
+
className,
|
|
171
|
+
...props
|
|
172
|
+
}: ComboboxPrimitive.GroupLabel.Props) {
|
|
173
|
+
return (
|
|
174
|
+
<ComboboxPrimitive.GroupLabel
|
|
175
|
+
data-slot="combobox-label"
|
|
176
|
+
className={cn("text-muted-foreground px-2 py-1.5 text-xs", className)}
|
|
177
|
+
{...props}
|
|
178
|
+
/>
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function ComboboxCollection({ ...props }: ComboboxPrimitive.Collection.Props) {
|
|
183
|
+
return (
|
|
184
|
+
<ComboboxPrimitive.Collection data-slot="combobox-collection" {...props} />
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function ComboboxEmpty({ className, ...props }: ComboboxPrimitive.Empty.Props) {
|
|
189
|
+
return (
|
|
190
|
+
<ComboboxPrimitive.Empty
|
|
191
|
+
data-slot="combobox-empty"
|
|
192
|
+
className={cn("text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex", className)}
|
|
193
|
+
{...props}
|
|
194
|
+
/>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function ComboboxSeparator({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}: ComboboxPrimitive.Separator.Props) {
|
|
202
|
+
return (
|
|
203
|
+
<ComboboxPrimitive.Separator
|
|
204
|
+
data-slot="combobox-separator"
|
|
205
|
+
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
206
|
+
{...props}
|
|
207
|
+
/>
|
|
208
|
+
)
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
function ComboboxChips({
|
|
212
|
+
className,
|
|
213
|
+
...props
|
|
214
|
+
}: React.ComponentPropsWithRef<typeof ComboboxPrimitive.Chips> &
|
|
215
|
+
ComboboxPrimitive.Chips.Props) {
|
|
216
|
+
return (
|
|
217
|
+
<ComboboxPrimitive.Chips
|
|
218
|
+
data-slot="combobox-chips"
|
|
219
|
+
className={cn("dark:bg-input/30 border-input focus-within:border-ring focus-within:ring-ring/50 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive dark:has-aria-invalid:border-destructive/50 flex min-h-8 flex-wrap items-center gap-1 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:ring-3 has-aria-invalid:ring-3 has-data-[slot=combobox-chip]:px-1", className)}
|
|
220
|
+
{...props}
|
|
221
|
+
/>
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function ComboboxChip({
|
|
226
|
+
className,
|
|
227
|
+
children,
|
|
228
|
+
showRemove = true,
|
|
229
|
+
...props
|
|
230
|
+
}: ComboboxPrimitive.Chip.Props & {
|
|
231
|
+
showRemove?: boolean
|
|
232
|
+
}) {
|
|
233
|
+
return (
|
|
234
|
+
<ComboboxPrimitive.Chip
|
|
235
|
+
data-slot="combobox-chip"
|
|
236
|
+
className={cn(
|
|
237
|
+
"bg-muted text-foreground flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm px-1.5 text-xs font-medium whitespace-nowrap has-data-[slot=combobox-chip-remove]:pr-0 has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50",
|
|
238
|
+
className
|
|
239
|
+
)}
|
|
240
|
+
{...props}
|
|
241
|
+
>
|
|
242
|
+
{children}
|
|
243
|
+
{showRemove && (
|
|
244
|
+
<ComboboxPrimitive.ChipRemove
|
|
245
|
+
render={<Button variant="ghost" size="sm" className="h-5 w-5 p-0" />}
|
|
246
|
+
className="-ml-1 opacity-50 hover:opacity-100"
|
|
247
|
+
data-slot="combobox-chip-remove"
|
|
248
|
+
>
|
|
249
|
+
<HugeiconsIcon icon={Cancel01Icon} strokeWidth={2} className="pointer-events-none" />
|
|
250
|
+
</ComboboxPrimitive.ChipRemove>
|
|
251
|
+
)}
|
|
252
|
+
</ComboboxPrimitive.Chip>
|
|
253
|
+
)
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function ComboboxChipsInput({
|
|
257
|
+
className,
|
|
258
|
+
...props
|
|
259
|
+
}: ComboboxPrimitive.Input.Props) {
|
|
260
|
+
return (
|
|
261
|
+
<ComboboxPrimitive.Input
|
|
262
|
+
data-slot="combobox-chip-input"
|
|
263
|
+
className={cn(
|
|
264
|
+
"min-w-16 flex-1 outline-none",
|
|
265
|
+
className
|
|
266
|
+
)}
|
|
267
|
+
{...props}
|
|
268
|
+
/>
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
function useComboboxAnchor() {
|
|
273
|
+
return React.useRef<HTMLDivElement | null>(null)
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export {
|
|
277
|
+
Combobox,
|
|
278
|
+
ComboboxInput,
|
|
279
|
+
ComboboxContent,
|
|
280
|
+
ComboboxList,
|
|
281
|
+
ComboboxItem,
|
|
282
|
+
ComboboxGroup,
|
|
283
|
+
ComboboxLabel,
|
|
284
|
+
ComboboxCollection,
|
|
285
|
+
ComboboxEmpty,
|
|
286
|
+
ComboboxSeparator,
|
|
287
|
+
ComboboxChips,
|
|
288
|
+
ComboboxChip,
|
|
289
|
+
ComboboxChipsInput,
|
|
290
|
+
ComboboxTrigger,
|
|
291
|
+
ComboboxValue,
|
|
292
|
+
useComboboxAnchor,
|
|
293
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DevEnv Bracket Component
|
|
3
|
+
*
|
|
4
|
+
* Corner bracket decoration for Synthwave Industrial styling.
|
|
5
|
+
*
|
|
6
|
+
* @module @mks2508/mks-ui/components/ui
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
10
|
+
import { cn } from '@/lib/utils';
|
|
11
|
+
|
|
12
|
+
const bracketVariants = cva(
|
|
13
|
+
'absolute pointer-events-none',
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
position: {
|
|
17
|
+
tl: 'top-0 left-0',
|
|
18
|
+
tr: 'top-0 right-0',
|
|
19
|
+
bl: 'bottom-0 left-0',
|
|
20
|
+
br: 'bottom-0 right-0',
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
default: 'stroke-primary/50',
|
|
24
|
+
accent: 'stroke-primary/66',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: 'default',
|
|
29
|
+
},
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export interface IDevEnvBracketProps
|
|
34
|
+
extends Omit<React.SVGProps<SVGSVGElement>, 'variant'>,
|
|
35
|
+
VariantProps<typeof bracketVariants> {
|
|
36
|
+
size?: number;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const PATHS = {
|
|
40
|
+
tl: 'M 0 20 L 0 5 A 5 5 0 0 1 5 0 L 20 0',
|
|
41
|
+
tr: 'M 0 0 L 15 0 A 5 5 0 0 1 20 5 L 20 20',
|
|
42
|
+
bl: 'M 0 0 L 0 15 A 5 5 0 0 0 5 20 L 20 20',
|
|
43
|
+
br: 'M 20 0 L 5 0 A 5 5 0 0 0 0 5 L 0 20',
|
|
44
|
+
} as const;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* DevEnv corner bracket decoration.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```tsx
|
|
51
|
+
* <div className="relative p-4">
|
|
52
|
+
* <DevEnvBracket position="tl" />
|
|
53
|
+
* <DevEnvBracket position="br" />
|
|
54
|
+
* Content here
|
|
55
|
+
* </div>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export function DevEnvBracket({
|
|
59
|
+
className,
|
|
60
|
+
position,
|
|
61
|
+
variant,
|
|
62
|
+
size = 20,
|
|
63
|
+
...props
|
|
64
|
+
}: IDevEnvBracketProps) {
|
|
65
|
+
return (
|
|
66
|
+
<svg
|
|
67
|
+
width={size}
|
|
68
|
+
height={size}
|
|
69
|
+
viewBox="0 0 20 20"
|
|
70
|
+
fill="none"
|
|
71
|
+
className={cn(bracketVariants({ position, variant }), className)}
|
|
72
|
+
{...props}
|
|
73
|
+
>
|
|
74
|
+
<path
|
|
75
|
+
d={PATHS[position || 'tl']}
|
|
76
|
+
strokeWidth={1.5}
|
|
77
|
+
strokeLinecap="round"
|
|
78
|
+
/>
|
|
79
|
+
</svg>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import { Menu as MenuPrimitive } from "@base-ui/react/menu"
|
|
5
|
+
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
|
+
import { HugeiconsIcon } from "@hugeicons/react"
|
|
8
|
+
import { ArrowRight01Icon, Tick02Icon } from "@hugeicons/core-free-icons"
|
|
9
|
+
|
|
10
|
+
function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
|
|
11
|
+
return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
|
|
15
|
+
return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
|
|
19
|
+
return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function DropdownMenuContent({
|
|
23
|
+
align = "start",
|
|
24
|
+
alignOffset = 0,
|
|
25
|
+
side = "bottom",
|
|
26
|
+
sideOffset = 4,
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}: MenuPrimitive.Popup.Props &
|
|
30
|
+
Pick<
|
|
31
|
+
MenuPrimitive.Positioner.Props,
|
|
32
|
+
"align" | "alignOffset" | "side" | "sideOffset"
|
|
33
|
+
>) {
|
|
34
|
+
return (
|
|
35
|
+
<MenuPrimitive.Portal>
|
|
36
|
+
<MenuPrimitive.Positioner
|
|
37
|
+
className="isolate z-50 outline-none"
|
|
38
|
+
align={align}
|
|
39
|
+
alignOffset={alignOffset}
|
|
40
|
+
side={side}
|
|
41
|
+
sideOffset={sideOffset}
|
|
42
|
+
>
|
|
43
|
+
<MenuPrimitive.Popup
|
|
44
|
+
data-slot="dropdown-menu-content"
|
|
45
|
+
className={cn("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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden", className )}
|
|
46
|
+
{...props}
|
|
47
|
+
/>
|
|
48
|
+
</MenuPrimitive.Positioner>
|
|
49
|
+
</MenuPrimitive.Portal>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
|
|
54
|
+
return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function DropdownMenuLabel({
|
|
58
|
+
className,
|
|
59
|
+
inset,
|
|
60
|
+
...props
|
|
61
|
+
}: MenuPrimitive.GroupLabel.Props & {
|
|
62
|
+
inset?: boolean
|
|
63
|
+
}) {
|
|
64
|
+
return (
|
|
65
|
+
<MenuPrimitive.GroupLabel
|
|
66
|
+
data-slot="dropdown-menu-label"
|
|
67
|
+
data-inset={inset}
|
|
68
|
+
className={cn("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7", className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function DropdownMenuItem({
|
|
75
|
+
className,
|
|
76
|
+
inset,
|
|
77
|
+
variant = "default",
|
|
78
|
+
...props
|
|
79
|
+
}: MenuPrimitive.Item.Props & {
|
|
80
|
+
inset?: boolean
|
|
81
|
+
variant?: "default" | "destructive"
|
|
82
|
+
}) {
|
|
83
|
+
return (
|
|
84
|
+
<MenuPrimitive.Item
|
|
85
|
+
data-slot="dropdown-menu-item"
|
|
86
|
+
data-inset={inset}
|
|
87
|
+
data-variant={variant}
|
|
88
|
+
className={cn(
|
|
89
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
90
|
+
className
|
|
91
|
+
)}
|
|
92
|
+
{...props}
|
|
93
|
+
/>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {
|
|
98
|
+
return <MenuPrimitive.SubmenuRoot data-slot="dropdown-menu-sub" {...props} />
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function DropdownMenuSubTrigger({
|
|
102
|
+
className,
|
|
103
|
+
inset,
|
|
104
|
+
children,
|
|
105
|
+
...props
|
|
106
|
+
}: MenuPrimitive.SubmenuTrigger.Props & {
|
|
107
|
+
inset?: boolean
|
|
108
|
+
}) {
|
|
109
|
+
return (
|
|
110
|
+
<MenuPrimitive.SubmenuTrigger
|
|
111
|
+
data-slot="dropdown-menu-sub-trigger"
|
|
112
|
+
data-inset={inset}
|
|
113
|
+
className={cn(
|
|
114
|
+
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-1.5 py-1 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 data-popup-open:bg-accent data-popup-open:text-accent-foreground flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
115
|
+
className
|
|
116
|
+
)}
|
|
117
|
+
{...props}
|
|
118
|
+
>
|
|
119
|
+
{children}
|
|
120
|
+
<HugeiconsIcon icon={ArrowRight01Icon} strokeWidth={2} className="ml-auto" />
|
|
121
|
+
</MenuPrimitive.SubmenuTrigger>
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function DropdownMenuSubContent({
|
|
126
|
+
align = "start",
|
|
127
|
+
alignOffset = -3,
|
|
128
|
+
side = "right",
|
|
129
|
+
sideOffset = 0,
|
|
130
|
+
className,
|
|
131
|
+
...props
|
|
132
|
+
}: React.ComponentProps<typeof DropdownMenuContent>) {
|
|
133
|
+
return (
|
|
134
|
+
<DropdownMenuContent
|
|
135
|
+
data-slot="dropdown-menu-sub-content"
|
|
136
|
+
className={cn("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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100 w-auto", className)}
|
|
137
|
+
align={align}
|
|
138
|
+
alignOffset={alignOffset}
|
|
139
|
+
side={side}
|
|
140
|
+
sideOffset={sideOffset}
|
|
141
|
+
{...props}
|
|
142
|
+
/>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function DropdownMenuCheckboxItem({
|
|
147
|
+
className,
|
|
148
|
+
children,
|
|
149
|
+
checked,
|
|
150
|
+
inset,
|
|
151
|
+
...props
|
|
152
|
+
}: MenuPrimitive.CheckboxItem.Props & {
|
|
153
|
+
inset?: boolean
|
|
154
|
+
}) {
|
|
155
|
+
return (
|
|
156
|
+
<MenuPrimitive.CheckboxItem
|
|
157
|
+
data-slot="dropdown-menu-checkbox-item"
|
|
158
|
+
data-inset={inset}
|
|
159
|
+
className={cn(
|
|
160
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
161
|
+
className
|
|
162
|
+
)}
|
|
163
|
+
checked={checked}
|
|
164
|
+
{...props}
|
|
165
|
+
>
|
|
166
|
+
<span
|
|
167
|
+
className="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
168
|
+
data-slot="dropdown-menu-checkbox-item-indicator"
|
|
169
|
+
>
|
|
170
|
+
<MenuPrimitive.CheckboxItemIndicator>
|
|
171
|
+
<HugeiconsIcon icon={Tick02Icon} strokeWidth={2} />
|
|
172
|
+
</MenuPrimitive.CheckboxItemIndicator>
|
|
173
|
+
</span>
|
|
174
|
+
{children}
|
|
175
|
+
</MenuPrimitive.CheckboxItem>
|
|
176
|
+
)
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {
|
|
180
|
+
return (
|
|
181
|
+
<MenuPrimitive.RadioGroup
|
|
182
|
+
data-slot="dropdown-menu-radio-group"
|
|
183
|
+
{...props}
|
|
184
|
+
/>
|
|
185
|
+
)
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function DropdownMenuRadioItem({
|
|
189
|
+
className,
|
|
190
|
+
children,
|
|
191
|
+
inset,
|
|
192
|
+
...props
|
|
193
|
+
}: MenuPrimitive.RadioItem.Props & {
|
|
194
|
+
inset?: boolean
|
|
195
|
+
}) {
|
|
196
|
+
return (
|
|
197
|
+
<MenuPrimitive.RadioItem
|
|
198
|
+
data-slot="dropdown-menu-radio-item"
|
|
199
|
+
data-inset={inset}
|
|
200
|
+
className={cn(
|
|
201
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
202
|
+
className
|
|
203
|
+
)}
|
|
204
|
+
{...props}
|
|
205
|
+
>
|
|
206
|
+
<span
|
|
207
|
+
className="absolute right-2 flex items-center justify-center pointer-events-none"
|
|
208
|
+
data-slot="dropdown-menu-radio-item-indicator"
|
|
209
|
+
>
|
|
210
|
+
<MenuPrimitive.RadioItemIndicator>
|
|
211
|
+
<HugeiconsIcon icon={Tick02Icon} strokeWidth={2} />
|
|
212
|
+
</MenuPrimitive.RadioItemIndicator>
|
|
213
|
+
</span>
|
|
214
|
+
{children}
|
|
215
|
+
</MenuPrimitive.RadioItem>
|
|
216
|
+
)
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
function DropdownMenuSeparator({
|
|
220
|
+
className,
|
|
221
|
+
...props
|
|
222
|
+
}: MenuPrimitive.Separator.Props) {
|
|
223
|
+
return (
|
|
224
|
+
<MenuPrimitive.Separator
|
|
225
|
+
data-slot="dropdown-menu-separator"
|
|
226
|
+
className={cn("bg-border -mx-1 my-1 h-px", className)}
|
|
227
|
+
{...props}
|
|
228
|
+
/>
|
|
229
|
+
)
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
function DropdownMenuShortcut({
|
|
233
|
+
className,
|
|
234
|
+
...props
|
|
235
|
+
}: React.ComponentProps<"span">) {
|
|
236
|
+
return (
|
|
237
|
+
<span
|
|
238
|
+
data-slot="dropdown-menu-shortcut"
|
|
239
|
+
className={cn("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest", className)}
|
|
240
|
+
{...props}
|
|
241
|
+
/>
|
|
242
|
+
)
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export {
|
|
246
|
+
DropdownMenu,
|
|
247
|
+
DropdownMenuPortal,
|
|
248
|
+
DropdownMenuTrigger,
|
|
249
|
+
DropdownMenuContent,
|
|
250
|
+
DropdownMenuGroup,
|
|
251
|
+
DropdownMenuLabel,
|
|
252
|
+
DropdownMenuItem,
|
|
253
|
+
DropdownMenuCheckboxItem,
|
|
254
|
+
DropdownMenuRadioGroup,
|
|
255
|
+
DropdownMenuRadioItem,
|
|
256
|
+
DropdownMenuSeparator,
|
|
257
|
+
DropdownMenuShortcut,
|
|
258
|
+
DropdownMenuSub,
|
|
259
|
+
DropdownMenuSubTrigger,
|
|
260
|
+
DropdownMenuSubContent,
|
|
261
|
+
}
|