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
@@ -16,9 +16,9 @@ import { useControllableState as q } from "../../react-use-controllable-state/di
16
16
  import { hideOthers as z } from "../../../aria-hidden/dist/es2015/index.js";
17
17
  import B from "../../../react-remove-scroll/dist/es2015/Combination.js";
18
18
  import { jsx as p } from "react/jsx-runtime";
19
- var R = "Popover", [b, Oe] = L(R, [
19
+ var C = "Popover", [b, Oe] = L(C, [
20
20
  _
21
- ]), m = _(), [J, f] = b(R), F = (e) => {
21
+ ]), m = _(), [J, f] = b(C), F = (e) => {
22
22
  const {
23
23
  __scopePopover: n,
24
24
  children: t,
@@ -26,10 +26,11 @@ var R = "Popover", [b, Oe] = L(R, [
26
26
  defaultOpen: o,
27
27
  onOpenChange: r,
28
28
  modal: s = !1
29
- } = e, c = m(n), u = i.useRef(null), [l, g] = i.useState(!1), [h = !1, d] = q({
29
+ } = e, c = m(n), u = i.useRef(null), [l, g] = i.useState(!1), [h, d] = q({
30
30
  prop: a,
31
- defaultProp: o,
32
- onChange: r
31
+ defaultProp: o ?? !1,
32
+ onChange: r,
33
+ caller: C
33
34
  });
34
35
  return /* @__PURE__ */ p(j, { ...c, children: /* @__PURE__ */ p(
35
36
  J,
@@ -39,7 +40,7 @@ var R = "Popover", [b, Oe] = L(R, [
39
40
  triggerRef: u,
40
41
  open: h,
41
42
  onOpenChange: d,
42
- onOpenToggle: i.useCallback(() => d((C) => !C), [d]),
43
+ onOpenToggle: i.useCallback(() => d((R) => !R), [d]),
43
44
  hasCustomAnchor: l,
44
45
  onCustomAnchorAdd: i.useCallback(() => g(!0), []),
45
46
  onCustomAnchorRemove: i.useCallback(() => g(!1), []),
@@ -48,7 +49,7 @@ var R = "Popover", [b, Oe] = L(R, [
48
49
  }
49
50
  ) });
50
51
  };
51
- F.displayName = R;
52
+ F.displayName = C;
52
53
  var N = "PopoverAnchor", Q = i.forwardRef(
53
54
  (e, n) => {
54
55
  const { __scopePopover: t, ...a } = e, o = f(N, t), r = m(t), { onCustomAnchorAdd: s, onCustomAnchorRemove: c } = o;
@@ -158,7 +159,7 @@ var ee = Z("PopoverContent.RemoveScroll"), oe = i.forwardRef(
158
159
  onFocusOutside: l,
159
160
  onInteractOutside: g,
160
161
  ...h
161
- } = e, d = f(v, t), C = m(t);
162
+ } = e, d = f(v, t), R = m(t);
162
163
  return H(), /* @__PURE__ */ p(
163
164
  K,
164
165
  {
@@ -183,7 +184,7 @@ var ee = Z("PopoverContent.RemoveScroll"), oe = i.forwardRef(
183
184
  "data-state": T(d.open),
184
185
  role: "dialog",
185
186
  id: d.contentId,
186
- ...C,
187
+ ...R,
187
188
  ...h,
188
189
  ref: n,
189
190
  style: {
@@ -6,12 +6,12 @@ function T(n, e) {
6
6
  return a.useReducer((r, t) => e[r][t] ?? r, n);
7
7
  }
8
8
  var R = (n) => {
9
- const { present: e, children: r } = n, t = v(e), o = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(o));
10
- return typeof r == "function" || t.isPresent ? a.cloneElement(o, { ref: c }) : null;
9
+ const { present: e, children: r } = n, t = v(e), i = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(i));
10
+ return typeof r == "function" || t.isPresent ? a.cloneElement(i, { ref: c }) : null;
11
11
  };
12
12
  R.displayName = "Presence";
13
13
  function v(n) {
14
- const [e, r] = a.useState(), t = a.useRef({}), o = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
14
+ const [e, r] = a.useState(), t = a.useRef(null), i = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
15
15
  mounted: {
16
16
  UNMOUNT: "unmounted",
17
17
  ANIMATION_OUT: "unmountSuspended"
@@ -25,22 +25,22 @@ function v(n) {
25
25
  }
26
26
  });
27
27
  return a.useEffect(() => {
28
- const i = l(t.current);
29
- c.current = N === "mounted" ? i : "none";
28
+ const o = l(t.current);
29
+ c.current = N === "mounted" ? o : "none";
30
30
  }, [N]), A(() => {
31
- const i = t.current, m = o.current;
31
+ const o = t.current, m = i.current;
32
32
  if (m !== n) {
33
- const f = c.current, u = l(i);
34
- n ? s("MOUNT") : u === "none" || (i == null ? void 0 : i.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), o.current = n;
33
+ const f = c.current, u = l(o);
34
+ n ? s("MOUNT") : u === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
35
35
  }
36
36
  }, [n, s]), A(() => {
37
37
  if (e) {
38
- let i;
38
+ let o;
39
39
  const m = e.ownerDocument.defaultView ?? window, d = (u) => {
40
40
  const g = l(t.current).includes(u.animationName);
41
- if (u.target === e && g && (s("ANIMATION_END"), !o.current)) {
41
+ if (u.target === e && g && (s("ANIMATION_END"), !i.current)) {
42
42
  const O = e.style.animationFillMode;
43
- e.style.animationFillMode = "forwards", i = m.setTimeout(() => {
43
+ e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
44
44
  e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
45
45
  });
46
46
  }
@@ -48,14 +48,14 @@ function v(n) {
48
48
  u.target === e && (c.current = l(t.current));
49
49
  };
50
50
  return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
51
- m.clearTimeout(i), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
+ m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
52
52
  };
53
53
  } else
54
54
  s("ANIMATION_END");
55
55
  }, [e, s]), {
56
56
  isPresent: ["mounted", "unmountSuspended"].includes(N),
57
- ref: a.useCallback((i) => {
58
- i && (t.current = getComputedStyle(i)), r(i);
57
+ ref: a.useCallback((o) => {
58
+ t.current = o ? getComputedStyle(o) : null, r(o);
59
59
  }, [])
60
60
  };
61
61
  }
@@ -63,9 +63,9 @@ function l(n) {
63
63
  return (n == null ? void 0 : n.animationName) || "none";
64
64
  }
65
65
  function P(n) {
66
- var t, o;
66
+ var t, i;
67
67
  let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
68
- return r ? n.ref : (e = (o = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
68
+ return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
69
69
  }
70
70
  export {
71
71
  R as Presence
@@ -1,9 +1,9 @@
1
1
  "use client";
2
- import * as f from "react";
3
- import * as p from "react-dom";
4
- import { createSlot as c } from "../../react-slot/dist/index.js";
5
- import { jsx as u } from "react/jsx-runtime";
6
- var l = [
2
+ import * as c from "react";
3
+ import * as f from "react-dom";
4
+ import { createSlot as p } from "../../react-slot/dist/index.js";
5
+ import { jsx as l } from "react/jsx-runtime";
6
+ var u = [
7
7
  "a",
8
8
  "button",
9
9
  "div",
@@ -17,18 +17,19 @@ var l = [
17
17
  "nav",
18
18
  "ol",
19
19
  "p",
20
+ "select",
20
21
  "span",
21
22
  "svg",
22
23
  "ul"
23
- ], h = l.reduce((t, i) => {
24
- const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
25
- const { asChild: s, ...a } = e, n = s ? o : i;
26
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(n, { ...a, ref: m });
24
+ ], h = u.reduce((t, i) => {
25
+ const e = p(`Primitive.${i}`), r = c.forwardRef((o, s) => {
26
+ const { asChild: m, ...a } = o, n = m ? e : i;
27
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: s });
27
28
  });
28
29
  return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
30
  }, {});
30
31
  function w(t, i) {
31
- t && p.flushSync(() => t.dispatchEvent(i));
32
+ t && f.flushSync(() => t.dispatchEvent(i));
32
33
  }
33
34
  export {
34
35
  h as Primitive,
@@ -1,160 +1,175 @@
1
1
  "use client";
2
- import * as s from "react";
3
- import { composeEventHandlers as y } from "../../primitive/dist/index.js";
4
- import { useComposedRefs as P } from "../../react-compose-refs/dist/index.js";
2
+ import * as i from "react";
3
+ import { composeEventHandlers as I } from "../../primitive/dist/index.js";
4
+ import { useComposedRefs as E } from "../../react-compose-refs/dist/index.js";
5
5
  import { createContextScope as w } from "../../react-context/dist/index.js";
6
- import { Primitive as k } from "../../react-primitive/dist/index.js";
7
- import { createRovingFocusGroupScope as E, Root as L, Item as q } from "../../react-roving-focus/dist/index.js";
6
+ import { Primitive as b } from "../../react-primitive/dist/index.js";
7
+ import { createRovingFocusGroupScope as P, Root as B, Item as q } from "../../react-roving-focus/dist/index.js";
8
8
  import { useControllableState as K } from "../../react-use-controllable-state/dist/index.js";
9
- import { useDirection as V } from "../../react-direction/dist/index.js";
10
- import { useSize as T } from "../../react-use-size/dist/index.js";
11
- import { usePrevious as j } from "../../react-use-previous/dist/index.js";
12
- import { Presence as U } from "../../react-presence/dist/index.js";
9
+ import { useDirection as T } from "../../react-direction/dist/index.js";
10
+ import { useSize as U } from "../../react-use-size/dist/index.js";
11
+ import { usePrevious as V } from "../../react-use-previous/dist/index.js";
12
+ import { Presence as j } from "../../react-presence/dist/index.js";
13
13
  import { jsx as p, jsxs as z } from "react/jsx-runtime";
14
- var C = "Radio", [B, G] = w(C), [H, W] = B(C), S = s.forwardRef(
15
- (t, c) => {
14
+ var _ = "Radio", [H, G] = w(_), [W, X] = H(_), S = i.forwardRef(
15
+ (a, d) => {
16
16
  const {
17
- __scopeRadio: e,
18
- name: n,
19
- checked: o = !1,
17
+ __scopeRadio: o,
18
+ name: s,
19
+ checked: e = !1,
20
20
  required: r,
21
- disabled: a,
22
- value: l = "on",
23
- onCheck: d,
24
- form: f,
21
+ disabled: n,
22
+ value: f = "on",
23
+ onCheck: c,
24
+ form: m,
25
25
  ...R
26
- } = t, [u, m] = s.useState(null), i = P(c, (b) => m(b)), v = s.useRef(!1), h = u ? f || !!u.closest("form") : !0;
27
- return /* @__PURE__ */ z(H, { scope: e, checked: o, disabled: a, children: [
26
+ } = a, [l, v] = i.useState(null), t = E(d, (y) => v(y)), u = i.useRef(!1), h = l ? m || !!l.closest("form") : !0;
27
+ return /* @__PURE__ */ z(W, { scope: o, checked: e, disabled: n, children: [
28
28
  /* @__PURE__ */ p(
29
- k.button,
29
+ b.button,
30
30
  {
31
31
  type: "button",
32
32
  role: "radio",
33
- "aria-checked": o,
34
- "data-state": A(o),
35
- "data-disabled": a ? "" : void 0,
36
- disabled: a,
37
- value: l,
33
+ "aria-checked": e,
34
+ "data-state": N(e),
35
+ "data-disabled": n ? "" : void 0,
36
+ disabled: n,
37
+ value: f,
38
38
  ...R,
39
- ref: i,
40
- onClick: y(t.onClick, (b) => {
41
- o || d == null || d(), h && (v.current = b.isPropagationStopped(), v.current || b.stopPropagation());
39
+ ref: t,
40
+ onClick: I(a.onClick, (y) => {
41
+ e || c == null || c(), h && (u.current = y.isPropagationStopped(), u.current || y.stopPropagation());
42
42
  })
43
43
  }
44
44
  ),
45
45
  h && /* @__PURE__ */ p(
46
- X,
46
+ A,
47
47
  {
48
- control: u,
49
- bubbles: !v.current,
50
- name: n,
51
- value: l,
52
- checked: o,
48
+ control: l,
49
+ bubbles: !u.current,
50
+ name: s,
51
+ value: f,
52
+ checked: e,
53
53
  required: r,
54
- disabled: a,
55
- form: f,
54
+ disabled: n,
55
+ form: m,
56
56
  style: { transform: "translateX(-100%)" }
57
57
  }
58
58
  )
59
59
  ] });
60
60
  }
61
61
  );
62
- S.displayName = C;
63
- var g = "RadioIndicator", _ = s.forwardRef(
64
- (t, c) => {
65
- const { __scopeRadio: e, forceMount: n, ...o } = t, r = W(g, e);
66
- return /* @__PURE__ */ p(U, { present: n || r.checked, children: /* @__PURE__ */ p(
67
- k.span,
62
+ S.displayName = _;
63
+ var g = "RadioIndicator", k = i.forwardRef(
64
+ (a, d) => {
65
+ const { __scopeRadio: o, forceMount: s, ...e } = a, r = X(g, o);
66
+ return /* @__PURE__ */ p(j, { present: s || r.checked, children: /* @__PURE__ */ p(
67
+ b.span,
68
68
  {
69
- "data-state": A(r.checked),
69
+ "data-state": N(r.checked),
70
70
  "data-disabled": r.disabled ? "" : void 0,
71
- ...o,
72
- ref: c
71
+ ...e,
72
+ ref: d
73
73
  }
74
74
  ) });
75
75
  }
76
76
  );
77
- _.displayName = g;
78
- var X = (t) => {
79
- const { control: c, checked: e, bubbles: n = !0, ...o } = t, r = s.useRef(null), a = j(e), l = T(c);
80
- return s.useEffect(() => {
81
- const d = r.current, f = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(f, "checked").set;
82
- if (a !== e && u) {
83
- const m = new Event("click", { bubbles: n });
84
- u.call(d, e), d.dispatchEvent(m);
85
- }
86
- }, [a, e, n]), /* @__PURE__ */ p(
87
- "input",
88
- {
89
- type: "radio",
90
- "aria-hidden": !0,
91
- defaultChecked: e,
92
- ...o,
93
- tabIndex: -1,
94
- ref: r,
95
- style: {
96
- ...t.style,
97
- ...l,
98
- position: "absolute",
99
- pointerEvents: "none",
100
- opacity: 0,
101
- margin: 0
77
+ k.displayName = g;
78
+ var Y = "RadioBubbleInput", A = i.forwardRef(
79
+ ({
80
+ __scopeRadio: a,
81
+ control: d,
82
+ checked: o,
83
+ bubbles: s = !0,
84
+ ...e
85
+ }, r) => {
86
+ const n = i.useRef(null), f = E(n, r), c = V(o), m = U(d);
87
+ return i.useEffect(() => {
88
+ const R = n.current;
89
+ if (!R) return;
90
+ const l = window.HTMLInputElement.prototype, t = Object.getOwnPropertyDescriptor(
91
+ l,
92
+ "checked"
93
+ ).set;
94
+ if (c !== o && t) {
95
+ const u = new Event("click", { bubbles: s });
96
+ t.call(R, o), R.dispatchEvent(u);
102
97
  }
103
- }
104
- );
105
- };
106
- function A(t) {
107
- return t ? "checked" : "unchecked";
98
+ }, [c, o, s]), /* @__PURE__ */ p(
99
+ b.input,
100
+ {
101
+ type: "radio",
102
+ "aria-hidden": !0,
103
+ defaultChecked: o,
104
+ ...e,
105
+ tabIndex: -1,
106
+ ref: f,
107
+ style: {
108
+ ...e.style,
109
+ ...m,
110
+ position: "absolute",
111
+ pointerEvents: "none",
112
+ opacity: 0,
113
+ margin: 0
114
+ }
115
+ }
116
+ );
117
+ }
118
+ );
119
+ A.displayName = Y;
120
+ function N(a) {
121
+ return a ? "checked" : "unchecked";
108
122
  }
109
- var Y = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], I = "RadioGroup", [J, pe] = w(I, [
110
- E,
123
+ var J = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], C = "RadioGroup", [Q, le] = w(C, [
124
+ P,
111
125
  G
112
- ]), N = E(), x = G(), [Q, Z] = J(I), D = s.forwardRef(
113
- (t, c) => {
126
+ ]), x = P(), D = G(), [Z, $] = Q(C), M = i.forwardRef(
127
+ (a, d) => {
114
128
  const {
115
- __scopeRadioGroup: e,
116
- name: n,
117
- defaultValue: o,
129
+ __scopeRadioGroup: o,
130
+ name: s,
131
+ defaultValue: e,
118
132
  value: r,
119
- required: a = !1,
120
- disabled: l = !1,
121
- orientation: d,
122
- dir: f,
133
+ required: n = !1,
134
+ disabled: f = !1,
135
+ orientation: c,
136
+ dir: m,
123
137
  loop: R = !0,
124
- onValueChange: u,
125
- ...m
126
- } = t, i = N(e), v = V(f), [h, b] = K({
138
+ onValueChange: l,
139
+ ...v
140
+ } = a, t = x(o), u = T(m), [h, y] = K({
127
141
  prop: r,
128
- defaultProp: o,
129
- onChange: u
142
+ defaultProp: e ?? null,
143
+ onChange: l,
144
+ caller: C
130
145
  });
131
146
  return /* @__PURE__ */ p(
132
- Q,
147
+ Z,
133
148
  {
134
- scope: e,
135
- name: n,
136
- required: a,
137
- disabled: l,
149
+ scope: o,
150
+ name: s,
151
+ required: n,
152
+ disabled: f,
138
153
  value: h,
139
- onValueChange: b,
154
+ onValueChange: y,
140
155
  children: /* @__PURE__ */ p(
141
- L,
156
+ B,
142
157
  {
143
158
  asChild: !0,
144
- ...i,
145
- orientation: d,
146
- dir: v,
159
+ ...t,
160
+ orientation: c,
161
+ dir: u,
147
162
  loop: R,
148
163
  children: /* @__PURE__ */ p(
149
- k.div,
164
+ b.div,
150
165
  {
151
166
  role: "radiogroup",
152
- "aria-required": a,
153
- "aria-orientation": d,
154
- "data-disabled": l ? "" : void 0,
155
- dir: v,
156
- ...m,
157
- ref: c
167
+ "aria-required": n,
168
+ "aria-orientation": c,
169
+ "data-disabled": f ? "" : void 0,
170
+ dir: u,
171
+ ...v,
172
+ ref: d
158
173
  }
159
174
  )
160
175
  }
@@ -163,41 +178,41 @@ var Y = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], I = "RadioGroup", [
163
178
  );
164
179
  }
165
180
  );
166
- D.displayName = I;
167
- var M = "RadioGroupItem", O = s.forwardRef(
168
- (t, c) => {
169
- const { __scopeRadioGroup: e, disabled: n, ...o } = t, r = Z(M, e), a = r.disabled || n, l = N(e), d = x(e), f = s.useRef(null), R = P(c, f), u = r.value === o.value, m = s.useRef(!1);
170
- return s.useEffect(() => {
171
- const i = (h) => {
172
- Y.includes(h.key) && (m.current = !0);
173
- }, v = () => m.current = !1;
174
- return document.addEventListener("keydown", i), document.addEventListener("keyup", v), () => {
175
- document.removeEventListener("keydown", i), document.removeEventListener("keyup", v);
181
+ M.displayName = C;
182
+ var O = "RadioGroupItem", F = i.forwardRef(
183
+ (a, d) => {
184
+ const { __scopeRadioGroup: o, disabled: s, ...e } = a, r = $(O, o), n = r.disabled || s, f = x(o), c = D(o), m = i.useRef(null), R = E(d, m), l = r.value === e.value, v = i.useRef(!1);
185
+ return i.useEffect(() => {
186
+ const t = (h) => {
187
+ J.includes(h.key) && (v.current = !0);
188
+ }, u = () => v.current = !1;
189
+ return document.addEventListener("keydown", t), document.addEventListener("keyup", u), () => {
190
+ document.removeEventListener("keydown", t), document.removeEventListener("keyup", u);
176
191
  };
177
192
  }, []), /* @__PURE__ */ p(
178
193
  q,
179
194
  {
180
195
  asChild: !0,
181
- ...l,
182
- focusable: !a,
183
- active: u,
196
+ ...f,
197
+ focusable: !n,
198
+ active: l,
184
199
  children: /* @__PURE__ */ p(
185
200
  S,
186
201
  {
187
- disabled: a,
202
+ disabled: n,
188
203
  required: r.required,
189
- checked: u,
190
- ...d,
191
- ...o,
204
+ checked: l,
205
+ ...c,
206
+ ...e,
192
207
  name: r.name,
193
208
  ref: R,
194
- onCheck: () => r.onValueChange(o.value),
195
- onKeyDown: y((i) => {
196
- i.key === "Enter" && i.preventDefault();
209
+ onCheck: () => r.onValueChange(e.value),
210
+ onKeyDown: I((t) => {
211
+ t.key === "Enter" && t.preventDefault();
197
212
  }),
198
- onFocus: y(o.onFocus, () => {
199
- var i;
200
- m.current && ((i = f.current) == null || i.click());
213
+ onFocus: I(e.onFocus, () => {
214
+ var t;
215
+ v.current && ((t = m.current) == null || t.click());
201
216
  })
202
217
  }
203
218
  )
@@ -205,21 +220,21 @@ var M = "RadioGroupItem", O = s.forwardRef(
205
220
  );
206
221
  }
207
222
  );
208
- O.displayName = M;
209
- var $ = "RadioGroupIndicator", F = s.forwardRef(
210
- (t, c) => {
211
- const { __scopeRadioGroup: e, ...n } = t, o = x(e);
212
- return /* @__PURE__ */ p(_, { ...o, ...n, ref: c });
223
+ F.displayName = O;
224
+ var ee = "RadioGroupIndicator", L = i.forwardRef(
225
+ (a, d) => {
226
+ const { __scopeRadioGroup: o, ...s } = a, e = D(o);
227
+ return /* @__PURE__ */ p(k, { ...e, ...s, ref: d });
213
228
  }
214
229
  );
215
- F.displayName = $;
216
- var le = D, fe = O, me = F;
230
+ L.displayName = ee;
231
+ var fe = M, me = F, Re = L;
217
232
  export {
218
- me as Indicator,
219
- fe as Item,
220
- D as RadioGroup,
221
- F as RadioGroupIndicator,
222
- O as RadioGroupItem,
223
- le as Root,
224
- pe as createRadioGroupScope
233
+ Re as Indicator,
234
+ me as Item,
235
+ M as RadioGroup,
236
+ L as RadioGroupIndicator,
237
+ F as RadioGroupItem,
238
+ fe as Root,
239
+ le as createRadioGroupScope
225
240
  };