@cloudflare/kumo 2.7.0 → 2.8.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 (62) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/ai/component-registry.json +1164 -149
  3. package/ai/component-registry.md +1325 -114
  4. package/ai/schemas.ts +136 -7
  5. package/dist/.build-complete +1 -1
  6. package/dist/ai/schemas.d.ts +259 -22
  7. package/dist/ai/schemas.d.ts.map +1 -1
  8. package/dist/ai/schemas.js +1515 -1298
  9. package/dist/ai/schemas.js.map +1 -1
  10. package/dist/chunks/Maps-imwfwgb7do9lr3i5.js +2448 -0
  11. package/dist/chunks/Maps-imwfwgb7do9lr3i5.js.map +1 -0
  12. package/dist/chunks/input-area-sg518xu4pyg4m0km.js +144 -0
  13. package/dist/chunks/input-area-sg518xu4pyg4m0km.js.map +1 -0
  14. package/dist/chunks/{sidebar-ctd980heycmxsux1.js → sidebar-7whsl7qwrw5b6ip8.js} +306 -306
  15. package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js.map +1 -0
  16. package/dist/components/chart.js +1 -1
  17. package/dist/components/flow.js +2306 -2350
  18. package/dist/components/flow.js.map +1 -1
  19. package/dist/components/input.js +1 -1
  20. package/dist/components/sidebar.js +1 -1
  21. package/dist/index.js +3 -3
  22. package/dist/src/components/chart/TimeseriesChart.d.ts +8 -0
  23. package/dist/src/components/chart/TimeseriesChart.d.ts.map +1 -1
  24. package/dist/src/components/chart/index.d.ts +1 -1
  25. package/dist/src/components/chart/index.d.ts.map +1 -1
  26. package/dist/src/components/chart/timeseries-markers.d.ts +107 -0
  27. package/dist/src/components/chart/timeseries-markers.d.ts.map +1 -0
  28. package/dist/src/components/chart/timeseries-thresholds.d.ts +61 -0
  29. package/dist/src/components/chart/timeseries-thresholds.d.ts.map +1 -0
  30. package/dist/src/components/chart/timeseries-tooltip.d.ts +28 -0
  31. package/dist/src/components/chart/timeseries-tooltip.d.ts.map +1 -0
  32. package/dist/src/components/flow/connectors.d.ts +18 -0
  33. package/dist/src/components/flow/connectors.d.ts.map +1 -1
  34. package/dist/src/components/flow/diagram.d.ts +48 -41
  35. package/dist/src/components/flow/diagram.d.ts.map +1 -1
  36. package/dist/src/components/flow/flow-layout.d.ts +77 -0
  37. package/dist/src/components/flow/flow-layout.d.ts.map +1 -0
  38. package/dist/src/components/flow/node.d.ts.map +1 -1
  39. package/dist/src/components/flow/parallel.d.ts +3 -7
  40. package/dist/src/components/flow/parallel.d.ts.map +1 -1
  41. package/dist/src/components/flow/use-children.d.ts +0 -60
  42. package/dist/src/components/flow/use-children.d.ts.map +1 -1
  43. package/dist/src/components/input/input-area.d.ts +18 -0
  44. package/dist/src/components/input/input-area.d.ts.map +1 -1
  45. package/dist/src/components/sidebar/sidebar.d.ts +2 -0
  46. package/dist/src/components/sidebar/sidebar.d.ts.map +1 -1
  47. package/dist/src/primitives/index.d.ts +1 -1
  48. package/dist/src/primitives/index.d.ts.map +1 -1
  49. package/dist/src/primitives/otp-field.d.ts +1 -1
  50. package/dist/src/primitives/otp-field.d.ts.map +1 -1
  51. package/dist/styles/kumo-standalone.css +1 -1
  52. package/package.json +1 -1
  53. package/scripts/component-registry/discovery.ts +87 -0
  54. package/scripts/component-registry/index.test.ts +89 -1
  55. package/scripts/component-registry/index.ts +27 -2
  56. package/scripts/component-registry/sub-components.ts +34 -21
  57. package/scripts/generate-primitives.ts +1 -1
  58. package/dist/chunks/Maps-fkiyllhs5w0qzw1y.js +0 -2155
  59. package/dist/chunks/Maps-fkiyllhs5w0qzw1y.js.map +0 -1
  60. package/dist/chunks/input-area-ixtj4e8eny58nbf9.js +0 -78
  61. package/dist/chunks/input-area-ixtj4e8eny58nbf9.js.map +0 -1
  62. package/dist/chunks/sidebar-ctd980heycmxsux1.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { jsx as n, jsxs as H, Fragment as Le } from "react/jsx-runtime";
3
- import _, { forwardRef as x, useState as P, useCallback as w, useMemo as Z, createContext as U, useRef as B, useEffect as $, useContext as O, useId as De } from "react";
2
+ import { jsx as n, jsxs as W, Fragment as De } from "react/jsx-runtime";
3
+ import _, { forwardRef as x, useState as P, useCallback as w, useMemo as Z, createContext as G, useRef as D, useEffect as U, useContext as L, useId as Le } from "react";
4
4
  import { CaretRightIcon as Be } from "@phosphor-icons/react";
5
5
  import { u as ee } from "./link-provider-mn2voeohon7cj9o4.js";
6
- import { a as Oe, T as ze } from "./tooltip-mooldq78tg77ekvv.js";
7
- import { c as o } from "./vendor-styling-ofvnbcuht98q88oo.js";
6
+ import { a as ze, T as Oe } from "./tooltip-mooldq78tg77ekvv.js";
7
+ import { c as s } from "./vendor-styling-ofvnbcuht98q88oo.js";
8
8
  import { bC as Fe, bD as Pe, bE as Ve, bF as We, bG as He } from "./vendor-base-ui-elpbzr8xeffrz4h2.js";
9
9
  const st = {
10
10
  variant: {
@@ -60,14 +60,14 @@ const st = {
60
60
  }, Ke = "16.25rem", Xe = "57px", Ge = "cubic-bezier(0.77, 0, 0.175, 1)", Ue = 250, $e = 768, qe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
61
61
  function je(t = $e) {
62
62
  const [a, e] = P(() => typeof window > "u" ? !1 : window.matchMedia(`(max-width: ${t - 1}px)`).matches);
63
- return $(() => {
64
- const i = window.matchMedia(`(max-width: ${t - 1}px)`), s = () => e(i.matches);
65
- return i.addEventListener("change", s), e(i.matches), () => i.removeEventListener("change", s);
63
+ return U(() => {
64
+ const i = window.matchMedia(`(max-width: ${t - 1}px)`), o = () => e(i.matches);
65
+ return i.addEventListener("change", o), e(i.matches), () => i.removeEventListener("change", o);
66
66
  }, [t]), a;
67
67
  }
68
- const te = U(null);
68
+ const te = G(null);
69
69
  function V() {
70
- const t = O(te);
70
+ const t = L(te);
71
71
  if (!t)
72
72
  throw new Error("useSidebar must be used within a Sidebar.Provider");
73
73
  return t;
@@ -78,91 +78,91 @@ function ae({
78
78
  open: a,
79
79
  onOpenChange: e,
80
80
  variant: i = J.variant,
81
- side: s = J.side,
82
- collapsible: g = J.collapsible,
83
- resizable: c = !1,
81
+ side: o = J.side,
82
+ collapsible: h = J.collapsible,
83
+ resizable: l = !1,
84
84
  defaultWidth: u = Ye,
85
- minWidth: l = Je,
85
+ minWidth: c = Je,
86
86
  maxWidth: d = Qe,
87
87
  onWidthChange: r,
88
88
  contained: p = !1,
89
- peekable: v = !1,
90
- animationDuration: f = Ue,
89
+ peekable: f = !1,
90
+ animationDuration: g = Ue,
91
91
  mobileBreakpoint: S,
92
92
  children: k,
93
- className: R,
94
- style: h
93
+ className: M,
94
+ style: v
95
95
  }) {
96
- const m = je(S), [y, L] = P(!1), [A, T] = P(u), [N, M] = P(!1), [z, C] = P(!1), F = m && a !== void 0 ? a : y, K = w(
97
- (E) => {
98
- L(E), m && a !== void 0 && e?.(E);
96
+ const b = je(S), [y, T] = P(!1), [C, E] = P(u), [I, R] = P(!1), [B, N] = P(!1), z = b && a !== void 0 ? a : y, H = w(
97
+ (A) => {
98
+ T(A), b && a !== void 0 && e?.(A);
99
99
  },
100
- [m, a, e]
100
+ [b, a, e]
101
101
  ), Q = w(
102
- (E) => {
103
- const X = Math.min(d, Math.max(l, E));
104
- T(X), r?.(X);
102
+ (A) => {
103
+ const K = Math.min(d, Math.max(c, A));
104
+ E(K), r?.(K);
105
105
  },
106
- [l, d, r]
107
- ), [q, j] = P(t), b = a ?? q, D = w(
108
- (E) => {
109
- const X = typeof E == "function" ? E(b) : E;
110
- e?.(X), j(X);
106
+ [c, d, r]
107
+ ), [$, q] = P(t), m = a ?? $, O = w(
108
+ (A) => {
109
+ const K = typeof A == "function" ? A(m) : A;
110
+ e?.(K), q(K);
111
111
  },
112
- [e, b]
113
- ), W = w(() => {
114
- m ? K(!F) : (C(!1), D((E) => !E));
115
- }, [m, F, K, D]), I = w(() => {
116
- v && !b && !m && C(!0);
117
- }, [v, b, m]), Ee = w(() => {
118
- C(!1);
119
- }, []), Y = z ? "peeking" : b ? "expanded" : "collapsed", Te = c ? `${A}px` : Ke, _e = Z(
112
+ [e, m]
113
+ ), j = w(() => {
114
+ b ? H(!z) : (N(!1), O((A) => !A));
115
+ }, [b, z, H, O]), F = w(() => {
116
+ f && !m && !b && N(!0);
117
+ }, [f, m, b]), Ee = w(() => {
118
+ N(!1);
119
+ }, []), Y = B ? "peeking" : m ? "expanded" : "collapsed", _e = l ? `${C}px` : Ke, Te = Z(
120
120
  () => ({
121
121
  state: Y,
122
- open: b,
123
- setOpen: D,
124
- openMobile: F,
125
- setOpenMobile: K,
126
- isMobile: m,
127
- toggleSidebar: W,
122
+ open: m,
123
+ setOpen: O,
124
+ openMobile: z,
125
+ setOpenMobile: H,
126
+ isMobile: b,
127
+ toggleSidebar: j,
128
128
  variant: i,
129
- side: s,
130
- collapsible: g,
131
- width: A,
132
- resizable: c,
133
- minWidth: l,
129
+ side: o,
130
+ collapsible: h,
131
+ width: C,
132
+ resizable: l,
133
+ minWidth: c,
134
134
  maxWidth: d,
135
- isResizing: N,
136
- setIsResizing: M,
135
+ isResizing: I,
136
+ setIsResizing: R,
137
137
  setWidth: Q,
138
- isPeeking: z,
139
- peekable: v,
140
- startPeek: I,
138
+ isPeeking: B,
139
+ peekable: f,
140
+ startPeek: F,
141
141
  stopPeek: Ee,
142
142
  contained: p,
143
- animationDuration: f
143
+ animationDuration: g
144
144
  }),
145
- [Y, b, F, m, A, N, z]
145
+ [Y, m, z, b, C, I, B]
146
146
  );
147
- return /* @__PURE__ */ n(te.Provider, { value: _e, children: /* @__PURE__ */ n(
147
+ return /* @__PURE__ */ n(te.Provider, { value: Te, children: /* @__PURE__ */ n(
148
148
  "div",
149
149
  {
150
150
  "data-sidebar-wrapper": "",
151
151
  "data-state": Y,
152
- "data-side": s,
152
+ "data-side": o,
153
153
  style: {
154
- "--sidebar-width": Te,
154
+ "--sidebar-width": _e,
155
155
  "--sidebar-width-icon": Xe,
156
- "--sidebar-animation-duration": `${f}ms`,
156
+ "--sidebar-animation-duration": `${g}ms`,
157
157
  "--sidebar-easing": Ge,
158
- ...h
158
+ ...v
159
159
  },
160
- className: o(
160
+ className: s(
161
161
  "group/sidebar-wrapper relative isolate flex w-full [--sidebar-bg:var(--color-kumo-base)] [--sidebar-active-bg:var(--color-kumo-tint)]",
162
- !p && !m && "min-h-svh",
162
+ !p && !b && "min-h-svh",
163
163
  "has-data-[variant=inset]:bg-kumo-recessed",
164
- N && "select-none",
165
- R
164
+ I && "select-none",
165
+ M
166
166
  ),
167
167
  children: k
168
168
  }
@@ -170,62 +170,60 @@ function ae({
170
170
  }
171
171
  ae.displayName = "Sidebar.Provider";
172
172
  const ie = x(
173
- ({ className: t, contentClassName: a, children: e, ...i }, s) => {
173
+ ({ className: t, contentClassName: a, children: e, ...i }, o) => {
174
174
  const {
175
- state: g,
176
- open: c,
175
+ state: h,
176
+ open: l,
177
177
  isMobile: u,
178
- openMobile: l,
178
+ openMobile: c,
179
179
  setOpenMobile: d,
180
180
  side: r,
181
181
  variant: p,
182
- collapsible: v,
183
- isResizing: f,
182
+ collapsible: f,
183
+ isResizing: g,
184
184
  resizable: S,
185
185
  width: k,
186
- isPeeking: R,
187
- startPeek: h,
188
- stopPeek: m,
186
+ isPeeking: M,
187
+ startPeek: v,
188
+ stopPeek: b,
189
189
  contained: y
190
- } = V(), L = w(
191
- (b) => {
192
- b && (l ? b.removeAttribute("inert") : b.setAttribute("inert", ""));
190
+ } = V(), T = w(
191
+ (m) => {
192
+ m && (c ? m.removeAttribute("inert") : m.setAttribute("inert", ""));
193
193
  },
194
- [l]
195
- ), A = w(
196
- (b) => {
197
- L(b), typeof s == "function" ? s(b) : s && (s.current = b);
194
+ [c]
195
+ ), C = w(
196
+ (m) => {
197
+ T(m), typeof o == "function" ? o(m) : o && (o.current = m);
198
198
  },
199
- [s, L]
200
- ), T = B(null), N = B(null), M = B(!1);
201
- $(() => {
202
- if (!u || !l) return;
203
- const b = N.current, D = (I) => {
204
- I.key === "Escape" && (M.current = !0, d(!1));
205
- }, W = (I) => {
206
- b && !b.contains(I.relatedTarget) && (M.current = !1, d(!1));
199
+ [o, T]
200
+ ), E = D(null), I = D(null), R = D(!1);
201
+ U(() => {
202
+ if (!u || !c) return;
203
+ const m = (O) => {
204
+ O.key === "Escape" && (R.current = !0, d(!1));
207
205
  };
208
- return document.addEventListener("keydown", D), b?.addEventListener("focusout", W), () => {
209
- document.removeEventListener("keydown", D), b?.removeEventListener("focusout", W);
206
+ return document.addEventListener("keydown", m), () => {
207
+ document.removeEventListener("keydown", m);
210
208
  };
211
- }, [u, l, d]), $(() => {
212
- u && (l ? (T.current = document.activeElement, M.current = !1, requestAnimationFrame(() => {
213
- (N.current?.querySelector(
209
+ }, [u, c, d]), U(() => {
210
+ u && (c ? (E.current = document.activeElement, R.current = !1, requestAnimationFrame(() => {
211
+ (I.current?.querySelector(
214
212
  qe
215
- ) ?? N.current)?.focus();
216
- })) : M.current && T.current instanceof HTMLElement && (T.current.focus(), M.current = !1, T.current = null));
217
- }, [u, l]);
218
- const z = w(
219
- (b) => {
220
- b.currentTarget.contains(b.relatedTarget) || m();
213
+ ) ?? I.current)?.focus();
214
+ })) : R.current && E.current instanceof HTMLElement && (E.current.focus(), R.current = !1, E.current = null));
215
+ }, [u, c]);
216
+ const B = w(
217
+ (m) => {
218
+ m.currentTarget.contains(m.relatedTarget) || b();
221
219
  },
222
- [m]
220
+ [b]
223
221
  );
224
- if (v === "none")
222
+ if (f === "none")
225
223
  return /* @__PURE__ */ n(
226
224
  "aside",
227
225
  {
228
- ref: s,
226
+ ref: o,
229
227
  "data-state": "expanded",
230
228
  "data-side": r,
231
229
  "data-variant": p,
@@ -235,7 +233,7 @@ const ie = x(
235
233
  minWidth: "var(--sidebar-width)",
236
234
  maxWidth: "var(--sidebar-width)"
237
235
  },
238
- className: o(
236
+ className: s(
239
237
  "relative flex h-full shrink-0 grow-0 flex-col overflow-hidden bg-(--sidebar-bg) text-kumo-default",
240
238
  p === "sidebar" && (r === "left" ? "border-r border-kumo-line" : "border-l border-kumo-line"),
241
239
  p === "floating" && "m-2 rounded-lg border border-kumo-line shadow-lg",
@@ -246,19 +244,19 @@ const ie = x(
246
244
  }
247
245
  );
248
246
  if (u)
249
- return /* @__PURE__ */ H(Le, { children: [
247
+ return /* @__PURE__ */ W(De, { children: [
250
248
  /* @__PURE__ */ n(
251
249
  "div",
252
250
  {
253
251
  "data-sidebar-backdrop": "",
254
- className: o(
252
+ className: s(
255
253
  y ? "absolute inset-0 z-40 bg-kumo-recessed" : "fixed inset-0 z-40 bg-kumo-recessed",
256
254
  "transition-opacity duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
257
255
  "motion-reduce:transition-none",
258
- l ? "opacity-80" : "opacity-0 pointer-events-none"
256
+ c ? "opacity-80" : "opacity-0 pointer-events-none"
259
257
  ),
260
258
  onClick: () => {
261
- M.current = !0, d(!1);
259
+ R.current = !0, d(!1);
262
260
  },
263
261
  "aria-hidden": "true"
264
262
  }
@@ -266,27 +264,27 @@ const ie = x(
266
264
  /* @__PURE__ */ n(
267
265
  "nav",
268
266
  {
269
- ref: (b) => {
270
- A(b), N.current = b;
267
+ ref: (m) => {
268
+ C(m), I.current = m;
271
269
  },
272
270
  tabIndex: -1,
273
271
  "aria-label": "Navigation",
274
- "aria-hidden": !l,
275
- "data-state": l ? "expanded" : "collapsed",
272
+ "aria-hidden": !c,
273
+ "data-state": c ? "expanded" : "collapsed",
276
274
  "data-side": r,
277
275
  "data-variant": p,
278
- "data-collapsible": v,
276
+ "data-collapsible": f,
279
277
  "data-sidebar": "sidebar",
280
278
  "data-mobile": "true",
281
- className: o(
279
+ className: s(
282
280
  y ? "group/sidebar absolute inset-y-0 z-50 flex w-(--sidebar-width) flex-col overflow-hidden" : "group/sidebar fixed inset-y-0 z-50 flex w-(--sidebar-width) flex-col overflow-hidden",
283
281
  "border-r border-kumo-line bg-(--sidebar-bg) text-kumo-default",
284
282
  "transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
285
283
  "motion-reduce:transition-none",
286
284
  r === "left" && "left-0",
287
285
  r === "right" && "right-0",
288
- r === "left" && (l ? "translate-x-0" : "-translate-x-full"),
289
- r === "right" && (l ? "translate-x-0" : "translate-x-full"),
286
+ r === "left" && (c ? "translate-x-0" : "-translate-x-full"),
287
+ r === "right" && (c ? "translate-x-0" : "translate-x-full"),
290
288
  t
291
289
  ),
292
290
  ...i,
@@ -294,54 +292,54 @@ const ie = x(
294
292
  }
295
293
  )
296
294
  ] });
297
- const C = v === "icon" ? "var(--sidebar-width-icon)" : "0px", F = S ? `${k}px` : "var(--sidebar-width)", K = c ? F : C, q = c || R ? F : C, j = p === "sidebar" ? r === "left" ? "border-r border-kumo-line" : "border-l border-kumo-line" : p === "floating" ? "border border-kumo-line" : "";
295
+ const N = f === "icon" ? "var(--sidebar-width-icon)" : "0px", z = S ? `${k}px` : "var(--sidebar-width)", H = l ? z : N, $ = l || M ? z : N, q = p === "sidebar" ? r === "left" ? "border-r border-kumo-line" : "border-l border-kumo-line" : p === "floating" ? "border border-kumo-line" : "";
298
296
  return /* @__PURE__ */ n(
299
297
  "aside",
300
298
  {
301
- ref: s,
302
- "data-state": g,
299
+ ref: o,
300
+ "data-state": h,
303
301
  "data-side": r,
304
302
  "data-variant": p,
305
- "data-collapsible": v,
303
+ "data-collapsible": f,
306
304
  "data-sidebar": "sidebar",
307
- style: { width: K },
308
- className: o(
305
+ style: { width: H },
306
+ className: s(
309
307
  "group/sidebar relative h-full shrink-0 grow-0",
310
308
  "overflow-visible",
311
309
  // allow content container to overlay when peeking
312
310
  "transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
313
311
  "motion-reduce:transition-none",
314
- f && "transition-none!",
312
+ g && "transition-none!",
315
313
  p === "floating" && "m-2 rounded-lg shadow-lg",
316
314
  t
317
315
  ),
318
316
  ...i,
319
- children: /* @__PURE__ */ n(Oe, { children: (() => {
320
- const b = _.Children.toArray(e), D = b.filter(
321
- (I) => _.isValidElement(I) && I.type?.displayName === "Sidebar.Footer"
322
- ), W = b.filter(
323
- (I) => !_.isValidElement(I) || I.type?.displayName !== "Sidebar.Footer"
317
+ children: /* @__PURE__ */ n(ze, { children: (() => {
318
+ const m = _.Children.toArray(e), O = m.filter(
319
+ (F) => _.isValidElement(F) && F.type?.displayName === "Sidebar.Footer"
320
+ ), j = m.filter(
321
+ (F) => !_.isValidElement(F) || F.type?.displayName !== "Sidebar.Footer"
324
322
  );
325
- return /* @__PURE__ */ H(
323
+ return /* @__PURE__ */ W(
326
324
  "div",
327
325
  {
328
326
  "data-sidebar": "content-container",
329
- style: { width: q },
330
- className: o(
327
+ style: { width: $ },
328
+ className: s(
331
329
  "flex h-full flex-col",
332
330
  "min-w-0 overflow-hidden whitespace-nowrap",
333
331
  "bg-(--sidebar-bg) text-kumo-default",
334
- j,
332
+ q,
335
333
  "transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
336
334
  "motion-reduce:transition-none",
337
- f && "transition-none!",
338
- !c && o(
335
+ g && "transition-none!",
336
+ !l && s(
339
337
  y ? "absolute" : "fixed",
340
338
  "inset-y-0 z-40",
341
339
  r === "left" && "left-0",
342
340
  r === "right" && "right-0"
343
341
  ),
344
- c && "relative",
342
+ l && "relative",
345
343
  a
346
344
  ),
347
345
  children: [
@@ -350,14 +348,14 @@ const ie = x(
350
348
  {
351
349
  "data-sidebar": "peek-zone",
352
350
  className: "flex flex-1 flex-col min-h-0",
353
- onMouseEnter: h,
354
- onMouseLeave: m,
355
- onFocus: h,
356
- onBlur: z,
357
- children: W
351
+ onMouseEnter: v,
352
+ onMouseLeave: b,
353
+ onFocus: v,
354
+ onBlur: B,
355
+ children: j
358
356
  }
359
357
  ),
360
- D
358
+ O
361
359
  ]
362
360
  }
363
361
  );
@@ -372,7 +370,7 @@ const ne = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
372
370
  {
373
371
  ref: e,
374
372
  "data-sidebar": "header",
375
- className: o(
373
+ className: s(
376
374
  "flex h-[58px] shrink-0 items-center gap-1 border-b border-kumo-line",
377
375
  "px-3 overflow-hidden",
378
376
  t
@@ -381,19 +379,19 @@ const ne = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
381
379
  }
382
380
  ));
383
381
  ne.displayName = "Sidebar.Header";
384
- const re = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ H(
382
+ const re = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ W(
385
383
  Fe,
386
384
  {
387
385
  ref: i,
388
386
  "data-sidebar": "content",
389
- className: o("relative min-w-0 flex-1 overflow-hidden", t),
387
+ className: s("relative min-w-0 flex-1 overflow-hidden", t),
390
388
  ...e,
391
389
  children: [
392
390
  /* @__PURE__ */ n(
393
391
  Pe,
394
392
  {
395
393
  tabIndex: -1,
396
- className: o(
394
+ className: s(
397
395
  "h-full px-[11px] py-3 group-not-data-[state=collapsed]/sidebar:px-3.5",
398
396
  "transition-[padding] duration-(--sidebar-animation-duration)",
399
397
  "overflow-x-hidden!",
@@ -407,7 +405,7 @@ const re = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ H(
407
405
  We,
408
406
  {
409
407
  orientation: "vertical",
410
- className: o(
408
+ className: s(
411
409
  "flex w-1.5 touch-none select-none p-px",
412
410
  "opacity-0 transition-opacity duration-150",
413
411
  "data-[scrolling]:opacity-100 data-[hovering]:opacity-100"
@@ -424,7 +422,7 @@ const se = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
424
422
  {
425
423
  ref: e,
426
424
  "data-sidebar": "footer",
427
- className: o(
425
+ className: s(
428
426
  "flex h-12 shrink-0 items-center gap-4 overflow-hidden whitespace-nowrap border-t border-kumo-line",
429
427
  "px-[11px] group-not-data-[state=collapsed]/sidebar:px-4",
430
428
  "bg-(--sidebar-bg)",
@@ -445,7 +443,7 @@ const oe = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ n(
445
443
  {
446
444
  ref: i,
447
445
  "data-sidebar": "group",
448
- className: o("flex min-w-0 flex-col gap-y-px", t),
446
+ className: s("flex min-w-0 flex-col gap-y-px", t),
449
447
  ...e,
450
448
  children: a
451
449
  }
@@ -456,7 +454,7 @@ const de = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ n(
456
454
  {
457
455
  ref: i,
458
456
  "data-sidebar": "group-label",
459
- className: o(
457
+ className: s(
460
458
  // Grid-rows for smooth collapse animation
461
459
  "grid overflow-hidden",
462
460
  "transition-[grid-template-rows,margin,border-color] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
@@ -476,7 +474,7 @@ const de = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ n(
476
474
  children: /* @__PURE__ */ n("div", { className: "min-h-0 min-w-0", children: /* @__PURE__ */ n(
477
475
  "div",
478
476
  {
479
- className: o(
477
+ className: s(
480
478
  "truncate px-3 mt-4 mb-2 text-sm font-medium text-kumo-subtle",
481
479
  // First group: less top margin
482
480
  "[[data-sidebar=group]:first-child_&]:mt-2"
@@ -487,12 +485,12 @@ const de = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ n(
487
485
  }
488
486
  ));
489
487
  de.displayName = "Sidebar.GroupLabel";
490
- const le = U(!1), ce = U(!1), ue = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
488
+ const le = G(!1), ce = G(!1), ue = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
491
489
  "ul",
492
490
  {
493
491
  ref: e,
494
492
  "data-sidebar": "menu",
495
- className: o(
493
+ className: s(
496
494
  "m-0 flex min-w-0 list-none flex-col items-stretch gap-y-px p-0",
497
495
  t
498
496
  ),
@@ -505,7 +503,7 @@ const be = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ n(le.Pr
505
503
  {
506
504
  ref: i,
507
505
  "data-sidebar": "menu-item",
508
- className: o(
506
+ className: s(
509
507
  "relative group-data-[state=collapsed]/sidebar:overflow-hidden",
510
508
  t
511
509
  ),
@@ -520,24 +518,24 @@ const me = x(
520
518
  icon: a,
521
519
  active: e = !1,
522
520
  size: i = "base",
523
- href: s,
524
- target: g,
525
- tooltip: c,
521
+ href: o,
522
+ target: h,
523
+ tooltip: l,
526
524
  children: u,
527
- ...l
525
+ ...c
528
526
  }, d) => {
529
- const { state: r, peekable: p } = V(), v = ee(), f = O(le), S = a ? _.isValidElement(a) ? a : /* @__PURE__ */ n(
527
+ const { state: r, peekable: p } = V(), f = ee(), g = L(le), S = a ? _.isValidElement(a) ? a : /* @__PURE__ */ n(
530
528
  a,
531
529
  {
532
- className: o(
530
+ className: s(
533
531
  "shrink-0 opacity-40",
534
532
  i === "base" ? "size-4" : "size-3.5"
535
533
  )
536
534
  }
537
- ) : null, k = /* @__PURE__ */ H(
535
+ ) : null, k = /* @__PURE__ */ W(
538
536
  "div",
539
537
  {
540
- className: o(
538
+ className: s(
541
539
  "flex flex-1 items-center min-w-0 gap-3",
542
540
  "translate-x-[-3px] group-not-data-[state=collapsed]/sidebar:translate-x-0",
543
541
  "transition-transform duration-(--sidebar-animation-duration)"
@@ -547,7 +545,7 @@ const me = x(
547
545
  /* @__PURE__ */ n(
548
546
  "span",
549
547
  {
550
- className: o(
548
+ className: s(
551
549
  "flex flex-1 items-center gap-2 min-w-0 text-left overflow-hidden"
552
550
  ),
553
551
  children: _.Children.map(
@@ -558,7 +556,7 @@ const me = x(
558
556
  )
559
557
  ]
560
558
  }
561
- ), R = o(
559
+ ), M = s(
562
560
  // Layout
563
561
  "group/menu-button relative flex w-full min-w-0 items-center gap-2.5 rounded-lg outline-none cursor-pointer",
564
562
  "before:absolute before:inset-x-0 before:-inset-y-px",
@@ -576,50 +574,51 @@ const me = x(
576
574
  "focus:outline-none focus-visible:text-kumo-strong focus-visible:bg-(--sidebar-active-bg)",
577
575
  t
578
576
  );
579
- let h;
580
- return s ? h = /* @__PURE__ */ n(
581
- v,
577
+ let v;
578
+ return o ? v = /* @__PURE__ */ n(
579
+ f,
582
580
  {
583
581
  ref: d,
584
- className: o(R, "no-underline!"),
585
- href: s,
586
- to: s,
587
- target: g,
582
+ className: s(M, "no-underline!"),
583
+ href: o,
584
+ to: o,
585
+ target: h,
588
586
  "data-active": e || void 0,
589
587
  "data-sidebar": "menu-button",
590
588
  "data-kumo-component": "Sidebar",
591
589
  "data-kumo-part": "menu-button-link",
592
590
  "data-size": i,
593
- onClick: l.onClick,
591
+ onClick: c.onClick,
594
592
  children: k
595
593
  }
596
- ) : h = /* @__PURE__ */ n(
594
+ ) : v = /* @__PURE__ */ n(
597
595
  "button",
598
596
  {
599
597
  ref: d,
600
598
  type: "button",
601
- className: R,
599
+ className: M,
602
600
  "data-active": e || void 0,
603
601
  "data-sidebar": "menu-button",
604
602
  "data-kumo-component": "Sidebar",
605
603
  "data-kumo-part": "menu-button",
606
604
  "data-size": i,
607
- ...l,
605
+ ...c,
608
606
  children: k
609
607
  }
610
- ), c && (h = /* @__PURE__ */ n(
611
- ze,
608
+ ), l && (v = /* @__PURE__ */ n(
609
+ Oe,
612
610
  {
613
- content: r === "collapsed" && !p ? c : null,
611
+ content: l,
612
+ disabled: !(r === "collapsed" && !p),
614
613
  side: "right",
615
- render: h
614
+ render: v
616
615
  }
617
- )), f ? h : /* @__PURE__ */ n(
616
+ )), g ? v : /* @__PURE__ */ n(
618
617
  "li",
619
618
  {
620
619
  "data-sidebar": "menu-item",
621
620
  className: "relative group-data-[state=collapsed]/sidebar:overflow-hidden",
622
- children: h
621
+ children: v
623
622
  }
624
623
  );
625
624
  }
@@ -630,7 +629,7 @@ const pe = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
630
629
  {
631
630
  ref: e,
632
631
  "data-sidebar": "menu-badge",
633
- className: o(
632
+ className: s(
634
633
  "inline-flex shrink-0 items-center rounded-full border border-dashed border-kumo-line",
635
634
  "select-none px-1.5 py-0.5 text-[11px]/none font-medium text-kumo-strong",
636
635
  // Hidden when collapsed
@@ -641,12 +640,12 @@ const pe = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
641
640
  }
642
641
  ));
643
642
  pe.displayName = "Sidebar.MenuBadge";
644
- const fe = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ H(
643
+ const fe = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ W(
645
644
  "ul",
646
645
  {
647
646
  ref: i,
648
647
  "data-sidebar": "menu-sub",
649
- className: o(
648
+ className: s(
650
649
  "relative m-0 flex min-w-0 list-none flex-col gap-y-px p-0 pl-7 pr-0 overflow-hidden",
651
650
  t
652
651
  ),
@@ -663,14 +662,14 @@ const ge = x(({ className: t, children: a, ...e }, i) => /* @__PURE__ */ n(ce.Pr
663
662
  {
664
663
  ref: i,
665
664
  "data-sidebar": "menu-sub-item",
666
- className: o("relative", t),
665
+ className: s("relative", t),
667
666
  ...e,
668
667
  children: a
669
668
  }
670
669
  ) }));
671
670
  ge.displayName = "Sidebar.MenuSubItem";
672
- const he = x(({ className: t, active: a = !1, href: e, children: i, ...s }, g) => {
673
- const c = ee(), u = O(ce), l = o(
671
+ const he = x(({ className: t, active: a = !1, href: e, target: i, children: o, ...h }, l) => {
672
+ const u = ee(), c = L(ce), d = s(
674
673
  "group/menu-button relative flex w-full min-w-0 items-center gap-2 rounded-lg min-h-8.5 px-3 py-0 text-sm font-medium outline-none cursor-pointer",
675
674
  "before:absolute before:inset-x-0 before:-inset-y-px",
676
675
  "text-kumo-default transition-[color] duration-150",
@@ -678,39 +677,40 @@ const he = x(({ className: t, active: a = !1, href: e, children: i, ...s }, g) =
678
677
  a && "bg-(--sidebar-active-bg)",
679
678
  "focus:outline-none focus-visible:text-kumo-strong focus-visible:bg-(--sidebar-active-bg)",
680
679
  t
681
- ), d = /* @__PURE__ */ n("span", { className: "flex flex-1 items-center gap-2 min-w-0 text-left overflow-hidden", children: _.Children.map(
682
- i,
683
- (p) => typeof p == "string" || typeof p == "number" ? /* @__PURE__ */ n("span", { className: "truncate", children: p }) : p
680
+ ), r = /* @__PURE__ */ n("span", { className: "flex flex-1 items-center gap-2 min-w-0 text-left overflow-hidden", children: _.Children.map(
681
+ o,
682
+ (f) => typeof f == "string" || typeof f == "number" ? /* @__PURE__ */ n("span", { className: "truncate", children: f }) : f
684
683
  ) });
685
- let r;
686
- return e ? r = /* @__PURE__ */ n(
687
- c,
684
+ let p;
685
+ return e ? p = /* @__PURE__ */ n(
686
+ u,
688
687
  {
689
- ref: g,
690
- className: o(l, "no-underline!"),
688
+ ref: l,
689
+ className: s(d, "no-underline!"),
691
690
  href: e,
692
691
  to: e,
692
+ target: i,
693
693
  "data-active": a || void 0,
694
694
  "data-sidebar": "menu-sub-button",
695
695
  "data-kumo-component": "Sidebar",
696
696
  "data-kumo-part": "menu-sub-button-link",
697
- onClick: s.onClick,
698
- children: d
697
+ onClick: h.onClick,
698
+ children: r
699
699
  }
700
- ) : r = /* @__PURE__ */ n(
700
+ ) : p = /* @__PURE__ */ n(
701
701
  "button",
702
702
  {
703
- ref: g,
703
+ ref: l,
704
704
  type: "button",
705
- className: l,
705
+ className: d,
706
706
  "data-active": a || void 0,
707
707
  "data-sidebar": "menu-sub-button",
708
708
  "data-kumo-component": "Sidebar",
709
709
  "data-kumo-part": "menu-sub-button",
710
- ...s,
711
- children: d
710
+ ...h,
711
+ children: r
712
712
  }
713
- ), u ? r : /* @__PURE__ */ n("li", { "data-sidebar": "menu-sub-item", className: "relative", children: r });
713
+ ), c ? p : /* @__PURE__ */ n("li", { "data-sidebar": "menu-sub-item", className: "relative", children: p });
714
714
  });
715
715
  he.displayName = "Sidebar.MenuSubButton";
716
716
  const ve = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
@@ -718,7 +718,7 @@ const ve = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
718
718
  {
719
719
  ref: e,
720
720
  "data-sidebar": "separator",
721
- className: o("my-3 px-2", t),
721
+ className: s("my-3 px-2", t),
722
722
  ...a,
723
723
  children: /* @__PURE__ */ n("div", { className: "border-b border-kumo-line" })
724
724
  }
@@ -726,7 +726,7 @@ const ve = x(({ className: t, ...a }, e) => /* @__PURE__ */ n(
726
726
  ve.displayName = "Sidebar.Separator";
727
727
  function xe({ className: t }) {
728
728
  const { open: a } = V();
729
- return /* @__PURE__ */ H(
729
+ return /* @__PURE__ */ W(
730
730
  "svg",
731
731
  {
732
732
  width: "18",
@@ -738,14 +738,14 @@ function xe({ className: t }) {
738
738
  stroke: "currentColor",
739
739
  strokeWidth: "1.5",
740
740
  strokeLinecap: "round",
741
- className: o("shrink-0", t),
741
+ className: s("shrink-0", t),
742
742
  children: [
743
743
  /* @__PURE__ */ n("path", { d: "M21.25 6.72v10.56a2.97 2.97 0 0 1-2.97 2.97H5.72a2.97 2.97 0 0 1-2.97-2.97V6.72a2.97 2.97 0 0 1 2.97-2.97h12.56a2.97 2.97 0 0 1 2.97 2.97" }),
744
744
  /* @__PURE__ */ n(
745
745
  "path",
746
746
  {
747
747
  d: "M6.25 7.25v9.5",
748
- className: o(
748
+ className: s(
749
749
  "transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
750
750
  a ? "translate-x-px" : "translate-x-[10.5px]"
751
751
  )
@@ -756,26 +756,26 @@ function xe({ className: t }) {
756
756
  );
757
757
  }
758
758
  xe.displayName = "Sidebar.PanelIcon";
759
- const we = x(({ className: t, children: a, onClick: e, ...i }, s) => {
760
- const { open: g, toggleSidebar: c } = V();
759
+ const we = x(({ className: t, children: a, onClick: e, ...i }, o) => {
760
+ const { open: h, toggleSidebar: l } = V();
761
761
  return /* @__PURE__ */ n(
762
762
  "button",
763
763
  {
764
- ref: s,
764
+ ref: o,
765
765
  type: "button",
766
766
  "data-sidebar": "trigger",
767
767
  "data-kumo-component": "Sidebar",
768
768
  "data-kumo-part": "trigger",
769
- "aria-expanded": g,
770
- "aria-label": g ? "Collapse sidebar" : "Expand sidebar",
771
- className: o(
769
+ "aria-expanded": h,
770
+ "aria-label": h ? "Collapse sidebar" : "Expand sidebar",
771
+ className: s(
772
772
  "flex shrink-0 size-8.5 justify-center items-center rounded-lg cursor-pointer",
773
773
  "text-kumo-subtle hover:text-kumo-default hover:bg-(--sidebar-active-bg)",
774
774
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-kumo-brand",
775
775
  t
776
776
  ),
777
777
  onClick: (u) => {
778
- e?.(u), c();
778
+ e?.(u), l();
779
779
  },
780
780
  ...i,
781
781
  children: a ?? /* @__PURE__ */ n(xe, {})
@@ -795,7 +795,7 @@ const Se = x(({ className: t, ...a }, e) => {
795
795
  "data-kumo-part": "rail",
796
796
  "aria-label": "Toggle sidebar",
797
797
  tabIndex: -1,
798
- className: o(
798
+ className: s(
799
799
  "absolute inset-y-0 z-1 hidden w-4 -translate-x-1/2 cursor-pointer transition-all",
800
800
  "after:absolute after:inset-y-0 after:left-1/2 after:w-0.5",
801
801
  "hover:after:bg-kumo-brand/20",
@@ -813,48 +813,48 @@ Se.displayName = "Sidebar.Rail";
813
813
  const ye = x(({ className: t, ...a }, e) => {
814
814
  const {
815
815
  side: i,
816
- resizable: s,
817
- setIsResizing: g,
818
- setWidth: c,
816
+ resizable: o,
817
+ setIsResizing: h,
818
+ setWidth: l,
819
819
  setOpen: u,
820
- open: l,
820
+ open: c,
821
821
  minWidth: d,
822
822
  width: r,
823
823
  maxWidth: p
824
- } = V(), v = B(0), f = B(0), S = B(!1);
825
- if (!s) return null;
826
- const k = 10, R = (m) => {
827
- m.preventDefault(), g(!0), v.current = m.clientX, S.current = !l;
828
- const L = m.currentTarget.closest(
824
+ } = V(), f = D(0), g = D(0), S = D(!1);
825
+ if (!o) return null;
826
+ const k = 10, M = (b) => {
827
+ b.preventDefault(), h(!0), f.current = b.clientX, S.current = !c;
828
+ const T = b.currentTarget.closest(
829
829
  "[data-sidebar-wrapper]"
830
830
  )?.querySelector("[data-sidebar='sidebar']");
831
- f.current = L?.getBoundingClientRect().width ?? 0;
832
- const A = () => {
833
- g(!1), document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", N);
834
- }, T = (M) => {
835
- const z = i === "left" ? M.clientX - v.current : v.current - M.clientX, C = f.current + z;
831
+ g.current = T?.getBoundingClientRect().width ?? 0;
832
+ const C = () => {
833
+ h(!1), document.removeEventListener("pointermove", E), document.removeEventListener("pointerup", I);
834
+ }, E = (R) => {
835
+ const B = i === "left" ? R.clientX - f.current : f.current - R.clientX, N = g.current + B;
836
836
  if (S.current) {
837
- C >= d && (S.current = !1, u(!0), c(C));
837
+ N >= d && (S.current = !1, u(!0), l(N));
838
838
  return;
839
839
  }
840
- if (C < d) {
840
+ if (N < d) {
841
841
  u(!1), S.current = !0;
842
842
  return;
843
843
  }
844
- c(C);
845
- }, N = () => {
846
- A();
844
+ l(N);
845
+ }, I = () => {
846
+ C();
847
847
  };
848
- document.addEventListener("pointermove", T), document.addEventListener("pointerup", N);
849
- }, h = (m) => {
850
- const y = i === "left" ? "ArrowRight" : "ArrowLeft", L = i === "left" ? "ArrowLeft" : "ArrowRight";
851
- if (m.key === y)
852
- m.preventDefault(), l ? c(Math.min(r + k, p)) : (u(!0), c(d));
853
- else if (m.key === L) {
854
- m.preventDefault();
855
- const A = r - k;
856
- A < d ? u(!1) : c(A);
857
- } else m.key === "Home" ? (m.preventDefault(), u(!1)) : m.key === "End" && (m.preventDefault(), u(!0), c(p));
848
+ document.addEventListener("pointermove", E), document.addEventListener("pointerup", I);
849
+ }, v = (b) => {
850
+ const y = i === "left" ? "ArrowRight" : "ArrowLeft", T = i === "left" ? "ArrowLeft" : "ArrowRight";
851
+ if (b.key === y)
852
+ b.preventDefault(), c ? l(Math.min(r + k, p)) : (u(!0), l(d));
853
+ else if (b.key === T) {
854
+ b.preventDefault();
855
+ const C = r - k;
856
+ C < d ? u(!1) : l(C);
857
+ } else b.key === "Home" ? (b.preventDefault(), u(!1)) : b.key === "End" && (b.preventDefault(), u(!0), l(p));
858
858
  };
859
859
  return /* @__PURE__ */ n(
860
860
  "button",
@@ -864,7 +864,7 @@ const ye = x(({ className: t, ...a }, e) => {
864
864
  "aria-label": "Resize sidebar",
865
865
  tabIndex: 0,
866
866
  "data-sidebar": "resize-handle",
867
- className: o(
867
+ className: s(
868
868
  // Hit area inside the sidebar edge; thin visual line pinned to the edge via ::after
869
869
  "absolute inset-y-0 z-2 hidden w-3 cursor-col-resize sm:block",
870
870
  "after:absolute after:inset-y-0 after:w-0.5",
@@ -875,14 +875,14 @@ const ye = x(({ className: t, ...a }, e) => {
875
875
  i === "right" && "left-0 after:left-0",
876
876
  t
877
877
  ),
878
- onPointerDown: R,
879
- onKeyDown: h,
878
+ onPointerDown: M,
879
+ onKeyDown: v,
880
880
  ...a
881
881
  }
882
882
  );
883
883
  });
884
884
  ye.displayName = "Sidebar.ResizeHandle";
885
- const G = U({
885
+ const X = G({
886
886
  contentId: "",
887
887
  isOpen: !0,
888
888
  isCollapsible: !1,
@@ -895,68 +895,68 @@ const G = U({
895
895
  open: a,
896
896
  onOpenChange: e,
897
897
  autoScrollOnOpen: i = !1,
898
- className: s,
899
- children: g,
900
- ...c
898
+ className: o,
899
+ children: h,
900
+ ...l
901
901
  }, u) => {
902
- const [l, d] = P(t), r = a ?? l, p = De(), v = B(!1), f = w(() => {
903
- const h = !r;
904
- d(h), e?.(h), v.current = !1;
902
+ const [c, d] = P(t), r = a ?? c, p = Le(), f = D(!1), g = w(() => {
903
+ const v = !r;
904
+ d(v), e?.(v), f.current = !1;
905
905
  }, [r, e]), S = Z(
906
906
  () => ({
907
907
  contentId: p,
908
908
  isOpen: r,
909
909
  isCollapsible: !0,
910
910
  autoScrollOnOpen: i,
911
- toggle: f
911
+ toggle: g
912
912
  }),
913
- [p, r, i, f]
913
+ [p, r, i, g]
914
914
  ), k = w(
915
- (h) => {
916
- !r && h.target.matches(":focus-visible") && (v.current = !0, d(!0), e?.(!0));
915
+ (v) => {
916
+ !r && v.target.matches(":focus-visible") && (f.current = !0, d(!0), e?.(!0));
917
917
  },
918
918
  [r, e]
919
- ), R = w(
920
- (h) => {
921
- v.current && !h.currentTarget.contains(h.relatedTarget) && !h.currentTarget.querySelector("[data-active]") && (v.current = !1, d(!1), e?.(!1));
919
+ ), M = w(
920
+ (v) => {
921
+ f.current && !v.currentTarget.contains(v.relatedTarget) && !v.currentTarget.querySelector("[data-active]") && (f.current = !1, d(!1), e?.(!1));
922
922
  },
923
923
  [e]
924
924
  );
925
- return /* @__PURE__ */ n(G.Provider, { value: S, children: /* @__PURE__ */ n(
925
+ return /* @__PURE__ */ n(X.Provider, { value: S, children: /* @__PURE__ */ n(
926
926
  "div",
927
927
  {
928
928
  ref: u,
929
929
  "data-open": r || void 0,
930
- className: o("min-w-0", s),
930
+ className: s("min-w-0", o),
931
931
  onFocus: k,
932
- onBlur: R,
933
- ...c,
934
- children: g
932
+ onBlur: M,
933
+ ...l,
934
+ children: h
935
935
  }
936
936
  ) });
937
937
  }
938
938
  );
939
939
  ke.displayName = "Sidebar.Collapsible";
940
940
  function Ne({ render: t }) {
941
- const { contentId: a, isOpen: e, toggle: i } = O(G);
941
+ const { contentId: a, isOpen: e, toggle: i } = L(X);
942
942
  return _.cloneElement(t, {
943
943
  "aria-expanded": e,
944
944
  "aria-controls": a,
945
945
  "data-open": e || void 0,
946
- onClick: (s) => {
947
- const g = t.props.onClick;
948
- g?.(s), i();
946
+ onClick: (o) => {
947
+ const h = t.props.onClick;
948
+ h?.(o), i();
949
949
  }
950
950
  });
951
951
  }
952
952
  Ne.displayName = "Sidebar.CollapsibleTrigger";
953
953
  const Me = x(({ className: t, children: a, ...e }, i) => {
954
- const { contentId: s, isOpen: g } = O(
955
- G
956
- ), { state: c, animationDuration: u } = V(), { autoScrollOnOpen: l } = O(G), d = B(null), r = g && c !== "collapsed";
957
- $(() => {
958
- if (!r || !l) return;
959
- const f = window.setTimeout(() => {
954
+ const { contentId: o, isOpen: h } = L(
955
+ X
956
+ ), { state: l, animationDuration: u } = V(), { autoScrollOnOpen: c } = L(X), d = D(null), r = h && l !== "collapsed";
957
+ U(() => {
958
+ if (!r || !c) return;
959
+ const g = window.setTimeout(() => {
960
960
  const S = window.matchMedia(
961
961
  "(prefers-reduced-motion: reduce)"
962
962
  ).matches;
@@ -965,27 +965,27 @@ const Me = x(({ className: t, children: a, ...e }, i) => {
965
965
  behavior: S ? "auto" : "smooth"
966
966
  });
967
967
  }, u);
968
- return () => window.clearTimeout(f);
969
- }, [r, l, u]);
968
+ return () => window.clearTimeout(g);
969
+ }, [r, c, u]);
970
970
  const p = w(
971
- (f) => {
972
- f && (r ? f.removeAttribute("inert") : f.setAttribute("inert", ""));
971
+ (g) => {
972
+ g && (r ? g.removeAttribute("inert") : g.setAttribute("inert", ""));
973
973
  },
974
974
  [r]
975
- ), v = w(
976
- (f) => {
977
- d.current = f, p(f), typeof i == "function" ? i(f) : i && (i.current = f);
975
+ ), f = w(
976
+ (g) => {
977
+ d.current = g, p(g), typeof i == "function" ? i(g) : i && (i.current = g);
978
978
  },
979
979
  [i, p]
980
980
  );
981
981
  return /* @__PURE__ */ n(
982
982
  "div",
983
983
  {
984
- ref: v,
985
- id: s,
984
+ ref: f,
985
+ id: o,
986
986
  role: "region",
987
987
  "aria-hidden": !r,
988
- className: o(
988
+ className: s(
989
989
  "grid",
990
990
  "transition-[grid-template-rows] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)",
991
991
  "motion-reduce:transition-none",
@@ -999,13 +999,13 @@ const Me = x(({ className: t, children: a, ...e }, i) => {
999
999
  });
1000
1000
  Me.displayName = "Sidebar.CollapsibleContent";
1001
1001
  function Ce({ className: t }) {
1002
- const { isOpen: a, isCollapsible: e } = O(G);
1002
+ const { isOpen: a, isCollapsible: e } = L(X);
1003
1003
  return /* @__PURE__ */ n(
1004
1004
  Be,
1005
1005
  {
1006
1006
  size: 12,
1007
1007
  weight: "bold",
1008
- className: o(
1008
+ className: s(
1009
1009
  "ml-auto shrink-0 opacity-40 group-hover/menu-button:opacity-100 transition-[transform,rotate,opacity] duration-200",
1010
1010
  e && a && "rotate-90",
1011
1011
  // Hidden when sidebar is collapsed
@@ -1016,34 +1016,34 @@ function Ce({ className: t }) {
1016
1016
  );
1017
1017
  }
1018
1018
  Ce.displayName = "Sidebar.MenuChevron";
1019
- const Ie = U(""), Re = x(
1019
+ const Ie = G(""), Re = x(
1020
1020
  ({
1021
1021
  activeKey: t,
1022
1022
  direction: a = "left",
1023
1023
  className: e,
1024
1024
  children: i,
1025
- ...s
1026
- }, g) => {
1025
+ ...o
1026
+ }, h) => {
1027
1027
  const u = _.Children.toArray(i).findIndex(
1028
1028
  (r) => _.isValidElement(r) && r.props.value === t
1029
- ), l = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, d = u > 0 ? `-${u * 100}%` : "0%";
1029
+ ), c = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches, d = u > 0 ? `-${u * 100}%` : "0%";
1030
1030
  return /* @__PURE__ */ n(Ie.Provider, { value: t, children: /* @__PURE__ */ n(
1031
1031
  "div",
1032
1032
  {
1033
- ref: g,
1033
+ ref: h,
1034
1034
  "data-sidebar": "sliding-views",
1035
- className: o(
1035
+ className: s(
1036
1036
  "flex flex-1 min-h-0 max-w-(--sidebar-width) overflow-hidden",
1037
1037
  e
1038
1038
  ),
1039
- ...s,
1039
+ ...o,
1040
1040
  children: /* @__PURE__ */ n(
1041
1041
  "div",
1042
1042
  {
1043
1043
  className: "flex min-h-0 w-full shrink-0",
1044
1044
  style: {
1045
1045
  transform: `translateX(${d})`,
1046
- transition: l ? "none" : "transform var(--sidebar-animation-duration) var(--sidebar-easing)"
1046
+ transition: c ? "none" : "transform var(--sidebar-animation-duration) var(--sidebar-easing)"
1047
1047
  },
1048
1048
  children: i
1049
1049
  }
@@ -1054,28 +1054,28 @@ const Ie = U(""), Re = x(
1054
1054
  );
1055
1055
  Re.displayName = "Sidebar.SlidingViews";
1056
1056
  const Ae = x(
1057
- ({ value: t, className: a, children: e, ...i }, s) => {
1058
- const c = O(Ie) === t, u = w(
1057
+ ({ value: t, className: a, children: e, ...i }, o) => {
1058
+ const l = L(Ie) === t, u = w(
1059
1059
  (d) => {
1060
- d && (c ? d.removeAttribute("inert") : d.setAttribute("inert", ""));
1060
+ d && (l ? d.removeAttribute("inert") : d.setAttribute("inert", ""));
1061
1061
  },
1062
- [c]
1063
- ), l = w(
1062
+ [l]
1063
+ ), c = w(
1064
1064
  (d) => {
1065
- u(d), typeof s == "function" ? s(d) : s && (s.current = d);
1065
+ u(d), typeof o == "function" ? o(d) : o && (o.current = d);
1066
1066
  },
1067
- [s, u]
1067
+ [o, u]
1068
1068
  );
1069
1069
  return /* @__PURE__ */ n(
1070
1070
  "div",
1071
1071
  {
1072
- ref: l,
1072
+ ref: c,
1073
1073
  "data-sidebar": "sliding-view",
1074
1074
  "data-value": t,
1075
- "aria-hidden": !c,
1076
- className: o(
1075
+ "aria-hidden": !l,
1076
+ className: s(
1077
1077
  "flex w-full shrink-0 flex-col min-h-0",
1078
- !c && "pointer-events-none",
1078
+ !l && "pointer-events-none",
1079
1079
  a
1080
1080
  ),
1081
1081
  ...i,
@@ -1141,4 +1141,4 @@ export {
1141
1141
  V as y,
1142
1142
  J as z
1143
1143
  };
1144
- //# sourceMappingURL=sidebar-ctd980heycmxsux1.js.map
1144
+ //# sourceMappingURL=sidebar-7whsl7qwrw5b6ip8.js.map