tembro 4.0.1 → 4.1.0

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 (61) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/components/display/chat.cjs +1 -0
  3. package/dist/components/display/chat.d.ts +94 -0
  4. package/dist/components/display/chat.js +1 -0
  5. package/dist/components/display/index.d.ts +1 -0
  6. package/dist/components/display/kanban.d.ts +33 -1
  7. package/dist/components/layout/sidebar.d.ts +24 -2
  8. package/dist/components/modern/rich-text-editor.d.ts +13 -1
  9. package/dist/components/theme-provider.d.ts +19 -6
  10. package/dist/components/ui/badge/index.d.ts +8 -2
  11. package/dist/src/components/display/activity-feed.cjs +1 -1
  12. package/dist/src/components/display/activity-feed.js +4 -1
  13. package/dist/src/components/display/chat.cjs +1 -0
  14. package/dist/src/components/display/chat.js +372 -0
  15. package/dist/src/components/display/index.cjs +1 -1
  16. package/dist/src/components/display/index.js +17 -16
  17. package/dist/src/components/display/kanban.cjs +1 -1
  18. package/dist/src/components/display/kanban.js +321 -176
  19. package/dist/src/components/display/timeline.cjs +1 -1
  20. package/dist/src/components/display/timeline.js +5 -5
  21. package/dist/src/components/inputs/tag-input.cjs +1 -1
  22. package/dist/src/components/inputs/tag-input.js +6 -2
  23. package/dist/src/components/layout/index.cjs +1 -1
  24. package/dist/src/components/layout/index.js +4 -4
  25. package/dist/src/components/layout/public.cjs +1 -1
  26. package/dist/src/components/layout/public.js +4 -4
  27. package/dist/src/components/layout/sidebar.cjs +1 -1
  28. package/dist/src/components/layout/sidebar.js +326 -228
  29. package/dist/src/components/modern/rich-text-editor.cjs +1 -1
  30. package/dist/src/components/modern/rich-text-editor.js +216 -89
  31. package/dist/src/components/theme-provider.cjs +1 -1
  32. package/dist/src/components/theme-provider.js +58 -36
  33. package/dist/src/components/ui/badge/index.cjs +1 -1
  34. package/dist/src/components/ui/badge/index.js +59 -47
  35. package/dist/src/components/ui/input/clearable.cjs +1 -1
  36. package/dist/src/components/ui/input/clearable.js +5 -2
  37. package/dist/src/components/ui/input/primitive.cjs +1 -1
  38. package/dist/src/components/ui/input/primitive.js +1 -1
  39. package/dist/src/index.cjs +1 -1
  40. package/dist/src/index.js +87 -86
  41. package/dist/src/public-component-surface.cjs +1 -1
  42. package/dist/src/public-component-surface.js +5 -0
  43. package/package.json +1 -1
  44. package/packages/cli/dist/index.cjs +3 -3
  45. package/packages/cli/vendor/src/components/display/activity-feed.tsx +1 -1
  46. package/packages/cli/vendor/src/components/display/chat.tsx +237 -0
  47. package/packages/cli/vendor/src/components/display/index.ts +1 -0
  48. package/packages/cli/vendor/src/components/display/kanban.tsx +219 -72
  49. package/packages/cli/vendor/src/components/display/timeline.tsx +10 -10
  50. package/packages/cli/vendor/src/components/inputs/tag-input.tsx +3 -2
  51. package/packages/cli/vendor/src/components/layout/sidebar.tsx +212 -51
  52. package/packages/cli/vendor/src/components/modern/rich-text-editor.tsx +115 -32
  53. package/packages/cli/vendor/src/components/theme-provider.tsx +82 -36
  54. package/packages/cli/vendor/src/components/ui/badge/index.tsx +29 -8
  55. package/packages/cli/vendor/src/components/ui/input/clearable.tsx +2 -2
  56. package/packages/cli/vendor/src/components/ui/input/primitive.tsx +1 -1
  57. package/packages/cli/vendor/src/public-component-surface.ts +1 -0
  58. package/packages/cli/vendor/templates/showcase/src/showcase/layout/HeroSection.tsx +2 -2
  59. package/packages/cli/vendor/templates/showcase/src/showcase/layout/WorkbenchSidebar.tsx +1 -1
  60. package/packages/cli/vendor/templates/styles/globals.css +91 -10
  61. package/registry.json +3 -1
@@ -1,196 +1,212 @@
1
1
  "use client";
2
2
  import { cn as e } from "../../lib/utils.js";
3
- import { useIsMobile as t } from "../../hooks/use-is-mobile.js";
4
- import { ControllableDetails as n } from "./controllable-details.js";
5
- import { Tooltip as r } from "../ui/tooltip/index.js";
6
- import { useSidebar as i } from "./sidebar-context.js";
7
- import * as a from "react";
8
- import { ChevronRightIcon as o, MenuIcon as s, XIcon as c } from "lucide-react";
9
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
3
+ import { Input as t } from "../ui/input/index.js";
4
+ import { useIsMobile as n } from "../../hooks/use-is-mobile.js";
5
+ import { ControllableDetails as r } from "./controllable-details.js";
6
+ import { Tooltip as i } from "../ui/tooltip/index.js";
7
+ import { useSidebar as a } from "./sidebar-context.js";
8
+ import * as o from "react";
9
+ import { ChevronRightIcon as s, MenuIcon as c, SearchIcon as l, XIcon as u } from "lucide-react";
10
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
10
11
  //#region src/components/layout/sidebar.tsx
11
- var f = 1024, p = "18rem", m = "4.75rem", h = "min(88vw, 22rem)";
12
- function g({ active: t, disabled: n }) {
12
+ var m = 1024, h = "18rem", g = "4.75rem", _ = "min(88vw, 22rem)";
13
+ function v({ active: t, disabled: n }) {
13
14
  return e("border border-transparent bg-transparent text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_6%)] hover:border-[color:var(--aui-sidebar-item-active-border)] hover:bg-[color:var(--aui-sidebar-item-hover-bg)] hover:text-[color:var(--sidebar-foreground)] focus-visible:border-[color:var(--sidebar-ring)] focus-visible:bg-[color:var(--aui-sidebar-item-hover-bg)] focus-visible:text-[color:var(--sidebar-foreground)] focus-visible:shadow-[0_0_0_3px_color-mix(in_oklch,var(--sidebar-ring),transparent_82%)]", t && "border-[color:var(--aui-sidebar-item-active-border)] bg-[color:var(--aui-sidebar-item-active-bg)] text-[color:var(--aui-sidebar-item-active-fg)] shadow-[inset_0_1px_0_rgba(255,255,255,0.08),0_10px_24px_color-mix(in_oklch,var(--sidebar-primary),transparent_88%)]", n && "hover:border-transparent hover:bg-transparent hover:text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_6%)]");
14
15
  }
15
- function _({ collapsed: t, depth: n, itemSize: r, activeIndicator: i }) {
16
+ function y({ collapsed: t, depth: n, itemSize: r, activeIndicator: i }) {
16
17
  return e("relative w-full rounded-[min(var(--radius-xl),14px)] py-2", r === "sm" && "min-h-8 text-xs", r === "md" && "min-h-9 text-sm", r === "lg" && "min-h-11 text-sm", t ? "justify-center px-2" : "px-2.5", !t && n > 0 && "pl-3", i === "bar" && "data-[active=true]:pl-4 before:pointer-events-none before:absolute before:left-1.5 before:top-1/2 before:hidden before:h-5 before:w-1 before:-translate-y-1/2 before:rounded-full before:bg-[color:var(--sidebar-primary)] data-[active=true]:before:block", i === "pill" && "rounded-full", i === "none" && "data-[active=true]:shadow-none");
17
18
  }
18
- function v(e) {
19
+ function b(e) {
19
20
  return e.items?.some((e) => !e.hidden) ?? !1;
20
21
  }
21
- function y(e) {
22
- return e.active ? !0 : e.items?.some((e) => y(e)) ?? !1;
22
+ function x(e) {
23
+ return e.active ? !0 : e.items?.some((e) => x(e)) ?? !1;
23
24
  }
24
- function b(e, t) {
25
+ function S(e, t) {
25
26
  e.onSelect?.(), t?.(e);
26
27
  }
27
- function x({ item: t, collapsed: n, depth: i, itemSize: a, activeIndicator: o, onItemSelect: s, renderLink: c }) {
28
- let f = {
29
- "aria-current": t.current ?? (t.active ? "page" : void 0),
28
+ function C({ item: t, collapsed: n, depth: r, itemSize: a, activeIndicator: o, onItemSelect: s, renderLink: c }) {
29
+ let l = t.current ?? (t.active ? "page" : void 0), u = {
30
+ "aria-label": n && typeof t.label == "string" ? t.label : void 0,
31
+ "aria-current": l,
30
32
  "aria-disabled": t.disabled || void 0,
31
33
  "data-slot": "sidebar-item",
32
34
  "data-active": t.active || void 0,
33
35
  "data-disabled": t.disabled || void 0,
34
- "data-depth": String(i),
36
+ "data-depth": String(r),
35
37
  "data-size": a,
36
38
  "data-active-indicator": o,
37
- className: e("flex items-center gap-2 border border-transparent font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", g({
39
+ className: e("flex min-w-0 flex-1 items-center gap-2 border border-transparent text-left font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", v({
38
40
  active: t.active,
39
41
  disabled: t.disabled
40
- }), _({
42
+ }), y({
41
43
  collapsed: n,
42
- depth: i,
44
+ depth: r,
43
45
  itemSize: a,
44
46
  activeIndicator: o
45
47
  }))
46
- }, p = /* @__PURE__ */ d(l, { children: [
47
- t.icon && /* @__PURE__ */ u("span", {
48
+ }, m = /* @__PURE__ */ p(d, { children: [
49
+ t.icon && /* @__PURE__ */ f("span", {
48
50
  className: "shrink-0",
49
51
  children: t.icon
50
52
  }),
51
- !n && /* @__PURE__ */ u("span", {
53
+ !n && /* @__PURE__ */ f("span", {
52
54
  className: "min-w-0 flex-1 truncate",
53
55
  children: t.label
54
56
  }),
55
- !n && t.badge && /* @__PURE__ */ u("span", {
57
+ !n && t.badge && /* @__PURE__ */ f("span", {
56
58
  className: "shrink-0",
57
59
  children: t.badge
58
60
  })
59
- ] }), m = (e) => n ? /* @__PURE__ */ u(r, {
61
+ ] }), h = (e) => n ? /* @__PURE__ */ f(i, {
60
62
  content: t.tooltip ?? t.label,
61
63
  side: "right",
62
- children: /* @__PURE__ */ u("span", {
64
+ children: /* @__PURE__ */ f("span", {
63
65
  className: "block",
64
66
  children: e
65
67
  })
66
- }) : e;
67
- return t.href?.startsWith("/") ? m(c ? /* @__PURE__ */ u(l, { children: c({
68
+ }) : e, g = (e) => n || !t.action ? e : /* @__PURE__ */ p("div", {
69
+ "data-slot": "sidebar-item-row",
70
+ className: "group/sidebar-item-row flex min-w-0 items-center gap-1",
71
+ children: [e, /* @__PURE__ */ f("button", {
72
+ type: "button",
73
+ "data-slot": "sidebar-item-action",
74
+ "aria-label": t.actionLabel ?? `Actions for ${String(t.label)}`,
75
+ className: "grid size-8 shrink-0 place-items-center rounded-md p-0 leading-none text-muted-foreground opacity-0 outline-none transition hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-sidebar-ring group-hover/sidebar-item-row:opacity-100",
76
+ onClick: (e) => {
77
+ e.preventDefault(), e.stopPropagation(), t.onAction?.();
78
+ },
79
+ children: t.action
80
+ })]
81
+ });
82
+ return t.href?.startsWith("/") ? h(g(c ? /* @__PURE__ */ f(d, { children: c({
68
83
  item: t,
69
84
  href: t.href,
70
- ...f,
85
+ ...u,
71
86
  onClick: (e) => {
72
87
  if (t.disabled) {
73
88
  e.preventDefault();
74
89
  return;
75
90
  }
76
- b(t, s);
91
+ S(t, s);
77
92
  },
78
- children: p
79
- }) }) : /* @__PURE__ */ u("a", {
93
+ children: m
94
+ }) }) : /* @__PURE__ */ f("a", {
80
95
  href: t.href,
81
- ...f,
96
+ ...u,
82
97
  onClick: (e) => {
83
98
  if (t.disabled) {
84
99
  e.preventDefault();
85
100
  return;
86
101
  }
87
- b(t, s);
102
+ S(t, s);
88
103
  },
89
- children: p
90
- })) : t.href ? m(/* @__PURE__ */ u("button", {
104
+ children: m
105
+ }))) : t.href ? h(g(/* @__PURE__ */ f("button", {
91
106
  type: "button",
92
- ...f,
93
- className: e(f.className, "w-full"),
107
+ ...u,
108
+ className: e(u.className, "w-full"),
94
109
  onClick: () => {
95
110
  if (t.disabled) return;
96
111
  let e = t.href;
97
112
  if (e) {
98
- if (b(t, s), e.startsWith("http")) {
113
+ if (S(t, s), e.startsWith("http")) {
99
114
  window.open(e, "_blank", "noopener,noreferrer");
100
115
  return;
101
116
  }
102
117
  window.location.assign(e);
103
118
  }
104
119
  },
105
- children: p
106
- })) : m(/* @__PURE__ */ u("button", {
120
+ children: m
121
+ }))) : h(g(/* @__PURE__ */ f("button", {
107
122
  type: "button",
108
123
  disabled: t.disabled,
109
- ...f,
124
+ ...u,
110
125
  onClick: () => {
111
- t.disabled || b(t, s);
126
+ t.disabled || S(t, s);
112
127
  },
113
- children: p
114
- }));
128
+ children: m
129
+ })));
115
130
  }
116
- function S({ items: t, collapsed: i, depth: s, showSectionLabels: c, itemSize: l, activeIndicator: f, onItemSelect: p, renderLink: m }) {
131
+ function w({ items: t, collapsed: n, depth: a, showSectionLabels: c, itemSize: l, activeIndicator: u, onItemSelect: d, renderLink: m }) {
117
132
  return t.map((t) => {
118
133
  if (t.hidden) return null;
119
- let h = v(t), b = y(t), C = c && !i && s === 0 && t.sectionLabel;
120
- if (!h) return /* @__PURE__ */ d(a.Fragment, { children: [C ? /* @__PURE__ */ u("div", {
134
+ let h = b(t), g = x(t), _ = c && !n && a === 0 && t.sectionLabel;
135
+ if (!h) return /* @__PURE__ */ p(o.Fragment, { children: [_ ? /* @__PURE__ */ f("div", {
121
136
  "data-slot": "sidebar-group-label",
122
137
  className: "px-2.5 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] first:pt-0",
123
138
  children: t.sectionLabel
124
- }) : null, /* @__PURE__ */ u(x, {
139
+ }) : null, /* @__PURE__ */ f(C, {
125
140
  item: t,
126
- collapsed: i,
127
- depth: s,
141
+ collapsed: n,
142
+ depth: a,
128
143
  itemSize: l,
129
- activeIndicator: f,
130
- onItemSelect: p,
144
+ activeIndicator: u,
145
+ onItemSelect: d,
131
146
  renderLink: m
132
147
  })] }, t.key);
133
- let w = t.defaultExpanded ?? b;
134
- return /* @__PURE__ */ d("div", {
148
+ let S = t.defaultExpanded ?? g;
149
+ return /* @__PURE__ */ p("div", {
135
150
  "data-slot": "sidebar-group",
136
- "data-depth": s,
137
- children: [C && /* @__PURE__ */ u("div", {
151
+ "data-depth": a,
152
+ children: [_ && /* @__PURE__ */ f("div", {
138
153
  "data-slot": "sidebar-group-label",
139
154
  className: "px-2.5 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] first:pt-0",
140
155
  children: t.sectionLabel
141
- }), /* @__PURE__ */ d(n, {
156
+ }), /* @__PURE__ */ p(r, {
142
157
  "data-slot": "sidebar-group-details",
143
158
  open: t.expanded,
144
- defaultOpen: w,
159
+ defaultOpen: S,
145
160
  className: "group/sidebar-details",
146
161
  onOpenChange: t.onExpandedChange,
147
- children: [/* @__PURE__ */ d("summary", {
162
+ children: [/* @__PURE__ */ p("summary", {
163
+ "aria-label": n && typeof t.label == "string" ? t.label : void 0,
148
164
  "data-slot": "sidebar-group-trigger",
149
165
  "data-size": l,
150
- "data-active": b || void 0,
151
- "data-active-indicator": f,
152
- className: e("flex list-none items-center gap-2 border border-transparent font-medium outline-none transition-[background-color,border-color,color,box-shadow]", g({ active: b }), _({
153
- collapsed: i,
154
- depth: s,
166
+ "data-active": g || void 0,
167
+ "data-active-indicator": u,
168
+ className: e("flex list-none items-center gap-2 border border-transparent text-left font-medium outline-none transition-[background-color,border-color,color,box-shadow]", v({ active: g }), y({
169
+ collapsed: n,
170
+ depth: a,
155
171
  itemSize: l,
156
- activeIndicator: f
172
+ activeIndicator: u
157
173
  })),
158
174
  children: [
159
- t.icon ? i ? /* @__PURE__ */ u(r, {
175
+ t.icon ? n ? /* @__PURE__ */ f(i, {
160
176
  content: t.tooltip ?? t.label,
161
177
  side: "right",
162
- children: /* @__PURE__ */ u("span", {
178
+ children: /* @__PURE__ */ f("span", {
163
179
  className: "shrink-0",
164
180
  children: t.icon
165
181
  })
166
- }) : /* @__PURE__ */ u("span", {
182
+ }) : /* @__PURE__ */ f("span", {
167
183
  className: "shrink-0",
168
184
  children: t.icon
169
185
  }) : null,
170
- !i && /* @__PURE__ */ u("span", {
186
+ !n && /* @__PURE__ */ f("span", {
171
187
  className: "min-w-0 flex-1 truncate",
172
188
  children: t.label
173
189
  }),
174
- !i && t.badge && /* @__PURE__ */ u("span", {
190
+ !n && t.badge && /* @__PURE__ */ f("span", {
175
191
  className: "shrink-0",
176
192
  children: t.badge
177
193
  }),
178
- !i && /* @__PURE__ */ u(o, {
194
+ !n && /* @__PURE__ */ f(s, {
179
195
  "data-slot": "sidebar-group-chevron",
180
196
  className: "ml-auto size-3.5 shrink-0 text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_42%)] transition-transform group-open/sidebar-details:rotate-90"
181
197
  })
182
198
  ]
183
- }), /* @__PURE__ */ u("div", {
199
+ }), /* @__PURE__ */ f("div", {
184
200
  "data-slot": "sidebar-group-content",
185
- className: e("mt-1 flex flex-col gap-1", !i && "pl-3"),
186
- children: /* @__PURE__ */ u(S, {
201
+ className: e("mt-1 flex flex-col gap-1", !n && "pl-3"),
202
+ children: /* @__PURE__ */ f(w, {
187
203
  items: t.items ?? [],
188
- collapsed: i,
189
- depth: s + 1,
204
+ collapsed: n,
205
+ depth: a + 1,
190
206
  showSectionLabels: c,
191
207
  itemSize: l,
192
- activeIndicator: f,
193
- onItemSelect: p,
208
+ activeIndicator: u,
209
+ onItemSelect: d,
194
210
  renderLink: m
195
211
  })
196
212
  })]
@@ -198,51 +214,66 @@ function S({ items: t, collapsed: i, depth: s, showSectionLabels: c, itemSize: l
198
214
  }, t.key);
199
215
  });
200
216
  }
201
- function C({ item: t, collapsed: n, onItemSelect: i }) {
202
- let a = /* @__PURE__ */ d("button", {
217
+ function T(e, t) {
218
+ let n = t.trim().toLocaleLowerCase();
219
+ return n ? e.flatMap((e) => {
220
+ let t = e.items ? T(e.items, n) : [];
221
+ return ![
222
+ typeof e.label == "string" ? e.label : "",
223
+ e.sectionLabel,
224
+ ...e.keywords ?? []
225
+ ].filter((e) => typeof e == "string").join(" ").toLocaleLowerCase().includes(n) && t.length === 0 ? [] : [{
226
+ ...e,
227
+ items: t.length ? t : e.items,
228
+ defaultExpanded: t.length ? !0 : e.defaultExpanded
229
+ }];
230
+ }) : e;
231
+ }
232
+ function E({ item: t, collapsed: n, onItemSelect: r }) {
233
+ let a = /* @__PURE__ */ p("button", {
203
234
  type: "button",
204
235
  "data-slot": "sidebar-action",
205
236
  "data-active": t.active || void 0,
206
237
  "data-disabled": t.disabled || void 0,
207
- className: e("flex min-h-9 items-center gap-2 rounded-lg border border-transparent px-2.5 text-sm font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", g({
238
+ className: e("flex min-h-9 items-center gap-2 rounded-lg border border-transparent px-2.5 text-sm font-medium outline-none transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50", v({
208
239
  active: t.active,
209
240
  disabled: t.disabled
210
241
  }), n && "justify-center px-2"),
211
242
  disabled: t.disabled,
212
243
  onClick: () => {
213
- t.disabled || b(t, i);
244
+ t.disabled || S(t, r);
214
245
  },
215
246
  children: [
216
- t.icon ? /* @__PURE__ */ u("span", {
247
+ t.icon ? /* @__PURE__ */ f("span", {
217
248
  className: "shrink-0",
218
249
  children: t.icon
219
250
  }) : null,
220
- n ? null : /* @__PURE__ */ u("span", {
251
+ n ? null : /* @__PURE__ */ f("span", {
221
252
  className: "min-w-0 flex-1 truncate",
222
253
  children: t.label
223
254
  }),
224
- !n && t.badge ? /* @__PURE__ */ u("span", {
255
+ !n && t.badge ? /* @__PURE__ */ f("span", {
225
256
  className: "shrink-0",
226
257
  children: t.badge
227
258
  }) : null
228
259
  ]
229
260
  });
230
- return n ? /* @__PURE__ */ u(r, {
261
+ return n ? /* @__PURE__ */ f(i, {
231
262
  content: t.tooltip ?? t.label,
232
263
  side: "right",
233
- children: /* @__PURE__ */ u("span", {
264
+ children: /* @__PURE__ */ f("span", {
234
265
  className: "block",
235
266
  children: a
236
267
  })
237
268
  }) : a;
238
269
  }
239
- function w({ account: t, collapsed: n, onAfterSelect: i }) {
240
- let a = /* @__PURE__ */ d("button", {
270
+ function D({ account: t, collapsed: n, onAfterSelect: r }) {
271
+ let a = /* @__PURE__ */ p("button", {
241
272
  type: "button",
242
273
  "data-slot": "sidebar-account",
243
- className: e("flex w-full items-center gap-3 rounded-[min(var(--radius-xl),16px)] border border-transparent text-left transition-[background-color,border-color,color,box-shadow]", g({}), n ? "justify-center px-2 py-2.5" : "px-3 py-2.5"),
274
+ className: e("flex w-full items-center gap-3 rounded-[min(var(--radius-xl),16px)] border border-transparent text-left transition-[background-color,border-color,color,box-shadow]", v({}), n ? "justify-center px-2 py-2.5" : "px-3 py-2.5"),
244
275
  onClick: () => {
245
- if (t.onSelect?.(), i?.(), t.href) {
276
+ if (t.onSelect?.(), r?.(), t.href) {
246
277
  if (t.href.startsWith("http")) {
247
278
  window.open(t.href, "_blank", "noopener,noreferrer");
248
279
  return;
@@ -250,183 +281,238 @@ function w({ account: t, collapsed: n, onAfterSelect: i }) {
250
281
  window.location.assign(t.href);
251
282
  }
252
283
  },
253
- children: [t.avatar ? /* @__PURE__ */ u("span", {
284
+ children: [t.avatar ? /* @__PURE__ */ f("span", {
254
285
  "data-slot": "sidebar-account-avatar",
255
286
  className: "inline-flex size-9 shrink-0 items-center justify-center overflow-hidden rounded-full border border-border/65 bg-muted/45 text-sm font-semibold",
256
287
  children: t.avatar
257
- }) : null, n ? null : /* @__PURE__ */ d("span", {
288
+ }) : null, n ? null : /* @__PURE__ */ p("span", {
258
289
  className: "min-w-0 flex-1",
259
- children: [/* @__PURE__ */ u("span", {
290
+ children: [/* @__PURE__ */ f("span", {
260
291
  "data-slot": "sidebar-account-label",
261
292
  className: "block truncate text-sm font-semibold text-[color:var(--sidebar-foreground)]",
262
293
  children: t.label
263
- }), t.description ? /* @__PURE__ */ u("span", {
294
+ }), t.description ? /* @__PURE__ */ f("span", {
264
295
  "data-slot": "sidebar-account-description",
265
296
  className: "block truncate text-xs text-[color:color-mix(in_oklch,var(--sidebar-foreground),transparent_36%)]",
266
297
  children: t.description
267
298
  }) : null]
268
299
  })]
269
300
  });
270
- return n ? /* @__PURE__ */ u(r, {
301
+ return n ? /* @__PURE__ */ f(i, {
271
302
  content: t.tooltip ?? t.label,
272
303
  side: "right",
273
- children: /* @__PURE__ */ u("span", {
304
+ children: /* @__PURE__ */ f("span", {
274
305
  className: "block",
275
306
  children: a
276
307
  })
277
308
  }) : a;
278
309
  }
279
- function T({ className: t, style: n, header: i, footer: o, items: s = [], collapsed: f = !1, width: h = p, collapsedWidth: g = m, collapsedRail: _, railItems: v = [], footerAccount: y, secondaryActions: b = [], footerSecondary: x, footerClassName: T, tooltipOnCollapsed: E, showSectionLabels: D = !0, itemSize: O = "md", activeIndicator: k = "bar", navigationLabel: A = "Primary navigation", onItemSelect: j, renderItem: M, renderLink: N, children: P, mobile: F, mobileTitle: I, mobileDescription: L, mobileCloseLabel: R = "Close navigation", onRequestClose: z, closeOnSelect: B = !0, ...V }) {
280
- let H = s.filter((e) => !e.hidden), U = v.filter((e) => !e.hidden), W = b.filter((e) => !e.hidden), G = a.useCallback((e) => {
281
- j?.(e), F && B && z?.();
310
+ function O({ className: n, style: r, header: a, footer: s, items: c = [], collapsed: m = !1, width: _ = h, collapsedWidth: v = g, collapsedRail: y, railItems: b = [], footerAccount: x, secondaryActions: S = [], footerSecondary: C, footerClassName: O, tooltipOnCollapsed: ee, showSectionLabels: te = !0, itemSize: ne = "md", activeIndicator: re = "bar", navigationLabel: ie = "Primary navigation", search: k, hideScrollbar: ae = !0, variant: A = "sidebar", side: j = "left", collapsible: M = "icon", onItemSelect: N, renderItem: P, renderLink: oe, children: F, mobile: I, mobileTitle: L, mobileDescription: R, mobileCloseLabel: se = "Close navigation", onRequestClose: z, closeOnSelect: B = !0, ...ce }) {
311
+ let V = k && !o.isValidElement(k) && typeof k == "object" ? k : void 0, [le, ue] = o.useState(V?.defaultValue ?? ""), H = V?.value ?? le, U = T(c.filter((e) => !e.hidden), H), W = b.filter((e) => !e.hidden), G = S.filter((e) => !e.hidden), K = o.useCallback((e) => {
312
+ N?.(e), I && B && z?.();
282
313
  }, [
283
314
  B,
284
- F,
285
- j,
315
+ I,
316
+ N,
286
317
  z
287
- ]), K = F && (I || L || z);
288
- return /* @__PURE__ */ d("aside", {
318
+ ]), q = I && (L || R || z);
319
+ return /* @__PURE__ */ p("aside", {
289
320
  "data-slot": "sidebar",
290
- "data-collapsed": f || void 0,
291
- "data-mobile": F || void 0,
292
- className: e("group/sidebar flex h-full min-h-0 flex-col overflow-hidden", t),
321
+ "data-collapsed": m || void 0,
322
+ "data-mobile": I || void 0,
323
+ "data-variant": A,
324
+ "data-side": j,
325
+ "data-collapsible": M,
326
+ className: e("peer group/sidebar flex h-full min-h-0 flex-col overflow-hidden bg-sidebar text-sidebar-foreground transition-[width,min-width,transform,border-radius,box-shadow] duration-200", j === "right" && "border-l border-r-0", !I && A === "floating" && "m-2 h-[calc(100%-1rem)] rounded-xl border shadow-lg", !I && A === "inset" && "m-2 h-[calc(100%-1rem)] rounded-lg border bg-sidebar/92 shadow-sm", I && "m-0 h-full rounded-none border-y-0", M === "offcanvas" && m && (j === "left" ? "-translate-x-full" : "translate-x-full"), n),
293
327
  style: {
294
- width: f ? g : h,
295
- minWidth: f ? g : h,
296
- ...n
328
+ width: m ? M === "icon" ? v : M === "offcanvas" ? 0 : _ : _,
329
+ minWidth: m ? M === "icon" ? v : M === "offcanvas" ? 0 : _ : _,
330
+ ...r
297
331
  },
298
- ...V,
332
+ ...ce,
299
333
  children: [
300
- (i || K) && /* @__PURE__ */ u("div", {
334
+ (a || q) && /* @__PURE__ */ f("div", {
301
335
  "data-slot": "sidebar-header",
302
336
  className: "shrink-0 border-b p-3",
303
- children: /* @__PURE__ */ d("div", {
337
+ children: /* @__PURE__ */ p("div", {
304
338
  className: "flex items-start gap-3",
305
- children: [/* @__PURE__ */ d("div", {
339
+ children: [/* @__PURE__ */ p("div", {
306
340
  className: "min-w-0 flex-1",
307
- children: [i ?? null, K ? /* @__PURE__ */ d("div", {
308
- className: e(i && "mt-3"),
309
- children: [I ? /* @__PURE__ */ u("p", {
341
+ children: [a ?? null, q ? /* @__PURE__ */ p("div", {
342
+ className: e(a && "mt-3"),
343
+ children: [L ? /* @__PURE__ */ f("p", {
310
344
  className: "text-sm font-semibold text-foreground",
311
- children: I
312
- }) : null, L ? /* @__PURE__ */ u("p", {
313
- className: "mt-1 text-xs leading-5 text-muted-foreground",
314
345
  children: L
346
+ }) : null, R ? /* @__PURE__ */ f("p", {
347
+ className: "mt-1 text-xs leading-5 text-muted-foreground",
348
+ children: R
315
349
  }) : null]
316
350
  }) : null]
317
- }), F && z ? /* @__PURE__ */ u("button", {
351
+ }), I && z ? /* @__PURE__ */ f("button", {
318
352
  type: "button",
319
- "aria-label": R,
353
+ "aria-label": se,
320
354
  "data-slot": "sidebar-mobile-close",
321
355
  className: "inline-flex size-9 shrink-0 items-center justify-center rounded-xl border border-[color:var(--aui-divider,var(--border))] bg-[color:var(--aui-page-bg-alt,var(--muted))] text-[color:var(--aui-page-foreground,var(--foreground))] transition hover:bg-[color:var(--aui-control-bg,var(--muted))]",
322
356
  onClick: z,
323
- children: /* @__PURE__ */ u(c, { className: "size-4" })
357
+ children: /* @__PURE__ */ f(u, { className: "size-4" })
324
358
  }) : null]
325
359
  })
326
360
  }),
327
- /* @__PURE__ */ d("nav", {
361
+ k && !m ? /* @__PURE__ */ f("div", {
362
+ "data-slot": "sidebar-search",
363
+ className: "shrink-0 px-2 pt-2",
364
+ children: o.isValidElement(k) ? k : /* @__PURE__ */ f(t, {
365
+ kind: "search",
366
+ value: H,
367
+ onValueChange: (e) => {
368
+ V?.value === void 0 && ue(e), V?.onValueChange?.(e);
369
+ },
370
+ placeholder: V?.placeholder ?? "Search navigation...",
371
+ searchIcon: /* @__PURE__ */ f(l, {}),
372
+ "aria-label": V?.label ?? "Search navigation",
373
+ className: "h-9 bg-sidebar-accent/45"
374
+ })
375
+ }) : null,
376
+ /* @__PURE__ */ p("nav", {
328
377
  "data-slot": "sidebar-nav",
329
- "aria-label": A,
330
- className: "flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto overscroll-contain p-2",
331
- children: [P ?? H.map((e) => {
332
- if (!M) return null;
333
- let t = M(e, { collapsed: f });
334
- return !f || !E ? /* @__PURE__ */ u(a.Fragment, { children: t }, e.key) : /* @__PURE__ */ u(r, {
335
- content: e.tooltip ?? e.label,
336
- side: "right",
337
- children: /* @__PURE__ */ u("span", {
338
- className: "block",
339
- children: t
340
- })
341
- }, e.key);
342
- }), !P && !M && /* @__PURE__ */ u(S, {
343
- items: H,
344
- collapsed: f,
345
- depth: 0,
346
- showSectionLabels: D,
347
- itemSize: O,
348
- activeIndicator: k,
349
- onItemSelect: G,
350
- renderLink: N
351
- })]
378
+ "aria-label": ie,
379
+ className: e("flex min-h-0 flex-1 flex-col gap-1 overflow-y-auto overscroll-contain p-2 [scrollbar-gutter:stable]", ae && "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"),
380
+ children: [
381
+ F ?? U.map((e) => {
382
+ if (!P) return null;
383
+ let t = P(e, { collapsed: m });
384
+ return !m || !ee ? /* @__PURE__ */ f(o.Fragment, { children: t }, e.key) : /* @__PURE__ */ f(i, {
385
+ content: e.tooltip ?? e.label,
386
+ side: "right",
387
+ children: /* @__PURE__ */ f("span", {
388
+ className: "block",
389
+ children: t
390
+ })
391
+ }, e.key);
392
+ }),
393
+ !F && !P && /* @__PURE__ */ f(w, {
394
+ items: U,
395
+ collapsed: m,
396
+ depth: 0,
397
+ showSectionLabels: te,
398
+ itemSize: ne,
399
+ activeIndicator: re,
400
+ onItemSelect: K,
401
+ renderLink: oe
402
+ }),
403
+ !F && U.length === 0 ? /* @__PURE__ */ f("div", {
404
+ "data-slot": "sidebar-search-empty",
405
+ className: "grid min-h-24 place-items-center px-4 text-center text-xs text-muted-foreground",
406
+ children: V?.empty ?? "No navigation items found."
407
+ }) : null
408
+ ]
352
409
  }),
353
- (y || x || o || W.length > 0 || f && (_ || U.length > 0)) && /* @__PURE__ */ d("div", {
410
+ (x || C || s || G.length > 0 || m && (y || W.length > 0)) && /* @__PURE__ */ p("div", {
354
411
  "data-slot": "sidebar-footer",
355
- className: e("shrink-0 border-t p-3", T),
412
+ className: e("shrink-0 border-t p-3", O),
356
413
  children: [
357
- f ? /* @__PURE__ */ d(l, { children: [U.length > 0 ? /* @__PURE__ */ u("div", {
414
+ m ? /* @__PURE__ */ p(d, { children: [W.length > 0 ? /* @__PURE__ */ f("div", {
358
415
  "data-slot": "sidebar-rail-actions",
359
416
  className: "grid gap-2",
360
- children: U.map((e) => /* @__PURE__ */ u(C, {
417
+ children: W.map((e) => /* @__PURE__ */ f(E, {
361
418
  item: e,
362
419
  collapsed: !0,
363
- onItemSelect: G
420
+ onItemSelect: K
364
421
  }, e.key))
365
- }) : null, _ ? /* @__PURE__ */ u("div", {
422
+ }) : null, y ? /* @__PURE__ */ f("div", {
366
423
  "data-slot": "sidebar-rail",
367
- children: _
424
+ children: y
368
425
  }) : null] }) : null,
369
- !f && y ? /* @__PURE__ */ u("div", {
426
+ !m && x ? /* @__PURE__ */ f("div", {
370
427
  "data-slot": "sidebar-account-wrap",
371
428
  className: "mb-3",
372
- children: /* @__PURE__ */ u(w, {
373
- account: y,
429
+ children: /* @__PURE__ */ f(D, {
430
+ account: x,
374
431
  collapsed: !1,
375
432
  onAfterSelect: () => {
376
- F && B && z?.();
433
+ I && B && z?.();
377
434
  }
378
435
  })
379
436
  }) : null,
380
- !f && W.length > 0 ? /* @__PURE__ */ u("div", {
437
+ !m && G.length > 0 ? /* @__PURE__ */ f("div", {
381
438
  "data-slot": "sidebar-secondary-actions",
382
439
  className: "mb-3 grid gap-2",
383
- children: W.map((e) => /* @__PURE__ */ u(C, {
440
+ children: G.map((e) => /* @__PURE__ */ f(E, {
384
441
  item: e,
385
442
  collapsed: !1,
386
- onItemSelect: G
443
+ onItemSelect: K
387
444
  }, e.key))
388
445
  }) : null,
389
- !f && x ? /* @__PURE__ */ u("div", {
446
+ !m && C ? /* @__PURE__ */ f("div", {
390
447
  "data-slot": "sidebar-footer-secondary",
391
448
  className: "mb-3",
392
- children: x
449
+ children: C
393
450
  }) : null,
394
- f && y ? /* @__PURE__ */ u("div", {
451
+ m && x ? /* @__PURE__ */ f("div", {
395
452
  "data-slot": "sidebar-account-wrap",
396
- children: /* @__PURE__ */ u(w, {
397
- account: y,
453
+ children: /* @__PURE__ */ f(D, {
454
+ account: x,
398
455
  collapsed: !0,
399
456
  onAfterSelect: () => {
400
- F && B && z?.();
457
+ I && B && z?.();
401
458
  }
402
459
  })
403
460
  }) : null,
404
- !f && o
461
+ !m && s
405
462
  ]
406
463
  })
407
464
  ]
408
465
  });
409
466
  }
410
- function E({ className: n, header: r, footer: o, items: c = [], collapsed: g, width: _ = p, collapsedWidth: v = m, mobileWidth: y = h, collapsedRail: b, railItems: x = [], footerAccount: S, secondaryActions: C = [], footerSecondary: w, tooltipOnCollapsed: E = !0, showSectionLabels: D = !0, itemSize: O = "md", activeIndicator: k = "bar", navigationLabel: A = "Primary navigation", responsive: j = !0, mobileBreakpoint: M = f, mobileOpen: N, defaultMobileOpen: P = !1, onMobileOpenChange: F, mobileTitle: I, mobileDescription: L, mobileToggleLabel: R = "Open navigation", mobileCloseLabel: z = "Close navigation", mobileToggleIcon: B, showMobileToggle: V = !0, closeOnSelect: H = !0, mobileToggleClassName: U, mobilePanelClassName: W, mobileOverlayClassName: G, renderMobileToggle: K, onItemSelect: q, renderItem: J, renderLink: ee, children: te, ...ne }) {
411
- let Y = i(!0), re = g ?? Y?.collapsed ?? !1, ie = t(M), X = j && ie, [ae, oe] = a.useState(P), Z = N ?? Y?.mobileOpen ?? ae, Q = a.useCallback((e) => {
412
- N == null && Y ? Y.setMobileOpen(e) : N ?? oe(e), F?.(e);
467
+ function ee({ className: t, header: r, footer: i, items: s = [], collapsed: l, defaultCollapsed: u = !1, onCollapsedChange: v, variant: y = "sidebar", side: b = "left", collapsible: x = "icon", width: S = h, collapsedWidth: C = g, mobileWidth: w = _, collapsedRail: T, railItems: E = [], footerAccount: D, secondaryActions: ee = [], footerSecondary: te, tooltipOnCollapsed: ne = !0, showSectionLabels: re = !0, itemSize: ie = "md", activeIndicator: k = "bar", navigationLabel: ae = "Primary navigation", search: A, hideScrollbar: j = !0, keyboardShortcut: M = "b", persistKey: N, responsive: P = !0, mobileBreakpoint: oe = m, mobileOpen: F, defaultMobileOpen: I = !1, onMobileOpenChange: L, mobileTitle: R, mobileDescription: se, mobileToggleLabel: z = "Open navigation", mobileCloseLabel: B = "Close navigation", mobileToggleIcon: ce, showMobileToggle: V = !0, closeOnSelect: le = !0, mobileToggleClassName: ue, mobilePanelClassName: H, mobileOverlayClassName: U, renderMobileToggle: W, onItemSelect: G, renderItem: K, renderLink: q, children: de, ...fe }) {
468
+ let J = a(!0), [pe, me] = o.useState(u), Y = x === "none" ? !1 : l ?? J?.collapsed ?? pe, he = n(oe), X = P && he, [ge, _e] = o.useState(I), Z = F ?? J?.mobileOpen ?? ge, Q = o.useCallback((e) => {
469
+ x !== "none" && (l === void 0 && J ? J.setCollapsed(e) : l === void 0 && me(e), v?.(e), N && window.localStorage.setItem(N, String(e)));
470
+ }, [
471
+ l,
472
+ x,
473
+ v,
474
+ N,
475
+ J
476
+ ]);
477
+ o.useEffect(() => {
478
+ if (!N || l !== void 0) return;
479
+ let e = window.localStorage.getItem(N);
480
+ (e === "true" || e === "false") && Q(e === "true");
413
481
  }, [
482
+ l,
414
483
  N,
484
+ Q
485
+ ]), o.useEffect(() => {
486
+ if (!M || x === "none") return;
487
+ let e = (e) => {
488
+ (e.metaKey || e.ctrlKey) && e.key.toLocaleLowerCase() === M.toLocaleLowerCase() && (e.preventDefault(), Q(!Y));
489
+ };
490
+ return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
491
+ }, [
492
+ Y,
493
+ x,
494
+ M,
495
+ Q
496
+ ]);
497
+ let $ = o.useCallback((e) => {
498
+ F == null && J ? J.setMobileOpen(e) : F ?? _e(e), L?.(e);
499
+ }, [
415
500
  F,
416
- Y
501
+ L,
502
+ J
417
503
  ]);
418
- a.useEffect(() => {
419
- !X && Z && Q(!1);
504
+ o.useEffect(() => {
505
+ !X && Z && $(!1);
420
506
  }, [
421
507
  X,
422
508
  Z,
423
- Q
424
- ]), a.useEffect(() => {
509
+ $
510
+ ]), o.useEffect(() => {
425
511
  if (!X || !Z) return;
426
512
  let e = document.body.style.overflow;
427
513
  document.body.style.overflow = "hidden";
428
514
  let t = (e) => {
429
- e.key === "Escape" && Q(!1);
515
+ e.key === "Escape" && $(!1);
430
516
  };
431
517
  return window.addEventListener("keydown", t), () => {
432
518
  document.body.style.overflow = e, window.removeEventListener("keydown", t);
@@ -434,83 +520,95 @@ function E({ className: n, header: r, footer: o, items: c = [], collapsed: g, wi
434
520
  }, [
435
521
  X,
436
522
  Z,
437
- Q
523
+ $
438
524
  ]);
439
- let $ = {
440
- className: n,
525
+ let ve = {
526
+ className: t,
441
527
  header: r,
442
- footer: o,
443
- items: c,
444
- collapsed: re,
445
- width: _,
446
- collapsedWidth: v,
447
- collapsedRail: b,
448
- railItems: x,
449
- footerAccount: S,
450
- secondaryActions: C,
451
- footerSecondary: w,
452
- tooltipOnCollapsed: E,
453
- showSectionLabels: D,
454
- itemSize: O,
528
+ footer: i,
529
+ items: s,
530
+ collapsed: Y,
531
+ width: S,
532
+ collapsedWidth: C,
533
+ collapsedRail: T,
534
+ railItems: E,
535
+ footerAccount: D,
536
+ secondaryActions: ee,
537
+ footerSecondary: te,
538
+ tooltipOnCollapsed: ne,
539
+ showSectionLabels: re,
540
+ itemSize: ie,
455
541
  activeIndicator: k,
456
- navigationLabel: A,
457
- mobileCloseLabel: z,
458
- closeOnSelect: H,
459
- onItemSelect: q,
460
- renderItem: J,
461
- renderLink: ee,
462
- children: te,
463
- ...ne
542
+ navigationLabel: ae,
543
+ search: A,
544
+ hideScrollbar: j,
545
+ variant: y,
546
+ side: b,
547
+ collapsible: x,
548
+ mobileCloseLabel: B,
549
+ closeOnSelect: le,
550
+ onItemSelect: G,
551
+ renderItem: K,
552
+ renderLink: q,
553
+ children: de,
554
+ ...fe
464
555
  };
465
- if (!j || !X) return /* @__PURE__ */ u(T, { ...$ });
466
- let se = /* @__PURE__ */ d("button", {
556
+ if (!P || !X) return /* @__PURE__ */ f(O, { ...ve });
557
+ let ye = /* @__PURE__ */ p("button", {
467
558
  type: "button",
468
- "aria-label": Z ? z : R,
559
+ "aria-label": Z ? B : z,
469
560
  "data-slot": "sidebar-mobile-trigger",
470
561
  "data-state": Z ? "open" : "closed",
471
- className: e("inline-flex min-h-10 items-center gap-2 rounded-xl border border-[color:var(--aui-divider,var(--border))] bg-[color:var(--aui-page-bg,var(--background))] px-3 text-sm font-medium text-[color:var(--aui-page-foreground,var(--foreground))] shadow-sm transition hover:bg-[color:var(--aui-page-bg-alt,var(--muted))]", U),
472
- onClick: () => Q(!Z),
473
- children: [/* @__PURE__ */ u("span", {
562
+ className: e("inline-flex min-h-10 items-center gap-2 rounded-xl border border-[color:var(--aui-divider,var(--border))] bg-[color:var(--aui-page-bg,var(--background))] px-3 text-sm font-medium text-[color:var(--aui-page-foreground,var(--foreground))] shadow-sm transition hover:bg-[color:var(--aui-page-bg-alt,var(--muted))]", ue),
563
+ onClick: () => $(!Z),
564
+ children: [/* @__PURE__ */ f("span", {
474
565
  className: "inline-flex size-8 items-center justify-center rounded-lg bg-[color:var(--aui-page-bg-alt,var(--muted))]",
475
- children: B ?? /* @__PURE__ */ u(s, { className: "size-4" })
476
- }), /* @__PURE__ */ u("span", { children: Z ? z : R })]
566
+ children: ce ?? /* @__PURE__ */ f(c, { className: "size-4" })
567
+ }), /* @__PURE__ */ f("span", { children: Z ? B : z })]
477
568
  });
478
- return /* @__PURE__ */ d(l, { children: [V ? K ? K({
569
+ return /* @__PURE__ */ p(d, { children: [V ? W ? W({
479
570
  open: Z,
480
- setOpen: Q
481
- }) : se : null, /* @__PURE__ */ d("div", {
571
+ setOpen: $
572
+ }) : ye : null, /* @__PURE__ */ p("div", {
482
573
  "data-slot": "sidebar-mobile-root",
483
574
  className: "relative z-40",
484
- children: [/* @__PURE__ */ u("button", {
575
+ children: [/* @__PURE__ */ f("button", {
485
576
  type: "button",
486
577
  "aria-label": "Dismiss navigation",
487
578
  "data-slot": "sidebar-mobile-overlay",
488
579
  "data-state": Z ? "open" : "closed",
489
- className: e("fixed inset-0 z-40 bg-black/45 transition-opacity duration-200", Z ? "opacity-100" : "pointer-events-none opacity-0", G),
580
+ className: e("fixed inset-0 z-40 bg-black/45 transition-opacity duration-200", Z ? "opacity-100" : "pointer-events-none opacity-0", U),
490
581
  style: {
491
582
  opacity: +!!Z,
492
583
  pointerEvents: Z ? "auto" : "none"
493
584
  },
494
- onClick: () => Q(!1)
495
- }), /* @__PURE__ */ u(T, {
496
- ...$,
585
+ onClick: () => $(!1)
586
+ }), /* @__PURE__ */ f(O, {
587
+ ...ve,
497
588
  mobile: !0,
498
589
  collapsed: !1,
499
- mobileTitle: I,
500
- mobileDescription: L,
501
- onRequestClose: () => Q(!1),
590
+ mobileTitle: R,
591
+ mobileDescription: se,
592
+ onRequestClose: () => $(!1),
502
593
  "data-state": Z ? "open" : "closed",
503
594
  role: "dialog",
504
595
  "aria-modal": "true",
505
- "aria-label": typeof I == "string" ? I : "Navigation",
506
- className: e("fixed inset-y-0 left-0 z-50 max-w-[22rem] border-r border-[color:var(--aui-divider,var(--border))] bg-[color:var(--aui-page-bg,var(--background))] shadow-2xl transition-transform duration-200 ease-out", Z ? "translate-x-0" : "-translate-x-full", W, n),
596
+ "aria-label": typeof R == "string" ? R : "Navigation",
597
+ className: e("fixed inset-y-0 z-50 max-w-[22rem] border-[color:var(--aui-divider,var(--border))] bg-[color:var(--aui-page-bg,var(--background))] shadow-2xl transition-transform duration-200 ease-out", b === "left" ? "left-0 border-r" : "right-0 border-l", Z ? "translate-x-0" : b === "left" ? "-translate-x-full" : "translate-x-full", H, t),
507
598
  style: {
508
- width: y,
509
- minWidth: y,
510
- translate: Z ? "0 0" : "-100% 0"
599
+ width: w,
600
+ minWidth: w,
601
+ translate: Z ? "0 0" : b === "left" ? "-100% 0" : "100% 0"
511
602
  }
512
603
  })]
513
604
  })] });
514
605
  }
606
+ function te({ className: t, ...n }) {
607
+ return /* @__PURE__ */ f("main", {
608
+ "data-slot": "sidebar-inset",
609
+ className: e("relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-background 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]:border md:peer-data-[variant=inset]:shadow-sm", t),
610
+ ...n
611
+ });
612
+ }
515
613
  //#endregion
516
- export { E as Sidebar };
614
+ export { ee as Sidebar, te as SidebarInset };