laif-ds 0.2.91 → 1.0.0
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/CHANGELOG.md +26 -0
- package/dist/_virtual/index3.js +5 -5
- package/dist/_virtual/index4.js +5 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/agent-docs/adoption-report.json +37 -38
- package/dist/agent-docs/components/AppBottomNav.md +426 -0
- package/dist/agent-docs/components/AppSidebar.md +302 -19
- package/dist/agent-docs/components/Sidebar.md +4 -0
- package/dist/agent-docs/components-list.md +2 -1
- package/dist/agent-docs/manifest.json +113 -14
- package/dist/components/design-tokens.js +84 -0
- package/dist/components/ui/app-bottom-nav.js +165 -0
- package/dist/components/ui/app-sidebar-mobile.js +220 -0
- package/dist/components/ui/app-sidebar.js +366 -109
- package/dist/components/ui/sheet.js +26 -24
- package/dist/components/ui/sidebar.js +190 -166
- package/dist/css-for-template.css +2 -2
- package/dist/index.d.ts +92 -1
- package/dist/index.js +183 -181
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/styles.v3.css +1 -1
- package/package.json +3 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { Root as
|
|
4
|
-
import { cva as
|
|
5
|
-
import * as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Input as
|
|
8
|
-
import { Separator as
|
|
9
|
-
import { Sheet as B, SheetContent as
|
|
10
|
-
import { Skeleton as
|
|
11
|
-
import { Tooltip as
|
|
12
|
-
import { useIsMobile as
|
|
2
|
+
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
3
|
+
import { Root as N } from "../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
4
|
+
import { cva as I } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
5
|
+
import * as r from "react";
|
|
6
|
+
import { Button as T } from "./button.js";
|
|
7
|
+
import { Input as E } from "./input.js";
|
|
8
|
+
import { Separator as A } from "./separator.js";
|
|
9
|
+
import { Sheet as B, SheetContent as D, SheetHeader as O, SheetTitle as G } from "./sheet.js";
|
|
10
|
+
import { Skeleton as C } from "./skeleton.js";
|
|
11
|
+
import { Tooltip as H, TooltipTrigger as j, TooltipContent as K, TooltipProvider as L } from "./tooltip.js";
|
|
12
|
+
import { useIsMobile as F } from "../../hooks/use-mobile.js";
|
|
13
13
|
import { cn as i } from "../../lib/utils.js";
|
|
14
14
|
import P from "../../node_modules/lucide-react/dist/esm/icons/panel-left.js";
|
|
15
|
-
const $ = "sidebar_state", V = 3600 * 24 * 7, q = "16rem",
|
|
16
|
-
function
|
|
17
|
-
const a =
|
|
15
|
+
const $ = "sidebar_state", V = 3600 * 24 * 7, q = "16rem", W = "3rem", U = "b", k = r.createContext(null);
|
|
16
|
+
function M() {
|
|
17
|
+
const a = r.useContext(k);
|
|
18
18
|
if (!a)
|
|
19
19
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
20
20
|
return a;
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const X = r.forwardRef(
|
|
23
23
|
({
|
|
24
24
|
defaultOpen: a = !0,
|
|
25
25
|
open: e,
|
|
@@ -27,62 +27,72 @@ const U = d.forwardRef(
|
|
|
27
27
|
className: o,
|
|
28
28
|
style: n,
|
|
29
29
|
children: s,
|
|
30
|
-
...
|
|
31
|
-
},
|
|
32
|
-
const c =
|
|
30
|
+
...m
|
|
31
|
+
}, h) => {
|
|
32
|
+
const c = F(), [u, b] = r.useState(!1), [f, g] = r.useState(
|
|
33
|
+
null
|
|
34
|
+
);
|
|
35
|
+
r.useEffect(() => {
|
|
36
|
+
u || g(null);
|
|
37
|
+
}, [u]);
|
|
38
|
+
const [v, x] = r.useState(a), w = e ?? v, y = r.useCallback(
|
|
33
39
|
(l) => {
|
|
34
|
-
const
|
|
35
|
-
t ? t(
|
|
40
|
+
const p = typeof l == "function" ? l(w) : l;
|
|
41
|
+
t ? t(p) : x(p), document.cookie = `${$}=${p}; path=/; max-age=${V}`;
|
|
36
42
|
},
|
|
37
|
-
[t,
|
|
38
|
-
),
|
|
39
|
-
|
|
40
|
-
const l = (
|
|
41
|
-
|
|
43
|
+
[t, w]
|
|
44
|
+
), R = r.useCallback(() => c ? b((l) => !l) : y((l) => !l), [c, y, b]);
|
|
45
|
+
r.useEffect(() => {
|
|
46
|
+
const l = (p) => {
|
|
47
|
+
p.key === U && (p.metaKey || p.ctrlKey) && (p.preventDefault(), R());
|
|
42
48
|
};
|
|
43
49
|
return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
|
|
44
|
-
}, [
|
|
45
|
-
const
|
|
50
|
+
}, [R]);
|
|
51
|
+
const _ = w ? "expanded" : "collapsed", z = r.useMemo(
|
|
46
52
|
() => ({
|
|
47
|
-
state:
|
|
48
|
-
open:
|
|
49
|
-
setOpen:
|
|
53
|
+
state: _,
|
|
54
|
+
open: w,
|
|
55
|
+
setOpen: y,
|
|
50
56
|
isMobile: c,
|
|
51
|
-
openMobile:
|
|
52
|
-
setOpenMobile:
|
|
53
|
-
|
|
57
|
+
openMobile: u,
|
|
58
|
+
setOpenMobile: b,
|
|
59
|
+
mobileNavTarget: f,
|
|
60
|
+
setMobileNavTarget: g,
|
|
61
|
+
toggleSidebar: R
|
|
54
62
|
}),
|
|
55
63
|
[
|
|
56
|
-
|
|
57
|
-
h,
|
|
64
|
+
_,
|
|
58
65
|
w,
|
|
66
|
+
y,
|
|
59
67
|
c,
|
|
60
|
-
p,
|
|
61
68
|
u,
|
|
62
|
-
|
|
69
|
+
b,
|
|
70
|
+
f,
|
|
71
|
+
g,
|
|
72
|
+
R
|
|
63
73
|
]
|
|
64
74
|
);
|
|
65
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ d(k.Provider, { value: z, children: /* @__PURE__ */ d(L, { delayDuration: 0, children: /* @__PURE__ */ d(
|
|
66
76
|
"div",
|
|
67
77
|
{
|
|
68
78
|
style: {
|
|
69
79
|
"--sidebar-width": q,
|
|
70
|
-
"--sidebar-width-icon":
|
|
80
|
+
"--sidebar-width-icon": W,
|
|
71
81
|
...n
|
|
72
82
|
},
|
|
73
83
|
className: i(
|
|
74
84
|
"group/sidebar-wrapper has-[[data-variant=inset]]:bg-d-sidebar flex min-h-svh w-full",
|
|
75
85
|
o
|
|
76
86
|
),
|
|
77
|
-
ref:
|
|
78
|
-
...
|
|
87
|
+
ref: h,
|
|
88
|
+
...m,
|
|
79
89
|
children: s
|
|
80
90
|
}
|
|
81
91
|
) }) });
|
|
82
92
|
}
|
|
83
93
|
);
|
|
84
|
-
|
|
85
|
-
const
|
|
94
|
+
X.displayName = "SidebarProvider";
|
|
95
|
+
const Y = r.forwardRef(
|
|
86
96
|
({
|
|
87
97
|
side: a = "left",
|
|
88
98
|
variant: e = "sidebar",
|
|
@@ -90,45 +100,59 @@ const X = d.forwardRef(
|
|
|
90
100
|
className: o,
|
|
91
101
|
children: n,
|
|
92
102
|
...s
|
|
93
|
-
},
|
|
94
|
-
const { isMobile:
|
|
95
|
-
return
|
|
103
|
+
}, m) => {
|
|
104
|
+
const { isMobile: h, state: c, openMobile: u, setOpenMobile: b } = M(), f = r.useRef(null), g = r.useRef(null);
|
|
105
|
+
return h ? /* @__PURE__ */ d(B, { open: u, onOpenChange: b, ...s, children: /* @__PURE__ */ S(
|
|
106
|
+
D,
|
|
107
|
+
{
|
|
108
|
+
"data-sidebar": "sidebar",
|
|
109
|
+
"data-mobile": "true",
|
|
110
|
+
className: "bg-d-sidebar text-d-sidebar-foreground p-0 [&_[data-sidebar=header]]:pr-12 [&>button]:top-2 [&>button]:right-2 [&>button]:flex [&>button]:size-11 [&>button]:items-center [&>button]:justify-center [&>button]:opacity-100",
|
|
111
|
+
side: "full",
|
|
112
|
+
"aria-describedby": void 0,
|
|
113
|
+
onOpenAutoFocus: (v) => {
|
|
114
|
+
v.preventDefault();
|
|
115
|
+
const x = document.activeElement;
|
|
116
|
+
g.current = x instanceof HTMLElement && x !== document.body ? x : null, f.current?.focus();
|
|
117
|
+
},
|
|
118
|
+
onCloseAutoFocus: (v) => {
|
|
119
|
+
v.preventDefault(), g.current?.focus();
|
|
120
|
+
},
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ d(O, { className: "sr-only", children: /* @__PURE__ */ d(G, { children: "Navigation menu" }) }),
|
|
123
|
+
/* @__PURE__ */ d(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
ref: f,
|
|
127
|
+
tabIndex: -1,
|
|
128
|
+
className: "flex h-full w-full flex-col outline-none",
|
|
129
|
+
children: n
|
|
130
|
+
}
|
|
131
|
+
)
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
) }) : t === "none" ? /* @__PURE__ */ d(
|
|
96
135
|
"div",
|
|
97
136
|
{
|
|
98
137
|
className: i(
|
|
99
138
|
"bg-d-sidebar text-d-sidebar-foreground flex h-full w-[var(--sidebar-width)] flex-col",
|
|
100
139
|
o
|
|
101
140
|
),
|
|
102
|
-
ref:
|
|
141
|
+
ref: m,
|
|
103
142
|
...s,
|
|
104
143
|
children: n
|
|
105
144
|
}
|
|
106
|
-
) :
|
|
107
|
-
E,
|
|
108
|
-
{
|
|
109
|
-
"data-sidebar": "sidebar",
|
|
110
|
-
"data-mobile": "true",
|
|
111
|
-
className: "bg-d-sidebar text-d-sidebar-foreground p-0 [&_[data-sidebar=header]]:pr-12 [&>button]:top-2 [&>button]:right-2 [&>button]:flex [&>button]:size-11 [&>button]:items-center [&>button]:justify-center [&>button]:opacity-100",
|
|
112
|
-
side: "full",
|
|
113
|
-
children: [
|
|
114
|
-
/* @__PURE__ */ m(A, { className: "sr-only", children: [
|
|
115
|
-
/* @__PURE__ */ r(D, { children: "Sidebar" }),
|
|
116
|
-
/* @__PURE__ */ r(O, { children: "Displays the mobile sidebar." })
|
|
117
|
-
] }),
|
|
118
|
-
/* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: n })
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
) }) : /* @__PURE__ */ m(
|
|
145
|
+
) : /* @__PURE__ */ S(
|
|
122
146
|
"div",
|
|
123
147
|
{
|
|
124
|
-
ref:
|
|
148
|
+
ref: m,
|
|
125
149
|
className: "group peer text-d-sidebar-foreground hidden md:block",
|
|
126
150
|
"data-state": c,
|
|
127
151
|
"data-collapsible": c === "collapsed" ? t : "",
|
|
128
152
|
"data-variant": e,
|
|
129
153
|
"data-side": a,
|
|
130
154
|
children: [
|
|
131
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ d(
|
|
132
156
|
"div",
|
|
133
157
|
{
|
|
134
158
|
className: i(
|
|
@@ -139,7 +163,7 @@ const X = d.forwardRef(
|
|
|
139
163
|
)
|
|
140
164
|
}
|
|
141
165
|
),
|
|
142
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ d(
|
|
143
167
|
"div",
|
|
144
168
|
{
|
|
145
169
|
className: i(
|
|
@@ -150,7 +174,7 @@ const X = d.forwardRef(
|
|
|
150
174
|
o
|
|
151
175
|
),
|
|
152
176
|
...s,
|
|
153
|
-
children: /* @__PURE__ */
|
|
177
|
+
children: /* @__PURE__ */ d(
|
|
154
178
|
"div",
|
|
155
179
|
{
|
|
156
180
|
"data-sidebar": "sidebar",
|
|
@@ -165,11 +189,11 @@ const X = d.forwardRef(
|
|
|
165
189
|
);
|
|
166
190
|
}
|
|
167
191
|
);
|
|
168
|
-
|
|
169
|
-
const
|
|
170
|
-
const { toggleSidebar: n } =
|
|
171
|
-
return /* @__PURE__ */
|
|
172
|
-
|
|
192
|
+
Y.displayName = "Sidebar";
|
|
193
|
+
const J = r.forwardRef(({ className: a, onClick: e, ...t }, o) => {
|
|
194
|
+
const { toggleSidebar: n } = M();
|
|
195
|
+
return /* @__PURE__ */ S(
|
|
196
|
+
T,
|
|
173
197
|
{
|
|
174
198
|
ref: o,
|
|
175
199
|
"data-sidebar": "trigger",
|
|
@@ -181,16 +205,16 @@ const Y = d.forwardRef(({ className: a, onClick: e, ...t }, o) => {
|
|
|
181
205
|
},
|
|
182
206
|
...t,
|
|
183
207
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ d(P, {}),
|
|
209
|
+
/* @__PURE__ */ d("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
186
210
|
]
|
|
187
211
|
}
|
|
188
212
|
);
|
|
189
213
|
});
|
|
190
|
-
|
|
191
|
-
const
|
|
192
|
-
const { toggleSidebar: o } =
|
|
193
|
-
return /* @__PURE__ */
|
|
214
|
+
J.displayName = "SidebarTrigger";
|
|
215
|
+
const Q = r.forwardRef(({ className: a, ...e }, t) => {
|
|
216
|
+
const { toggleSidebar: o } = M();
|
|
217
|
+
return /* @__PURE__ */ d(
|
|
194
218
|
"button",
|
|
195
219
|
{
|
|
196
220
|
ref: t,
|
|
@@ -212,8 +236,8 @@ const J = d.forwardRef(({ className: a, ...e }, t) => {
|
|
|
212
236
|
}
|
|
213
237
|
);
|
|
214
238
|
});
|
|
215
|
-
|
|
216
|
-
const
|
|
239
|
+
Q.displayName = "SidebarRail";
|
|
240
|
+
const Z = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
217
241
|
"main",
|
|
218
242
|
{
|
|
219
243
|
ref: t,
|
|
@@ -225,9 +249,9 @@ const Q = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
225
249
|
...e
|
|
226
250
|
}
|
|
227
251
|
));
|
|
228
|
-
|
|
229
|
-
const
|
|
230
|
-
|
|
252
|
+
Z.displayName = "SidebarInset";
|
|
253
|
+
const ee = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
254
|
+
E,
|
|
231
255
|
{
|
|
232
256
|
ref: t,
|
|
233
257
|
"data-sidebar": "input",
|
|
@@ -238,8 +262,8 @@ const Z = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
238
262
|
...e
|
|
239
263
|
}
|
|
240
264
|
));
|
|
241
|
-
|
|
242
|
-
const
|
|
265
|
+
ee.displayName = "SidebarInput";
|
|
266
|
+
const ae = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
243
267
|
"div",
|
|
244
268
|
{
|
|
245
269
|
ref: t,
|
|
@@ -248,8 +272,8 @@ const ee = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
248
272
|
...e
|
|
249
273
|
}
|
|
250
274
|
));
|
|
251
|
-
|
|
252
|
-
const
|
|
275
|
+
ae.displayName = "SidebarHeader";
|
|
276
|
+
const te = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
253
277
|
"div",
|
|
254
278
|
{
|
|
255
279
|
ref: t,
|
|
@@ -258,9 +282,9 @@ const ae = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
258
282
|
...e
|
|
259
283
|
}
|
|
260
284
|
));
|
|
261
|
-
|
|
262
|
-
const
|
|
263
|
-
|
|
285
|
+
te.displayName = "SidebarFooter";
|
|
286
|
+
const re = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
287
|
+
A,
|
|
264
288
|
{
|
|
265
289
|
ref: t,
|
|
266
290
|
"data-sidebar": "separator",
|
|
@@ -268,8 +292,8 @@ const te = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
268
292
|
...e
|
|
269
293
|
}
|
|
270
294
|
));
|
|
271
|
-
|
|
272
|
-
const
|
|
295
|
+
re.displayName = "SidebarSeparator";
|
|
296
|
+
const de = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
273
297
|
"div",
|
|
274
298
|
{
|
|
275
299
|
ref: t,
|
|
@@ -281,8 +305,8 @@ const re = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
281
305
|
...e
|
|
282
306
|
}
|
|
283
307
|
));
|
|
284
|
-
|
|
285
|
-
const
|
|
308
|
+
de.displayName = "SidebarContent";
|
|
309
|
+
const ie = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
286
310
|
"div",
|
|
287
311
|
{
|
|
288
312
|
ref: t,
|
|
@@ -291,9 +315,9 @@ const de = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
291
315
|
...e
|
|
292
316
|
}
|
|
293
317
|
));
|
|
294
|
-
|
|
295
|
-
const
|
|
296
|
-
e ?
|
|
318
|
+
ie.displayName = "SidebarGroup";
|
|
319
|
+
const oe = r.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PURE__ */ d(
|
|
320
|
+
e ? N : "div",
|
|
297
321
|
{
|
|
298
322
|
ref: o,
|
|
299
323
|
"data-sidebar": "group-label",
|
|
@@ -305,9 +329,9 @@ const ie = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PU
|
|
|
305
329
|
...t
|
|
306
330
|
}
|
|
307
331
|
));
|
|
308
|
-
|
|
309
|
-
const
|
|
310
|
-
e ?
|
|
332
|
+
oe.displayName = "SidebarGroupLabel";
|
|
333
|
+
const ne = r.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PURE__ */ d(
|
|
334
|
+
e ? N : "button",
|
|
311
335
|
{
|
|
312
336
|
ref: o,
|
|
313
337
|
"data-sidebar": "group-action",
|
|
@@ -321,8 +345,8 @@ const oe = d.forwardRef(({ className: a, asChild: e = !1, ...t }, o) => /* @__PU
|
|
|
321
345
|
...t
|
|
322
346
|
}
|
|
323
347
|
));
|
|
324
|
-
|
|
325
|
-
const
|
|
348
|
+
ne.displayName = "SidebarGroupAction";
|
|
349
|
+
const se = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
326
350
|
"div",
|
|
327
351
|
{
|
|
328
352
|
ref: t,
|
|
@@ -331,8 +355,8 @@ const ne = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
331
355
|
...e
|
|
332
356
|
}
|
|
333
357
|
));
|
|
334
|
-
|
|
335
|
-
const
|
|
358
|
+
se.displayName = "SidebarGroupContent";
|
|
359
|
+
const le = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
336
360
|
"ul",
|
|
337
361
|
{
|
|
338
362
|
ref: t,
|
|
@@ -341,8 +365,8 @@ const se = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
341
365
|
...e
|
|
342
366
|
}
|
|
343
367
|
));
|
|
344
|
-
|
|
345
|
-
const
|
|
368
|
+
le.displayName = "SidebarMenu";
|
|
369
|
+
const ce = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
346
370
|
"li",
|
|
347
371
|
{
|
|
348
372
|
ref: t,
|
|
@@ -351,8 +375,8 @@ const le = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
351
375
|
...e
|
|
352
376
|
}
|
|
353
377
|
));
|
|
354
|
-
|
|
355
|
-
const
|
|
378
|
+
ce.displayName = "SidebarMenuItem";
|
|
379
|
+
const ue = I(
|
|
356
380
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-d-sidebar-ring transition-[width,height,padding] hover:bg-d-sidebar-accent hover:text-d-sidebar-accent-foreground focus-visible:ring-2 active:bg-d-sidebar-accent active:text-d-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-d-sidebar-accent data-[active=true]:font-bold data-[active=true]:text-d-sidebar-accent-foreground data-[state=open]:hover:bg-d-sidebar-accent data-[state=open]:hover:text-d-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",
|
|
357
381
|
{
|
|
358
382
|
variants: {
|
|
@@ -371,7 +395,7 @@ const ce = k(
|
|
|
371
395
|
size: "default"
|
|
372
396
|
}
|
|
373
397
|
}
|
|
374
|
-
),
|
|
398
|
+
), be = r.forwardRef(
|
|
375
399
|
({
|
|
376
400
|
asChild: a = !1,
|
|
377
401
|
isActive: e = !1,
|
|
@@ -379,38 +403,38 @@ const ce = k(
|
|
|
379
403
|
size: o = "default",
|
|
380
404
|
tooltip: n,
|
|
381
405
|
className: s,
|
|
382
|
-
...
|
|
383
|
-
},
|
|
384
|
-
const c = a ?
|
|
406
|
+
...m
|
|
407
|
+
}, h) => {
|
|
408
|
+
const c = a ? N : "button", { isMobile: u, state: b } = M(), f = /* @__PURE__ */ d(
|
|
385
409
|
c,
|
|
386
410
|
{
|
|
387
|
-
ref:
|
|
411
|
+
ref: h,
|
|
388
412
|
"data-sidebar": "menu-button",
|
|
389
413
|
"data-size": o,
|
|
390
414
|
"data-active": e,
|
|
391
|
-
className: i(
|
|
392
|
-
...
|
|
415
|
+
className: i(ue({ variant: t, size: o }), s),
|
|
416
|
+
...m
|
|
393
417
|
}
|
|
394
418
|
);
|
|
395
419
|
return n ? (typeof n == "string" && (n = {
|
|
396
420
|
children: n
|
|
397
|
-
}), /* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
400
|
-
|
|
421
|
+
}), /* @__PURE__ */ S(H, { children: [
|
|
422
|
+
/* @__PURE__ */ d(j, { asChild: !0, children: f }),
|
|
423
|
+
/* @__PURE__ */ d(
|
|
424
|
+
K,
|
|
401
425
|
{
|
|
402
426
|
side: "right",
|
|
403
427
|
align: "center",
|
|
404
|
-
hidden:
|
|
428
|
+
hidden: b !== "collapsed" || u,
|
|
405
429
|
...n
|
|
406
430
|
}
|
|
407
431
|
)
|
|
408
|
-
] })) :
|
|
432
|
+
] })) : f;
|
|
409
433
|
}
|
|
410
434
|
);
|
|
411
|
-
|
|
412
|
-
const
|
|
413
|
-
e ?
|
|
435
|
+
be.displayName = "SidebarMenuButton";
|
|
436
|
+
const fe = r.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...o }, n) => /* @__PURE__ */ d(
|
|
437
|
+
e ? N : "button",
|
|
414
438
|
{
|
|
415
439
|
ref: n,
|
|
416
440
|
"data-sidebar": "menu-action",
|
|
@@ -428,8 +452,8 @@ const be = d.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, .
|
|
|
428
452
|
...o
|
|
429
453
|
}
|
|
430
454
|
));
|
|
431
|
-
|
|
432
|
-
const
|
|
455
|
+
fe.displayName = "SidebarMenuAction";
|
|
456
|
+
const pe = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
433
457
|
"div",
|
|
434
458
|
{
|
|
435
459
|
ref: t,
|
|
@@ -446,10 +470,10 @@ const fe = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
446
470
|
...e
|
|
447
471
|
}
|
|
448
472
|
));
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
const n =
|
|
452
|
-
return /* @__PURE__ */
|
|
473
|
+
pe.displayName = "SidebarMenuBadge";
|
|
474
|
+
const me = r.forwardRef(({ className: a, showIcon: e = !1, ...t }, o) => {
|
|
475
|
+
const n = r.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
|
|
476
|
+
return /* @__PURE__ */ S(
|
|
453
477
|
"div",
|
|
454
478
|
{
|
|
455
479
|
ref: o,
|
|
@@ -457,15 +481,15 @@ const pe = d.forwardRef(({ className: a, showIcon: e = !1, ...t }, o) => {
|
|
|
457
481
|
className: i("flex h-8 items-center gap-2 rounded-md px-2", a),
|
|
458
482
|
...t,
|
|
459
483
|
children: [
|
|
460
|
-
e && /* @__PURE__ */
|
|
461
|
-
|
|
484
|
+
e && /* @__PURE__ */ d(
|
|
485
|
+
C,
|
|
462
486
|
{
|
|
463
487
|
className: "size-4 rounded-md",
|
|
464
488
|
"data-sidebar": "menu-skeleton-icon"
|
|
465
489
|
}
|
|
466
490
|
),
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
|
|
491
|
+
/* @__PURE__ */ d(
|
|
492
|
+
C,
|
|
469
493
|
{
|
|
470
494
|
className: "h-4 max-w-[--skeleton-width] flex-1",
|
|
471
495
|
"data-sidebar": "menu-skeleton-text",
|
|
@@ -478,8 +502,8 @@ const pe = d.forwardRef(({ className: a, showIcon: e = !1, ...t }, o) => {
|
|
|
478
502
|
}
|
|
479
503
|
);
|
|
480
504
|
});
|
|
481
|
-
|
|
482
|
-
const
|
|
505
|
+
me.displayName = "SidebarMenuSkeleton";
|
|
506
|
+
const ge = r.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ d(
|
|
483
507
|
"ul",
|
|
484
508
|
{
|
|
485
509
|
ref: t,
|
|
@@ -492,11 +516,11 @@ const me = d.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
|
492
516
|
...e
|
|
493
517
|
}
|
|
494
518
|
));
|
|
495
|
-
|
|
496
|
-
const
|
|
497
|
-
|
|
498
|
-
const
|
|
499
|
-
a ?
|
|
519
|
+
ge.displayName = "SidebarMenuSub";
|
|
520
|
+
const he = r.forwardRef(({ ...a }, e) => /* @__PURE__ */ d("li", { ref: e, ...a }));
|
|
521
|
+
he.displayName = "SidebarMenuSubItem";
|
|
522
|
+
const ve = r.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: o, ...n }, s) => /* @__PURE__ */ d(
|
|
523
|
+
a ? N : "a",
|
|
500
524
|
{
|
|
501
525
|
ref: s,
|
|
502
526
|
"data-sidebar": "menu-sub-button",
|
|
@@ -513,30 +537,30 @@ const he = d.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, classNa
|
|
|
513
537
|
...n
|
|
514
538
|
}
|
|
515
539
|
));
|
|
516
|
-
|
|
540
|
+
ve.displayName = "SidebarMenuSubButton";
|
|
517
541
|
export {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
+
Y as Sidebar,
|
|
543
|
+
de as SidebarContent,
|
|
544
|
+
te as SidebarFooter,
|
|
545
|
+
ie as SidebarGroup,
|
|
546
|
+
ne as SidebarGroupAction,
|
|
547
|
+
se as SidebarGroupContent,
|
|
548
|
+
oe as SidebarGroupLabel,
|
|
549
|
+
ae as SidebarHeader,
|
|
550
|
+
ee as SidebarInput,
|
|
551
|
+
Z as SidebarInset,
|
|
552
|
+
le as SidebarMenu,
|
|
553
|
+
fe as SidebarMenuAction,
|
|
554
|
+
pe as SidebarMenuBadge,
|
|
555
|
+
be as SidebarMenuButton,
|
|
556
|
+
ce as SidebarMenuItem,
|
|
557
|
+
me as SidebarMenuSkeleton,
|
|
558
|
+
ge as SidebarMenuSub,
|
|
559
|
+
ve as SidebarMenuSubButton,
|
|
560
|
+
he as SidebarMenuSubItem,
|
|
561
|
+
X as SidebarProvider,
|
|
562
|
+
Q as SidebarRail,
|
|
563
|
+
re as SidebarSeparator,
|
|
564
|
+
J as SidebarTrigger,
|
|
565
|
+
M as useSidebar
|
|
542
566
|
};
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
--color-d-destructive: var(--d-destructive);
|
|
23
23
|
--color-d-destructive-foreground: var(--d-destructive-foreground);
|
|
24
24
|
--color-d-warning: var(--d-warning);
|
|
25
|
-
--color-d-warning-background: var(--d-warning);
|
|
25
|
+
--color-d-warning-background: var(--d-warning-background);
|
|
26
26
|
--color-d-warning-foreground: var(--d-warning-foreground);
|
|
27
27
|
--color-d-success: var(--d-success);
|
|
28
|
-
--color-d-success-background: var(--d-success);
|
|
28
|
+
--color-d-success-background: var(--d-success-background);
|
|
29
29
|
--color-d-success-foreground: var(--d-success-foreground);
|
|
30
30
|
--color-d-border: var(--d-border);
|
|
31
31
|
--color-d-input: var(--d-input);
|