ics-ui-kit 0.1.20 → 0.1.21
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/calendar-scroll.js +16 -15
- package/dist/components/calendar-scroll.js.map +1 -1
- package/dist/components/resizable.js +26 -1530
- package/dist/components/resizable.js.map +1 -1
- package/dist/components/sidebar.js +142 -141
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/textarea.js +30 -189
- package/dist/components/textarea.js.map +1 -1
- package/dist/ssr.test.d.ts +1 -0
- package/dist/useIsomorphicLayoutEffect-MNxJD61V.js +6 -0
- package/dist/useIsomorphicLayoutEffect-MNxJD61V.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import { jsx as r, jsxs as f, Fragment as B } from "react/jsx-runtime";
|
|
2
|
-
import { e as
|
|
2
|
+
import { e as A } from "../useBreakpoints-DHvp74UL.js";
|
|
3
|
+
import { n as D } from "../useIsomorphicLayoutEffect-MNxJD61V.js";
|
|
3
4
|
import o from "react";
|
|
4
|
-
import { T as
|
|
5
|
+
import { T as E, b as G, c as H } from "../Tooltip-7Duaau0S.js";
|
|
5
6
|
import { c as w } from "../cn-dsXlqdJg.js";
|
|
6
|
-
import { S as L, a as
|
|
7
|
+
import { S as L, a as O, b as P, d as K, e as j } from "../Sheet-qTIXsqm0.js";
|
|
7
8
|
import { I as R } from "../IconButton-uGJ3cQtk.js";
|
|
8
|
-
import { T as
|
|
9
|
-
import { D as
|
|
9
|
+
import { T as F } from "../TextInput-5BuZtWV6.js";
|
|
10
|
+
import { D as $ } from "../Divider-DPW5ZhZ8.js";
|
|
10
11
|
import { S as y } from "../index-BtQfgaSF.js";
|
|
11
12
|
import { T as n } from "../index-BVqs-uqP.js";
|
|
12
13
|
import { S as I } from "../Skeleton-y6I-i9q5.js";
|
|
13
|
-
import { S as
|
|
14
|
-
import { P as
|
|
15
|
-
import { c as
|
|
14
|
+
import { S as q } from "../ScrollShadowContainer-DdrnF8qU.js";
|
|
15
|
+
import { P as W } from "../plus-BpxYPnAG.js";
|
|
16
|
+
import { c as V } from "../createLucideIcon-DwBrHnj9.js";
|
|
16
17
|
/**
|
|
17
18
|
* @license lucide-react v0.460.0 - ISC
|
|
18
19
|
*
|
|
19
20
|
* This source code is licensed under the ISC license.
|
|
20
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
21
22
|
*/
|
|
22
|
-
const
|
|
23
|
+
const U = V("PanelLeft", [
|
|
23
24
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
24
25
|
["path", { d: "M9 3v18", key: "fh3hqa" }]
|
|
25
26
|
]), C = o.createContext(null);
|
|
@@ -29,24 +30,24 @@ function N() {
|
|
|
29
30
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
30
31
|
return a;
|
|
31
32
|
}
|
|
32
|
-
const
|
|
33
|
+
const X = "sidebar_state", Y = 60 * 60 * 24 * 7, J = "16rem", Q = "18rem", Z = "3rem", ee = "b", ae = n({
|
|
33
34
|
base: "group/sidebar-wrapper flex min-h-svh w-full",
|
|
34
35
|
variants: {
|
|
35
36
|
hasInset: {
|
|
36
37
|
true: "bg-primary-bg"
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
|
-
}),
|
|
40
|
-
const
|
|
40
|
+
}), te = o.forwardRef(({ defaultOpen: a = !0, open: e, onOpenChange: t, className: s, style: i, children: d, ...p }, m) => {
|
|
41
|
+
const b = A(), [g, l] = o.useState(!1), [h, k] = o.useState(!1), [_, z] = o.useState(a), v = e ?? _, S = o.useCallback(
|
|
41
42
|
(c) => {
|
|
42
|
-
const
|
|
43
|
-
t ? t(
|
|
43
|
+
const u = typeof c == "function" ? c(v) : c;
|
|
44
|
+
t ? t(u) : z(u), document.cookie = `${X}=${u}; path=/; max-age=${Y}`;
|
|
44
45
|
},
|
|
45
46
|
[t, v]
|
|
46
|
-
), x = o.useCallback(() =>
|
|
47
|
+
), x = o.useCallback(() => b ? l((c) => !c) : S((c) => !c), [b, S, l]);
|
|
47
48
|
o.useEffect(() => {
|
|
48
|
-
const c = (
|
|
49
|
-
|
|
49
|
+
const c = (u) => {
|
|
50
|
+
u.key === ee && (u.metaKey || u.ctrlKey) && (u.preventDefault(), x());
|
|
50
51
|
};
|
|
51
52
|
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
52
53
|
}, [x]);
|
|
@@ -55,34 +56,34 @@ const U = "sidebar_state", X = 60 * 60 * 24 * 7, Y = "16rem", J = "18rem", Q = "
|
|
|
55
56
|
state: M,
|
|
56
57
|
open: v,
|
|
57
58
|
setOpen: S,
|
|
58
|
-
isMobile:
|
|
59
|
+
isMobile: b,
|
|
59
60
|
openMobile: g,
|
|
60
61
|
setOpenMobile: l,
|
|
61
62
|
toggleSidebar: x,
|
|
62
63
|
hasInset: h,
|
|
63
64
|
setHasInset: k
|
|
64
65
|
}),
|
|
65
|
-
[M, v, S,
|
|
66
|
+
[M, v, S, b, g, l, x, h]
|
|
66
67
|
);
|
|
67
68
|
return /* @__PURE__ */ r(C.Provider, { value: T, children: /* @__PURE__ */ r(
|
|
68
69
|
"div",
|
|
69
70
|
{
|
|
70
71
|
style: {
|
|
71
|
-
"--sidebar-width":
|
|
72
|
-
"--sidebar-width-icon":
|
|
72
|
+
"--sidebar-width": J,
|
|
73
|
+
"--sidebar-width-icon": Z,
|
|
73
74
|
...i
|
|
74
75
|
},
|
|
75
|
-
className:
|
|
76
|
+
className: ae({ hasInset: h, className: s }),
|
|
76
77
|
ref: m,
|
|
77
78
|
...p,
|
|
78
79
|
children: d
|
|
79
80
|
}
|
|
80
81
|
) });
|
|
81
82
|
});
|
|
82
|
-
|
|
83
|
-
const
|
|
84
|
-
const { state: m, openMobile:
|
|
85
|
-
return
|
|
83
|
+
te.displayName = "SidebarProvider";
|
|
84
|
+
const re = o.forwardRef(({ side: a = "left", variant: e = "sidebar", collapsible: t = "offcanvas", className: s, children: i, ...d }, p) => {
|
|
85
|
+
const { state: m, openMobile: b, setOpenMobile: g, setHasInset: l } = N();
|
|
86
|
+
return D(() => {
|
|
86
87
|
if (e === "inset")
|
|
87
88
|
return l(!0), () => l(!1);
|
|
88
89
|
}, [e, l]), t === "none" ? /* @__PURE__ */ r(
|
|
@@ -97,20 +98,20 @@ const te = o.forwardRef(({ side: a = "left", variant: e = "sidebar", collapsible
|
|
|
97
98
|
children: i
|
|
98
99
|
}
|
|
99
100
|
) : /* @__PURE__ */ f(B, { children: [
|
|
100
|
-
/* @__PURE__ */ r("div", { className: "contents lg:hidden", children: /* @__PURE__ */ r(L, { open:
|
|
101
|
-
|
|
101
|
+
/* @__PURE__ */ r("div", { className: "contents lg:hidden", children: /* @__PURE__ */ r(L, { open: b, onOpenChange: g, ...d, children: /* @__PURE__ */ f(
|
|
102
|
+
O,
|
|
102
103
|
{
|
|
103
104
|
"data-sidebar": "sidebar",
|
|
104
105
|
"data-mobile": "true",
|
|
105
106
|
className: "w-[--sidebar-width] bg-sidebar-bg p-0 text-secondary-fg [&>button]:hidden",
|
|
106
107
|
style: {
|
|
107
|
-
"--sidebar-width":
|
|
108
|
+
"--sidebar-width": Q
|
|
108
109
|
},
|
|
109
110
|
side: a,
|
|
110
111
|
children: [
|
|
111
|
-
/* @__PURE__ */ f(
|
|
112
|
-
/* @__PURE__ */ r(
|
|
113
|
-
/* @__PURE__ */ r(
|
|
112
|
+
/* @__PURE__ */ f(P, { className: "sr-only", children: [
|
|
113
|
+
/* @__PURE__ */ r(K, { children: "Sidebar" }),
|
|
114
|
+
/* @__PURE__ */ r(j, { children: "Displays the mobile sidebar." })
|
|
114
115
|
] }),
|
|
115
116
|
/* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: i })
|
|
116
117
|
]
|
|
@@ -163,14 +164,14 @@ const te = o.forwardRef(({ side: a = "left", variant: e = "sidebar", collapsible
|
|
|
163
164
|
)
|
|
164
165
|
] });
|
|
165
166
|
});
|
|
166
|
-
|
|
167
|
-
const
|
|
167
|
+
re.displayName = "Sidebar";
|
|
168
|
+
const oe = o.forwardRef(
|
|
168
169
|
({ onClick: a, ...e }, t) => {
|
|
169
170
|
const { toggleSidebar: s } = N();
|
|
170
171
|
return /* @__PURE__ */ r(
|
|
171
172
|
R,
|
|
172
173
|
{
|
|
173
|
-
icon:
|
|
174
|
+
icon: U,
|
|
174
175
|
ref: t,
|
|
175
176
|
"data-sidebar": "trigger",
|
|
176
177
|
variant: "ghost",
|
|
@@ -183,8 +184,8 @@ const re = o.forwardRef(
|
|
|
183
184
|
);
|
|
184
185
|
}
|
|
185
186
|
);
|
|
186
|
-
|
|
187
|
-
const
|
|
187
|
+
oe.displayName = "SidebarTrigger";
|
|
188
|
+
const se = n({
|
|
188
189
|
base: [
|
|
189
190
|
"absolute inset-y-0 z-20 hidden w-[5px] -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-0 hover:after:-translate-x-1/2 hover:after:border-l hover:after:border-primary-border group-data-[side=left]:-right-[5px] group-data-[side=right]:left-0 sm:flex",
|
|
190
191
|
"cursor-ew-resize",
|
|
@@ -192,7 +193,7 @@ const oe = n({
|
|
|
192
193
|
"[[data-side=left][data-collapsible=offcanvas]_&]:-right-[2.5px]",
|
|
193
194
|
"[[data-side=right][data-collapsible=offcanvas]_&]:-left-[2.5px]"
|
|
194
195
|
]
|
|
195
|
-
}),
|
|
196
|
+
}), ie = o.forwardRef(
|
|
196
197
|
({ className: a, ...e }, t) => {
|
|
197
198
|
const { toggleSidebar: s } = N();
|
|
198
199
|
return /* @__PURE__ */ r(
|
|
@@ -204,58 +205,58 @@ const oe = n({
|
|
|
204
205
|
tabIndex: -1,
|
|
205
206
|
onClick: s,
|
|
206
207
|
title: "Toggle Sidebar",
|
|
207
|
-
className:
|
|
208
|
+
className: se({ className: a }),
|
|
208
209
|
...e
|
|
209
210
|
}
|
|
210
211
|
);
|
|
211
212
|
}
|
|
212
213
|
);
|
|
213
|
-
|
|
214
|
-
const
|
|
214
|
+
ie.displayName = "SidebarRail";
|
|
215
|
+
const ne = n({
|
|
215
216
|
base: [
|
|
216
217
|
"relative flex w-full flex-1 flex-col bg-secondary-bg",
|
|
217
218
|
"md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow"
|
|
218
219
|
]
|
|
219
|
-
}),
|
|
220
|
-
|
|
221
|
-
const
|
|
220
|
+
}), de = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("main", { ref: t, className: ne({ className: a }), ...e }));
|
|
221
|
+
de.displayName = "SidebarInset";
|
|
222
|
+
const le = n({
|
|
222
223
|
base: "h-8 w-full shadow-none"
|
|
223
|
-
}),
|
|
224
|
-
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
224
|
+
}), ce = o.forwardRef(
|
|
225
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r(F, { ref: t, "data-sidebar": "input", className: le({ className: a }), ...e })
|
|
225
226
|
);
|
|
226
|
-
|
|
227
|
-
const
|
|
227
|
+
ce.displayName = "SidebarInput";
|
|
228
|
+
const be = n({
|
|
228
229
|
base: "flex flex-col gap-2 p-2 group-data-[variant=floating]:px-2.5 overflow-y-hidden [scrollbar-gutter:stable]"
|
|
229
|
-
}), ue = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "header", className:
|
|
230
|
+
}), ue = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "header", className: be({ className: a }), ...e }));
|
|
230
231
|
ue.displayName = "SidebarHeader";
|
|
231
|
-
const
|
|
232
|
+
const pe = n({
|
|
232
233
|
base: "flex flex-col gap-2 p-2 group-data-[variant=floating]:px-2.5 overflow-y-hidden [scrollbar-gutter:stable]"
|
|
233
|
-
}),
|
|
234
|
-
|
|
235
|
-
const
|
|
234
|
+
}), fe = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "footer", className: pe({ className: a }), ...e }));
|
|
235
|
+
fe.displayName = "SidebarFooter";
|
|
236
|
+
const me = n({
|
|
236
237
|
base: "w-auto bg-secondary-border"
|
|
237
|
-
}),
|
|
238
|
+
}), ge = o.forwardRef(
|
|
238
239
|
({ className: a, ...e }, t) => /* @__PURE__ */ r(
|
|
239
|
-
|
|
240
|
+
$,
|
|
240
241
|
{
|
|
241
242
|
ref: t,
|
|
242
243
|
orientation: "horizontal",
|
|
243
244
|
"data-sidebar": "separator",
|
|
244
|
-
className:
|
|
245
|
+
className: me({ className: a }),
|
|
245
246
|
...e
|
|
246
247
|
}
|
|
247
248
|
)
|
|
248
249
|
);
|
|
249
|
-
|
|
250
|
-
const
|
|
250
|
+
ge.displayName = "SidebarSeparator";
|
|
251
|
+
const he = n({
|
|
251
252
|
slots: {
|
|
252
253
|
content: "flex flex-1 flex-col gap-2 [scrollbar-gutter:stable] group-data-[collapsible=icon]:overflow-hidden"
|
|
253
254
|
}
|
|
254
|
-
}),
|
|
255
|
+
}), ve = o.forwardRef(
|
|
255
256
|
({ className: a, children: e, ...t }, s) => {
|
|
256
|
-
const i =
|
|
257
|
+
const i = he();
|
|
257
258
|
return /* @__PURE__ */ r(
|
|
258
|
-
|
|
259
|
+
q,
|
|
259
260
|
{
|
|
260
261
|
ref: s,
|
|
261
262
|
"data-sidebar": "content",
|
|
@@ -267,54 +268,54 @@ const ge = n({
|
|
|
267
268
|
);
|
|
268
269
|
}
|
|
269
270
|
);
|
|
270
|
-
|
|
271
|
-
const
|
|
271
|
+
ve.displayName = "SidebarContent";
|
|
272
|
+
const ye = n({
|
|
272
273
|
base: "relative flex w-full min-w-0 flex-col p-2 group-data-[variant=floating]:px-2.5"
|
|
273
|
-
}),
|
|
274
|
-
|
|
275
|
-
const
|
|
274
|
+
}), Se = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "group", className: ye({ className: a }), ...e }));
|
|
275
|
+
Se.displayName = "SidebarGroup";
|
|
276
|
+
const xe = n({
|
|
276
277
|
base: [
|
|
277
278
|
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-secondary-fg/70 outline-none transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
278
279
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0"
|
|
279
280
|
]
|
|
280
|
-
}),
|
|
281
|
-
({ className: a, asChild: e = !1, ...t }, s) => /* @__PURE__ */ r(e ? y : "div", { ref: s, "data-sidebar": "group-label", className:
|
|
281
|
+
}), we = o.forwardRef(
|
|
282
|
+
({ className: a, asChild: e = !1, ...t }, s) => /* @__PURE__ */ r(e ? y : "div", { ref: s, "data-sidebar": "group-label", className: xe({ className: a }), ...t })
|
|
282
283
|
);
|
|
283
|
-
|
|
284
|
-
const
|
|
284
|
+
we.displayName = "SidebarGroupLabel";
|
|
285
|
+
const Ne = n({
|
|
285
286
|
base: [
|
|
286
287
|
"focus-visible:ring-primary2 absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-muted outline-none transition-transform hover:text-primary-fg focus-visible:shadow-focus [&>svg]:size-4 [&>svg]:shrink-0",
|
|
287
288
|
// Increases the hit area of the button on mobile.
|
|
288
289
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
289
290
|
"group-data-[collapsible=icon]:hidden"
|
|
290
291
|
]
|
|
291
|
-
}),
|
|
292
|
+
}), Me = o.forwardRef(
|
|
292
293
|
({ className: a, asChild: e = !1, ...t }, s) => /* @__PURE__ */ r(
|
|
293
294
|
e ? y : "button",
|
|
294
295
|
{
|
|
295
296
|
ref: s,
|
|
296
297
|
"data-sidebar": "group-action",
|
|
297
|
-
className:
|
|
298
|
+
className: Ne({ className: a }),
|
|
298
299
|
...t
|
|
299
300
|
}
|
|
300
301
|
)
|
|
301
302
|
);
|
|
302
|
-
|
|
303
|
-
const
|
|
303
|
+
Me.displayName = "SidebarGroupAction";
|
|
304
|
+
const Ie = n({
|
|
304
305
|
base: "w-full text-sm"
|
|
305
|
-
}),
|
|
306
|
-
({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "group-content", className:
|
|
306
|
+
}), Re = o.forwardRef(
|
|
307
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "group-content", className: Ie({ className: a }), ...e })
|
|
307
308
|
);
|
|
308
|
-
|
|
309
|
-
const
|
|
309
|
+
Re.displayName = "SidebarGroupContent";
|
|
310
|
+
const Ce = n({
|
|
310
311
|
base: "flex w-full min-w-0 flex-col gap-1"
|
|
311
|
-
}),
|
|
312
|
-
|
|
313
|
-
const
|
|
312
|
+
}), ke = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("ul", { ref: t, "data-sidebar": "menu", className: Ce({ className: a }), ...e }));
|
|
313
|
+
ke.displayName = "SidebarMenu";
|
|
314
|
+
const _e = n({
|
|
314
315
|
base: "group/menu-item relative"
|
|
315
|
-
}),
|
|
316
|
-
|
|
317
|
-
const
|
|
316
|
+
}), ze = o.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r("li", { ref: t, "data-sidebar": "menu-item", className: _e({ className: a }), ...e }));
|
|
317
|
+
ze.displayName = "SidebarMenuItem";
|
|
318
|
+
const Te = n({
|
|
318
319
|
base: [
|
|
319
320
|
"peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md bg-primary-bg p-2 text-left text-sm text-secondary-fg outline-none transition-[width,height,padding]",
|
|
320
321
|
"hover:bg-primary-bg-hover hover:text-primary-fg focus-visible:shadow-focus",
|
|
@@ -343,27 +344,27 @@ const ze = n({
|
|
|
343
344
|
variant: "default",
|
|
344
345
|
size: "default"
|
|
345
346
|
}
|
|
346
|
-
}),
|
|
347
|
-
const
|
|
348
|
-
|
|
347
|
+
}), Be = o.forwardRef(({ asChild: a = !1, isActive: e = !1, variant: t = "default", size: s = "default", tooltip: i, className: d, ...p }, m) => {
|
|
348
|
+
const b = a ? y : "button", { isMobile: g, state: l } = N(), h = /* @__PURE__ */ r(
|
|
349
|
+
b,
|
|
349
350
|
{
|
|
350
351
|
ref: m,
|
|
351
352
|
"data-sidebar": "menu-button",
|
|
352
353
|
"data-size": s,
|
|
353
354
|
"data-active": e,
|
|
354
|
-
className: w(
|
|
355
|
+
className: w(Te({ variant: t, size: s }), d),
|
|
355
356
|
...p
|
|
356
357
|
}
|
|
357
358
|
);
|
|
358
359
|
return i ? (typeof i == "string" && (i = {
|
|
359
360
|
children: i
|
|
360
|
-
}), /* @__PURE__ */ f(
|
|
361
|
-
/* @__PURE__ */ r(
|
|
362
|
-
/* @__PURE__ */ r(
|
|
361
|
+
}), /* @__PURE__ */ f(E, { children: [
|
|
362
|
+
/* @__PURE__ */ r(G, { asChild: !0, children: h }),
|
|
363
|
+
/* @__PURE__ */ r(H, { side: "right", align: "center", hidden: l !== "collapsed" || g, ...i })
|
|
363
364
|
] })) : h;
|
|
364
365
|
});
|
|
365
|
-
|
|
366
|
-
const
|
|
366
|
+
Be.displayName = "SidebarMenuButton";
|
|
367
|
+
const Ae = n({
|
|
367
368
|
base: [
|
|
368
369
|
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-muted outline-none transition-transform hover:text-primary-fg focus-visible:ring-1 focus-visible:ring-primary peer-hover/menu-button:text-primary-fg [&>svg]:size-4 [&>svg]:shrink-0",
|
|
369
370
|
// Increases the hit area of the button on mobile.
|
|
@@ -378,17 +379,17 @@ const Be = n({
|
|
|
378
379
|
true: "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-primary-accent md:opacity-0"
|
|
379
380
|
}
|
|
380
381
|
}
|
|
381
|
-
}),
|
|
382
|
+
}), De = o.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...s }, i) => /* @__PURE__ */ r(
|
|
382
383
|
e ? y : "button",
|
|
383
384
|
{
|
|
384
385
|
ref: i,
|
|
385
386
|
"data-sidebar": "menu-action",
|
|
386
|
-
className:
|
|
387
|
+
className: Ae({ isHover: t, className: a }),
|
|
387
388
|
...s
|
|
388
389
|
}
|
|
389
390
|
));
|
|
390
|
-
|
|
391
|
-
const
|
|
391
|
+
De.displayName = "SidebarMenuAction";
|
|
392
|
+
const Ee = n({
|
|
392
393
|
base: [
|
|
393
394
|
"pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-normal tabular-nums leading-none text-muted",
|
|
394
395
|
"peer-hover/menu-button:text-muted peer-disabled/menu-button:opacity-50 peer-data-[active=true]/menu-button:text-muted",
|
|
@@ -397,18 +398,18 @@ const Ae = n({
|
|
|
397
398
|
"peer-data-[size=lg]/menu-button:top-2.5",
|
|
398
399
|
"group-data-[collapsible=icon]:hidden"
|
|
399
400
|
]
|
|
400
|
-
}),
|
|
401
|
-
({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "menu-badge", className:
|
|
401
|
+
}), Ge = o.forwardRef(
|
|
402
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r("div", { ref: t, "data-sidebar": "menu-badge", className: Ee({ className: a }), ...e })
|
|
402
403
|
);
|
|
403
|
-
|
|
404
|
-
const
|
|
404
|
+
Ge.displayName = "SidebarMenuBadge";
|
|
405
|
+
const He = n({
|
|
405
406
|
slots: {
|
|
406
407
|
wrapper: "flex h-8 items-center gap-2 rounded-md px-2",
|
|
407
408
|
skeleton: "h-4 max-w-[--skeleton-width] flex-1",
|
|
408
409
|
skeletonIcon: "size-4 rounded-md"
|
|
409
410
|
}
|
|
410
411
|
}), Le = o.forwardRef(({ className: a, showIcon: e = !1, ...t }, s) => {
|
|
411
|
-
const i = o.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []), d =
|
|
412
|
+
const i = o.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []), d = He();
|
|
412
413
|
return /* @__PURE__ */ f("div", { ref: s, "data-sidebar": "menu-skeleton", className: d.wrapper({ className: a }), ...t, children: [
|
|
413
414
|
e && /* @__PURE__ */ r(I, { className: d.skeletonIcon(), "data-sidebar": "menu-skeleton-icon" }),
|
|
414
415
|
/* @__PURE__ */ r(
|
|
@@ -424,22 +425,22 @@ const Ge = n({
|
|
|
424
425
|
] });
|
|
425
426
|
});
|
|
426
427
|
Le.displayName = "SidebarMenuSkeleton";
|
|
427
|
-
const
|
|
428
|
+
const Oe = n({
|
|
428
429
|
base: [
|
|
429
430
|
"ml-3.5 flex min-w-0 flex-col gap-1 border-l border-secondary-border py-0.5 pl-2.5",
|
|
430
431
|
"group-data-[collapsible=icon]:hidden"
|
|
431
432
|
]
|
|
432
|
-
}),
|
|
433
|
-
({ className: a, ...e }, t) => /* @__PURE__ */ r("ul", { ref: t, "data-sidebar": "menu-sub", className:
|
|
433
|
+
}), Pe = o.forwardRef(
|
|
434
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r("ul", { ref: t, "data-sidebar": "menu-sub", className: Oe({ className: a }), ...e })
|
|
434
435
|
);
|
|
435
|
-
|
|
436
|
-
const
|
|
436
|
+
Pe.displayName = "SidebarMenuSub";
|
|
437
|
+
const Ke = n({
|
|
437
438
|
base: "rounded-md focus-visible:shadow-focus focus-visible:outline-none"
|
|
438
|
-
}),
|
|
439
|
-
({ className: a, ...e }, t) => /* @__PURE__ */ r("li", { ref: t, className:
|
|
439
|
+
}), je = o.forwardRef(
|
|
440
|
+
({ className: a, ...e }, t) => /* @__PURE__ */ r("li", { ref: t, className: Ke({ className: a }), ...e })
|
|
440
441
|
);
|
|
441
|
-
|
|
442
|
-
const
|
|
442
|
+
je.displayName = "SidebarMenuSubItem";
|
|
443
|
+
const Fe = n({
|
|
443
444
|
base: [
|
|
444
445
|
"flex h-7 min-w-0 items-center gap-2 overflow-hidden rounded-md px-2 text-secondary-fg outline-none hover:bg-secondary-bg-hover hover:text-primary-fg focus-visible:mr-0.5 focus-visible:shadow-focus 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 [&>svg]:text-primary-fg",
|
|
445
446
|
"data-[active=true]:bg-primary-bg-hover data-[active=true]:text-primary-accent",
|
|
@@ -451,59 +452,59 @@ const je = n({
|
|
|
451
452
|
md: "text-sm"
|
|
452
453
|
}
|
|
453
454
|
}
|
|
454
|
-
}),
|
|
455
|
+
}), $e = o.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: s, ...i }, d) => /* @__PURE__ */ r(
|
|
455
456
|
a ? y : "a",
|
|
456
457
|
{
|
|
457
458
|
ref: d,
|
|
458
459
|
"data-sidebar": "menu-sub-button",
|
|
459
460
|
"data-size": e,
|
|
460
461
|
"data-active": t,
|
|
461
|
-
className:
|
|
462
|
+
className: Fe({ size: e, className: s }),
|
|
462
463
|
...i
|
|
463
464
|
}
|
|
464
465
|
));
|
|
465
|
-
|
|
466
|
-
const
|
|
466
|
+
$e.displayName = "SidebarMenuSubButton";
|
|
467
|
+
const qe = n({
|
|
467
468
|
slots: {
|
|
468
469
|
wrapper: "group/insertion flex cursor-pointer flex-row items-center border-none bg-transparent p-0",
|
|
469
470
|
icon: "peer/icon h-4 w-4 p-0.5 text-muted opacity-0 group-hover/insertion:opacity-100",
|
|
470
471
|
line: "h-px w-full bg-transparent group-hover/insertion:bg-muted peer-hover/icon:bg-primary-fg"
|
|
471
472
|
}
|
|
472
|
-
}),
|
|
473
|
+
}), We = o.forwardRef(
|
|
473
474
|
({ className: a, ...e }, t) => {
|
|
474
|
-
const s =
|
|
475
|
+
const s = qe();
|
|
475
476
|
return /* @__PURE__ */ f("div", { "data-sidebar": "sidebar-insertion-line", className: s.wrapper({ className: a }), ref: t, ...e, children: [
|
|
476
|
-
/* @__PURE__ */ r(R, { icon:
|
|
477
|
+
/* @__PURE__ */ r(R, { icon: W, size: "xs", className: s.icon(), variant: "link" }),
|
|
477
478
|
/* @__PURE__ */ r("div", { className: s.line() })
|
|
478
479
|
] });
|
|
479
480
|
}
|
|
480
481
|
);
|
|
481
|
-
|
|
482
|
+
We.displayName = "SidebarInsertionLine";
|
|
482
483
|
export {
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
484
|
+
re as Sidebar,
|
|
485
|
+
ve as SidebarContent,
|
|
486
|
+
fe as SidebarFooter,
|
|
487
|
+
Se as SidebarGroup,
|
|
488
|
+
Me as SidebarGroupAction,
|
|
489
|
+
Re as SidebarGroupContent,
|
|
490
|
+
we as SidebarGroupLabel,
|
|
490
491
|
ue as SidebarHeader,
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
492
|
+
ce as SidebarInput,
|
|
493
|
+
We as SidebarInsertionLine,
|
|
494
|
+
de as SidebarInset,
|
|
495
|
+
ke as SidebarMenu,
|
|
496
|
+
De as SidebarMenuAction,
|
|
497
|
+
Ge as SidebarMenuBadge,
|
|
498
|
+
Be as SidebarMenuButton,
|
|
499
|
+
ze as SidebarMenuItem,
|
|
499
500
|
Le as SidebarMenuSkeleton,
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
501
|
+
Pe as SidebarMenuSub,
|
|
502
|
+
$e as SidebarMenuSubButton,
|
|
503
|
+
je as SidebarMenuSubItem,
|
|
504
|
+
te as SidebarProvider,
|
|
505
|
+
ie as SidebarRail,
|
|
506
|
+
ge as SidebarSeparator,
|
|
507
|
+
oe as SidebarTrigger,
|
|
507
508
|
N as useSidebar
|
|
508
509
|
};
|
|
509
510
|
//# sourceMappingURL=sidebar.js.map
|