iguazio.dashboard-react-controls 3.2.26 → 3.2.27
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.
|
@@ -3,7 +3,7 @@ import * as r from "react";
|
|
|
3
3
|
import { Slot as N } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva as T } from "class-variance-authority";
|
|
5
5
|
import { MenuIcon as k, ChevronLeftIcon as E, ChevronRightIcon as A } from "lucide-react";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as s } from "../../lib/utils.mjs";
|
|
7
7
|
import { Button as C } from "./button.mjs";
|
|
8
8
|
import { Input as B } from "./input.mjs";
|
|
9
9
|
import { Separator as O } from "./separator.mjs";
|
|
@@ -16,7 +16,7 @@ const F = "sidebar_state", j = 3600 * 24 * 7, V = "15rem", $ = "70px", q = "b",
|
|
|
16
16
|
throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
17
17
|
return e;
|
|
18
18
|
}, J = r.forwardRef(
|
|
19
|
-
({ children: e, className: a, defaultOpen: t = !0, onOpenChange:
|
|
19
|
+
({ children: e, className: a, defaultOpen: t = !0, onOpenChange: o, open: n, style: c, ...m }, w) => {
|
|
20
20
|
const [g, v] = r.useState(() => {
|
|
21
21
|
try {
|
|
22
22
|
return JSON.parse(localStorage.getItem("isNavbarPinned") || "false");
|
|
@@ -26,9 +26,9 @@ const F = "sidebar_state", j = 3600 * 24 * 7, V = "15rem", $ = "70px", q = "b",
|
|
|
26
26
|
}), [p, d] = r.useState(!1), [S, R] = r.useState(t || g), u = n ?? S, b = r.useCallback(
|
|
27
27
|
(f) => {
|
|
28
28
|
const l = typeof f == "function" ? f(u) : f;
|
|
29
|
-
|
|
29
|
+
o ? o(l) : R(l), document.cookie = `${F}=${l}; path=/; max-age=${j}`;
|
|
30
30
|
},
|
|
31
|
-
[
|
|
31
|
+
[o, u]
|
|
32
32
|
), h = r.useCallback(() => b((f) => !f), [b]), x = r.useCallback(() => {
|
|
33
33
|
v((f) => {
|
|
34
34
|
const l = !f;
|
|
@@ -62,7 +62,7 @@ const F = "sidebar_state", j = 3600 * 24 * 7, V = "15rem", $ = "70px", q = "b",
|
|
|
62
62
|
"--sidebar-width-icon": $,
|
|
63
63
|
...c
|
|
64
64
|
},
|
|
65
|
-
className:
|
|
65
|
+
className: s(
|
|
66
66
|
"group/sidebar-wrapper flex h-full w-full has-[[data-variant=inset]]:bg-sidebar",
|
|
67
67
|
a
|
|
68
68
|
),
|
|
@@ -79,7 +79,7 @@ const U = r.forwardRef(
|
|
|
79
79
|
children: e,
|
|
80
80
|
className: a,
|
|
81
81
|
collapsible: t = "offcanvas",
|
|
82
|
-
side:
|
|
82
|
+
side: o = "left",
|
|
83
83
|
variant: n = "sidebar",
|
|
84
84
|
...c
|
|
85
85
|
}, m) => {
|
|
@@ -90,7 +90,7 @@ const U = r.forwardRef(
|
|
|
90
90
|
}, [v, w, d, u]), t === "none" ? /* @__PURE__ */ i(
|
|
91
91
|
"nav",
|
|
92
92
|
{
|
|
93
|
-
className:
|
|
93
|
+
className: s(
|
|
94
94
|
"flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
|
|
95
95
|
a
|
|
96
96
|
),
|
|
@@ -102,7 +102,7 @@ const U = r.forwardRef(
|
|
|
102
102
|
"nav",
|
|
103
103
|
{
|
|
104
104
|
ref: m,
|
|
105
|
-
className:
|
|
105
|
+
className: s(
|
|
106
106
|
"group peer relative shrink-0 self-stretch overflow-visible text-sidebar-foreground",
|
|
107
107
|
"transition-[width] duration-300 ease-linear",
|
|
108
108
|
d && p ? "w-[--sidebar-width]" : "w-[--sidebar-width-icon]"
|
|
@@ -110,7 +110,7 @@ const U = r.forwardRef(
|
|
|
110
110
|
"data-state": S,
|
|
111
111
|
"data-collapsible": S === "collapsed" ? t : "",
|
|
112
112
|
"data-variant": n,
|
|
113
|
-
"data-side":
|
|
113
|
+
"data-side": o,
|
|
114
114
|
"data-pinned": d,
|
|
115
115
|
onMouseEnter: () => {
|
|
116
116
|
clearTimeout(h.current), clearTimeout(b.current), g(!0), d || (b.current = setTimeout(() => u(!0), 100));
|
|
@@ -124,11 +124,11 @@ const U = r.forwardRef(
|
|
|
124
124
|
children: /* @__PURE__ */ i(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
|
-
className:
|
|
127
|
+
className: s(
|
|
128
128
|
"absolute inset-y-0 left-0 z-20 flex flex-col transition-[width] duration-300 ease-linear md:flex",
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
n === "floating" || n === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" :
|
|
129
|
+
o === "left" && d && "group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]",
|
|
130
|
+
o === "right" && d && "group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
|
|
131
|
+
n === "floating" || n === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]" : s(
|
|
132
132
|
"group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
|
133
133
|
p && !d || d && S === "expanded" ? "w-[--sidebar-width]" : "w-[--sidebar-width-icon]"
|
|
134
134
|
),
|
|
@@ -148,12 +148,12 @@ const U = r.forwardRef(
|
|
|
148
148
|
variant: "outline",
|
|
149
149
|
tooltip: d ? "Unpin sidebar" : "Pin sidebar",
|
|
150
150
|
"data-testid": "pin-sidebar-button",
|
|
151
|
+
"data-sidebar": "pin",
|
|
151
152
|
side: "right",
|
|
152
|
-
className:
|
|
153
|
+
className: s(
|
|
153
154
|
"absolute top-2 left-full border bg-[#FAFAFA] border-gray-200 border-solid",
|
|
154
155
|
"w-fit h-fit rounded-l-none border-l-0 py-2 pr-[3px] pl-[1px]",
|
|
155
|
-
"transition-
|
|
156
|
-
d ? "opacity-100" : "opacity-0 group-hover:opacity-100"
|
|
156
|
+
"transition-visibility hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
|
|
157
157
|
),
|
|
158
158
|
onClick: R,
|
|
159
159
|
children: d ? /* @__PURE__ */ i(H, { "data-testid": "closeed-pin" }) : /* @__PURE__ */ i(K, { "data-testid": "opened-pin" })
|
|
@@ -170,7 +170,7 @@ const U = r.forwardRef(
|
|
|
170
170
|
);
|
|
171
171
|
U.displayName = "Sidebar";
|
|
172
172
|
const W = r.forwardRef(
|
|
173
|
-
({ className: e, icon: a = "menu", onClick: t, ...
|
|
173
|
+
({ className: e, icon: a = "menu", onClick: t, ...o }, n) => {
|
|
174
174
|
const { toggleSidebar: c } = y();
|
|
175
175
|
return /* @__PURE__ */ _(
|
|
176
176
|
C,
|
|
@@ -179,11 +179,11 @@ const W = r.forwardRef(
|
|
|
179
179
|
"data-sidebar": "trigger",
|
|
180
180
|
variant: "ghost",
|
|
181
181
|
size: "icon",
|
|
182
|
-
className:
|
|
182
|
+
className: s("size-9", e),
|
|
183
183
|
onClick: (m) => {
|
|
184
184
|
t == null || t(m), c();
|
|
185
185
|
},
|
|
186
|
-
...
|
|
186
|
+
...o,
|
|
187
187
|
children: [
|
|
188
188
|
a === "menu" && /* @__PURE__ */ i(k, { className: "size-4 shrink-0" }),
|
|
189
189
|
a === "chevronLeft" && /* @__PURE__ */ i(E, { className: "size-4 shrink-0" }),
|
|
@@ -196,7 +196,7 @@ const W = r.forwardRef(
|
|
|
196
196
|
);
|
|
197
197
|
W.displayName = "SidebarTrigger";
|
|
198
198
|
const X = r.forwardRef(({ className: e, ...a }, t) => {
|
|
199
|
-
const { toggleSidebar:
|
|
199
|
+
const { toggleSidebar: o } = y();
|
|
200
200
|
return /* @__PURE__ */ i(
|
|
201
201
|
"button",
|
|
202
202
|
{
|
|
@@ -204,9 +204,9 @@ const X = r.forwardRef(({ className: e, ...a }, t) => {
|
|
|
204
204
|
"data-sidebar": "rail",
|
|
205
205
|
"aria-label": "Toggle Sidebar",
|
|
206
206
|
tabIndex: -1,
|
|
207
|
-
onClick:
|
|
207
|
+
onClick: o,
|
|
208
208
|
title: "Toggle Sidebar",
|
|
209
|
-
className:
|
|
209
|
+
className: s(
|
|
210
210
|
"absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex",
|
|
211
211
|
"[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
|
|
212
212
|
"[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
|
|
@@ -225,7 +225,7 @@ const Y = r.forwardRef(
|
|
|
225
225
|
"main",
|
|
226
226
|
{
|
|
227
227
|
ref: t,
|
|
228
|
-
className:
|
|
228
|
+
className: s(
|
|
229
229
|
"relative flex min-h-0 flex-1 flex-col bg-background transition-[width] duration-300 ease-linear",
|
|
230
230
|
"peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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",
|
|
231
231
|
e
|
|
@@ -241,7 +241,7 @@ const Q = r.forwardRef(
|
|
|
241
241
|
{
|
|
242
242
|
ref: t,
|
|
243
243
|
"data-sidebar": "input",
|
|
244
|
-
className:
|
|
244
|
+
className: s(
|
|
245
245
|
"h-9 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",
|
|
246
246
|
e
|
|
247
247
|
),
|
|
@@ -256,7 +256,7 @@ const Z = r.forwardRef(
|
|
|
256
256
|
{
|
|
257
257
|
ref: t,
|
|
258
258
|
"data-sidebar": "header",
|
|
259
|
-
className:
|
|
259
|
+
className: s("flex gap-2 py-3.5", e),
|
|
260
260
|
...a
|
|
261
261
|
}
|
|
262
262
|
)
|
|
@@ -268,7 +268,7 @@ const ee = r.forwardRef(
|
|
|
268
268
|
{
|
|
269
269
|
ref: t,
|
|
270
270
|
"data-sidebar": "footer",
|
|
271
|
-
className:
|
|
271
|
+
className: s("flex flex-col gap-2 p-3", e),
|
|
272
272
|
...a
|
|
273
273
|
}
|
|
274
274
|
)
|
|
@@ -279,7 +279,7 @@ const ae = r.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ i(
|
|
|
279
279
|
{
|
|
280
280
|
ref: t,
|
|
281
281
|
"data-sidebar": "separator",
|
|
282
|
-
className:
|
|
282
|
+
className: s("mx-5 mb-2 w-auto bg-sidebar-border", e),
|
|
283
283
|
...a
|
|
284
284
|
}
|
|
285
285
|
));
|
|
@@ -290,7 +290,7 @@ const te = r.forwardRef(
|
|
|
290
290
|
{
|
|
291
291
|
ref: t,
|
|
292
292
|
"data-sidebar": "content",
|
|
293
|
-
className:
|
|
293
|
+
className: s(
|
|
294
294
|
"flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden",
|
|
295
295
|
e
|
|
296
296
|
),
|
|
@@ -305,19 +305,19 @@ const re = r.forwardRef(
|
|
|
305
305
|
{
|
|
306
306
|
ref: t,
|
|
307
307
|
"data-sidebar": "group",
|
|
308
|
-
className:
|
|
308
|
+
className: s("relative flex w-full min-w-0 flex-col p-3", e),
|
|
309
309
|
...a
|
|
310
310
|
}
|
|
311
311
|
)
|
|
312
312
|
);
|
|
313
313
|
re.displayName = "SidebarGroup";
|
|
314
314
|
const ie = r.forwardRef(
|
|
315
|
-
({ asChild: e = !1, className: a, ...t },
|
|
315
|
+
({ asChild: e = !1, className: a, ...t }, o) => /* @__PURE__ */ i(
|
|
316
316
|
e ? N : "div",
|
|
317
317
|
{
|
|
318
|
-
ref:
|
|
318
|
+
ref: o,
|
|
319
319
|
"data-sidebar": "group-label",
|
|
320
|
-
className:
|
|
320
|
+
className: s(
|
|
321
321
|
"flex h-9 shrink-0 items-center rounded-md px-2.5 text-sm font-medium outline-none whitespace-nowrap ring-sidebar-ring focus-visible:ring-2 [&>svg]:size-5 [&>svg]:shrink-0",
|
|
322
322
|
"group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
|
|
323
323
|
a
|
|
@@ -327,13 +327,13 @@ const ie = r.forwardRef(
|
|
|
327
327
|
)
|
|
328
328
|
);
|
|
329
329
|
ie.displayName = "SidebarGroupLabel";
|
|
330
|
-
const
|
|
331
|
-
({ asChild: e = !1, className: a, ...t },
|
|
330
|
+
const se = r.forwardRef(
|
|
331
|
+
({ asChild: e = !1, className: a, ...t }, o) => /* @__PURE__ */ i(
|
|
332
332
|
e ? N : "button",
|
|
333
333
|
{
|
|
334
|
-
ref:
|
|
334
|
+
ref: o,
|
|
335
335
|
"data-sidebar": "group-action",
|
|
336
|
-
className:
|
|
336
|
+
className: s(
|
|
337
337
|
"absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-5 [&>svg]:shrink-0",
|
|
338
338
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
339
339
|
"group-data-[collapsible=icon]:hidden",
|
|
@@ -343,26 +343,26 @@ const oe = r.forwardRef(
|
|
|
343
343
|
}
|
|
344
344
|
)
|
|
345
345
|
);
|
|
346
|
-
|
|
347
|
-
const
|
|
346
|
+
se.displayName = "SidebarGroupAction";
|
|
347
|
+
const oe = r.forwardRef(
|
|
348
348
|
({ className: e, ...a }, t) => /* @__PURE__ */ i(
|
|
349
349
|
"div",
|
|
350
350
|
{
|
|
351
351
|
ref: t,
|
|
352
352
|
"data-sidebar": "group-content",
|
|
353
|
-
className:
|
|
353
|
+
className: s("w-full text-sm", e),
|
|
354
354
|
...a
|
|
355
355
|
}
|
|
356
356
|
)
|
|
357
357
|
);
|
|
358
|
-
|
|
358
|
+
oe.displayName = "SidebarGroupContent";
|
|
359
359
|
const ne = r.forwardRef(
|
|
360
360
|
({ className: e, ...a }, t) => /* @__PURE__ */ i(
|
|
361
361
|
"ul",
|
|
362
362
|
{
|
|
363
363
|
ref: t,
|
|
364
364
|
"data-sidebar": "menu",
|
|
365
|
-
className:
|
|
365
|
+
className: s("flex w-full min-w-0 p-0 m-0 flex-col gap-1 items-center", e),
|
|
366
366
|
...a
|
|
367
367
|
}
|
|
368
368
|
)
|
|
@@ -374,7 +374,7 @@ const de = r.forwardRef(
|
|
|
374
374
|
{
|
|
375
375
|
ref: t,
|
|
376
376
|
"data-sidebar": "menu-item",
|
|
377
|
-
className:
|
|
377
|
+
className: s("group/menu-item flex relative w-full", e),
|
|
378
378
|
...a
|
|
379
379
|
}
|
|
380
380
|
)
|
|
@@ -404,7 +404,7 @@ const le = T(
|
|
|
404
404
|
asChild: e = !1,
|
|
405
405
|
className: a,
|
|
406
406
|
isActive: t = !1,
|
|
407
|
-
size:
|
|
407
|
+
size: o = "default",
|
|
408
408
|
tooltip: n,
|
|
409
409
|
variant: c = "default",
|
|
410
410
|
...m
|
|
@@ -414,9 +414,9 @@ const le = T(
|
|
|
414
414
|
{
|
|
415
415
|
ref: w,
|
|
416
416
|
"data-sidebar": "menu-button",
|
|
417
|
-
"data-size":
|
|
417
|
+
"data-size": o,
|
|
418
418
|
"data-active": t,
|
|
419
|
-
className:
|
|
419
|
+
className: s(le({ variant: c, size: o }), a),
|
|
420
420
|
...m
|
|
421
421
|
}
|
|
422
422
|
);
|
|
@@ -436,12 +436,12 @@ const le = T(
|
|
|
436
436
|
);
|
|
437
437
|
ce.displayName = "SidebarMenuButton";
|
|
438
438
|
const ue = r.forwardRef(
|
|
439
|
-
({ asChild: e = !1, className: a, showOnHover: t = !1, ...
|
|
439
|
+
({ asChild: e = !1, className: a, showOnHover: t = !1, ...o }, n) => /* @__PURE__ */ i(
|
|
440
440
|
e ? N : "button",
|
|
441
441
|
{
|
|
442
442
|
ref: n,
|
|
443
443
|
"data-sidebar": "menu-action",
|
|
444
|
-
className:
|
|
444
|
+
className: s(
|
|
445
445
|
"absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0",
|
|
446
446
|
"after:absolute after:-inset-2 after:md:hidden",
|
|
447
447
|
"peer-data-[size=sm]/menu-button:top-1",
|
|
@@ -451,7 +451,7 @@ const ue = r.forwardRef(
|
|
|
451
451
|
t && "hidden group-hocus:flex",
|
|
452
452
|
a
|
|
453
453
|
),
|
|
454
|
-
...
|
|
454
|
+
...o
|
|
455
455
|
}
|
|
456
456
|
)
|
|
457
457
|
);
|
|
@@ -462,7 +462,7 @@ const be = r.forwardRef(
|
|
|
462
462
|
{
|
|
463
463
|
ref: t,
|
|
464
464
|
"data-sidebar": "menu-badge",
|
|
465
|
-
className:
|
|
465
|
+
className: s(
|
|
466
466
|
"inline-flex h-5 items-center rounded-full bg-sidebar-accent px-2 py-0.5 text-xs font-medium text-sidebar-accent-foreground",
|
|
467
467
|
e
|
|
468
468
|
),
|
|
@@ -477,7 +477,7 @@ const fe = r.forwardRef(
|
|
|
477
477
|
{
|
|
478
478
|
ref: t,
|
|
479
479
|
"data-sidebar": "menu-sub",
|
|
480
|
-
className:
|
|
480
|
+
className: s("flex flex-col gap-1 p-0", e),
|
|
481
481
|
...a
|
|
482
482
|
}
|
|
483
483
|
)
|
|
@@ -489,24 +489,24 @@ const pe = r.forwardRef(
|
|
|
489
489
|
{
|
|
490
490
|
ref: t,
|
|
491
491
|
"data-sidebar": "menu-sub-item",
|
|
492
|
-
className:
|
|
492
|
+
className: s("flex w-full", e),
|
|
493
493
|
...a
|
|
494
494
|
}
|
|
495
495
|
)
|
|
496
496
|
);
|
|
497
497
|
pe.displayName = "SidebarMenuSubItem";
|
|
498
498
|
const me = r.forwardRef(
|
|
499
|
-
({ asChild: e = !1, className: a, size: t = "default", ...
|
|
499
|
+
({ asChild: e = !1, className: a, size: t = "default", ...o }, n) => /* @__PURE__ */ i(
|
|
500
500
|
e ? N : "button",
|
|
501
501
|
{
|
|
502
502
|
ref: n,
|
|
503
503
|
"data-sidebar": "menu-sub-button",
|
|
504
504
|
"data-size": t,
|
|
505
|
-
className:
|
|
505
|
+
className: s(
|
|
506
506
|
"flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 whitespace-nowrap [&>svg]:size-4 [&>svg]:shrink-0",
|
|
507
507
|
a
|
|
508
508
|
),
|
|
509
|
-
...
|
|
509
|
+
...o
|
|
510
510
|
}
|
|
511
511
|
)
|
|
512
512
|
);
|
|
@@ -516,8 +516,8 @@ export {
|
|
|
516
516
|
te as SidebarContent,
|
|
517
517
|
ee as SidebarFooter,
|
|
518
518
|
re as SidebarGroup,
|
|
519
|
-
|
|
520
|
-
|
|
519
|
+
se as SidebarGroupAction,
|
|
520
|
+
oe as SidebarGroupContent,
|
|
521
521
|
ie as SidebarGroupLabel,
|
|
522
522
|
Z as SidebarHeader,
|
|
523
523
|
Q as SidebarInput,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.mjs","sources":["../../../../src/lib/nextGenComponents/components/ui/sidebar.tsx"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { ChevronLeftIcon, ChevronRightIcon, MenuIcon } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\nimport { Button } from './button'\nimport { Input } from './input'\nimport { Separator } from './separator'\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip'\n\nimport SidebarClose from '../../../images/navbar-closed-icon.svg?react'\nimport SidebarOpen from '../../../images/navbar-opened-icon.svg?react'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '15rem'\nconst SIDEBAR_WIDTH_ICON = '70px'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ninterface SidebarContextValue {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (value: boolean | ((prev: boolean) => boolean)) => void\n toggleSidebar: () => void\n pinned: boolean\n togglePin: () => void\n hoverLocked: boolean\n setHoverLocked: (locked: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextValue | null>(null)\n\nconst useSidebar = (): SidebarContextValue => {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.')\n }\n return context\n}\n\ninterface SidebarProviderProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n open?: boolean\n}\n\nconst SidebarProvider = React.forwardRef<HTMLDivElement, SidebarProviderProps>(\n (\n { children, className, defaultOpen = true, onOpenChange, open: openProp, style, ...props },\n ref\n ) => {\n const [pinned, setPinned] = React.useState<boolean>(() => {\n try {\n return JSON.parse(localStorage.getItem('isNavbarPinned') || 'false')\n } catch {\n return false\n }\n })\n const [hoverLocked, setHoverLocked] = React.useState(false)\n const [_open, _setOpen] = React.useState(defaultOpen || pinned)\n const open = openProp ?? _open\n\n const setOpen = React.useCallback(\n (value: boolean | ((prev: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value\n if (onOpenChange) {\n onOpenChange(openState)\n } else {\n _setOpen(openState)\n }\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [onOpenChange, open]\n )\n\n const toggleSidebar = React.useCallback(() => setOpen(prev => !prev), [setOpen])\n\n const togglePin = React.useCallback(() => {\n setPinned(prev => {\n const newValue = !prev\n localStorage.setItem('isNavbarPinned', JSON.stringify(newValue))\n setOpen(newValue)\n return newValue\n })\n }, [setOpen])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [toggleSidebar])\n\n const state: 'expanded' | 'collapsed' = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n toggleSidebar,\n pinned,\n togglePin,\n hoverLocked,\n setHoverLocked\n }),\n [state, open, setOpen, toggleSidebar, pinned, togglePin, hoverLocked]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper flex h-full w-full has-[[data-variant=inset]]:bg-sidebar',\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = 'SidebarProvider'\n\ninterface SidebarProps extends React.HTMLAttributes<HTMLElement> {\n children: React.ReactNode\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}\n\nconst Sidebar = React.forwardRef<HTMLElement, SidebarProps>(\n (\n {\n children,\n className,\n collapsible = 'offcanvas',\n side = 'left',\n variant = 'sidebar',\n ...props\n },\n ref\n ) => {\n const [isMouseOver, setIsMouseOver] = React.useState(false)\n const { hoverLocked, open, pinned, state, togglePin, setOpen } = useSidebar()\n const openTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const closeTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n\n React.useEffect(() => {\n if (!hoverLocked && !isMouseOver && !pinned) {\n closeTimerRef.current = setTimeout(() => setOpen(false), 200)\n return () => clearTimeout(closeTimerRef.current!)\n }\n }, [hoverLocked, isMouseOver, pinned, setOpen])\n\n if (collapsible === 'none') {\n return (\n <nav\n className={cn(\n 'flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground',\n className\n )}\n ref={ref as React.Ref<HTMLElement>}\n {...props}\n >\n {children}\n </nav>\n )\n }\n\n return (\n <nav\n ref={ref as React.Ref<HTMLElement>}\n className={cn(\n 'group peer relative shrink-0 self-stretch overflow-visible text-sidebar-foreground',\n 'transition-[width] duration-300 ease-linear',\n pinned && open ? 'w-[--sidebar-width]' : 'w-[--sidebar-width-icon]'\n )}\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-pinned={pinned}\n onMouseEnter={() => {\n clearTimeout(closeTimerRef.current!)\n clearTimeout(openTimerRef.current!)\n setIsMouseOver(true)\n if (!pinned) {\n openTimerRef.current = setTimeout(() => setOpen(true), 100)\n }\n }}\n onMouseLeave={() => {\n clearTimeout(openTimerRef.current!)\n setIsMouseOver(false)\n if (!pinned && !hoverLocked) {\n setOpen(false)\n }\n }}\n onTransitionEnd={(e: React.TransitionEvent<HTMLElement>) => {\n if (e.target === e.currentTarget && e.propertyName === 'width') {\n window.dispatchEvent(new CustomEvent('mainResize'))\n }\n }}\n >\n <div\n className={cn(\n 'absolute inset-y-0 left-0 z-20 flex flex-col transition-[width] duration-300 ease-linear md:flex',\n side === 'left' &&\n pinned &&\n 'group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]',\n side === 'right' &&\n pinned &&\n 'group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'\n : cn(\n 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n (open && !pinned) || (pinned && state === 'expanded')\n ? 'w-[--sidebar-width]'\n : 'w-[--sidebar-width-icon]'\n ),\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex size-full flex-col bg-sidebar shadow-[1px_4px_16px_rgba(0,0,0,0.04)] group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n {open && (\n <Button\n variant=\"outline\"\n tooltip={pinned ? 'Unpin sidebar' : 'Pin sidebar'}\n data-testid=\"pin-sidebar-button\"\n side=\"right\"\n className={cn(\n 'absolute top-2 left-full border bg-[#FAFAFA] border-gray-200 border-solid',\n 'w-fit h-fit rounded-l-none border-l-0 py-2 pr-[3px] pl-[1px]',\n 'transition-opacity hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n pinned ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'\n )}\n onClick={togglePin}\n >\n {pinned ? (\n <SidebarClose data-testid=\"closeed-pin\" />\n ) : (\n <SidebarOpen data-testid=\"opened-pin\" />\n )}\n </Button>\n )}\n </div>\n </div>\n </nav>\n )\n }\n)\nSidebar.displayName = 'Sidebar'\n\ninterface SidebarTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: 'menu' | 'chevronLeft' | 'chevronRight'\n}\n\nconst SidebarTrigger = React.forwardRef<HTMLButtonElement, SidebarTriggerProps>(\n ({ className, icon = 'menu', onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-9', className)}\n onClick={event => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n {icon === 'menu' && <MenuIcon className=\"size-4 shrink-0\" />}\n {icon === 'chevronLeft' && <ChevronLeftIcon className=\"size-4 shrink-0\" />}\n {icon === 'chevronRight' && <ChevronRightIcon className=\"size-4 shrink-0\" />}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n }\n)\nSidebarTrigger.displayName = 'SidebarTrigger'\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ButtonHTMLAttributes<HTMLButtonElement>\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n '[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = 'SidebarRail'\n\nconst SidebarInset = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref as React.Ref<HTMLElement>}\n className={cn(\n 'relative flex min-h-0 flex-1 flex-col bg-background transition-[width] duration-300 ease-linear',\n 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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',\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarInset.displayName = 'SidebarInset'\n\nconst SidebarInput = React.forwardRef<HTMLInputElement, React.ComponentProps<typeof Input>>(\n ({ className, ...props }, ref) => (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n 'h-9 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring',\n className\n )}\n {...props}\n />\n )\n)\nSidebarInput.displayName = 'SidebarInput'\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn('flex gap-2 py-3.5', className)}\n {...props}\n />\n )\n)\nSidebarHeader.displayName = 'SidebarHeader'\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-3', className)}\n {...props}\n />\n )\n)\nSidebarFooter.displayName = 'SidebarFooter'\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn('mx-5 mb-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n))\nSidebarSeparator.displayName = 'SidebarSeparator'\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n)\nSidebarContent.displayName = 'SidebarContent'\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col p-3', className)}\n {...props}\n />\n )\n)\nSidebarGroup.displayName = 'SidebarGroup'\n\ninterface SidebarGroupLabelProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(\n ({ asChild = false, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-9 shrink-0 items-center rounded-md px-2.5 text-sm font-medium outline-none whitespace-nowrap ring-sidebar-ring focus-visible:ring-2 [&>svg]:size-5 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarGroupLabel.displayName = 'SidebarGroupLabel'\n\ninterface SidebarGroupActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n}\n\nconst SidebarGroupAction = React.forwardRef<HTMLButtonElement, SidebarGroupActionProps>(\n ({ asChild = false, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n 'absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-5 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarGroupAction.displayName = 'SidebarGroupAction'\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm', className)}\n {...props}\n />\n )\n)\nSidebarGroupContent.displayName = 'SidebarGroupContent'\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 p-0 m-0 flex-col gap-1 items-center', className)}\n {...props}\n />\n )\n)\nSidebarMenu.displayName = 'SidebarMenu'\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.HTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item flex relative w-full', className)}\n {...props}\n />\n )\n)\nSidebarMenuItem.displayName = 'SidebarMenuItem'\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex flex-1 w-full items-center gap-2 text-inherit overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent 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-active-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-active-accent-foreground [&_svg_path]:fill-current data-[state=open]:hover:bg-sidebar-accent whitespace-nowrap [&>svg]:size-5 [&>svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent',\n outline:\n '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))]'\n },\n size: {\n default: 'text-sm',\n sm: 'h-8 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:!m-0'\n }\n },\n defaultVariants: {\n variant: 'default',\n size: 'default'\n }\n }\n)\n\ninterface SidebarMenuButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof sidebarMenuButtonVariants> {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | Record<string, unknown>\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n (\n {\n asChild = false,\n className,\n isActive = false,\n size = 'default',\n tooltip,\n variant = 'default',\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n />\n )\n\n if (!tooltip) return button\n const tooltipProps = typeof tooltip === 'string' ? { children: tooltip } : tooltip\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed'}\n {...tooltipProps}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = 'SidebarMenuButton'\n\ninterface SidebarMenuActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n showOnHover?: boolean\n}\n\nconst SidebarMenuAction = React.forwardRef<HTMLButtonElement, SidebarMenuActionProps>(\n ({ asChild = false, className, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover && 'hidden group-hocus:flex',\n className\n )}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n />\n )\n }\n)\nSidebarMenuAction.displayName = 'SidebarMenuAction'\n\nconst SidebarMenuBadge = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n 'inline-flex h-5 items-center rounded-full bg-sidebar-accent px-2 py-0.5 text-xs font-medium text-sidebar-accent-foreground',\n className\n )}\n {...props}\n />\n )\n)\nSidebarMenuBadge.displayName = 'SidebarMenuBadge'\n\nconst SidebarMenuSub = React.forwardRef<HTMLUListElement, React.HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn('flex flex-col gap-1 p-0', className)}\n {...props}\n />\n )\n)\nSidebarMenuSub.displayName = 'SidebarMenuSub'\n\nconst SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.HTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-sub-item\"\n className={cn('flex w-full', className)}\n {...props}\n />\n )\n)\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem'\n\ninterface SidebarMenuSubButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n size?: 'sm' | 'md' | 'default'\n isActive?: boolean\n}\n\nconst SidebarMenuSubButton = React.forwardRef<HTMLButtonElement, SidebarMenuSubButtonProps>(\n ({ asChild = false, className, size = 'default', ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n className={cn(\n 'flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 whitespace-nowrap [&>svg]:size-4 [&>svg]:shrink-0',\n className\n )}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n />\n )\n }\n)\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton'\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar\n}\n"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","React","useSidebar","context","SidebarProvider","children","className","defaultOpen","onOpenChange","openProp","style","props","ref","pinned","setPinned","hoverLocked","setHoverLocked","_open","_setOpen","open","setOpen","value","openState","toggleSidebar","prev","togglePin","newValue","handleKeyDown","event","state","contextValue","jsx","TooltipProvider","cn","Sidebar","collapsible","side","variant","isMouseOver","setIsMouseOver","openTimerRef","closeTimerRef","e","jsxs","Button","SidebarClose","SidebarOpen","SidebarTrigger","icon","onClick","MenuIcon","ChevronLeftIcon","ChevronRightIcon","SidebarRail","SidebarInset","SidebarInput","Input","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Slot","SidebarGroupAction","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","cva","SidebarMenuButton","isActive","size","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","SidebarMenuSub","SidebarMenuSubItem","SidebarMenuSubButton"],"mappings":";;;;;;;;;;;;AAiCA,MAAMA,IAAsB,iBACtBC,IAAyB,OAAU,KAAK,GACxCC,IAAgB,SAChBC,IAAqB,QACrBC,IAA4B,KAa5BC,IAAiBC,EAAM,cAA0C,IAAI,GAErEC,IAAa,MAA2B;AAC5C,QAAMC,IAAUF,EAAM,WAAWD,CAAc;AAC/C,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,mDAAmD;AAErE,SAAOA;AACT,GASMC,IAAkBH,EAAM;AAAA,EAC5B,CACE,EAAE,UAAAI,GAAU,WAAAC,GAAW,aAAAC,IAAc,IAAM,cAAAC,GAAc,MAAMC,GAAU,OAAAC,GAAO,GAAGC,EAAA,GACnFC,MACG;AACH,UAAM,CAACC,GAAQC,CAAS,IAAIb,EAAM,SAAkB,MAAM;AACxD,UAAI;AACF,eAAO,KAAK,MAAM,aAAa,QAAQ,gBAAgB,KAAK,OAAO;AAAA,MACrE,QAAQ;AACN,eAAO;AAAA,MACT;AAAA,IACF,CAAC,GACK,CAACc,GAAaC,CAAc,IAAIf,EAAM,SAAS,EAAK,GACpD,CAACgB,GAAOC,CAAQ,IAAIjB,EAAM,SAASM,KAAeM,CAAM,GACxDM,IAAOV,KAAYQ,GAEnBG,IAAUnB,EAAM;AAAA,MACpB,CAACoB,MAAkD;AACjD,cAAMC,IAAY,OAAOD,KAAU,aAAaA,EAAMF,CAAI,IAAIE;AAC9D,QAAIb,IACFA,EAAac,CAAS,IAEtBJ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C;AAAA,IAAA;AAAA,MACC,KAAAnB;AAAA,MACA,gBAAa;AAAA,MACb,WAAWqB,EAAG,eAAe3B,CAAS;AAAA,MACrC,GAAGK;AAAA,IAAA;AAAA,EAAA;AAGV;AACA0E,GAAmB,cAAc;AAQjC,MAAMC,KAAuBrF,EAAM;AAAA,EACjC,CAAC,EAAE,SAAA+D,IAAU,IAAO,WAAA1D,GAAW,MAAAoE,IAAO,WAAW,GAAG/D,EAAA,GAASC,MAGzD,gBAAAmB;AAAA,IAFWiC,IAAUC,IAAO;AAAA,IAE3B;AAAA,MACC,KAAArD;AAAA,MACA,gBAAa;AAAA,MACb,aAAW8D;AAAA,MACX,WAAWzC;AAAA,QACT;AAAA,QACA3B;AAAA,MAAA;AAAA,MAED,GAAIK;AAAA,IAAA;AAAA,EAAA;AAIb;AACA2E,GAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"sidebar.mjs","sources":["../../../../src/lib/nextGenComponents/components/ui/sidebar.tsx"],"sourcesContent":["/*\nCopyright 2019 Iguazio Systems Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\") with\nan addition restriction as set forth herein. You may not use this\nfile except in compliance with the License. You may obtain a copy of\nthe License at http://www.apache.org/licenses/LICENSE-2.0.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\nimplied. See the License for the specific language governing\npermissions and limitations under the License.\n\nIn addition, you may not use the software for any purposes that are\nillegal under applicable law, and the grant of the foregoing license\nunder the Apache 2.0 license is conditioned upon your compliance with\nsuch restriction.\n*/\nimport * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { ChevronLeftIcon, ChevronRightIcon, MenuIcon } from 'lucide-react'\n\nimport { cn } from '@/lib/utils'\nimport { Button } from './button'\nimport { Input } from './input'\nimport { Separator } from './separator'\nimport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './tooltip'\n\nimport SidebarClose from '../../../images/navbar-closed-icon.svg?react'\nimport SidebarOpen from '../../../images/navbar-opened-icon.svg?react'\n\nconst SIDEBAR_COOKIE_NAME = 'sidebar_state'\nconst SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7\nconst SIDEBAR_WIDTH = '15rem'\nconst SIDEBAR_WIDTH_ICON = '70px'\nconst SIDEBAR_KEYBOARD_SHORTCUT = 'b'\n\ninterface SidebarContextValue {\n state: 'expanded' | 'collapsed'\n open: boolean\n setOpen: (value: boolean | ((prev: boolean) => boolean)) => void\n toggleSidebar: () => void\n pinned: boolean\n togglePin: () => void\n hoverLocked: boolean\n setHoverLocked: (locked: boolean) => void\n}\n\nconst SidebarContext = React.createContext<SidebarContextValue | null>(null)\n\nconst useSidebar = (): SidebarContextValue => {\n const context = React.useContext(SidebarContext)\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider.')\n }\n return context\n}\n\ninterface SidebarProviderProps extends React.HTMLAttributes<HTMLDivElement> {\n children: React.ReactNode\n defaultOpen?: boolean\n onOpenChange?: (open: boolean) => void\n open?: boolean\n}\n\nconst SidebarProvider = React.forwardRef<HTMLDivElement, SidebarProviderProps>(\n (\n { children, className, defaultOpen = true, onOpenChange, open: openProp, style, ...props },\n ref\n ) => {\n const [pinned, setPinned] = React.useState<boolean>(() => {\n try {\n return JSON.parse(localStorage.getItem('isNavbarPinned') || 'false')\n } catch {\n return false\n }\n })\n const [hoverLocked, setHoverLocked] = React.useState(false)\n const [_open, _setOpen] = React.useState(defaultOpen || pinned)\n const open = openProp ?? _open\n\n const setOpen = React.useCallback(\n (value: boolean | ((prev: boolean) => boolean)) => {\n const openState = typeof value === 'function' ? value(open) : value\n if (onOpenChange) {\n onOpenChange(openState)\n } else {\n _setOpen(openState)\n }\n document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`\n },\n [onOpenChange, open]\n )\n\n const toggleSidebar = React.useCallback(() => setOpen(prev => !prev), [setOpen])\n\n const togglePin = React.useCallback(() => {\n setPinned(prev => {\n const newValue = !prev\n localStorage.setItem('isNavbarPinned', JSON.stringify(newValue))\n setOpen(newValue)\n return newValue\n })\n }, [setOpen])\n\n React.useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {\n event.preventDefault()\n toggleSidebar()\n }\n }\n window.addEventListener('keydown', handleKeyDown)\n return () => window.removeEventListener('keydown', handleKeyDown)\n }, [toggleSidebar])\n\n const state: 'expanded' | 'collapsed' = open ? 'expanded' : 'collapsed'\n\n const contextValue = React.useMemo(\n () => ({\n state,\n open,\n setOpen,\n toggleSidebar,\n pinned,\n togglePin,\n hoverLocked,\n setHoverLocked\n }),\n [state, open, setOpen, toggleSidebar, pinned, togglePin, hoverLocked]\n )\n\n return (\n <SidebarContext.Provider value={contextValue}>\n <TooltipProvider delayDuration={0}>\n <div\n style={\n {\n '--sidebar-width': SIDEBAR_WIDTH,\n '--sidebar-width-icon': SIDEBAR_WIDTH_ICON,\n ...style\n } as React.CSSProperties\n }\n className={cn(\n 'group/sidebar-wrapper flex h-full w-full has-[[data-variant=inset]]:bg-sidebar',\n className\n )}\n ref={ref}\n {...props}\n >\n {children}\n </div>\n </TooltipProvider>\n </SidebarContext.Provider>\n )\n }\n)\nSidebarProvider.displayName = 'SidebarProvider'\n\ninterface SidebarProps extends React.HTMLAttributes<HTMLElement> {\n children: React.ReactNode\n side?: 'left' | 'right'\n variant?: 'sidebar' | 'floating' | 'inset'\n collapsible?: 'offcanvas' | 'icon' | 'none'\n}\n\nconst Sidebar = React.forwardRef<HTMLElement, SidebarProps>(\n (\n {\n children,\n className,\n collapsible = 'offcanvas',\n side = 'left',\n variant = 'sidebar',\n ...props\n },\n ref\n ) => {\n const [isMouseOver, setIsMouseOver] = React.useState(false)\n const { hoverLocked, open, pinned, state, togglePin, setOpen } = useSidebar()\n const openTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n const closeTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null)\n\n React.useEffect(() => {\n if (!hoverLocked && !isMouseOver && !pinned) {\n closeTimerRef.current = setTimeout(() => setOpen(false), 200)\n return () => clearTimeout(closeTimerRef.current!)\n }\n }, [hoverLocked, isMouseOver, pinned, setOpen])\n\n if (collapsible === 'none') {\n return (\n <nav\n className={cn(\n 'flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground',\n className\n )}\n ref={ref as React.Ref<HTMLElement>}\n {...props}\n >\n {children}\n </nav>\n )\n }\n\n return (\n <nav\n ref={ref as React.Ref<HTMLElement>}\n className={cn(\n 'group peer relative shrink-0 self-stretch overflow-visible text-sidebar-foreground',\n 'transition-[width] duration-300 ease-linear',\n pinned && open ? 'w-[--sidebar-width]' : 'w-[--sidebar-width-icon]'\n )}\n data-state={state}\n data-collapsible={state === 'collapsed' ? collapsible : ''}\n data-variant={variant}\n data-side={side}\n data-pinned={pinned}\n onMouseEnter={() => {\n clearTimeout(closeTimerRef.current!)\n clearTimeout(openTimerRef.current!)\n setIsMouseOver(true)\n if (!pinned) {\n openTimerRef.current = setTimeout(() => setOpen(true), 100)\n }\n }}\n onMouseLeave={() => {\n clearTimeout(openTimerRef.current!)\n setIsMouseOver(false)\n if (!pinned && !hoverLocked) {\n setOpen(false)\n }\n }}\n onTransitionEnd={(e: React.TransitionEvent<HTMLElement>) => {\n if (e.target === e.currentTarget && e.propertyName === 'width') {\n window.dispatchEvent(new CustomEvent('mainResize'))\n }\n }}\n >\n <div\n className={cn(\n 'absolute inset-y-0 left-0 z-20 flex flex-col transition-[width] duration-300 ease-linear md:flex',\n side === 'left' &&\n pinned &&\n 'group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]',\n side === 'right' &&\n pinned &&\n 'group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]',\n variant === 'floating' || variant === 'inset'\n ? 'p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]'\n : cn(\n 'group-data-[side=left]:border-r group-data-[side=right]:border-l',\n (open && !pinned) || (pinned && state === 'expanded')\n ? 'w-[--sidebar-width]'\n : 'w-[--sidebar-width-icon]'\n ),\n className\n )}\n {...props}\n >\n <div\n data-sidebar=\"sidebar\"\n className=\"flex size-full flex-col bg-sidebar shadow-[1px_4px_16px_rgba(0,0,0,0.04)] group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow\"\n >\n {children}\n {open && (\n <Button\n variant=\"outline\"\n tooltip={pinned ? 'Unpin sidebar' : 'Pin sidebar'}\n data-testid=\"pin-sidebar-button\"\n data-sidebar=\"pin\"\n side=\"right\"\n className={cn(\n 'absolute top-2 left-full border bg-[#FAFAFA] border-gray-200 border-solid',\n 'w-fit h-fit rounded-l-none border-l-0 py-2 pr-[3px] pl-[1px]',\n 'transition-visibility hover:bg-sidebar-accent hover:text-sidebar-accent-foreground'\n )}\n onClick={togglePin}\n >\n {pinned ? (\n <SidebarClose data-testid=\"closeed-pin\" />\n ) : (\n <SidebarOpen data-testid=\"opened-pin\" />\n )}\n </Button>\n )}\n </div>\n </div>\n </nav>\n )\n }\n)\nSidebar.displayName = 'Sidebar'\n\ninterface SidebarTriggerProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n icon?: 'menu' | 'chevronLeft' | 'chevronRight'\n}\n\nconst SidebarTrigger = React.forwardRef<HTMLButtonElement, SidebarTriggerProps>(\n ({ className, icon = 'menu', onClick, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n return (\n <Button\n ref={ref}\n data-sidebar=\"trigger\"\n variant=\"ghost\"\n size=\"icon\"\n className={cn('size-9', className)}\n onClick={event => {\n onClick?.(event)\n toggleSidebar()\n }}\n {...props}\n >\n {icon === 'menu' && <MenuIcon className=\"size-4 shrink-0\" />}\n {icon === 'chevronLeft' && <ChevronLeftIcon className=\"size-4 shrink-0\" />}\n {icon === 'chevronRight' && <ChevronRightIcon className=\"size-4 shrink-0\" />}\n <span className=\"sr-only\">Toggle Sidebar</span>\n </Button>\n )\n }\n)\nSidebarTrigger.displayName = 'SidebarTrigger'\n\nconst SidebarRail = React.forwardRef<\n HTMLButtonElement,\n React.ButtonHTMLAttributes<HTMLButtonElement>\n>(({ className, ...props }, ref) => {\n const { toggleSidebar } = useSidebar()\n return (\n <button\n ref={ref}\n data-sidebar=\"rail\"\n aria-label=\"Toggle Sidebar\"\n tabIndex={-1}\n onClick={toggleSidebar}\n title=\"Toggle Sidebar\"\n className={cn(\n 'absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex',\n '[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize',\n '[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize',\n 'group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar',\n '[[data-side=left][data-collapsible=offcanvas]_&]:-right-2',\n '[[data-side=right][data-collapsible=offcanvas]_&]:-left-2',\n className\n )}\n {...props}\n />\n )\n})\nSidebarRail.displayName = 'SidebarRail'\n\nconst SidebarInset = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>(\n ({ className, ...props }, ref) => {\n return (\n <main\n ref={ref as React.Ref<HTMLElement>}\n className={cn(\n 'relative flex min-h-0 flex-1 flex-col bg-background transition-[width] duration-300 ease-linear',\n 'peer-data-[variant=inset]:min-h-[calc(100svh-theme(spacing.4))] 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',\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarInset.displayName = 'SidebarInset'\n\nconst SidebarInput = React.forwardRef<HTMLInputElement, React.ComponentProps<typeof Input>>(\n ({ className, ...props }, ref) => (\n <Input\n ref={ref}\n data-sidebar=\"input\"\n className={cn(\n 'h-9 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring',\n className\n )}\n {...props}\n />\n )\n)\nSidebarInput.displayName = 'SidebarInput'\n\nconst SidebarHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"header\"\n className={cn('flex gap-2 py-3.5', className)}\n {...props}\n />\n )\n)\nSidebarHeader.displayName = 'SidebarHeader'\n\nconst SidebarFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"footer\"\n className={cn('flex flex-col gap-2 p-3', className)}\n {...props}\n />\n )\n)\nSidebarFooter.displayName = 'SidebarFooter'\n\nconst SidebarSeparator = React.forwardRef<\n React.ElementRef<typeof Separator>,\n React.ComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n <Separator\n ref={ref}\n data-sidebar=\"separator\"\n className={cn('mx-5 mb-2 w-auto bg-sidebar-border', className)}\n {...props}\n />\n))\nSidebarSeparator.displayName = 'SidebarSeparator'\n\nconst SidebarContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"content\"\n className={cn(\n 'flex min-h-0 flex-1 flex-col overflow-auto group-data-[collapsible=icon]:overflow-hidden',\n className\n )}\n {...props}\n />\n )\n)\nSidebarContent.displayName = 'SidebarContent'\n\nconst SidebarGroup = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group\"\n className={cn('relative flex w-full min-w-0 flex-col p-3', className)}\n {...props}\n />\n )\n)\nSidebarGroup.displayName = 'SidebarGroup'\n\ninterface SidebarGroupLabelProps extends React.HTMLAttributes<HTMLDivElement> {\n asChild?: boolean\n}\n\nconst SidebarGroupLabel = React.forwardRef<HTMLDivElement, SidebarGroupLabelProps>(\n ({ asChild = false, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'div'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-label\"\n className={cn(\n 'flex h-9 shrink-0 items-center rounded-md px-2.5 text-sm font-medium outline-none whitespace-nowrap ring-sidebar-ring focus-visible:ring-2 [&>svg]:size-5 [&>svg]:shrink-0',\n 'group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0',\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarGroupLabel.displayName = 'SidebarGroupLabel'\n\ninterface SidebarGroupActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n}\n\nconst SidebarGroupAction = React.forwardRef<HTMLButtonElement, SidebarGroupActionProps>(\n ({ asChild = false, className, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"group-action\"\n className={cn(\n 'absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-5 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'group-data-[collapsible=icon]:hidden',\n className\n )}\n {...props}\n />\n )\n }\n)\nSidebarGroupAction.displayName = 'SidebarGroupAction'\n\nconst SidebarGroupContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n data-sidebar=\"group-content\"\n className={cn('w-full text-sm', className)}\n {...props}\n />\n )\n)\nSidebarGroupContent.displayName = 'SidebarGroupContent'\n\nconst SidebarMenu = React.forwardRef<HTMLUListElement, React.HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu\"\n className={cn('flex w-full min-w-0 p-0 m-0 flex-col gap-1 items-center', className)}\n {...props}\n />\n )\n)\nSidebarMenu.displayName = 'SidebarMenu'\n\nconst SidebarMenuItem = React.forwardRef<HTMLLIElement, React.HTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-item\"\n className={cn('group/menu-item flex relative w-full', className)}\n {...props}\n />\n )\n)\nSidebarMenuItem.displayName = 'SidebarMenuItem'\n\nconst sidebarMenuButtonVariants = cva(\n 'peer/menu-button flex flex-1 w-full items-center gap-2 text-inherit overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent 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-active-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-active-accent-foreground [&_svg_path]:fill-current data-[state=open]:hover:bg-sidebar-accent whitespace-nowrap [&>svg]:size-5 [&>svg]:shrink-0',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent',\n outline:\n '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))]'\n },\n size: {\n default: 'text-sm',\n sm: 'h-8 text-xs',\n lg: 'h-12 text-sm group-data-[collapsible=icon]:!m-0'\n }\n },\n defaultVariants: {\n variant: 'default',\n size: 'default'\n }\n }\n)\n\ninterface SidebarMenuButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof sidebarMenuButtonVariants> {\n asChild?: boolean\n isActive?: boolean\n tooltip?: string | Record<string, unknown>\n}\n\nconst SidebarMenuButton = React.forwardRef<HTMLButtonElement, SidebarMenuButtonProps>(\n (\n {\n asChild = false,\n className,\n isActive = false,\n size = 'default',\n tooltip,\n variant = 'default',\n ...props\n },\n ref\n ) => {\n const Comp = asChild ? Slot : 'button'\n const { state } = useSidebar()\n\n const button = (\n <Comp\n ref={ref}\n data-sidebar=\"menu-button\"\n data-size={size}\n data-active={isActive}\n className={cn(sidebarMenuButtonVariants({ variant, size }), className)}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n />\n )\n\n if (!tooltip) return button\n const tooltipProps = typeof tooltip === 'string' ? { children: tooltip } : tooltip\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>{button}</TooltipTrigger>\n <TooltipContent\n side=\"right\"\n align=\"center\"\n hidden={state !== 'collapsed'}\n {...tooltipProps}\n />\n </Tooltip>\n )\n }\n)\nSidebarMenuButton.displayName = 'SidebarMenuButton'\n\ninterface SidebarMenuActionProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n showOnHover?: boolean\n}\n\nconst SidebarMenuAction = React.forwardRef<HTMLButtonElement, SidebarMenuActionProps>(\n ({ asChild = false, className, showOnHover = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-action\"\n className={cn(\n 'absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0',\n 'after:absolute after:-inset-2 after:md:hidden',\n 'peer-data-[size=sm]/menu-button:top-1',\n 'peer-data-[size=default]/menu-button:top-1.5',\n 'peer-data-[size=lg]/menu-button:top-2.5',\n 'group-data-[collapsible=icon]:hidden',\n showOnHover && 'hidden group-hocus:flex',\n className\n )}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n />\n )\n }\n)\nSidebarMenuAction.displayName = 'SidebarMenuAction'\n\nconst SidebarMenuBadge = React.forwardRef<HTMLSpanElement, React.HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, ref) => (\n <span\n ref={ref}\n data-sidebar=\"menu-badge\"\n className={cn(\n 'inline-flex h-5 items-center rounded-full bg-sidebar-accent px-2 py-0.5 text-xs font-medium text-sidebar-accent-foreground',\n className\n )}\n {...props}\n />\n )\n)\nSidebarMenuBadge.displayName = 'SidebarMenuBadge'\n\nconst SidebarMenuSub = React.forwardRef<HTMLUListElement, React.HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => (\n <ul\n ref={ref}\n data-sidebar=\"menu-sub\"\n className={cn('flex flex-col gap-1 p-0', className)}\n {...props}\n />\n )\n)\nSidebarMenuSub.displayName = 'SidebarMenuSub'\n\nconst SidebarMenuSubItem = React.forwardRef<HTMLLIElement, React.HTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => (\n <li\n ref={ref}\n data-sidebar=\"menu-sub-item\"\n className={cn('flex w-full', className)}\n {...props}\n />\n )\n)\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem'\n\ninterface SidebarMenuSubButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n asChild?: boolean\n size?: 'sm' | 'md' | 'default'\n isActive?: boolean\n}\n\nconst SidebarMenuSubButton = React.forwardRef<HTMLButtonElement, SidebarMenuSubButtonProps>(\n ({ asChild = false, className, size = 'default', ...props }, ref) => {\n const Comp = asChild ? Slot : 'button'\n return (\n <Comp\n ref={ref}\n data-sidebar=\"menu-sub-button\"\n data-size={size}\n className={cn(\n 'flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 whitespace-nowrap [&>svg]:size-4 [&>svg]:shrink-0',\n className\n )}\n {...(props as React.ButtonHTMLAttributes<HTMLButtonElement>)}\n />\n )\n }\n)\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton'\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar\n}\n"],"names":["SIDEBAR_COOKIE_NAME","SIDEBAR_COOKIE_MAX_AGE","SIDEBAR_WIDTH","SIDEBAR_WIDTH_ICON","SIDEBAR_KEYBOARD_SHORTCUT","SidebarContext","React","useSidebar","context","SidebarProvider","children","className","defaultOpen","onOpenChange","openProp","style","props","ref","pinned","setPinned","hoverLocked","setHoverLocked","_open","_setOpen","open","setOpen","value","openState","toggleSidebar","prev","togglePin","newValue","handleKeyDown","event","state","contextValue","jsx","TooltipProvider","cn","Sidebar","collapsible","side","variant","isMouseOver","setIsMouseOver","openTimerRef","closeTimerRef","e","jsxs","Button","SidebarClose","SidebarOpen","SidebarTrigger","icon","onClick","MenuIcon","ChevronLeftIcon","ChevronRightIcon","SidebarRail","SidebarInset","SidebarInput","Input","SidebarHeader","SidebarFooter","SidebarSeparator","Separator","SidebarContent","SidebarGroup","SidebarGroupLabel","asChild","Slot","SidebarGroupAction","SidebarGroupContent","SidebarMenu","SidebarMenuItem","sidebarMenuButtonVariants","cva","SidebarMenuButton","isActive","size","tooltip","Comp","button","Tooltip","TooltipTrigger","TooltipContent","SidebarMenuAction","showOnHover","SidebarMenuBadge","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BAAAmB;AAAA,IAFWiC,IAAUC,IAAO;AAAA,IAE3B;AAAA,MACC,KAAArD;AAAA,MACA,gBAAa;AAAA,MACb,aAAW8D;AAAA,MACX,WAAWzC;AAAA,QACT;AAAA,QACA3B;AAAA,MAAA;AAAA,MAED,GAAIK;AAAA,IAAA;AAAA,EAAA;AAIb;AACA2E,GAAqB,cAAc;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-react-controls",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.27",
|
|
4
4
|
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.mjs",
|