@cryptlex/web-components 1.3.2 → 1.3.3

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 (60) hide show
  1. package/dist/components/data-table/column-picker.es.js +81 -0
  2. package/dist/components/data-table/column-picker.es.js.map +1 -0
  3. package/dist/components/data-table/data-table.es.js +197 -0
  4. package/dist/components/data-table/data-table.es.js.map +1 -0
  5. package/dist/components/data-table/page-size.es.js +23 -0
  6. package/dist/components/data-table/page-size.es.js.map +1 -0
  7. package/dist/components/data-table/paginator.es.js +63 -0
  8. package/dist/components/data-table/paginator.es.js.map +1 -0
  9. package/dist/components/data-table/table-actions.es.js +82 -0
  10. package/dist/components/data-table/table-actions.es.js.map +1 -0
  11. package/dist/components/data-table/table-commons.es.js +55 -0
  12. package/dist/components/data-table/table-commons.es.js.map +1 -0
  13. package/dist/components/data-table/table-content.es.js +46 -0
  14. package/dist/components/data-table/table-content.es.js.map +1 -0
  15. package/dist/components/data-table/table-utils/constants.es.js +274 -0
  16. package/dist/components/data-table/table-utils/constants.es.js.map +1 -0
  17. package/dist/components/data-table/table-utils/createTableFetchFn.es.js +25 -0
  18. package/dist/components/data-table/table-utils/createTableFetchFn.es.js.map +1 -0
  19. package/dist/components/data-table/table-utils/date.es.js +12 -0
  20. package/dist/components/data-table/table-utils/date.es.js.map +1 -0
  21. package/dist/components/data-table/table-utils/fetch.es.js +40 -0
  22. package/dist/components/data-table/table-utils/fetch.es.js.map +1 -0
  23. package/dist/components/data-table/table-utils/link-display.es.js +21 -0
  24. package/dist/components/data-table/table-utils/link-display.es.js.map +1 -0
  25. package/dist/components/data-table/table-utils/string.es.js +19 -0
  26. package/dist/components/data-table/table-utils/string.es.js.map +1 -0
  27. package/dist/components/data-table/table-utils/types.es.js +5 -0
  28. package/dist/components/data-table/table-utils/types.es.js.map +1 -0
  29. package/dist/components/info-card/info-card.es.js +74 -0
  30. package/dist/components/info-card/info-card.es.js.map +1 -0
  31. package/dist/components/sidebar/app-layout.es.js +86 -0
  32. package/dist/components/sidebar/app-layout.es.js.map +1 -0
  33. package/dist/components/sidebar/nav-main.es.js +76 -0
  34. package/dist/components/sidebar/nav-main.es.js.map +1 -0
  35. package/dist/components/sidebar/sidebar.es.js +10 -0
  36. package/dist/components/sidebar/sidebar.es.js.map +1 -0
  37. package/dist/components/static-data-table/data-table.es.js +30 -0
  38. package/dist/components/static-data-table/data-table.es.js.map +1 -0
  39. package/dist/components/ui/button.es.js +12 -22
  40. package/dist/components/ui/button.es.js.map +1 -1
  41. package/dist/components/ui/drawer.es.js +13 -12
  42. package/dist/components/ui/drawer.es.js.map +1 -1
  43. package/dist/components/ui/dynamic-input.es.js +141 -0
  44. package/dist/components/ui/dynamic-input.es.js.map +1 -0
  45. package/dist/components/ui/mutli-select.es.js +197 -0
  46. package/dist/components/ui/mutli-select.es.js.map +1 -0
  47. package/dist/components/ui/search-input.es.js +41 -0
  48. package/dist/components/ui/search-input.es.js.map +1 -0
  49. package/dist/components/ui/sheet.es.js +11 -37
  50. package/dist/components/ui/sheet.es.js.map +1 -1
  51. package/dist/components/ui/sidebar.es.js +286 -264
  52. package/dist/components/ui/sidebar.es.js.map +1 -1
  53. package/dist/components/ui/table-page-layout.es.js +14 -0
  54. package/dist/components/ui/table-page-layout.es.js.map +1 -0
  55. package/dist/index.es.d.ts +303 -2
  56. package/dist/index.es.js +264 -208
  57. package/dist/index.es.js.map +1 -1
  58. package/dist/utils/index.es.js +13 -8
  59. package/dist/utils/index.es.js.map +1 -1
  60. package/package.json +10 -3
@@ -1,24 +1,24 @@
1
- import { jsx as r, jsxs as S } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { Slot as g } from "@radix-ui/react-slot";
1
+ import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
+ import { Slot as h } from "@radix-ui/react-slot";
4
3
  import { cva as I } from "class-variance-authority";
5
- import { PanelLeft as k } from "lucide-react";
6
- import { useIsMobile as z } from "../../hooks/use-mobile.es.js";
7
- import { cn as o } from "../../utils/index.es.js";
8
- import { Button as B } from "./button.es.js";
9
- import { Input as E } from "./input.es.js";
10
- import { Separator as T } from "./separator.es.js";
11
- import { Sheet as A, SheetContent as D } from "./sheet.es.js";
4
+ import { Menu as k, ChevronLeft as z, ChevronRight as B } from "lucide-react";
5
+ import * as i from "react";
6
+ import { Button as E } from "./button.es.js";
7
+ import { Input as T } from "./input.es.js";
8
+ import { Separator as A } from "./separator.es.js";
9
+ import { Sheet as D, SheetContent as G, SheetHeader as O, SheetTitle as H, SheetDescription as K } from "./sheet.es.js";
12
10
  import { Skeleton as M } from "./skeleton.es.js";
13
- import { TooltipProvider as G, Tooltip as O, TooltipTrigger as H, TooltipContent as K } from "./tooltip.es.js";
14
- const L = "sidebar:state", j = 60 * 60 * 24 * 7, $ = "16rem", V = "18rem", W = "3rem", q = "b", R = i.createContext(null);
11
+ import { TooltipProvider as L, Tooltip as j, TooltipTrigger as $, TooltipContent as V } from "./tooltip.es.js";
12
+ import { useIsMobile as W } from "../../hooks/use-mobile.es.js";
13
+ import { cn as o } from "../../utils/index.es.js";
14
+ const q = "sidebar:state", F = 60 * 60 * 24 * 7, U = "16rem", X = "18rem", Y = "3rem", J = "b", R = i.createContext(null);
15
15
  function y() {
16
16
  const a = i.useContext(R);
17
17
  if (!a)
18
18
  throw new Error("useSidebar must be used within a SidebarProvider.");
19
19
  return a;
20
20
  }
21
- const F = i.forwardRef(
21
+ const Q = i.forwardRef(
22
22
  ({
23
23
  defaultOpen: a = !0,
24
24
  open: e,
@@ -26,57 +26,55 @@ const F = i.forwardRef(
26
26
  className: d,
27
27
  style: n,
28
28
  children: s,
29
- ...u
30
- }, m) => {
31
- const c = z(), [f, b] = i.useState(!1), [h, _] = i.useState(a), p = e ?? h, v = i.useCallback(
29
+ ...c
30
+ }, f) => {
31
+ const u = W(), [p, b] = i.useState(!1), [v, _] = i.useState(a), m = e ?? v, x = i.useCallback(
32
32
  (l) => {
33
33
  if (t)
34
- return t == null ? void 0 : t(
35
- typeof l == "function" ? l(p) : l
36
- );
37
- _(l), document.cookie = `${L}=${p}; path=/; max-age=${j}`;
34
+ return t == null ? void 0 : t(typeof l == "function" ? l(m) : l);
35
+ _(l), document.cookie = `${q}=${m}; path=/; max-age=${F}`;
38
36
  },
39
- [t, p]
40
- ), x = i.useCallback(() => c ? b((l) => !l) : v((l) => !l), [c, v, b]);
37
+ [t, m]
38
+ ), w = i.useCallback(() => u ? b((l) => !l) : x((l) => !l), [u, x, b]);
41
39
  i.useEffect(() => {
42
- const l = (w) => {
43
- w.key === q && (w.metaKey || w.ctrlKey) && (w.preventDefault(), x());
40
+ const l = (S) => {
41
+ S.key === J && (S.metaKey || S.ctrlKey) && (S.preventDefault(), w());
44
42
  };
45
43
  return window.addEventListener("keydown", l), () => window.removeEventListener("keydown", l);
46
- }, [x]);
47
- const N = p ? "expanded" : "collapsed", C = i.useMemo(
44
+ }, [w]);
45
+ const N = m ? "expanded" : "collapsed", C = i.useMemo(
48
46
  () => ({
49
47
  state: N,
50
- open: p,
51
- setOpen: v,
52
- isMobile: c,
53
- openMobile: f,
48
+ open: m,
49
+ setOpen: x,
50
+ isMobile: u,
51
+ openMobile: p,
54
52
  setOpenMobile: b,
55
- toggleSidebar: x
53
+ toggleSidebar: w
56
54
  }),
57
- [N, p, v, c, f, b, x]
55
+ [N, m, x, u, p, b, w]
58
56
  );
59
- return /* @__PURE__ */ r(R.Provider, { value: C, children: /* @__PURE__ */ r(G, { delayDuration: 0, children: /* @__PURE__ */ r(
57
+ return /* @__PURE__ */ r(R.Provider, { value: C, children: /* @__PURE__ */ r(L, { delayDuration: 0, children: /* @__PURE__ */ r(
60
58
  "div",
61
59
  {
62
60
  style: {
63
- "--sidebar-width": $,
64
- "--sidebar-width-icon": W,
61
+ "--sidebar-width": U,
62
+ "--sidebar-width-icon": Y,
65
63
  ...n
66
64
  },
67
65
  className: o(
68
66
  "group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",
69
67
  d
70
68
  ),
71
- ref: m,
72
- ...u,
69
+ ref: f,
70
+ ...c,
73
71
  children: s
74
72
  }
75
73
  ) }) });
76
74
  }
77
75
  );
78
- F.displayName = "SidebarProvider";
79
- const U = i.forwardRef(
76
+ Q.displayName = "SidebarProvider";
77
+ const Z = i.forwardRef(
80
78
  ({
81
79
  side: a = "left",
82
80
  variant: e = "sidebar",
@@ -84,8 +82,8 @@ const U = i.forwardRef(
84
82
  className: d,
85
83
  children: n,
86
84
  ...s
87
- }, u) => {
88
- const { isMobile: m, state: c, openMobile: f, setOpenMobile: b } = y();
85
+ }, c) => {
86
+ const { isMobile: f, state: u, openMobile: p, setOpenMobile: b } = y();
89
87
  return t === "none" ? /* @__PURE__ */ r(
90
88
  "div",
91
89
  {
@@ -93,29 +91,35 @@ const U = i.forwardRef(
93
91
  "flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",
94
92
  d
95
93
  ),
96
- ref: u,
94
+ ref: c,
97
95
  ...s,
98
96
  children: n
99
97
  }
100
- ) : m ? /* @__PURE__ */ r(A, { open: f, onOpenChange: b, ...s, children: /* @__PURE__ */ r(
101
- D,
98
+ ) : f ? /* @__PURE__ */ r(D, { open: p, onOpenChange: b, ...s, children: /* @__PURE__ */ g(
99
+ G,
102
100
  {
103
101
  "data-sidebar": "sidebar",
104
102
  "data-mobile": "true",
105
103
  className: "w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",
106
104
  style: {
107
- "--sidebar-width": V
105
+ "--sidebar-width": X
108
106
  },
109
107
  side: a,
110
- children: /* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: n })
108
+ children: [
109
+ /* @__PURE__ */ g(O, { children: [
110
+ /* @__PURE__ */ r(H, {}),
111
+ /* @__PURE__ */ r(K, {})
112
+ ] }),
113
+ /* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col", children: n })
114
+ ]
111
115
  }
112
- ) }) : /* @__PURE__ */ S(
116
+ ) }) : /* @__PURE__ */ g(
113
117
  "div",
114
118
  {
115
- ref: u,
119
+ ref: c,
116
120
  className: "group peer hidden md:block text-sidebar-foreground",
117
- "data-state": c,
118
- "data-collapsible": c === "collapsed" ? t : "",
121
+ "data-state": u,
122
+ "data-collapsible": u === "collapsed" ? t : "",
119
123
  "data-variant": e,
120
124
  "data-side": a,
121
125
  children: [
@@ -156,69 +160,73 @@ const U = i.forwardRef(
156
160
  );
157
161
  }
158
162
  );
159
- U.displayName = "Sidebar";
160
- const X = i.forwardRef(({ className: a, onClick: e, ...t }, d) => {
161
- const { toggleSidebar: n } = y();
162
- return /* @__PURE__ */ S(
163
- B,
163
+ Z.displayName = "Sidebar";
164
+ const P = i.forwardRef(({ className: a, onClick: e, ...t }, d) => {
165
+ const { toggleSidebar: n, open: s, isMobile: c } = y();
166
+ return /* @__PURE__ */ g(
167
+ E,
164
168
  {
165
169
  ref: d,
166
170
  "data-sidebar": "trigger",
167
171
  variant: "ghost",
168
172
  size: "icon",
169
173
  className: o("h-7 w-7", a),
170
- onClick: (s) => {
171
- e == null || e(s), n();
174
+ onClick: (f) => {
175
+ e == null || e(f), n();
172
176
  },
173
177
  ...t,
174
178
  children: [
175
- /* @__PURE__ */ r(k, {}),
179
+ c ? /* @__PURE__ */ r(k, {}) : s ? /* @__PURE__ */ r(z, {}) : /* @__PURE__ */ r(B, {}),
176
180
  /* @__PURE__ */ r("span", { className: "sr-only", children: "Toggle Sidebar" })
177
181
  ]
178
182
  }
179
183
  );
180
184
  });
181
- X.displayName = "SidebarTrigger";
182
- const Y = i.forwardRef(({ className: a, ...e }, t) => {
183
- const { toggleSidebar: d } = y();
184
- return /* @__PURE__ */ r(
185
- "button",
185
+ P.displayName = "SidebarTrigger";
186
+ const ee = i.forwardRef(
187
+ ({ className: a, ...e }, t) => {
188
+ const { toggleSidebar: d } = y();
189
+ return /* @__PURE__ */ r(
190
+ "button",
191
+ {
192
+ ref: t,
193
+ "data-sidebar": "rail",
194
+ "aria-label": "Toggle Sidebar",
195
+ tabIndex: -1,
196
+ onClick: d,
197
+ title: "Toggle Sidebar",
198
+ className: o(
199
+ "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",
200
+ "[[data-side=left]_&]:cursor-w-resize [[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
+ "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
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
+ );
212
+ ee.displayName = "SidebarRail";
213
+ const ae = i.forwardRef(
214
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
215
+ "main",
186
216
  {
187
217
  ref: t,
188
- "data-sidebar": "rail",
189
- "aria-label": "Toggle Sidebar",
190
- tabIndex: -1,
191
- onClick: d,
192
- title: "Toggle Sidebar",
193
218
  className: o(
194
- "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",
195
- "[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize",
196
- "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
197
- "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar",
198
- "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
199
- "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
219
+ "relative flex min-h-svh flex-1 flex-col bg-background",
220
+ "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",
200
221
  a
201
222
  ),
202
223
  ...e
203
224
  }
204
- );
205
- });
206
- Y.displayName = "SidebarRail";
207
- const J = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
208
- "main",
209
- {
210
- ref: t,
211
- className: o(
212
- "relative flex min-h-svh flex-1 flex-col bg-background",
213
- "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",
214
- a
215
- ),
216
- ...e
217
- }
218
- ));
219
- J.displayName = "SidebarInset";
220
- const P = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
221
- E,
225
+ )
226
+ );
227
+ ae.displayName = "SidebarInset";
228
+ const te = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
229
+ T,
222
230
  {
223
231
  ref: t,
224
232
  "data-sidebar": "input",
@@ -229,29 +237,33 @@ const P = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
229
237
  ...e
230
238
  }
231
239
  ));
232
- P.displayName = "SidebarInput";
233
- const Q = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
234
- "div",
235
- {
236
- ref: t,
237
- "data-sidebar": "header",
238
- className: o("flex flex-col gap-2 p-2", a),
239
- ...e
240
- }
241
- ));
242
- Q.displayName = "SidebarHeader";
243
- const Z = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
244
- "div",
245
- {
246
- ref: t,
247
- "data-sidebar": "footer",
248
- className: o("flex flex-col gap-2 p-2", a),
249
- ...e
250
- }
251
- ));
252
- Z.displayName = "SidebarFooter";
253
- const ee = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
254
- T,
240
+ te.displayName = "SidebarInput";
241
+ const re = i.forwardRef(
242
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
243
+ "div",
244
+ {
245
+ ref: t,
246
+ "data-sidebar": "header",
247
+ className: o("flex flex-col gap-2 p-2", a),
248
+ ...e
249
+ }
250
+ )
251
+ );
252
+ re.displayName = "SidebarHeader";
253
+ const ie = i.forwardRef(
254
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
255
+ "div",
256
+ {
257
+ ref: t,
258
+ "data-sidebar": "footer",
259
+ className: o("flex flex-col gap-2 p-2", a),
260
+ ...e
261
+ }
262
+ )
263
+ );
264
+ ie.displayName = "SidebarFooter";
265
+ const oe = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
266
+ A,
255
267
  {
256
268
  ref: t,
257
269
  "data-sidebar": "separator",
@@ -259,32 +271,36 @@ const ee = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
259
271
  ...e
260
272
  }
261
273
  ));
262
- ee.displayName = "SidebarSeparator";
263
- const ae = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
264
- "div",
265
- {
266
- ref: t,
267
- "data-sidebar": "content",
268
- className: o(
269
- "flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
270
- a
271
- ),
272
- ...e
273
- }
274
- ));
275
- ae.displayName = "SidebarContent";
276
- const te = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
277
- "div",
278
- {
279
- ref: t,
280
- "data-sidebar": "group",
281
- className: o("relative flex w-full min-w-0 flex-col p-2", a),
282
- ...e
283
- }
284
- ));
285
- te.displayName = "SidebarGroup";
286
- const re = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
287
- e ? g : "div",
274
+ oe.displayName = "SidebarSeparator";
275
+ const de = i.forwardRef(
276
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
277
+ "div",
278
+ {
279
+ ref: t,
280
+ "data-sidebar": "content",
281
+ className: o(
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
+ de.displayName = "SidebarContent";
290
+ const ne = i.forwardRef(
291
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
292
+ "div",
293
+ {
294
+ ref: t,
295
+ "data-sidebar": "group",
296
+ className: o("relative flex w-full min-w-0 flex-col p-2", a),
297
+ ...e
298
+ }
299
+ )
300
+ );
301
+ ne.displayName = "SidebarGroup";
302
+ const se = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
303
+ e ? h : "div",
288
304
  {
289
305
  ref: d,
290
306
  "data-sidebar": "group-label",
@@ -296,9 +312,9 @@ const re = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PU
296
312
  ...t
297
313
  }
298
314
  ));
299
- re.displayName = "SidebarGroupLabel";
300
- const ie = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
301
- e ? g : "button",
315
+ se.displayName = "SidebarGroupLabel";
316
+ const le = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PURE__ */ r(
317
+ e ? h : "button",
302
318
  {
303
319
  ref: d,
304
320
  "data-sidebar": "group-action",
@@ -312,38 +328,44 @@ const ie = i.forwardRef(({ className: a, asChild: e = !1, ...t }, d) => /* @__PU
312
328
  ...t
313
329
  }
314
330
  ));
315
- ie.displayName = "SidebarGroupAction";
316
- const oe = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
317
- "div",
318
- {
319
- ref: t,
320
- "data-sidebar": "group-content",
321
- className: o("w-full text-body", a),
322
- ...e
323
- }
324
- ));
325
- oe.displayName = "SidebarGroupContent";
326
- const de = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
327
- "ul",
328
- {
329
- ref: t,
330
- "data-sidebar": "menu",
331
- className: o("flex w-full min-w-0 flex-col gap-1", a),
332
- ...e
333
- }
334
- ));
335
- de.displayName = "SidebarMenu";
336
- const ne = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
337
- "li",
338
- {
339
- ref: t,
340
- "data-sidebar": "menu-item",
341
- className: o("group/menu-item relative", a),
342
- ...e
343
- }
344
- ));
345
- ne.displayName = "SidebarMenuItem";
346
- const se = I(
331
+ le.displayName = "SidebarGroupAction";
332
+ const ce = i.forwardRef(
333
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
334
+ "div",
335
+ {
336
+ ref: t,
337
+ "data-sidebar": "group-content",
338
+ className: o("w-full text-body", a),
339
+ ...e
340
+ }
341
+ )
342
+ );
343
+ ce.displayName = "SidebarGroupContent";
344
+ const ue = i.forwardRef(
345
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
346
+ "ul",
347
+ {
348
+ ref: t,
349
+ "data-sidebar": "menu",
350
+ className: o("flex w-full min-w-0 flex-col", a),
351
+ ...e
352
+ }
353
+ )
354
+ );
355
+ ue.displayName = "SidebarMenu";
356
+ const be = i.forwardRef(
357
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
358
+ "li",
359
+ {
360
+ ref: t,
361
+ "data-sidebar": "menu-item",
362
+ className: o("group/menu-item relative", a),
363
+ ...e
364
+ }
365
+ )
366
+ );
367
+ be.displayName = "SidebarMenuItem";
368
+ const fe = I(
347
369
  "peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-body outline-none 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",
348
370
  {
349
371
  variants: {
@@ -362,46 +384,46 @@ const se = I(
362
384
  size: "default"
363
385
  }
364
386
  }
365
- ), le = i.forwardRef(
387
+ ), pe = i.forwardRef(
366
388
  ({
367
389
  asChild: a = !1,
368
390
  isActive: e = !1,
369
391
  variant: t = "default",
370
- size: d = "default",
392
+ size: d = "lg",
371
393
  tooltip: n,
372
394
  className: s,
373
- ...u
374
- }, m) => {
375
- const c = a ? g : "button", { isMobile: f, state: b } = y(), h = /* @__PURE__ */ r(
376
- c,
395
+ ...c
396
+ }, f) => {
397
+ const u = a ? h : "button", { isMobile: p, state: b } = y(), v = /* @__PURE__ */ r(
398
+ u,
377
399
  {
378
- ref: m,
400
+ ref: f,
379
401
  "data-sidebar": "menu-button",
380
402
  "data-size": d,
381
403
  "data-active": e,
382
- className: o(se({ variant: t, size: d }), s),
383
- ...u
404
+ className: o(fe({ variant: t, size: d }), s),
405
+ ...c
384
406
  }
385
407
  );
386
408
  return n ? (typeof n == "string" && (n = {
387
409
  children: n
388
- }), /* @__PURE__ */ S(O, { children: [
389
- /* @__PURE__ */ r(H, { asChild: !0, children: h }),
410
+ }), /* @__PURE__ */ g(j, { children: [
411
+ /* @__PURE__ */ r($, { asChild: !0, children: v }),
390
412
  /* @__PURE__ */ r(
391
- K,
413
+ V,
392
414
  {
393
415
  side: "right",
394
416
  align: "center",
395
- hidden: b !== "collapsed" || f,
417
+ hidden: b !== "collapsed" || p,
396
418
  ...n
397
419
  }
398
420
  )
399
- ] })) : h;
421
+ ] })) : v;
400
422
  }
401
423
  );
402
- le.displayName = "SidebarMenuButton";
403
- const ce = i.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, n) => /* @__PURE__ */ r(
404
- e ? g : "button",
424
+ pe.displayName = "SidebarMenuButton";
425
+ const me = i.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, ...d }, n) => /* @__PURE__ */ r(
426
+ e ? h : "button",
405
427
  {
406
428
  ref: n,
407
429
  "data-sidebar": "menu-action",
@@ -419,28 +441,30 @@ const ce = i.forwardRef(({ className: a, asChild: e = !1, showOnHover: t = !1, .
419
441
  ...d
420
442
  }
421
443
  ));
422
- ce.displayName = "SidebarMenuAction";
423
- const be = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
424
- "div",
425
- {
426
- ref: t,
427
- "data-sidebar": "menu-badge",
428
- className: o(
429
- "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-caption font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
430
- "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
431
- "peer-data-[size=sm]/menu-button:top-1",
432
- "peer-data-[size=default]/menu-button:top-1.5",
433
- "peer-data-[size=lg]/menu-button:top-2.5",
434
- "group-data-[collapsible=icon]:hidden",
435
- a
436
- ),
437
- ...e
438
- }
439
- ));
440
- be.displayName = "SidebarMenuBadge";
441
- const ue = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
444
+ me.displayName = "SidebarMenuAction";
445
+ const ge = i.forwardRef(
446
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
447
+ "div",
448
+ {
449
+ ref: t,
450
+ "data-sidebar": "menu-badge",
451
+ className: o(
452
+ "absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-caption font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none",
453
+ "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
454
+ "peer-data-[size=sm]/menu-button:top-1",
455
+ "peer-data-[size=default]/menu-button:top-1.5",
456
+ "peer-data-[size=lg]/menu-button:top-2.5",
457
+ "group-data-[collapsible=icon]:hidden",
458
+ a
459
+ ),
460
+ ...e
461
+ }
462
+ )
463
+ );
464
+ ge.displayName = "SidebarMenuBadge";
465
+ const he = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
442
466
  const n = i.useMemo(() => `${Math.floor(Math.random() * 40) + 50}%`, []);
443
- return /* @__PURE__ */ S(
467
+ return /* @__PURE__ */ g(
444
468
  "div",
445
469
  {
446
470
  ref: d,
@@ -448,13 +472,7 @@ const ue = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
448
472
  className: o("rounded-md h-8 flex gap-2 px-2 items-center", a),
449
473
  ...t,
450
474
  children: [
451
- e && /* @__PURE__ */ r(
452
- M,
453
- {
454
- className: "size-4 rounded-md",
455
- "data-sidebar": "menu-skeleton-icon"
456
- }
457
- ),
475
+ e && /* @__PURE__ */ r(M, { className: "size-4 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
458
476
  /* @__PURE__ */ r(
459
477
  M,
460
478
  {
@@ -469,25 +487,29 @@ const ue = i.forwardRef(({ className: a, showIcon: e = !1, ...t }, d) => {
469
487
  }
470
488
  );
471
489
  });
472
- ue.displayName = "SidebarMenuSkeleton";
473
- const fe = i.forwardRef(({ className: a, ...e }, t) => /* @__PURE__ */ r(
474
- "ul",
475
- {
476
- ref: t,
477
- "data-sidebar": "menu-sub",
478
- className: o(
479
- "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5",
480
- "group-data-[collapsible=icon]:hidden",
481
- a
482
- ),
483
- ...e
484
- }
485
- ));
486
- fe.displayName = "SidebarMenuSub";
487
- const pe = i.forwardRef(({ ...a }, e) => /* @__PURE__ */ r("li", { ref: e, ...a }));
488
- pe.displayName = "SidebarMenuSubItem";
489
- const me = i.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: d, ...n }, s) => /* @__PURE__ */ r(
490
- a ? g : "a",
490
+ he.displayName = "SidebarMenuSkeleton";
491
+ const ve = i.forwardRef(
492
+ ({ className: a, ...e }, t) => /* @__PURE__ */ r(
493
+ "ul",
494
+ {
495
+ ref: t,
496
+ "data-sidebar": "menu-sub",
497
+ className: o(
498
+ "mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 px-2.5 py-0.5",
499
+ "group-data-[collapsible=icon]:hidden",
500
+ a
501
+ ),
502
+ ...e
503
+ }
504
+ )
505
+ );
506
+ ve.displayName = "SidebarMenuSub";
507
+ const xe = i.forwardRef(
508
+ ({ ...a }, e) => /* @__PURE__ */ r("li", { ref: e, ...a })
509
+ );
510
+ xe.displayName = "SidebarMenuSubItem";
511
+ const we = i.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, className: d, ...n }, s) => /* @__PURE__ */ r(
512
+ a ? h : "a",
491
513
  {
492
514
  ref: s,
493
515
  "data-sidebar": "menu-sub-button",
@@ -504,31 +526,31 @@ const me = i.forwardRef(({ asChild: a = !1, size: e = "md", isActive: t, classNa
504
526
  ...n
505
527
  }
506
528
  ));
507
- me.displayName = "SidebarMenuSubButton";
529
+ we.displayName = "SidebarMenuSubButton";
508
530
  export {
509
- U as Sidebar,
510
- ae as SidebarContent,
511
- Z as SidebarFooter,
512
- te as SidebarGroup,
513
- ie as SidebarGroupAction,
514
- oe as SidebarGroupContent,
515
- re as SidebarGroupLabel,
516
- Q as SidebarHeader,
517
- P as SidebarInput,
518
- J as SidebarInset,
519
- de as SidebarMenu,
520
- ce as SidebarMenuAction,
521
- be as SidebarMenuBadge,
522
- le as SidebarMenuButton,
523
- ne as SidebarMenuItem,
524
- ue as SidebarMenuSkeleton,
525
- fe as SidebarMenuSub,
526
- me as SidebarMenuSubButton,
527
- pe as SidebarMenuSubItem,
528
- F as SidebarProvider,
529
- Y as SidebarRail,
530
- ee as SidebarSeparator,
531
- X as SidebarTrigger,
531
+ Z as Sidebar,
532
+ de as SidebarContent,
533
+ ie as SidebarFooter,
534
+ ne as SidebarGroup,
535
+ le as SidebarGroupAction,
536
+ ce as SidebarGroupContent,
537
+ se as SidebarGroupLabel,
538
+ re as SidebarHeader,
539
+ te as SidebarInput,
540
+ ae as SidebarInset,
541
+ ue as SidebarMenu,
542
+ me as SidebarMenuAction,
543
+ ge as SidebarMenuBadge,
544
+ pe as SidebarMenuButton,
545
+ be as SidebarMenuItem,
546
+ he as SidebarMenuSkeleton,
547
+ ve as SidebarMenuSub,
548
+ we as SidebarMenuSubButton,
549
+ xe as SidebarMenuSubItem,
550
+ Q as SidebarProvider,
551
+ ee as SidebarRail,
552
+ oe as SidebarSeparator,
553
+ P as SidebarTrigger,
532
554
  y as useSidebar
533
555
  };
534
556
  //# sourceMappingURL=sidebar.es.js.map