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