@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,96 +1,138 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
3
|
-
import "react";
|
|
4
3
|
import { CheckIcon as t, ChevronDownIcon as n, ChevronUpIcon as r } from "lucide-react";
|
|
5
4
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
-
import * as o from "
|
|
5
|
+
import * as o from "react";
|
|
6
|
+
import { Select as s } from "@base-ui/react/select";
|
|
7
7
|
//#region src/components/ui/select.tsx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
var c = o.createContext(null);
|
|
9
|
+
function l({ children: e, ...t }) {
|
|
10
|
+
let [n, r] = o.useState({}), a = o.useCallback((e, t) => {
|
|
11
|
+
r((n) => n[e] === t ? n : {
|
|
12
|
+
...n,
|
|
13
|
+
[e]: t
|
|
14
|
+
});
|
|
15
|
+
}, []), l = o.useCallback((e) => n[e], [n]);
|
|
16
|
+
return /* @__PURE__ */ i(c.Provider, {
|
|
17
|
+
value: {
|
|
18
|
+
registerLabel: a,
|
|
19
|
+
getLabel: l
|
|
20
|
+
},
|
|
21
|
+
children: /* @__PURE__ */ i(s.Root, {
|
|
22
|
+
...t,
|
|
23
|
+
children: e
|
|
24
|
+
})
|
|
12
25
|
});
|
|
13
26
|
}
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */ i(
|
|
27
|
+
function u({ className: t, ...n }) {
|
|
28
|
+
return /* @__PURE__ */ i(s.Group, {
|
|
16
29
|
"data-slot": "select-group",
|
|
17
|
-
|
|
30
|
+
className: e("scroll-my-1 p-1", t),
|
|
31
|
+
...n
|
|
18
32
|
});
|
|
19
33
|
}
|
|
20
|
-
function
|
|
21
|
-
|
|
34
|
+
function d({ className: t, children: n, ...r }) {
|
|
35
|
+
let a = o.useContext(c);
|
|
36
|
+
return /* @__PURE__ */ i(s.Value, {
|
|
22
37
|
"data-slot": "select-value",
|
|
23
|
-
|
|
38
|
+
className: e("flex flex-1 text-left", t),
|
|
39
|
+
...r,
|
|
40
|
+
children: n || ((e) => {
|
|
41
|
+
if (!e) return null;
|
|
42
|
+
if (a) {
|
|
43
|
+
if (Array.isArray(e)) return e.map((e) => a.getLabel(e) || e).join(", ");
|
|
44
|
+
let t = a.getLabel(e);
|
|
45
|
+
if (t) return t;
|
|
46
|
+
}
|
|
47
|
+
return e;
|
|
48
|
+
})
|
|
24
49
|
});
|
|
25
50
|
}
|
|
26
|
-
function
|
|
27
|
-
return /* @__PURE__ */ a(
|
|
51
|
+
function f({ className: t, size: r = "default", children: o, ...c }) {
|
|
52
|
+
return /* @__PURE__ */ a(s.Trigger, {
|
|
28
53
|
"data-slot": "select-trigger",
|
|
29
54
|
"data-size": r,
|
|
30
|
-
className: e("
|
|
55
|
+
className: e("flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
31
56
|
...c,
|
|
32
|
-
children: [
|
|
33
|
-
asChild: !0,
|
|
34
|
-
children: /* @__PURE__ */ i(n, { className: "size-4 opacity-50" })
|
|
35
|
-
})]
|
|
57
|
+
children: [o, /* @__PURE__ */ i(s.Icon, { render: /* @__PURE__ */ i(n, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
|
|
36
58
|
});
|
|
37
59
|
}
|
|
38
|
-
function
|
|
39
|
-
return /* @__PURE__ */ i(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
60
|
+
function p({ className: t, children: n, side: r = "bottom", sideOffset: o = 4, align: c = "center", alignOffset: l = 0, alignItemWithTrigger: u = !0, ...d }) {
|
|
61
|
+
return /* @__PURE__ */ i(s.Portal, { children: /* @__PURE__ */ i(s.Positioner, {
|
|
62
|
+
side: r,
|
|
63
|
+
sideOffset: o,
|
|
64
|
+
align: c,
|
|
65
|
+
alignOffset: l,
|
|
66
|
+
alignItemWithTrigger: u,
|
|
67
|
+
className: "isolate z-50",
|
|
68
|
+
children: /* @__PURE__ */ a(s.Popup, {
|
|
69
|
+
"data-slot": "select-content",
|
|
70
|
+
"data-align-trigger": u,
|
|
71
|
+
className: e("relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-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),
|
|
72
|
+
...d,
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ i(_, {}),
|
|
75
|
+
/* @__PURE__ */ i(s.List, { children: n }),
|
|
76
|
+
/* @__PURE__ */ i(v, {})
|
|
77
|
+
]
|
|
78
|
+
})
|
|
52
79
|
}) });
|
|
53
80
|
}
|
|
54
|
-
function
|
|
55
|
-
return /* @__PURE__ */ i(
|
|
81
|
+
function m({ className: t, ...n }) {
|
|
82
|
+
return /* @__PURE__ */ i(s.GroupLabel, {
|
|
56
83
|
"data-slot": "select-label",
|
|
57
|
-
className: e("
|
|
84
|
+
className: e("px-1.5 py-1 text-xs text-muted-foreground", t),
|
|
58
85
|
...n
|
|
59
86
|
});
|
|
60
87
|
}
|
|
61
|
-
function
|
|
62
|
-
|
|
88
|
+
function h({ className: n, children: r, value: l, ...u }) {
|
|
89
|
+
let d = o.useContext(c), f = o.useRef(null);
|
|
90
|
+
return o.useEffect(() => {
|
|
91
|
+
if (l !== void 0 && f.current && d) {
|
|
92
|
+
let e = f.current.textContent;
|
|
93
|
+
e && d.registerLabel(l, e.trim());
|
|
94
|
+
}
|
|
95
|
+
}, [
|
|
96
|
+
l,
|
|
97
|
+
d,
|
|
98
|
+
r
|
|
99
|
+
]), /* @__PURE__ */ a(s.Item, {
|
|
100
|
+
value: l,
|
|
63
101
|
"data-slot": "select-item",
|
|
64
|
-
className: e("
|
|
65
|
-
...
|
|
66
|
-
children: [/* @__PURE__ */ i(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
102
|
+
className: e("relative flex w-full 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 not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", n),
|
|
103
|
+
...u,
|
|
104
|
+
children: [/* @__PURE__ */ i(s.ItemText, {
|
|
105
|
+
ref: f,
|
|
106
|
+
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
107
|
+
children: r
|
|
108
|
+
}), /* @__PURE__ */ i(s.ItemIndicator, {
|
|
109
|
+
render: /* @__PURE__ */ i("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" }),
|
|
110
|
+
children: /* @__PURE__ */ i(t, { className: "pointer-events-none" })
|
|
111
|
+
})]
|
|
70
112
|
});
|
|
71
113
|
}
|
|
72
|
-
function
|
|
73
|
-
return /* @__PURE__ */ i(
|
|
114
|
+
function g({ className: t, ...n }) {
|
|
115
|
+
return /* @__PURE__ */ i(s.Separator, {
|
|
74
116
|
"data-slot": "select-separator",
|
|
75
|
-
className: e("
|
|
117
|
+
className: e("pointer-events-none -mx-1 my-1 h-px bg-border", t),
|
|
76
118
|
...n
|
|
77
119
|
});
|
|
78
120
|
}
|
|
79
|
-
function
|
|
80
|
-
return /* @__PURE__ */ i(
|
|
121
|
+
function _({ className: t, ...n }) {
|
|
122
|
+
return /* @__PURE__ */ i(s.ScrollUpArrow, {
|
|
81
123
|
"data-slot": "select-scroll-up-button",
|
|
82
|
-
className: e("flex cursor-pointer items-center justify-center py-1", t),
|
|
124
|
+
className: e("top-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", t),
|
|
83
125
|
...n,
|
|
84
|
-
children: /* @__PURE__ */ i(r, {
|
|
126
|
+
children: /* @__PURE__ */ i(r, {})
|
|
85
127
|
});
|
|
86
128
|
}
|
|
87
|
-
function
|
|
88
|
-
return /* @__PURE__ */ i(
|
|
129
|
+
function v({ className: t, ...r }) {
|
|
130
|
+
return /* @__PURE__ */ i(s.ScrollDownArrow, {
|
|
89
131
|
"data-slot": "select-scroll-down-button",
|
|
90
|
-
className: e("flex cursor-pointer items-center justify-center py-1", t),
|
|
132
|
+
className: e("bottom-0 z-10 flex w-full cursor-pointer items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", t),
|
|
91
133
|
...r,
|
|
92
|
-
children: /* @__PURE__ */ i(n, {
|
|
134
|
+
children: /* @__PURE__ */ i(n, {})
|
|
93
135
|
});
|
|
94
136
|
}
|
|
95
137
|
//#endregion
|
|
96
|
-
export {
|
|
138
|
+
export { l as Select, p as SelectContent, u as SelectGroup, h as SelectItem, m as SelectLabel, v as SelectScrollDownButton, _ as SelectScrollUpButton, g as SelectSeparator, f as SelectTrigger, d as SelectValue };
|
|
@@ -1,16 +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 { Separator as n } from "@base-ui/react/separator";
|
|
6
5
|
//#region src/components/ui/separator.tsx
|
|
7
|
-
function r({ className: r, orientation: i = "horizontal",
|
|
8
|
-
return /* @__PURE__ */ t(n
|
|
6
|
+
function r({ className: r, orientation: i = "horizontal", ...a }) {
|
|
7
|
+
return /* @__PURE__ */ t(n, {
|
|
9
8
|
"data-slot": "separator",
|
|
10
|
-
decorative: a,
|
|
11
9
|
orientation: i,
|
|
12
|
-
className: e("bg-border
|
|
13
|
-
...
|
|
10
|
+
className: e("shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch", r),
|
|
11
|
+
...a
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
14
|
//#endregion
|
|
@@ -1,84 +1,89 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../lib/utils.js";
|
|
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";
|
|
3
6
|
import "react";
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
-
import * as i from "@radix-ui/react-dialog";
|
|
7
|
+
import { Dialog as a } from "@base-ui/react/dialog";
|
|
7
8
|
//#region src/components/ui/sheet.tsx
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
9
|
+
function o({ ...e }) {
|
|
10
|
+
return /* @__PURE__ */ r(a.Root, {
|
|
10
11
|
"data-slot": "sheet",
|
|
11
12
|
...e
|
|
12
13
|
});
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */
|
|
15
|
+
function s({ ...e }) {
|
|
16
|
+
return /* @__PURE__ */ r(a.Trigger, {
|
|
16
17
|
"data-slot": "sheet-trigger",
|
|
17
|
-
|
|
18
|
-
...r
|
|
18
|
+
...e
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return /* @__PURE__ */
|
|
21
|
+
function c({ ...e }) {
|
|
22
|
+
return /* @__PURE__ */ r(a.Close, {
|
|
23
23
|
"data-slot": "sheet-close",
|
|
24
|
-
|
|
25
|
-
...r
|
|
24
|
+
...e
|
|
26
25
|
});
|
|
27
26
|
}
|
|
28
|
-
function
|
|
29
|
-
return /* @__PURE__ */
|
|
27
|
+
function l({ ...e }) {
|
|
28
|
+
return /* @__PURE__ */ r(a.Portal, {
|
|
30
29
|
"data-slot": "sheet-portal",
|
|
31
30
|
...e
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
|
-
function
|
|
35
|
-
return /* @__PURE__ */
|
|
33
|
+
function u({ className: t, ...n }) {
|
|
34
|
+
return /* @__PURE__ */ r(a.Backdrop, {
|
|
36
35
|
"data-slot": "sheet-overlay",
|
|
37
|
-
className: e("
|
|
38
|
-
...
|
|
36
|
+
className: e("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", t),
|
|
37
|
+
...n
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
|
-
function
|
|
42
|
-
return /* @__PURE__ */
|
|
40
|
+
function d({ className: o, children: s, side: c = "right", showCloseButton: d = !0, ...f }) {
|
|
41
|
+
return /* @__PURE__ */ i(l, { children: [/* @__PURE__ */ r(u, {}), /* @__PURE__ */ i(a.Popup, {
|
|
43
42
|
"data-slot": "sheet-content",
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
"data-side": c,
|
|
44
|
+
className: e("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", o),
|
|
45
|
+
...f,
|
|
46
|
+
children: [s, d && /* @__PURE__ */ i(a.Close, {
|
|
47
|
+
"data-slot": "sheet-close",
|
|
48
|
+
render: /* @__PURE__ */ r(t, {
|
|
49
|
+
variant: "ghost",
|
|
50
|
+
className: "absolute top-3 right-3",
|
|
51
|
+
size: "icon-sm"
|
|
52
|
+
}),
|
|
53
|
+
children: [/* @__PURE__ */ r(n, {}), /* @__PURE__ */ r("span", {
|
|
49
54
|
className: "sr-only",
|
|
50
55
|
children: "Close"
|
|
51
56
|
})]
|
|
52
57
|
})]
|
|
53
58
|
})] });
|
|
54
59
|
}
|
|
55
|
-
function
|
|
56
|
-
return /* @__PURE__ */
|
|
60
|
+
function f({ className: t, ...n }) {
|
|
61
|
+
return /* @__PURE__ */ r("div", {
|
|
57
62
|
"data-slot": "sheet-header",
|
|
58
|
-
className: e("flex flex-col gap-
|
|
59
|
-
...
|
|
63
|
+
className: e("flex flex-col gap-0.5 p-4", t),
|
|
64
|
+
...n
|
|
60
65
|
});
|
|
61
66
|
}
|
|
62
|
-
function
|
|
63
|
-
return /* @__PURE__ */
|
|
67
|
+
function p({ className: t, ...n }) {
|
|
68
|
+
return /* @__PURE__ */ r("div", {
|
|
64
69
|
"data-slot": "sheet-footer",
|
|
65
70
|
className: e("mt-auto flex flex-col gap-2 p-4", t),
|
|
66
|
-
...
|
|
71
|
+
...n
|
|
67
72
|
});
|
|
68
73
|
}
|
|
69
|
-
function
|
|
70
|
-
return /* @__PURE__ */
|
|
74
|
+
function m({ className: t, ...n }) {
|
|
75
|
+
return /* @__PURE__ */ r(a.Title, {
|
|
71
76
|
"data-slot": "sheet-title",
|
|
72
|
-
className: e("text-
|
|
73
|
-
...
|
|
77
|
+
className: e("font-heading text-base font-medium text-foreground", t),
|
|
78
|
+
...n
|
|
74
79
|
});
|
|
75
80
|
}
|
|
76
|
-
function
|
|
77
|
-
return /* @__PURE__ */
|
|
81
|
+
function h({ className: t, ...n }) {
|
|
82
|
+
return /* @__PURE__ */ r(a.Description, {
|
|
78
83
|
"data-slot": "sheet-description",
|
|
79
|
-
className: e("text-muted-foreground
|
|
80
|
-
...
|
|
84
|
+
className: e("text-sm text-muted-foreground", t),
|
|
85
|
+
...n
|
|
81
86
|
});
|
|
82
87
|
}
|
|
83
88
|
//#endregion
|
|
84
|
-
export {
|
|
89
|
+
export { o as Sheet, c as SheetClose, d as SheetContent, h as SheetDescription, p as SheetFooter, f as SheetHeader, m as SheetTitle, s as SheetTrigger };
|