@arolariu/components 0.0.2 → 0.0.4

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