@minidev.fun/ui 1.0.3 → 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/accordion.d.ts +36 -0
- package/dist/alert-dialog.d.ts +114 -0
- package/dist/alert.d.ts +41 -0
- package/dist/aspect-ratio.d.ts +14 -0
- package/dist/avatar.d.ts +55 -0
- package/dist/badge.d.ts +22 -0
- package/dist/breadcrumb.d.ts +54 -0
- package/dist/button-group.d.ts +45 -0
- package/dist/button.d.ts +46 -0
- package/dist/calendar.d.ts +68 -0
- package/dist/card.d.ts +45 -0
- package/dist/carousel.d.ts +116 -0
- package/dist/chart.d.ts +85 -0
- package/dist/checkbox.d.ts +14 -0
- package/dist/collapsible.d.ts +28 -0
- package/dist/combobox.d.ts +113 -0
- package/dist/command.d.ts +90 -0
- package/dist/components/minidev.fun/color-mode/color-mode-toggle.js +2 -2
- package/dist/components/minidev.fun/color-mode/index.js +9 -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.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.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/{src/components/ui/accordion.js → accordion.js} +8 -8
- package/dist/components/ui/accordion.js.map +1 -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/{src/components/ui/alert.js → alert.js} +2 -2
- package/dist/components/ui/alert.js.map +1 -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/{src/components/ui/avatar.js → avatar.js} +4 -4
- package/dist/components/ui/avatar.js.map +1 -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/{src/components/ui/breadcrumb.js → breadcrumb.js} +5 -5
- package/dist/components/ui/breadcrumb.js.map +1 -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/{src/components/ui/button.js → button.js} +3 -3
- package/dist/components/ui/button.js.map +1 -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/{src/components/ui/card.js → card.js} +1 -1
- package/dist/components/ui/card.js.map +1 -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/{src/components/ui/chart.js → chart.js} +1 -1
- package/dist/components/ui/chart.js.map +1 -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/{src/components/ui/collapsible.js → collapsible.js} +3 -3
- package/dist/components/ui/collapsible.js.map +1 -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/{src/components/ui/command.js → command.js} +4 -4
- package/dist/components/ui/command.js.map +1 -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/{src/components/ui/dialog.js → dialog.js} +10 -10
- package/dist/components/ui/dialog.js.map +1 -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/{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/{src/components/ui/empty.js → empty.js} +2 -2
- package/dist/components/ui/empty.js.map +1 -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/{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/{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/{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/{src/components/ui/input.js → input.js} +2 -2
- package/dist/components/ui/input.js.map +1 -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/{src/components/ui/kbd.js → kbd.js} +1 -1
- package/dist/components/ui/kbd.js.map +1 -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/{src/components/ui/menubar.js → menubar.js} +9 -9
- package/dist/components/ui/menubar.js.map +1 -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/{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/{src/components/ui/pagination.js → pagination.js} +4 -4
- package/dist/components/ui/pagination.js.map +1 -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/{src/components/ui/progress.js → progress.js} +6 -6
- package/dist/components/ui/progress.js.map +1 -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/{src/components/ui/resizable.js → resizable.js} +2 -2
- package/dist/components/ui/resizable.js.map +1 -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/{src/components/ui/select.js → select.js} +20 -20
- package/dist/components/ui/select.js.map +1 -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/{src/components/ui/sheet.js → sheet.js} +10 -10
- package/dist/components/ui/sheet.js.map +1 -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/{src/components/ui/skeleton.js → skeleton.js} +1 -1
- package/dist/components/ui/skeleton.js.map +1 -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/{src/components/ui/sonner.js → sonner.js} +7 -7
- package/dist/components/ui/sonner.js.map +1 -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/{src/components/ui/switch.js → switch.js} +3 -3
- package/dist/components/ui/switch.js.map +1 -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/{src/components/ui/tabs.js → tabs.js} +6 -6
- package/dist/components/ui/tabs.js.map +1 -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/{src/components/ui/toast.js → toast.js} +6 -6
- package/dist/components/ui/toast.js.map +1 -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/{src/components/ui/toggle.js → toggle.js} +3 -3
- package/dist/components/ui/toggle.js.map +1 -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/context-menu.d.ts +97 -0
- package/dist/dialog.d.ts +90 -0
- package/dist/drawer.d.ts +61 -0
- package/dist/dropdown-menu.d.ts +121 -0
- package/dist/empty.d.ts +56 -0
- package/dist/field.d.ts +109 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hover-card.d.ts +28 -0
- package/dist/index.d.ts +290 -0
- package/dist/input-group.d.ts +106 -0
- package/dist/input-otp.d.ts +43 -0
- package/dist/input.d.ts +14 -0
- package/dist/item.d.ts +101 -0
- package/dist/kbd.d.ts +19 -0
- package/dist/label.d.ts +12 -0
- package/dist/lib/variants.js +103 -1
- package/dist/lib/variants.js.map +1 -1
- package/dist/menubar.d.ts +205 -0
- package/dist/modal.d.ts +104 -0
- package/dist/navigation-menu.d.ts +66 -0
- package/dist/pagination.d.ts +99 -0
- package/dist/popover.d.ts +55 -0
- package/dist/progress.d.ts +41 -0
- package/dist/radio-group.d.ts +21 -0
- package/dist/resizable.d.ts +47 -0
- package/dist/scroll-area.d.ts +69 -0
- package/dist/select.d.ts +79 -0
- package/dist/separator.d.ts +12 -0
- package/dist/sheet.d.ts +68 -0
- package/dist/sidebar.d.ts +288 -0
- package/dist/skeleton.d.ts +11 -0
- package/dist/slider.d.ts +24 -0
- package/dist/sonner.d.ts +27 -0
- package/dist/spinner.d.ts +11 -0
- package/dist/switch.d.ts +15 -0
- package/dist/table.d.ts +68 -0
- package/dist/tabs.d.ts +42 -0
- package/dist/textarea.d.ts +21 -0
- package/dist/toast.d.ts +15 -0
- package/dist/toggle-group.d.ts +36 -0
- package/dist/toggle.d.ts +19 -0
- package/dist/tooltip.d.ts +36 -0
- package/dist/use-mobile.d.ts +19 -0
- package/dist/utils.d.ts +25 -0
- package/package.json +1 -1
- package/dist/components/minidev.fun/color-mode/color-mode-initializer.d.ts +0 -46
- package/dist/components/minidev.fun/color-mode/color-mode-initializer.d.ts.map +0 -1
- package/dist/components/minidev.fun/color-mode/color-mode-toggle.d.ts +0 -106
- package/dist/components/minidev.fun/color-mode/color-mode-toggle.d.ts.map +0 -1
- package/dist/components/minidev.fun/color-mode/index.d.ts.map +0 -1
- package/dist/components/minidev.fun/color-mode/use-color-mode.d.ts +0 -91
- package/dist/components/minidev.fun/color-mode/use-color-mode.d.ts.map +0 -1
- package/dist/components/minidev.fun/first-light/first-light-filters.d.ts +0 -27
- package/dist/components/minidev.fun/first-light/first-light-filters.d.ts.map +0 -1
- package/dist/components/minidev.fun/first-light/index.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/blockquote.d.ts +0 -13
- package/dist/components/minidev.fun/typography/blockquote.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/code.d.ts +0 -13
- package/dist/components/minidev.fun/typography/code.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/index.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/list-item.d.ts +0 -27
- package/dist/components/minidev.fun/typography/list-item.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/text.d.ts +0 -44
- package/dist/components/minidev.fun/typography/text.d.ts.map +0 -1
- package/dist/components/minidev.fun/typography/title.d.ts +0 -22
- package/dist/components/minidev.fun/typography/title.d.ts.map +0 -1
- package/dist/components/minidev.fun/undefined/index.js +0 -9
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/alert-dialog.d.ts.map +0 -1
- package/dist/components/ui/alert.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/avatar.d.ts.map +0 -1
- package/dist/components/ui/badge.d.ts.map +0 -1
- package/dist/components/ui/breadcrumb.d.ts.map +0 -1
- package/dist/components/ui/button-group.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/calendar.d.ts.map +0 -1
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/chart.d.ts.map +0 -1
- package/dist/components/ui/checkbox.d.ts.map +0 -1
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/combobox.d.ts.map +0 -1
- package/dist/components/ui/command.d.ts.map +0 -1
- package/dist/components/ui/context-menu.d.ts.map +0 -1
- package/dist/components/ui/dialog.d.ts.map +0 -1
- package/dist/components/ui/drawer.d.ts.map +0 -1
- package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
- package/dist/components/ui/empty.d.ts.map +0 -1
- package/dist/components/ui/field.d.ts.map +0 -1
- package/dist/components/ui/hover-card.d.ts.map +0 -1
- package/dist/components/ui/input-group.d.ts.map +0 -1
- package/dist/components/ui/input-otp.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/item.d.ts.map +0 -1
- package/dist/components/ui/kbd.d.ts.map +0 -1
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/menubar.d.ts.map +0 -1
- package/dist/components/ui/modal.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/pagination.d.ts.map +0 -1
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/progress.d.ts.map +0 -1
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/resizable.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/select.d.ts.map +0 -1
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/components/ui/sheet.d.ts.map +0 -1
- package/dist/components/ui/sidebar.d.ts.map +0 -1
- package/dist/components/ui/skeleton.d.ts.map +0 -1
- package/dist/components/ui/slider.d.ts.map +0 -1
- package/dist/components/ui/sonner.d.ts.map +0 -1
- package/dist/components/ui/spinner.d.ts.map +0 -1
- package/dist/components/ui/src/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/src/components/ui/alert-dialog.js.map +0 -1
- package/dist/components/ui/src/components/ui/alert.js.map +0 -1
- package/dist/components/ui/src/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/src/components/ui/avatar.js.map +0 -1
- package/dist/components/ui/src/components/ui/badge.js.map +0 -1
- package/dist/components/ui/src/components/ui/breadcrumb.js.map +0 -1
- package/dist/components/ui/src/components/ui/button-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/button.js.map +0 -1
- package/dist/components/ui/src/components/ui/calendar.js.map +0 -1
- package/dist/components/ui/src/components/ui/card.js.map +0 -1
- package/dist/components/ui/src/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/src/components/ui/chart.js.map +0 -1
- package/dist/components/ui/src/components/ui/checkbox.js.map +0 -1
- package/dist/components/ui/src/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/src/components/ui/combobox.js.map +0 -1
- package/dist/components/ui/src/components/ui/command.js.map +0 -1
- package/dist/components/ui/src/components/ui/context-menu.js.map +0 -1
- package/dist/components/ui/src/components/ui/dialog.js.map +0 -1
- package/dist/components/ui/src/components/ui/drawer.js.map +0 -1
- package/dist/components/ui/src/components/ui/dropdown-menu.js.map +0 -1
- package/dist/components/ui/src/components/ui/empty.js.map +0 -1
- package/dist/components/ui/src/components/ui/field.js.map +0 -1
- package/dist/components/ui/src/components/ui/hover-card.js.map +0 -1
- package/dist/components/ui/src/components/ui/input-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/input-otp.js.map +0 -1
- package/dist/components/ui/src/components/ui/input.js.map +0 -1
- package/dist/components/ui/src/components/ui/item.js.map +0 -1
- package/dist/components/ui/src/components/ui/kbd.js.map +0 -1
- package/dist/components/ui/src/components/ui/label.js.map +0 -1
- package/dist/components/ui/src/components/ui/menubar.js.map +0 -1
- package/dist/components/ui/src/components/ui/modal.js.map +0 -1
- package/dist/components/ui/src/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/src/components/ui/pagination.js.map +0 -1
- package/dist/components/ui/src/components/ui/popover.js.map +0 -1
- package/dist/components/ui/src/components/ui/progress.js.map +0 -1
- package/dist/components/ui/src/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/resizable.js.map +0 -1
- package/dist/components/ui/src/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/src/components/ui/select.js.map +0 -1
- package/dist/components/ui/src/components/ui/separator.js.map +0 -1
- package/dist/components/ui/src/components/ui/sheet.js.map +0 -1
- package/dist/components/ui/src/components/ui/sidebar.js.map +0 -1
- package/dist/components/ui/src/components/ui/skeleton.js.map +0 -1
- package/dist/components/ui/src/components/ui/slider.js.map +0 -1
- package/dist/components/ui/src/components/ui/sonner.js.map +0 -1
- package/dist/components/ui/src/components/ui/spinner.js.map +0 -1
- package/dist/components/ui/src/components/ui/switch.js.map +0 -1
- package/dist/components/ui/src/components/ui/table.js.map +0 -1
- package/dist/components/ui/src/components/ui/tabs.js.map +0 -1
- package/dist/components/ui/src/components/ui/textarea.js.map +0 -1
- package/dist/components/ui/src/components/ui/toast.js.map +0 -1
- package/dist/components/ui/src/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/src/components/ui/toggle.js.map +0 -1
- package/dist/components/ui/src/components/ui/tooltip.js.map +0 -1
- package/dist/components/ui/switch.d.ts.map +0 -1
- package/dist/components/ui/table.d.ts.map +0 -1
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/textarea.d.ts.map +0 -1
- package/dist/components/ui/toast.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/tooltip.d.ts.map +0 -1
- package/dist/hooks/src/hooks/use-mobile.js.map +0 -1
- package/dist/hooks/use-mobile.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/lib/variants.d.ts +0 -107
- package/dist/lib/variants.d.ts.map +0 -1
- /package/dist/components/minidev.fun/{undefined → color-mode}/index.js.map +0 -0
- /package/dist/hooks/{src/hooks/use-mobile.js → use-mobile.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { Input as Input$1 } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { Input as Input$1 } from "../../node_modules/@base-ui/react/esm/input/Input.js";
|
|
5
5
|
function Input({ className, type, ...props }) {
|
|
6
6
|
return /* @__PURE__ */ jsx(
|
|
7
7
|
Input$1,
|
|
@@ -0,0 +1 @@
|
|
|
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,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cva } from "
|
|
4
|
-
import { cn } from "
|
|
3
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
5
|
import { Separator } from "./separator.js";
|
|
6
|
-
import { useRender } from "
|
|
7
|
-
import { mergeProps } from "
|
|
6
|
+
import { useRender } from "../../node_modules/@base-ui/react/esm/use-render/useRender.js";
|
|
7
|
+
import { mergeProps } from "../../node_modules/@base-ui/react/esm/merge-props/mergeProps.js";
|
|
8
8
|
function ItemGroup({ className, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
10
10
|
"div",
|
|
@@ -0,0 +1 @@
|
|
|
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":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
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;"}
|
|
@@ -0,0 +1 @@
|
|
|
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,15 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { menuItemVariants } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { menuItemVariants } from "../../lib/variants.js";
|
|
5
5
|
import { DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenu, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
|
|
6
|
-
import { Menubar as Menubar$1 } from "
|
|
7
|
-
import Check from "
|
|
8
|
-
import { MenuCheckboxItem } from "
|
|
9
|
-
import { MenuCheckboxItemIndicator } from "
|
|
10
|
-
import { MenuItem } from "
|
|
11
|
-
import { MenuRadioItem } from "
|
|
12
|
-
import { MenuRadioItemIndicator } from "
|
|
6
|
+
import { Menubar as Menubar$1 } from "../../node_modules/@base-ui/react/esm/menubar/Menubar.js";
|
|
7
|
+
import Check from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
8
|
+
import { MenuCheckboxItem } from "../../node_modules/@base-ui/react/esm/menu/checkbox-item/MenuCheckboxItem.js";
|
|
9
|
+
import { MenuCheckboxItemIndicator } from "../../node_modules/@base-ui/react/esm/menu/checkbox-item-indicator/MenuCheckboxItemIndicator.js";
|
|
10
|
+
import { MenuItem } from "../../node_modules/@base-ui/react/esm/menu/item/MenuItem.js";
|
|
11
|
+
import { MenuRadioItem } from "../../node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js";
|
|
12
|
+
import { MenuRadioItemIndicator } from "../../node_modules/@base-ui/react/esm/menu/radio-item-indicator/MenuRadioItemIndicator.js";
|
|
13
13
|
function Menubar({ className, ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx(
|
|
15
15
|
Menubar$1,
|
|
@@ -0,0 +1 @@
|
|
|
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":"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"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
|
-
import { DialogRoot } from "
|
|
6
|
-
import { DialogClose } from "
|
|
7
|
-
import { DialogPopup } from "
|
|
8
|
-
import { DialogDescription } from "
|
|
9
|
-
import { DialogBackdrop } from "
|
|
10
|
-
import { DialogPortal } from "
|
|
11
|
-
import { DialogTitle } from "
|
|
12
|
-
import { DialogTrigger } from "
|
|
5
|
+
import { DialogRoot } from "../../node_modules/@base-ui/react/esm/dialog/root/DialogRoot.js";
|
|
6
|
+
import { DialogClose } from "../../node_modules/@base-ui/react/esm/dialog/close/DialogClose.js";
|
|
7
|
+
import { DialogPopup } from "../../node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js";
|
|
8
|
+
import { DialogDescription } from "../../node_modules/@base-ui/react/esm/dialog/description/DialogDescription.js";
|
|
9
|
+
import { DialogBackdrop } from "../../node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js";
|
|
10
|
+
import { DialogPortal } from "../../node_modules/@base-ui/react/esm/dialog/portal/DialogPortal.js";
|
|
11
|
+
import { DialogTitle } from "../../node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js";
|
|
12
|
+
import { DialogTrigger } from "../../node_modules/@base-ui/react/esm/dialog/trigger/DialogTrigger.js";
|
|
13
13
|
function Modal({ ...props }) {
|
|
14
14
|
return /* @__PURE__ */ jsx(DialogRoot, { "data-slot": "modal", ...props });
|
|
15
15
|
}
|
|
@@ -0,0 +1 @@
|
|
|
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,EAAE,GAAG,SAA4B;AACrD,6BAAQC,eAAA,EAAwB,aAAU,iBAAiB,GAAG,OAAO;AACvE;AAKA,SAAS,YAAY,EAAE,GAAG,SAA2B;AACnD,6BAAQC,cAAA,EAAuB,aAAU,gBAAgB,GAAG,OAAO;AACrE;AAKA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA4B;AAChE,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAWA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,OAAO;AAAA,EACP,GAAG;AACL,GAAsB;AACpB,8BACG,aAAA,EACC,UAAA;AAAA,IAAA,oBAAC,cAAA,EAAa;AAAA,IACd;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,aAAU;AAAA,QACV,aAAW;AAAA,QACX,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;AAKA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;AAC9D,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,0BAA0B,SAAS;AAAA,MAChD,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAKA,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;AAC9D,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;AAKA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,SACE;AAAA,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,18 +1,18 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cva } from "
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import ChevronDown from "
|
|
5
|
-
import { NavigationMenuRoot } from "
|
|
6
|
-
import { NavigationMenuContent as NavigationMenuContent$1 } from "
|
|
7
|
-
import { NavigationMenuIcon } from "
|
|
8
|
-
import { NavigationMenuItem as NavigationMenuItem$1 } from "
|
|
9
|
-
import { NavigationMenuLink as NavigationMenuLink$1 } from "
|
|
10
|
-
import { NavigationMenuList as NavigationMenuList$1 } from "
|
|
11
|
-
import { NavigationMenuPortal } from "
|
|
12
|
-
import { NavigationMenuPositioner as NavigationMenuPositioner$1 } from "
|
|
13
|
-
import { NavigationMenuPopup } from "
|
|
14
|
-
import { NavigationMenuViewport } from "
|
|
15
|
-
import { NavigationMenuTrigger as NavigationMenuTrigger$1 } from "
|
|
2
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import ChevronDown from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
5
|
+
import { NavigationMenuRoot } from "../../node_modules/@base-ui/react/esm/navigation-menu/root/NavigationMenuRoot.js";
|
|
6
|
+
import { NavigationMenuContent as NavigationMenuContent$1 } from "../../node_modules/@base-ui/react/esm/navigation-menu/content/NavigationMenuContent.js";
|
|
7
|
+
import { NavigationMenuIcon } from "../../node_modules/@base-ui/react/esm/navigation-menu/icon/NavigationMenuIcon.js";
|
|
8
|
+
import { NavigationMenuItem as NavigationMenuItem$1 } from "../../node_modules/@base-ui/react/esm/navigation-menu/item/NavigationMenuItem.js";
|
|
9
|
+
import { NavigationMenuLink as NavigationMenuLink$1 } from "../../node_modules/@base-ui/react/esm/navigation-menu/link/NavigationMenuLink.js";
|
|
10
|
+
import { NavigationMenuList as NavigationMenuList$1 } from "../../node_modules/@base-ui/react/esm/navigation-menu/list/NavigationMenuList.js";
|
|
11
|
+
import { NavigationMenuPortal } from "../../node_modules/@base-ui/react/esm/navigation-menu/portal/NavigationMenuPortal.js";
|
|
12
|
+
import { NavigationMenuPositioner as NavigationMenuPositioner$1 } from "../../node_modules/@base-ui/react/esm/navigation-menu/positioner/NavigationMenuPositioner.js";
|
|
13
|
+
import { NavigationMenuPopup } from "../../node_modules/@base-ui/react/esm/navigation-menu/popup/NavigationMenuPopup.js";
|
|
14
|
+
import { NavigationMenuViewport } from "../../node_modules/@base-ui/react/esm/navigation-menu/viewport/NavigationMenuViewport.js";
|
|
15
|
+
import { NavigationMenuTrigger as NavigationMenuTrigger$1 } from "../../node_modules/@base-ui/react/esm/navigation-menu/trigger/NavigationMenuTrigger.js";
|
|
16
16
|
function NavigationMenu({
|
|
17
17
|
className,
|
|
18
18
|
children,
|
|
@@ -0,0 +1 @@
|
|
|
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;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,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,MAAM,6BAA6B;AAAA,EACjC;AACF;AAQA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA+B;AAC7B,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,8BAA8B,SAAS,SAAS;AAAA,MAC7D,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA;AAAA,QAAU;AAAA,QACX;AAAA,UAACC;AAAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,eAAY;AAAA,UAAA;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA;AAGN;AAQA,SAAS,sBAAsB;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,GAA+B;AAC7B,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;AASA,SAAS,yBAAyB;AAAA,EAChC;AAAA,EACA,OAAO;AAAA,EACP,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,GAAG;AACL,GAAkC;AAChC,SACE,oBAACC,sBAAA,EACC,UAAA;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,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,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,10 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
4
|
import { Button } from "./button.js";
|
|
5
|
-
import Ellipsis from "
|
|
6
|
-
import ChevronRight from "
|
|
7
|
-
import ChevronLeft from "
|
|
5
|
+
import Ellipsis from "../../node_modules/lucide-react/dist/esm/icons/ellipsis.js";
|
|
6
|
+
import ChevronRight from "../../node_modules/lucide-react/dist/esm/icons/chevron-right.js";
|
|
7
|
+
import ChevronLeft from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.js";
|
|
8
8
|
function Pagination({ className, ...props }) {
|
|
9
9
|
return /* @__PURE__ */ jsx(
|
|
10
10
|
"nav",
|
|
@@ -0,0 +1 @@
|
|
|
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,13 +1,13 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { PopoverRoot } from "
|
|
5
|
-
import { PopoverPortal } from "
|
|
6
|
-
import { PopoverPositioner } from "
|
|
7
|
-
import { PopoverPopup } from "
|
|
8
|
-
import { PopoverDescription as PopoverDescription$1 } from "
|
|
9
|
-
import { PopoverTitle as PopoverTitle$1 } from "
|
|
10
|
-
import { PopoverTrigger as PopoverTrigger$1 } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { PopoverRoot } from "../../node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js";
|
|
5
|
+
import { PopoverPortal } from "../../node_modules/@base-ui/react/esm/popover/portal/PopoverPortal.js";
|
|
6
|
+
import { PopoverPositioner } from "../../node_modules/@base-ui/react/esm/popover/positioner/PopoverPositioner.js";
|
|
7
|
+
import { PopoverPopup } from "../../node_modules/@base-ui/react/esm/popover/popup/PopoverPopup.js";
|
|
8
|
+
import { PopoverDescription as PopoverDescription$1 } from "../../node_modules/@base-ui/react/esm/popover/description/PopoverDescription.js";
|
|
9
|
+
import { PopoverTitle as PopoverTitle$1 } from "../../node_modules/@base-ui/react/esm/popover/title/PopoverTitle.js";
|
|
10
|
+
import { PopoverTrigger as PopoverTrigger$1 } from "../../node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js";
|
|
11
11
|
function Popover({ ...props }) {
|
|
12
12
|
return /* @__PURE__ */ jsx(PopoverRoot, { "data-slot": "popover", ...props });
|
|
13
13
|
}
|
|
@@ -0,0 +1 @@
|
|
|
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,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { ProgressRoot } from "
|
|
5
|
-
import { ProgressIndicator as ProgressIndicator$1 } from "
|
|
6
|
-
import { ProgressLabel as ProgressLabel$1 } from "
|
|
7
|
-
import { ProgressTrack as ProgressTrack$1 } from "
|
|
8
|
-
import { ProgressValue as ProgressValue$1 } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { ProgressRoot } from "../../node_modules/@base-ui/react/esm/progress/root/ProgressRoot.js";
|
|
5
|
+
import { ProgressIndicator as ProgressIndicator$1 } from "../../node_modules/@base-ui/react/esm/progress/indicator/ProgressIndicator.js";
|
|
6
|
+
import { ProgressLabel as ProgressLabel$1 } from "../../node_modules/@base-ui/react/esm/progress/label/ProgressLabel.js";
|
|
7
|
+
import { ProgressTrack as ProgressTrack$1 } from "../../node_modules/@base-ui/react/esm/progress/track/ProgressTrack.js";
|
|
8
|
+
import { ProgressValue as ProgressValue$1 } from "../../node_modules/@base-ui/react/esm/progress/value/ProgressValue.js";
|
|
9
9
|
function Progress({ className, children, value, ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsx(
|
|
11
11
|
ProgressRoot,
|
|
@@ -0,0 +1 @@
|
|
|
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;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
3
|
-
import { RadioGroup as RadioGroup$1 } from "
|
|
4
|
-
import Circle from "
|
|
5
|
-
import { RadioRoot } from "
|
|
6
|
-
import { RadioIndicator } from "
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { RadioGroup as RadioGroup$1 } from "../../node_modules/@base-ui/react/esm/radio-group/RadioGroup.js";
|
|
4
|
+
import Circle from "../../node_modules/lucide-react/dist/esm/icons/circle.js";
|
|
5
|
+
import { RadioRoot } from "../../node_modules/@base-ui/react/esm/radio/root/RadioRoot.js";
|
|
6
|
+
import { RadioIndicator } from "../../node_modules/@base-ui/react/esm/radio/indicator/RadioIndicator.js";
|
|
7
7
|
function RadioGroup({ className, ...props }) {
|
|
8
8
|
return /* @__PURE__ */ jsx(
|
|
9
9
|
RadioGroup$1,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sources":["../../../src/components/ui/radio-group.tsx"],"sourcesContent":["import { Radio as RadioPrimitive } from \"@base-ui/react/radio\";\nimport { RadioGroup as RadioGroupPrimitive } from \"@base-ui/react/radio-group\";\n\nimport { cn } from \"@/lib/utils\";\nimport { CircleIcon } from \"lucide-react\";\n\ntype RadioGroupProps = RadioGroupPrimitive.Props;\n\n/**\n * Container for radio button items. Manages shared state and ensures only one option can be selected.\n * Supports controlled and uncontrolled usage.\n */\nfunction RadioGroup({ className, ...props }: RadioGroupProps) {\n return (\n <RadioGroupPrimitive\n data-slot=\"radio-group\"\n className={cn(\"grid gap-3 w-full\", className)}\n {...props}\n />\n );\n}\n\ntype RadioGroupItemProps = RadioPrimitive.Root.Props;\n\n/**\n * Individual radio button item. Use with RadioGroup to create mutually exclusive selections.\n * Automatically renders an indicator when checked.\n */\nfunction RadioGroupItem({ className, ...props }: RadioGroupItemProps) {\n return (\n <RadioPrimitive.Root\n data-slot=\"radio-group-item\"\n className={cn(\n \"border-input text-primary dark:bg-input/30 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/50 flex size-4 rounded-full shadow-xs focus-visible:ring-[3px] aria-invalid:ring-[3px] group/radio-group-item peer relative aspect-square shrink-0 border 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 <RadioPrimitive.Indicator\n data-slot=\"radio-group-indicator\"\n className=\"group-aria-invalid/radio-group-item:text-destructive text-primary flex size-4 items-center justify-center\"\n >\n <CircleIcon className=\"absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 fill-current\" />\n </RadioPrimitive.Indicator>\n </RadioPrimitive.Root>\n );\n}\n\nexport {\n RadioGroup,\n RadioGroupItem,\n type RadioGroupProps,\n type RadioGroupItemProps,\n};\n"],"names":["RadioGroupPrimitive","RadioPrimitive.Root","RadioPrimitive.Indicator","CircleIcon"],"mappings":";;;;;;AAYA,SAAS,WAAW,EAAE,WAAW,GAAG,SAA0B;AAC5D,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,qBAAqB,SAAS;AAAA,MAC3C,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAQA,SAAS,eAAe,EAAE,WAAW,GAAG,SAA8B;AACpE,SACE;AAAA,IAACC;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,UAAA,oBAACC,QAAA,EAAW,WAAU,kFAAA,CAAkF;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1G;AAAA,EAAA;AAGN;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { Separator as Ht, Panel as $t, Group as Tt } from "
|
|
5
|
-
import { cn } from "
|
|
4
|
+
import { Separator as Ht, Panel as $t, Group as Tt } from "../../node_modules/react-resizable-panels/dist/react-resizable-panels.js";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
6
|
const DEFAULT_DURATION = 400;
|
|
7
7
|
const DEFAULT_EASING = "cubic-bezier(0.16, 1, 0.3, 1)";
|
|
8
8
|
function getTransitionStyle(durationMs, easing) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resizable.js","sources":["../../../src/components/ui/resizable.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport {\n Group as PanelGroup,\n Panel,\n Separator as PanelResizeHandle,\n type PanelImperativeHandle,\n} from \"react-resizable-panels\";\n\nimport { cn } from \"@/lib/utils\";\n\n/** Default duration of the collapse/expand animation in milliseconds. */\nconst DEFAULT_DURATION = 400;\n\n/** Default easing function for collapse/expand animations. */\nconst DEFAULT_EASING = \"cubic-bezier(0.16, 1, 0.3, 1)\";\n\n/** Generate CSS transition value for animated collapse/expand. */\nfunction getTransitionStyle(durationMs: number, easing: string): string {\n const seconds = durationMs / 1000;\n return `flex-grow ${seconds}s ${easing}, flex-basis ${seconds}s ${easing}`;\n}\n\ntype ResizablePanelGroupProps = React.ComponentProps<typeof PanelGroup>;\n\n/**\n * Container for resizable panels. Manages layout orientation and panel resizing behavior.\n * Supports both horizontal and vertical layouts with optional persistence via `id` prop.\n */\nfunction ResizablePanelGroup({\n className,\n ...props\n}: ResizablePanelGroupProps) {\n return (\n <PanelGroup\n data-slot=\"resizable-panel-group\"\n className={cn(\n \"flex h-full w-full aria-[orientation=vertical]:flex-col\",\n className,\n )}\n {...props}\n />\n );\n}\n\ntype ResizablePanelProps = Omit<\n React.ComponentProps<typeof Panel>,\n \"panelRef\"\n> & {\n /** Enable smooth CSS transition for collapse/expand. Drag resizing stays instant. @default false */\n animated?: boolean;\n /** Controlled collapsed state. When provided, the panel syncs to this value. */\n collapsed?: boolean;\n /** Animation duration in milliseconds. Only applies when `animated` is true. @default 400 */\n duration?: number;\n};\n\n/**\n * Individual resizable panel within a ResizablePanelGroup.\n * Supports size constraints (minSize, maxSize), default sizing, and collapse behavior.\n *\n * Control collapse state declaratively via the `collapsed` prop.\n * When `animated` is true, collapse/expand transitions are smooth.\n *\n * @example\n * <ResizablePanel collapsed={isCollapsed} animated collapsible>\n */\nfunction ResizablePanel({\n className,\n animated,\n collapsed,\n duration = DEFAULT_DURATION,\n ...props\n}: ResizablePanelProps) {\n const panelRef = React.useRef<PanelImperativeHandle>(null);\n const elementRef = React.useRef<HTMLDivElement>(null);\n const animatedRef = React.useRef(animated);\n const durationRef = React.useRef(duration);\n const prevCollapsedRef = React.useRef<boolean | undefined>(undefined);\n\n // Keep the refs in sync with prop changes\n React.useEffect(() => {\n animatedRef.current = animated;\n durationRef.current = duration;\n }, [animated, duration]);\n\n /** Apply transition, call action, then remove transition after duration */\n const withTransition = React.useCallback(\n (action: () => void, skipAnimation = false) => {\n const panelEl = elementRef.current?.closest(\n '[data-panel][data-slot=\"resizable-panel\"]',\n ) as HTMLElement | null;\n\n if (animatedRef.current && panelEl && !skipAnimation) {\n const ms = durationRef.current;\n // Read easing from CSS variable, fallback to default\n const easing =\n getComputedStyle(panelEl)\n .getPropertyValue(\"--resizable-easing\")\n .trim() || DEFAULT_EASING;\n panelEl.style.transition = getTransitionStyle(ms, easing);\n action();\n setTimeout(() => {\n panelEl.style.transition = \"\";\n }, ms);\n } else {\n action();\n }\n },\n [],\n );\n\n // Sync collapsed prop to panel state\n React.useEffect(() => {\n if (collapsed === undefined) return;\n\n const isFirstSync = prevCollapsedRef.current === undefined;\n const hasChanged = collapsed !== prevCollapsedRef.current;\n prevCollapsedRef.current = collapsed;\n\n if (!hasChanged && !isFirstSync) return;\n\n // Helper to safely call collapse/expand with retry logic\n const syncState = () => {\n try {\n const isCurrentlyCollapsed = panelRef.current?.isCollapsed() ?? false;\n if (collapsed === isCurrentlyCollapsed) return;\n\n if (collapsed) {\n if (isFirstSync) {\n // First sync: no animation\n panelRef.current?.collapse();\n } else {\n withTransition(() => panelRef.current?.collapse());\n }\n } else {\n withTransition(() => panelRef.current?.expand());\n }\n } catch {\n // Panel not ready yet, retry after a tick\n setTimeout(syncState, 0);\n }\n };\n\n // Use setTimeout(0) to ensure we're after the panel group's layout effects\n setTimeout(syncState, 0);\n }, [collapsed, withTransition]);\n\n return (\n <Panel\n data-slot=\"resizable-panel\"\n panelRef={panelRef}\n elementRef={elementRef}\n className={cn(className)}\n {...props}\n />\n );\n}\n\ntype ResizableHandleProps = React.ComponentProps<typeof PanelResizeHandle> & {\n /** Display a visible grip indicator on the resize handle. @default false */\n withHandle?: boolean;\n};\n\n/**\n * Resize handle between panels. Appears as a thin line with optional visible grip indicator.\n * Supports keyboard navigation and focus states.\n */\nfunction ResizableHandle({\n withHandle,\n className,\n ...props\n}: ResizableHandleProps) {\n return (\n <PanelResizeHandle\n data-slot=\"resizable-handle\"\n className={cn(\n \"group bg-border focus-visible:ring-primary/50 focus-visible:bg-primary/50 relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:ring-offset-background focus-visible:outline-hidden data-[resize-handle-state=hover]:bg-primary/50 data-[resize-handle-state=drag]:bg-primary/50 data-[resize-handle-state=active]:bg-primary/50 aria-[orientation=horizontal]:h-px aria-[orientation=horizontal]:w-full aria-[orientation=horizontal]:after:left-0 aria-[orientation=horizontal]:after:h-1 aria-[orientation=horizontal]:after:w-full aria-[orientation=horizontal]:after:translate-x-0 aria-[orientation=horizontal]:after:-translate-y-1/2 [&[aria-orientation=horizontal]>div]:rotate-90\",\n className,\n )}\n {...props}\n >\n {withHandle && (\n <div className=\"bg-border group-focus-visible:bg-primary/50 group-data-[resize-handle-state=hover]:bg-primary/50 group-data-[resize-handle-state=drag]:bg-primary/50 group-data-[resize-handle-state=active]:bg-primary/50 h-6 w-1 rounded-lg z-10 flex shrink-0\" />\n )}\n </PanelResizeHandle>\n );\n}\n\nexport {\n ResizablePanelGroup,\n ResizablePanel,\n ResizableHandle,\n type ResizablePanelGroupProps,\n type ResizablePanelProps,\n type ResizableHandleProps,\n};\n"],"names":["PanelGroup","Panel","PanelResizeHandle"],"mappings":";;;;;AAaA;AAGA;AAGA;AACE;AACA;AACF;AAQA;AAA6B;AAC3B;AAEF;AACE;AACE;AAACA;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAAA;AAGV;AAwBA;AAAwB;AACtB;AACA;AACA;AACW;AAEb;AACE;AACA;AACA;AACA;AACA;AAGA;AACE;AACA;AAAsB;AAIxB;AAA6B;AAEzB;AAAoC;AAClC;AAGF;AACE;AAEA;AAIA;AACA;AACA;AACE;AAA2B;AACxB;AAEL;AAAA;AACF;AACF;AACA;AAIF;AACE;AAEA;AACA;AACA;AAEA;AAGA;AACE;AACE;AACA;AAEA;AACE;AAEE;AAAkB;AAElB;AAAiD;AACnD;AAEA;AAA+C;AACjD;AAGA;AAAuB;AACzB;AAIF;AAAuB;AAGzB;AACE;AAACC;AAAA;AACW;AACV;AACA;AACuB;AACnB;AAAA;AAGV;AAWA;AAAyB;AACvB;AACA;AAEF;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAGgQ;AAAA;AAI1Q;;;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { cn } from "
|
|
4
|
-
import { ScrollAreaRoot } from "
|
|
5
|
-
import { ScrollAreaViewport } from "
|
|
6
|
-
import { ScrollAreaCorner } from "
|
|
7
|
-
import { ScrollAreaScrollbar } from "
|
|
8
|
-
import { ScrollAreaThumb } from "
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
import { ScrollAreaRoot } from "../../node_modules/@base-ui/react/esm/scroll-area/root/ScrollAreaRoot.js";
|
|
5
|
+
import { ScrollAreaViewport } from "../../node_modules/@base-ui/react/esm/scroll-area/viewport/ScrollAreaViewport.js";
|
|
6
|
+
import { ScrollAreaCorner } from "../../node_modules/@base-ui/react/esm/scroll-area/corner/ScrollAreaCorner.js";
|
|
7
|
+
import { ScrollAreaScrollbar } from "../../node_modules/@base-ui/react/esm/scroll-area/scrollbar/ScrollAreaScrollbar.js";
|
|
8
|
+
import { ScrollAreaThumb } from "../../node_modules/@base-ui/react/esm/scroll-area/thumb/ScrollAreaThumb.js";
|
|
9
9
|
function ScrollArea({ className, children, ...props }) {
|
|
10
10
|
return /* @__PURE__ */ jsxs(
|
|
11
11
|
ScrollAreaRoot,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-area.js","sources":["../../../src/components/ui/scroll-area.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ScrollArea as ScrollAreaPrimitive } from \"@base-ui/react/scroll-area\";\n\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Props for the ScrollArea component\n * @property {string} className - Additional CSS classes to apply\n * @property {React.ReactNode} children - Content to be rendered within the scrollable area\n */\nexport type ScrollAreaProps = ScrollAreaPrimitive.Root.Props;\n\n/**\n * ScrollArea component that provides a customizable scrollable container with styled scrollbars.\n * Built on Base UI's ScrollArea primitive with automatic overflow detection and custom scrollbar styling.\n *\n * @component\n * @example\n * ```tsx\n * <ScrollArea className=\"h-72 w-48 rounded-md border p-4\">\n * <div>Long content that needs scrolling...</div>\n * </ScrollArea>\n * ```\n *\n * @example\n * ```tsx\n * // With horizontal scrolling\n * <ScrollArea className=\"w-96 whitespace-nowrap rounded-md border\">\n * <div className=\"flex gap-4 p-4\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </div>\n * </ScrollArea>\n * ```\n *\n * @param {ScrollAreaProps} props - Component props extending Base UI ScrollArea.Root.Props\n * @returns {React.ReactElement} A styled scrollable container with custom scrollbars\n */\nfunction ScrollArea({ className, children, ...props }: ScrollAreaProps) {\n return (\n <ScrollAreaPrimitive.Root\n data-slot=\"scroll-area\"\n className={cn(\"relative\", className)}\n {...props}\n >\n <ScrollAreaPrimitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className=\"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1\"\n >\n {children}\n </ScrollAreaPrimitive.Viewport>\n <ScrollBar />\n <ScrollAreaPrimitive.Corner />\n </ScrollAreaPrimitive.Root>\n );\n}\n\n/**\n * Props for the ScrollBar component\n * @property {string} className - Additional CSS classes to apply\n * @property {\"vertical\" | \"horizontal\"} orientation - Scrollbar orientation (default: \"vertical\")\n */\nexport type ScrollBarProps = ScrollAreaPrimitive.Scrollbar.Props;\n\n/**\n * ScrollBar component that renders a custom-styled scrollbar for the ScrollArea.\n * Automatically positions itself based on orientation and includes a draggable thumb.\n * Typically used internally by ScrollArea but can be used independently for custom layouts.\n *\n * @component\n * @example\n * ```tsx\n * // Custom ScrollArea with horizontal scrollbar only\n * <ScrollAreaPrimitive.Root>\n * <ScrollAreaPrimitive.Viewport>\n * {children}\n * </ScrollAreaPrimitive.Viewport>\n * <ScrollBar orientation=\"horizontal\" />\n * </ScrollAreaPrimitive.Root>\n * ```\n *\n * @param {ScrollBarProps} props - Component props extending Base UI ScrollArea.Scrollbar.Props\n * @returns {React.ReactElement} A styled scrollbar with draggable thumb\n */\nfunction ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ScrollBarProps) {\n return (\n <ScrollAreaPrimitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n data-orientation={orientation}\n orientation={orientation}\n className={cn(\n \"data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent flex touch-none p-px transition-colors select-none\",\n className,\n )}\n {...props}\n >\n <ScrollAreaPrimitive.Thumb\n data-slot=\"scroll-area-thumb\"\n className=\"rounded-full bg-border relative flex-1\"\n />\n </ScrollAreaPrimitive.Scrollbar>\n );\n}\n\nexport { ScrollArea, ScrollBar };\n"],"names":["ScrollAreaPrimitive.Root","ScrollAreaPrimitive.Viewport","ScrollAreaPrimitive.Corner","ScrollAreaPrimitive.Scrollbar","ScrollAreaPrimitive.Thumb"],"mappings":";;;;;;;;AAuCA,SAAS,WAAW,EAAE,WAAW,UAAU,GAAG,SAA0B;AACtE,SACE;AAAA,IAACA;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW,GAAG,YAAY,SAAS;AAAA,MAClC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAA;AAAA,UAACC;AAAAA,UAAA;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA,UAAA;AAAA,QAAA;AAAA,4BAEF,WAAA,EAAU;AAAA,QACX,oBAACC,kBAAA,CAAA,CAA2B;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGlC;AA6BA,SAAS,UAAU;AAAA,EACjB;AAAA,EACA,cAAc;AAAA,EACd,GAAG;AACL,GAAmB;AACjB,SACE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,oBAAkB;AAAA,MAClB;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MAAA;AAAA,MAED,GAAG;AAAA,MAEJ,UAAA;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAU;AAAA,UACV,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ;AAAA,EAAA;AAGN;"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import "react";
|
|
4
|
-
import { cn } from "
|
|
5
|
-
import Check from "
|
|
6
|
-
import ChevronDown from "
|
|
7
|
-
import ChevronUp from "
|
|
8
|
-
import { SelectRoot } from "
|
|
9
|
-
import { SelectPortal } from "
|
|
10
|
-
import { SelectPositioner } from "
|
|
11
|
-
import { SelectPopup } from "
|
|
12
|
-
import { SelectList } from "
|
|
13
|
-
import { SelectGroup as SelectGroup$1 } from "
|
|
14
|
-
import { SelectItem as SelectItem$1 } from "
|
|
15
|
-
import { SelectItemText } from "
|
|
16
|
-
import { SelectItemIndicator } from "
|
|
17
|
-
import { SelectGroupLabel } from "
|
|
18
|
-
import { SelectScrollDownArrow } from "
|
|
19
|
-
import { SelectScrollUpArrow } from "
|
|
20
|
-
import { Separator } from "
|
|
21
|
-
import { SelectTrigger as SelectTrigger$1 } from "
|
|
22
|
-
import { SelectIcon } from "
|
|
23
|
-
import { SelectValue as SelectValue$1 } from "
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import Check from "../../node_modules/lucide-react/dist/esm/icons/check.js";
|
|
6
|
+
import ChevronDown from "../../node_modules/lucide-react/dist/esm/icons/chevron-down.js";
|
|
7
|
+
import ChevronUp from "../../node_modules/lucide-react/dist/esm/icons/chevron-up.js";
|
|
8
|
+
import { SelectRoot } from "../../node_modules/@base-ui/react/esm/select/root/SelectRoot.js";
|
|
9
|
+
import { SelectPortal } from "../../node_modules/@base-ui/react/esm/select/portal/SelectPortal.js";
|
|
10
|
+
import { SelectPositioner } from "../../node_modules/@base-ui/react/esm/select/positioner/SelectPositioner.js";
|
|
11
|
+
import { SelectPopup } from "../../node_modules/@base-ui/react/esm/select/popup/SelectPopup.js";
|
|
12
|
+
import { SelectList } from "../../node_modules/@base-ui/react/esm/select/list/SelectList.js";
|
|
13
|
+
import { SelectGroup as SelectGroup$1 } from "../../node_modules/@base-ui/react/esm/select/group/SelectGroup.js";
|
|
14
|
+
import { SelectItem as SelectItem$1 } from "../../node_modules/@base-ui/react/esm/select/item/SelectItem.js";
|
|
15
|
+
import { SelectItemText } from "../../node_modules/@base-ui/react/esm/select/item-text/SelectItemText.js";
|
|
16
|
+
import { SelectItemIndicator } from "../../node_modules/@base-ui/react/esm/select/item-indicator/SelectItemIndicator.js";
|
|
17
|
+
import { SelectGroupLabel } from "../../node_modules/@base-ui/react/esm/select/group-label/SelectGroupLabel.js";
|
|
18
|
+
import { SelectScrollDownArrow } from "../../node_modules/@base-ui/react/esm/select/scroll-down-arrow/SelectScrollDownArrow.js";
|
|
19
|
+
import { SelectScrollUpArrow } from "../../node_modules/@base-ui/react/esm/select/scroll-up-arrow/SelectScrollUpArrow.js";
|
|
20
|
+
import { Separator } from "../../node_modules/@base-ui/react/esm/separator/Separator.js";
|
|
21
|
+
import { SelectTrigger as SelectTrigger$1 } from "../../node_modules/@base-ui/react/esm/select/trigger/SelectTrigger.js";
|
|
22
|
+
import { SelectIcon } from "../../node_modules/@base-ui/react/esm/select/icon/SelectIcon.js";
|
|
23
|
+
import { SelectValue as SelectValue$1 } from "../../node_modules/@base-ui/react/esm/select/value/SelectValue.js";
|
|
24
24
|
const Select = SelectRoot;
|
|
25
25
|
function SelectGroup({ className, ...props }) {
|
|
26
26
|
return /* @__PURE__ */ jsx(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sources":["../../../src/components/ui/select.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Select as SelectPrimitive } from \"@base-ui/react/select\";\n\nimport { cn } from \"@/lib/utils\";\nimport { ChevronDownIcon, CheckIcon, ChevronUpIcon } from \"lucide-react\";\n\ntype SelectProps<T = unknown> = SelectPrimitive.Root.Props<T>;\n\n/**\n * Select root component. Manages select state and provides context to children.\n * Use with SelectTrigger, SelectContent, SelectItem, and SelectValue.\n */\nconst Select = SelectPrimitive.Root;\n\ntype SelectGroupProps = SelectPrimitive.Group.Props;\n\n/**\n * Groups related select items with a label.\n */\nfunction SelectGroup({ className, ...props }: SelectGroupProps) {\n return (\n <SelectPrimitive.Group\n data-slot=\"select-group\"\n className={cn(\"scroll-my-1 p-1\", className)}\n {...props}\n />\n );\n}\n\ntype SelectValueProps = SelectPrimitive.Value.Props;\n\n/**\n * Displays the selected item's value or placeholder text.\n */\nfunction SelectValue({ className, ...props }: SelectValueProps) {\n return (\n <SelectPrimitive.Value\n data-slot=\"select-value\"\n className={cn(\"flex flex-1 text-left\", className)}\n {...props}\n />\n );\n}\n\ntype SelectTriggerProps = SelectPrimitive.Trigger.Props & {\n /** Select trigger size. @default \"default\" */\n size?: \"sm\" | \"default\";\n};\n\n/**\n * Button that opens the select dropdown. Automatically includes chevron icon.\n */\nfunction SelectTrigger({\n className,\n size = \"default\",\n children,\n ...props\n}: SelectTriggerProps) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 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/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm shadow-xs transition-[color,box-shadow] focus-visible:ring-[3px] aria-invalid:ring-[3px] data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:flex *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon\n render={\n <ChevronDownIcon className=\"text-muted-foreground size-4 pointer-events-none\" />\n }\n />\n </SelectPrimitive.Trigger>\n );\n}\n\ntype SelectContentProps = SelectPrimitive.Popup.Props &\n Pick<\n SelectPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\" | \"alignItemWithTrigger\"\n >;\n\n/**\n * Select dropdown content. Automatically renders in a portal with positioning and scroll buttons.\n */\nfunction SelectContent({\n className,\n children,\n side = \"bottom\",\n sideOffset = 4,\n align = \"start\",\n alignOffset = 0,\n alignItemWithTrigger = false,\n ...props\n}: SelectContentProps) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n alignItemWithTrigger={alignItemWithTrigger}\n className=\"isolate z-50\"\n >\n <SelectPrimitive.Popup\n data-slot=\"select-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-36 rounded-4xl p-2 shadow-md ring-1 duration-100 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto\",\n className,\n )}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.List>{children}</SelectPrimitive.List>\n <SelectScrollDownButton />\n </SelectPrimitive.Popup>\n </SelectPrimitive.Positioner>\n </SelectPrimitive.Portal>\n );\n}\n\ntype SelectLabelProps = SelectPrimitive.GroupLabel.Props;\n\n/**\n * Label for a group of select items.\n */\nfunction SelectLabel({ className, ...props }: SelectLabelProps) {\n return (\n <SelectPrimitive.GroupLabel\n data-slot=\"select-label\"\n className={cn(\"text-muted-foreground px-2 py-1.5 text-xs\", className)}\n {...props}\n />\n );\n}\n\ntype SelectItemProps = SelectPrimitive.Item.Props;\n\n/**\n * Individual selectable item. Automatically shows check icon when selected.\n */\nfunction SelectItem({ className, children, ...props }: SelectItemProps) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-2 rounded-full py-1.5 pr-8 pl-2 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 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 <SelectPrimitive.ItemText className=\"flex flex-1 gap-2 shrink-0 whitespace-nowrap\">\n {children}\n </SelectPrimitive.ItemText>\n <SelectPrimitive.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 </SelectPrimitive.ItemIndicator>\n </SelectPrimitive.Item>\n );\n}\n\ntype SelectSeparatorProps = SelectPrimitive.Separator.Props;\n\n/**\n * Visual separator between select groups.\n */\nfunction SelectSeparator({ className, ...props }: SelectSeparatorProps) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px pointer-events-none\", className)}\n {...props}\n />\n );\n}\n\ntype SelectScrollUpButtonProps = React.ComponentProps<\n typeof SelectPrimitive.ScrollUpArrow\n>;\n\n/**\n * Scroll indicator button at the top of scrollable content.\n */\nfunction SelectScrollUpButton({\n className,\n ...props\n}: SelectScrollUpButtonProps) {\n return (\n <SelectPrimitive.ScrollUpArrow\n data-slot=\"select-scroll-up-button\"\n className={cn(\n \"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 top-0 w-full\",\n className,\n )}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpArrow>\n );\n}\n\ntype SelectScrollDownButtonProps = React.ComponentProps<\n typeof SelectPrimitive.ScrollDownArrow\n>;\n\n/**\n * Scroll indicator button at the bottom of scrollable content.\n */\nfunction SelectScrollDownButton({\n className,\n ...props\n}: SelectScrollDownButtonProps) {\n return (\n <SelectPrimitive.ScrollDownArrow\n data-slot=\"select-scroll-down-button\"\n className={cn(\n \"bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4 bottom-0 w-full\",\n className,\n )}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownArrow>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n type SelectProps,\n type SelectContentProps,\n type SelectGroupProps,\n type SelectItemProps,\n type SelectLabelProps,\n type SelectScrollDownButtonProps,\n type SelectScrollUpButtonProps,\n type SelectSeparatorProps,\n type SelectTriggerProps,\n type SelectValueProps,\n};\n"],"names":["SelectPrimitive.Group","SelectPrimitive.Value","SelectPrimitive.Trigger","SelectPrimitive.Icon","SelectPrimitive.Positioner","SelectPrimitive.Popup","SelectPrimitive.GroupLabel","SelectPrimitive.Item","SelectPrimitive.ItemIndicator","SelectPrimitive.Separator","SelectPrimitive.ScrollUpArrow","SelectPrimitive.ScrollDownArrow"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAcA;AAOA;AACE;AACE;AAACA;AAAA;AACW;AACgC;AACtC;AAAA;AAGV;AAOA;AACE;AACE;AAACC;AAAA;AACW;AACsC;AAC5C;AAAA;AAGV;AAUA;AAAuB;AACrB;AACO;AACP;AAEF;AACE;AACE;AAACC;AAAA;AACW;AACC;AACA;AACT;AACA;AAAA;AAEE;AAEH;AAAA;AACD;AAACC;AAAA;AAEiF;AAAA;AAAA;AAElF;AAAA;AAGN;AAWA;AAAuB;AACrB;AACA;AACO;AACM;AACL;AACM;AACS;AAEzB;AACE;AAEI;AAACC;AAAA;AACC;AACA;AACA;AACA;AACA;AACU;AAEV;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEJ;AAAsB;AACU;AACR;AAAA;AAAA;AAAA;AAC1B;AAIR;AAOA;AACE;AACE;AAACC;AAAA;AACW;AAC0D;AAChE;AAAA;AAGV;AAOA;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEJ;AAEA;AACA;AAACC;AAAA;AAEkG;AAGtD;AAAA;AAAA;AAC7C;AAAA;AAGN;AAOA;AACE;AACE;AAACC;AAAA;AACW;AAC8D;AACpE;AAAA;AAGV;AASA;AAA8B;AAC5B;AAEF;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEW;AAAA;AAGrB;AASA;AAAgC;AAC9B;AAEF;AACE;AACE;AAACC;AAAA;AACW;AACC;AACT;AACA;AAAA;AAEE;AAEa;AAAA;AAGvB;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "
|
|
3
|
-
import { Separator as Separator$1 } from "
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Separator as Separator$1 } from "../../node_modules/@base-ui/react/esm/separator/Separator.js";
|
|
4
4
|
function Separator({
|
|
5
5
|
className,
|
|
6
6
|
orientation = "horizontal",
|