@inspirare/design-system 0.0.22 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -61
- package/dist/book-logo-filled.svg +55 -0
- package/dist/components/ui/accessibility-improvements.js +26 -23
- package/dist/components/ui/accordion.js +34 -24
- package/dist/components/ui/alert-dialog.js +91 -57
- package/dist/components/ui/alert.js +38 -26
- package/dist/components/ui/aspect-ratio.js +11 -3
- package/dist/components/ui/avatar.js +30 -8
- package/dist/components/ui/badge.js +20 -14
- package/dist/components/ui/breadcrumb.js +69 -56
- package/dist/components/ui/button-group.js +17 -13
- package/dist/components/ui/button.js +19 -15
- package/dist/components/ui/calendar.js +63 -59
- package/dist/components/ui/card.js +11 -9
- package/dist/components/ui/carousel.js +70 -75
- package/dist/components/ui/chart.js +75 -72
- package/dist/components/ui/checkbox.js +4 -5
- package/dist/components/ui/collapsible.js +12 -14
- package/dist/components/ui/color-picker.js +60 -80
- package/dist/components/ui/combobox.js +153 -33
- package/dist/components/ui/command.js +50 -48
- package/dist/components/ui/context-menu.js +129 -68
- package/dist/components/ui/dialog.js +65 -60
- package/dist/components/ui/drawer.js +81 -40
- package/dist/components/ui/dropdown-menu.js +100 -87
- package/dist/components/ui/empty.js +7 -6
- package/dist/components/ui/field.js +44 -47
- package/dist/components/ui/form.js +22 -23
- package/dist/components/ui/hover-card.js +14 -11
- package/dist/components/ui/input-group.js +16 -13
- package/dist/components/ui/input-otp.js +37 -32
- package/dist/components/ui/input.js +9 -7
- package/dist/components/ui/item.js +42 -36
- package/dist/components/ui/kbd.js +2 -1
- package/dist/components/ui/label.js +6 -7
- package/dist/components/ui/menubar.js +124 -93
- package/dist/components/ui/navigation-menu.js +79 -54
- package/dist/components/ui/pagination.js +78 -58
- package/dist/components/ui/popover.js +35 -16
- package/dist/components/ui/progress.js +37 -13
- package/dist/components/ui/radio-group.js +14 -14
- package/dist/components/ui/resizable.js +24 -15
- package/dist/components/ui/scroll-area.js +29 -11
- package/dist/components/ui/select.js +98 -56
- package/dist/components/ui/separator.js +5 -7
- package/dist/components/ui/sheet.js +47 -42
- package/dist/components/ui/sidebar.js +279 -248
- package/dist/components/ui/skeleton.js +4 -40
- package/dist/components/ui/slider.js +27 -29
- package/dist/components/ui/sonner.js +27 -10
- package/dist/components/ui/spinner.js +2 -0
- package/dist/components/ui/switch.js +3 -4
- package/dist/components/ui/table.js +6 -6
- package/dist/components/ui/tabs.js +45 -22
- package/dist/components/ui/textarea.js +3 -2
- package/dist/components/ui/theme-toggle.js +38 -41
- package/dist/components/ui/toggle-group.js +30 -21
- package/dist/components/ui/toggle.js +8 -9
- package/dist/components/ui/tooltip.js +28 -23
- package/dist/index.css +1 -1
- package/dist/index.d.ts +446 -468
- package/dist/index.js +58 -58
- package/package.json +42 -41
- package/src/App.tsx +28 -34
- package/src/components/branding/assets/book-logo-filled.svg +55 -0
- package/src/components/branding/logo/logo.tsx +56 -0
- package/src/components/ui/accessibility-improvements.stories.tsx +18 -0
- package/src/components/ui/accessibility-improvements.test.tsx +13 -0
- package/src/components/ui/accessibility-improvements.tsx +16 -6
- package/src/components/ui/accordion.stories.tsx +19 -0
- package/src/components/ui/accordion.test.tsx +14 -0
- package/src/components/ui/accordion.tsx +28 -20
- package/src/components/ui/alert-dialog.stories.tsx +19 -0
- package/src/components/ui/alert-dialog.test.tsx +14 -0
- package/src/components/ui/alert-dialog.tsx +159 -123
- package/src/components/ui/alert.stories.tsx +19 -0
- package/src/components/ui/alert.test.tsx +14 -0
- package/src/components/ui/alert.tsx +60 -41
- package/src/components/ui/aspect-ratio.stories.tsx +19 -0
- package/src/components/ui/aspect-ratio.test.tsx +14 -0
- package/src/components/ui/aspect-ratio.tsx +19 -2
- package/src/components/ui/attachment.stories.tsx +19 -0
- package/src/components/ui/attachment.test.tsx +14 -0
- package/src/components/ui/attachment.tsx +209 -0
- package/src/components/ui/avatar.stories.tsx +19 -0
- package/src/components/ui/avatar.test.tsx +14 -0
- package/src/components/ui/avatar.tsx +73 -17
- package/src/components/ui/badge.stories.tsx +19 -0
- package/src/components/ui/badge.test.tsx +14 -0
- package/src/components/ui/badge.tsx +33 -25
- package/src/components/ui/breadcrumb.stories.tsx +19 -0
- package/src/components/ui/breadcrumb.test.tsx +14 -0
- package/src/components/ui/breadcrumb.tsx +98 -86
- package/src/components/ui/bubble.stories.tsx +19 -0
- package/src/components/ui/bubble.test.tsx +14 -0
- package/src/components/ui/bubble.tsx +130 -0
- package/src/components/ui/button-group.stories.tsx +19 -0
- package/src/components/ui/button-group.test.tsx +14 -0
- package/src/components/ui/button-group.tsx +26 -20
- package/src/components/ui/button.stories.tsx +19 -0
- package/src/components/ui/button.test.tsx +14 -0
- package/src/components/ui/button.tsx +30 -31
- package/src/components/ui/calendar.stories.tsx +19 -0
- package/src/components/ui/calendar.test.tsx +14 -0
- package/src/components/ui/calendar.tsx +28 -26
- package/src/components/ui/card.stories.tsx +19 -0
- package/src/components/ui/card.test.tsx +14 -0
- package/src/components/ui/card.tsx +30 -17
- package/src/components/ui/carousel.stories.tsx +19 -0
- package/src/components/ui/carousel.test.tsx +14 -0
- package/src/components/ui/carousel.tsx +115 -135
- package/src/components/ui/chart.stories.tsx +18 -0
- package/src/components/ui/chart.test.tsx +13 -0
- package/src/components/ui/chart.tsx +220 -216
- package/src/components/ui/checkbox.stories.tsx +19 -0
- package/src/components/ui/checkbox.test.tsx +14 -0
- package/src/components/ui/checkbox.tsx +7 -10
- package/src/components/ui/collapsible.stories.tsx +19 -0
- package/src/components/ui/collapsible.test.tsx +14 -0
- package/src/components/ui/collapsible.tsx +11 -26
- package/src/components/ui/color-picker.stories.tsx +19 -0
- package/src/components/ui/color-picker.test.tsx +14 -0
- package/src/components/ui/color-picker.tsx +36 -26
- package/src/components/ui/combobox.stories.tsx +19 -0
- package/src/components/ui/combobox.test.tsx +14 -0
- package/src/components/ui/combobox.tsx +281 -96
- package/src/components/ui/command.stories.tsx +19 -0
- package/src/components/ui/command.test.tsx +14 -0
- package/src/components/ui/command.tsx +59 -47
- package/src/components/ui/context-menu.stories.tsx +19 -0
- package/src/components/ui/context-menu.test.tsx +14 -0
- package/src/components/ui/context-menu.tsx +231 -160
- package/src/components/ui/dialog.stories.tsx +19 -0
- package/src/components/ui/dialog.test.tsx +14 -0
- package/src/components/ui/dialog.tsx +81 -72
- package/src/components/ui/direction.stories.tsx +19 -0
- package/src/components/ui/direction.test.tsx +14 -0
- package/src/components/ui/direction.tsx +6 -0
- package/src/components/ui/drawer.stories.tsx +19 -0
- package/src/components/ui/drawer.test.tsx +14 -0
- package/src/components/ui/drawer.tsx +143 -64
- package/src/components/ui/dropdown-menu.stories.tsx +19 -0
- package/src/components/ui/dropdown-menu.test.tsx +14 -0
- package/src/components/ui/dropdown-menu.tsx +199 -153
- package/src/components/ui/empty.stories.tsx +18 -0
- package/src/components/ui/empty.test.tsx +13 -0
- package/src/components/ui/empty.tsx +11 -9
- package/src/components/ui/field.stories.tsx +18 -0
- package/src/components/ui/field.test.tsx +13 -0
- package/src/components/ui/field.tsx +26 -32
- package/src/components/ui/form.stories.tsx +22 -0
- package/src/components/ui/form.test.tsx +15 -0
- package/src/components/ui/form.tsx +1 -2
- package/src/components/ui/hover-card.stories.tsx +19 -0
- package/src/components/ui/hover-card.test.tsx +14 -0
- package/src/components/ui/hover-card.tsx +34 -32
- package/src/components/ui/input-group.stories.tsx +18 -0
- package/src/components/ui/input-group.test.tsx +13 -0
- package/src/components/ui/input-group.tsx +21 -28
- package/src/components/ui/input-otp.stories.tsx +19 -0
- package/src/components/ui/input-otp.test.tsx +14 -0
- package/src/components/ui/input-otp.tsx +58 -42
- package/src/components/ui/input.stories.tsx +19 -0
- package/src/components/ui/input.test.tsx +14 -0
- package/src/components/ui/input.tsx +9 -8
- package/src/components/ui/item.stories.tsx +18 -0
- package/src/components/ui/item.test.tsx +13 -0
- package/src/components/ui/item.tsx +38 -28
- package/src/components/ui/kbd.stories.tsx +18 -0
- package/src/components/ui/kbd.test.tsx +13 -0
- package/src/components/ui/kbd.tsx +3 -3
- package/src/components/ui/label.stories.tsx +18 -0
- package/src/components/ui/label.test.tsx +13 -0
- package/src/components/ui/label.tsx +7 -11
- package/src/components/ui/marker.stories.tsx +19 -0
- package/src/components/ui/marker.test.tsx +14 -0
- package/src/components/ui/marker.tsx +73 -0
- package/src/components/ui/menubar.stories.tsx +19 -0
- package/src/components/ui/menubar.test.tsx +14 -0
- package/src/components/ui/menubar.tsx +226 -202
- package/src/components/ui/message-scroller.stories.tsx +19 -0
- package/src/components/ui/message-scroller.test.tsx +14 -0
- package/src/components/ui/message-scroller.tsx +131 -0
- package/src/components/ui/message.stories.tsx +19 -0
- package/src/components/ui/message.test.tsx +14 -0
- package/src/components/ui/message.tsx +94 -0
- package/src/components/ui/native-select.stories.tsx +18 -0
- package/src/components/ui/native-select.test.tsx +13 -0
- package/src/components/ui/native-select.tsx +63 -0
- package/src/components/ui/navigation-menu.stories.tsx +19 -0
- package/src/components/ui/navigation-menu.test.tsx +14 -0
- package/src/components/ui/navigation-menu.tsx +145 -103
- package/src/components/ui/pagination.stories.tsx +19 -0
- package/src/components/ui/pagination.test.tsx +14 -0
- package/src/components/ui/pagination.tsx +114 -83
- package/src/components/ui/popover.stories.tsx +19 -0
- package/src/components/ui/popover.test.tsx +14 -0
- package/src/components/ui/popover.tsx +68 -33
- package/src/components/ui/progress.stories.tsx +19 -0
- package/src/components/ui/progress.test.tsx +14 -0
- package/src/components/ui/progress.tsx +67 -15
- package/src/components/ui/questionnaire.stories.tsx +19 -0
- package/src/components/ui/questionnaire.test.tsx +14 -0
- package/src/components/ui/questionnaire.tsx +324 -0
- package/src/components/ui/radio-group.stories.tsx +19 -0
- package/src/components/ui/radio-group.test.tsx +14 -0
- package/src/components/ui/radio-group.tsx +15 -20
- package/src/components/ui/resizable.stories.tsx +19 -0
- package/src/components/ui/resizable.test.tsx +14 -0
- package/src/components/ui/resizable.tsx +37 -30
- package/src/components/ui/scroll-area.stories.tsx +19 -0
- package/src/components/ui/scroll-area.test.tsx +14 -0
- package/src/components/ui/scroll-area.tsx +41 -19
- package/src/components/ui/select.stories.tsx +19 -0
- package/src/components/ui/select.test.tsx +14 -0
- package/src/components/ui/select.tsx +145 -78
- package/src/components/ui/separator.stories.tsx +19 -0
- package/src/components/ui/separator.test.tsx +14 -0
- package/src/components/ui/separator.tsx +8 -11
- package/src/components/ui/sheet.stories.tsx +19 -0
- package/src/components/ui/sheet.test.tsx +14 -0
- package/src/components/ui/sheet.tsx +56 -71
- package/src/components/ui/sidebar.stories.tsx +18 -0
- package/src/components/ui/sidebar.test.tsx +13 -0
- package/src/components/ui/sidebar.tsx +469 -513
- package/src/components/ui/skeleton.stories.tsx +19 -0
- package/src/components/ui/skeleton.test.tsx +14 -0
- package/src/components/ui/skeleton.tsx +8 -114
- package/src/components/ui/slider.stories.tsx +19 -0
- package/src/components/ui/slider.test.tsx +14 -0
- package/src/components/ui/slider.tsx +31 -40
- package/src/components/ui/sonner.stories.tsx +19 -0
- package/src/components/ui/sonner.test.tsx +14 -0
- package/src/components/ui/sonner.tsx +39 -7
- package/src/components/ui/spinner.stories.tsx +18 -0
- package/src/components/ui/spinner.test.tsx +13 -0
- package/src/components/ui/spinner.tsx +3 -7
- package/src/components/ui/switch.stories.tsx +19 -0
- package/src/components/ui/switch.test.tsx +14 -0
- package/src/components/ui/switch.tsx +4 -7
- package/src/components/ui/table.stories.tsx +19 -0
- package/src/components/ui/table.test.tsx +14 -0
- package/src/components/ui/table.tsx +17 -17
- package/src/components/ui/tabs.stories.tsx +19 -0
- package/src/components/ui/tabs.test.tsx +14 -0
- package/src/components/ui/tabs.tsx +71 -31
- package/src/components/ui/textarea.stories.tsx +19 -0
- package/src/components/ui/textarea.test.tsx +14 -0
- package/src/components/ui/textarea.tsx +7 -5
- package/src/components/ui/theme-toggle.stories.tsx +18 -0
- package/src/components/ui/theme-toggle.test.tsx +13 -0
- package/src/components/ui/theme-toggle.tsx +35 -37
- package/src/components/ui/toggle-group.stories.tsx +19 -0
- package/src/components/ui/toggle-group.test.tsx +14 -0
- package/src/components/ui/toggle-group.tsx +41 -25
- package/src/components/ui/toggle.stories.tsx +19 -0
- package/src/components/ui/toggle.test.tsx +14 -0
- package/src/components/ui/toggle.tsx +17 -19
- package/src/components/ui/tooltip.stories.tsx +19 -0
- package/src/components/ui/tooltip.test.tsx +14 -0
- package/src/components/ui/tooltip.tsx +53 -44
- package/src/demo/AIDemo.tsx +50 -0
- package/src/demo/ButtonsDemo.tsx +41 -18
- package/src/demo/CalendarDemo.tsx +1 -1
- package/src/demo/FeedbackDemo.tsx +4 -6
- package/src/demo/FormsDemo.tsx +34 -11
- package/src/demo/NavigationDemo.tsx +38 -13
- package/src/demo/OverlaysDemo.tsx +22 -36
- package/src/demo/update-demos.js +82 -0
- package/src/index.css +66 -46
- package/src/lib/utils.ts +3 -3
- package/src/stories/Button.stories.ts +54 -0
- package/src/stories/Button.tsx +36 -0
- package/src/stories/Configure.mdx +388 -0
- package/src/stories/Header.stories.ts +34 -0
- package/src/stories/Header.tsx +55 -0
- package/src/stories/Page.stories.ts +33 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +68 -0
|
@@ -3,24 +3,24 @@ import { cn as e } from "../../lib/utils.js";
|
|
|
3
3
|
import { Button as t } from "./button.js";
|
|
4
4
|
import { Input as n } from "./input.js";
|
|
5
5
|
import { Textarea as r } from "./textarea.js";
|
|
6
|
-
import "react";
|
|
7
6
|
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
import "react";
|
|
8
8
|
import { cva as a } from "class-variance-authority";
|
|
9
9
|
//#region src/components/ui/input-group.tsx
|
|
10
10
|
function o({ className: t, ...n }) {
|
|
11
11
|
return /* @__PURE__ */ i("div", {
|
|
12
12
|
"data-slot": "input-group",
|
|
13
13
|
role: "group",
|
|
14
|
-
className: e("group/input-group
|
|
14
|
+
className: e("group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", t),
|
|
15
15
|
...n
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
var s = a("
|
|
18
|
+
var s = a("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
19
19
|
variants: { align: {
|
|
20
|
-
"inline-start": "order-first pl-
|
|
21
|
-
"inline-end": "order-last pr-
|
|
22
|
-
"block-start": "
|
|
23
|
-
"block-end": "
|
|
20
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
21
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
22
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
23
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
24
24
|
} },
|
|
25
25
|
defaultVariants: { align: "inline-start" }
|
|
26
26
|
});
|
|
@@ -33,14 +33,17 @@ function c({ className: t, align: n = "inline-start", ...r }) {
|
|
|
33
33
|
onClick: (e) => {
|
|
34
34
|
e.target.closest("button") || e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
35
35
|
},
|
|
36
|
+
onKeyDown: (e) => {
|
|
37
|
+
(e.key === "Enter" || e.key === " ") && e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
38
|
+
},
|
|
36
39
|
...r
|
|
37
40
|
});
|
|
38
41
|
}
|
|
39
42
|
var l = a("flex items-center gap-2 text-sm shadow-none", {
|
|
40
43
|
variants: { size: {
|
|
41
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-
|
|
42
|
-
sm: "
|
|
43
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-
|
|
44
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
45
|
+
sm: "",
|
|
46
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
44
47
|
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
45
48
|
} },
|
|
46
49
|
defaultVariants: { size: "xs" }
|
|
@@ -56,21 +59,21 @@ function u({ className: n, type: r = "button", variant: a = "ghost", size: o = "
|
|
|
56
59
|
}
|
|
57
60
|
function d({ className: t, ...n }) {
|
|
58
61
|
return /* @__PURE__ */ i("span", {
|
|
59
|
-
className: e("
|
|
62
|
+
className: e("flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t),
|
|
60
63
|
...n
|
|
61
64
|
});
|
|
62
65
|
}
|
|
63
66
|
function f({ className: t, ...r }) {
|
|
64
67
|
return /* @__PURE__ */ i(n, {
|
|
65
68
|
"data-slot": "input-group-control",
|
|
66
|
-
className: e("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent", t),
|
|
69
|
+
className: e("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", t),
|
|
67
70
|
...r
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
function p({ className: t, ...n }) {
|
|
71
74
|
return /* @__PURE__ */ i(r, {
|
|
72
75
|
"data-slot": "input-group-control",
|
|
73
|
-
className: e("flex-1 resize-none rounded-none border-0 bg-transparent py-
|
|
76
|
+
className: e("flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent", t),
|
|
74
77
|
...n
|
|
75
78
|
});
|
|
76
79
|
}
|
|
@@ -1,42 +1,47 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
3
|
+
import { MinusIcon as t } from "lucide-react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
import * as i from "react";
|
|
6
6
|
import { OTPInput as a, OTPInputContext as o } from "input-otp";
|
|
7
7
|
//#region src/components/ui/input-otp.tsx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
function s({ className: t, containerClassName: r, ...i }) {
|
|
9
|
+
return /* @__PURE__ */ n(a, {
|
|
10
|
+
"data-slot": "input-otp",
|
|
11
|
+
containerClassName: e("cn-input-otp flex items-center has-disabled:opacity-50", r),
|
|
12
|
+
spellCheck: !1,
|
|
13
|
+
className: e("disabled:cursor-not-allowed", t),
|
|
14
|
+
...i
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function c({ className: t, ...r }) {
|
|
18
|
+
return /* @__PURE__ */ n("div", {
|
|
19
|
+
"data-slot": "input-otp-group",
|
|
20
|
+
className: e("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", t),
|
|
21
|
+
...r
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function l({ index: t, className: a, ...s }) {
|
|
25
|
+
let { char: c, hasFakeCaret: l, isActive: u } = i.useContext(o)?.slots[t] ?? {};
|
|
26
|
+
return /* @__PURE__ */ r("div", {
|
|
27
|
+
"data-slot": "input-otp-slot",
|
|
28
|
+
"data-active": u,
|
|
29
|
+
className: e("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", a),
|
|
26
30
|
...s,
|
|
27
|
-
children: [
|
|
31
|
+
children: [c, l && /* @__PURE__ */ n("div", {
|
|
28
32
|
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
29
|
-
children: /* @__PURE__ */
|
|
33
|
+
children: /* @__PURE__ */ n("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
|
|
30
34
|
})]
|
|
31
35
|
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
})
|
|
40
|
-
|
|
36
|
+
}
|
|
37
|
+
function u({ ...e }) {
|
|
38
|
+
return /* @__PURE__ */ n("div", {
|
|
39
|
+
"data-slot": "input-otp-separator",
|
|
40
|
+
className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
|
|
41
|
+
role: "separator",
|
|
42
|
+
...e,
|
|
43
|
+
children: /* @__PURE__ */ n(t, {})
|
|
44
|
+
});
|
|
45
|
+
}
|
|
41
46
|
//#endregion
|
|
42
47
|
export { s as InputOTP, c as InputOTPGroup, u as InputOTPSeparator, l as InputOTPSlot };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
import "react";
|
|
5
|
+
import { Input as n } from "@base-ui/react/input";
|
|
4
6
|
//#region src/components/ui/input.tsx
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */ t(
|
|
7
|
-
type:
|
|
7
|
+
function r({ className: r, type: i, ...a }) {
|
|
8
|
+
return /* @__PURE__ */ t(n, {
|
|
9
|
+
type: i,
|
|
8
10
|
"data-slot": "input",
|
|
9
|
-
className: e("
|
|
10
|
-
...
|
|
11
|
+
className: e("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", r),
|
|
12
|
+
...a
|
|
11
13
|
});
|
|
12
14
|
}
|
|
13
15
|
//#endregion
|
|
14
|
-
export {
|
|
16
|
+
export { r as Input };
|
|
@@ -1,36 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
3
|
import { Separator as t } from "./separator.js";
|
|
3
|
-
import "react";
|
|
4
4
|
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
5
6
|
import { cva as r } from "class-variance-authority";
|
|
6
|
-
import {
|
|
7
|
+
import { mergeProps as i } from "@base-ui/react/merge-props";
|
|
8
|
+
import { useRender as a } from "@base-ui/react/use-render";
|
|
7
9
|
//#region src/components/ui/item.tsx
|
|
8
|
-
function
|
|
10
|
+
function o({ className: t, ...r }) {
|
|
9
11
|
return /* @__PURE__ */ n("div", {
|
|
10
12
|
role: "list",
|
|
11
13
|
"data-slot": "item-group",
|
|
12
|
-
className: e("group/item-group flex flex-col", t),
|
|
14
|
+
className: e("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", t),
|
|
13
15
|
...r
|
|
14
16
|
});
|
|
15
17
|
}
|
|
16
|
-
function
|
|
18
|
+
function s({ className: r, ...i }) {
|
|
17
19
|
return /* @__PURE__ */ n(t, {
|
|
18
20
|
"data-slot": "item-separator",
|
|
19
21
|
orientation: "horizontal",
|
|
20
|
-
className: e("my-
|
|
22
|
+
className: e("my-2", r),
|
|
21
23
|
...i
|
|
22
24
|
});
|
|
23
25
|
}
|
|
24
|
-
var
|
|
26
|
+
var c = r("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
|
|
25
27
|
variants: {
|
|
26
28
|
variant: {
|
|
27
|
-
default: "
|
|
29
|
+
default: "border-transparent",
|
|
28
30
|
outline: "border-border",
|
|
29
|
-
muted: "bg-muted/50"
|
|
31
|
+
muted: "border-transparent bg-muted/50"
|
|
30
32
|
},
|
|
31
33
|
size: {
|
|
32
|
-
default: "gap-
|
|
33
|
-
sm: "gap-2.5 px-
|
|
34
|
+
default: "gap-2.5 px-3 py-2.5",
|
|
35
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
36
|
+
xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
|
|
34
37
|
}
|
|
35
38
|
},
|
|
36
39
|
defaultVariants: {
|
|
@@ -38,74 +41,77 @@ var s = r("group/item [a]:hover:bg-accent/50 focus-visible:border-ring focus-vis
|
|
|
38
41
|
size: "default"
|
|
39
42
|
}
|
|
40
43
|
});
|
|
41
|
-
function
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
variant: r,
|
|
48
|
-
size: a,
|
|
44
|
+
function l({ className: t, variant: n = "default", size: r = "default", render: o, ...s }) {
|
|
45
|
+
return a({
|
|
46
|
+
defaultTagName: "div",
|
|
47
|
+
props: i({ className: e(c({
|
|
48
|
+
variant: n,
|
|
49
|
+
size: r,
|
|
49
50
|
className: t
|
|
50
|
-
})),
|
|
51
|
-
|
|
51
|
+
})) }, s),
|
|
52
|
+
render: o,
|
|
53
|
+
state: {
|
|
54
|
+
slot: "item",
|
|
55
|
+
variant: n,
|
|
56
|
+
size: r
|
|
57
|
+
}
|
|
52
58
|
});
|
|
53
59
|
}
|
|
54
|
-
var
|
|
60
|
+
var u = r("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
|
|
55
61
|
variants: { variant: {
|
|
56
62
|
default: "bg-transparent",
|
|
57
|
-
icon: "
|
|
58
|
-
image: "size-10 overflow-hidden rounded-sm [&_img]:size-full [&_img]:object-cover"
|
|
63
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
64
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
59
65
|
} },
|
|
60
66
|
defaultVariants: { variant: "default" }
|
|
61
67
|
});
|
|
62
|
-
function
|
|
68
|
+
function d({ className: t, variant: r = "default", ...i }) {
|
|
63
69
|
return /* @__PURE__ */ n("div", {
|
|
64
70
|
"data-slot": "item-media",
|
|
65
71
|
"data-variant": r,
|
|
66
|
-
className: e(
|
|
72
|
+
className: e(u({
|
|
67
73
|
variant: r,
|
|
68
74
|
className: t
|
|
69
75
|
})),
|
|
70
76
|
...i
|
|
71
77
|
});
|
|
72
78
|
}
|
|
73
|
-
function
|
|
79
|
+
function f({ className: t, ...r }) {
|
|
74
80
|
return /* @__PURE__ */ n("div", {
|
|
75
81
|
"data-slot": "item-content",
|
|
76
|
-
className: e("flex flex-1 flex-col gap-1 [&+[data-slot=item-content]]:flex-none", t),
|
|
82
|
+
className: e("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", t),
|
|
77
83
|
...r
|
|
78
84
|
});
|
|
79
85
|
}
|
|
80
|
-
function
|
|
86
|
+
function p({ className: t, ...r }) {
|
|
81
87
|
return /* @__PURE__ */ n("div", {
|
|
82
88
|
"data-slot": "item-title",
|
|
83
|
-
className: e("flex w-fit items-center gap-2 text-sm font-medium
|
|
89
|
+
className: e("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", t),
|
|
84
90
|
...r
|
|
85
91
|
});
|
|
86
92
|
}
|
|
87
|
-
function
|
|
93
|
+
function m({ className: t, ...r }) {
|
|
88
94
|
return /* @__PURE__ */ n("p", {
|
|
89
95
|
"data-slot": "item-description",
|
|
90
|
-
className: e("
|
|
96
|
+
className: e("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", t),
|
|
91
97
|
...r
|
|
92
98
|
});
|
|
93
99
|
}
|
|
94
|
-
function
|
|
100
|
+
function h({ className: t, ...r }) {
|
|
95
101
|
return /* @__PURE__ */ n("div", {
|
|
96
102
|
"data-slot": "item-actions",
|
|
97
103
|
className: e("flex items-center gap-2", t),
|
|
98
104
|
...r
|
|
99
105
|
});
|
|
100
106
|
}
|
|
101
|
-
function
|
|
107
|
+
function g({ className: t, ...r }) {
|
|
102
108
|
return /* @__PURE__ */ n("div", {
|
|
103
109
|
"data-slot": "item-header",
|
|
104
110
|
className: e("flex basis-full items-center justify-between gap-2", t),
|
|
105
111
|
...r
|
|
106
112
|
});
|
|
107
113
|
}
|
|
108
|
-
function
|
|
114
|
+
function _({ className: t, ...r }) {
|
|
109
115
|
return /* @__PURE__ */ n("div", {
|
|
110
116
|
"data-slot": "item-footer",
|
|
111
117
|
className: e("flex basis-full items-center justify-between gap-2", t),
|
|
@@ -113,4 +119,4 @@ function g({ className: t, ...r }) {
|
|
|
113
119
|
});
|
|
114
120
|
}
|
|
115
121
|
//#endregion
|
|
116
|
-
export {
|
|
122
|
+
export { l as Item, h as ItemActions, f as ItemContent, m as ItemDescription, _ as ItemFooter, o as ItemGroup, g as ItemHeader, d as ItemMedia, s as ItemSeparator, p as ItemTitle };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn as e } from "../../lib/utils.js";
|
|
2
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
4
|
//#region src/components/ui/kbd.tsx
|
|
4
5
|
function n({ className: n, ...r }) {
|
|
5
6
|
return /* @__PURE__ */ t("kbd", {
|
|
6
7
|
"data-slot": "kbd",
|
|
7
|
-
className: e("
|
|
8
|
+
className: e("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", n),
|
|
8
9
|
...r
|
|
9
10
|
});
|
|
10
11
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
4
|
+
import "react";
|
|
6
5
|
//#region src/components/ui/label.tsx
|
|
7
|
-
function
|
|
8
|
-
return /* @__PURE__ */ t(
|
|
6
|
+
function n({ className: n, ...r }) {
|
|
7
|
+
return /* @__PURE__ */ t("label", {
|
|
9
8
|
"data-slot": "label",
|
|
10
|
-
className: e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
11
|
-
...
|
|
9
|
+
className: e("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", n),
|
|
10
|
+
...r
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
13
|
//#endregion
|
|
15
|
-
export {
|
|
14
|
+
export { n as Label };
|
|
@@ -1,105 +1,136 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as
|
|
6
|
-
import
|
|
3
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuGroup as r, DropdownMenuItem as i, DropdownMenuLabel as a, DropdownMenuPortal as o, DropdownMenuRadioGroup as s, DropdownMenuSeparator as c, DropdownMenuShortcut as l, DropdownMenuSub as u, DropdownMenuSubContent as d, DropdownMenuSubTrigger as f, DropdownMenuTrigger as p } from "./dropdown-menu.js";
|
|
4
|
+
import { CheckIcon as m } from "lucide-react";
|
|
5
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
|
+
import "react";
|
|
7
|
+
import { Menu as _ } from "@base-ui/react/menu";
|
|
8
|
+
import { Menubar as v } from "@base-ui/react/menubar";
|
|
7
9
|
//#region src/components/ui/menubar.tsx
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
function y({ className: t, ...n }) {
|
|
11
|
+
return /* @__PURE__ */ h(v, {
|
|
12
|
+
"data-slot": "menubar",
|
|
13
|
+
className: e("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", t),
|
|
14
|
+
...n
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function b({ ...e }) {
|
|
18
|
+
return /* @__PURE__ */ h(t, {
|
|
19
|
+
"data-slot": "menubar-menu",
|
|
20
|
+
...e
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function x({ ...e }) {
|
|
24
|
+
return /* @__PURE__ */ h(r, {
|
|
25
|
+
"data-slot": "menubar-group",
|
|
26
|
+
...e
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function S({ ...e }) {
|
|
30
|
+
return /* @__PURE__ */ h(o, {
|
|
31
|
+
"data-slot": "menubar-portal",
|
|
32
|
+
...e
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function C({ className: t, ...n }) {
|
|
36
|
+
return /* @__PURE__ */ h(p, {
|
|
37
|
+
"data-slot": "menubar-trigger",
|
|
38
|
+
className: e("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", t),
|
|
39
|
+
...n
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function w({ className: t, align: r = "start", alignOffset: i = -4, sideOffset: a = 8, ...o }) {
|
|
43
|
+
return /* @__PURE__ */ h(n, {
|
|
44
|
+
"data-slot": "menubar-content",
|
|
45
|
+
align: r,
|
|
46
|
+
alignOffset: i,
|
|
47
|
+
sideOffset: a,
|
|
48
|
+
className: e("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", t),
|
|
49
|
+
...o
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function T({ className: t, inset: n, variant: r = "default", ...a }) {
|
|
53
|
+
return /* @__PURE__ */ h(i, {
|
|
54
|
+
"data-slot": "menubar-item",
|
|
55
|
+
"data-inset": n,
|
|
56
|
+
"data-variant": r,
|
|
57
|
+
className: e("group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", t),
|
|
58
|
+
...a
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
function E({ className: t, children: n, checked: r, inset: i, ...a }) {
|
|
62
|
+
return /* @__PURE__ */ g(_.CheckboxItem, {
|
|
63
|
+
"data-slot": "menubar-checkbox-item",
|
|
64
|
+
"data-inset": i,
|
|
65
|
+
className: e("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", t),
|
|
66
|
+
checked: r,
|
|
67
|
+
...a,
|
|
68
|
+
children: [/* @__PURE__ */ h("span", {
|
|
69
|
+
className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
70
|
+
children: /* @__PURE__ */ h(_.CheckboxItemIndicator, { children: /* @__PURE__ */ h(m, {}) })
|
|
71
|
+
}), n]
|
|
72
|
+
});
|
|
10
73
|
}
|
|
11
|
-
function
|
|
12
|
-
return /* @__PURE__ */
|
|
74
|
+
function D({ ...e }) {
|
|
75
|
+
return /* @__PURE__ */ h(s, {
|
|
76
|
+
"data-slot": "menubar-radio-group",
|
|
77
|
+
...e
|
|
78
|
+
});
|
|
13
79
|
}
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
80
|
+
function O({ className: t, children: n, inset: r, ...i }) {
|
|
81
|
+
return /* @__PURE__ */ g(_.RadioItem, {
|
|
82
|
+
"data-slot": "menubar-radio-item",
|
|
83
|
+
"data-inset": r,
|
|
84
|
+
className: e("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
85
|
+
...i,
|
|
86
|
+
children: [/* @__PURE__ */ h("span", {
|
|
87
|
+
className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
|
|
88
|
+
children: /* @__PURE__ */ h(_.RadioItemIndicator, { children: /* @__PURE__ */ h(m, {}) })
|
|
89
|
+
}), n]
|
|
90
|
+
});
|
|
16
91
|
}
|
|
17
|
-
function
|
|
18
|
-
return /* @__PURE__ */ a
|
|
92
|
+
function k({ className: t, inset: n, ...r }) {
|
|
93
|
+
return /* @__PURE__ */ h(a, {
|
|
94
|
+
"data-slot": "menubar-label",
|
|
95
|
+
"data-inset": n,
|
|
96
|
+
className: e("px-1.5 py-1 text-sm font-medium data-inset:pl-7", t),
|
|
97
|
+
...r
|
|
98
|
+
});
|
|
19
99
|
}
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */
|
|
100
|
+
function A({ className: t, ...n }) {
|
|
101
|
+
return /* @__PURE__ */ h(c, {
|
|
102
|
+
"data-slot": "menubar-separator",
|
|
103
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
104
|
+
...n
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function j({ className: t, ...n }) {
|
|
108
|
+
return /* @__PURE__ */ h(l, {
|
|
109
|
+
"data-slot": "menubar-shortcut",
|
|
110
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", t),
|
|
111
|
+
...n
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function M({ ...e }) {
|
|
115
|
+
return /* @__PURE__ */ h(u, {
|
|
22
116
|
"data-slot": "menubar-sub",
|
|
23
117
|
...e
|
|
24
118
|
});
|
|
25
119
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
...c,
|
|
42
|
-
children: [i, /* @__PURE__ */ a(r, { className: "ml-auto h-4 w-4" })]
|
|
43
|
-
}));
|
|
44
|
-
h.displayName = s.SubTrigger.displayName;
|
|
45
|
-
var g = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s.SubContent, {
|
|
46
|
-
ref: r,
|
|
47
|
-
className: e("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-menubar-content-transform-origin]", t),
|
|
48
|
-
...n
|
|
49
|
-
}));
|
|
50
|
-
g.displayName = s.SubContent.displayName;
|
|
51
|
-
var _ = t.forwardRef(({ className: t, align: n = "start", alignOffset: r = -4, sideOffset: i = 8, ...o }, c) => /* @__PURE__ */ a(s.Portal, { children: /* @__PURE__ */ a(s.Content, {
|
|
52
|
-
ref: c,
|
|
53
|
-
align: n,
|
|
54
|
-
alignOffset: r,
|
|
55
|
-
sideOffset: i,
|
|
56
|
-
className: e("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 origin-[--radix-menubar-content-transform-origin]", t),
|
|
57
|
-
...o
|
|
58
|
-
}) }));
|
|
59
|
-
_.displayName = s.Content.displayName;
|
|
60
|
-
var v = t.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ a(s.Item, {
|
|
61
|
-
ref: i,
|
|
62
|
-
className: e("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", n && "pl-8", t),
|
|
63
|
-
...r
|
|
64
|
-
}));
|
|
65
|
-
v.displayName = s.Item.displayName;
|
|
66
|
-
var y = t.forwardRef(({ className: t, children: r, checked: i, ...c }, l) => /* @__PURE__ */ o(s.CheckboxItem, {
|
|
67
|
-
ref: l,
|
|
68
|
-
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t),
|
|
69
|
-
checked: i,
|
|
70
|
-
...c,
|
|
71
|
-
children: [/* @__PURE__ */ a("span", {
|
|
72
|
-
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
73
|
-
children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(n, { className: "h-4 w-4" }) })
|
|
74
|
-
}), r]
|
|
75
|
-
}));
|
|
76
|
-
y.displayName = s.CheckboxItem.displayName;
|
|
77
|
-
var b = t.forwardRef(({ className: t, children: n, ...r }, c) => /* @__PURE__ */ o(s.RadioItem, {
|
|
78
|
-
ref: c,
|
|
79
|
-
className: e("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", t),
|
|
80
|
-
...r,
|
|
81
|
-
children: [/* @__PURE__ */ a("span", {
|
|
82
|
-
className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
|
|
83
|
-
children: /* @__PURE__ */ a(s.ItemIndicator, { children: /* @__PURE__ */ a(i, { className: "h-2 w-2 fill-current" }) })
|
|
84
|
-
}), n]
|
|
85
|
-
}));
|
|
86
|
-
b.displayName = s.RadioItem.displayName;
|
|
87
|
-
var x = t.forwardRef(({ className: t, inset: n, ...r }, i) => /* @__PURE__ */ a(s.Label, {
|
|
88
|
-
ref: i,
|
|
89
|
-
className: e("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
|
|
90
|
-
...r
|
|
91
|
-
}));
|
|
92
|
-
x.displayName = s.Label.displayName;
|
|
93
|
-
var S = t.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s.Separator, {
|
|
94
|
-
ref: r,
|
|
95
|
-
className: e("-mx-1 my-1 h-px bg-muted", t),
|
|
96
|
-
...n
|
|
97
|
-
}));
|
|
98
|
-
S.displayName = s.Separator.displayName;
|
|
99
|
-
var C = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
|
|
100
|
-
className: e("ml-auto text-xs tracking-widest text-muted-foreground", t),
|
|
101
|
-
...n
|
|
102
|
-
});
|
|
103
|
-
C.displayname = "MenubarShortcut";
|
|
120
|
+
function N({ className: t, inset: n, ...r }) {
|
|
121
|
+
return /* @__PURE__ */ h(f, {
|
|
122
|
+
"data-slot": "menubar-sub-trigger",
|
|
123
|
+
"data-inset": n,
|
|
124
|
+
className: e("gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", t),
|
|
125
|
+
...r
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
function P({ className: t, ...n }) {
|
|
129
|
+
return /* @__PURE__ */ h(d, {
|
|
130
|
+
"data-slot": "menubar-sub-content",
|
|
131
|
+
className: e("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", t),
|
|
132
|
+
...n
|
|
133
|
+
});
|
|
134
|
+
}
|
|
104
135
|
//#endregion
|
|
105
|
-
export {
|
|
136
|
+
export { y as Menubar, E as MenubarCheckboxItem, w as MenubarContent, x as MenubarGroup, T as MenubarItem, k as MenubarLabel, b as MenubarMenu, S as MenubarPortal, D as MenubarRadioGroup, O as MenubarRadioItem, A as MenubarSeparator, j as MenubarShortcut, M as MenubarSub, P as MenubarSubContent, N as MenubarSubTrigger, C as MenubarTrigger };
|