@minidev.fun/ui 1.0.4 → 1.0.5
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/dist/components/minidev.fun/color-mode/color-mode-initializer.js.map +1 -0
- package/dist/{src/components → components}/minidev.fun/color-mode/color-mode-toggle.js +6 -6
- package/dist/components/minidev.fun/color-mode/color-mode-toggle.js.map +1 -0
- package/dist/components/minidev.fun/color-mode/index.d.ts +4 -0
- package/dist/components/minidev.fun/color-mode/index.js +9 -0
- package/dist/components/minidev.fun/color-mode/use-color-mode.js.map +1 -0
- package/dist/components/minidev.fun/first-light/first-light-filters.js +114 -0
- package/dist/components/minidev.fun/first-light/first-light-filters.js.map +1 -0
- package/dist/components/minidev.fun/first-light/index.d.ts +2 -0
- package/dist/components/minidev.fun/first-light/index.js +5 -0
- package/dist/components/minidev.fun/first-light/index.js.map +1 -0
- package/dist/components/minidev.fun/typography/blockquote.js +23 -0
- package/dist/components/minidev.fun/typography/blockquote.js.map +1 -0
- package/dist/components/minidev.fun/typography/code.js +23 -0
- package/dist/components/minidev.fun/typography/code.js.map +1 -0
- package/dist/components/minidev.fun/typography/index.d.ts +6 -0
- package/dist/components/minidev.fun/typography/index.js +15 -0
- package/dist/components/minidev.fun/typography/index.js.map +1 -0
- package/dist/components/minidev.fun/typography/list-item.js +19 -0
- package/dist/components/minidev.fun/typography/list-item.js.map +1 -0
- package/dist/components/minidev.fun/typography/text.js +59 -0
- package/dist/components/minidev.fun/typography/text.js.map +1 -0
- package/dist/components/minidev.fun/typography/title.js +47 -0
- package/dist/components/minidev.fun/typography/title.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +27 -0
- package/dist/components/ui/{src/components/ui/accordion.js → accordion.js} +8 -8
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +47 -0
- package/dist/components/ui/{src/components/ui/alert-dialog.js → alert-dialog.js} +9 -9
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +30 -0
- package/dist/components/ui/{src/components/ui/alert.js → alert.js} +2 -2
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +11 -0
- package/dist/components/ui/{src/components/ui/aspect-ratio.js → aspect-ratio.js} +1 -1
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +42 -0
- package/dist/components/ui/{src/components/ui/avatar.js → avatar.js} +4 -4
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +16 -0
- package/dist/components/ui/{src/components/ui/badge.js → badge.js} +4 -4
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +39 -0
- package/dist/components/ui/{src/components/ui/breadcrumb.js → breadcrumb.js} +5 -5
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +26 -0
- package/dist/components/ui/{src/components/ui/button-group.js → button-group.js} +4 -4
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +41 -0
- package/dist/components/ui/{src/components/ui/button.js → button.js} +3 -3
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +20 -0
- package/dist/components/ui/{src/components/ui/calendar.js → calendar.js} +4 -4
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +30 -0
- package/dist/components/ui/{src/components/ui/card.js → card.js} +1 -1
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +56 -0
- package/dist/components/ui/{src/components/ui/carousel.js → carousel.js} +3 -3
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +73 -0
- package/dist/components/ui/{src/components/ui/chart.js → chart.js} +1 -1
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/{src/components/ui/checkbox.js → checkbox.js} +4 -4
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +21 -0
- package/dist/components/ui/{src/components/ui/collapsible.js → collapsible.js} +3 -3
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +80 -0
- package/dist/components/ui/{src/components/ui/combobox.js → combobox.js} +23 -23
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +63 -0
- package/dist/components/ui/{src/components/ui/command.js → command.js} +4 -4
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +64 -0
- package/dist/components/ui/{src/components/ui/context-menu.js → context-menu.js} +20 -20
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +69 -0
- package/dist/components/ui/{src/components/ui/dialog.js → dialog.js} +10 -10
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/drawer.d.ts +40 -0
- package/dist/components/ui/{src/components/ui/drawer.js → drawer.js} +2 -2
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +88 -0
- package/dist/components/ui/{src/components/ui/dropdown-menu.js → dropdown-menu.js} +20 -20
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +41 -0
- package/dist/components/ui/{src/components/ui/empty.js → empty.js} +2 -2
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/field.d.ts +78 -0
- package/dist/components/ui/{src/components/ui/field.js → field.js} +2 -2
- package/dist/components/ui/field.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +21 -0
- package/dist/components/ui/{src/components/ui/hover-card.js → hover-card.js} +6 -6
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +50 -0
- package/dist/components/ui/{src/components/ui/input-group.js → input-group.js} +2 -2
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +34 -0
- package/dist/components/ui/{src/components/ui/input-otp.js → input-otp.js} +2 -2
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +11 -0
- package/dist/components/ui/{src/components/ui/input.js → input.js} +2 -2
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +69 -0
- package/dist/components/ui/{src/components/ui/item.js → item.js} +4 -4
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +14 -0
- package/dist/components/ui/{src/components/ui/kbd.js → kbd.js} +1 -1
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +9 -0
- package/dist/components/ui/{src/components/ui/label.js → label.js} +1 -1
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +87 -0
- package/dist/components/ui/{src/components/ui/menubar.js → menubar.js} +9 -9
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/modal.d.ts +41 -0
- package/dist/components/ui/{src/components/ui/modal.js → modal.js} +9 -9
- package/dist/components/ui/modal.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +52 -0
- package/dist/components/ui/{src/components/ui/navigation-menu.js → navigation-menu.js} +14 -14
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +42 -0
- package/dist/components/ui/{src/components/ui/pagination.js → pagination.js} +4 -4
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +42 -0
- package/dist/components/ui/{src/components/ui/popover.js → popover.js} +8 -8
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +30 -0
- package/dist/components/ui/{src/components/ui/progress.js → progress.js} +6 -6
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +16 -0
- package/dist/components/ui/{src/components/ui/radio-group.js → radio-group.js} +5 -5
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +38 -0
- package/dist/components/ui/{src/components/ui/resizable.js → resizable.js} +2 -2
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +64 -0
- package/dist/components/ui/{src/components/ui/scroll-area.js → scroll-area.js} +6 -6
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/select.d.ts +58 -0
- package/dist/components/ui/{src/components/ui/select.js → select.js} +20 -20
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +9 -0
- package/dist/components/ui/{src/components/ui/separator.js → separator.js} +2 -2
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +51 -0
- package/dist/components/ui/{src/components/ui/sheet.js → sheet.js} +10 -10
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +172 -0
- package/dist/components/ui/{src/components/ui/sidebar.js → sidebar.js} +6 -6
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +8 -0
- package/dist/components/ui/{src/components/ui/skeleton.js → skeleton.js} +1 -1
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +21 -0
- package/dist/components/ui/{src/components/ui/slider.js → slider.js} +6 -6
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +21 -0
- package/dist/components/ui/{src/components/ui/sonner.js → sonner.js} +7 -7
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +8 -0
- package/dist/components/ui/{src/components/ui/spinner.js → spinner.js} +2 -2
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +12 -0
- package/dist/components/ui/{src/components/ui/switch.js → switch.js} +3 -3
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +51 -0
- package/dist/components/ui/{src/components/ui/table.js → table.js} +1 -1
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +31 -0
- package/dist/components/ui/{src/components/ui/tabs.js → tabs.js} +6 -6
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +18 -0
- package/dist/components/ui/{src/components/ui/textarea.js → textarea.js} +1 -1
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toast.d.ts +11 -0
- package/dist/components/ui/{src/components/ui/toast.js → toast.js} +6 -6
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +26 -0
- package/dist/components/ui/{src/components/ui/toggle-group.js → toggle-group.js} +3 -3
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +14 -0
- package/dist/components/ui/{src/components/ui/toggle.js → toggle.js} +3 -3
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +27 -0
- package/dist/components/ui/{src/components/ui/tooltip.js → tooltip.js} +8 -8
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +18 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/lib/utils.d.ts +23 -2
- package/dist/lib/variants.js +129 -0
- package/dist/lib/variants.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/minidev.fun/undefined/index.d.ts +0 -2
- package/dist/components/minidev.fun/undefined/index.js +0 -9
- package/dist/components/ui/src/components/ui/accordion.d.ts +0 -2
- package/dist/components/ui/src/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/src/components/ui/alert-dialog.d.ts +0 -2
- package/dist/components/ui/src/components/ui/alert-dialog.js.map +0 -1
- package/dist/components/ui/src/components/ui/alert.d.ts +0 -2
- package/dist/components/ui/src/components/ui/alert.js.map +0 -1
- package/dist/components/ui/src/components/ui/aspect-ratio.d.ts +0 -2
- package/dist/components/ui/src/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/src/components/ui/avatar.d.ts +0 -2
- package/dist/components/ui/src/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/src/components/ui/badge.d.ts +0 -2
- package/dist/components/ui/src/components/ui/badge.js.map +0 -1
- package/dist/components/ui/src/components/ui/breadcrumb.d.ts +0 -2
- package/dist/components/ui/src/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/src/components/ui/button-group.d.ts +0 -2
- package/dist/components/ui/src/components/ui/button-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/button.d.ts +0 -2
- package/dist/components/ui/src/components/ui/button.js.map +0 -1
- package/dist/components/ui/src/components/ui/calendar.d.ts +0 -2
- package/dist/components/ui/src/components/ui/calendar.js.map +0 -1
- package/dist/components/ui/src/components/ui/card.d.ts +0 -2
- package/dist/components/ui/src/components/ui/card.js.map +0 -1
- package/dist/components/ui/src/components/ui/carousel.d.ts +0 -2
- package/dist/components/ui/src/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/src/components/ui/chart.d.ts +0 -2
- package/dist/components/ui/src/components/ui/chart.js.map +0 -1
- package/dist/components/ui/src/components/ui/checkbox.d.ts +0 -2
- package/dist/components/ui/src/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/src/components/ui/collapsible.d.ts +0 -2
- package/dist/components/ui/src/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/src/components/ui/combobox.d.ts +0 -2
- package/dist/components/ui/src/components/ui/combobox.js.map +0 -1
- package/dist/components/ui/src/components/ui/command.d.ts +0 -2
- package/dist/components/ui/src/components/ui/command.js.map +0 -1
- package/dist/components/ui/src/components/ui/context-menu.d.ts +0 -2
- package/dist/components/ui/src/components/ui/context-menu.js.map +0 -1
- package/dist/components/ui/src/components/ui/dialog.d.ts +0 -2
- package/dist/components/ui/src/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/src/components/ui/drawer.d.ts +0 -2
- package/dist/components/ui/src/components/ui/drawer.js.map +0 -1
- package/dist/components/ui/src/components/ui/dropdown-menu.d.ts +0 -2
- package/dist/components/ui/src/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/src/components/ui/empty.d.ts +0 -2
- package/dist/components/ui/src/components/ui/empty.js.map +0 -1
- package/dist/components/ui/src/components/ui/field.d.ts +0 -2
- package/dist/components/ui/src/components/ui/field.js.map +0 -1
- package/dist/components/ui/src/components/ui/hover-card.d.ts +0 -2
- package/dist/components/ui/src/components/ui/hover-card.js.map +0 -1
- package/dist/components/ui/src/components/ui/input-group.d.ts +0 -2
- package/dist/components/ui/src/components/ui/input-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/input-otp.d.ts +0 -2
- package/dist/components/ui/src/components/ui/input-otp.js.map +0 -1
- package/dist/components/ui/src/components/ui/input.d.ts +0 -2
- package/dist/components/ui/src/components/ui/input.js.map +0 -1
- package/dist/components/ui/src/components/ui/item.d.ts +0 -2
- package/dist/components/ui/src/components/ui/item.js.map +0 -1
- package/dist/components/ui/src/components/ui/kbd.d.ts +0 -2
- package/dist/components/ui/src/components/ui/kbd.js.map +0 -1
- package/dist/components/ui/src/components/ui/label.d.ts +0 -2
- package/dist/components/ui/src/components/ui/label.js.map +0 -1
- package/dist/components/ui/src/components/ui/menubar.d.ts +0 -2
- package/dist/components/ui/src/components/ui/menubar.js.map +0 -1
- package/dist/components/ui/src/components/ui/modal.d.ts +0 -2
- package/dist/components/ui/src/components/ui/modal.js.map +0 -1
- package/dist/components/ui/src/components/ui/navigation-menu.d.ts +0 -2
- package/dist/components/ui/src/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/src/components/ui/pagination.d.ts +0 -2
- package/dist/components/ui/src/components/ui/pagination.js.map +0 -1
- package/dist/components/ui/src/components/ui/popover.d.ts +0 -2
- package/dist/components/ui/src/components/ui/popover.js.map +0 -1
- package/dist/components/ui/src/components/ui/progress.d.ts +0 -2
- package/dist/components/ui/src/components/ui/progress.js.map +0 -1
- package/dist/components/ui/src/components/ui/radio-group.d.ts +0 -2
- package/dist/components/ui/src/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/resizable.d.ts +0 -2
- package/dist/components/ui/src/components/ui/resizable.js.map +0 -1
- package/dist/components/ui/src/components/ui/scroll-area.d.ts +0 -2
- package/dist/components/ui/src/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/src/components/ui/select.d.ts +0 -2
- package/dist/components/ui/src/components/ui/select.js.map +0 -1
- package/dist/components/ui/src/components/ui/separator.d.ts +0 -2
- package/dist/components/ui/src/components/ui/separator.js.map +0 -1
- package/dist/components/ui/src/components/ui/sheet.d.ts +0 -2
- package/dist/components/ui/src/components/ui/sheet.js.map +0 -1
- package/dist/components/ui/src/components/ui/sidebar.d.ts +0 -2
- package/dist/components/ui/src/components/ui/sidebar.js.map +0 -1
- package/dist/components/ui/src/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/src/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/src/components/ui/slider.d.ts +0 -2
- package/dist/components/ui/src/components/ui/slider.js.map +0 -1
- package/dist/components/ui/src/components/ui/sonner.d.ts +0 -2
- package/dist/components/ui/src/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/src/components/ui/spinner.d.ts +0 -2
- package/dist/components/ui/src/components/ui/spinner.js.map +0 -1
- package/dist/components/ui/src/components/ui/switch.d.ts +0 -2
- package/dist/components/ui/src/components/ui/switch.js.map +0 -1
- package/dist/components/ui/src/components/ui/table.d.ts +0 -2
- package/dist/components/ui/src/components/ui/table.js.map +0 -1
- package/dist/components/ui/src/components/ui/tabs.d.ts +0 -2
- package/dist/components/ui/src/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/src/components/ui/textarea.d.ts +0 -2
- package/dist/components/ui/src/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/src/components/ui/toast.d.ts +0 -2
- package/dist/components/ui/src/components/ui/toast.js.map +0 -1
- package/dist/components/ui/src/components/ui/toggle-group.d.ts +0 -2
- package/dist/components/ui/src/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/toggle.d.ts +0 -2
- package/dist/components/ui/src/components/ui/toggle.js.map +0 -1
- package/dist/components/ui/src/components/ui/tooltip.d.ts +0 -2
- package/dist/components/ui/src/components/ui/tooltip.js.map +0 -1
- package/dist/hooks/src/hooks/use-mobile.d.ts +0 -2
- package/dist/hooks/src/hooks/use-mobile.js.map +0 -1
- package/dist/src/components/minidev.fun/color-mode/color-mode-initializer.js.map +0 -1
- package/dist/src/components/minidev.fun/color-mode/color-mode-toggle.js.map +0 -1
- package/dist/src/components/minidev.fun/color-mode/use-color-mode.js.map +0 -1
- package/dist/src/lib/variants.js +0 -27
- package/dist/src/lib/variants.js.map +0 -1
- /package/dist/{src/components → components}/minidev.fun/color-mode/color-mode-initializer.js +0 -0
- /package/dist/components/minidev.fun/{undefined → color-mode}/index.js.map +0 -0
- /package/dist/{src/components → components}/minidev.fun/color-mode/use-color-mode.js +0 -0
- /package/dist/hooks/{src/hooks/use-mobile.js → use-mobile.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["../../../../../../src/components/ui/checkbox.tsx"],"sourcesContent":["import { Checkbox as CheckboxPrimitive } from \"@base-ui/react/checkbox\";\n\nimport { cn } from \"@/lib/utils\";\nimport { CheckIcon } from \"lucide-react\";\n\ntype CheckboxProps = CheckboxPrimitive.Root.Props;\n\n/**\n * Checkbox component for binary selection in forms and settings.\n *\n * Supports controlled and uncontrolled usage, form integration, and indeterminate state.\n * Includes built-in indicator with check icon.\n */\nfunction Checkbox({ className, ...props }: CheckboxProps) {\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n className={cn(\n \"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border shadow-xs transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-[3px] aria-invalid:ring-[3px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n data-slot=\"checkbox-indicator\"\n className=\"[&>svg]:size-3.5 grid place-content-center text-current transition-none\"\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nexport { Checkbox, type CheckboxProps };\n"],"names":["CheckboxPrimitive.Root","CheckboxPrimitive.Indicator","CheckIcon"],"mappings":";;;;;AAaA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;AACxD,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,8BAACC,OAAA,CAAA,CAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACb;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.js","sources":["../../../../../../src/components/ui/collapsible.tsx"],"sourcesContent":["\"use client\";\n\nimport { Collapsible as CollapsiblePrimitive } from \"@base-ui/react/collapsible\";\n\ntype CollapsibleProps = CollapsiblePrimitive.Root.Props;\n\n/**\n * Root container for collapsible sections. Groups trigger and content.\n * Supports both controlled and uncontrolled state.\n */\nfunction Collapsible({ ...props }: CollapsibleProps) {\n return <CollapsiblePrimitive.Root data-slot=\"collapsible\" {...props} />;\n}\n\ntype CollapsibleTriggerProps = CollapsiblePrimitive.Trigger.Props;\n\n/**\n * Button that toggles the collapsible content.\n * Use `render` prop to customize the rendered element.\n */\nfunction CollapsibleTrigger({ ...props }: CollapsibleTriggerProps) {\n return (\n <CollapsiblePrimitive.Trigger data-slot=\"collapsible-trigger\" {...props} />\n );\n}\n\ntype CollapsibleContentProps = CollapsiblePrimitive.Panel.Props;\n\n/**\n * Collapsible content panel. Automatically animates height on open/close.\n * Hidden when closed unless `keepMounted` is true.\n */\nfunction CollapsibleContent({ ...props }: CollapsibleContentProps) {\n return (\n <CollapsiblePrimitive.Panel data-slot=\"collapsible-content\" {...props} />\n );\n}\n\nexport {\n Collapsible,\n CollapsibleTrigger,\n CollapsibleContent,\n type CollapsibleProps,\n type CollapsibleTriggerProps,\n type CollapsibleContentProps,\n};\n"],"names":[],"mappings":";;;;;AAUA;AACE;AACF;AAQA;AACE;AAGF;AAQA;AACE;AAGF;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","sources":["../../../../../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupInput,\n} from \"@/components/ui/input-group\";\nimport { ChevronDownIcon, XIcon, CheckIcon } from \"lucide-react\";\n\nconst Combobox = ComboboxPrimitive.Root;\n\ntype ComboboxProps<T = unknown> = ComboboxPrimitive.Root.Props<T>;\n\ntype ComboboxValueProps = ComboboxPrimitive.Value.Props;\n\n/** Displays the selected value(s) as text in the trigger or input. */\nfunction ComboboxValue({ ...props }: ComboboxValueProps) {\n return <ComboboxPrimitive.Value data-slot=\"combobox-value\" {...props} />;\n}\n\ntype ComboboxTriggerProps = ComboboxPrimitive.Trigger.Props;\n\n/** Button that opens the combobox popup. Automatically includes a chevron icon. */\nfunction ComboboxTrigger({\n className,\n children,\n ...props\n}: ComboboxTriggerProps) {\n return (\n <ComboboxPrimitive.Trigger\n data-slot=\"combobox-trigger\"\n className={cn(\"[&_svg:not([class*='size-'])]:size-4\", className)}\n {...props}\n >\n {children}\n <ChevronDownIcon className=\"text-muted-foreground size-4 pointer-events-none\" />\n </ComboboxPrimitive.Trigger>\n );\n}\n\ntype ComboboxClearProps = ComboboxPrimitive.Clear.Props;\n\n/** Button to clear the selected value. Renders as a ghost icon button with X icon. */\nfunction ComboboxClear({ className, ...props }: ComboboxClearProps) {\n return (\n <ComboboxPrimitive.Clear\n data-slot=\"combobox-clear\"\n render={<InputGroupButton variant=\"ghost\" size=\"icon-xs\" />}\n className={cn(className)}\n {...props}\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.Clear>\n );\n}\n\ntype ComboboxInputProps = ComboboxPrimitive.Input.Props & {\n /** Show dropdown trigger button. @default true */\n showTrigger?: boolean;\n /** Show clear button when value is selected. @default false */\n showClear?: boolean;\n};\n\n/**\n * Text input for single-select combobox with optional trigger and clear buttons.\n * Automatically renders within an InputGroup with inline-end addons.\n */\nfunction ComboboxInput({\n className,\n children,\n disabled = false,\n showTrigger = true,\n showClear = false,\n ...props\n}: ComboboxInputProps) {\n return (\n <InputGroup className={cn(\"w-auto\", className)}>\n <ComboboxPrimitive.Input\n render={<InputGroupInput disabled={disabled} />}\n {...props}\n />\n <InputGroupAddon align=\"inline-end\">\n {showTrigger && (\n <InputGroupButton\n size=\"icon-xs\"\n variant=\"ghost\"\n render={<ComboboxTrigger />}\n data-slot=\"input-group-button\"\n className=\"group-has-data-[slot=combobox-clear]/input-group:hidden data-pressed:bg-transparent\"\n disabled={disabled}\n />\n )}\n {showClear && <ComboboxClear disabled={disabled} />}\n </InputGroupAddon>\n {children}\n </InputGroup>\n );\n}\n\ntype ComboboxContentProps = ComboboxPrimitive.Popup.Props &\n Pick<\n ComboboxPrimitive.Positioner.Props,\n \"side\" | \"align\" | \"sideOffset\" | \"alignOffset\" | \"anchor\"\n >;\n\n/**\n * Popup container for combobox items. Automatically renders in portal with positioner.\n * Use `anchor` prop for multi-select with chips to position relative to chips container.\n */\nfunction ComboboxContent({\n className,\n side = \"bottom\",\n sideOffset = 6,\n align = \"start\",\n alignOffset = 0,\n anchor,\n ...props\n}: ComboboxContentProps) {\n return (\n <ComboboxPrimitive.Portal>\n <ComboboxPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n anchor={anchor}\n className=\"isolate z-50\"\n >\n <ComboboxPrimitive.Popup\n data-slot=\"combobox-content\"\n data-chips={!!anchor}\n className={cn(\n \"bg-popover p-1 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 max-h-72 min-w-36 overflow-hidden rounded-3xl 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 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)\",\n className,\n )}\n {...props}\n />\n </ComboboxPrimitive.Positioner>\n </ComboboxPrimitive.Portal>\n );\n}\n\ntype ComboboxListProps = ComboboxPrimitive.List.Props;\n\n/** Scrollable container for combobox items. Automatically manages overflow and empty states. */\nfunction ComboboxList({ className, ...props }: ComboboxListProps) {\n return (\n <ComboboxPrimitive.List\n data-slot=\"combobox-list\"\n className={cn(\n \"no-scrollbar max-h-[min(calc(--spacing(72)---spacing(9)),calc(var(--available-height)---spacing(9)))] scroll-py-1 overflow-y-auto p-1 data-empty:p-0 overflow-y-auto overscroll-contain\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ComboboxItemProps = ComboboxPrimitive.Item.Props;\n\n/**\n * Selectable item in combobox list. Shows check icon when selected.\n * Requires unique `value` prop.\n */\nfunction ComboboxItem({ className, children, ...props }: ComboboxItemProps) {\n return (\n <ComboboxPrimitive.Item\n data-slot=\"combobox-item\"\n className={cn(\n \"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground gap-2 rounded-full py-1.5 pr-8 pl-2 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\",\n className,\n )}\n {...props}\n >\n {children}\n <ComboboxPrimitive.ItemIndicator\n render={\n <span className=\"pointer-events-none absolute right-2 flex size-4 items-center justify-center\" />\n }\n >\n <CheckIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ItemIndicator>\n </ComboboxPrimitive.Item>\n );\n}\n\ntype ComboboxGroupProps = ComboboxPrimitive.Group.Props;\n\n/** Container for grouping related items together with optional label. */\nfunction ComboboxGroup({ className, ...props }: ComboboxGroupProps) {\n return (\n <ComboboxPrimitive.Group\n data-slot=\"combobox-group\"\n className={cn(className)}\n {...props}\n />\n );\n}\n\ntype ComboboxLabelProps = ComboboxPrimitive.GroupLabel.Props;\n\n/** Label for a group of items. Use within ComboboxGroup. */\nfunction ComboboxLabel({ className, ...props }: ComboboxLabelProps) {\n return (\n <ComboboxPrimitive.GroupLabel\n data-slot=\"combobox-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\ntype ComboboxCollectionProps = ComboboxPrimitive.Collection.Props;\n\n/** Defines collection of items for keyboard navigation and accessibility. */\nfunction ComboboxCollection({ ...props }: ComboboxCollectionProps) {\n return (\n <ComboboxPrimitive.Collection data-slot=\"combobox-collection\" {...props} />\n );\n}\n\ntype ComboboxEmptyProps = ComboboxPrimitive.Empty.Props;\n\n/** Displays message when search returns no results. Automatically shown when list is empty. */\nfunction ComboboxEmpty({ className, ...props }: ComboboxEmptyProps) {\n return (\n <ComboboxPrimitive.Empty\n data-slot=\"combobox-empty\"\n className={cn(\n \"text-muted-foreground hidden w-full justify-center py-2 text-center text-sm group-data-empty/combobox-content:flex\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ComboboxSeparatorProps = ComboboxPrimitive.Separator.Props;\n\n/** Visual separator between groups of items. */\nfunction ComboboxSeparator({ className, ...props }: ComboboxSeparatorProps) {\n return (\n <ComboboxPrimitive.Separator\n data-slot=\"combobox-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\ntype ComboboxChipsProps = React.ComponentPropsWithRef<\n typeof ComboboxPrimitive.Chips\n> &\n ComboboxPrimitive.Chips.Props;\n\n/**\n * Container for selected chips in multi-select mode. Use with `useComboboxAnchor()` hook\n * and pass ref to anchor the popup. Contains ComboboxChip and ComboboxChipsInput.\n */\nfunction ComboboxChips({ className, ...props }: ComboboxChipsProps) {\n return (\n <ComboboxPrimitive.Chips\n data-slot=\"combobox-chips\"\n className={cn(\n \"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-9 flex-wrap items-center gap-1.5 rounded-lg border bg-transparent bg-clip-padding px-2.5 py-1.5 text-sm shadow-xs transition-[color,box-shadow] focus-within:ring-[3px] has-aria-invalid:ring-[3px] has-data-[slot=combobox-chip]:px-1.5\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ComboboxChipProps = ComboboxPrimitive.Chip.Props & {\n /** Show remove button on chip. @default true */\n showRemove?: boolean;\n};\n\n/**\n * Individual chip representing a selected item in multi-select mode.\n * Use within ComboboxChips. Includes remove button by default.\n */\nfunction ComboboxChip({\n className,\n children,\n showRemove = true,\n ...props\n}: ComboboxChipProps) {\n return (\n <ComboboxPrimitive.Chip\n data-slot=\"combobox-chip\"\n className={cn(\n \"bg-muted text-foreground flex h-[calc(--spacing(5.5))] w-fit items-center justify-center gap-1 rounded-full 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\",\n className,\n )}\n {...props}\n >\n {children}\n {showRemove && (\n <ComboboxPrimitive.ChipRemove\n render={<Button variant=\"ghost\" size=\"icon-xs\" />}\n className=\"-ml-1 opacity-50 hover:opacity-100\"\n data-slot=\"combobox-chip-remove\"\n >\n <XIcon className=\"pointer-events-none\" />\n </ComboboxPrimitive.ChipRemove>\n )}\n </ComboboxPrimitive.Chip>\n );\n}\n\ntype ComboboxChipsInputProps = ComboboxPrimitive.Input.Props;\n\n/**\n * Text input for multi-select combobox. Use within ComboboxChips alongside chips.\n * This is the input field where users type to filter items.\n */\nfunction ComboboxChipsInput({ className, ...props }: ComboboxChipsInputProps) {\n return (\n <ComboboxPrimitive.Input\n data-slot=\"combobox-chip-input\"\n className={cn(\"min-w-16 flex-1 outline-none\", className)}\n {...props}\n />\n );\n}\n\n/**\n * Hook that returns a ref for anchoring the popup to the chips container.\n * Use: `const anchorRef = useComboboxAnchor()` then pass to both ComboboxChips and ComboboxContent.\n */\nfunction useComboboxAnchor() {\n return React.useRef<HTMLDivElement | null>(null);\n}\n\nexport {\n Combobox,\n ComboboxInput,\n ComboboxContent,\n ComboboxList,\n ComboboxItem,\n ComboboxGroup,\n ComboboxLabel,\n ComboboxCollection,\n ComboboxEmpty,\n ComboboxSeparator,\n ComboboxChips,\n ComboboxChip,\n ComboboxChipsInput,\n ComboboxTrigger,\n ComboboxValue,\n useComboboxAnchor,\n type ComboboxProps,\n type ComboboxInputProps,\n type ComboboxContentProps,\n type ComboboxListProps,\n type ComboboxItemProps,\n type ComboboxGroupProps,\n type ComboboxLabelProps,\n type ComboboxCollectionProps,\n type ComboboxEmptyProps,\n type ComboboxSeparatorProps,\n type ComboboxChipsProps,\n type ComboboxChipProps,\n type ComboboxChipsInputProps,\n type ComboboxTriggerProps,\n type ComboboxValueProps,\n type ComboboxClearProps,\n};\n"],"names":["ComboboxPrimitive.Trigger","ComboboxPrimitive.Clear","ComboboxPrimitive.Input","ComboboxPrimitive.Positioner","ComboboxPrimitive.Popup","ComboboxPrimitive.List","ComboboxPrimitive.Item","ComboboxPrimitive.ItemIndicator","ComboboxPrimitive.Group","ComboboxPrimitive.GroupLabel","ComboboxPrimitive.Empty","ComboboxPrimitive.Separator","ComboboxPrimitive.Chips","ComboboxPrimitive.Chip","ComboboxPrimitive.ChipRemove"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeA;AAOA;AACE;AACF;AAKA;AAAyB;AACvB;AACA;AAEF;AACE;AACE;AAACA;AAAA;AACW;AACqD;AAC3D;AAEH;AAAA;AAC6E;AAAA;AAAA;AAGpF;AAKA;AACE;AACE;AAACC;AAAA;AACW;AAC+C;AAClC;AACnB;AAEmC;AAAA;AAG7C;AAaA;AAAuB;AACrB;AACA;AACW;AACG;AACF;AAEd;AACE;AAEI;AAAA;AAACC;AAAA;AAC8C;AACzC;AAAA;AAAA;AAGH;AACC;AAAC;AAAA;AACM;AACG;AACiB;AACf;AACA;AACV;AAAA;AAAA;AAG6C;AACnD;AACC;AAGP;AAYA;AAAyB;AACvB;AACO;AACM;AACL;AACM;AACd;AAEF;AACE;AAEI;AAACC;AAAA;AACC;AACA;AACA;AACA;AACA;AACU;AAEV;AAACC;AAAA;AACW;AACI;AACH;AACT;AACA;AAAA;AAEE;AAAA;AAAA;AACN;AAIR;AAKA;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAQA;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AACD;AAACC;AAAA;AAEkG;AAGtD;AAAA;AAAA;AAC7C;AAAA;AAGN;AAKA;AACE;AACE;AAACC;AAAA;AACW;AACa;AACnB;AAAA;AAGV;AAKA;AACE;AACE;AAACC;AAAA;AACW;AAC0D;AAChE;AAAA;AAGV;AAKA;AACE;AAGF;AAKA;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAKA;AACE;AACE;AAACC;AAAA;AACW;AAC0C;AAChD;AAAA;AAGV;AAWA;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAWA;AAAsB;AACpB;AACA;AACa;AAEf;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AAEC;AAACC;AAAA;AACgD;AACrC;AACA;AAE6B;AAAA;AAAA;AACzC;AAAA;AAIR;AAQA;AACE;AACE;AAACZ;AAAA;AACW;AAC6C;AACnD;AAAA;AAGV;AAMA;AACE;AACF;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"command.js","sources":["../../../../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Command as CommandPrimitive } from \"cmdk\";\n\nimport { cn } from \"@/lib/utils\";\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from \"@/components/ui/dialog\";\nimport { InputGroup, InputGroupAddon } from \"@/components/ui/input-group\";\nimport { SearchIcon, CheckIcon } from \"lucide-react\";\n\ntype CommandProps = React.ComponentProps<typeof CommandPrimitive>;\n\n/**\n * Root command menu container with keyboard navigation and fuzzy search.\n * Typically used within CommandDialog for command palettes.\n */\nfunction Command({ className, ...props }: CommandProps) {\n return (\n <CommandPrimitive\n data-slot=\"command\"\n className={cn(\n \"bg-popover border text-popover-foreground rounded-5xl! p-4 flex size-full flex-col overflow-hidden\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype CommandDialogProps = Omit<\n React.ComponentProps<typeof Dialog>,\n \"children\"\n> & {\n /** Dialog title for screen readers. @default \"Command Palette\" */\n title?: string;\n /** Dialog description for screen readers. @default \"Search for a command to run...\" */\n description?: string;\n className?: string;\n /** Show close button (X) in top-right corner. @default false */\n showCloseButton?: boolean;\n children: React.ReactNode;\n};\n\n/**\n * Command menu wrapped in a dialog for modal command palettes.\n * Automatically includes portal and overlay. Triggered with ⌘K or Ctrl+K.\n */\nfunction CommandDialog({\n title = \"Command Palette\",\n description = \"Search for a command to run...\",\n children,\n className,\n showCloseButton = false,\n ...props\n}: CommandDialogProps) {\n return (\n <Dialog {...props}>\n <DialogHeader className=\"sr-only\">\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent\n className={cn(\"rounded-4xl! overflow-hidden p-0\", className)}\n showCloseButton={showCloseButton}\n >\n {children}\n </DialogContent>\n </Dialog>\n );\n}\n\ntype CommandInputProps = React.ComponentProps<typeof CommandPrimitive.Input>;\n\n/**\n * Search input with integrated search icon. Automatically filters command items.\n */\nfunction CommandInput({ className, ...props }: CommandInputProps) {\n return (\n <div data-slot=\"command-input-wrapper\" className=\"p-1 pb-0\">\n <InputGroup className=\"bg-input/30 border-input/30 h-8! rounded-4xl! shadow-none! *:data-[slot=input-group-addon]:pl-2!\">\n <CommandPrimitive.Input\n data-slot=\"command-input\"\n className={cn(\n \"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n <InputGroupAddon>\n <SearchIcon className=\"size-4 shrink-0 opacity-50\" />\n </InputGroupAddon>\n </InputGroup>\n </div>\n );\n}\n\ntype CommandListProps = React.ComponentProps<typeof CommandPrimitive.List>;\n\n/**\n * Scrollable container for command groups and items. Max height 72 (18rem).\n */\nfunction CommandList({ className, ...props }: CommandListProps) {\n return (\n <CommandPrimitive.List\n data-slot=\"command-list\"\n className={cn(\n \"no-scrollbar max-h-72 scroll-py-1 outline-none overflow-x-hidden overflow-y-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype CommandEmptyProps = React.ComponentProps<typeof CommandPrimitive.Empty>;\n\n/**\n * Displayed when search returns no results. Defaults to centered text.\n */\nfunction CommandEmpty({ className, ...props }: CommandEmptyProps) {\n return (\n <CommandPrimitive.Empty\n data-slot=\"command-empty\"\n className={cn(\"py-6 text-center text-sm\", className)}\n {...props}\n />\n );\n}\n\ntype CommandGroupProps = React.ComponentProps<typeof CommandPrimitive.Group>;\n\n/**\n * Groups related command items with optional heading. Use heading prop for labels.\n */\nfunction CommandGroup({ className, ...props }: CommandGroupProps) {\n return (\n <CommandPrimitive.Group\n data-slot=\"command-group\"\n className={cn(\n \"text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype CommandSeparatorProps = React.ComponentProps<\n typeof CommandPrimitive.Separator\n>;\n\n/**\n * Visual divider between command groups or items.\n */\nfunction CommandSeparator({ className, ...props }: CommandSeparatorProps) {\n return (\n <CommandPrimitive.Separator\n data-slot=\"command-separator\"\n className={cn(\"bg-border -mx-1 h-px w-auto\", className)}\n {...props}\n />\n );\n}\n\ntype CommandItemProps = React.ComponentProps<typeof CommandPrimitive.Item>;\n\n/**\n * Selectable command item with automatic check icon. Use onSelect prop for actions.\n * Automatically shows check icon when selected (hidden if CommandShortcut is present).\n */\nfunction CommandItem({ className, children, ...props }: CommandItemProps) {\n return (\n <CommandPrimitive.Item\n data-slot=\"command-item\"\n className={cn(\n \"data-selected:bg-muted my-1 data-selected:text-foreground data-selected:**:[svg]:text-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none [&_svg:not([class*='size-'])]:size-4 [[data-slot=dialog-content]_&]:rounded-lg! group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n >\n {children}\n <CheckIcon className=\"ml-auto opacity-0 group-has-[[data-slot=command-shortcut]]/command-item:hidden group-data-[checked=true]/command-item:opacity-100\" />\n </CommandPrimitive.Item>\n );\n}\n\ntype CommandShortcutProps = React.ComponentProps<\"span\">;\n\n/**\n * Keyboard shortcut label displayed at the end of a command item.\n * Automatically aligned to the right and hides the check icon.\n */\nfunction CommandShortcut({ className, ...props }: CommandShortcutProps) {\n return (\n <span\n data-slot=\"command-shortcut\"\n className={cn(\n \"text-muted-foreground group-data-selected/command-item:text-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n type CommandProps,\n type CommandDialogProps,\n type CommandInputProps,\n type CommandListProps,\n type CommandEmptyProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n type CommandSeparatorProps,\n};\n"],"names":["CommandPrimitive"],"mappings":";;;;;;;;;AAsBA;AACE;AACE;AAACA;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAoBA;AAAuB;AACb;AACM;AACd;AACA;AACkB;AAEpB;AACE;AAEI;AACE;AAAoB;AACY;AAClC;AACA;AAAC;AAAA;AAC4D;AAC3D;AAEC;AAAA;AAAA;AAIT;AAOA;AACE;AAGM;AAAA;AAAkB;AAAjB;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAAA;AAIN;AAIR;AAOA;AACE;AACE;AAAkB;AAAjB;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAOA;AACE;AACE;AAAkB;AAAjB;AACW;AACyC;AAC/C;AAAA;AAGV;AAOA;AACE;AACE;AAAkB;AAAjB;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AASA;AACE;AACE;AAAkB;AAAjB;AACW;AAC4C;AAClD;AAAA;AAGV;AAQA;AACE;AACE;AAAkB;AAAjB;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AACwJ;AAAA;AAAA;AAG/J;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../../../src/components/ui/context-menu.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ContextMenu as ContextMenuPrimitive } from \"@base-ui/react/context-menu\";\n\nimport { cn } from \"@/lib/utils\";\nimport { menuItemVariants, type MenuItemVariant } from \"@/lib/variants\";\nimport { ChevronRightIcon, CheckIcon } from \"lucide-react\";\n\ntype ContextMenuProps = ContextMenuPrimitive.Root.Props;\n\n/** Root context menu component. Manages state and handles right-click trigger. */\nfunction ContextMenu({ ...props }: ContextMenuProps) {\n return <ContextMenuPrimitive.Root data-slot=\"context-menu\" {...props} />;\n}\n\ntype ContextMenuPortalProps = ContextMenuPrimitive.Portal.Props;\n\n/** Portal container for context menu content. Renders content in document body. */\nfunction ContextMenuPortal({ ...props }: ContextMenuPortalProps) {\n return (\n <ContextMenuPrimitive.Portal data-slot=\"context-menu-portal\" {...props} />\n );\n}\n\ntype ContextMenuTriggerProps = ContextMenuPrimitive.Trigger.Props;\n\n/** Element that triggers the context menu on right-click. */\nfunction ContextMenuTrigger({ className, ...props }: ContextMenuTriggerProps) {\n return (\n <ContextMenuPrimitive.Trigger\n data-slot=\"context-menu-trigger\"\n className={cn(\"select-none\", className)}\n {...props}\n />\n );\n}\n\ntype ContextMenuContentProps = ContextMenuPrimitive.Popup.Props &\n Pick<\n ContextMenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >;\n\n/**\n * Context menu content with automatic portal and positioning.\n * Includes animations, shadows, and overflow handling.\n */\nfunction ContextMenuContent({\n className,\n align = \"start\",\n alignOffset = 4,\n side = \"right\",\n sideOffset = 0,\n ...props\n}: ContextMenuContentProps) {\n return (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Positioner\n className=\"isolate z-50 outline-none\"\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n >\n <ContextMenuPrimitive.Popup\n data-slot=\"context-menu-content\"\n className={cn(\n \"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-36 rounded-5xl p-4 border-[0.5px] shadow-md ring-1 duration-100 z-50 max-h-(--available-height) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Positioner>\n </ContextMenuPrimitive.Portal>\n );\n}\n\ntype ContextMenuGroupProps = ContextMenuPrimitive.Group.Props;\n\n/** Groups related menu items together. Use with ContextMenuLabel. */\nfunction ContextMenuGroup({ ...props }: ContextMenuGroupProps) {\n return (\n <ContextMenuPrimitive.Group data-slot=\"context-menu-group\" {...props} />\n );\n}\n\ntype ContextMenuLabelProps = ContextMenuPrimitive.GroupLabel.Props & {\n /** Adds extra left padding to align with items that have icons. */\n inset?: boolean;\n};\n\n/** Label for a group of context menu items. */\nfunction ContextMenuLabel({\n className,\n inset,\n ...props\n}: ContextMenuLabelProps) {\n return (\n <ContextMenuPrimitive.GroupLabel\n data-slot=\"context-menu-label\"\n data-inset={inset}\n className={cn(\n \"text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ContextMenuItemProps = ContextMenuPrimitive.Item.Props & {\n /** Adds extra left padding to align with items that have icons. */\n inset?: boolean;\n /** Visual style variant. @default \"default\" */\n variant?: MenuItemVariant;\n};\n\n/** Interactive menu item. Closes menu on click by default. */\nfunction ContextMenuItem({\n className,\n inset = false,\n variant = \"default\",\n ...props\n}: ContextMenuItemProps) {\n return (\n <ContextMenuPrimitive.Item\n data-slot=\"context-menu-item\"\n className={cn(\n menuItemVariants({ variant, inset }),\n \"group/context-menu-item\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ContextMenuSubProps = ContextMenuPrimitive.SubmenuRoot.Props;\n\n/** Root component for a nested submenu. */\nfunction ContextMenuSub({ ...props }: ContextMenuSubProps) {\n return (\n <ContextMenuPrimitive.SubmenuRoot data-slot=\"context-menu-sub\" {...props} />\n );\n}\n\ntype ContextMenuSubTriggerProps = ContextMenuPrimitive.SubmenuTrigger.Props & {\n /** Adds extra left padding to align with items that have icons. */\n inset?: boolean;\n};\n\n/** Menu item that opens a submenu. Automatically includes chevron icon. */\nfunction ContextMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: ContextMenuSubTriggerProps) {\n return (\n <ContextMenuPrimitive.SubmenuTrigger\n data-slot=\"context-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground rounded-sm px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </ContextMenuPrimitive.SubmenuTrigger>\n );\n}\n\ntype ContextMenuSubContentProps = React.ComponentProps<\n typeof ContextMenuContent\n>;\n\n/** Content container for a submenu. Opens to the right by default. */\nfunction ContextMenuSubContent({ ...props }: ContextMenuSubContentProps) {\n return (\n <ContextMenuContent\n data-slot=\"context-menu-sub-content\"\n className=\"shadow-lg\"\n side=\"right\"\n {...props}\n />\n );\n}\n\ntype ContextMenuCheckboxItemProps = ContextMenuPrimitive.CheckboxItem.Props;\n\n/** Menu item with checkbox. Shows check icon when selected. */\nfunction ContextMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: ContextMenuCheckboxItemProps) {\n return (\n <ContextMenuPrimitive.CheckboxItem\n data-slot=\"context-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_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\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute right-2 pointer-events-none\">\n <ContextMenuPrimitive.CheckboxItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n );\n}\n\ntype ContextMenuRadioGroupProps = ContextMenuPrimitive.RadioGroup.Props;\n\n/** Container for mutually exclusive radio items. */\nfunction ContextMenuRadioGroup({ ...props }: ContextMenuRadioGroupProps) {\n return (\n <ContextMenuPrimitive.RadioGroup\n data-slot=\"context-menu-radio-group\"\n {...props}\n />\n );\n}\n\ntype ContextMenuRadioItemProps = ContextMenuPrimitive.RadioItem.Props;\n\n/** Radio button menu item. Shows check icon when selected. */\nfunction ContextMenuRadioItem({\n className,\n children,\n ...props\n}: ContextMenuRadioItemProps) {\n return (\n <ContextMenuPrimitive.RadioItem\n data-slot=\"context-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm [&_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\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 pointer-events-none\">\n <ContextMenuPrimitive.RadioItemIndicator>\n <CheckIcon />\n </ContextMenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n );\n}\n\ntype ContextMenuSeparatorProps = ContextMenuPrimitive.Separator.Props;\n\n/** Visual separator between menu items or groups. */\nfunction ContextMenuSeparator({\n className,\n ...props\n}: ContextMenuSeparatorProps) {\n return (\n <ContextMenuPrimitive.Separator\n data-slot=\"context-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\ntype ContextMenuShortcutProps = React.ComponentProps<\"span\">;\n\n/** Displays keyboard shortcut hint aligned to the right of menu item. */\nfunction ContextMenuShortcut({\n className,\n ...props\n}: ContextMenuShortcutProps) {\n return (\n <span\n data-slot=\"context-menu-shortcut\"\n className={cn(\n \"text-muted-foreground group-focus/context-menu-item:text-accent-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n type ContextMenuProps,\n type ContextMenuTriggerProps,\n type ContextMenuContentProps,\n type ContextMenuItemProps,\n type ContextMenuCheckboxItemProps,\n type ContextMenuRadioItemProps,\n type ContextMenuLabelProps,\n type ContextMenuSeparatorProps,\n type ContextMenuShortcutProps,\n type ContextMenuGroupProps,\n type ContextMenuPortalProps,\n type ContextMenuSubProps,\n type ContextMenuSubContentProps,\n type ContextMenuSubTriggerProps,\n type ContextMenuRadioGroupProps,\n};\n"],"names":["ContextMenuPrimitive.Root","ContextMenuPrimitive.Portal","ContextMenuPrimitive.Trigger","ContextMenuPrimitive.Positioner","ContextMenuPrimitive.Popup","ContextMenuPrimitive.Group","ContextMenuPrimitive.GroupLabel","ContextMenuPrimitive.Item","ContextMenuPrimitive.SubmenuRoot","ContextMenuPrimitive.SubmenuTrigger","ChevronRightIcon","ContextMenuPrimitive.CheckboxItem","ContextMenuPrimitive.CheckboxItemIndicator","CheckIcon","ContextMenuPrimitive.RadioGroup","ContextMenuPrim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,UAAA,oBAACC,OAAA,CAAA,CAAU,EAAA,CACb,EAAA,CACF;AAAA,QACC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;AAKA,SAAS,sBAAsB,EAAE,GAAG,SAAqC;AACvE,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACT,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAKA,SAAS,qBAAqB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA8B;AAC5B,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA,oBAAC,QAAA,EAAK,WAAU,wCACd,UAAA,oBAACC,wBAAA,EACC,UAAA,oBAACH,OAAA,CAAA,CAAU,EAAA,CACb,EAAA,CACF;AAAA,QACC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP;AAKA,SAAS,qBAAqB;AAAA,EAC5B;AAAA,EACA,GAAG;AACL,GAA8B;AAC5B,SACE;AAAA,IAACI;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,6BAA6B,SAAS;AAAA,MACnD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAKA,SAAS,oBAAoB;AAAA,EAC3B;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sources":["../../../../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { XIcon } from \"lucide-react\";\n\ntype DialogProps = DialogPrimitive.Root.Props;\n\n/**\n * Root dialog component. Groups all parts of the dialog and manages open state.\n * Use with controlled (`open`/`onOpenChange`) or uncontrolled (`defaultOpen`) state.\n */\nfunction Dialog({ ...props }: DialogProps) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\ntype DialogTriggerProps = DialogPrimitive.Trigger.Props;\n\n/**\n * Button that opens the dialog. Use `render` prop to customize the trigger element.\n */\nfunction DialogTrigger({ ...props }: DialogTriggerProps) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\ntype DialogPortalProps = DialogPrimitive.Portal.Props;\n\n/**\n * Portal component that renders dialog content at document root.\n * Automatically used by DialogContent - rarely needed directly.\n */\nfunction DialogPortal({ ...props }: DialogPortalProps) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\ntype DialogCloseProps = DialogPrimitive.Close.Props;\n\n/**\n * Button that closes the dialog. Can be styled using the `render` prop.\n */\nfunction DialogClose({ ...props }: DialogCloseProps) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\ntype DialogOverlayProps = DialogPrimitive.Backdrop.Props;\n\n/**\n * Backdrop overlay that appears behind the dialog with blur effect.\n */\nfunction DialogOverlay({ className, ...props }: DialogOverlayProps) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 isolate z-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype DialogContentProps = DialogPrimitive.Popup.Props & {\n /**\n * Show close button (X) in top-right corner.\n * @default true\n */\n showCloseButton?: boolean;\n};\n\n/**\n * Main dialog content container with automatic portal and backdrop overlay.\n * Centered on screen with fade and zoom animations.\n */\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"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 ring-border grid max-w-[calc(100%-2rem)] gap-6 rounded-6xl p-8 text-sm ring-1 duration-100 sm:max-w-md fixed top-1/2 left-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 outline-none\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-4 right-4\"\n size=\"icon-sm\"\n />\n }\n >\n <XIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n );\n}\n\ntype DialogHeaderProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for dialog title and description. Provides consistent spacing.\n */\nfunction DialogHeader({ className, ...props }: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"gap-2 flex flex-col\", className)}\n {...props}\n />\n );\n}\n\ntype DialogFooterProps = React.ComponentProps<\"div\"> & {\n /**\n * Show a \"Close\" button in the footer.\n * @default false\n */\n showCloseButton?: boolean;\n};\n\n/**\n * Container for dialog actions. Stacks vertically on mobile, horizontal on desktop.\n */\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: DialogFooterProps) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"gap-2 flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className,\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n );\n}\n\ntype DialogTitleProps = DialogPrimitive.Title.Props;\n\n/**\n * Dialog title with accessible heading semantics. Required for screen readers.\n */\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"leading-none font-medium\", className)}\n {...props}\n />\n );\n}\n\ntype DialogDescriptionProps = DialogPrimitive.Description.Props;\n\n/**\n * Dialog description providing additional context. Supports inline links with hover effects.\n */\nfunction DialogDescription({ className, ...props }: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n type DialogProps,\n type DialogCloseProps,\n type DialogContentProps,\n type DialogDescriptionProps,\n type DialogFooterProps,\n type DialogHeaderProps,\n type DialogOverlayProps,\n type DialogPortalProps,\n type DialogTitleProps,\n type DialogTriggerProps,\n};\n"],"names":["DialogPrimitive.Backdrop","DialogPrimitive.Popup","DialogPrimitive.Close","DialogPrimitive.Title","DialogPrimitive.Description"],"mappings":";;;;;;;;;;;;;;AAeA;AACE;AACF;AAOA;AACE;AACF;AAQA;AACE;AACF;AAOA;AACE;AACF;AAOA;AACE;AACE;AAACA;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAcA;AAAuB;AACrB;AACA;AACkB;AAEpB;AACE;AAEI;AAAe;AACf;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AAEC;AAACC;AAAA;AACW;AAER;AAAC;AAAA;AACS;AACE;AACL;AAAA;AAAA;AAIT;AAAO;AACwB;AAAA;AAAA;AAAA;AACjC;AAAA;AAAA;AAKV;AAOA;AACE;AACE;AAAC;AAAA;AACW;AACoC;AAC1C;AAAA;AAGV;AAaA;AAAsB;AACpB;AACkB;AAClB;AAEF;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AAIC;AAAA;AAAA;AAIR;AAOA;AACE;AACE;AAACC;AAAA;AACW;AACyC;AAC/C;AAAA;AAGV;AAOA;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"drawer.js","sources":["../../../../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>;\n\n/**\n * Root drawer component that manages state and behavior.\n * Supports sliding from any screen edge (top, bottom, left, right).\n */\nfunction Drawer({ ...props }: DrawerProps) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />;\n}\n\ntype DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>;\n\n/** Button or element that opens the drawer. Use `render` prop or `asChild` to customize. */\nfunction DrawerTrigger({ ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\ntype DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>;\n\n/** Portal container for drawer overlay and content. */\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\ntype DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>;\n\n/** Button or element that closes the drawer. Use `render` prop or `asChild` to customize. */\nfunction DrawerClose({ ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\ntype DrawerOverlayProps = React.ComponentProps<typeof DrawerPrimitive.Overlay>;\n\n/** Backdrop overlay with frosted glass effect (backdrop blur + translucent background). */\nfunction DrawerOverlay({ className, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Overlay\n data-slot=\"drawer-overlay\"\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/10 supports-backdrop-filter:backdrop-blur-xs fixed inset-0 z-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype DrawerContentProps = React.ComponentProps<typeof DrawerPrimitive.Content>;\n\n/**\n * Drawer content panel with automatic portal and backdrop overlay.\n * Shows drag handle on bottom drawers. Direction-based positioning via `direction` prop on Drawer.\n */\nfunction DrawerContent({ className, children, ...props }: DrawerContentProps) {\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n \"bg-popover text-popover-foreground flex h-auto flex-col text-sm data-[vaul-drawer-direction=bottom]:inset-x-0 data-[vaul-drawer-direction=bottom]:bottom-0 data-[vaul-drawer-direction=bottom]:mt-24 data-[vaul-drawer-direction=bottom]:max-h-[80vh] data-[vaul-drawer-direction=bottom]:rounded-t-xl data-[vaul-drawer-direction=bottom]:border-t data-[vaul-drawer-direction=left]:inset-y-0 data-[vaul-drawer-direction=left]:left-0 data-[vaul-drawer-direction=left]:w-3/4 data-[vaul-drawer-direction=left]:rounded-r-xl data-[vaul-drawer-direction=left]:border-r data-[vaul-drawer-direction=right]:inset-y-0 data-[vaul-drawer-direction=right]:right-0 data-[vaul-drawer-direction=right]:w-3/4 data-[vaul-drawer-direction=right]:rounded-l-xl data-[vaul-drawer-direction=right]:border-l data-[vaul-drawer-direction=top]:inset-x-0 data-[vaul-drawer-direction=top]:top-0 data-[vaul-drawer-direction=top]:mb-24 data-[vaul-drawer-direction=top]:max-h-[80vh] data-[vaul-drawer-direction=top]:rounded-b-xl data-[vaul-drawer-direction=top]:border-b data-[vaul-drawer-direction=left]:sm:max-w-sm data-[vaul-drawer-direction=right]:sm:max-w-sm group/drawer-content fixed z-50\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 hidden h-1.5 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block bg-muted mx-auto hidden shrink-0 group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\ntype DrawerHeaderProps = React.ComponentProps<\"div\">;\n\n/** Header section for drawer title and description. Centered on top/bottom drawers. */\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"gap-0.5 p-4 group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center group-data-[vaul-drawer-direction=top]/drawer-content:text-center md:gap-1.5 md:text-left flex flex-col\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype DrawerFooterProps = React.ComponentProps<\"div\">;\n\n/** Footer section for drawer actions. Automatically positioned at bottom with margin-top: auto. */\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"gap-2 p-4 mt-auto flex flex-col\", className)}\n {...props}\n />\n );\n}\n\ntype DrawerTitleProps = React.ComponentProps<typeof DrawerPrimitive.Title>;\n\n/** Accessible title announced when drawer opens. Should be used inside DrawerHeader. */\nfunction DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"text-foreground font-medium\", className)}\n {...props}\n />\n );\n}\n\ntype DrawerDescriptionProps = React.ComponentProps<\n typeof DrawerPrimitive.Description\n>;\n\n/** Accessible description announced when drawer opens. Should be used inside DrawerHeader. */\nfunction DrawerDescription({ className, ...props }: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n type DrawerProps,\n type DrawerPortalProps,\n type DrawerOverlayProps,\n type DrawerTriggerProps,\n type DrawerCloseProps,\n type DrawerContentProps,\n type DrawerHeaderProps,\n type DrawerFooterProps,\n type DrawerTitleProps,\n type DrawerDescriptionProps,\n};\n"],"names":[],"mappings":";;;;;AAaA;AACE;AACF;AAKA;AACE;AACF;AAKA;AACE;AACF;AAKA;AACE;AACF;AAKA;AACE;AACE;AAAiB;AAAhB;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAQA;AACE;AAEI;AAAe;AACf;AAAiB;AAAhB;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEJ;AAAmP;AAClP;AAAA;AAAA;AAAA;AAIT;AAKA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAKA;AACE;AACE;AAAC;AAAA;AACW;AACgD;AACtD;AAAA;AAGV;AAKA;AACE;AACE;AAAiB;AAAhB;AACW;AAC4C;AAClD;AAAA;AAGV;AAOA;AACE;AACE;AAAiB;AAAhB;AACW;AAC8C;AACpD;AAAA;AAGV;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sources":["../../../../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\n\nimport { cn } from \"@/lib/utils\";\nimport { menuItemVariants, type MenuItemVariant } from \"@/lib/variants\";\nimport { ChevronRightIcon, CheckIcon } from \"lucide-react\";\n\ntype DropdownMenuProps = MenuPrimitive.Root.Props;\n\n/**\n * Root component for dropdown menus. Manages open/close state and keyboard navigation.\n * Use `open` and `onOpenChange` for controlled state, or `defaultOpen` for uncontrolled.\n */\nfunction DropdownMenu({ ...props }: DropdownMenuProps) {\n return <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\ntype DropdownMenuPortalProps = MenuPrimitive.Portal.Props;\n\n/** Portal component for rendering dropdown menu content outside the DOM hierarchy. */\nfunction DropdownMenuPortal({ ...props }: DropdownMenuPortalProps) {\n return <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\ntype DropdownMenuTriggerProps = MenuPrimitive.Trigger.Props;\n\n/** Button that opens the dropdown menu. Use `render` prop to customize trigger element. */\nfunction DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps) {\n return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\ntype DropdownMenuContentProps = MenuPrimitive.Popup.Props &\n Pick<\n MenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >;\n\n/**\n * Dropdown menu content container with automatic portal and positioning.\n * Supports alignment, side positioning, and animated transitions.\n */\nfunction DropdownMenuContent({\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n className,\n ...props\n}: DropdownMenuContentProps) {\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner\n className=\"isolate z-50 outline-none\"\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(\n \"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-5xl p-4 lg:px-6 lg:py-5 shadow-md ring-1 duration-100 z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto outline-none data-closed:overflow-hidden\",\n className,\n )}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n );\n}\n\ntype DropdownMenuGroupProps = MenuPrimitive.Group.Props;\n\n/** Group container for related menu items. Use with DropdownMenuLabel for labeled sections. */\nfunction DropdownMenuGroup({ ...props }: DropdownMenuGroupProps) {\n return <MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\ntype DropdownMenuLabelProps = MenuPrimitive.GroupLabel.Props & {\n /** Add extra left padding to align with items that have icons. @default false */\n inset?: boolean;\n};\n\n/**\n * Label for a group of menu items. Typically used inside DropdownMenuGroup.\n */\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: DropdownMenuLabelProps) {\n return (\n <MenuPrimitive.GroupLabel\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"text-muted-foreground px-2 py-1.5 text-xs font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype DropdownMenuItemProps = MenuPrimitive.Item.Props & {\n /** Add extra left padding to align with items that have icons. @default false */\n inset?: boolean;\n /** Visual variant for the menu item. @default \"default\" */\n variant?: MenuItemVariant;\n};\n\n/**\n * Individual menu item. Supports variants (default, destructive, success, warning, info)\n * and inset padding for alignment.\n */\nfunction DropdownMenuItem({\n className,\n inset = false,\n variant = \"default\",\n ...props\n}: DropdownMenuItemProps) {\n return (\n <MenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n className={cn(\n menuItemVariants({ variant, inset }),\n \"group/dropdown-menu-item rounded-full\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype DropdownMenuSubProps = MenuPrimitive.SubmenuRoot.Props;\n\n/** Root component for nested submenus. Wrap DropdownMenuSubTrigger and DropdownMenuSubContent. */\nfunction DropdownMenuSub({ ...props }: DropdownMenuSubProps) {\n return <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\ntype DropdownMenuSubTriggerProps = MenuPrimitive.SubmenuTrigger.Props & {\n /** Add extra left padding to align with items that have icons. @default false */\n inset?: boolean;\n};\n\n/**\n * Trigger button for opening a submenu. Automatically displays chevron icon on the right.\n */\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: DropdownMenuSubTriggerProps) {\n return (\n <MenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"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-2 rounded-full px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </MenuPrimitive.SubmenuTrigger>\n );\n}\n\ntype DropdownMenuSubContentProps = React.ComponentProps<\n typeof DropdownMenuContent\n>;\n\n/**\n * Content container for submenu items. Automatically positioned to the side of the trigger.\n */\nfunction DropdownMenuSubContent({\n align = \"start\",\n alignOffset = -3,\n side = \"right\",\n sideOffset = 0,\n className,\n ...props\n}: DropdownMenuSubContentProps) {\n return (\n <DropdownMenuContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"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-5xl p-4 shadow-lg ring-1 duration-100 w-auto\",\n className,\n )}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n );\n}\n\ntype DropdownMenuCheckboxItemProps = MenuPrimitive.CheckboxItem.Props;\n\n/**\n * Menu item with checkbox. Use `checked` and `onCheckedChange` props for state management.\n * Displays checkmark indicator when checked.\n */\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: DropdownMenuCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-full py-1.5 pr-8 pl-2 text-sm [&_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\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center pointer-events-none\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <MenuPrimitive.CheckboxItemIndicator>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n );\n}\n\ntype DropdownMenuRadioGroupProps = MenuPrimitive.RadioGroup.Props;\n\n/**\n * Container for radio items. Use `value` and `onValueChange` props for state management.\n * Only one radio item can be selected at a time.\n */\nfunction DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps) {\n return (\n <MenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n );\n}\n\ntype DropdownMenuRadioItemProps = MenuPrimitive.RadioItem.Props;\n\n/**\n * Radio item for mutually exclusive selection. Must be used inside DropdownMenuRadioGroup.\n * Displays checkmark indicator when selected.\n */\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: DropdownMenuRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-full py-1.5 pr-8 pl-2 text-sm [&_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\",\n className,\n )}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <MenuPrimitive.RadioItemIndicator>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n );\n}\n\ntype DropdownMenuSeparatorProps = MenuPrimitive.Separator.Props;\n\n/** Visual separator between menu items or groups. */\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: DropdownMenuSeparatorProps) {\n return (\n <MenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\ntype DropdownMenuShortcutProps = React.ComponentProps<\"span\">;\n\n/**\n * Keyboard shortcut display component. Positioned to the right of menu items.\n * For visual purposes only - does not implement actual keyboard shortcuts.\n */\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: DropdownMenuShortcutProps) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n type DropdownMenuProps,\n type DropdownMenuPortalProps,\n type DropdownMenuTriggerProps,\n type DropdownMenuContentProps,\n type DropdownMenuGroupProps,\n type DropdownMenuLabelProps,\n type DropdownMenuItemProps,\n type DropdownMenuCheckboxItemProps,\n type DropdownMenuRadioGroupProps,\n type DropdownMenuRadioItemProps,\n type DropdownMenuSeparatorProps,\n type DropdownMenuShortcutProps,\n type DropdownMenuSubProps,\n type DropdownMenuSubTriggerProps,\n type DropdownMenuSubContentProps,\n};\n"],"names":["MenuPrimitive.Root","MenuPrimitive.Portal","MenuPrimitive.Trigger","MenuPrimitive.Positioner","MenuPrimitive.Popup","MenuPrimitive.Group","MenuPrimitive.GroupLabel","MenuPrimitive.Item","MenuPrimitive.SubmenuRoot","MenuPrimitive.SubmenuTrigger","ChevronRightIcon","MenuPrimitive.CheckboxItem","MenuPrimitive.CheckboxItemIndicator","CheckIcon","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.RadioItemIndicator","MenuPrimitive.Separator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAaA,SAAS,aAAa,EAAE,GAAG,SAA4B;AACrD,6BAAQA,UAAA,EAAmB,aAAU,iBAAiB,GAAG,OAAO;AAClE;AAKA,SAAS,mBAAmB,EAAE,GAAG,SAAkC;AACjE,6BAAQC,YAAA,EAAqB,aAAU,wBAAwB,GAAG,OAAO;AAC3E;AAKA,SAAS,oBAAoB,EAAE,GAAG,SAAmC;AACnE,6BAAQC,aAAA,EAAsB,aAAU,yBAAyB,GAAG,OAAO;AAC7E;AAYA,SAAS,oBAAoB;AAAA,EAC3B,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AAAA,EACb;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,SACE,oBAACD,YAAA,EACC,UAAA;AAAA,IAACE;AAAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEA,UAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAU;AAAA,UACV,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UAAA;AAAA,UAED,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA,GAEJ;AAEJ;AAKA,SA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7B,SACE;AAAA,IAACI;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,6BAA6B,SAAS;AAAA,MACnD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,qBAAqB;AAAA,EAC5B;AAAA,EACA,GAAG;AACL,GAA8B;AAC5B,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"empty.js","sources":["../../../../../../src/components/ui/empty.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype EmptyProps = React.ComponentProps<\"div\">;\n\n/**\n * Empty state container with centered content layout.\n * Displays messaging and actions when data or content is unavailable.\n */\nfunction Empty({ className, ...props }: EmptyProps) {\n return (\n <div\n data-slot=\"empty\"\n className={cn(\n \"gap-4 rounded-4xl border-dashed p-12 flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype EmptyHeaderProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for empty state header content (media, title, description).\n * Centers and vertically stacks its children.\n */\nfunction EmptyHeader({ className, ...props }: EmptyHeaderProps) {\n return (\n <div\n data-slot=\"empty-header\"\n className={cn(\"gap-2 flex max-w-sm flex-col items-center\", className)}\n {...props}\n />\n );\n}\n\nconst emptyMediaVariants = cva(\n \"mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"bg-muted text-foreground flex size-10 shrink-0 items-center justify-center rounded-4xl [&_svg:not([class*='size-'])]:size-6\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\ntype EmptyMediaProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof emptyMediaVariants>;\n\n/**\n * Media/icon container for empty states.\n * @param variant - \"default\" for transparent background, \"icon\" for muted background with padding\n */\nfunction EmptyMedia({\n className,\n variant = \"default\",\n ...props\n}: EmptyMediaProps) {\n return (\n <div\n data-slot=\"empty-icon\"\n data-variant={variant}\n className={cn(emptyMediaVariants({ variant, className }))}\n {...props}\n />\n );\n}\n\ntype EmptyTitleProps = React.ComponentProps<\"div\">;\n\n/**\n * Title for empty state messages. Displays in larger, medium-weight font.\n */\nfunction EmptyTitle({ className, ...props }: EmptyTitleProps) {\n return (\n <div\n data-slot=\"empty-title\"\n className={cn(\"text-lg font-medium tracking-tight\", className)}\n {...props}\n />\n );\n}\n\ntype EmptyDescriptionProps = React.ComponentProps<\"p\">;\n\n/**\n * Description text for empty states with support for inline links.\n * Links are styled with underlines and hover effects.\n */\nfunction EmptyDescription({ className, ...props }: EmptyDescriptionProps) {\n return (\n <div\n data-slot=\"empty-description\"\n className={cn(\n \"text-sm/relaxed text-muted-foreground [&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype EmptyContentProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for empty state actions (buttons, links).\n * Centers and vertically stacks action elements.\n */\nfunction EmptyContent({ className, ...props }: EmptyContentProps) {\n return (\n <div\n data-slot=\"empty-content\"\n className={cn(\n \"gap-4 text-sm flex w-full max-w-sm min-w-0 flex-col items-center text-balance\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Empty,\n EmptyHeader,\n EmptyTitle,\n EmptyDescription,\n EmptyContent,\n EmptyMedia,\n emptyMediaVariants,\n type EmptyProps,\n type EmptyHeaderProps,\n type EmptyMediaProps,\n type EmptyTitleProps,\n type EmptyDescriptionProps,\n type EmptyContentProps,\n};\n"],"names":[],"mappings":";;;AAUA,SAAS,MAAM,EAAE,WAAW,GAAG,SAAqB;AAClD,SACE;AAAA,IAA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aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../../../../../src/components/ui/field.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo } from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Label } from \"@/components/ui/label\";\nimport { Separator } from \"@/components/ui/separator\";\n\ntype FieldSetProps = React.ComponentProps<\"fieldset\">;\n\n/**\n * Container for grouping related fields, provides semantic fieldset/legend structure.\n * Use with FieldLegend for proper form semantics.\n */\nfunction FieldSet({ className, ...props }: FieldSetProps) {\n return (\n <fieldset\n data-slot=\"field-set\"\n className={cn(\n \"gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3 flex flex-col\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype FieldLegendProps = React.ComponentProps<\"legend\"> & {\n /** Visual style variant for the legend. @default \"legend\" */\n variant?: \"legend\" | \"label\";\n};\n\n/**\n * Legend for FieldSet, available in two visual styles.\n * Use \"legend\" for section headers, \"label\" for form-like appearance.\n */\nfunction FieldLegend({\n className,\n variant = \"legend\",\n ...props\n}: FieldLegendProps) {\n return (\n <legend\n data-slot=\"field-legend\"\n data-variant={variant}\n className={cn(\n \"mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype FieldGroupProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for multiple fields, provides consistent spacing and container queries.\n * Use for grouping related fields without semantic fieldset.\n */\nfunction FieldGroup({ className, ...props }: FieldGroupProps) {\n return (\n <div\n data-slot=\"field-group\"\n className={cn(\n \"gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4 group/field-group @container/field-group flex w-full flex-col\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst fieldVariants = cva(\n \"data-[invalid=true]:text-destructive gap-3 group/field flex w-full\",\n {\n variants: {\n orientation: {\n vertical: \"flex-col [&>*]:w-full [&>.sr-only]:w-auto\",\n horizontal:\n \"flex-row items-center [&>[data-slot=field-label]]:flex-auto has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n responsive:\n \"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto @md/field-group:[&>[data-slot=field-label]]:flex-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px\",\n },\n },\n defaultVariants: {\n orientation: \"vertical\",\n },\n },\n);\n\ntype FieldProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof fieldVariants>;\n\n/**\n * Base field wrapper with support for multiple orientation layouts.\n * Supports vertical, horizontal, and responsive layouts. Use data-invalid attribute for error states.\n */\nfunction Field({ className, orientation = \"vertical\", ...props }: FieldProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"field\"\n data-orientation={orientation}\n className={cn(fieldVariants({ orientation }), className)}\n {...props}\n />\n );\n}\n\ntype FieldContentProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for field input and helper elements (description, error).\n * Groups the input control with its associated help text.\n */\nfunction FieldContent({ className, ...props }: FieldContentProps) {\n return (\n <div\n data-slot=\"field-content\"\n className={cn(\n \"gap-1 group/field-content flex flex-1 flex-col leading-snug\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype FieldLabelProps = React.ComponentProps<typeof Label>;\n\n/**\n * Label for field input, extends the Label component with field-specific styling.\n * Supports disabled state and nested field patterns.\n */\nfunction FieldLabel({ className, ...props }: FieldLabelProps) {\n return (\n <Label\n data-slot=\"field-label\"\n className={cn(\n \"has-data-checked:bg-primary/5 has-data-checked:border-primary dark:has-data-checked:bg-primary/10 gap-2 group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-3 group/field-label peer/field-label flex w-fit leading-snug\",\n \"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype FieldTitleProps = React.ComponentProps<\"div\">;\n\n/**\n * Title text for fields with embedded controls (checkboxes, switches).\n * Use inside FieldLabel alongside the control.\n */\nfunction FieldTitle({ className, ...props }: FieldTitleProps) {\n return (\n <div\n data-slot=\"field-label\"\n className={cn(\n \"gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50 flex w-fit items-center leading-snug\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype FieldDescriptionProps = React.ComponentProps<\"p\">;\n\n/**\n * Helper text providing additional context for the field.\n * Automatically styled for placement after inputs.\n */\nfunction FieldDescription({ className, ...props }: FieldDescriptionProps) {\n return (\n <p\n data-slot=\"field-description\"\n className={cn(\n \"text-muted-foreground text-left text-sm [[data-variant=legend]+&]:-mt-1.5 leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance\",\n \"last:mt-0 nth-last-2:-mt-1\",\n \"[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype FieldSeparatorProps = React.ComponentProps<\"div\"> & {\n /** Optional label text to display on the separator line. */\n children?: React.ReactNode;\n};\n\n/**\n * Visual separator between field groups, optionally with label text.\n * Use to organize sections within forms.\n */\nfunction FieldSeparator({\n children,\n className,\n ...props\n}: FieldSeparatorProps) {\n return (\n <div\n data-slot=\"field-separator\"\n data-content={!!children}\n className={cn(\n \"-my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2 relative\",\n className,\n )}\n {...props}\n >\n <Separator className=\"absolute inset-0 top-1/2\" />\n {children && (\n <span\n className=\"text-muted-foreground px-2 bg-background relative mx-auto block w-fit\"\n data-slot=\"field-separator-content\"\n >\n {children}\n </span>\n )}\n </div>\n );\n}\n\ntype FieldErrorProps = React.ComponentProps<\"div\"> & {\n /** Array of error objects with message property. Automatically deduplicates. */\n errors?: Array<{ message?: string } | undefined>;\n};\n\n/**\n * Error message display for fields. Accepts errors array or children.\n * Automatically deduplicates multiple errors and displays as list.\n */\nfunction FieldError({\n className,\n children,\n errors,\n ...props\n}: FieldErrorProps) {\n const content = useMemo(() => {\n if (children) {\n return children;\n }\n\n if (!errors?.length) {\n return null;\n }\n\n const uniqueErrors = [\n ...new Map(errors.map((error) => [error?.message, error])).values(),\n ];\n\n if (uniqueErrors?.length == 1) {\n return uniqueErrors[0]?.message;\n }\n\n return (\n <ul className=\"ml-4 flex list-disc flex-col gap-1\">\n {uniqueErrors.map(\n (error, index) =>\n error?.message && <li key={index}>{error.message}</li>,\n )}\n </ul>\n );\n }, [children, errors]);\n\n if (!content) {\n return null;\n }\n\n return (\n <div\n role=\"alert\"\n data-slot=\"field-error\"\n className={cn(\"text-destructive text-sm font-normal\", className)}\n {...props}\n >\n {content}\n </div>\n );\n}\n\nexport {\n Field,\n FieldLabel,\n FieldDescription,\n FieldError,\n FieldGroup,\n FieldLegend,\n FieldSeparator,\n FieldSet,\n FieldContent,\n FieldTitle,\n type FieldProps,\n type FieldLabelProps,\n type FieldDescriptionProps,\n type FieldErrorProps,\n type FieldGroupProps,\n type FieldLegendProps,\n type FieldSeparatorProps,\n type FieldSetProps,\n type FieldContentProps,\n type FieldTitleProps,\n};\n"],"names":[],"mappings":";;;;;;;AAeA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAWA;AAAqB;AACnB;AACU;AAEZ;AACE;AACE;AAAC;AAAA;AACW;AACI;AACH;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAEA;AAAsB;AACpB;AACA;AACY;AACK;AACD;AAER;AAEA;AAAA;AACJ;AAEe;AACF;AAAA;AAGnB;AASA;AACE;AACE;AAAC;AAAA;AACM;AACK;AACQ;AACqC;AACnD;AAAA;AAGV;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AACA;AAAA;AAEE;AAAA;AAGV;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AACA;AACA;AAAA;AAEE;AAAA;AAGV;AAWA;AAAwB;AACtB;AACA;AAEF;AACE;AACE;AAAC;AAAA;AACW;AACM;AACL;AACT;AACA;AAAA;AAEE;AAEJ;AAAgD;AAE9C;AAAC;AAAA;AACW;AACA;AAET;AAAA;AAAA;AACH;AAAA;AAIR;AAWA;AAAoB;AAClB;AACA;AACA;AAEF;AACE;AACE;AACE;AAAO;AAGT;AACE;AAAO;AAGT;AAAqB;AACwC;AAG7D;AACE;AAAwB;AAG1B;AAEkB;AAEuC;AAEvD;AAIJ;AACE;AAAO;AAGT;AACE;AAAC;AAAA;AACM;AACK;AACqD;AAC3D;AAEH;AAAA;AAGP;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hover-card.js","sources":["../../../../../../src/components/ui/hover-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { PreviewCard as PreviewCardPrimitive } from \"@base-ui/react/preview-card\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype HoverCardProps = PreviewCardPrimitive.Root.Props;\n\n/**\n * HoverCard root container - manages state and hover interactions.\n * Wrap trigger and content with this component.\n */\nfunction HoverCard({ ...props }: HoverCardProps) {\n return <PreviewCardPrimitive.Root data-slot=\"hover-card\" {...props} />;\n}\n\ntype HoverCardTriggerProps = PreviewCardPrimitive.Trigger.Props;\n\n/**\n * Element that triggers the hover card on hover.\n * Use `render` prop to customize the trigger element.\n */\nfunction HoverCardTrigger({ ...props }: HoverCardTriggerProps) {\n return (\n <PreviewCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n );\n}\n\ntype HoverCardContentProps = PreviewCardPrimitive.Popup.Props &\n Pick<\n PreviewCardPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >;\n\n/**\n * HoverCard content container with automatic portal, positioning, and animations.\n * Supports positioning on all sides with alignment options.\n */\nfunction HoverCardContent({\n className,\n side = \"bottom\",\n sideOffset = 4,\n align = \"center\",\n alignOffset = 4,\n ...props\n}: HoverCardContentProps) {\n return (\n <PreviewCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <PreviewCardPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PreviewCardPrimitive.Popup\n data-slot=\"hover-card-content\"\n className={cn(\n \"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 w-64 rounded-5xl p-4 text-sm shadow-md ring-1 duration-100 z-50 origin-(--transform-origin) outline-hidden\",\n className,\n )}\n {...props}\n />\n </PreviewCardPrimitive.Positioner>\n </PreviewCardPrimitive.Portal>\n );\n}\n\nexport {\n HoverCard,\n HoverCardTrigger,\n HoverCardContent,\n type HoverCardProps,\n type HoverCardTriggerProps,\n type HoverCardContentProps,\n};\n"],"names":["PreviewCardPrimitive.Positioner","PreviewCardPrimitive.Popup"],"mappings":";;;;;;;;AAYA;AACE;AACF;AAQA;AACE;AAGF;AAYA;AAA0B;AACxB;AACO;AACM;AACL;AACM;AAEhB;AACE;AAEI;AAACA;AAAA;AACC;AACA;AACA;AACA;AACU;AAEV;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAAA;AACN;AAIR;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.js","sources":["../../../../../../src/components/ui/input-group.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Input } from \"@/components/ui/input\";\nimport { Textarea } from \"@/components/ui/textarea\";\n\ntype InputGroupProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for input with addons (icons, text, buttons) at start/end.\n * Manages focus ring, validation states, and addon alignment.\n */\nfunction InputGroup({ className, ...props }: InputGroupProps) {\n return (\n <div\n data-slot=\"input-group\"\n role=\"group\"\n className={cn(\n \"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 h-9 rounded-lg border shadow-xs transition-[color,box-shadow] has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot][aria-invalid=true]]:ring-[3px] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\nconst inputGroupAddonVariants = cva(\n \"text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none\",\n {\n variants: {\n align: {\n \"inline-start\":\n \"pl-2 has-[>button]:ml-[-0.25rem] has-[>kbd]:ml-[-0.15rem] order-first\",\n \"inline-end\":\n \"pr-2 has-[>button]:mr-[-0.25rem] has-[>kbd]:mr-[-0.15rem] order-last\",\n \"block-start\":\n \"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start\",\n \"block-end\":\n \"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start\",\n },\n },\n defaultVariants: {\n align: \"inline-start\",\n },\n },\n);\n\ntype InputGroupAddonProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof inputGroupAddonVariants>;\n\n/**\n * Addon container for icons, text, or buttons at input start/end.\n * Clicking the addon focuses the input (unless clicking a button).\n */\nfunction InputGroupAddon({\n className,\n align = \"inline-start\",\n ...props\n}: InputGroupAddonProps) {\n return (\n <div\n role=\"group\"\n data-slot=\"input-group-addon\"\n data-align={align}\n className={cn(inputGroupAddonVariants({ align }), className)}\n onClick={(e) => {\n if ((e.target as HTMLElement).closest(\"button\")) {\n return;\n }\n e.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n }}\n {...props}\n />\n );\n}\n\nconst inputGroupButtonVariants = cva(\n \"gap-2 text-sm shadow-none flex items-center\",\n {\n variants: {\n size: {\n xs: \"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n sm: \"\",\n \"icon-xs\":\n \"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0\",\n \"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n },\n },\n defaultVariants: {\n size: \"xs\",\n },\n },\n);\n\ntype InputGroupButtonProps = Omit<\n React.ComponentProps<typeof Button>,\n \"size\" | \"type\"\n> &\n VariantProps<typeof inputGroupButtonVariants> & {\n /** Button type. @default \"button\" */\n type?: \"button\" | \"submit\" | \"reset\";\n };\n\n/**\n * Button sized for use within InputGroupAddon.\n * Defaults to ghost variant and extra-small size.\n */\nfunction InputGroupButton({\n className,\n type = \"button\",\n variant = \"ghost\",\n size = \"xs\",\n ...props\n}: InputGroupButtonProps) {\n return (\n <Button\n type={type}\n data-size={size}\n variant={variant}\n className={cn(inputGroupButtonVariants({ size }), className)}\n {...props}\n />\n );\n}\n\ntype InputGroupTextProps = React.ComponentProps<\"span\">;\n\n/**\n * Text label/prefix/suffix for use within InputGroupAddon.\n * Commonly used for URL schemes (https://), units (USD, MB), or format indicators (@, /).\n */\nfunction InputGroupText({ className, ...props }: InputGroupTextProps) {\n return (\n <span\n className={cn(\n \"text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype InputGroupInputProps = React.ComponentProps<\"input\">;\n\n/**\n * Input styled for use within InputGroup.\n * Removes border/shadow/ring to integrate with group container styling.\n */\nfunction InputGroupInput({ className, ...props }: InputGroupInputProps) {\n return (\n <Input\n data-slot=\"input-group-control\"\n className={cn(\n \"rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype InputGroupTextareaProps = React.ComponentProps<\"textarea\">;\n\n/**\n * Textarea styled for use within InputGroup.\n * Removes border/shadow/ring to integrate with group container styling.\n */\nfunction InputGroupTextarea({ className, ...props }: InputGroupTextareaProps) {\n return (\n <Textarea\n data-slot=\"input-group-control\"\n className={cn(\n \"rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent flex-1 resize-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n InputGroup,\n InputGroupAddon,\n InputGroupButton,\n InputGroupText,\n InputGroupInput,\n InputGroupTextarea,\n inputGroupAddonVariants,\n inputGroupButtonVariants,\n type InputGroupProps,\n type InputGroupAddonProps,\n type InputGroupButtonProps,\n type InputGroupTextProps,\n type InputGroupInputProps,\n type InputGroupTextareaProps,\n};\n"],"names":[],"mappings":";;;;;;;AAcA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,MAAK;AAAA,MACL,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAM,0BAA0B;AAAA,EAC9B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,gBACE;AAAA,QACF,cACE;AAAA,QACF,eACE;AAAA,QACF,aACE;AAAA,MAAA;AAAA,IACJ;AAAA,IAEF,iBAAiB;AAAA,MACf,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ;AASA,SAAS,gBAAgB;AAAA,EACvB;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAAyB;AACvB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,cAAY;AAAA,MACZ,WAAW,GAAG,wBAAwB,EAAE,MAAA,CAAO,GAAG,SAAS;AAAA,MAC3D,SAAS,CAAC,MAAM;AACd,YAAK,EAAE,OAAuB,QAAQ,QAAQ,GAAG;AAC/C;AAAA,QACF;AACA,UAAE,cAAc,eAAe,cAAc,OAAO,GAAG,MAAA;AAAA,MACzD;AAAA,MACC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAM,2BAA2B;AAAA,EAC/B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,WACE;AAAA,QACF,WAAW;AAAA,MAAA;AAAA,IACb;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;AAeA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA,OAAO;AAAA,EACP,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,GAA0B;AACxB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,aAAW;AAAA,MACX;AAAA,MACA,WAAW,GAAG,yBAAyB,EAAE,KAAA,CAAM,GAAG,SAAS;AAAA,MAC1D,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,eAAe,EAAE,WAAW,GAAG,SAA8B;AACpE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA+B;AACtE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAkC;AAC5E,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-otp.js","sources":["../../../../../../src/components/ui/input-otp.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { OTPInput, OTPInputContext } from \"input-otp\";\n\nimport { cn } from \"@/lib/utils\";\nimport { MinusIcon } from \"lucide-react\";\n\ntype InputOTPProps = React.ComponentProps<typeof OTPInput> & {\n /** Additional class names for the container element. */\n containerClassName?: string;\n};\n\n/**\n * One-time password input with individual character slots.\n * Built on input-otp library with styled slots and separators.\n */\nfunction InputOTP({ className, containerClassName, ...props }: InputOTPProps) {\n return (\n <OTPInput\n data-slot=\"input-otp\"\n containerClassName={cn(\n \"cn-input-otp flex items-center has-disabled:opacity-50\",\n containerClassName,\n )}\n spellCheck={false}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n );\n}\n\ntype InputOTPGroupProps = React.ComponentProps<\"div\">;\n\n/**\n * Groups multiple InputOTPSlot components together.\n * Supports error state via aria-invalid.\n */\nfunction InputOTPGroup({ className, ...props }: InputOTPGroupProps) {\n return (\n <div\n data-slot=\"input-otp-group\"\n className={cn(\n \"has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-md has-aria-invalid:ring-[3px] flex items-center\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype InputOTPSlotProps = React.ComponentProps<\"div\"> & {\n /** Zero-based index of this slot in the OTP sequence. */\n index: number;\n};\n\n/**\n * Individual character slot for OTP input.\n * Displays current character, active state, and animated caret.\n */\nfunction InputOTPSlot({ index, className, ...props }: InputOTPSlotProps) {\n const inputOTPContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-active={isActive}\n className={cn(\n \"dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-9 border-y border-r text-sm shadow-xs transition-all outline-none first:rounded-l-xl first:border-l last:rounded-r-xl data-[active=true]:ring-[3px] relative flex items-center justify-center data-[active=true]:z-10\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000 bg-foreground h-4 w-px\" />\n </div>\n )}\n </div>\n );\n}\n\ntype InputOTPSeparatorProps = React.ComponentProps<\"div\">;\n\n/**\n * Visual separator between InputOTPGroup components.\n * Renders a minus icon by default.\n */\nfunction InputOTPSeparator({ ...props }: InputOTPSeparatorProps) {\n return (\n <div\n data-slot=\"input-otp-separator\"\n className=\"[&_svg:not([class*='size-'])]:size-4 flex items-center\"\n role=\"separator\"\n {...props}\n >\n <MinusIcon />\n </div>\n );\n}\n\nexport {\n InputOTP,\n InputOTPGroup,\n InputOTPSlot,\n InputOTPSeparator,\n type InputOTPProps,\n type InputOTPGroupProps,\n type InputOTPSlotProps,\n type InputOTPSeparatorProps,\n};\n"],"names":[],"mappings":";;;;;;AAiBA;AACE;AACE;AAAC;AAAA;AACW;AACU;AAClB;AACA;AAAA;AAEU;AAC0C;AAClD;AAAA;AAGV;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAWA;AACE;AACA;AAEA;AACE;AAAC;AAAA;AACW;AACG;AACF;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AAIC;AAAA;AAAA;AAIR;AAQA;AACE;AACE;AAAC;AAAA;AACW;AACA;AACL;AACD;AAEO;AAAA;AAGjB;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sources":["../../../../../../src/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Input as InputPrimitive } from \"@base-ui/react/input\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype InputProps = React.ComponentProps<\"input\">;\n\n/**\n * Text input field with support for all HTML input types.\n *\n * Supports text, email, password, number, tel, url, search, date, time, file, and other input types.\n * Includes built-in validation styling via `aria-invalid` attribute.\n */\nfunction Input({ className, type, ...props }: InputProps) {\n return (\n <InputPrimitive\n type={type}\n data-slot=\"input\"\n className={cn(\n \"dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive h-10 rounded-lg border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] file:h-7 file:text-sm file:font-medium focus-visible:ring-[0.5px] aria-invalid:ring-[3px] md:text-sm file:text-foreground placeholder:text-muted-foreground w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Input, type InputProps };\n"],"names":["InputPrimitive"],"mappings":";;;;AAaA,SAAS,MAAM,EAAE,WAAW,MAAM,GAAG,SAAqB;AACxD,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC;AAAA,MACA,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"item.js","sources":["../../../../../../src/components/ui/item.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Separator } from \"@/components/ui/separator\";\n\ntype ItemGroupProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for organizing related items in a vertical list.\n * Automatically adjusts gap based on child item sizes.\n */\nfunction ItemGroup({ className, ...props }: ItemGroupProps) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\n \"gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ItemSeparatorProps = React.ComponentProps<typeof Separator>;\n\n/**\n * Horizontal separator for dividing items within an ItemGroup.\n */\nfunction ItemSeparator({ className, ...props }: ItemSeparatorProps) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-2\", className)}\n {...props}\n />\n );\n}\n\nconst itemVariants = cva(\n \"[a]:hover:bg-muted rounded-6xl border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-[3px] [a]:transition-colors\",\n {\n variants: {\n variant: {\n default: \"border-transparent\",\n outline: \"border-border\",\n muted: \"bg-muted/50 border-transparent\",\n },\n size: {\n default: \"gap-3.5 px-4 py-3.5\",\n sm: \"gap-2.5 px-3 py-2.5\",\n xs: \"gap-2 px-2.5 py-2 [[data-slot=dropdown-menu-content]_&]:p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\ntype ItemProps = useRender.ComponentProps<\"div\"> &\n VariantProps<typeof itemVariants>;\n\n/**\n * Flexible list item component for displaying structured content.\n * Use `render` prop to customize the underlying element (e.g., `<a>`, `<button>`).\n */\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n render,\n ...props\n}: ItemProps) {\n return useRender({\n defaultTagName: \"div\",\n props: mergeProps<\"div\">(\n {\n className: cn(itemVariants({ variant, size, className })),\n },\n props,\n ),\n render,\n state: {\n slot: \"item\",\n variant,\n size,\n },\n });\n}\n\nconst itemMediaVariants = cva(\n \"gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"[&_svg:not([class*='size-'])]:size-4\",\n image:\n \"size-10 overflow-hidden rounded-full group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n },\n);\n\ntype ItemMediaProps = React.ComponentProps<\"div\"> &\n VariantProps<typeof itemMediaVariants>;\n\n/**\n * Media container for icons, images, or avatars in an item.\n * Automatically aligns with description text when present.\n */\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: ItemMediaProps) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n );\n}\n\ntype ItemContentProps = React.ComponentProps<\"div\">;\n\n/**\n * Main content area for title and description.\n * Flexes to fill available space.\n */\nfunction ItemContent({ className, ...props }: ItemContentProps) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ItemTitleProps = React.ComponentProps<\"div\">;\n\n/**\n * Title text with medium weight.\n * Supports inline badges and icons.\n */\nfunction ItemTitle({ className, ...props }: ItemTitleProps) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ItemDescriptionProps = React.ComponentProps<\"p\">;\n\n/**\n * Secondary description text.\n * Automatically truncates after 2 lines.\n */\nfunction ItemDescription({ className, ...props }: ItemDescriptionProps) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ItemActionsProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for action buttons or controls.\n */\nfunction ItemActions({ className, ...props }: ItemActionsProps) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"gap-2 flex items-center\", className)}\n {...props}\n />\n );\n}\n\ntype ItemHeaderProps = React.ComponentProps<\"div\">;\n\n/**\n * Full-width header section for complex item layouts.\n */\nfunction ItemHeader({ className, ...props }: ItemHeaderProps) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"gap-2 flex basis-full items-center justify-between\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ItemFooterProps = React.ComponentProps<\"div\">;\n\n/**\n * Full-width footer section for additional information.\n */\nfunction ItemFooter({ className, ...props }: ItemFooterProps) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"gap-2 flex basis-full items-center justify-between\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n type ItemProps,\n type ItemMediaProps,\n type ItemContentProps,\n type ItemActionsProps,\n type ItemGroupProps,\n type ItemSeparatorProps,\n type ItemTitleProps,\n type ItemDescriptionProps,\n type ItemHeaderProps,\n type ItemFooterProps,\n};\n"],"names":[],"mappings":";;;;;;;AAcA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAyB;AAC1D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;AAClE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,aAAY;AAAA,MACZ,WAAW,GAAG,QAAQ,SAAS;AAAA,MAC9B,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,MAAA;AAAA,MAET,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAA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U;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAA+B;AACtE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;AAC9D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2BAA2B,SAAS;AAAA,MACjD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"kbd.js","sources":["../../../../../../src/components/ui/kbd.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\n\ntype KbdProps = React.ComponentProps<\"kbd\">;\n\n/**\n * Keyboard key display component for showing keyboard shortcuts and key combinations.\n * Supports text and icon content (e.g., Command, Arrow keys).\n */\nfunction Kbd({ className, ...props }: KbdProps) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n \"bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype KbdGroupProps = React.ComponentProps<\"div\">;\n\n/**\n * Container for grouping multiple Kbd components to represent key combinations.\n * Use for shortcuts like Cmd+K or sequential keys like G→H.\n */\nfunction KbdGroup({ className, ...props }: KbdGroupProps) {\n return (\n <kbd\n data-slot=\"kbd-group\"\n className={cn(\"gap-1 inline-flex items-center\", className)}\n {...props}\n />\n );\n}\n\nexport { Kbd, KbdGroup, type KbdProps, type KbdGroupProps };\n"],"names":[],"mappings":";;AAQA,SAAS,IAAI,EAAE,WAAW,GAAG,SAAmB;AAC9C,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,SAAS,EAAE,WAAW,GAAG,SAAwB;AACxD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,kCAAkC,SAAS;AAAA,MACxD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sources":["../../../../../../src/components/ui/label.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype LabelProps = React.ComponentProps<\"label\">;\n\n/**\n * Accessible label component that associates with form controls.\n * Automatically styles for disabled states via peer and group data attributes.\n */\nfunction Label({ className, ...props }: LabelProps) {\n return (\n <label\n data-slot=\"label\"\n className={cn(\n \"gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label, type LabelProps };\n"],"names":[],"mappings":";;;;AAYA;AACE;AACE;AAAC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.js","sources":["../../../../../../src/components/ui/menubar.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\";\nimport { Menubar as MenubarPrimitive } from \"@base-ui/react/menubar\";\n\nimport { cn } from \"@/lib/utils\";\nimport { menuItemVariants, type MenuItemVariant } from \"@/lib/variants\";\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from \"@/components/ui/dropdown-menu\";\nimport { CheckIcon } from \"lucide-react\";\n\ntype MenubarProps = MenubarPrimitive.Props;\n\n/**\n * Horizontal menubar for application-level navigation and actions.\n * Typically used at the top of an application with File, Edit, View, Help menus.\n */\nfunction Menubar({ className, ...props }: MenubarProps) {\n return (\n <MenubarPrimitive\n data-slot=\"menubar\"\n className={cn(\n \"bg-background h-9 gap-1 rounded-lg border p-1 shadow-xs flex items-center\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarMenuProps = React.ComponentProps<typeof DropdownMenu>;\n\n/** Individual menu within the menubar. Manages open/close state for a single menu. */\nfunction MenubarMenu({ ...props }: MenubarMenuProps) {\n return <DropdownMenu data-slot=\"menubar-menu\" {...props} />;\n}\n\ntype MenubarGroupProps = React.ComponentProps<typeof DropdownMenuGroup>;\n\n/** Groups related menu items together with optional label. */\nfunction MenubarGroup({ ...props }: MenubarGroupProps) {\n return <DropdownMenuGroup data-slot=\"menubar-group\" {...props} />;\n}\n\ntype MenubarPortalProps = React.ComponentProps<typeof DropdownMenuPortal>;\n\n/** Renders menu content in a portal. Automatically used by MenubarContent. */\nfunction MenubarPortal({ ...props }: MenubarPortalProps) {\n return <DropdownMenuPortal data-slot=\"menubar-portal\" {...props} />;\n}\n\ntype MenubarTriggerProps = React.ComponentProps<typeof DropdownMenuTrigger>;\n\n/** Button that opens a menu. Use `render` prop to customize. */\nfunction MenubarTrigger({ className, ...props }: MenubarTriggerProps) {\n return (\n <DropdownMenuTrigger\n data-slot=\"menubar-trigger\"\n className={cn(\n \"hover:bg-muted aria-expanded:bg-muted rounded-md px-2 py-1 text-sm font-medium flex items-center outline-hidden select-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarContentProps = React.ComponentProps<typeof DropdownMenuContent>;\n\n/**\n * Menu content container with automatic portal rendering.\n * Includes backdrop blur (frosted glass effect) and smooth animations.\n */\nfunction MenubarContent({\n className,\n align = \"start\",\n alignOffset = -4,\n sideOffset = 8,\n ...props\n}: MenubarContentProps) {\n return (\n <DropdownMenuContent\n data-slot=\"menubar-content\"\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover w-full text-popover-foreground data-open:animate-in data-open:fade-in-0 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 min-w-36 rounded-md p-1 shadow-md ring-1 duration-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarItemProps = MenuPrimitive.Item.Props & {\n /** Adds left padding for items in menus with leading icons/checkboxes. */\n inset?: boolean;\n /** Visual variant for different action types. @default \"default\" */\n variant?: MenuItemVariant;\n};\n\n/**\n * Interactive menu item. Supports variants (default, destructive, success, warning, info).\n * Use `inset` for items in menus with icons/checkboxes.\n */\nfunction MenubarItem({\n className,\n inset = false,\n variant = \"default\",\n ...props\n}: MenubarItemProps) {\n return (\n <MenuPrimitive.Item\n data-slot=\"menubar-item\"\n className={cn(\n menuItemVariants({ variant, inset }),\n \"group/menubar-item\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarCheckboxItemProps = MenuPrimitive.CheckboxItem.Props;\n\n/**\n * Menu item with checkbox for toggling independent boolean options.\n * Displays checkmark when checked. Use for multiple toggleable settings.\n */\nfunction MenubarCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: MenubarCheckboxItemProps) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"menubar-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm data-disabled:opacity-50 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\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center\">\n <MenuPrimitive.CheckboxItemIndicator>\n <CheckIcon />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n );\n}\n\ntype MenubarRadioGroupProps = React.ComponentProps<\n typeof DropdownMenuRadioGroup\n>;\n\n/** Container for radio items. Manages single selection from mutually exclusive options. */\nfunction MenubarRadioGroup({ ...props }: MenubarRadioGroupProps) {\n return <DropdownMenuRadioGroup data-slot=\"menubar-radio-group\" {...props} />;\n}\n\ntype MenubarRadioItemProps = MenuPrimitive.RadioItem.Props;\n\n/**\n * Menu item with radio button for selecting one option from a group.\n * Must be wrapped in MenubarRadioGroup. Displays checkmark when selected.\n */\nfunction MenubarRadioItem({\n className,\n children,\n ...props\n}: MenubarRadioItemProps) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"menubar-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-2 rounded-md py-1.5 pr-2 pl-8 text-sm data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n >\n <span className=\"left-2 size-4 [&_svg:not([class*='size-'])]:size-4 pointer-events-none absolute flex items-center justify-center\">\n <MenuPrimitive.RadioItemIndicator>\n <CheckIcon />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n );\n}\n\ntype MenubarLabelProps = React.ComponentProps<typeof DropdownMenuLabel>;\n\n/** Non-interactive label for grouping menu items. Use inside MenubarGroup. */\nfunction MenubarLabel({ className, inset, ...props }: MenubarLabelProps) {\n return (\n <DropdownMenuLabel\n data-slot=\"menubar-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarSeparatorProps = React.ComponentProps<typeof DropdownMenuSeparator>;\n\n/** Visual separator between menu items or groups. */\nfunction MenubarSeparator({ className, ...props }: MenubarSeparatorProps) {\n return (\n <DropdownMenuSeparator\n data-slot=\"menubar-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\ntype MenubarShortcutProps = React.ComponentProps<typeof DropdownMenuShortcut>;\n\n/**\n * Keyboard shortcut hint displayed on the right side of menu items.\n * Shows in muted color, highlights on focus. For display only, doesn't bind keys.\n */\nfunction MenubarShortcut({ className, ...props }: MenubarShortcutProps) {\n return (\n <DropdownMenuShortcut\n data-slot=\"menubar-shortcut\"\n className={cn(\n \"text-muted-foreground group-focus/menubar-item:text-accent-foreground text-xs tracking-widest ml-auto\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarSubProps = React.ComponentProps<typeof DropdownMenuSub>;\n\n/** Container for nested submenu. Manages open/close state for the submenu. */\nfunction MenubarSub({ ...props }: MenubarSubProps) {\n return <DropdownMenuSub data-slot=\"menubar-sub\" {...props} />;\n}\n\ntype MenubarSubTriggerProps = React.ComponentProps<\n typeof DropdownMenuSubTrigger\n> & {\n /** Adds left padding for alignment with items that have icons/checkboxes. */\n inset?: boolean;\n};\n\n/**\n * Menu item that opens a submenu on hover or click.\n * Displays chevron icon automatically. Use inside MenubarSub.\n */\nfunction MenubarSubTrigger({\n className,\n inset,\n ...props\n}: MenubarSubTriggerProps) {\n return (\n <DropdownMenuSubTrigger\n data-slot=\"menubar-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground gap-2 rounded-sm px-2 py-1.5 text-sm data-[inset]:pl-8 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype MenubarSubContentProps = React.ComponentProps<\n typeof DropdownMenuSubContent\n>;\n\n/**\n * Content container for submenu items.\n * Positioned relative to trigger, includes backdrop blur and animations.\n */\nfunction MenubarSubContent({ className, ...props }: MenubarSubContentProps) {\n return (\n <DropdownMenuSubContent\n data-slot=\"menubar-sub-content\"\n className={cn(\n \"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 min-w-32 rounded-md p-1 shadow-lg ring-1 duration-100\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Menubar,\n MenubarPortal,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarGroup,\n MenubarSeparator,\n MenubarLabel,\n MenubarItem,\n MenubarShortcut,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSub,\n MenubarSubTrigger,\n MenubarSubContent,\n type MenubarProps,\n type MenubarPortalProps,\n type MenubarMenuProps,\n type MenubarTriggerProps,\n type MenubarContentProps,\n type MenubarGroupProps,\n type MenubarSeparatorProps,\n type MenubarLabelProps,\n type MenubarItemProps,\n type MenubarShortcutProps,\n type MenubarCheckboxItemProps,\n type MenubarRadioGroupProps,\n type MenubarRadioItemProps,\n type MenubarSubProps,\n type MenubarSubTriggerProps,\n type MenubarSubContentProps,\n};\n"],"names":["MenubarPrimitive","MenuPrimitive.Item","MenuPrimitive.CheckboxItem","MenuPrimitive.CheckboxItemIndicator","CheckIcon","MenuPrimitive.RadioItem","MenuPrimitive.RadioItemIndicator"],"mappings":";;;;;;;;;;;;AA4BA,SAAS,QAAQ,EAAE,WAAW,GAAG,SAAuB;AACtD,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAKA,SAAS,YAAY,EAAE,GAAG,SAA2B;AACnD,SAAO,oBAAC,cAAA,EAAa,aAAU,gBAAgB,GAAG,OAAO;AAC3D;AAKA,SAAS,aAAa,EAAE,GAAG,SAA4B;AACrD,SAAO,oBAAC,mBAAA,EAAkB,aAAU,iBAAiB,GAAG,OAAO;AACjE;AAKA,SAAS,cAAc,EAAE,GAAG,SAA6B;AACvD,SAAO,oBAAC,oBAAA,EAAmB,aAAU,kBAAkB,GAAG,OAAO;AACnE;AAKA,SAAS,eAAe,EAAE,WAAW,GAAG,SAA8B;AACpE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,aAAa;AAAA,EACb,GAAG;AACL,GAAwB;AACtB,SACE;AAAA,IAAC;AAA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EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../../../../src/components/ui/modal.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\";\r\n\r\nimport { cn } from \"@/lib/utils\";\r\nimport { Button } from \"@/components/ui/button\";\r\n\r\ntype ModalProps = DialogPrimitive.Root.Props;\r\n\r\n/** Root container for modal dialog. Manages open state and accessibility. */\r\nfunction Modal({ ...props }: ModalProps) {\r\n return <DialogPrimitive.Root data-slot=\"modal\" {...props} />;\r\n}\r\n\r\ntype ModalTriggerProps = DialogPrimitive.Trigger.Props;\r\n\r\n/** Button that opens the modal. Use `render` prop to customize. */\r\nfunction ModalTrigger({ ...props }: ModalTriggerProps) {\r\n return <DialogPrimitive.Trigger data-slot=\"modal-trigger\" {...props} />;\r\n}\r\n\r\ntype ModalPortalProps = DialogPrimitive.Portal.Props;\r\n\r\n/** Portal container for modal content and overlay. */\r\nfunction ModalPortal({ ...props }: ModalPortalProps) {\r\n return <DialogPrimitive.Portal data-slot=\"modal-portal\" {...props} />;\r\n}\r\n\r\ntype ModalOverlayProps = DialogPrimitive.Backdrop.Props;\r\n\r\n/** Semi-transparent backdrop overlay with frosted glass effect. */\r\nfunction ModalOverlay({ className, ...props }: ModalOverlayProps) {\r\n return (\r\n <DialogPrimitive.Backdrop\r\n data-slot=\"modal-overlay\"\r\n className={cn(\r\n \"fixed inset-0 z-50 bg-black/10 supports-backdrop-filter:backdrop-blur-xs isolate\",\r\n \"data-open:animate-in data-closed:animate-out\",\r\n \"data-open:fade-in-0 data-closed:fade-out-0 duration-100\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype ModalContentProps = DialogPrimitive.Popup.Props & {\r\n /** Modal size variant. @default \"default\" */\r\n size?: \"default\" | \"sm\" | \"lg\";\r\n};\r\n\r\n/**\r\n * Modal content with automatic portal and backdrop.\r\n * Centered, animated popup with size variants.\r\n */\r\nfunction ModalContent({\r\n className,\r\n size = \"default\",\r\n ...props\r\n}: ModalContentProps) {\r\n return (\r\n <ModalPortal>\r\n <ModalOverlay />\r\n <DialogPrimitive.Popup\r\n data-slot=\"modal-content\"\r\n data-size={size}\r\n className={cn(\r\n \"fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2\",\r\n \"gap-6 rounded-6xl p-6 outline-none\",\r\n \"bg-popover text-popover-foreground ring-1 ring-border\",\r\n \"data-open:animate-in data-closed:animate-out\",\r\n \"data-open:fade-in-0 data-closed:fade-out-0\",\r\n \"data-open:zoom-in-95 data-closed:zoom-out-95 duration-100\",\r\n \"data-[size=sm]:max-w-sm\",\r\n \"data-[size=default]:max-w-lg\",\r\n \"data-[size=lg]:max-w-2xl\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n </ModalPortal>\r\n );\r\n}\r\n\r\ntype ModalHeaderProps = React.ComponentProps<\"div\">;\r\n\r\n/** Header section for title and description. */\r\nfunction ModalHeader({ className, ...props }: ModalHeaderProps) {\r\n return (\r\n <div\r\n data-slot=\"modal-header\"\r\n className={cn(\"grid gap-1.5 text-left\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype ModalFooterProps = React.ComponentProps<\"div\">;\r\n\r\n/** Footer section for action buttons. */\r\nfunction ModalFooter({ className, ...props }: ModalFooterProps) {\r\n return (\r\n <div\r\n data-slot=\"modal-footer\"\r\n className={cn(\r\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype ModalTitleProps = React.ComponentProps<typeof DialogPrimitive.Title>;\r\n\r\n/** Modal title. Automatically announced by screen readers. */\r\nfunction ModalTitle({ className, ...props }: ModalTitleProps) {\r\n return (\r\n <DialogPrimitive.Title\r\n data-slot=\"modal-title\"\r\n className={cn(\"text-lg font-medium\", className)}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype ModalDescriptionProps = React.ComponentProps<\r\n typeof DialogPrimitive.Description\r\n>;\r\n\r\n/** Modal description text. Supports links with automatic styling. */\r\nfunction ModalDescription({ className, ...props }: ModalDescriptionProps) {\r\n return (\r\n <DialogPrimitive.Description\r\n data-slot=\"modal-description\"\r\n className={cn(\r\n \"text-sm text-muted-foreground text-balance md:text-pretty\",\r\n \"*:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground\",\r\n className,\r\n )}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\ntype ModalCloseProps = DialogPrimitive.Close.Props &\r\n Pick<React.ComponentProps<typeof Button>, \"variant\" | \"size\">;\r\n\r\n/** Button that closes the modal. Defaults to outline variant. */\r\nfunction ModalClose({\r\n className,\r\n variant = \"outline\",\r\n size = \"default\",\r\n ...props\r\n}: ModalCloseProps) {\r\n return (\r\n <DialogPrimitive.Close\r\n data-slot=\"modal-close\"\r\n className={cn(className)}\r\n render={<Button variant={variant} size={size} />}\r\n {...props}\r\n />\r\n );\r\n}\r\n\r\nexport {\r\n Modal,\r\n ModalTrigger,\r\n ModalPortal,\r\n ModalOverlay,\r\n ModalContent,\r\n ModalHeader,\r\n ModalFooter,\r\n ModalTitle,\r\n ModalDescription,\r\n ModalClose,\r\n type ModalProps,\r\n type ModalTriggerProps,\r\n type ModalPortalProps,\r\n type ModalOverlayProps,\r\n type ModalContentProps,\r\n type ModalHeaderProps,\r\n type ModalFooterProps,\r\n type ModalTitleProps,\r\n type ModalDescriptionProps,\r\n type ModalCloseProps,\r\n};\r\n"],"names":["DialogPrimitive.Root","DialogPrimitive.Trigger","DialogPrimitive.Portal","DialogPrimitive.Backdrop","DialogPrimitive.Popup","DialogPrimitive.Title","DialogPrimitive.Description","DialogPrimitive.Close"],"mappings":";;;;;;;;;;;;AASA,SAAS,MAAM,EAAE,GAAG,SAAqB;AACvC,6BAAQA,YAAA,EAAqB,aAAU,SAAS,GAAG,OAAO;AAC5D;AAKA,SAAS,aAAa,EA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,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,uBAAuB,SAAS;AAAA,MAC7C,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAgC;AACxE,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAMA,SAAS,WAAW;AAAA,EAClB;AAAA,EACA,UAAU;AAAA,EACV,OAAO;AAAA,EACP,GAAG;AACL,GAAoB;AAClB,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,SAAS;AAAA,MACvB,QAAQ,oBAAC,QAAA,EAAO,SAAkB,KAAA,CAAY;AAAA,MAC7C,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.js","sources":["../../../../../../src/components/ui/navigation-menu.tsx"],"sourcesContent":["import { NavigationMenu as NavigationMenuPrimitive } from \"@base-ui/react/navigation-menu\";\nimport { cva } from \"class-variance-authority\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ChevronDownIcon } from \"lucide-react\";\n\ntype NavigationMenuProps = NavigationMenuPrimitive.Root.Props;\n\n/**\n * Root container for horizontal navigation with mega menu support.\n * Manages active state and provides keyboard navigation.\n */\nfunction NavigationMenu({\n className,\n children,\n ...props\n}: NavigationMenuProps) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n \"max-w-max group/navigation-menu relative flex max-w-max flex-1 items-center justify-center\",\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuPositioner />\n </NavigationMenuPrimitive.Root>\n );\n}\n\ntype NavigationMenuListProps = NavigationMenuPrimitive.List.Props;\n\n/**\n * Container for navigation menu items. Renders as a horizontal list.\n */\nfunction NavigationMenuList({ className, ...props }: NavigationMenuListProps) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n \"gap-0 group flex flex-1 list-none items-center justify-center\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype NavigationMenuItemProps = NavigationMenuPrimitive.Item.Props;\n\n/**\n * Individual navigation item. Can contain a Link or Trigger + Content.\n * Use `value` prop to identify the item for controlled state.\n */\nfunction NavigationMenuItem({ className, ...props }: NavigationMenuItemProps) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn(\"relative\", className)}\n {...props}\n />\n );\n}\n\nconst navigationMenuTriggerStyle = cva(\n \"bg-background hover:bg-muted focus:bg-muted data-open:hover:bg-muted data-open:focus:bg-muted data-open:bg-muted/50 focus-visible:ring-ring/50 data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted rounded-full px-4 py-2 text-sm font-medium transition-all focus-visible:ring-[3px] focus-visible:outline-1 disabled:opacity-50 group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center disabled:pointer-events-none outline-none\",\n);\n\ntype NavigationMenuTriggerProps = NavigationMenuPrimitive.Trigger.Props;\n\n/**\n * Button that opens the associated NavigationMenuContent panel.\n * Automatically includes a rotating chevron icon.\n */\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuTriggerProps) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\ntype NavigationMenuContentProps = NavigationMenuPrimitive.Content.Props;\n\n/**\n * Content panel for mega menus. Opened by NavigationMenuTrigger.\n * Automatically renders in a positioned popup with smooth transitions.\n */\nfunction NavigationMenuContent({\n className,\n ...props\n}: NavigationMenuContentProps) {\n return (\n <NavigationMenuPrimitive.Content\n data-slot=\"navigation-menu-content\"\n className={cn(\n \"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 group-data-[viewport=false]/navigation-menu:bg-popover group-data-[viewport=false]/navigation-menu:text-popover-foreground group-data-[viewport=false]/navigation-menu:data-open:animate-in group-data-[viewport=false]/navigation-menu:data-closed:animate-out group-data-[viewport=false]/navigation-menu:data-closed:zoom-out-95 group-data-[viewport=false]/navigation-menu:data-open:zoom-in-95 group-data-[viewport=false]/navigation-menu:data-open:fade-in-0 group-data-[viewport=false]/navigation-menu:data-closed:fade-out-0 group-data-[viewport=false]/navigation-menu:ring-foreground/10 p-2 pr-2.5 ease-[cubic-bezier(0.22,1,0.36,1)] group-data-[viewport=false]/navigation-menu:rounded-md group-data-[viewport=false]/navigation-menu:shadow group-data-[viewport=false]/navigation-menu:ring-1 group-data-[viewport=false]/navigation-menu:duration-300 h-full w-auto **:data-[slot=navigation-menu-link]:focus:ring-0 **:data-[slot=navigation-menu-link]:focus:outline-none\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype NavigationMenuPositionerProps = NavigationMenuPrimitive.Positioner.Props;\n\n/**\n * Portal container for positioning content panels.\n * Automatically included in NavigationMenu - do not use directly.\n * @internal\n */\nfunction NavigationMenuPositioner({\n className,\n side = \"bottom\",\n sideOffset = 8,\n align = \"start\",\n alignOffset = 0,\n ...props\n}: NavigationMenuPositionerProps) {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n \"transition-[top,left,right,bottom] duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] data-[side=bottom]:before:top-[-10px] data-[side=bottom]:before:right-0 data-[side=bottom]:before:left-0 isolate z-50 h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)] data-[instant]:transition-none\",\n className,\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup\n data-slot=\"navigation-menu-popup\"\n className=\"bg-popover text-popover-foreground ring-foreground/10 rounded-5xl shadow ring-1 transition-all ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[ending-style]:duration-150 data-[starting-style]:scale-90 data-[starting-style]:opacity-0 xs:w-(--popup-width) relative h-(--popup-height) w-(--popup-width) origin-(--transform-origin)\"\n >\n <NavigationMenuPrimitive.Viewport className=\"relative size-full overflow-hidden\" />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n );\n}\n\ntype NavigationMenuLinkProps = NavigationMenuPrimitive.Link.Props;\n\n/**\n * Navigation link for direct navigation items or links within content panels.\n * Use `active` prop to highlight the current page.\n */\nfunction NavigationMenuLink({ className, ...props }: NavigationMenuLinkProps) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n \"data-[active=true]:focus:bg-muted data-[active=true]:hover:bg-muted data-[active=true]:bg-muted/50 focus-visible:ring-ring/50 hover:bg-muted focus:bg-muted flex items-center gap-1.5 rounded-full p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype NavigationMenuIndicatorProps = NavigationMenuPrimitive.Icon.Props;\n\n/**\n * Visual indicator (arrow) that shows which item is active.\n * Optional - not commonly used in modern designs.\n */\nfunction NavigationMenuIndicator({\n className,\n ...props\n}: NavigationMenuIndicatorProps) {\n return (\n <NavigationMenuPrimitive.Icon\n data-slot=\"navigation-menu-indicator\"\n className={cn(\n \"data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden\",\n className,\n )}\n {...props}\n >\n <div className=\"bg-border rounded-tl-sm shadow-md relative top-[60%] h-2 w-2 rotate-45\" />\n </NavigationMenuPrimitive.Icon>\n );\n}\n\nexport {\n NavigationMenu,\n NavigationMenuContent,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n NavigationMenuTrigger,\n navigationMenuTriggerStyle,\n NavigationMenuPositioner,\n type NavigationMenuProps,\n type NavigationMenuContentProps,\n type NavigationMenuIndicatorProps,\n type NavigationMenuItemProps,\n type NavigationMenuLinkProps,\n type NavigationMenuListProps,\n type NavigationMenuTriggerProps,\n type NavigationMenuPositionerProps,\n};\n"],"names":["NavigationMenuPrimitive.Root","NavigationMenuPrimitive.List","NavigationMenuPrimitive.Item","NavigationMenuPrimitive.Trigger","ChevronDownIcon","NavigationMenuPrimitive.Content","NavigationMenuPrimitive.Portal","NavigationMenuPrimitive.Positioner","NavigationMenuPrimitive.Popup","NavigationMenuPrimitive.Viewport","NavigationMenuPrimitive.Link","NavigationMenuPrimitive.Icon"],"mappings":";;;;;;;;;;;;;;;AAYA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA;AAAA,4BACA,0BAAA,CAAA,CAAyB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAOA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAkC;AAC5E,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;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AAAA,QAAA;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,UAEV,UAAA,oBAACC,wBAAA,EAAiC,WAAU,qCAAA,CAAqC;AAAA,QAAA;AAAA,MAAA;AAAA,IACnF;AAAA,EAAA,GAEJ;AAEJ;AAQA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAkC;AAC5E,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,wBAAwB;AAAA,EAC/B;AAAA,EACA,GAAG;AACL,GAAiC;AAC/B,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEJ,UAAA,oBAAC,OAAA,EAAI,WAAU,yEAAA,CAAyE;AAAA,IAAA;AAAA,EAAA;AAG9F;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sources":["../../../../../../src/components/ui/pagination.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/lib/utils\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n MoreHorizontalIcon,\n} from \"lucide-react\";\n\ntype PaginationProps = React.ComponentProps<\"nav\">;\n\n/**\n * Root pagination navigation container.\n */\nfunction Pagination({ className, ...props }: PaginationProps) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn(\"mx-auto flex w-full justify-center\", className)}\n {...props}\n />\n );\n}\n\ntype PaginationContentProps = React.ComponentProps<\"ul\">;\n\n/**\n * Container for pagination items. Renders as a flex list.\n */\nfunction PaginationContent({ className, ...props }: PaginationContentProps) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\"gap-1 flex items-center\", className)}\n {...props}\n />\n );\n}\n\ntype PaginationItemProps = React.ComponentProps<\"li\">;\n\n/**\n * Wrapper for individual pagination elements (links, ellipsis, controls).\n */\nfunction PaginationItem({ ...props }: PaginationItemProps) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkProps = {\n /** Whether this page link is the current active page. */\n isActive?: boolean;\n} & Pick<React.ComponentProps<typeof Button>, \"size\"> &\n React.ComponentProps<\"a\">;\n\n/**\n * Clickable page number link. Use `isActive` to highlight the current page.\n */\nfunction PaginationLink({\n className,\n isActive,\n size = \"icon\",\n ...props\n}: PaginationLinkProps) {\n return (\n <Button\n variant={isActive ? \"primary\" : \"ghost\"}\n size={size}\n className={cn(\"rounded-lg\", className)}\n nativeButton={false}\n render={\n <a\n aria-current={isActive ? \"page\" : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n {...props}\n />\n }\n />\n );\n}\n\ntype PaginationPreviousProps = React.ComponentProps<typeof PaginationLink>;\n\n/**\n * Previous page button with chevron icon and \"Previous\" text (hidden on mobile).\n */\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps) {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n size=\"default\"\n className={cn(\"pl-2!\", className)}\n {...props}\n >\n <ChevronLeftIcon data-icon=\"inline-start\" />\n </PaginationLink>\n );\n}\n\ntype PaginationNextProps = React.ComponentProps<typeof PaginationLink>;\n\n/**\n * Next page button with chevron icon and \"Next\" text (hidden on mobile).\n */\nfunction PaginationNext({ className, ...props }: PaginationNextProps) {\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n size=\"default\"\n className={cn(\"pr-2!\", className)}\n {...props}\n >\n <ChevronRightIcon data-icon=\"inline-end\" />\n </PaginationLink>\n );\n}\n\ntype PaginationEllipsisProps = React.ComponentProps<\"span\">;\n\n/**\n * Ellipsis indicator for skipped pages. Use between page numbers to show truncated ranges.\n */\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn(\n \"size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4 flex items-center justify-center\",\n className,\n )}\n {...props}\n >\n <MoreHorizontalIcon />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationItemProps,\n type PaginationLinkProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"],"names":["ChevronLeftIcon","ChevronRightIcon","MoreHorizontalIcon"],"mappings":";;;;;;;AAeA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAW,GAAG,sCAAsC,SAAS;AAAA,MAC5D,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;AAC1E,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,2BAA2B,SAAS;AAAA,MACjD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,eAAe,EAAE,GAAG,SAA8B;AACzD,SAAO,oBAAC,MAAA,EAAG,aAAU,mBAAmB,GAAG,OAAO;AACpD;AAWA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAwB;AACtB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,SAAS,WAAW,YAAY;AAAA,MAChC;AAAA,MACA,WAAW,GAAG,cAAc,SAAS;AAAA,MACrC,cAAc;AAAA,MACd,QACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,gBAAc,WAAW,SAAS;AAAA,UAClC,aAAU;AAAA,UACV,eAAa;AAAA,UACZ,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA;AAIR;AAOA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAkC;AAC5E,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,SAAS,SAAS;AAAA,MAC/B,GAAG;AAAA,MAEJ,UAAA,oBAACA,aAAA,EAAgB,aAAU,eAAA,CAAe;AAAA,IAAA;AAAA,EAAA;AAGhD;AAOA,SAAS,eAAe,EAAE,WAAW,GAAG,SAA8B;AACpE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,cAAW;AAAA,MACX,MAAK;AAAA,MACL,WAAW,GAAG,SAAS,SAAS;AAAA,MAC/B,GAAG;AAAA,MAEJ,UAAA,oBAACC,cAAA,EAAiB,aAAU,aAAA,CAAa;AAAA,IAAA;AAAA,EAAA;AAG/C;AAOA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAkC;AAC5E,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAW;AAAA,MACX,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA,oBAACC,UAAA,EAAmB;AAAA,QACpB,oBAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAG1C;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"popover.js","sources":["../../../../../../src/components/ui/popover.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype PopoverProps = PopoverPrimitive.Root.Props;\n\n/**\n * Popover root component. Groups all parts of the popover and manages open state.\n * Use with `open`/`onOpenChange` for controlled state, or `defaultOpen` for uncontrolled.\n */\nfunction Popover({ ...props }: PopoverProps) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\ntype PopoverTriggerProps = PopoverPrimitive.Trigger.Props;\n\n/**\n * Button that opens the popover. Use `render` prop to customize the trigger element.\n */\nfunction PopoverTrigger({ ...props }: PopoverTriggerProps) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />;\n}\n\ntype PopoverContentProps = PopoverPrimitive.Popup.Props &\n Pick<\n PopoverPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >;\n\n/**\n * Popover content with automatic portal and positioning.\n * Animates in/out with fade and zoom effects. Default width is w-72 (18rem).\n *\n * @param align - Horizontal alignment relative to trigger. @default \"center\"\n * @param alignOffset - Offset in pixels along alignment axis. @default 0\n * @param side - Which side of trigger to display on. @default \"bottom\"\n * @param sideOffset - Distance in pixels from trigger. @default 4\n */\nfunction PopoverContent({\n className,\n align = \"center\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n ...props\n}: PopoverContentProps) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Positioner\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n className=\"isolate z-50\"\n >\n <PopoverPrimitive.Popup\n data-slot=\"popover-content\"\n className={cn(\n \"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 flex flex-col gap-4 rounded-5xl p-4 lg:p-6 text-sm shadow-md ring-1 duration-100 z-50 w-72 origin-(--transform-origin) outline-hidden\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Positioner>\n </PopoverPrimitive.Portal>\n );\n}\n\ntype PopoverHeaderProps = React.ComponentProps<\"div\">;\n\n/**\n * Optional header wrapper for PopoverTitle and PopoverDescription.\n * Provides consistent spacing between title and description.\n */\nfunction PopoverHeader({ className, ...props }: PopoverHeaderProps) {\n return (\n <div\n data-slot=\"popover-header\"\n className={cn(\"flex flex-col gap-1 text-sm\", className)}\n {...props}\n />\n );\n}\n\ntype PopoverTitleProps = PopoverPrimitive.Title.Props;\n\n/**\n * Heading that labels the popover. Renders an h2 element with proper ARIA attributes.\n */\nfunction PopoverTitle({ className, ...props }: PopoverTitleProps) {\n return (\n <PopoverPrimitive.Title\n data-slot=\"popover-title\"\n className={cn(\"font-medium\", className)}\n {...props}\n />\n );\n}\n\ntype PopoverDescriptionProps = PopoverPrimitive.Description.Props;\n\n/**\n * Optional description text for the popover. Styled with muted foreground color.\n */\nfunction PopoverDescription({ className, ...props }: PopoverDescriptionProps) {\n return (\n <PopoverPrimitive.Description\n data-slot=\"popover-description\"\n className={cn(\"text-muted-foreground\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Popover,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverTitle,\n PopoverTrigger,\n type PopoverProps,\n type PopoverContentProps,\n type PopoverDescriptionProps,\n type PopoverHeaderProps,\n type PopoverTitleProps,\n type PopoverTriggerProps,\n};\n"],"names":["PopoverPrimitive.Root","PopoverPrimitive.Trigger","PopoverPrimitive.Portal","PopoverPrimitive.Positioner","PopoverPrimitive.Popup","PopoverPrimitive.Title","PopoverPrimitive.Description"],"mappings":";;;;;;;;;;AAWA,SAAS,QAAQ,EAAE,GAAG,SAAuB;AAC3C,6BAAQA,aAAA,EAAsB,aAAU,WAAW,GAAG,OAAO;AAC/D;AAOA,SAAS,eAAe,EAAE,GAAG,SAA8B;AACzD,6BAAQC,kBAAA,EAAyB,aAAU,mBAAmB,GAAG,OAAO;AAC1E;AAiBA,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,OAAO;AAAA,EACP,aAAa;AAAA,EACb,GAAG;AACL,GAAwB;AACtB,SACE,oBAACC,eAAA,EACC,UAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAU;AAAA,MAEV,UAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAU;AAAA,UACV,WAAW;AAAA,YACT;AAAA,YACA;AAAA,UAAA;AAAA,UAED,GAAG;AAAA,QAAA;AAAA,MAAA;AAAA,IACN;AAAA,EAAA,GAEJ;AAEJ;AAQA,SAAS,cAAc,EAAE,WAAW,GAAG,SAA6B;AAClE,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,+BAA+B,SAAS;AAAA,MACrD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA4B;AAChE,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,eAAe,SAAS;AAAA,MACrC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAOA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAAkC;AAC5E,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,yBAAyB,SAAS;AAAA,MAC/C,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","sources":["../../../../../../src/components/ui/progress.tsx"],"sourcesContent":["\"use client\";\n\nimport { Progress as ProgressPrimitive } from \"@base-ui/react/progress\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype ProgressProps = ProgressPrimitive.Root.Props;\n\n/**\n * Root container for progress bar with label and value support.\n * Automatically includes track and indicator. Use `value={null}` for indeterminate state.\n */\nfunction Progress({ className, children, value, ...props }: ProgressProps) {\n return (\n <ProgressPrimitive.Root\n value={value}\n data-slot=\"progress\"\n className={cn(\"flex flex-wrap gap-3\", className)}\n {...props}\n >\n {children}\n </ProgressPrimitive.Root>\n );\n}\n\ntype ProgressTrackProps = ProgressPrimitive.Track.Props;\n\n/**\n * Container for the progress indicator. Customize height with className (e.g., `h-2`, `h-3`).\n */\nfunction ProgressTrack({ className, ...props }: ProgressTrackProps) {\n return (\n <ProgressPrimitive.Track\n className={cn(\n \"bg-muted h-1.5 rounded-full relative flex w-full items-center overflow-x-hidden\",\n className,\n )}\n data-slot=\"progress-track\"\n {...props}\n />\n );\n}\n\ntype ProgressIndicatorProps = ProgressPrimitive.Indicator.Props;\n\n/**\n * Visual indicator showing progress completion. Customize color with className\n * (e.g., `bg-green-500`, `bg-red-500` for semantic states).\n */\nfunction ProgressIndicator({ className, ...props }: ProgressIndicatorProps) {\n return (\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\"bg-primary h-full transition-all\", className)}\n {...props}\n />\n );\n}\n\ntype ProgressLabelProps = ProgressPrimitive.Label.Props;\n\n/**\n * Text label describing the progress task.\n */\nfunction ProgressLabel({ className, ...props }: ProgressLabelProps) {\n return (\n <ProgressPrimitive.Label\n className={cn(\"text-sm font-medium\", className)}\n data-slot=\"progress-label\"\n {...props}\n />\n );\n}\n\ntype ProgressValueProps = ProgressPrimitive.Value.Props;\n\n/**\n * Displays formatted progress value (e.g., \"65%\"). Auto-positioned to right via `ml-auto`.\n */\nfunction ProgressValue({ className, ...props }: ProgressValueProps) {\n return (\n <ProgressPrimitive.Value\n className={cn(\n \"text-muted-foreground ml-auto text-sm tabular-nums\",\n className,\n )}\n data-slot=\"progress-value\"\n {...props}\n />\n );\n}\n\nexport {\n Progress,\n ProgressTrack,\n ProgressIndicator,\n ProgressLabel,\n ProgressValue,\n type ProgressProps,\n type ProgressTrackProps,\n type ProgressIndicatorProps,\n type ProgressLabelProps,\n type ProgressValueProps,\n};\n"],"names":["ProgressPrimitive.Root","ProgressPrimitive.Track","ProgressPrimitive.Indicator","ProgressPrimitive.Label","ProgressPrimitive.Value"],"mappings":";;;;;;;;AAYA;AACE;AACE;AAACA;AAAA;AACC;AACU;AACqC;AAC3C;AAEH;AAAA;AAGP;AAOA;AACE;AACE;AAACC;AAAA;AACY;AACT;AACA;AAAA;AAEQ;AACN;AAAA;AAGV;AAQA;AACE;AACE;AAACC;AAAA;AACW;AACiD;AACvD;AAAA;AAGV;AAOA;AACE;AACE;AAACC;AAAA;AAC+C;AACpC;AACN;AAAA;AAGV;AAOA;AACE;AACE;AAACC;AAAA;AACY;AACT;AACA;AAAA;AAEQ;AACN;AAAA;AAGV;;;;;;;;"}
|