laif-ds 0.1.34 → 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 (84) 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/data-table.js +10 -10
  13. package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
  14. package/dist/components/ui/message-input.js +1 -1
  15. package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
  16. package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
  17. package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
  18. package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
  19. package/dist/index.d.ts +29 -3
  20. package/dist/index.js +1 -1
  21. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
  22. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
  23. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
  24. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
  25. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
  26. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
  27. package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
  28. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
  29. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
  30. package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
  31. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
  32. package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
  33. package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
  34. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
  35. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
  36. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
  37. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
  38. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
  39. package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
  40. package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
  41. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
  42. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
  43. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
  44. package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
  45. package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
  46. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
  47. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
  48. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
  49. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
  50. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
  51. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
  52. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
  53. package/dist/node_modules/classnames/index.js +1 -1
  54. package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
  55. package/dist/node_modules/property-information/lib/html.js +9 -9
  56. package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
  57. package/dist/node_modules/react-is/index.js +1 -1
  58. package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
  59. package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
  60. package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
  61. package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
  62. package/dist/node_modules/style-to-object/cjs/index.js +1 -1
  63. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
  64. package/dist/node_modules/unified/lib/index.js +1 -1
  65. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
  66. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
  67. package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
  68. package/dist/styles.css +1 -1
  69. package/package.json +2 -1
  70. package/dist/components/ui/data-cross-table.js +0 -216
  71. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
  72. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
  73. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
  74. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
  75. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
  76. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
  77. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
  78. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
  79. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
  80. package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  81. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
  82. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
  83. package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
  84. package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
@@ -4,12 +4,12 @@ import { clamp as $ } from "../../number/dist/index.js";
4
4
  import { composeEventHandlers as C } from "../../primitive/dist/index.js";
5
5
  import { useComposedRefs as M } from "../../react-compose-refs/dist/index.js";
6
6
  import { createContextScope as ce } from "../../react-context/dist/index.js";
7
- import { useControllableState as le } from "../node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
7
+ import { useControllableState as le } from "../../react-use-controllable-state/dist/index.js";
8
8
  import { useDirection as de } from "../../react-direction/dist/index.js";
9
9
  import { usePrevious as ue } from "../../react-use-previous/dist/index.js";
10
10
  import { useSize as fe } from "../../react-use-size/dist/index.js";
11
- import { Primitive as K } from "../node_modules/@radix-ui/react-primitive/dist/index.js";
12
- import { createCollection as me } from "../node_modules/@radix-ui/react-collection/dist/index.js";
11
+ import { Primitive as K } from "../../react-primitive/dist/index.js";
12
+ import { createCollection as me } from "../../react-collection/dist/index.js";
13
13
  import { jsx as v, jsxs as pe } from "react/jsx-runtime";
14
14
  var j = ["PageUp", "PageDown"], X = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"], G = {
15
15
  "from-left": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
@@ -1,27 +1,27 @@
1
1
  "use client";
2
2
  import * as l from "react";
3
- import { composeRefs as y } from "../../react-compose-refs/dist/index.js";
3
+ import { useComposedRefs as y } from "../../react-compose-refs/dist/index.js";
4
4
  import { jsx as p, Fragment as S } from "react/jsx-runtime";
5
5
  // @__NO_SIDE_EFFECTS__
6
6
  function g(e) {
7
- const t = /* @__PURE__ */ E(e), o = l.forwardRef((n, r) => {
8
- const { children: i, ...a } = n, s = l.Children.toArray(i), f = s.find(C);
9
- if (f) {
10
- const c = f.props.children, m = s.map((u) => u === f ? l.Children.count(c) > 1 ? l.Children.only(null) : l.isValidElement(c) ? c.props.children : null : u);
11
- return /* @__PURE__ */ p(t, { ...a, ref: r, children: l.isValidElement(c) ? l.cloneElement(c, void 0, m) : null });
7
+ const t = /* @__PURE__ */ E(e), n = l.forwardRef((o, r) => {
8
+ const { children: i, ...c } = o, a = l.Children.toArray(i), s = a.find(C);
9
+ if (s) {
10
+ const f = s.props.children, m = a.map((u) => u === s ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : u);
11
+ return /* @__PURE__ */ p(t, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, m) : null });
12
12
  }
13
- return /* @__PURE__ */ p(t, { ...a, ref: r, children: i });
13
+ return /* @__PURE__ */ p(t, { ...c, ref: r, children: i });
14
14
  });
15
- return o.displayName = `${e}.Slot`, o;
15
+ return n.displayName = `${e}.Slot`, n;
16
16
  }
17
- var x = /* @__PURE__ */ g("Slot");
17
+ var _ = /* @__PURE__ */ g("Slot");
18
18
  // @__NO_SIDE_EFFECTS__
19
19
  function E(e) {
20
- const t = l.forwardRef((o, n) => {
21
- const { children: r, ...i } = o;
20
+ const t = l.forwardRef((n, o) => {
21
+ const { children: r, ...i } = n, c = l.isValidElement(r) ? b(r) : void 0, a = y(c, o);
22
22
  if (l.isValidElement(r)) {
23
- const a = b(r), s = R(i, r.props);
24
- return r.type !== l.Fragment && (s.ref = n ? y(n, a) : a), l.cloneElement(r, s);
23
+ const s = R(i, r.props);
24
+ return r.type !== l.Fragment && (s.ref = a), l.cloneElement(r, s);
25
25
  }
26
26
  return l.Children.count(r) > 1 ? l.Children.only(null) : null;
27
27
  });
@@ -29,31 +29,32 @@ function E(e) {
29
29
  }
30
30
  var d = Symbol("radix.slottable");
31
31
  // @__NO_SIDE_EFFECTS__
32
- function I(e) {
33
- const t = ({ children: o }) => /* @__PURE__ */ p(S, { children: o });
32
+ function x(e) {
33
+ const t = ({ children: n }) => /* @__PURE__ */ p(S, { children: n });
34
34
  return t.displayName = `${e}.Slottable`, t.__radixId = d, t;
35
35
  }
36
36
  function C(e) {
37
37
  return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === d;
38
38
  }
39
39
  function R(e, t) {
40
- const o = { ...t };
41
- for (const n in t) {
42
- const r = e[n], i = t[n];
43
- /^on[A-Z]/.test(n) ? r && i ? o[n] = (...s) => {
44
- i(...s), r(...s);
45
- } : r && (o[n] = r) : n === "style" ? o[n] = { ...r, ...i } : n === "className" && (o[n] = [r, i].filter(Boolean).join(" "));
40
+ const n = { ...t };
41
+ for (const o in t) {
42
+ const r = e[o], i = t[o];
43
+ /^on[A-Z]/.test(o) ? r && i ? n[o] = (...a) => {
44
+ const s = i(...a);
45
+ return r(...a), s;
46
+ } : r && (n[o] = r) : o === "style" ? n[o] = { ...r, ...i } : o === "className" && (n[o] = [r, i].filter(Boolean).join(" "));
46
47
  }
47
- return { ...e, ...o };
48
+ return { ...e, ...n };
48
49
  }
49
50
  function b(e) {
50
- var n, r;
51
- let t = (n = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : n.get, o = t && "isReactWarning" in t && t.isReactWarning;
52
- return o ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = t && "isReactWarning" in t && t.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
51
+ var o, r;
52
+ let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning;
53
+ return n ? e.ref : (t = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
53
54
  }
54
55
  export {
55
- x as Root,
56
- x as Slot,
56
+ _ as Root,
57
+ _ as Slot,
57
58
  g as createSlot,
58
- I as createSlottable
59
+ x as createSlottable
59
60
  };
@@ -1,119 +1,134 @@
1
1
  "use client";
2
- import * as n from "react";
3
- import { composeEventHandlers as _ } from "../../primitive/dist/index.js";
4
- import { useComposedRefs as H } from "../../react-compose-refs/dist/index.js";
2
+ import * as r from "react";
3
+ import { composeEventHandlers as T } from "../../primitive/dist/index.js";
4
+ import { useComposedRefs as P } from "../../react-compose-refs/dist/index.js";
5
5
  import { createContextScope as I } from "../../react-context/dist/index.js";
6
6
  import { useControllableState as M } from "../../react-use-controllable-state/dist/index.js";
7
- import { usePrevious as N } from "../../react-use-previous/dist/index.js";
7
+ import { usePrevious as H } from "../../react-use-previous/dist/index.js";
8
8
  import { useSize as j } from "../../react-use-size/dist/index.js";
9
- import { Primitive as w } from "../../react-primitive/dist/index.js";
10
- import { jsxs as B, jsx as m } from "react/jsx-runtime";
11
- var S = "Switch", [q, K] = I(S), [z, A] = q(S), C = n.forwardRef(
12
- (e, s) => {
9
+ import { Primitive as y } from "../../react-primitive/dist/index.js";
10
+ import { jsxs as A, jsx as m } from "react/jsx-runtime";
11
+ var h = "Switch", [U, Q] = I(h), [q, z] = U(h), R = r.forwardRef(
12
+ (t, a) => {
13
13
  const {
14
- __scopeSwitch: t,
15
- name: o,
16
- checked: r,
17
- defaultChecked: p,
18
- required: a,
19
- disabled: c,
20
- value: i = "on",
21
- onCheckedChange: f,
22
- form: b,
23
- ...u
24
- } = e, [d, R] = n.useState(null), g = H(s, (h) => R(h)), v = n.useRef(!1), k = d ? b || !!d.closest("form") : !0, [l = !1, E] = M({
25
- prop: r,
26
- defaultProp: p,
27
- onChange: f
14
+ __scopeSwitch: e,
15
+ name: c,
16
+ checked: o,
17
+ defaultChecked: S,
18
+ required: i,
19
+ disabled: n,
20
+ value: p = "on",
21
+ onCheckedChange: w,
22
+ form: s,
23
+ ...v
24
+ } = t, [u, d] = r.useState(null), b = P(a, (f) => d(f)), C = r.useRef(!1), k = u ? s || !!u.closest("form") : !0, [l, B] = M({
25
+ prop: o,
26
+ defaultProp: S ?? !1,
27
+ onChange: w,
28
+ caller: h
28
29
  });
29
- return /* @__PURE__ */ B(z, { scope: t, checked: l, disabled: c, children: [
30
+ return /* @__PURE__ */ A(q, { scope: e, checked: l, disabled: n, children: [
30
31
  /* @__PURE__ */ m(
31
- w.button,
32
+ y.button,
32
33
  {
33
34
  type: "button",
34
35
  role: "switch",
35
36
  "aria-checked": l,
36
- "aria-required": a,
37
- "data-state": x(l),
38
- "data-disabled": c ? "" : void 0,
39
- disabled: c,
40
- value: i,
41
- ...u,
42
- ref: g,
43
- onClick: _(e.onClick, (h) => {
44
- E((T) => !T), k && (v.current = h.isPropagationStopped(), v.current || h.stopPropagation());
37
+ "aria-required": i,
38
+ "data-state": g(l),
39
+ "data-disabled": n ? "" : void 0,
40
+ disabled: n,
41
+ value: p,
42
+ ...v,
43
+ ref: b,
44
+ onClick: T(t.onClick, (f) => {
45
+ B((N) => !N), k && (C.current = f.isPropagationStopped(), C.current || f.stopPropagation());
45
46
  })
46
47
  }
47
48
  ),
48
49
  k && /* @__PURE__ */ m(
49
- O,
50
+ x,
50
51
  {
51
- control: d,
52
- bubbles: !v.current,
53
- name: o,
54
- value: i,
52
+ control: u,
53
+ bubbles: !C.current,
54
+ name: c,
55
+ value: p,
55
56
  checked: l,
56
- required: a,
57
- disabled: c,
58
- form: b,
57
+ required: i,
58
+ disabled: n,
59
+ form: s,
59
60
  style: { transform: "translateX(-100%)" }
60
61
  }
61
62
  )
62
63
  ] });
63
64
  }
64
65
  );
65
- C.displayName = S;
66
- var P = "SwitchThumb", y = n.forwardRef(
67
- (e, s) => {
68
- const { __scopeSwitch: t, ...o } = e, r = A(P, t);
66
+ R.displayName = h;
67
+ var E = "SwitchThumb", _ = r.forwardRef(
68
+ (t, a) => {
69
+ const { __scopeSwitch: e, ...c } = t, o = z(E, e);
69
70
  return /* @__PURE__ */ m(
70
- w.span,
71
+ y.span,
71
72
  {
72
- "data-state": x(r.checked),
73
- "data-disabled": r.disabled ? "" : void 0,
74
- ...o,
75
- ref: s
73
+ "data-state": g(o.checked),
74
+ "data-disabled": o.disabled ? "" : void 0,
75
+ ...c,
76
+ ref: a
76
77
  }
77
78
  );
78
79
  }
79
80
  );
80
- y.displayName = P;
81
- var O = (e) => {
82
- const { control: s, checked: t, bubbles: o = !0, ...r } = e, p = n.useRef(null), a = N(t), c = j(s);
83
- return n.useEffect(() => {
84
- const i = p.current, f = window.HTMLInputElement.prototype, u = Object.getOwnPropertyDescriptor(f, "checked").set;
85
- if (a !== t && u) {
86
- const d = new Event("click", { bubbles: o });
87
- u.call(i, t), i.dispatchEvent(d);
88
- }
89
- }, [a, t, o]), /* @__PURE__ */ m(
90
- "input",
91
- {
92
- type: "checkbox",
93
- "aria-hidden": !0,
94
- defaultChecked: t,
95
- ...r,
96
- tabIndex: -1,
97
- ref: p,
98
- style: {
99
- ...e.style,
100
- ...c,
101
- position: "absolute",
102
- pointerEvents: "none",
103
- opacity: 0,
104
- margin: 0
81
+ _.displayName = E;
82
+ var L = "SwitchBubbleInput", x = r.forwardRef(
83
+ ({
84
+ __scopeSwitch: t,
85
+ control: a,
86
+ checked: e,
87
+ bubbles: c = !0,
88
+ ...o
89
+ }, S) => {
90
+ const i = r.useRef(null), n = P(i, S), p = H(e), w = j(a);
91
+ return r.useEffect(() => {
92
+ const s = i.current;
93
+ if (!s) return;
94
+ const v = window.HTMLInputElement.prototype, d = Object.getOwnPropertyDescriptor(
95
+ v,
96
+ "checked"
97
+ ).set;
98
+ if (p !== e && d) {
99
+ const b = new Event("click", { bubbles: c });
100
+ d.call(s, e), s.dispatchEvent(b);
105
101
  }
106
- }
107
- );
108
- };
109
- function x(e) {
110
- return e ? "checked" : "unchecked";
102
+ }, [p, e, c]), /* @__PURE__ */ m(
103
+ "input",
104
+ {
105
+ type: "checkbox",
106
+ "aria-hidden": !0,
107
+ defaultChecked: e,
108
+ ...o,
109
+ tabIndex: -1,
110
+ ref: n,
111
+ style: {
112
+ ...o.style,
113
+ ...w,
114
+ position: "absolute",
115
+ pointerEvents: "none",
116
+ opacity: 0,
117
+ margin: 0
118
+ }
119
+ }
120
+ );
121
+ }
122
+ );
123
+ x.displayName = L;
124
+ function g(t) {
125
+ return t ? "checked" : "unchecked";
111
126
  }
112
- var Q = C, V = y;
127
+ var V = R, Y = _;
113
128
  export {
114
- Q as Root,
115
- C as Switch,
116
- y as SwitchThumb,
117
- V as Thumb,
118
- K as createSwitchScope
129
+ V as Root,
130
+ R as Switch,
131
+ _ as SwitchThumb,
132
+ Y as Thumb,
133
+ Q as createSwitchScope
119
134
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import * as v from "react";
3
- import { composeEventHandlers as p } from "../../primitive/dist/index.js";
3
+ import { composeEventHandlers as g } from "../../primitive/dist/index.js";
4
4
  import { createContextScope as x } from "../../react-context/dist/index.js";
5
5
  import { createRovingFocusGroupScope as C, Root as E, Item as F } from "../../react-roving-focus/dist/index.js";
6
6
  import { Presence as w } from "../../react-presence/dist/index.js";
@@ -8,10 +8,10 @@ import { Primitive as b } from "../../react-primitive/dist/index.js";
8
8
  import { useDirection as D } from "../../react-direction/dist/index.js";
9
9
  import { useControllableState as V } from "../../react-use-controllable-state/dist/index.js";
10
10
  import { useId as G } from "../../react-id/dist/index.js";
11
- import { jsx as u } from "react/jsx-runtime";
12
- var g = "Tabs", [L, Q] = x(g, [
11
+ import { jsx as l } from "react/jsx-runtime";
12
+ var p = "Tabs", [L, Q] = x(p, [
13
13
  C
14
- ]), h = C(), [$, T] = L(g), I = v.forwardRef(
14
+ ]), h = C(), [$, T] = L(p), I = v.forwardRef(
15
15
  (e, r) => {
16
16
  const {
17
17
  __scopeTabs: s,
@@ -22,22 +22,23 @@ var g = "Tabs", [L, Q] = x(g, [
22
22
  dir: d,
23
23
  activationMode: f = "automatic",
24
24
  ...m
25
- } = e, i = D(d), [a, l] = V({
25
+ } = e, i = D(d), [a, u] = V({
26
26
  prop: t,
27
27
  onChange: n,
28
- defaultProp: c
28
+ defaultProp: c ?? "",
29
+ caller: p
29
30
  });
30
- return /* @__PURE__ */ u(
31
+ return /* @__PURE__ */ l(
31
32
  $,
32
33
  {
33
34
  scope: s,
34
35
  baseId: G(),
35
36
  value: a,
36
- onValueChange: l,
37
+ onValueChange: u,
37
38
  orientation: o,
38
39
  dir: i,
39
40
  activationMode: f,
40
- children: /* @__PURE__ */ u(
41
+ children: /* @__PURE__ */ l(
41
42
  b.div,
42
43
  {
43
44
  dir: i,
@@ -50,11 +51,11 @@ var g = "Tabs", [L, Q] = x(g, [
50
51
  );
51
52
  }
52
53
  );
53
- I.displayName = g;
54
+ I.displayName = p;
54
55
  var R = "TabsList", _ = v.forwardRef(
55
56
  (e, r) => {
56
57
  const { __scopeTabs: s, loop: t = !0, ...n } = e, c = T(R, s), o = h(s);
57
- return /* @__PURE__ */ u(
58
+ return /* @__PURE__ */ l(
58
59
  E,
59
60
  {
60
61
  asChild: !0,
@@ -62,7 +63,7 @@ var R = "TabsList", _ = v.forwardRef(
62
63
  orientation: c.orientation,
63
64
  dir: c.dir,
64
65
  loop: t,
65
- children: /* @__PURE__ */ u(
66
+ children: /* @__PURE__ */ l(
66
67
  b.div,
67
68
  {
68
69
  role: "tablist",
@@ -79,14 +80,14 @@ _.displayName = R;
79
80
  var y = "TabsTrigger", A = v.forwardRef(
80
81
  (e, r) => {
81
82
  const { __scopeTabs: s, value: t, disabled: n = !1, ...c } = e, o = T(y, s), d = h(s), f = N(o.baseId, t), m = P(o.baseId, t), i = t === o.value;
82
- return /* @__PURE__ */ u(
83
+ return /* @__PURE__ */ l(
83
84
  F,
84
85
  {
85
86
  asChild: !0,
86
87
  ...d,
87
88
  focusable: !n,
88
89
  active: i,
89
- children: /* @__PURE__ */ u(
90
+ children: /* @__PURE__ */ l(
90
91
  b.button,
91
92
  {
92
93
  type: "button",
@@ -99,13 +100,13 @@ var y = "TabsTrigger", A = v.forwardRef(
99
100
  id: f,
100
101
  ...c,
101
102
  ref: r,
102
- onMouseDown: p(e.onMouseDown, (a) => {
103
+ onMouseDown: g(e.onMouseDown, (a) => {
103
104
  !n && a.button === 0 && a.ctrlKey === !1 ? o.onValueChange(t) : a.preventDefault();
104
105
  }),
105
- onKeyDown: p(e.onKeyDown, (a) => {
106
+ onKeyDown: g(e.onKeyDown, (a) => {
106
107
  [" ", "Enter"].includes(a.key) && o.onValueChange(t);
107
108
  }),
108
- onFocus: p(e.onFocus, () => {
109
+ onFocus: g(e.onFocus, () => {
109
110
  const a = o.activationMode !== "manual";
110
111
  !i && !n && a && o.onValueChange(t);
111
112
  })
@@ -120,16 +121,16 @@ var S = "TabsContent", M = v.forwardRef(
120
121
  (e, r) => {
121
122
  const { __scopeTabs: s, value: t, forceMount: n, children: c, ...o } = e, d = T(S, s), f = N(d.baseId, t), m = P(d.baseId, t), i = t === d.value, a = v.useRef(i);
122
123
  return v.useEffect(() => {
123
- const l = requestAnimationFrame(() => a.current = !1);
124
- return () => cancelAnimationFrame(l);
125
- }, []), /* @__PURE__ */ u(w, { present: n || i, children: ({ present: l }) => /* @__PURE__ */ u(
124
+ const u = requestAnimationFrame(() => a.current = !1);
125
+ return () => cancelAnimationFrame(u);
126
+ }, []), /* @__PURE__ */ l(w, { present: n || i, children: ({ present: u }) => /* @__PURE__ */ l(
126
127
  b.div,
127
128
  {
128
129
  "data-state": i ? "active" : "inactive",
129
130
  "data-orientation": d.orientation,
130
131
  role: "tabpanel",
131
132
  "aria-labelledby": f,
132
- hidden: !l,
133
+ hidden: !u,
133
134
  id: m,
134
135
  tabIndex: 0,
135
136
  ...o,
@@ -138,7 +139,7 @@ var S = "TabsContent", M = v.forwardRef(
138
139
  ...e.style,
139
140
  animationDuration: a.current ? "0s" : void 0
140
141
  },
141
- children: l && c
142
+ children: u && c
142
143
  }
143
144
  ) });
144
145
  }
@@ -1,33 +1,34 @@
1
1
  "use client";
2
- import * as n from "react";
3
- import { composeEventHandlers as f } from "../../primitive/dist/index.js";
4
- import { useControllableState as m } from "../../react-use-controllable-state/dist/index.js";
5
- import { Primitive as p } from "../../react-primitive/dist/index.js";
2
+ import * as f from "react";
3
+ import { composeEventHandlers as m } from "../../primitive/dist/index.js";
4
+ import { useControllableState as p } from "../../react-use-controllable-state/dist/index.js";
5
+ import { Primitive as c } from "../../react-primitive/dist/index.js";
6
6
  import { jsx as u } from "react/jsx-runtime";
7
- var b = "Toggle", r = n.forwardRef((e, t) => {
8
- const { pressed: s, defaultPressed: a = !1, onPressedChange: d, ...i } = e, [o = !1, l] = m({
7
+ var r = "Toggle", t = f.forwardRef((e, a) => {
8
+ const { pressed: s, defaultPressed: d, onPressedChange: i, ...l } = e, [o, n] = p({
9
9
  prop: s,
10
- onChange: d,
11
- defaultProp: a
10
+ onChange: i,
11
+ defaultProp: d ?? !1,
12
+ caller: r
12
13
  });
13
14
  return /* @__PURE__ */ u(
14
- p.button,
15
+ c.button,
15
16
  {
16
17
  type: "button",
17
18
  "aria-pressed": o,
18
19
  "data-state": o ? "on" : "off",
19
20
  "data-disabled": e.disabled ? "" : void 0,
20
- ...i,
21
- ref: t,
22
- onClick: f(e.onClick, () => {
23
- e.disabled || l(!o);
21
+ ...l,
22
+ ref: a,
23
+ onClick: m(e.onClick, () => {
24
+ e.disabled || n(!o);
24
25
  })
25
26
  }
26
27
  );
27
28
  });
28
- r.displayName = b;
29
- var C = r;
29
+ t.displayName = r;
30
+ var C = t;
30
31
  export {
31
32
  C as Root,
32
- r as Toggle
33
+ t as Toggle
33
34
  };
@@ -2,12 +2,12 @@
2
2
  import p from "react";
3
3
  import { createContextScope as S } from "../../react-context/dist/index.js";
4
4
  import { Primitive as G } from "../../react-primitive/dist/index.js";
5
- import { createRovingFocusGroupScope as P, Item as V, Root as A } from "../../react-roving-focus/dist/index.js";
6
- import { Toggle as F } from "../../react-toggle/dist/index.js";
5
+ import { createRovingFocusGroupScope as P, Item as V, Root as M } from "../../react-roving-focus/dist/index.js";
6
+ import { Toggle as A } from "../../react-toggle/dist/index.js";
7
7
  import { useControllableState as _ } from "../../react-use-controllable-state/dist/index.js";
8
- import { useDirection as M } from "../../react-direction/dist/index.js";
8
+ import { useDirection as F } from "../../react-direction/dist/index.js";
9
9
  import { jsx as l } from "react/jsx-runtime";
10
- var v = "ToggleGroup", [C, z] = S(v, [
10
+ var c = "ToggleGroup", [C, z] = S(c, [
11
11
  P
12
12
  ]), I = P(), f = p.forwardRef((e, r) => {
13
13
  const { type: a, ...t } = e;
@@ -15,10 +15,10 @@ var v = "ToggleGroup", [C, z] = S(v, [
15
15
  return /* @__PURE__ */ l(w, { ...t, ref: r });
16
16
  if (a === "multiple")
17
17
  return /* @__PURE__ */ l(D, { ...t, ref: r });
18
- throw new Error(`Missing prop \`type\` expected on \`${v}\``);
18
+ throw new Error(`Missing prop \`type\` expected on \`${c}\``);
19
19
  });
20
- f.displayName = v;
21
- var [h, x] = C(v), w = p.forwardRef((e, r) => {
20
+ f.displayName = c;
21
+ var [h, x] = C(c), w = p.forwardRef((e, r) => {
22
22
  const {
23
23
  value: a,
24
24
  defaultValue: t,
@@ -27,15 +27,16 @@ var [h, x] = C(v), w = p.forwardRef((e, r) => {
27
27
  ...n
28
28
  } = e, [s, o] = _({
29
29
  prop: a,
30
- defaultProp: t,
31
- onChange: u
30
+ defaultProp: t ?? "",
31
+ onChange: u,
32
+ caller: c
32
33
  });
33
34
  return /* @__PURE__ */ l(
34
35
  h,
35
36
  {
36
37
  scope: e.__scopeToggleGroup,
37
38
  type: "single",
38
- value: s ? [s] : [],
39
+ value: p.useMemo(() => s ? [s] : [], [s]),
39
40
  onItemActivate: o,
40
41
  onItemDeactivate: p.useCallback(() => o(""), [o]),
41
42
  children: /* @__PURE__ */ l(R, { ...n, ref: r })
@@ -48,15 +49,16 @@ var [h, x] = C(v), w = p.forwardRef((e, r) => {
48
49
  onValueChange: u = () => {
49
50
  },
50
51
  ...n
51
- } = e, [s = [], o] = _({
52
+ } = e, [s, o] = _({
52
53
  prop: a,
53
- defaultProp: t,
54
- onChange: u
54
+ defaultProp: t ?? [],
55
+ onChange: u,
56
+ caller: c
55
57
  }), i = p.useCallback(
56
- (c) => o((g = []) => [...g, c]),
58
+ (g) => o((v = []) => [...v, g]),
57
59
  [o]
58
60
  ), d = p.useCallback(
59
- (c) => o((g = []) => g.filter((y) => y !== c)),
61
+ (g) => o((v = []) => v.filter((y) => y !== g)),
60
62
  [o]
61
63
  );
62
64
  return /* @__PURE__ */ l(
@@ -71,8 +73,8 @@ var [h, x] = C(v), w = p.forwardRef((e, r) => {
71
73
  }
72
74
  );
73
75
  });
74
- f.displayName = v;
75
- var [E, N] = C(v), R = p.forwardRef(
76
+ f.displayName = c;
77
+ var [E, N] = C(c), R = p.forwardRef(
76
78
  (e, r) => {
77
79
  const {
78
80
  __scopeToggleGroup: a,
@@ -82,18 +84,18 @@ var [E, N] = C(v), R = p.forwardRef(
82
84
  dir: s,
83
85
  loop: o = !0,
84
86
  ...i
85
- } = e, d = I(a), c = M(s), g = { role: "group", dir: c, ...i };
87
+ } = e, d = I(a), g = F(s), v = { role: "group", dir: g, ...i };
86
88
  return /* @__PURE__ */ l(E, { scope: a, rovingFocus: u, disabled: t, children: u ? /* @__PURE__ */ l(
87
- A,
89
+ M,
88
90
  {
89
91
  asChild: !0,
90
92
  ...d,
91
93
  orientation: n,
92
- dir: c,
94
+ dir: g,
93
95
  loop: o,
94
- children: /* @__PURE__ */ l(G.div, { ...g, ref: r })
96
+ children: /* @__PURE__ */ l(G.div, { ...v, ref: r })
95
97
  }
96
- ) : /* @__PURE__ */ l(G.div, { ...g, ref: r }) });
98
+ ) : /* @__PURE__ */ l(G.div, { ...v, ref: r }) });
97
99
  }
98
100
  ), m = "ToggleGroupItem", b = p.forwardRef(
99
101
  (e, r) => {
@@ -116,7 +118,7 @@ var T = p.forwardRef(
116
118
  (e, r) => {
117
119
  const { __scopeToggleGroup: a, value: t, ...u } = e, n = x(m, a), s = { role: "radio", "aria-checked": e.pressed, "aria-pressed": void 0 }, o = n.type === "single" ? s : void 0;
118
120
  return /* @__PURE__ */ l(
119
- F,
121
+ A,
120
122
  {
121
123
  ...o,
122
124
  ...u,