@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
|
@@ -1,72 +1,133 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import { CheckIcon as t, ChevronRightIcon as n } from "lucide-react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
import { ContextMenu as a } from "@base-ui/react/context-menu";
|
|
7
7
|
//#region src/components/ui/context-menu.tsx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}
|
|
70
|
-
|
|
8
|
+
function o({ ...e }) {
|
|
9
|
+
return /* @__PURE__ */ r(a.Root, {
|
|
10
|
+
"data-slot": "context-menu",
|
|
11
|
+
...e
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function s({ ...e }) {
|
|
15
|
+
return /* @__PURE__ */ r(a.Portal, {
|
|
16
|
+
"data-slot": "context-menu-portal",
|
|
17
|
+
...e
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function c({ className: t, ...n }) {
|
|
21
|
+
return /* @__PURE__ */ r(a.Trigger, {
|
|
22
|
+
"data-slot": "context-menu-trigger",
|
|
23
|
+
className: e("select-none", t),
|
|
24
|
+
...n
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function l({ className: t, align: n = "start", alignOffset: i = 4, side: o = "right", sideOffset: s = 0, ...c }) {
|
|
28
|
+
return /* @__PURE__ */ r(a.Portal, { children: /* @__PURE__ */ r(a.Positioner, {
|
|
29
|
+
className: "isolate z-50 outline-none",
|
|
30
|
+
align: n,
|
|
31
|
+
alignOffset: i,
|
|
32
|
+
side: o,
|
|
33
|
+
sideOffset: s,
|
|
34
|
+
children: /* @__PURE__ */ r(a.Popup, {
|
|
35
|
+
"data-slot": "context-menu-content",
|
|
36
|
+
className: e("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", t),
|
|
37
|
+
...c
|
|
38
|
+
})
|
|
39
|
+
}) });
|
|
40
|
+
}
|
|
41
|
+
function u({ ...e }) {
|
|
42
|
+
return /* @__PURE__ */ r(a.Group, {
|
|
43
|
+
"data-slot": "context-menu-group",
|
|
44
|
+
...e
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function d({ className: t, inset: n, ...i }) {
|
|
48
|
+
return /* @__PURE__ */ r(a.GroupLabel, {
|
|
49
|
+
"data-slot": "context-menu-label",
|
|
50
|
+
"data-inset": n,
|
|
51
|
+
className: e("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", t),
|
|
52
|
+
...i
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function f({ className: t, inset: n, variant: i = "default", ...o }) {
|
|
56
|
+
return /* @__PURE__ */ r(a.Item, {
|
|
57
|
+
"data-slot": "context-menu-item",
|
|
58
|
+
"data-inset": n,
|
|
59
|
+
"data-variant": i,
|
|
60
|
+
className: e("group/context-menu-item relative flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent 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:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive", t),
|
|
61
|
+
...o
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function p({ ...e }) {
|
|
65
|
+
return /* @__PURE__ */ r(a.SubmenuRoot, {
|
|
66
|
+
"data-slot": "context-menu-sub",
|
|
67
|
+
...e
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function m({ className: t, inset: o, children: s, ...c }) {
|
|
71
|
+
return /* @__PURE__ */ i(a.SubmenuTrigger, {
|
|
72
|
+
"data-slot": "context-menu-sub-trigger",
|
|
73
|
+
"data-inset": o,
|
|
74
|
+
className: e("flex cursor-pointer items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
75
|
+
...c,
|
|
76
|
+
children: [s, /* @__PURE__ */ r(n, { className: "ml-auto" })]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function h({ ...e }) {
|
|
80
|
+
return /* @__PURE__ */ r(l, {
|
|
81
|
+
"data-slot": "context-menu-sub-content",
|
|
82
|
+
className: "shadow-lg",
|
|
83
|
+
side: "right",
|
|
84
|
+
...e
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function g({ className: n, children: o, checked: s, inset: c, ...l }) {
|
|
88
|
+
return /* @__PURE__ */ i(a.CheckboxItem, {
|
|
89
|
+
"data-slot": "context-menu-checkbox-item",
|
|
90
|
+
"data-inset": c,
|
|
91
|
+
className: e("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent 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", n),
|
|
92
|
+
checked: s,
|
|
93
|
+
...l,
|
|
94
|
+
children: [/* @__PURE__ */ r("span", {
|
|
95
|
+
className: "pointer-events-none absolute right-2",
|
|
96
|
+
children: /* @__PURE__ */ r(a.CheckboxItemIndicator, { children: /* @__PURE__ */ r(t, {}) })
|
|
97
|
+
}), o]
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function _({ ...e }) {
|
|
101
|
+
return /* @__PURE__ */ r(a.RadioGroup, {
|
|
102
|
+
"data-slot": "context-menu-radio-group",
|
|
103
|
+
...e
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function v({ className: n, children: o, inset: s, ...c }) {
|
|
107
|
+
return /* @__PURE__ */ i(a.RadioItem, {
|
|
108
|
+
"data-slot": "context-menu-radio-item",
|
|
109
|
+
"data-inset": s,
|
|
110
|
+
className: e("relative flex cursor-pointer items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent 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", n),
|
|
111
|
+
...c,
|
|
112
|
+
children: [/* @__PURE__ */ r("span", {
|
|
113
|
+
className: "pointer-events-none absolute right-2",
|
|
114
|
+
children: /* @__PURE__ */ r(a.RadioItemIndicator, { children: /* @__PURE__ */ r(t, {}) })
|
|
115
|
+
}), o]
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
function y({ className: t, ...n }) {
|
|
119
|
+
return /* @__PURE__ */ r(a.Separator, {
|
|
120
|
+
"data-slot": "context-menu-separator",
|
|
121
|
+
className: e("-mx-1 my-1 h-px bg-border", t),
|
|
122
|
+
...n
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function b({ className: t, ...n }) {
|
|
126
|
+
return /* @__PURE__ */ r("span", {
|
|
127
|
+
"data-slot": "context-menu-shortcut",
|
|
128
|
+
className: e("ml-auto text-xs tracking-widest text-muted-foreground group-focus/context-menu-item:text-accent-foreground", t),
|
|
129
|
+
...n
|
|
130
|
+
});
|
|
131
|
+
}
|
|
71
132
|
//#endregion
|
|
72
|
-
export {
|
|
133
|
+
export { o as ContextMenu, g as ContextMenuCheckboxItem, l as ContextMenuContent, u as ContextMenuGroup, f as ContextMenuItem, d as ContextMenuLabel, s as ContextMenuPortal, _ as ContextMenuRadioGroup, v as ContextMenuRadioItem, y as ContextMenuSeparator, b as ContextMenuShortcut, p as ContextMenuSub, h as ContextMenuSubContent, m as ContextMenuSubTrigger, c as ContextMenuTrigger };
|
|
@@ -1,88 +1,93 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "
|
|
4
|
-
import { XIcon as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import * as
|
|
3
|
+
import { Button as t } from "./button.js";
|
|
4
|
+
import { XIcon as n } from "lucide-react";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
|
+
import * as a from "react";
|
|
7
|
+
import { Dialog as o } from "@base-ui/react/dialog";
|
|
7
8
|
//#region src/components/ui/dialog.tsx
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
function s({ ...e }) {
|
|
10
|
+
return /* @__PURE__ */ r(o.Root, {
|
|
10
11
|
"data-slot": "dialog",
|
|
11
12
|
...e
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return /* @__PURE__ */ n(i.Portal, {
|
|
15
|
+
var c = a.forwardRef(({ ...e }, t) => /* @__PURE__ */ r(o.Trigger, {
|
|
16
|
+
ref: t,
|
|
17
|
+
"data-slot": "dialog-trigger",
|
|
18
|
+
...e
|
|
19
|
+
}));
|
|
20
|
+
c.displayName = "DialogTrigger";
|
|
21
|
+
function l({ ...e }) {
|
|
22
|
+
return /* @__PURE__ */ r(o.Portal, {
|
|
23
23
|
"data-slot": "dialog-portal",
|
|
24
24
|
...e
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return /* @__PURE__ */ n(i.Overlay, {
|
|
27
|
+
var u = a.forwardRef(({ ...e }, t) => /* @__PURE__ */ r(o.Close, {
|
|
28
|
+
ref: t,
|
|
29
|
+
"data-slot": "dialog-close",
|
|
30
|
+
...e
|
|
31
|
+
}));
|
|
32
|
+
u.displayName = "DialogClose";
|
|
33
|
+
function d({ className: t, ...n }) {
|
|
34
|
+
return /* @__PURE__ */ r(o.Backdrop, {
|
|
36
35
|
"data-slot": "dialog-overlay",
|
|
37
|
-
className: e("data-
|
|
38
|
-
...
|
|
36
|
+
className: e("fixed inset-0 isolate z-50 bg-black/80 backdrop-blur-sm duration-200 data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", t),
|
|
37
|
+
...n
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
40
|
+
var f = a.forwardRef(({ className: a, children: s, showCloseButton: c = !0, ...u }, f) => /* @__PURE__ */ i(l, { children: [/* @__PURE__ */ r(d, {}), /* @__PURE__ */ i(o.Popup, {
|
|
41
|
+
ref: f,
|
|
42
|
+
"data-slot": "dialog-content",
|
|
43
|
+
className: e("fixed top-1/2 left-1/2 z-50 grid w-[90vw] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-2xl bg-popover/90 backdrop-blur-xl p-6 text-sm text-popover-foreground shadow-2xl ring-1 ring-border duration-200 outline-none 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", a),
|
|
44
|
+
...u,
|
|
45
|
+
children: [s, c && /* @__PURE__ */ i(o.Close, {
|
|
46
|
+
"data-slot": "dialog-close",
|
|
47
|
+
render: /* @__PURE__ */ r(t, {
|
|
48
|
+
variant: "ghost",
|
|
49
|
+
className: "absolute top-4 right-4 rounded-full",
|
|
50
|
+
size: "icon-sm"
|
|
51
|
+
}),
|
|
52
|
+
children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r("span", {
|
|
53
|
+
className: "sr-only",
|
|
54
|
+
children: "Close"
|
|
56
55
|
})]
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
})]
|
|
57
|
+
})] }));
|
|
58
|
+
f.displayName = "DialogContent";
|
|
59
|
+
function p({ className: t, ...n }) {
|
|
60
|
+
return /* @__PURE__ */ r("div", {
|
|
61
61
|
"data-slot": "dialog-header",
|
|
62
|
-
className: e("flex flex-col gap-2
|
|
63
|
-
...
|
|
62
|
+
className: e("flex flex-col gap-2", t),
|
|
63
|
+
...n
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
function
|
|
67
|
-
return /* @__PURE__ */
|
|
66
|
+
function m({ className: n, showCloseButton: a = !1, children: s, ...c }) {
|
|
67
|
+
return /* @__PURE__ */ i("div", {
|
|
68
68
|
"data-slot": "dialog-footer",
|
|
69
|
-
className: e("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",
|
|
70
|
-
...
|
|
69
|
+
className: e("flex flex-col-reverse gap-2 pt-2 sm:flex-row sm:justify-end", n),
|
|
70
|
+
...c,
|
|
71
|
+
children: [s, a && /* @__PURE__ */ r(o.Close, {
|
|
72
|
+
render: /* @__PURE__ */ r(t, { variant: "outline" }),
|
|
73
|
+
children: "Close"
|
|
74
|
+
})]
|
|
71
75
|
});
|
|
72
76
|
}
|
|
73
|
-
function
|
|
74
|
-
return /* @__PURE__ */
|
|
77
|
+
function h({ className: t, ...n }) {
|
|
78
|
+
return /* @__PURE__ */ r(o.Title, {
|
|
75
79
|
"data-slot": "dialog-title",
|
|
76
|
-
className: e("text-
|
|
77
|
-
...
|
|
80
|
+
className: e("font-heading text-base leading-none font-medium", t),
|
|
81
|
+
...n
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
|
-
function
|
|
81
|
-
return /* @__PURE__ */
|
|
84
|
+
function g({ className: t, ...n }) {
|
|
85
|
+
return /* @__PURE__ */ r(o.Description, {
|
|
82
86
|
"data-slot": "dialog-description",
|
|
83
|
-
|
|
84
|
-
|
|
87
|
+
render: /* @__PURE__ */ r("div", {}),
|
|
88
|
+
className: e("text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", t),
|
|
89
|
+
...n
|
|
85
90
|
});
|
|
86
91
|
}
|
|
87
92
|
//#endregion
|
|
88
|
-
export {
|
|
93
|
+
export { s as Dialog, u as DialogClose, f as DialogContent, g as DialogDescription, m as DialogFooter, p as DialogHeader, d as DialogOverlay, l as DialogPortal, h as DialogTitle, c as DialogTrigger };
|
|
@@ -1,80 +1,121 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
|
-
import
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { Drawer as i } from "@base-ui/react/drawer";
|
|
6
6
|
//#region src/components/ui/drawer.tsx
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
var a = r.createContext(null);
|
|
8
|
+
function o() {
|
|
9
|
+
let e = r.useContext(a);
|
|
10
|
+
if (!e) throw Error("useDrawer must be used within a Drawer.");
|
|
11
|
+
return e;
|
|
12
|
+
}
|
|
13
|
+
function s({ modal: e = !0, showSwipeHandle: n = !1, snapPoints: o, swipeDirection: s = "down", ...c }) {
|
|
14
|
+
let l = o != null && o.length > 0, u = r.useMemo(() => ({
|
|
15
|
+
hasSnapPoints: l,
|
|
16
|
+
modal: e,
|
|
17
|
+
showSwipeHandle: n,
|
|
18
|
+
swipeDirection: s
|
|
19
|
+
}), [
|
|
20
|
+
l,
|
|
21
|
+
e,
|
|
22
|
+
n,
|
|
23
|
+
s
|
|
24
|
+
]);
|
|
25
|
+
return /* @__PURE__ */ t(a.Provider, {
|
|
26
|
+
value: u,
|
|
27
|
+
children: /* @__PURE__ */ t(i.Root, {
|
|
28
|
+
"data-slot": "drawer",
|
|
29
|
+
modal: e,
|
|
30
|
+
snapPoints: o,
|
|
31
|
+
swipeDirection: s,
|
|
32
|
+
...c
|
|
33
|
+
})
|
|
11
34
|
});
|
|
12
35
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */ t(
|
|
36
|
+
function c({ ...e }) {
|
|
37
|
+
return /* @__PURE__ */ t(i.Trigger, {
|
|
15
38
|
"data-slot": "drawer-trigger",
|
|
16
|
-
|
|
17
|
-
...i
|
|
39
|
+
...e
|
|
18
40
|
});
|
|
19
41
|
}
|
|
20
|
-
function
|
|
21
|
-
return /* @__PURE__ */ t(
|
|
42
|
+
function l({ ...e }) {
|
|
43
|
+
return /* @__PURE__ */ t(i.Portal, {
|
|
22
44
|
"data-slot": "drawer-portal",
|
|
23
45
|
...e
|
|
24
46
|
});
|
|
25
47
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */ t(
|
|
48
|
+
function u({ ...e }) {
|
|
49
|
+
return /* @__PURE__ */ t(i.Close, {
|
|
28
50
|
"data-slot": "drawer-close",
|
|
29
|
-
|
|
30
|
-
...i
|
|
51
|
+
...e
|
|
31
52
|
});
|
|
32
53
|
}
|
|
33
|
-
function
|
|
34
|
-
return /* @__PURE__ */ t(
|
|
54
|
+
function d({ className: n, ...r }) {
|
|
55
|
+
return /* @__PURE__ */ t(i.Backdrop, {
|
|
35
56
|
"data-slot": "drawer-overlay",
|
|
36
|
-
className: e("
|
|
37
|
-
...
|
|
57
|
+
className: e("fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute", n),
|
|
58
|
+
...r
|
|
38
59
|
});
|
|
39
60
|
}
|
|
40
|
-
function
|
|
41
|
-
return /* @__PURE__ */
|
|
61
|
+
function f({ className: n, ...r }) {
|
|
62
|
+
return /* @__PURE__ */ t("div", {
|
|
63
|
+
"data-slot": "drawer-swipe-handle",
|
|
64
|
+
"aria-hidden": "true",
|
|
65
|
+
className: e("relative z-10 flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-24 active:cursor-grabbing", n),
|
|
66
|
+
...r
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function p({ className: r, children: a, ...s }) {
|
|
70
|
+
let { hasSnapPoints: c, modal: u, showSwipeHandle: p, swipeDirection: m } = o(), h = m === "down" || m === "up" ? "y" : "x";
|
|
71
|
+
return /* @__PURE__ */ n(l, {
|
|
42
72
|
"data-slot": "drawer-portal",
|
|
43
|
-
children: [/* @__PURE__ */ t(
|
|
44
|
-
"data-slot": "drawer-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
children:
|
|
73
|
+
children: [u === !0 && /* @__PURE__ */ t(d, { "data-snap-points": c ? "" : void 0 }), /* @__PURE__ */ t(i.Viewport, {
|
|
74
|
+
"data-slot": "drawer-viewport",
|
|
75
|
+
"data-modal": u,
|
|
76
|
+
className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto",
|
|
77
|
+
children: /* @__PURE__ */ n(i.Popup, {
|
|
78
|
+
"data-slot": "drawer-popup",
|
|
79
|
+
"data-swipe-axis": h,
|
|
80
|
+
"data-snap-points": c ? "" : void 0,
|
|
81
|
+
className: e("group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col bg-popover text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [interpolate-size:allow-keywords] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b", "data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95", "after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover)) data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed) data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed) data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full", "[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%] data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)] data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh] data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]", "[--bleed:3rem] [--peek:1rem] [--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))] [--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--stack-shrink:calc(1-var(--stack-scale))] [--stack-step:0.05]", "data-ending-style:transform-(--closed-transform) data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-nested-drawer-swiping:duration-0 data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-starting-style:transform-(--closed-transform) data-swiping:duration-0 data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]", "data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)", "data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row", "data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)] data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)] data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]", "data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)] data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]", "data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)] data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]", r),
|
|
82
|
+
...s,
|
|
83
|
+
children: [p && /* @__PURE__ */ t(f, {}), /* @__PURE__ */ t(i.Content, {
|
|
84
|
+
"data-slot": "drawer-content",
|
|
85
|
+
className: e("flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"),
|
|
86
|
+
children: a
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
48
89
|
})]
|
|
49
90
|
});
|
|
50
91
|
}
|
|
51
|
-
function
|
|
92
|
+
function m({ className: n, ...r }) {
|
|
52
93
|
return /* @__PURE__ */ t("div", {
|
|
53
94
|
"data-slot": "drawer-header",
|
|
54
|
-
className: e("flex flex-col gap-0.5 p-4
|
|
95
|
+
className: e("flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-0.5 md:text-left", n),
|
|
55
96
|
...r
|
|
56
97
|
});
|
|
57
98
|
}
|
|
58
|
-
function
|
|
99
|
+
function h({ className: n, ...r }) {
|
|
59
100
|
return /* @__PURE__ */ t("div", {
|
|
60
101
|
"data-slot": "drawer-footer",
|
|
61
|
-
className: e("mt-auto flex flex-col gap-2 p-4", n),
|
|
102
|
+
className: e("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", n),
|
|
62
103
|
...r
|
|
63
104
|
});
|
|
64
105
|
}
|
|
65
|
-
function
|
|
66
|
-
return /* @__PURE__ */ t(
|
|
106
|
+
function g({ className: n, ...r }) {
|
|
107
|
+
return /* @__PURE__ */ t(i.Title, {
|
|
67
108
|
"data-slot": "drawer-title",
|
|
68
|
-
className: e("text-
|
|
69
|
-
...
|
|
109
|
+
className: e("font-heading text-base font-medium text-foreground", n),
|
|
110
|
+
...r
|
|
70
111
|
});
|
|
71
112
|
}
|
|
72
|
-
function
|
|
73
|
-
return /* @__PURE__ */ t(
|
|
113
|
+
function _({ className: n, ...r }) {
|
|
114
|
+
return /* @__PURE__ */ t(i.Description, {
|
|
74
115
|
"data-slot": "drawer-description",
|
|
75
|
-
className: e("text-
|
|
76
|
-
...
|
|
116
|
+
className: e("text-sm text-balance text-muted-foreground", n),
|
|
117
|
+
...r
|
|
77
118
|
});
|
|
78
119
|
}
|
|
79
120
|
//#endregion
|
|
80
|
-
export {
|
|
121
|
+
export { s as Drawer, u as DrawerClose, p as DrawerContent, _ as DrawerDescription, h as DrawerFooter, m as DrawerHeader, d as DrawerOverlay, l as DrawerPortal, f as DrawerSwipeHandle, g as DrawerTitle, c as DrawerTrigger };
|