laif-ds 0.1.35 → 0.1.36

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 (83) hide show
  1. package/dist/_virtual/index.js +5 -2
  2. package/dist/_virtual/index3.js +2 -7
  3. package/dist/_virtual/index4.js +2 -5
  4. package/dist/_virtual/index5.js +4 -4
  5. package/dist/_virtual/index6.js +5 -2
  6. package/dist/_virtual/index7.js +5 -2
  7. package/dist/_virtual/index8.js +5 -0
  8. package/dist/_virtual/index9.js +5 -0
  9. package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
  10. package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
  11. package/dist/components/ui/checkbox.js +12 -12
  12. package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
  13. package/dist/components/ui/message-input.js +1 -1
  14. package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
  15. package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
  16. package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
  17. package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
  18. package/dist/index.d.ts +29 -3
  19. package/dist/index.js +1 -1
  20. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
  21. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
  22. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
  23. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
  24. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
  25. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
  26. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
  27. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
  28. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
  29. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
  30. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
  31. package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
  32. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
  33. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
  34. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
  35. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
  36. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
  37. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
  38. package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
  39. package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
  40. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
  41. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
  42. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
  43. package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
  44. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
  45. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
  46. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
  47. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
  48. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
  49. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
  50. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
  51. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
  52. package/dist/node_modules/classnames/index.js +1 -1
  53. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  54. package/dist/node_modules/property-information/lib/html.js +9 -9
  55. package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
  56. package/dist/node_modules/react-is/index.js +1 -1
  57. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
  58. package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
  59. package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
  60. package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
  61. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  62. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
  63. package/dist/node_modules/unified/lib/index.js +1 -1
  64. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
  65. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
  66. package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
  67. package/dist/styles.css +1 -1
  68. package/package.json +2 -1
  69. package/dist/components/ui/data-cross-table.js +0 -216
  70. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
  71. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
  72. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
  73. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
  74. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
  75. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
  76. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
  77. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
  78. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
  79. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  80. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
  81. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
  82. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  83. package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
@@ -30,29 +30,29 @@ var Q = ["Enter", " "], mt = ["ArrowDown", "PageUp", "Home"], _e = ["ArrowUp", "
30
30
  ve,
31
31
  ge
32
32
  ]), K = ve(), Re = ge(), [Se, E] = I(L), [gt, G] = I(L), Pe = (e) => {
33
- const { __scopeMenu: n, open: t = !1, children: o, dir: s, onOpenChange: c, modal: l = !0 } = e, m = K(n), [p, M] = r.useState(null), d = r.useRef(!1), a = ee(c), f = Qe(s);
33
+ const { __scopeMenu: n, open: t = !1, children: o, dir: s, onOpenChange: a, modal: l = !0 } = e, p = K(n), [M, m] = r.useState(null), f = r.useRef(!1), c = ee(a), d = Qe(s);
34
34
  return r.useEffect(() => {
35
35
  const C = () => {
36
- d.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
37
- }, v = () => d.current = !1;
36
+ f.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
37
+ }, v = () => f.current = !1;
38
38
  return document.addEventListener("keydown", C, { capture: !0 }), () => {
39
39
  document.removeEventListener("keydown", C, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
40
40
  };
41
- }, []), /* @__PURE__ */ u(Ce, { ...m, children: /* @__PURE__ */ u(
41
+ }, []), /* @__PURE__ */ u(Ce, { ...p, children: /* @__PURE__ */ u(
42
42
  Se,
43
43
  {
44
44
  scope: n,
45
45
  open: t,
46
- onOpenChange: a,
47
- content: p,
48
- onContentChange: M,
46
+ onOpenChange: c,
47
+ content: M,
48
+ onContentChange: m,
49
49
  children: /* @__PURE__ */ u(
50
50
  gt,
51
51
  {
52
52
  scope: n,
53
- onClose: r.useCallback(() => a(!1), [a]),
54
- isUsingKeyboardRef: d,
55
- dir: f,
53
+ onClose: r.useCallback(() => c(!1), [c]),
54
+ isUsingKeyboardRef: f,
55
+ dir: d,
56
56
  modal: l,
57
57
  children: o
58
58
  }
@@ -71,21 +71,21 @@ te.displayName = _t;
71
71
  var ne = "MenuPortal", [Rt, Ee] = I(ne, {
72
72
  forceMount: void 0
73
73
  }), we = (e) => {
74
- const { __scopeMenu: n, forceMount: t, children: o, container: s } = e, c = E(ne, n);
75
- return /* @__PURE__ */ u(Rt, { scope: n, forceMount: t, children: /* @__PURE__ */ u(W, { present: t || c.open, children: /* @__PURE__ */ u(at, { asChild: !0, container: s, children: o }) }) });
74
+ const { __scopeMenu: n, forceMount: t, children: o, container: s } = e, a = E(ne, n);
75
+ return /* @__PURE__ */ u(Rt, { scope: n, forceMount: t, children: /* @__PURE__ */ u(W, { present: t || a.open, children: /* @__PURE__ */ u(at, { asChild: !0, container: s, children: o }) }) });
76
76
  };
77
77
  we.displayName = ne;
78
78
  var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
79
79
  (e, n) => {
80
- const t = Ee(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, c = E(_, e.__scopeMenu), l = G(_, e.__scopeMenu);
81
- return /* @__PURE__ */ u(D.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(W, { present: o || c.open, children: /* @__PURE__ */ u(D.Slot, { scope: e.__scopeMenu, children: l.modal ? /* @__PURE__ */ u(Pt, { ...s, ref: n }) : /* @__PURE__ */ u(Et, { ...s, ref: n }) }) }) });
80
+ const t = Ee(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, a = E(_, e.__scopeMenu), l = G(_, e.__scopeMenu);
81
+ return /* @__PURE__ */ u(D.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(W, { present: o || a.open, children: /* @__PURE__ */ u(D.Slot, { scope: e.__scopeMenu, children: l.modal ? /* @__PURE__ */ u(Pt, { ...s, ref: n }) : /* @__PURE__ */ u(Et, { ...s, ref: n }) }) }) });
82
82
  }
83
83
  ), Pt = r.forwardRef(
84
84
  (e, n) => {
85
85
  const t = E(_, e.__scopeMenu), o = r.useRef(null), s = N(n, o);
86
86
  return r.useEffect(() => {
87
- const c = o.current;
88
- if (c) return dt(c);
87
+ const a = o.current;
88
+ if (a) return dt(a);
89
89
  }, []), /* @__PURE__ */ u(
90
90
  re,
91
91
  {
@@ -96,7 +96,7 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
96
96
  disableOutsideScroll: !0,
97
97
  onFocusOutside: h(
98
98
  e.onFocusOutside,
99
- (c) => c.preventDefault(),
99
+ (a) => a.preventDefault(),
100
100
  { checkForDefaultPrevented: !1 }
101
101
  ),
102
102
  onDismiss: () => t.onOpenChange(!1)
@@ -122,18 +122,18 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
122
122
  __scopeMenu: t,
123
123
  loop: o = !1,
124
124
  trapFocus: s,
125
- onOpenAutoFocus: c,
125
+ onOpenAutoFocus: a,
126
126
  onCloseAutoFocus: l,
127
- disableOutsidePointerEvents: m,
128
- onEntryFocus: p,
129
- onEscapeKeyDown: M,
130
- onPointerDownOutside: d,
131
- onFocusOutside: a,
132
- onInteractOutside: f,
127
+ disableOutsidePointerEvents: p,
128
+ onEntryFocus: M,
129
+ onEscapeKeyDown: m,
130
+ onPointerDownOutside: f,
131
+ onFocusOutside: c,
132
+ onInteractOutside: d,
133
133
  onDismiss: C,
134
134
  disableOutsideScroll: v,
135
135
  ...w
136
- } = e, y = E(_, t), T = G(_, t), U = K(t), B = Re(t), ie = vt(t), [Xe, le] = r.useState(null), V = r.useRef(null), He = N(n, V, y.onContentChange), Y = r.useRef(0), X = r.useRef(""), je = r.useRef(0), Z = r.useRef(null), de = r.useRef("right"), $ = r.useRef(0), We = v ? ft : r.Fragment, ze = v ? { as: wt, allowPinchZoom: !0 } : void 0, Ze = (i) => {
136
+ } = e, y = E(_, t), T = G(_, t), U = K(t), B = Re(t), ie = vt(t), [Xe, le] = r.useState(null), V = r.useRef(null), je = N(n, V, y.onContentChange), Y = r.useRef(0), X = r.useRef(""), He = r.useRef(0), Z = r.useRef(null), de = r.useRef("right"), $ = r.useRef(0), We = v ? ft : r.Fragment, ze = v ? { as: wt, allowPinchZoom: !0 } : void 0, Ze = (i) => {
137
137
  var b, me;
138
138
  const g = X.current + i, R = ie().filter((S) => !S.disabled), P = document.activeElement, q = (b = R.find((S) => S.ref.current === P)) == null ? void 0 : b.textValue, J = R.map((S) => S.textValue), fe = Lt(J, g, q), A = (me = R.find((S) => S.textValue === fe)) == null ? void 0 : me.ref.current;
139
139
  (function S(pe) {
@@ -169,7 +169,7 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
169
169
  },
170
170
  [x]
171
171
  ),
172
- pointerGraceTimerRef: je,
172
+ pointerGraceTimerRef: He,
173
173
  onPointerGraceIntentChange: r.useCallback((i) => {
174
174
  Z.current = i;
175
175
  }, []),
@@ -178,7 +178,7 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
178
178
  {
179
179
  asChild: !0,
180
180
  trapped: s,
181
- onMountAutoFocus: h(c, (i) => {
181
+ onMountAutoFocus: h(a, (i) => {
182
182
  var g;
183
183
  i.preventDefault(), (g = V.current) == null || g.focus({ preventScroll: !0 });
184
184
  }),
@@ -187,11 +187,11 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
187
187
  et,
188
188
  {
189
189
  asChild: !0,
190
- disableOutsidePointerEvents: m,
191
- onEscapeKeyDown: M,
192
- onPointerDownOutside: d,
193
- onFocusOutside: a,
194
- onInteractOutside: f,
190
+ disableOutsidePointerEvents: p,
191
+ onEscapeKeyDown: m,
192
+ onPointerDownOutside: f,
193
+ onFocusOutside: c,
194
+ onInteractOutside: d,
195
195
  onDismiss: C,
196
196
  children: /* @__PURE__ */ u(
197
197
  it,
@@ -203,7 +203,7 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
203
203
  loop: o,
204
204
  currentTabStopId: Xe,
205
205
  onCurrentTabStopIdChange: le,
206
- onEntryFocus: h(p, (i) => {
206
+ onEntryFocus: h(M, (i) => {
207
207
  T.isUsingKeyboardRef.current || i.preventDefault();
208
208
  }),
209
209
  preventScrollOnEntryFocus: !0,
@@ -217,7 +217,7 @@ var _ = "MenuContent", [St, oe] = I(_), Ie = r.forwardRef(
217
217
  dir: T.dir,
218
218
  ...U,
219
219
  ...w,
220
- ref: He,
220
+ ref: je,
221
221
  style: { outline: "none", ...w.style },
222
222
  onKeyDown: h(w.onKeyDown, (i) => {
223
223
  const R = i.target.closest("[data-radix-menu-content]") === i.currentTarget, P = i.ctrlKey || i.altKey || i.metaKey, q = i.key.length === 1;
@@ -268,60 +268,60 @@ var yt = "MenuLabel", ye = r.forwardRef(
268
268
  }
269
269
  );
270
270
  ye.displayName = yt;
271
- var H = "MenuItem", he = "menu.itemSelect", z = r.forwardRef(
271
+ var j = "MenuItem", he = "menu.itemSelect", z = r.forwardRef(
272
272
  (e, n) => {
273
- const { disabled: t = !1, onSelect: o, ...s } = e, c = r.useRef(null), l = G(H, e.__scopeMenu), m = oe(H, e.__scopeMenu), p = N(n, c), M = r.useRef(!1), d = () => {
274
- const a = c.current;
275
- if (!t && a) {
276
- const f = new CustomEvent(he, { bubbles: !0, cancelable: !0 });
277
- a.addEventListener(he, (C) => o == null ? void 0 : o(C), { once: !0 }), st(a, f), f.defaultPrevented ? M.current = !1 : l.onClose();
273
+ const { disabled: t = !1, onSelect: o, ...s } = e, a = r.useRef(null), l = G(j, e.__scopeMenu), p = oe(j, e.__scopeMenu), M = N(n, a), m = r.useRef(!1), f = () => {
274
+ const c = a.current;
275
+ if (!t && c) {
276
+ const d = new CustomEvent(he, { bubbles: !0, cancelable: !0 });
277
+ c.addEventListener(he, (C) => o == null ? void 0 : o(C), { once: !0 }), st(c, d), d.defaultPrevented ? m.current = !1 : l.onClose();
278
278
  }
279
279
  };
280
280
  return /* @__PURE__ */ u(
281
281
  xe,
282
282
  {
283
283
  ...s,
284
- ref: p,
284
+ ref: M,
285
285
  disabled: t,
286
- onClick: h(e.onClick, d),
287
- onPointerDown: (a) => {
288
- var f;
289
- (f = e.onPointerDown) == null || f.call(e, a), M.current = !0;
286
+ onClick: h(e.onClick, f),
287
+ onPointerDown: (c) => {
288
+ var d;
289
+ (d = e.onPointerDown) == null || d.call(e, c), m.current = !0;
290
290
  },
291
- onPointerUp: h(e.onPointerUp, (a) => {
292
- var f;
293
- M.current || (f = a.currentTarget) == null || f.click();
291
+ onPointerUp: h(e.onPointerUp, (c) => {
292
+ var d;
293
+ m.current || (d = c.currentTarget) == null || d.click();
294
294
  }),
295
- onKeyDown: h(e.onKeyDown, (a) => {
296
- const f = m.searchRef.current !== "";
297
- t || f && a.key === " " || Q.includes(a.key) && (a.currentTarget.click(), a.preventDefault());
295
+ onKeyDown: h(e.onKeyDown, (c) => {
296
+ const d = p.searchRef.current !== "";
297
+ t || d && c.key === " " || Q.includes(c.key) && (c.currentTarget.click(), c.preventDefault());
298
298
  })
299
299
  }
300
300
  );
301
301
  }
302
302
  );
303
- z.displayName = H;
303
+ z.displayName = j;
304
304
  var xe = r.forwardRef(
305
305
  (e, n) => {
306
- const { __scopeMenu: t, disabled: o = !1, textValue: s, ...c } = e, l = oe(H, t), m = Re(t), p = r.useRef(null), M = N(n, p), [d, a] = r.useState(!1), [f, C] = r.useState("");
306
+ const { __scopeMenu: t, disabled: o = !1, textValue: s, ...a } = e, l = oe(j, t), p = Re(t), M = r.useRef(null), m = N(n, M), [f, c] = r.useState(!1), [d, C] = r.useState("");
307
307
  return r.useEffect(() => {
308
- const v = p.current;
308
+ const v = M.current;
309
309
  v && C((v.textContent ?? "").trim());
310
- }, [c.children]), /* @__PURE__ */ u(
310
+ }, [a.children]), /* @__PURE__ */ u(
311
311
  D.ItemSlot,
312
312
  {
313
313
  scope: t,
314
314
  disabled: o,
315
- textValue: s ?? f,
316
- children: /* @__PURE__ */ u(ut, { asChild: !0, ...m, focusable: !o, children: /* @__PURE__ */ u(
315
+ textValue: s ?? d,
316
+ children: /* @__PURE__ */ u(ut, { asChild: !0, ...p, focusable: !o, children: /* @__PURE__ */ u(
317
317
  F.div,
318
318
  {
319
319
  role: "menuitem",
320
- "data-highlighted": d ? "" : void 0,
320
+ "data-highlighted": f ? "" : void 0,
321
321
  "aria-disabled": o || void 0,
322
322
  "data-disabled": o ? "" : void 0,
323
- ...c,
324
- ref: M,
323
+ ...a,
324
+ ref: m,
325
325
  onPointerMove: h(
326
326
  e.onPointerMove,
327
327
  k((v) => {
@@ -332,8 +332,8 @@ var xe = r.forwardRef(
332
332
  e.onPointerLeave,
333
333
  k((v) => l.onItemLeave(v))
334
334
  ),
335
- onFocus: h(e.onFocus, () => a(!0)),
336
- onBlur: h(e.onBlur, () => a(!1))
335
+ onFocus: h(e.onFocus, () => c(!0)),
336
+ onBlur: h(e.onBlur, () => c(!1))
337
337
  }
338
338
  ) })
339
339
  }
@@ -346,13 +346,13 @@ var xe = r.forwardRef(
346
346
  z,
347
347
  {
348
348
  role: "menuitemcheckbox",
349
- "aria-checked": j(t) ? "mixed" : t,
349
+ "aria-checked": H(t) ? "mixed" : t,
350
350
  ...s,
351
351
  ref: n,
352
352
  "data-state": ue(t),
353
353
  onSelect: h(
354
354
  s.onSelect,
355
- () => o == null ? void 0 : o(j(t) ? !0 : !t),
355
+ () => o == null ? void 0 : o(H(t) ? !0 : !t),
356
356
  { checkForDefaultPrevented: !1 }
357
357
  )
358
358
  }
@@ -366,22 +366,22 @@ var Te = "MenuRadioGroup", [bt, Tt] = I(
366
366
  } }
367
367
  ), Ae = r.forwardRef(
368
368
  (e, n) => {
369
- const { value: t, onValueChange: o, ...s } = e, c = ee(o);
370
- return /* @__PURE__ */ u(bt, { scope: e.__scopeMenu, value: t, onValueChange: c, children: /* @__PURE__ */ u(ce, { ...s, ref: n }) });
369
+ const { value: t, onValueChange: o, ...s } = e, a = ee(o);
370
+ return /* @__PURE__ */ u(bt, { scope: e.__scopeMenu, value: t, onValueChange: a, children: /* @__PURE__ */ u(ce, { ...s, ref: n }) });
371
371
  }
372
372
  );
373
373
  Ae.displayName = Te;
374
374
  var Oe = "MenuRadioItem", De = r.forwardRef(
375
375
  (e, n) => {
376
- const { value: t, ...o } = e, s = Tt(Oe, e.__scopeMenu), c = t === s.value;
377
- return /* @__PURE__ */ u(ke, { scope: e.__scopeMenu, checked: c, children: /* @__PURE__ */ u(
376
+ const { value: t, ...o } = e, s = Tt(Oe, e.__scopeMenu), a = t === s.value;
377
+ return /* @__PURE__ */ u(ke, { scope: e.__scopeMenu, checked: a, children: /* @__PURE__ */ u(
378
378
  z,
379
379
  {
380
380
  role: "menuitemradio",
381
- "aria-checked": c,
381
+ "aria-checked": a,
382
382
  ...o,
383
383
  ref: n,
384
- "data-state": ue(c),
384
+ "data-state": ue(a),
385
385
  onSelect: h(
386
386
  o.onSelect,
387
387
  () => {
@@ -400,17 +400,17 @@ var ae = "MenuItemIndicator", [ke, At] = I(
400
400
  { checked: !1 }
401
401
  ), Ne = r.forwardRef(
402
402
  (e, n) => {
403
- const { __scopeMenu: t, forceMount: o, ...s } = e, c = At(ae, t);
403
+ const { __scopeMenu: t, forceMount: o, ...s } = e, a = At(ae, t);
404
404
  return /* @__PURE__ */ u(
405
405
  W,
406
406
  {
407
- present: o || j(c.checked) || c.checked === !0,
407
+ present: o || H(a.checked) || a.checked === !0,
408
408
  children: /* @__PURE__ */ u(
409
409
  F.span,
410
410
  {
411
411
  ...s,
412
412
  ref: n,
413
- "data-state": ue(c.checked)
413
+ "data-state": ue(a.checked)
414
414
  }
415
415
  )
416
416
  }
@@ -441,23 +441,23 @@ var Dt = "MenuArrow", Le = r.forwardRef(
441
441
  );
442
442
  Le.displayName = Dt;
443
443
  var se = "MenuSub", [kt, Ke] = I(se), Ge = (e) => {
444
- const { __scopeMenu: n, children: t, open: o = !1, onOpenChange: s } = e, c = E(se, n), l = K(n), [m, p] = r.useState(null), [M, d] = r.useState(null), a = ee(s);
445
- return r.useEffect(() => (c.open === !1 && a(!1), () => a(!1)), [c.open, a]), /* @__PURE__ */ u(Ce, { ...l, children: /* @__PURE__ */ u(
444
+ const { __scopeMenu: n, children: t, open: o = !1, onOpenChange: s } = e, a = E(se, n), l = K(n), [p, M] = r.useState(null), [m, f] = r.useState(null), c = ee(s);
445
+ return r.useEffect(() => (a.open === !1 && c(!1), () => c(!1)), [a.open, c]), /* @__PURE__ */ u(Ce, { ...l, children: /* @__PURE__ */ u(
446
446
  Se,
447
447
  {
448
448
  scope: n,
449
449
  open: o,
450
- onOpenChange: a,
451
- content: M,
452
- onContentChange: d,
450
+ onOpenChange: c,
451
+ content: m,
452
+ onContentChange: f,
453
453
  children: /* @__PURE__ */ u(
454
454
  kt,
455
455
  {
456
456
  scope: n,
457
457
  contentId: Me(),
458
458
  triggerId: Me(),
459
- trigger: m,
460
- onTriggerChange: p,
459
+ trigger: p,
460
+ onTriggerChange: M,
461
461
  children: t
462
462
  }
463
463
  )
@@ -467,15 +467,15 @@ var se = "MenuSub", [kt, Ke] = I(se), Ge = (e) => {
467
467
  Ge.displayName = se;
468
468
  var O = "MenuSubTrigger", Ue = r.forwardRef(
469
469
  (e, n) => {
470
- const t = E(O, e.__scopeMenu), o = G(O, e.__scopeMenu), s = Ke(O, e.__scopeMenu), c = oe(O, e.__scopeMenu), l = r.useRef(null), { pointerGraceTimerRef: m, onPointerGraceIntentChange: p } = c, M = { __scopeMenu: e.__scopeMenu }, d = r.useCallback(() => {
470
+ const t = E(O, e.__scopeMenu), o = G(O, e.__scopeMenu), s = Ke(O, e.__scopeMenu), a = oe(O, e.__scopeMenu), l = r.useRef(null), { pointerGraceTimerRef: p, onPointerGraceIntentChange: M } = a, m = { __scopeMenu: e.__scopeMenu }, f = r.useCallback(() => {
471
471
  l.current && window.clearTimeout(l.current), l.current = null;
472
472
  }, []);
473
- return r.useEffect(() => d, [d]), r.useEffect(() => {
474
- const a = m.current;
473
+ return r.useEffect(() => f, [f]), r.useEffect(() => {
474
+ const c = p.current;
475
475
  return () => {
476
- window.clearTimeout(a), p(null);
476
+ window.clearTimeout(c), M(null);
477
477
  };
478
- }, [m, p]), /* @__PURE__ */ u(te, { asChild: !0, ...M, children: /* @__PURE__ */ u(
478
+ }, [p, M]), /* @__PURE__ */ u(te, { asChild: !0, ...m, children: /* @__PURE__ */ u(
479
479
  xe,
480
480
  {
481
481
  id: s.triggerId,
@@ -485,51 +485,51 @@ var O = "MenuSubTrigger", Ue = r.forwardRef(
485
485
  "data-state": Ye(t.open),
486
486
  ...e,
487
487
  ref: qe(n, s.onTriggerChange),
488
- onClick: (a) => {
489
- var f;
490
- (f = e.onClick) == null || f.call(e, a), !(e.disabled || a.defaultPrevented) && (a.currentTarget.focus(), t.open || t.onOpenChange(!0));
488
+ onClick: (c) => {
489
+ var d;
490
+ (d = e.onClick) == null || d.call(e, c), !(e.disabled || c.defaultPrevented) && (c.currentTarget.focus(), t.open || t.onOpenChange(!0));
491
491
  },
492
492
  onPointerMove: h(
493
493
  e.onPointerMove,
494
- k((a) => {
495
- c.onItemEnter(a), !a.defaultPrevented && !e.disabled && !t.open && !l.current && (c.onPointerGraceIntentChange(null), l.current = window.setTimeout(() => {
496
- t.onOpenChange(!0), d();
494
+ k((c) => {
495
+ a.onItemEnter(c), !c.defaultPrevented && !e.disabled && !t.open && !l.current && (a.onPointerGraceIntentChange(null), l.current = window.setTimeout(() => {
496
+ t.onOpenChange(!0), f();
497
497
  }, 100));
498
498
  })
499
499
  ),
500
500
  onPointerLeave: h(
501
501
  e.onPointerLeave,
502
- k((a) => {
502
+ k((c) => {
503
503
  var C, v;
504
- d();
505
- const f = (C = t.content) == null ? void 0 : C.getBoundingClientRect();
506
- if (f) {
507
- const w = (v = t.content) == null ? void 0 : v.dataset.side, y = w === "right", T = y ? -5 : 5, U = f[y ? "left" : "right"], B = f[y ? "right" : "left"];
508
- c.onPointerGraceIntentChange({
504
+ f();
505
+ const d = (C = t.content) == null ? void 0 : C.getBoundingClientRect();
506
+ if (d) {
507
+ const w = (v = t.content) == null ? void 0 : v.dataset.side, y = w === "right", T = y ? -5 : 5, U = d[y ? "left" : "right"], B = d[y ? "right" : "left"];
508
+ a.onPointerGraceIntentChange({
509
509
  area: [
510
510
  // Apply a bleed on clientX to ensure that our exit point is
511
511
  // consistently within polygon bounds
512
- { x: a.clientX + T, y: a.clientY },
513
- { x: U, y: f.top },
514
- { x: B, y: f.top },
515
- { x: B, y: f.bottom },
516
- { x: U, y: f.bottom }
512
+ { x: c.clientX + T, y: c.clientY },
513
+ { x: U, y: d.top },
514
+ { x: B, y: d.top },
515
+ { x: B, y: d.bottom },
516
+ { x: U, y: d.bottom }
517
517
  ],
518
518
  side: w
519
- }), window.clearTimeout(m.current), m.current = window.setTimeout(
520
- () => c.onPointerGraceIntentChange(null),
519
+ }), window.clearTimeout(p.current), p.current = window.setTimeout(
520
+ () => a.onPointerGraceIntentChange(null),
521
521
  300
522
522
  );
523
523
  } else {
524
- if (c.onTriggerLeave(a), a.defaultPrevented) return;
525
- c.onPointerGraceIntentChange(null);
524
+ if (a.onTriggerLeave(c), c.defaultPrevented) return;
525
+ a.onPointerGraceIntentChange(null);
526
526
  }
527
527
  })
528
528
  ),
529
- onKeyDown: h(e.onKeyDown, (a) => {
529
+ onKeyDown: h(e.onKeyDown, (c) => {
530
530
  var C;
531
- const f = c.searchRef.current !== "";
532
- e.disabled || f && a.key === " " || Mt[o.dir].includes(a.key) && (t.onOpenChange(!0), (C = t.content) == null || C.focus(), a.preventDefault());
531
+ const d = a.searchRef.current !== "";
532
+ e.disabled || d && c.key === " " || Mt[o.dir].includes(c.key) && (t.onOpenChange(!0), (C = t.content) == null || C.focus(), c.preventDefault());
533
533
  })
534
534
  }
535
535
  ) });
@@ -538,34 +538,34 @@ var O = "MenuSubTrigger", Ue = r.forwardRef(
538
538
  Ue.displayName = O;
539
539
  var Be = "MenuSubContent", Ve = r.forwardRef(
540
540
  (e, n) => {
541
- const t = Ee(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, c = E(_, e.__scopeMenu), l = G(_, e.__scopeMenu), m = Ke(Be, e.__scopeMenu), p = r.useRef(null), M = N(n, p);
542
- return /* @__PURE__ */ u(D.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(W, { present: o || c.open, children: /* @__PURE__ */ u(D.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(
541
+ const t = Ee(_, e.__scopeMenu), { forceMount: o = t.forceMount, ...s } = e, a = E(_, e.__scopeMenu), l = G(_, e.__scopeMenu), p = Ke(Be, e.__scopeMenu), M = r.useRef(null), m = N(n, M);
542
+ return /* @__PURE__ */ u(D.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(W, { present: o || a.open, children: /* @__PURE__ */ u(D.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ u(
543
543
  re,
544
544
  {
545
- id: m.contentId,
546
- "aria-labelledby": m.triggerId,
545
+ id: p.contentId,
546
+ "aria-labelledby": p.triggerId,
547
547
  ...s,
548
- ref: M,
548
+ ref: m,
549
549
  align: "start",
550
550
  side: l.dir === "rtl" ? "left" : "right",
551
551
  disableOutsidePointerEvents: !1,
552
552
  disableOutsideScroll: !1,
553
553
  trapFocus: !1,
554
- onOpenAutoFocus: (d) => {
555
- var a;
556
- l.isUsingKeyboardRef.current && ((a = p.current) == null || a.focus()), d.preventDefault();
554
+ onOpenAutoFocus: (f) => {
555
+ var c;
556
+ l.isUsingKeyboardRef.current && ((c = M.current) == null || c.focus()), f.preventDefault();
557
557
  },
558
- onCloseAutoFocus: (d) => d.preventDefault(),
559
- onFocusOutside: h(e.onFocusOutside, (d) => {
560
- d.target !== m.trigger && c.onOpenChange(!1);
558
+ onCloseAutoFocus: (f) => f.preventDefault(),
559
+ onFocusOutside: h(e.onFocusOutside, (f) => {
560
+ f.target !== p.trigger && a.onOpenChange(!1);
561
561
  }),
562
- onEscapeKeyDown: h(e.onEscapeKeyDown, (d) => {
563
- l.onClose(), d.preventDefault();
562
+ onEscapeKeyDown: h(e.onEscapeKeyDown, (f) => {
563
+ l.onClose(), f.preventDefault();
564
564
  }),
565
- onKeyDown: h(e.onKeyDown, (d) => {
565
+ onKeyDown: h(e.onKeyDown, (f) => {
566
566
  var C;
567
- const a = d.currentTarget.contains(d.target), f = ht[l.dir].includes(d.key);
568
- a && f && (c.onOpenChange(!1), (C = m.trigger) == null || C.focus(), d.preventDefault());
567
+ const c = f.currentTarget.contains(f.target), d = ht[l.dir].includes(f.key);
568
+ c && d && (a.onOpenChange(!1), (C = p.trigger) == null || C.focus(), f.preventDefault());
569
569
  })
570
570
  }
571
571
  ) }) }) });
@@ -575,11 +575,11 @@ Ve.displayName = Be;
575
575
  function Ye(e) {
576
576
  return e ? "open" : "closed";
577
577
  }
578
- function j(e) {
578
+ function H(e) {
579
579
  return e === "indeterminate";
580
580
  }
581
581
  function ue(e) {
582
- return j(e) ? "indeterminate" : e ? "checked" : "unchecked";
582
+ return H(e) ? "indeterminate" : e ? "checked" : "unchecked";
583
583
  }
584
584
  function Nt(e) {
585
585
  const n = document.activeElement;
@@ -590,20 +590,20 @@ function Ft(e, n) {
590
590
  return e.map((t, o) => e[(n + o) % e.length]);
591
591
  }
592
592
  function Lt(e, n, t) {
593
- const s = n.length > 1 && Array.from(n).every((M) => M === n[0]) ? n[0] : n, c = t ? e.indexOf(t) : -1;
594
- let l = Ft(e, Math.max(c, 0));
595
- s.length === 1 && (l = l.filter((M) => M !== t));
596
- const p = l.find(
597
- (M) => M.toLowerCase().startsWith(s.toLowerCase())
593
+ const s = n.length > 1 && Array.from(n).every((m) => m === n[0]) ? n[0] : n, a = t ? e.indexOf(t) : -1;
594
+ let l = Ft(e, Math.max(a, 0));
595
+ s.length === 1 && (l = l.filter((m) => m !== t));
596
+ const M = l.find(
597
+ (m) => m.toLowerCase().startsWith(s.toLowerCase())
598
598
  );
599
- return p !== t ? p : void 0;
599
+ return M !== t ? M : void 0;
600
600
  }
601
601
  function Kt(e, n) {
602
602
  const { x: t, y: o } = e;
603
603
  let s = !1;
604
- for (let c = 0, l = n.length - 1; c < n.length; l = c++) {
605
- const m = n[c].x, p = n[c].y, M = n[l].x, d = n[l].y;
606
- p > o != d > o && t < (M - m) * (o - p) / (d - p) + m && (s = !s);
604
+ for (let a = 0, l = n.length - 1; a < n.length; l = a++) {
605
+ const p = n[a], M = n[l], m = p.x, f = p.y, c = M.x, d = M.y;
606
+ f > o != d > o && t < (c - m) * (o - f) / (d - f) + m && (s = !s);
607
607
  }
608
608
  return s;
609
609
  }