@abumble/design-system 0.0.8 → 0.0.10

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.
Files changed (116) hide show
  1. package/dist/{components/Button/Button.js → Button.js} +3 -3
  2. package/dist/Button.js.map +1 -0
  3. package/dist/{components/Empty/Empty.js → Empty.js} +24 -24
  4. package/dist/Empty.js.map +1 -0
  5. package/dist/{components/Input/Input.js → Input.js} +3 -3
  6. package/dist/Input.js.map +1 -0
  7. package/dist/{components/Separator/Separator.js → Separator.js} +8 -8
  8. package/dist/Separator.js.map +1 -0
  9. package/dist/{components/Sheet/Sheet.js → Sheet.js} +33 -33
  10. package/dist/Sheet.js.map +1 -0
  11. package/dist/{components/Skeleton/Skeleton.js → Skeleton.js} +5 -5
  12. package/dist/Skeleton.js.map +1 -0
  13. package/dist/{components/Tooltip/Tooltip.js → Tooltip.js} +9 -9
  14. package/dist/Tooltip.js.map +1 -0
  15. package/dist/components/Banner/Banner.d.ts +1 -1
  16. package/dist/components/Banner/Banner.d.ts.map +1 -1
  17. package/dist/components/Banner.js +73 -4
  18. package/dist/components/Banner.js.map +1 -1
  19. package/dist/components/Breadcrumb.js +100 -7
  20. package/dist/components/Breadcrumb.js.map +1 -1
  21. package/dist/components/Button.js +3 -3
  22. package/dist/components/Card.js +85 -7
  23. package/dist/components/Card.js.map +1 -1
  24. package/dist/components/Carousel.js +175 -6
  25. package/dist/components/Carousel.js.map +1 -1
  26. package/dist/components/CodeDisplay.js +19 -2
  27. package/dist/components/CodeDisplay.js.map +1 -1
  28. package/dist/components/Collapsible.js +32 -4
  29. package/dist/components/Collapsible.js.map +1 -1
  30. package/dist/components/ContextMenu.js +221 -15
  31. package/dist/components/ContextMenu.js.map +1 -1
  32. package/dist/components/Empty.js +6 -6
  33. package/dist/components/Input.js +1 -1
  34. package/dist/components/List.js +61 -4
  35. package/dist/components/List.js.map +1 -1
  36. package/dist/components/NotFound.js +14 -2
  37. package/dist/components/NotFound.js.map +1 -1
  38. package/dist/components/Popover.js +43 -5
  39. package/dist/components/Popover.js.map +1 -1
  40. package/dist/components/Separator.js +2 -2
  41. package/dist/components/Sheet.js +9 -9
  42. package/dist/components/Sidebar.js +592 -25
  43. package/dist/components/Sidebar.js.map +1 -1
  44. package/dist/components/Skeleton.js +1 -1
  45. package/dist/components/Tooltip.js +3 -3
  46. package/dist/components/UnderConstruction.js +29 -2
  47. package/dist/components/UnderConstruction.js.map +1 -1
  48. package/dist/constants/constants.d.ts.map +1 -0
  49. package/dist/constants/index.d.ts +2 -0
  50. package/dist/constants/index.d.ts.map +1 -0
  51. package/dist/constants.js.map +1 -0
  52. package/dist/hooks/index.d.ts +2 -0
  53. package/dist/hooks/index.d.ts.map +1 -0
  54. package/dist/hooks.js +5 -0
  55. package/dist/hooks.js.map +1 -0
  56. package/dist/index.js +2 -0
  57. package/dist/index.js.map +1 -0
  58. package/dist/types/index.d.ts +2 -0
  59. package/dist/types/index.d.ts.map +1 -0
  60. package/dist/types/types.d.ts.map +1 -0
  61. package/dist/types.js +2 -0
  62. package/dist/types.js.map +1 -0
  63. package/dist/{hooks/use-mobile.js → use-mobile.js} +1 -1
  64. package/dist/use-mobile.js.map +1 -0
  65. package/dist/utils/index.d.ts +2 -0
  66. package/dist/utils/index.d.ts.map +1 -0
  67. package/dist/{lib → utils}/utils.d.ts +2 -0
  68. package/dist/utils/utils.d.ts.map +1 -0
  69. package/dist/utils.js +8 -0
  70. package/dist/utils.js.map +1 -0
  71. package/dist/utils2.js +21 -0
  72. package/dist/utils2.js.map +1 -0
  73. package/package.json +31 -35
  74. package/dist/assets/crane.svg.js +0 -5
  75. package/dist/assets/crane.svg.js.map +0 -1
  76. package/dist/components/Banner/Banner.js +0 -76
  77. package/dist/components/Banner/Banner.js.map +0 -1
  78. package/dist/components/Breadcrumb/Breadcrumb.js +0 -104
  79. package/dist/components/Breadcrumb/Breadcrumb.js.map +0 -1
  80. package/dist/components/Button/Button.js.map +0 -1
  81. package/dist/components/Card/Card.js +0 -89
  82. package/dist/components/Card/Card.js.map +0 -1
  83. package/dist/components/Carousel/Carousel.js +0 -178
  84. package/dist/components/Carousel/Carousel.js.map +0 -1
  85. package/dist/components/CodeDisplay/CodeDisplay.js +0 -22
  86. package/dist/components/CodeDisplay/CodeDisplay.js.map +0 -1
  87. package/dist/components/Collapsible/Collapsible.js +0 -35
  88. package/dist/components/Collapsible/Collapsible.js.map +0 -1
  89. package/dist/components/ContextMenu/ContextMenu.js +0 -225
  90. package/dist/components/ContextMenu/ContextMenu.js.map +0 -1
  91. package/dist/components/Empty/Empty.js.map +0 -1
  92. package/dist/components/Input/Input.js.map +0 -1
  93. package/dist/components/List/List.js +0 -64
  94. package/dist/components/List/List.js.map +0 -1
  95. package/dist/components/NotFound/NotFound.js +0 -17
  96. package/dist/components/NotFound/NotFound.js.map +0 -1
  97. package/dist/components/Popover/Popover.js +0 -46
  98. package/dist/components/Popover/Popover.js.map +0 -1
  99. package/dist/components/Separator/Separator.js.map +0 -1
  100. package/dist/components/Sheet/Sheet.js.map +0 -1
  101. package/dist/components/Sidebar/Sidebar.js +0 -595
  102. package/dist/components/Sidebar/Sidebar.js.map +0 -1
  103. package/dist/components/Skeleton/Skeleton.js.map +0 -1
  104. package/dist/components/Tooltip/Tooltip.js.map +0 -1
  105. package/dist/components/UnderConstruction/UnderConstruction.js +0 -33
  106. package/dist/components/UnderConstruction/UnderConstruction.js.map +0 -1
  107. package/dist/hooks/use-mobile.js.map +0 -1
  108. package/dist/lib/constants.d.ts.map +0 -1
  109. package/dist/lib/constants.js.map +0 -1
  110. package/dist/lib/types.d.ts.map +0 -1
  111. package/dist/lib/utils.d.ts.map +0 -1
  112. package/dist/lib/utils.js +0 -9
  113. package/dist/lib/utils.js.map +0 -1
  114. /package/dist/{lib → constants}/constants.d.ts +0 -0
  115. /package/dist/{lib/constants.js → constants.js} +0 -0
  116. /package/dist/{lib → types}/types.d.ts +0 -0
@@ -1,28 +1,595 @@
1
- import { Sidebar as a, SidebarContent as i, SidebarFooter as S, SidebarGroup as b, SidebarGroupAction as d, SidebarGroupContent as n, SidebarGroupLabel as u, SidebarHeader as t, SidebarInput as o, SidebarInset as M, SidebarMenu as p, SidebarMenuAction as G, SidebarMenuBadge as I, SidebarMenuButton as g, SidebarMenuItem as l, SidebarMenuSkeleton as m, SidebarMenuSub as B, SidebarMenuSubButton as c, SidebarMenuSubItem as s, SidebarProvider as A, SidebarRail as C, SidebarSeparator as f, SidebarTrigger as k, useSidebar as v } from "./Sidebar/Sidebar.js";
1
+ import { jsx as t, jsxs as m, Fragment as k } from "react/jsx-runtime";
2
+ import { Slot as h } from "@radix-ui/react-slot";
3
+ import { cva as z } from "class-variance-authority";
4
+ import { ChevronsLeft as I } from "lucide-react";
5
+ import * as c from "react";
6
+ import { B as E } from "../Button.js";
7
+ import { I as T } from "../Input.js";
8
+ import { S as D } from "../Separator.js";
9
+ import { S as B, c as A, d as O, f as R, g as H } from "../Sheet.js";
10
+ import { S as y } from "../Skeleton.js";
11
+ import { T as K, a as j, b as G, c as L } from "../Tooltip.js";
12
+ import { u as $ } from "../use-mobile.js";
13
+ import { c as r } from "../utils2.js";
14
+ const V = "sidebar_state", W = 3600 * 24 * 7, q = "18rem", F = "18rem", P = "3rem", U = "b", C = c.createContext(null);
15
+ function S() {
16
+ const a = c.useContext(C);
17
+ if (!a)
18
+ throw new Error("useSidebar must be used within a SidebarProvider.");
19
+ return a;
20
+ }
21
+ function de({
22
+ defaultOpen: a = !0,
23
+ open: e,
24
+ onOpenChange: i,
25
+ className: n,
26
+ style: o,
27
+ children: d,
28
+ ...p
29
+ }) {
30
+ const s = $(), [f, u] = c.useState(!1), [v, _] = c.useState(a), g = e ?? v, x = c.useCallback(
31
+ (l) => {
32
+ const b = typeof l == "function" ? l(g) : l;
33
+ i ? i(b) : _(b), document.cookie = `${V}=${b}; path=/; max-age=${W}`;
34
+ },
35
+ [i, g]
36
+ ), w = c.useCallback(() => s ? u((l) => !l) : x((l) => !l), [s, x, u]);
37
+ c.useEffect(() => {
38
+ const l = (b) => {
39
+ b.key === U && (b.metaKey || b.ctrlKey) && (b.preventDefault(), w());
40
+ };
41
+ return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
42
+ }, [w]);
43
+ const N = g ? "expanded" : "collapsed", M = c.useMemo(
44
+ () => ({
45
+ state: N,
46
+ open: g,
47
+ setOpen: x,
48
+ isMobile: s,
49
+ openMobile: f,
50
+ setOpenMobile: u,
51
+ toggleSidebar: w
52
+ }),
53
+ [N, g, x, s, f, u, w]
54
+ );
55
+ return /* @__PURE__ */ t(C.Provider, { value: M, children: /* @__PURE__ */ t(L, { delayDuration: 0, children: /* @__PURE__ */ t(
56
+ "div",
57
+ {
58
+ "data-slot": "sidebar-wrapper",
59
+ style: {
60
+ "--sidebar-width": q,
61
+ "--sidebar-width-icon": P,
62
+ ...o
63
+ },
64
+ className: r(
65
+ "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex w-full",
66
+ n
67
+ ),
68
+ ...p,
69
+ children: d
70
+ }
71
+ ) }) });
72
+ }
73
+ function le({
74
+ side: a = "left",
75
+ variant: e = "sidebar",
76
+ collapsible: i = "offcanvas",
77
+ className: n,
78
+ children: o,
79
+ ...d
80
+ }) {
81
+ const { isMobile: p, state: s, openMobile: f, setOpenMobile: u } = S();
82
+ return i === "none" ? /* @__PURE__ */ t(
83
+ "div",
84
+ {
85
+ "data-slot": "sidebar",
86
+ className: r(
87
+ "sidebar flex w-(--sidebar-width) flex-col",
88
+ n
89
+ ),
90
+ ...d,
91
+ children: o
92
+ }
93
+ ) : p ? /* @__PURE__ */ t(B, { open: f, onOpenChange: u, ...d, children: /* @__PURE__ */ m(
94
+ A,
95
+ {
96
+ "data-sidebar": "sidebar",
97
+ "data-slot": "sidebar",
98
+ "data-mobile": "true",
99
+ className: "sidebar w-(--sidebar-width) p-0 [&>button]:hidden",
100
+ style: {
101
+ "--sidebar-width": F
102
+ },
103
+ side: a,
104
+ children: [
105
+ /* @__PURE__ */ m(O, { className: "sr-only", children: [
106
+ /* @__PURE__ */ t(R, { children: "Sidebar" }),
107
+ /* @__PURE__ */ t(H, { children: "Displays the mobile sidebar." })
108
+ ] }),
109
+ /* @__PURE__ */ t("div", { className: "flex w-full flex-col", children: o })
110
+ ]
111
+ }
112
+ ) }) : /* @__PURE__ */ m(
113
+ "div",
114
+ {
115
+ className: "group peer text-sidebar-foreground hidden md:block",
116
+ "data-state": s,
117
+ "data-collapsible": s === "collapsed" ? i : "",
118
+ "data-variant": e,
119
+ "data-side": a,
120
+ "data-slot": "sidebar",
121
+ children: [
122
+ /* @__PURE__ */ t(
123
+ "div",
124
+ {
125
+ "data-slot": "sidebar-gap",
126
+ className: r(
127
+ "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
128
+ "group-data-[collapsible=offcanvas]:w-0",
129
+ "group-data-[side=right]:rotate-180",
130
+ "group-data-[state=collapsed]:mr-0 mr-6",
131
+ e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
132
+ )
133
+ }
134
+ ),
135
+ /* @__PURE__ */ t(
136
+ "div",
137
+ {
138
+ "data-slot": "sidebar-container",
139
+ className: r(
140
+ "fixed z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
141
+ a === "left" ? "group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
142
+ // Adjust the padding for floating and inset variants.
143
+ e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
144
+ n
145
+ ),
146
+ ...d,
147
+ children: /* @__PURE__ */ t(
148
+ "div",
149
+ {
150
+ "data-sidebar": "sidebar",
151
+ "data-slot": "sidebar-inner",
152
+ className: "sidebar group-data-[variant=floating]:border-sidebar-border flex w-full flex-col group-data-[variant=floating]:rounded group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm flex-1",
153
+ children: o
154
+ }
155
+ )
156
+ }
157
+ )
158
+ ]
159
+ }
160
+ );
161
+ }
162
+ function ce({
163
+ className: a,
164
+ onClick: e,
165
+ ...i
166
+ }) {
167
+ const { isMobile: n, open: o, toggleSidebar: d } = S(), p = n || !o ? "rotate-180" : "";
168
+ return /* @__PURE__ */ t(k, { children: /* @__PURE__ */ m(
169
+ E,
170
+ {
171
+ "data-sidebar": "trigger",
172
+ "data-slot": "sidebar-trigger",
173
+ variant: "ghost",
174
+ size: "icon",
175
+ className: r("rounded-full", a),
176
+ onClick: (s) => {
177
+ e?.(s), d();
178
+ },
179
+ ...i,
180
+ children: [
181
+ /* @__PURE__ */ t(I, { className: `transition-transform ${p} size-6` }),
182
+ /* @__PURE__ */ t("span", { className: "sr-only", children: "Toggle Sidebar" })
183
+ ]
184
+ }
185
+ ) });
186
+ }
187
+ function ue({ className: a, ...e }) {
188
+ const { toggleSidebar: i } = S();
189
+ return /* @__PURE__ */ t(
190
+ "button",
191
+ {
192
+ "data-sidebar": "rail",
193
+ "data-slot": "sidebar-rail",
194
+ "aria-label": "Toggle Sidebar",
195
+ tabIndex: -1,
196
+ onClick: i,
197
+ title: "Toggle Sidebar",
198
+ className: r(
199
+ "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
200
+ "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
201
+ "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
202
+ "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
203
+ "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
204
+ "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
205
+ a
206
+ ),
207
+ ...e
208
+ }
209
+ );
210
+ }
211
+ function be({ className: a, ...e }) {
212
+ return /* @__PURE__ */ t(
213
+ "main",
214
+ {
215
+ "data-slot": "sidebar-inset",
216
+ className: r(
217
+ "bg-background relative flex w-full flex-1 flex-col",
218
+ "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
219
+ a
220
+ ),
221
+ ...e
222
+ }
223
+ );
224
+ }
225
+ function pe({
226
+ className: a,
227
+ ...e
228
+ }) {
229
+ return /* @__PURE__ */ t(
230
+ T,
231
+ {
232
+ "data-slot": "sidebar-input",
233
+ "data-sidebar": "input",
234
+ className: r("bg-background h-8 w-full shadow-none", a),
235
+ ...e
236
+ }
237
+ );
238
+ }
239
+ function fe({ className: a, ...e }) {
240
+ return /* @__PURE__ */ t(
241
+ "div",
242
+ {
243
+ "data-slot": "sidebar-header",
244
+ "data-sidebar": "header",
245
+ className: r("flex flex-col gap-2 p-2", a),
246
+ ...e
247
+ }
248
+ );
249
+ }
250
+ function me({ className: a, ...e }) {
251
+ return /* @__PURE__ */ t(
252
+ "div",
253
+ {
254
+ "data-slot": "sidebar-footer",
255
+ "data-sidebar": "footer",
256
+ className: r("flex flex-col gap-2 p-2", a),
257
+ ...e
258
+ }
259
+ );
260
+ }
261
+ function ge({
262
+ className: a,
263
+ ...e
264
+ }) {
265
+ return /* @__PURE__ */ t(
266
+ D,
267
+ {
268
+ "data-slot": "sidebar-separator",
269
+ "data-sidebar": "separator",
270
+ className: r("bg-sidebar-border mx-2 w-auto", a),
271
+ ...e
272
+ }
273
+ );
274
+ }
275
+ function he({ className: a, ...e }) {
276
+ return /* @__PURE__ */ t(
277
+ "div",
278
+ {
279
+ "data-slot": "sidebar-content",
280
+ "data-sidebar": "content",
281
+ className: r(
282
+ "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
283
+ a
284
+ ),
285
+ ...e
286
+ }
287
+ );
288
+ }
289
+ function ve({ className: a, ...e }) {
290
+ return /* @__PURE__ */ t(
291
+ "div",
292
+ {
293
+ "data-slot": "sidebar-group",
294
+ "data-sidebar": "group",
295
+ className: r("relative flex w-full min-w-0 flex-col p-2", a),
296
+ ...e
297
+ }
298
+ );
299
+ }
300
+ function xe({
301
+ className: a,
302
+ asChild: e = !1,
303
+ ...i
304
+ }) {
305
+ return /* @__PURE__ */ t(
306
+ e ? h : "div",
307
+ {
308
+ "data-slot": "sidebar-group-label",
309
+ "data-sidebar": "group-label",
310
+ className: r(
311
+ "sidebar-text outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
312
+ "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
313
+ a
314
+ ),
315
+ ...i
316
+ }
317
+ );
318
+ }
319
+ function we({
320
+ className: a,
321
+ asChild: e = !1,
322
+ ...i
323
+ }) {
324
+ return /* @__PURE__ */ t(
325
+ e ? h : "button",
326
+ {
327
+ "data-slot": "sidebar-group-action",
328
+ "data-sidebar": "group-action",
329
+ className: r(
330
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
331
+ // Increases the hit area of the button on mobile.
332
+ "after:absolute after:-inset-2 md:after:hidden",
333
+ "group-data-[collapsible=icon]:hidden",
334
+ a
335
+ ),
336
+ ...i
337
+ }
338
+ );
339
+ }
340
+ function Se({
341
+ className: a,
342
+ ...e
343
+ }) {
344
+ return /* @__PURE__ */ t(
345
+ "div",
346
+ {
347
+ "data-slot": "sidebar-group-content",
348
+ "data-sidebar": "group-content",
349
+ className: r("w-full text-sm", a),
350
+ ...e
351
+ }
352
+ );
353
+ }
354
+ function Ne({ className: a, ...e }) {
355
+ return /* @__PURE__ */ t(
356
+ "ul",
357
+ {
358
+ "data-slot": "sidebar-menu",
359
+ "data-sidebar": "menu",
360
+ className: r("flex w-full min-w-0 flex-col gap-1", a),
361
+ ...e
362
+ }
363
+ );
364
+ }
365
+ function ye({ className: a, ...e }) {
366
+ return /* @__PURE__ */ t(
367
+ "li",
368
+ {
369
+ "data-slot": "sidebar-menu-item",
370
+ "data-sidebar": "menu-item",
371
+ className: r("group/menu-item relative", a),
372
+ ...e
373
+ }
374
+ );
375
+ }
376
+ const X = z(
377
+ "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
378
+ {
379
+ variants: {
380
+ variant: {
381
+ default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
382
+ outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"
383
+ },
384
+ size: {
385
+ default: "h-8 text-sm",
386
+ sm: "h-7 text-xs",
387
+ lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
388
+ }
389
+ },
390
+ defaultVariants: {
391
+ variant: "default",
392
+ size: "default"
393
+ }
394
+ }
395
+ );
396
+ function Ce({
397
+ asChild: a = !1,
398
+ isActive: e = !1,
399
+ variant: i = "default",
400
+ size: n = "default",
401
+ tooltip: o,
402
+ className: d,
403
+ ...p
404
+ }) {
405
+ const s = a ? h : "button", { isMobile: f, state: u } = S(), v = /* @__PURE__ */ t(
406
+ s,
407
+ {
408
+ "data-slot": "sidebar-menu-button",
409
+ "data-sidebar": "menu-button",
410
+ "data-size": n,
411
+ "data-active": e,
412
+ className: r(X({ variant: i, size: n }), d),
413
+ ...p
414
+ }
415
+ );
416
+ return o ? (typeof o == "string" && (o = {
417
+ children: o
418
+ }), /* @__PURE__ */ m(K, { children: [
419
+ /* @__PURE__ */ t(j, { asChild: !0, children: v }),
420
+ /* @__PURE__ */ t(
421
+ G,
422
+ {
423
+ side: "right",
424
+ align: "center",
425
+ hidden: u !== "collapsed" || f,
426
+ ...o
427
+ }
428
+ )
429
+ ] })) : v;
430
+ }
431
+ function _e({
432
+ className: a,
433
+ asChild: e = !1,
434
+ showOnHover: i = !1,
435
+ ...n
436
+ }) {
437
+ return /* @__PURE__ */ t(
438
+ e ? h : "button",
439
+ {
440
+ "data-slot": "sidebar-menu-action",
441
+ "data-sidebar": "menu-action",
442
+ className: r(
443
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
444
+ // Increases the hit area of the button on mobile.
445
+ "after:absolute after:-inset-2 md:after:hidden",
446
+ "peer-data-[size=sm]/menu-button:top-1",
447
+ "peer-data-[size=default]/menu-button:top-1.5",
448
+ "peer-data-[size=lg]/menu-button:top-2.5",
449
+ "group-data-[collapsible=icon]:hidden",
450
+ i && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
451
+ a
452
+ ),
453
+ ...n
454
+ }
455
+ );
456
+ }
457
+ function Me({
458
+ className: a,
459
+ ...e
460
+ }) {
461
+ return /* @__PURE__ */ t(
462
+ "div",
463
+ {
464
+ "data-slot": "sidebar-menu-badge",
465
+ "data-sidebar": "menu-badge",
466
+ className: r(
467
+ "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded px-1 text-xs font-medium tabular-nums select-none",
468
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
469
+ "peer-data-[size=sm]/menu-button:top-1",
470
+ "peer-data-[size=default]/menu-button:top-1.5",
471
+ "peer-data-[size=lg]/menu-button:top-2.5",
472
+ "group-data-[collapsible=icon]:hidden",
473
+ a
474
+ ),
475
+ ...e
476
+ }
477
+ );
478
+ }
479
+ function ke({
480
+ className: a,
481
+ showIcon: e = !1,
482
+ ...i
483
+ }) {
484
+ const n = c.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
485
+ return /* @__PURE__ */ m(
486
+ "div",
487
+ {
488
+ "data-slot": "sidebar-menu-skeleton",
489
+ "data-sidebar": "menu-skeleton",
490
+ className: r("flex h-8 items-center gap-2 rounded px-2", a),
491
+ ...i,
492
+ children: [
493
+ e && /* @__PURE__ */ t(
494
+ y,
495
+ {
496
+ className: "size-4 rounded",
497
+ "data-sidebar": "menu-skeleton-icon"
498
+ }
499
+ ),
500
+ /* @__PURE__ */ t(
501
+ y,
502
+ {
503
+ className: "h-4 max-w-(--skeleton-width) flex-1",
504
+ "data-sidebar": "menu-skeleton-text",
505
+ style: {
506
+ "--skeleton-width": n
507
+ }
508
+ }
509
+ )
510
+ ]
511
+ }
512
+ );
513
+ }
514
+ function ze({ className: a, ...e }) {
515
+ return /* @__PURE__ */ t(
516
+ "ul",
517
+ {
518
+ "data-slot": "sidebar-menu-sub",
519
+ "data-sidebar": "menu-sub",
520
+ className: r(
521
+ "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
522
+ "group-data-[collapsible=icon]:hidden",
523
+ a
524
+ ),
525
+ ...e
526
+ }
527
+ );
528
+ }
529
+ function Ie({
530
+ className: a,
531
+ ...e
532
+ }) {
533
+ return /* @__PURE__ */ t(
534
+ "li",
535
+ {
536
+ "data-slot": "sidebar-menu-sub-item",
537
+ "data-sidebar": "menu-sub-item",
538
+ className: r("group/menu-sub-item relative", a),
539
+ ...e
540
+ }
541
+ );
542
+ }
543
+ function Ee({
544
+ asChild: a = !1,
545
+ size: e = "md",
546
+ isActive: i = !1,
547
+ className: n,
548
+ ...o
549
+ }) {
550
+ return /* @__PURE__ */ t(
551
+ a ? h : "a",
552
+ {
553
+ "data-slot": "sidebar-menu-sub-button",
554
+ "data-sidebar": "menu-sub-button",
555
+ "data-size": e,
556
+ "data-active": i,
557
+ className: r(
558
+ "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-sidebar-accent-foreground flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
559
+ "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
560
+ e === "sm" && "text-xs",
561
+ e === "md" && "text-sm",
562
+ "group-data-[collapsible=icon]:hidden",
563
+ n
564
+ ),
565
+ ...o
566
+ }
567
+ );
568
+ }
2
569
  export {
3
- a as Sidebar,
4
- i as SidebarContent,
5
- S as SidebarFooter,
6
- b as SidebarGroup,
7
- d as SidebarGroupAction,
8
- n as SidebarGroupContent,
9
- u as SidebarGroupLabel,
10
- t as SidebarHeader,
11
- o as SidebarInput,
12
- M as SidebarInset,
13
- p as SidebarMenu,
14
- G as SidebarMenuAction,
15
- I as SidebarMenuBadge,
16
- g as SidebarMenuButton,
17
- l as SidebarMenuItem,
18
- m as SidebarMenuSkeleton,
19
- B as SidebarMenuSub,
20
- c as SidebarMenuSubButton,
21
- s as SidebarMenuSubItem,
22
- A as SidebarProvider,
23
- C as SidebarRail,
24
- f as SidebarSeparator,
25
- k as SidebarTrigger,
26
- v as useSidebar
570
+ le as Sidebar,
571
+ he as SidebarContent,
572
+ me as SidebarFooter,
573
+ ve as SidebarGroup,
574
+ we as SidebarGroupAction,
575
+ Se as SidebarGroupContent,
576
+ xe as SidebarGroupLabel,
577
+ fe as SidebarHeader,
578
+ pe as SidebarInput,
579
+ be as SidebarInset,
580
+ Ne as SidebarMenu,
581
+ _e as SidebarMenuAction,
582
+ Me as SidebarMenuBadge,
583
+ Ce as SidebarMenuButton,
584
+ ye as SidebarMenuItem,
585
+ ke as SidebarMenuSkeleton,
586
+ ze as SidebarMenuSub,
587
+ Ee as SidebarMenuSubButton,
588
+ Ie as SidebarMenuSubItem,
589
+ de as SidebarProvider,
590
+ ue as SidebarRail,
591
+ ge as SidebarSeparator,
592
+ ce as SidebarTrigger,
593
+ S as useSidebar
27
594
  };
28
595
  //# sourceMappingURL=Sidebar.js.map