@arolariu/components 0.0.11 → 0.0.13

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 (58) hide show
  1. package/dist/cjs/components/ui/alert-dialog.js +1 -1
  2. package/dist/cjs/components/ui/carousel.js +1 -1
  3. package/dist/cjs/components/ui/menubar.js +1 -1
  4. package/dist/cjs/components/ui/pagination.js +1 -1
  5. package/dist/cjs/components/ui/popover.js +1 -1
  6. package/dist/cjs/components/ui/scroll-area.js +1 -1
  7. package/dist/cjs/components/ui/sidebar.js +1 -1
  8. package/dist/cjs/index.js +1 -1
  9. package/dist/es/components/ui/accordion.js +50 -8
  10. package/dist/es/components/ui/alert-dialog.js +118 -22
  11. package/dist/es/components/ui/alert.js +52 -14
  12. package/dist/es/components/ui/aspect-ratio.js +4 -2
  13. package/dist/es/components/ui/avatar.js +42 -6
  14. package/dist/es/components/ui/badge.js +28 -13
  15. package/dist/es/components/ui/breadcrumb.js +78 -10
  16. package/dist/es/components/ui/button.js +37 -21
  17. package/dist/es/components/ui/calendar.js +52 -29
  18. package/dist/es/components/ui/card.js +51 -6
  19. package/dist/es/components/ui/carousel.js +142 -32
  20. package/dist/es/components/ui/chart.js +169 -42
  21. package/dist/es/components/ui/checkbox.js +23 -2
  22. package/dist/es/components/ui/collapsible.js +24 -6
  23. package/dist/es/components/ui/command.js +136 -18
  24. package/dist/es/components/ui/context-menu.js +187 -30
  25. package/dist/es/components/ui/dialog.js +100 -18
  26. package/dist/es/components/ui/drawer.js +98 -18
  27. package/dist/es/components/ui/dropdown-menu.js +195 -30
  28. package/dist/es/components/ui/form.js +59 -8
  29. package/dist/es/components/ui/hover-card.js +30 -9
  30. package/dist/es/components/ui/input-otp.js +47 -6
  31. package/dist/es/components/ui/input.js +14 -1
  32. package/dist/es/components/ui/label.js +15 -2
  33. package/dist/es/components/ui/menubar.js +228 -47
  34. package/dist/es/components/ui/navigation-menu.js +146 -17
  35. package/dist/es/components/ui/pagination.js +96 -15
  36. package/dist/es/components/ui/popover.js +33 -10
  37. package/dist/es/components/ui/progress.js +24 -2
  38. package/dist/es/components/ui/radio-group.js +35 -4
  39. package/dist/es/components/ui/resizable.js +36 -6
  40. package/dist/es/components/ui/scroll-area.js +51 -4
  41. package/dist/es/components/ui/select.js +143 -22
  42. package/dist/es/components/ui/separator.js +19 -2
  43. package/dist/es/components/ui/sheet.js +99 -17
  44. package/dist/es/components/ui/sidebar.js +512 -112
  45. package/dist/es/components/ui/skeleton.js +8 -1
  46. package/dist/es/components/ui/slider.js +56 -4
  47. package/dist/es/components/ui/sonner.js +15 -7
  48. package/dist/es/components/ui/switch.js +24 -2
  49. package/dist/es/components/ui/table.js +87 -9
  50. package/dist/es/components/ui/tabs.js +54 -8
  51. package/dist/es/components/ui/textarea.js +11 -1
  52. package/dist/es/components/ui/toggle-group.js +48 -9
  53. package/dist/es/components/ui/toggle.js +31 -16
  54. package/dist/es/components/ui/tooltip.js +45 -11
  55. package/dist/types/index.d.ts +46 -46
  56. package/dist/types/index.d.ts.map +1 -1
  57. package/package.json +12 -2
  58. package/dist/umd/arolariu-components.umd.js +0 -7
@@ -18,152 +18,552 @@ function S() {
18
18
  throw new Error("useSidebar must be used within a SidebarProvider.");
19
19
  return a;
20
20
  }
21
- function se({ defaultOpen: a = !0, open: e, onOpenChange: i, className: n, style: d, children: c, ...m }) {
22
- const o = I(), [f, u] = l.useState(!1), [v, M] = l.useState(a), g = e != null ? e : v, x = l.useCallback((s) => {
23
- const b = typeof s == "function" ? s(g) : s;
24
- i ? i(b) : M(b), document.cookie = `${$}=${b}; path=/; max-age=${V}`;
25
- }, [i, g]), w = l.useCallback(() => o ? u((s) => !s) : x((s) => !s), [o, x, u]);
21
+ function oe({
22
+ defaultOpen: a = !0,
23
+ open: e,
24
+ onOpenChange: i,
25
+ className: n,
26
+ style: d,
27
+ children: u,
28
+ ...m
29
+ }) {
30
+ const s = I(), [f, c] = l.useState(!1), [v, M] = l.useState(a), g = e != null ? e : v, x = l.useCallback(
31
+ (o) => {
32
+ const b = typeof o == "function" ? o(g) : o;
33
+ i ? i(b) : M(b), document.cookie = `${$}=${b}; path=/; max-age=${V}`;
34
+ },
35
+ [i, g]
36
+ ), w = l.useCallback(() => s ? c((o) => !o) : x((o) => !o), [s, x, c]);
26
37
  l.useEffect(() => {
27
- const s = (b) => {
38
+ const o = (b) => {
28
39
  b.key === U && (b.metaKey || b.ctrlKey) && (b.preventDefault(), w());
29
40
  };
30
- return window.addEventListener("keydown", s), () => window.removeEventListener("keydown", s);
41
+ return window.addEventListener("keydown", o), () => window.removeEventListener("keydown", o);
31
42
  }, [w]);
32
- const N = g ? "expanded" : "collapsed", C = l.useMemo(() => ({
33
- state: N,
34
- open: g,
35
- setOpen: x,
36
- isMobile: o,
37
- openMobile: f,
38
- setOpenMobile: u,
39
- toggleSidebar: w
40
- }), [N, g, x, o, f, u, w]);
41
- return t(_.Provider, { value: C, children: t(L, { delayDuration: 0, children: t("div", { "data-slot": "sidebar-wrapper", style: {
42
- "--sidebar-width": W,
43
- "--sidebar-width-icon": F,
44
- ...d
45
- }, className: r("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full", n), ...m, children: c }) }) });
46
- }
47
- function oe({ side: a = "left", variant: e = "sidebar", collapsible: i = "offcanvas", className: n, children: d, ...c }) {
48
- const { isMobile: m, state: o, openMobile: f, setOpenMobile: u } = S();
49
- return i === "none" ? t("div", { "data-slot": "sidebar", className: r("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col", n), ...c, children: d }) : m ? t(B, { open: f, onOpenChange: u, ...c, children: p(A, { "data-sidebar": "sidebar", "data-slot": "sidebar", "data-mobile": "true", className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden", style: {
50
- "--sidebar-width": q
51
- }, side: a, children: [p(O, { className: "sr-only", children: [t(R, { children: "Sidebar" }), t(H, { children: "Displays the mobile sidebar." })] }), t("div", { className: "flex h-full w-full flex-col", children: d })] }) }) : p("div", { className: "group peer text-sidebar-foreground hidden md:block", "data-state": o, "data-collapsible": o === "collapsed" ? i : "", "data-variant": e, "data-side": a, "data-slot": "sidebar", children: [t("div", { className: r("relative h-svh w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)") }), t("div", { className: r(
52
- "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
53
- 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)]",
54
- // Adjust the padding for floating and inset variants.
55
- 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",
56
- n
57
- ), ...c, children: t("div", { "data-sidebar": "sidebar", 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", children: d }) })] });
58
- }
59
- function le({ className: a, onClick: e, ...i }) {
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": W,
61
+ "--sidebar-width-icon": F,
62
+ ...d
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: d,
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: d
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": q
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: d })
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: d
150
+ }
151
+ )
152
+ }
153
+ )
154
+ ]
155
+ }
156
+ );
157
+ }
158
+ function le({
159
+ className: a,
160
+ onClick: e,
161
+ ...i
162
+ }) {
60
163
  const { toggleSidebar: n } = S();
61
- return p(E, { "data-sidebar": "trigger", "data-slot": "sidebar-trigger", variant: "ghost", size: "icon", className: r("h-7 w-7", a), onClick: (d) => {
62
- e == null || e(d), n();
63
- }, ...i, children: [t(z, {}), t("span", { className: "sr-only", children: "Toggle Sidebar" })] });
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: (d) => {
173
+ e == null || e(d), n();
174
+ },
175
+ ...i,
176
+ children: [
177
+ /* @__PURE__ */ t(z, {}),
178
+ /* @__PURE__ */ t("span", { className: "sr-only", children: "Toggle Sidebar" })
179
+ ]
180
+ }
181
+ );
64
182
  }
65
- function ce({ className: a, ...e }) {
183
+ function ue({ className: a, ...e }) {
66
184
  const { toggleSidebar: i } = S();
67
- return t("button", { "data-sidebar": "rail", "data-slot": "sidebar-rail", "aria-label": "Toggle Sidebar", tabIndex: -1, onClick: i, title: "Toggle Sidebar", className: r("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", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", a), ...e });
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
+ );
68
206
  }
69
- function ue({ className: a, ...e }) {
70
- return t("main", { "data-slot": "sidebar-inset", className: r("bg-white relative flex min-h-svh w-full flex-1 flex-col dark:bg-neutral-950", "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", a), ...e });
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
+ );
71
220
  }
72
- function be({ className: a, ...e }) {
73
- return t(D, { "data-slot": "sidebar-input", "data-sidebar": "input", className: r("bg-white h-8 w-full shadow-none dark:bg-neutral-950", a), ...e });
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
+ );
74
234
  }
75
235
  function fe({ className: a, ...e }) {
76
- return t("div", { "data-slot": "sidebar-header", "data-sidebar": "header", className: r("flex flex-col gap-2 p-2", 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
+ );
77
245
  }
78
246
  function pe({ className: a, ...e }) {
79
- return t("div", { "data-slot": "sidebar-footer", "data-sidebar": "footer", className: r("flex flex-col gap-2 p-2", 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
+ );
80
256
  }
81
- function me({ className: a, ...e }) {
82
- return t(T, { "data-slot": "sidebar-separator", "data-sidebar": "separator", className: r("bg-sidebar-border mx-2 w-auto", a), ...e });
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
+ );
83
270
  }
84
271
  function ge({ className: a, ...e }) {
85
- return t("div", { "data-slot": "sidebar-content", "data-sidebar": "content", className: r("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", 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
+ );
86
284
  }
87
285
  function he({ className: a, ...e }) {
88
- return t("div", { "data-slot": "sidebar-group", "data-sidebar": "group", className: r("relative flex w-full min-w-0 flex-col p-2", 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
+ );
89
295
  }
90
- function ve({ className: a, asChild: e = !1, ...i }) {
91
- return t(e ? h : "div", { "data-slot": "sidebar-group-label", "data-sidebar": "group-label", className: r("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", "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0", a), ...i });
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
+ );
92
314
  }
93
- function xe({ className: a, asChild: e = !1, ...i }) {
94
- return t(e ? h : "button", { "data-slot": "sidebar-group-action", "data-sidebar": "group-action", className: r(
95
- "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",
96
- // Increases the hit area of the button on mobile.
97
- "after:absolute after:-inset-2 md:after:hidden",
98
- "group-data-[collapsible=icon]:hidden",
99
- a
100
- ), ...i });
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
+ );
101
335
  }
102
- function we({ className: a, ...e }) {
103
- return t("div", { "data-slot": "sidebar-group-content", "data-sidebar": "group-content", className: r("w-full text-sm", a), ...e });
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
+ );
104
349
  }
105
350
  function Se({ className: a, ...e }) {
106
- return t("ul", { "data-slot": "sidebar-menu", "data-sidebar": "menu", className: r("flex w-full min-w-0 flex-col gap-1", 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
+ );
107
360
  }
108
361
  function Ne({ className: a, ...e }) {
109
- return t("li", { "data-slot": "sidebar-menu-item", "data-sidebar": "menu-item", className: r("group/menu-item relative", 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
+ );
110
371
  }
111
- const X = k("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", {
112
- variants: {
113
- variant: {
114
- default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
115
- 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"
372
+ const X = 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
+ }
116
385
  },
117
- size: {
118
- default: "h-8 text-sm",
119
- sm: "h-7 text-xs",
120
- lg: "h-12 text-sm group-data-[collapsible=icon]:p-0!"
121
- }
122
- },
123
- defaultVariants: {
124
- variant: "default",
125
- size: "default"
386
+ defaultVariants: {
387
+ variant: "default",
388
+ size: "default"
389
+ }
126
390
  }
127
- });
128
- function ye({ asChild: a = !1, isActive: e = !1, variant: i = "default", size: n = "default", tooltip: d, className: c, ...m }) {
129
- const o = a ? h : "button", { isMobile: f, state: u } = S(), v = t(o, { "data-slot": "sidebar-menu-button", "data-sidebar": "menu-button", "data-size": n, "data-active": e, className: r(X({ variant: i, size: n }), c), ...m });
391
+ );
392
+ function ye({
393
+ asChild: a = !1,
394
+ isActive: e = !1,
395
+ variant: i = "default",
396
+ size: n = "default",
397
+ tooltip: d,
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(X({ variant: i, size: n }), u),
409
+ ...m
410
+ }
411
+ );
130
412
  return d ? (typeof d == "string" && (d = {
131
413
  children: d
132
- }), p(K, { children: [t(j, { asChild: !0, children: v }), t(G, { side: "right", align: "center", hidden: u !== "collapsed" || f, ...d })] })) : v;
133
- }
134
- function _e({ className: a, asChild: e = !1, showOnHover: i = !1, ...n }) {
135
- return t(e ? h : "button", { "data-slot": "sidebar-menu-action", "data-sidebar": "menu-action", className: r(
136
- "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",
137
- // Increases the hit area of the button on mobile.
138
- "after:absolute after:-inset-2 md:after:hidden",
139
- "peer-data-[size=sm]/menu-button:top-1",
140
- "peer-data-[size=default]/menu-button:top-1.5",
141
- "peer-data-[size=lg]/menu-button:top-2.5",
142
- "group-data-[collapsible=icon]:hidden",
143
- 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",
144
- a
145
- ), ...n });
146
- }
147
- function Me({ className: a, ...e }) {
148
- return t("div", { "data-slot": "sidebar-menu-badge", "data-sidebar": "menu-badge", className: r("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", "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground", "peer-data-[size=sm]/menu-button:top-1", "peer-data-[size=default]/menu-button:top-1.5", "peer-data-[size=lg]/menu-button:top-2.5", "group-data-[collapsible=icon]:hidden", a), ...e });
149
- }
150
- function Ce({ className: a, showIcon: e = !1, ...i }) {
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
+ ...d
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
+ }) {
151
480
  const n = l.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
152
- return p("div", { "data-slot": "sidebar-menu-skeleton", "data-sidebar": "menu-skeleton", className: r("flex h-8 items-center gap-2 rounded-md px-2", a), ...i, children: [e && t(y, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }), t(y, { className: "h-4 max-w-(--skeleton-width) flex-1", "data-sidebar": "menu-skeleton-text", style: {
153
- "--skeleton-width": n
154
- } })] });
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
+ );
155
509
  }
156
510
  function ke({ className: a, ...e }) {
157
- return t("ul", { "data-slot": "sidebar-menu-sub", "data-sidebar": "menu-sub", className: r("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", "group-data-[collapsible=icon]:hidden", 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
+ );
158
524
  }
159
- function ze({ className: a, ...e }) {
160
- return t("li", { "data-slot": "sidebar-menu-sub-item", "data-sidebar": "menu-sub-item", className: r("group/menu-sub-item relative", a), ...e });
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
+ );
161
538
  }
162
- function Ie({ asChild: a = !1, size: e = "md", isActive: i = !1, className: n, ...d }) {
163
- return t(a ? h : "a", { "data-slot": "sidebar-menu-sub-button", "data-sidebar": "menu-sub-button", "data-size": e, "data-active": i, className: r("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", "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground", e === "sm" && "text-xs", e === "md" && "text-sm", "group-data-[collapsible=icon]:hidden", n), ...d });
539
+ function Ie({
540
+ asChild: a = !1,
541
+ size: e = "md",
542
+ isActive: i = !1,
543
+ className: n,
544
+ ...d
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
+ ...d
562
+ }
563
+ );
164
564
  }
165
565
  export {
166
- oe as Sidebar,
566
+ se as Sidebar,
167
567
  ge as SidebarContent,
168
568
  pe as SidebarFooter,
169
569
  he as SidebarGroup,
@@ -172,7 +572,7 @@ export {
172
572
  ve as SidebarGroupLabel,
173
573
  fe as SidebarHeader,
174
574
  be as SidebarInput,
175
- ue as SidebarInset,
575
+ ce as SidebarInset,
176
576
  Se as SidebarMenu,
177
577
  _e as SidebarMenuAction,
178
578
  Me as SidebarMenuBadge,
@@ -182,8 +582,8 @@ export {
182
582
  ke as SidebarMenuSub,
183
583
  Ie as SidebarMenuSubButton,
184
584
  ze as SidebarMenuSubItem,
185
- se as SidebarProvider,
186
- ce as SidebarRail,
585
+ oe as SidebarProvider,
586
+ ue as SidebarRail,
187
587
  me as SidebarSeparator,
188
588
  le as SidebarTrigger,
189
589
  S as useSidebar