laif-ds 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/accordion.js +16 -16
- package/dist/components/ui/alert-dialog.js +2 -2
- package/dist/components/ui/alert.js +5 -5
- package/dist/components/ui/async-select.js +39 -39
- package/dist/components/ui/audio-visualizer.js +7 -7
- package/dist/components/ui/avatar.js +3 -3
- package/dist/components/ui/badge.js +12 -12
- package/dist/components/ui/breadcrumb.js +1 -1
- package/dist/components/ui/button.js +31 -28
- package/dist/components/ui/calendar.js +23 -23
- package/dist/components/ui/card.js +6 -6
- package/dist/components/ui/chart.js +40 -40
- package/dist/components/ui/chat-message.js +59 -59
- package/dist/components/ui/checkbox.js +7 -7
- package/dist/components/ui/command.js +35 -35
- package/dist/components/ui/context-menu.js +16 -16
- package/dist/components/ui/data-table.js +2 -2
- package/dist/components/ui/date-picker.js +14 -14
- package/dist/components/ui/dialog.js +11 -11
- package/dist/components/ui/drawer.js +5 -5
- package/dist/components/ui/file-preview.js +14 -14
- package/dist/components/ui/form.js +18 -18
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +6 -6
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +9 -9
- package/dist/components/ui/hover-card.js +5 -5
- package/dist/components/ui/input-otp.js +5 -5
- package/dist/components/ui/input-selector.js +11 -11
- package/dist/components/ui/input.js +25 -25
- package/dist/components/ui/interrupt-prompt.js +1 -1
- package/dist/components/ui/markdown-renderer.js +19 -19
- package/dist/components/ui/menubar.js +16 -16
- package/dist/components/ui/message-input.js +29 -29
- package/dist/components/ui/multiple-selector.js +92 -92
- package/dist/components/ui/navigation-menu.js +13 -13
- package/dist/components/ui/popover.js +1 -1
- package/dist/components/ui/progress.js +4 -4
- package/dist/components/ui/prompt-suggestions.js +9 -9
- package/dist/components/ui/radio-group.js +5 -5
- package/dist/components/ui/resizable.js +2 -2
- package/dist/components/ui/scroll-area.js +7 -7
- package/dist/components/ui/select.js +10 -10
- package/dist/components/ui/separator.js +3 -3
- package/dist/components/ui/sheet.js +8 -8
- package/dist/components/ui/sidebar.js +134 -134
- package/dist/components/ui/skeleton.js +1 -1
- package/dist/components/ui/switch.js +5 -5
- package/dist/components/ui/table.js +3 -3
- package/dist/components/ui/tabs.js +2 -2
- package/dist/components/ui/textarea.js +7 -7
- package/dist/components/ui/toaster.js +12 -12
- package/dist/components/ui/toggle.js +2 -2
- package/dist/components/ui/tooltip.js +2 -2
- package/dist/components/ui/typing-indicator.js +8 -8
- package/dist/components/ui/typo.js +9 -9
- package/dist/dist/components/ui/checkbox.js +5 -5
- package/dist/dist/components/ui/scroll-area.js +2 -2
- package/dist/dist/components/ui/table.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/styles.css +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import * as l from "react";
|
|
|
4
4
|
import { Root as h } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
5
5
|
import { cva as k } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
6
6
|
import { useIsMobile as z } from "../../hooks/use-mobile.js";
|
|
7
|
-
import { cn as
|
|
7
|
+
import { cn as d } from "../../lib/utils.js";
|
|
8
8
|
import { Button as I } from "./button.js";
|
|
9
9
|
import { Input as E } from "./input.js";
|
|
10
10
|
import { Separator as D } from "./separator.js";
|
|
@@ -19,28 +19,28 @@ function S() {
|
|
|
19
19
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
20
20
|
return a;
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function oe({
|
|
23
23
|
defaultOpen: a = !0,
|
|
24
24
|
open: e,
|
|
25
|
-
onOpenChange:
|
|
26
|
-
className:
|
|
27
|
-
style:
|
|
25
|
+
onOpenChange: r,
|
|
26
|
+
className: i,
|
|
27
|
+
style: n,
|
|
28
28
|
children: u,
|
|
29
29
|
...m
|
|
30
30
|
}) {
|
|
31
31
|
const s = z(), [f, c] = l.useState(!1), [v, M] = l.useState(a), g = e ?? v, x = l.useCallback(
|
|
32
|
-
(
|
|
33
|
-
const b = typeof
|
|
34
|
-
|
|
32
|
+
(o) => {
|
|
33
|
+
const b = typeof o == "function" ? o(g) : o;
|
|
34
|
+
r ? r(b) : M(b), typeof document < "u" && (document.cookie = `${$}=${b}; path=/; max-age=${P}`);
|
|
35
35
|
},
|
|
36
|
-
[
|
|
37
|
-
), w = l.useCallback(() => s ? c((
|
|
36
|
+
[r, g]
|
|
37
|
+
), w = l.useCallback(() => s ? c((o) => !o) : x((o) => !o), [s, x, c]);
|
|
38
38
|
l.useEffect(() => {
|
|
39
|
-
const
|
|
39
|
+
const o = (b) => {
|
|
40
40
|
b.key === F && (b.metaKey || b.ctrlKey) && (b.preventDefault(), w());
|
|
41
41
|
};
|
|
42
42
|
if (typeof window < "u")
|
|
43
|
-
return window.addEventListener("keydown",
|
|
43
|
+
return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
|
|
44
44
|
}, [w]);
|
|
45
45
|
const y = g ? "expanded" : "collapsed", C = l.useMemo(
|
|
46
46
|
() => ({
|
|
@@ -59,13 +59,13 @@ function de({
|
|
|
59
59
|
{
|
|
60
60
|
"data-slot": "sidebar-wrapper",
|
|
61
61
|
style: {
|
|
62
|
-
"--sidebar-width": V,
|
|
63
|
-
"--sidebar-width-icon": q,
|
|
64
|
-
...
|
|
62
|
+
"--d-sidebar-width": V,
|
|
63
|
+
"--d-sidebar-width-icon": q,
|
|
64
|
+
...n
|
|
65
65
|
},
|
|
66
|
-
className:
|
|
67
|
-
"group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
|
|
68
|
-
|
|
66
|
+
className: d(
|
|
67
|
+
"group/sidebar-wrapper has-data-[variant=inset]:bg-d-sidebar flex min-h-svh w-full",
|
|
68
|
+
i
|
|
69
69
|
),
|
|
70
70
|
...m,
|
|
71
71
|
children: u
|
|
@@ -75,32 +75,32 @@ function de({
|
|
|
75
75
|
function se({
|
|
76
76
|
side: a = "left",
|
|
77
77
|
variant: e = "sidebar",
|
|
78
|
-
collapsible:
|
|
79
|
-
className:
|
|
80
|
-
children:
|
|
78
|
+
collapsible: r = "offcanvas",
|
|
79
|
+
className: i,
|
|
80
|
+
children: n,
|
|
81
81
|
...u
|
|
82
82
|
}) {
|
|
83
83
|
const { isMobile: m, state: s, openMobile: f, setOpenMobile: c } = S();
|
|
84
|
-
return
|
|
84
|
+
return r === "none" ? /* @__PURE__ */ t(
|
|
85
85
|
"div",
|
|
86
86
|
{
|
|
87
87
|
"data-slot": "sidebar",
|
|
88
|
-
className:
|
|
89
|
-
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
90
|
-
|
|
88
|
+
className: d(
|
|
89
|
+
"bg-d-sidebar text-d-sidebar-foreground flex h-full w-(--d-sidebar-width) flex-col",
|
|
90
|
+
i
|
|
91
91
|
),
|
|
92
92
|
...u,
|
|
93
|
-
children:
|
|
93
|
+
children: n
|
|
94
94
|
}
|
|
95
95
|
) : m ? /* @__PURE__ */ t(T, { open: f, onOpenChange: c, ...u, children: /* @__PURE__ */ p(
|
|
96
96
|
B,
|
|
97
97
|
{
|
|
98
|
-
"data-sidebar": "sidebar",
|
|
98
|
+
"data-d-sidebar": "sidebar",
|
|
99
99
|
"data-slot": "sidebar",
|
|
100
100
|
"data-mobile": "true",
|
|
101
|
-
className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
|
|
101
|
+
className: "bg-d-sidebar text-d-sidebar-foreground w-(--d-sidebar-width) p-0 [&>button]:hidden",
|
|
102
102
|
style: {
|
|
103
|
-
"--sidebar-width": W
|
|
103
|
+
"--d-sidebar-width": W
|
|
104
104
|
},
|
|
105
105
|
side: a,
|
|
106
106
|
children: [
|
|
@@ -108,15 +108,15 @@ function se({
|
|
|
108
108
|
/* @__PURE__ */ t(O, { children: "Sidebar" }),
|
|
109
109
|
/* @__PURE__ */ t(R, { children: "Displays the mobile sidebar." })
|
|
110
110
|
] }),
|
|
111
|
-
/* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col", children:
|
|
111
|
+
/* @__PURE__ */ t("div", { className: "flex h-full w-full flex-col", children: n })
|
|
112
112
|
]
|
|
113
113
|
}
|
|
114
114
|
) }) : /* @__PURE__ */ p(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
|
-
className: "group peer text-sidebar-foreground hidden md:block",
|
|
117
|
+
className: "group peer text-d-sidebar-foreground hidden md:block",
|
|
118
118
|
"data-state": s,
|
|
119
|
-
"data-collapsible": s === "collapsed" ?
|
|
119
|
+
"data-collapsible": s === "collapsed" ? r : "",
|
|
120
120
|
"data-variant": e,
|
|
121
121
|
"data-side": a,
|
|
122
122
|
"data-slot": "sidebar",
|
|
@@ -125,11 +125,11 @@ function se({
|
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
127
|
"data-slot": "sidebar-gap",
|
|
128
|
-
className:
|
|
129
|
-
"relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
128
|
+
className: d(
|
|
129
|
+
"relative w-(--d-sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
|
|
130
130
|
"group-data-[collapsible=offcanvas]:w-0",
|
|
131
131
|
"group-data-[side=right]:rotate-180",
|
|
132
|
-
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
|
|
132
|
+
e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--d-sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--d-sidebar-width-icon)"
|
|
133
133
|
)
|
|
134
134
|
}
|
|
135
135
|
),
|
|
@@ -137,21 +137,21 @@ function se({
|
|
|
137
137
|
"div",
|
|
138
138
|
{
|
|
139
139
|
"data-slot": "sidebar-container",
|
|
140
|
-
className:
|
|
141
|
-
"fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
142
|
-
a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
140
|
+
className: d(
|
|
141
|
+
"fixed inset-y-0 z-10 hidden h-svh w-(--d-sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
|
|
142
|
+
a === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--d-sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--d-sidebar-width)*-1)]",
|
|
143
143
|
// Adjust the padding for floating and inset variants.
|
|
144
|
-
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
145
|
-
|
|
144
|
+
e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--d-sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--d-sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
145
|
+
i
|
|
146
146
|
),
|
|
147
147
|
...u,
|
|
148
148
|
children: /* @__PURE__ */ t(
|
|
149
149
|
"div",
|
|
150
150
|
{
|
|
151
|
-
"data-sidebar": "sidebar",
|
|
151
|
+
"data-d-sidebar": "sidebar",
|
|
152
152
|
"data-slot": "sidebar-inner",
|
|
153
|
-
className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
154
|
-
children:
|
|
153
|
+
className: "bg-d-sidebar group-data-[variant=floating]:border-d-sidebar-d-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
|
|
154
|
+
children: n
|
|
155
155
|
}
|
|
156
156
|
)
|
|
157
157
|
}
|
|
@@ -163,21 +163,21 @@ function se({
|
|
|
163
163
|
function le({
|
|
164
164
|
className: a,
|
|
165
165
|
onClick: e,
|
|
166
|
-
...
|
|
166
|
+
...r
|
|
167
167
|
}) {
|
|
168
|
-
const { toggleSidebar:
|
|
168
|
+
const { toggleSidebar: i } = S();
|
|
169
169
|
return /* @__PURE__ */ p(
|
|
170
170
|
I,
|
|
171
171
|
{
|
|
172
|
-
"data-sidebar": "trigger",
|
|
172
|
+
"data-d-sidebar": "trigger",
|
|
173
173
|
"data-slot": "sidebar-trigger",
|
|
174
174
|
variant: "ghost",
|
|
175
175
|
size: "icon",
|
|
176
|
-
className:
|
|
177
|
-
onClick: (
|
|
178
|
-
e == null || e(
|
|
176
|
+
className: d("size-7", a),
|
|
177
|
+
onClick: (n) => {
|
|
178
|
+
e == null || e(n), i();
|
|
179
179
|
},
|
|
180
|
-
...
|
|
180
|
+
...r,
|
|
181
181
|
children: [
|
|
182
182
|
/* @__PURE__ */ t(L, {}),
|
|
183
183
|
/* @__PURE__ */ t("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
@@ -186,21 +186,21 @@ function le({
|
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
188
|
function ue({ className: a, ...e }) {
|
|
189
|
-
const { toggleSidebar:
|
|
189
|
+
const { toggleSidebar: r } = S();
|
|
190
190
|
return /* @__PURE__ */ t(
|
|
191
191
|
"button",
|
|
192
192
|
{
|
|
193
|
-
"data-sidebar": "rail",
|
|
193
|
+
"data-d-sidebar": "rail",
|
|
194
194
|
"data-slot": "sidebar-rail",
|
|
195
195
|
"aria-label": "Toggle Sidebar",
|
|
196
196
|
tabIndex: -1,
|
|
197
|
-
onClick:
|
|
197
|
+
onClick: r,
|
|
198
198
|
title: "Toggle Sidebar",
|
|
199
|
-
className:
|
|
200
|
-
"hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
199
|
+
className: d(
|
|
200
|
+
"hover:after:bg-d-sidebar-d-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
|
|
201
201
|
"in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
|
|
202
202
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
203
|
-
"hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
203
|
+
"hover:group-data-[collapsible=offcanvas]:bg-d-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
|
|
204
204
|
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
|
|
205
205
|
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
|
|
206
206
|
a
|
|
@@ -214,8 +214,8 @@ function ce({ className: a, ...e }) {
|
|
|
214
214
|
"main",
|
|
215
215
|
{
|
|
216
216
|
"data-slot": "sidebar-inset",
|
|
217
|
-
className:
|
|
218
|
-
"bg-background relative flex w-full flex-1 flex-col",
|
|
217
|
+
className: d(
|
|
218
|
+
"bg-d-background relative flex w-full flex-1 flex-col",
|
|
219
219
|
"md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
|
|
220
220
|
a
|
|
221
221
|
),
|
|
@@ -230,9 +230,9 @@ function be({
|
|
|
230
230
|
return /* @__PURE__ */ t(
|
|
231
231
|
E,
|
|
232
232
|
{
|
|
233
|
-
"data-slot": "sidebar-input",
|
|
234
|
-
"data-sidebar": "input",
|
|
235
|
-
className:
|
|
233
|
+
"data-slot": "sidebar-d-input",
|
|
234
|
+
"data-d-sidebar": "input",
|
|
235
|
+
className: d("bg-d-background h-8 w-full shadow-none", a),
|
|
236
236
|
...e
|
|
237
237
|
}
|
|
238
238
|
);
|
|
@@ -242,8 +242,8 @@ function fe({ className: a, ...e }) {
|
|
|
242
242
|
"div",
|
|
243
243
|
{
|
|
244
244
|
"data-slot": "sidebar-header",
|
|
245
|
-
"data-sidebar": "header",
|
|
246
|
-
className:
|
|
245
|
+
"data-d-sidebar": "header",
|
|
246
|
+
className: d("flex flex-col gap-2 p-2", a),
|
|
247
247
|
...e
|
|
248
248
|
}
|
|
249
249
|
);
|
|
@@ -253,8 +253,8 @@ function pe({ className: a, ...e }) {
|
|
|
253
253
|
"div",
|
|
254
254
|
{
|
|
255
255
|
"data-slot": "sidebar-footer",
|
|
256
|
-
"data-sidebar": "footer",
|
|
257
|
-
className:
|
|
256
|
+
"data-d-sidebar": "footer",
|
|
257
|
+
className: d("flex flex-col gap-2 p-2", a),
|
|
258
258
|
...e
|
|
259
259
|
}
|
|
260
260
|
);
|
|
@@ -267,8 +267,8 @@ function me({
|
|
|
267
267
|
D,
|
|
268
268
|
{
|
|
269
269
|
"data-slot": "sidebar-separator",
|
|
270
|
-
"data-sidebar": "separator",
|
|
271
|
-
className:
|
|
270
|
+
"data-d-sidebar": "separator",
|
|
271
|
+
className: d("bg-d-sidebar-d-border mx-2 w-auto", a),
|
|
272
272
|
...e
|
|
273
273
|
}
|
|
274
274
|
);
|
|
@@ -278,8 +278,8 @@ function ge({ className: a, ...e }) {
|
|
|
278
278
|
"div",
|
|
279
279
|
{
|
|
280
280
|
"data-slot": "sidebar-content",
|
|
281
|
-
"data-sidebar": "content",
|
|
282
|
-
className:
|
|
281
|
+
"data-d-sidebar": "content",
|
|
282
|
+
className: d(
|
|
283
283
|
"flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
284
284
|
a
|
|
285
285
|
),
|
|
@@ -292,8 +292,8 @@ function he({ className: a, ...e }) {
|
|
|
292
292
|
"div",
|
|
293
293
|
{
|
|
294
294
|
"data-slot": "sidebar-group",
|
|
295
|
-
"data-sidebar": "group",
|
|
296
|
-
className:
|
|
295
|
+
"data-d-sidebar": "group",
|
|
296
|
+
className: d("relative flex w-full min-w-0 flex-col p-2", a),
|
|
297
297
|
...e
|
|
298
298
|
}
|
|
299
299
|
);
|
|
@@ -301,40 +301,40 @@ function he({ className: a, ...e }) {
|
|
|
301
301
|
function ve({
|
|
302
302
|
className: a,
|
|
303
303
|
asChild: e = !1,
|
|
304
|
-
...
|
|
304
|
+
...r
|
|
305
305
|
}) {
|
|
306
306
|
return /* @__PURE__ */ t(
|
|
307
307
|
e ? h : "div",
|
|
308
308
|
{
|
|
309
309
|
"data-slot": "sidebar-group-label",
|
|
310
|
-
"data-sidebar": "group-label",
|
|
311
|
-
className:
|
|
312
|
-
"text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
310
|
+
"data-d-sidebar": "group-label",
|
|
311
|
+
className: d(
|
|
312
|
+
"text-d-sidebar-foreground/70 ring-d-sidebar-d-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
313
313
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
314
314
|
a
|
|
315
315
|
),
|
|
316
|
-
...
|
|
316
|
+
...r
|
|
317
317
|
}
|
|
318
318
|
);
|
|
319
319
|
}
|
|
320
320
|
function xe({
|
|
321
321
|
className: a,
|
|
322
322
|
asChild: e = !1,
|
|
323
|
-
...
|
|
323
|
+
...r
|
|
324
324
|
}) {
|
|
325
325
|
return /* @__PURE__ */ t(
|
|
326
326
|
e ? h : "button",
|
|
327
327
|
{
|
|
328
328
|
"data-slot": "sidebar-group-action",
|
|
329
|
-
"data-sidebar": "group-action",
|
|
330
|
-
className:
|
|
331
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
329
|
+
"data-d-sidebar": "group-action",
|
|
330
|
+
className: d(
|
|
331
|
+
"text-d-sidebar-foreground ring-d-sidebar-d-ring hover:bg-d-sidebar-d-accent hover:text-d-sidebar-d-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
332
332
|
// Increases the hit area of the button on mobile.
|
|
333
333
|
"after:absolute after:-inset-2 md:after:hidden",
|
|
334
334
|
"group-data-[collapsible=icon]:hidden",
|
|
335
335
|
a
|
|
336
336
|
),
|
|
337
|
-
...
|
|
337
|
+
...r
|
|
338
338
|
}
|
|
339
339
|
);
|
|
340
340
|
}
|
|
@@ -346,8 +346,8 @@ function we({
|
|
|
346
346
|
"div",
|
|
347
347
|
{
|
|
348
348
|
"data-slot": "sidebar-group-content",
|
|
349
|
-
"data-sidebar": "group-content",
|
|
350
|
-
className:
|
|
349
|
+
"data-d-sidebar": "group-content",
|
|
350
|
+
className: d("w-full text-sm", a),
|
|
351
351
|
...e
|
|
352
352
|
}
|
|
353
353
|
);
|
|
@@ -357,8 +357,8 @@ function Se({ className: a, ...e }) {
|
|
|
357
357
|
"ul",
|
|
358
358
|
{
|
|
359
359
|
"data-slot": "sidebar-menu",
|
|
360
|
-
"data-sidebar": "menu",
|
|
361
|
-
className:
|
|
360
|
+
"data-d-sidebar": "menu",
|
|
361
|
+
className: d("flex w-full min-w-0 flex-col gap-1", a),
|
|
362
362
|
...e
|
|
363
363
|
}
|
|
364
364
|
);
|
|
@@ -368,19 +368,19 @@ function ye({ className: a, ...e }) {
|
|
|
368
368
|
"li",
|
|
369
369
|
{
|
|
370
370
|
"data-slot": "sidebar-menu-item",
|
|
371
|
-
"data-sidebar": "menu-item",
|
|
372
|
-
className:
|
|
371
|
+
"data-d-sidebar": "menu-item",
|
|
372
|
+
className: d("group/menu-item relative", a),
|
|
373
373
|
...e
|
|
374
374
|
}
|
|
375
375
|
);
|
|
376
376
|
}
|
|
377
377
|
const U = k(
|
|
378
|
-
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
378
|
+
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-d-sidebar-d-ring transition-[width,height,padding] hover:bg-d-sidebar-d-accent hover:text-d-sidebar-d-accent-foreground focus-visible:ring-2 active:bg-d-sidebar-d-accent active:text-d-sidebar-d-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-d-sidebar-d-accent data-[active=true]:font-medium data-[active=true]:text-d-sidebar-d-accent-foreground data-[state=open]:hover:bg-d-sidebar-d-accent data-[state=open]:hover:text-d-sidebar-d-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
379
379
|
{
|
|
380
380
|
variants: {
|
|
381
381
|
variant: {
|
|
382
|
-
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
383
|
-
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
|
|
382
|
+
default: "hover:bg-d-sidebar-d-accent hover:text-d-sidebar-d-accent-foreground",
|
|
383
|
+
outline: "bg-d-background shadow-[0_0_0_1px_hsl(var(--d-sidebar-d-border))] hover:bg-d-sidebar-d-accent hover:text-d-sidebar-d-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--d-sidebar-d-accent))]"
|
|
384
384
|
},
|
|
385
385
|
size: {
|
|
386
386
|
default: "h-8 text-sm",
|
|
@@ -397,9 +397,9 @@ const U = k(
|
|
|
397
397
|
function Ne({
|
|
398
398
|
asChild: a = !1,
|
|
399
399
|
isActive: e = !1,
|
|
400
|
-
variant:
|
|
401
|
-
size:
|
|
402
|
-
tooltip:
|
|
400
|
+
variant: r = "default",
|
|
401
|
+
size: i = "default",
|
|
402
|
+
tooltip: n,
|
|
403
403
|
className: u,
|
|
404
404
|
...m
|
|
405
405
|
}) {
|
|
@@ -407,15 +407,15 @@ function Ne({
|
|
|
407
407
|
s,
|
|
408
408
|
{
|
|
409
409
|
"data-slot": "sidebar-menu-button",
|
|
410
|
-
"data-sidebar": "menu-button",
|
|
411
|
-
"data-size":
|
|
410
|
+
"data-d-sidebar": "menu-button",
|
|
411
|
+
"data-size": i,
|
|
412
412
|
"data-active": e,
|
|
413
|
-
className:
|
|
413
|
+
className: d(U({ variant: r, size: i }), u),
|
|
414
414
|
...m
|
|
415
415
|
}
|
|
416
416
|
);
|
|
417
|
-
return
|
|
418
|
-
children:
|
|
417
|
+
return n ? (typeof n == "string" && (n = {
|
|
418
|
+
children: n
|
|
419
419
|
}), /* @__PURE__ */ p(H, { children: [
|
|
420
420
|
/* @__PURE__ */ t(K, { asChild: !0, children: v }),
|
|
421
421
|
/* @__PURE__ */ t(
|
|
@@ -424,7 +424,7 @@ function Ne({
|
|
|
424
424
|
side: "right",
|
|
425
425
|
align: "center",
|
|
426
426
|
hidden: c !== "collapsed" || f,
|
|
427
|
-
...
|
|
427
|
+
...n
|
|
428
428
|
}
|
|
429
429
|
)
|
|
430
430
|
] })) : v;
|
|
@@ -432,26 +432,26 @@ function Ne({
|
|
|
432
432
|
function _e({
|
|
433
433
|
className: a,
|
|
434
434
|
asChild: e = !1,
|
|
435
|
-
showOnHover:
|
|
436
|
-
...
|
|
435
|
+
showOnHover: r = !1,
|
|
436
|
+
...i
|
|
437
437
|
}) {
|
|
438
438
|
return /* @__PURE__ */ t(
|
|
439
439
|
e ? h : "button",
|
|
440
440
|
{
|
|
441
441
|
"data-slot": "sidebar-menu-action",
|
|
442
|
-
"data-sidebar": "menu-action",
|
|
443
|
-
className:
|
|
444
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
442
|
+
"data-d-sidebar": "menu-action",
|
|
443
|
+
className: d(
|
|
444
|
+
"text-d-sidebar-foreground ring-d-sidebar-d-ring hover:bg-d-sidebar-d-accent hover:text-d-sidebar-d-accent-foreground peer-hover/menu-button:text-d-sidebar-d-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
445
445
|
// Increases the hit area of the button on mobile.
|
|
446
446
|
"after:absolute after:-inset-2 md:after:hidden",
|
|
447
447
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
448
448
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
449
449
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
450
450
|
"group-data-[collapsible=icon]:hidden",
|
|
451
|
-
|
|
451
|
+
r && "peer-data-[active=true]/menu-button:text-d-sidebar-d-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
|
|
452
452
|
a
|
|
453
453
|
),
|
|
454
|
-
...
|
|
454
|
+
...i
|
|
455
455
|
}
|
|
456
456
|
);
|
|
457
457
|
}
|
|
@@ -463,10 +463,10 @@ function Me({
|
|
|
463
463
|
"div",
|
|
464
464
|
{
|
|
465
465
|
"data-slot": "sidebar-menu-badge",
|
|
466
|
-
"data-sidebar": "menu-badge",
|
|
467
|
-
className:
|
|
468
|
-
"text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
469
|
-
"peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
|
|
466
|
+
"data-d-sidebar": "menu-badge",
|
|
467
|
+
className: d(
|
|
468
|
+
"text-d-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
|
|
469
|
+
"peer-hover/menu-button:text-d-sidebar-d-accent-foreground peer-data-[active=true]/menu-button:text-d-sidebar-d-accent-foreground",
|
|
470
470
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
471
471
|
"peer-data-[size=default]/menu-button:top-1.5",
|
|
472
472
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
@@ -480,31 +480,31 @@ function Me({
|
|
|
480
480
|
function Ce({
|
|
481
481
|
className: a,
|
|
482
482
|
showIcon: e = !1,
|
|
483
|
-
...
|
|
483
|
+
...r
|
|
484
484
|
}) {
|
|
485
|
-
const
|
|
485
|
+
const i = l.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
486
486
|
return /* @__PURE__ */ p(
|
|
487
487
|
"div",
|
|
488
488
|
{
|
|
489
489
|
"data-slot": "sidebar-menu-skeleton",
|
|
490
|
-
"data-sidebar": "menu-skeleton",
|
|
491
|
-
className:
|
|
492
|
-
...
|
|
490
|
+
"data-d-sidebar": "menu-skeleton",
|
|
491
|
+
className: d("flex h-8 items-center gap-2 rounded-md px-2", a),
|
|
492
|
+
...r,
|
|
493
493
|
children: [
|
|
494
494
|
e && /* @__PURE__ */ t(
|
|
495
495
|
N,
|
|
496
496
|
{
|
|
497
497
|
className: "size-4 rounded-md",
|
|
498
|
-
"data-sidebar": "menu-skeleton-icon"
|
|
498
|
+
"data-d-sidebar": "menu-skeleton-icon"
|
|
499
499
|
}
|
|
500
500
|
),
|
|
501
501
|
/* @__PURE__ */ t(
|
|
502
502
|
N,
|
|
503
503
|
{
|
|
504
504
|
className: "h-4 max-w-(--skeleton-width) flex-1",
|
|
505
|
-
"data-sidebar": "menu-skeleton-text",
|
|
505
|
+
"data-d-sidebar": "menu-skeleton-text",
|
|
506
506
|
style: {
|
|
507
|
-
"--skeleton-width":
|
|
507
|
+
"--skeleton-width": i
|
|
508
508
|
}
|
|
509
509
|
}
|
|
510
510
|
)
|
|
@@ -517,9 +517,9 @@ function ke({ className: a, ...e }) {
|
|
|
517
517
|
"ul",
|
|
518
518
|
{
|
|
519
519
|
"data-slot": "sidebar-menu-sub",
|
|
520
|
-
"data-sidebar": "menu-sub",
|
|
521
|
-
className:
|
|
522
|
-
"border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
520
|
+
"data-d-sidebar": "menu-sub",
|
|
521
|
+
className: d(
|
|
522
|
+
"border-d-sidebar-d-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
|
|
523
523
|
"group-data-[collapsible=icon]:hidden",
|
|
524
524
|
a
|
|
525
525
|
),
|
|
@@ -535,8 +535,8 @@ function ze({
|
|
|
535
535
|
"li",
|
|
536
536
|
{
|
|
537
537
|
"data-slot": "sidebar-menu-sub-item",
|
|
538
|
-
"data-sidebar": "menu-sub-item",
|
|
539
|
-
className:
|
|
538
|
+
"data-d-sidebar": "menu-sub-item",
|
|
539
|
+
className: d("group/menu-sub-item relative", a),
|
|
540
540
|
...e
|
|
541
541
|
}
|
|
542
542
|
);
|
|
@@ -544,26 +544,26 @@ function ze({
|
|
|
544
544
|
function Ie({
|
|
545
545
|
asChild: a = !1,
|
|
546
546
|
size: e = "md",
|
|
547
|
-
isActive:
|
|
548
|
-
className:
|
|
549
|
-
...
|
|
547
|
+
isActive: r = !1,
|
|
548
|
+
className: i,
|
|
549
|
+
...n
|
|
550
550
|
}) {
|
|
551
551
|
return /* @__PURE__ */ t(
|
|
552
552
|
a ? h : "a",
|
|
553
553
|
{
|
|
554
554
|
"data-slot": "sidebar-menu-sub-button",
|
|
555
|
-
"data-sidebar": "menu-sub-button",
|
|
555
|
+
"data-d-sidebar": "menu-sub-button",
|
|
556
556
|
"data-size": e,
|
|
557
|
-
"data-active":
|
|
558
|
-
className:
|
|
559
|
-
"text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
560
|
-
"data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
|
|
557
|
+
"data-active": r,
|
|
558
|
+
className: d(
|
|
559
|
+
"text-d-sidebar-foreground ring-d-sidebar-d-ring hover:bg-d-sidebar-d-accent hover:text-d-sidebar-d-accent-foreground active:bg-d-sidebar-d-accent active:text-d-sidebar-d-accent-foreground [&>svg]:text-d-sidebar-d-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
560
|
+
"data-[active=true]:bg-d-sidebar-d-accent data-[active=true]:text-d-sidebar-d-accent-foreground",
|
|
561
561
|
e === "sm" && "text-xs",
|
|
562
562
|
e === "md" && "text-sm",
|
|
563
563
|
"group-data-[collapsible=icon]:hidden",
|
|
564
|
-
|
|
564
|
+
i
|
|
565
565
|
),
|
|
566
|
-
...
|
|
566
|
+
...n
|
|
567
567
|
}
|
|
568
568
|
);
|
|
569
569
|
}
|
|
@@ -587,7 +587,7 @@ export {
|
|
|
587
587
|
ke as SidebarMenuSub,
|
|
588
588
|
Ie as SidebarMenuSubButton,
|
|
589
589
|
ze as SidebarMenuSubItem,
|
|
590
|
-
|
|
590
|
+
oe as SidebarProvider,
|
|
591
591
|
ue as SidebarRail,
|
|
592
592
|
me as SidebarSeparator,
|
|
593
593
|
le as SidebarTrigger,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import { Root as
|
|
3
|
+
import { Root as d, Thumb as n } from "../../node_modules/@radix-ui/react-switch/dist/index.js";
|
|
4
4
|
import { cn as t } from "../../lib/utils.js";
|
|
5
5
|
function c({
|
|
6
6
|
className: a,
|
|
7
7
|
...r
|
|
8
8
|
}) {
|
|
9
9
|
return /* @__PURE__ */ e(
|
|
10
|
-
|
|
10
|
+
d,
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "switch",
|
|
13
13
|
className: t(
|
|
14
|
-
"peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
14
|
+
"peer data-[state=checked]:bg-d-primary data-[state=unchecked]:bg-d-input focus-visible:border-d-ring focus-visible:ring-d-ring/50 dark:data-[state=unchecked]:bg-d-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
a
|
|
16
16
|
),
|
|
17
17
|
...r,
|
|
18
18
|
children: /* @__PURE__ */ e(
|
|
19
|
-
|
|
19
|
+
n,
|
|
20
20
|
{
|
|
21
21
|
"data-slot": "switch-thumb",
|
|
22
22
|
className: t(
|
|
23
|
-
"bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
23
|
+
"bg-d-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-d-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
24
24
|
)
|
|
25
25
|
}
|
|
26
26
|
)
|