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
@@ -1,118 +1,120 @@
1
1
  "use client";
2
- import * as s from "react";
2
+ import * as c from "react";
3
3
  import { composeEventHandlers as p } from "../../primitive/dist/index.js";
4
4
  import { createCollection as V } from "../../react-collection/dist/index.js";
5
5
  import { useComposedRefs as j } from "../../react-compose-refs/dist/index.js";
6
6
  import { createContextScope as z } from "../../react-context/dist/index.js";
7
7
  import { useId as q } from "../../react-id/dist/index.js";
8
- import { Primitive as x } from "../../react-primitive/dist/index.js";
8
+ import { Primitive as G } from "../../react-primitive/dist/index.js";
9
9
  import { useCallbackRef as J } from "../../react-use-callback-ref/dist/index.js";
10
10
  import { useControllableState as Q } from "../../react-use-controllable-state/dist/index.js";
11
11
  import { useDirection as W } from "../../react-direction/dist/index.js";
12
12
  import { jsx as d } from "react/jsx-runtime";
13
- var h = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, b = "RovingFocusGroup", [y, G, Z] = V(b), [$, Fe] = z(
14
- b,
13
+ var y = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [D, N, Z] = V(I), [$, Fe] = z(
14
+ I,
15
15
  [Z]
16
- ), [ee, oe] = $(b), N = s.forwardRef(
17
- (e, r) => /* @__PURE__ */ d(y.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(y.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(te, { ...e, ref: r }) }) })
16
+ ), [ee, oe] = $(I), O = c.forwardRef(
17
+ (e, r) => /* @__PURE__ */ d(D.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(D.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(te, { ...e, ref: r }) }) })
18
18
  );
19
- N.displayName = b;
20
- var te = s.forwardRef((e, r) => {
19
+ O.displayName = I;
20
+ var te = c.forwardRef((e, r) => {
21
21
  const {
22
- __scopeRovingFocusGroup: c,
22
+ __scopeRovingFocusGroup: s,
23
23
  orientation: o,
24
- loop: F = !1,
25
- dir: g,
26
- currentTabStopId: R,
27
- defaultCurrentTabStopId: E,
28
- onCurrentTabStopIdChange: m,
29
- onEntryFocus: u,
30
- preventScrollOnEntryFocus: w = !1,
31
- ...C
32
- } = e, v = s.useRef(null), I = j(r, v), t = W(g), [l = null, T] = Q({
33
- prop: R,
34
- defaultProp: E,
35
- onChange: m
36
- }), [a, i] = s.useState(!1), S = J(u), k = G(c), A = s.useRef(!1), [L, D] = s.useState(0);
37
- return s.useEffect(() => {
38
- const n = v.current;
24
+ loop: T = !1,
25
+ dir: w,
26
+ currentTabStopId: v,
27
+ defaultCurrentTabStopId: C,
28
+ onCurrentTabStopIdChange: S,
29
+ onEntryFocus: m,
30
+ preventScrollOnEntryFocus: u = !1,
31
+ ...b
32
+ } = e, F = c.useRef(null), g = j(r, F), R = W(w), [E, t] = Q({
33
+ prop: v,
34
+ defaultProp: C ?? null,
35
+ onChange: S,
36
+ caller: I
37
+ }), [i, h] = c.useState(!1), a = J(m), l = N(s), A = c.useRef(!1), [L, P] = c.useState(0);
38
+ return c.useEffect(() => {
39
+ const n = F.current;
39
40
  if (n)
40
- return n.addEventListener(h, S), () => n.removeEventListener(h, S);
41
- }, [S]), /* @__PURE__ */ d(
41
+ return n.addEventListener(y, a), () => n.removeEventListener(y, a);
42
+ }, [a]), /* @__PURE__ */ d(
42
43
  ee,
43
44
  {
44
- scope: c,
45
+ scope: s,
45
46
  orientation: o,
46
- dir: t,
47
- loop: F,
48
- currentTabStopId: l,
49
- onItemFocus: s.useCallback(
50
- (n) => T(n),
51
- [T]
47
+ dir: R,
48
+ loop: T,
49
+ currentTabStopId: E,
50
+ onItemFocus: c.useCallback(
51
+ (n) => t(n),
52
+ [t]
52
53
  ),
53
- onItemShiftTab: s.useCallback(() => i(!0), []),
54
- onFocusableItemAdd: s.useCallback(
55
- () => D((n) => n + 1),
54
+ onItemShiftTab: c.useCallback(() => h(!0), []),
55
+ onFocusableItemAdd: c.useCallback(
56
+ () => P((n) => n + 1),
56
57
  []
57
58
  ),
58
- onFocusableItemRemove: s.useCallback(
59
- () => D((n) => n - 1),
59
+ onFocusableItemRemove: c.useCallback(
60
+ () => P((n) => n - 1),
60
61
  []
61
62
  ),
62
63
  children: /* @__PURE__ */ d(
63
- x.div,
64
+ G.div,
64
65
  {
65
- tabIndex: a || L === 0 ? -1 : 0,
66
+ tabIndex: i || L === 0 ? -1 : 0,
66
67
  "data-orientation": o,
67
- ...C,
68
- ref: I,
68
+ ...b,
69
+ ref: g,
69
70
  style: { outline: "none", ...e.style },
70
71
  onMouseDown: p(e.onMouseDown, () => {
71
72
  A.current = !0;
72
73
  }),
73
74
  onFocus: p(e.onFocus, (n) => {
74
75
  const U = !A.current;
75
- if (n.target === n.currentTarget && U && !a) {
76
- const P = new CustomEvent(h, X);
77
- if (n.currentTarget.dispatchEvent(P), !P.defaultPrevented) {
78
- const _ = k().filter((f) => f.focusable), B = _.find((f) => f.active), Y = _.find((f) => f.id === l), H = [B, Y, ..._].filter(
76
+ if (n.target === n.currentTarget && U && !i) {
77
+ const x = new CustomEvent(y, X);
78
+ if (n.currentTarget.dispatchEvent(x), !x.defaultPrevented) {
79
+ const _ = l().filter((f) => f.focusable), B = _.find((f) => f.active), Y = _.find((f) => f.id === E), H = [B, Y, ..._].filter(
79
80
  Boolean
80
81
  ).map((f) => f.ref.current);
81
- M(H, w);
82
+ k(H, u);
82
83
  }
83
84
  }
84
85
  A.current = !1;
85
86
  }),
86
- onBlur: p(e.onBlur, () => i(!1))
87
+ onBlur: p(e.onBlur, () => h(!1))
87
88
  }
88
89
  )
89
90
  }
90
91
  );
91
- }), O = "RovingFocusGroupItem", K = s.forwardRef(
92
+ }), K = "RovingFocusGroupItem", M = c.forwardRef(
92
93
  (e, r) => {
93
94
  const {
94
- __scopeRovingFocusGroup: c,
95
+ __scopeRovingFocusGroup: s,
95
96
  focusable: o = !0,
96
- active: F = !1,
97
- tabStopId: g,
98
- ...R
99
- } = e, E = q(), m = g || E, u = oe(O, c), w = u.currentTabStopId === m, C = G(c), { onFocusableItemAdd: v, onFocusableItemRemove: I } = u;
100
- return s.useEffect(() => {
97
+ active: T = !1,
98
+ tabStopId: w,
99
+ children: v,
100
+ ...C
101
+ } = e, S = q(), m = w || S, u = oe(K, s), b = u.currentTabStopId === m, F = N(s), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
102
+ return c.useEffect(() => {
101
103
  if (o)
102
- return v(), () => I();
103
- }, [o, v, I]), /* @__PURE__ */ d(
104
- y.ItemSlot,
104
+ return g(), () => R();
105
+ }, [o, g, R]), /* @__PURE__ */ d(
106
+ D.ItemSlot,
105
107
  {
106
- scope: c,
108
+ scope: s,
107
109
  id: m,
108
110
  focusable: o,
109
- active: F,
111
+ active: T,
110
112
  children: /* @__PURE__ */ d(
111
- x.span,
113
+ G.span,
112
114
  {
113
- tabIndex: w ? 0 : -1,
115
+ tabIndex: b ? 0 : -1,
114
116
  "data-orientation": u.orientation,
115
- ...R,
117
+ ...C,
116
118
  ref: r,
117
119
  onMouseDown: p(e.onMouseDown, (t) => {
118
120
  o ? u.onItemFocus(m) : t.preventDefault();
@@ -124,27 +126,28 @@ var te = s.forwardRef((e, r) => {
124
126
  return;
125
127
  }
126
128
  if (t.target !== t.currentTarget) return;
127
- const l = se(t, u.orientation, u.dir);
128
- if (l !== void 0) {
129
+ const i = ce(t, u.orientation, u.dir);
130
+ if (i !== void 0) {
129
131
  if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
130
132
  t.preventDefault();
131
- let a = C().filter((i) => i.focusable).map((i) => i.ref.current);
132
- if (l === "last") a.reverse();
133
- else if (l === "prev" || l === "next") {
134
- l === "prev" && a.reverse();
135
- const i = a.indexOf(t.currentTarget);
136
- a = u.loop ? ce(a, i + 1) : a.slice(i + 1);
133
+ let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
134
+ if (i === "last") a.reverse();
135
+ else if (i === "prev" || i === "next") {
136
+ i === "prev" && a.reverse();
137
+ const l = a.indexOf(t.currentTarget);
138
+ a = u.loop ? se(a, l + 1) : a.slice(l + 1);
137
139
  }
138
- setTimeout(() => M(a));
140
+ setTimeout(() => k(a));
139
141
  }
140
- })
142
+ }),
143
+ children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
141
144
  }
142
145
  )
143
146
  }
144
147
  );
145
148
  }
146
149
  );
147
- K.displayName = O;
150
+ M.displayName = K;
148
151
  var re = {
149
152
  ArrowLeft: "prev",
150
153
  ArrowUp: "prev",
@@ -158,24 +161,24 @@ var re = {
158
161
  function ne(e, r) {
159
162
  return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
160
163
  }
161
- function se(e, r, c) {
162
- const o = ne(e.key, c);
164
+ function ce(e, r, s) {
165
+ const o = ne(e.key, s);
163
166
  if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
164
167
  return re[o];
165
168
  }
166
- function M(e, r = !1) {
167
- const c = document.activeElement;
169
+ function k(e, r = !1) {
170
+ const s = document.activeElement;
168
171
  for (const o of e)
169
- if (o === c || (o.focus({ preventScroll: r }), document.activeElement !== c)) return;
172
+ if (o === s || (o.focus({ preventScroll: r }), document.activeElement !== s)) return;
170
173
  }
171
- function ce(e, r) {
172
- return e.map((c, o) => e[(r + o) % e.length]);
174
+ function se(e, r) {
175
+ return e.map((s, o) => e[(r + o) % e.length]);
173
176
  }
174
- var ge = N, Re = K;
177
+ var ge = O, Re = M;
175
178
  export {
176
179
  Re as Item,
177
180
  ge as Root,
178
- N as RovingFocusGroup,
179
- K as RovingFocusGroupItem,
181
+ O as RovingFocusGroup,
182
+ M as RovingFocusGroupItem,
180
183
  Fe as createRovingFocusGroupScope
181
184
  };