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.
- package/dist/_virtual/index.js +5 -2
- package/dist/_virtual/index3.js +2 -7
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index5.js +4 -4
- package/dist/_virtual/index6.js +5 -2
- package/dist/_virtual/index7.js +5 -2
- package/dist/_virtual/index8.js +5 -0
- package/dist/_virtual/index9.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/components/ui/checkbox.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Chart.js +1 -1
- package/dist/components/ui/message-input.js +1 -1
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +348 -0
- package/dist/components/ui/tables/data-cross-table/edit-controls.js +47 -0
- package/dist/components/ui/tables/data-cross-table/editable-input.js +100 -0
- package/dist/components/ui/tables/data-cross-table/truncated-text.js +19 -0
- package/dist/index.d.ts +29 -3
- package/dist/index.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +126 -122
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +10 -6
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +44 -42
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +33 -43
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +237 -120
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-context-menu/dist/index.js +95 -94
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +20 -19
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +14 -13
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +136 -136
- package/dist/node_modules/@radix-ui/react-menubar/dist/index.js +70 -68
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.js +66 -64
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +10 -9
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +16 -16
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +161 -146
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +87 -84
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +269 -257
- package/dist/node_modules/@radix-ui/react-slider/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +29 -28
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +101 -86
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +23 -22
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.js +25 -23
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +77 -76
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +43 -21
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +18 -18
- package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +36 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +491 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +53 -0
- package/dist/node_modules/classnames/index.js +1 -1
- package/dist/node_modules/hast-util-to-jsx-runtime/lib/index.js +1 -1
- package/dist/node_modules/property-information/lib/html.js +9 -9
- package/dist/node_modules/react-hook-form/dist/index.esm.js +88 -88
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-resizable-panels/dist/react-resizable-panels.browser.esm.js +830 -801
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/remeda/dist/chunk-AIG3BDKO.js +9 -0
- package/dist/node_modules/remeda/dist/{chunk-A3PVMI4K.js → chunk-KI5X74E2.js} +1 -1
- package/dist/node_modules/style-to-object/cjs/index.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +3 -3
- package/dist/node_modules/unified/lib/index.js +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +68 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +56 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -1
- package/dist/components/ui/data-cross-table.js +0 -216
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -128
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -138
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-menu/dist/index.js +0 -625
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-popper/dist/index.js +0 -221
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.js +0 -37
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -184
- package/dist/node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.js +0 -49
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-primitive/dist/index.js +0 -33
- package/dist/node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -55
- package/dist/node_modules/remeda/dist/chunk-OAMXQXGR.js +0 -9
|
@@ -1,118 +1,120 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
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
|
|
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
|
|
14
|
-
|
|
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] = $(
|
|
17
|
-
(e, r) => /* @__PURE__ */ d(
|
|
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
|
-
|
|
20
|
-
var te =
|
|
19
|
+
O.displayName = I;
|
|
20
|
+
var te = c.forwardRef((e, r) => {
|
|
21
21
|
const {
|
|
22
|
-
__scopeRovingFocusGroup:
|
|
22
|
+
__scopeRovingFocusGroup: s,
|
|
23
23
|
orientation: o,
|
|
24
|
-
loop:
|
|
25
|
-
dir:
|
|
26
|
-
currentTabStopId:
|
|
27
|
-
defaultCurrentTabStopId:
|
|
28
|
-
onCurrentTabStopIdChange:
|
|
29
|
-
onEntryFocus:
|
|
30
|
-
preventScrollOnEntryFocus:
|
|
31
|
-
...
|
|
32
|
-
} = e,
|
|
33
|
-
prop:
|
|
34
|
-
defaultProp:
|
|
35
|
-
onChange:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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(
|
|
41
|
-
}, [
|
|
41
|
+
return n.addEventListener(y, a), () => n.removeEventListener(y, a);
|
|
42
|
+
}, [a]), /* @__PURE__ */ d(
|
|
42
43
|
ee,
|
|
43
44
|
{
|
|
44
|
-
scope:
|
|
45
|
+
scope: s,
|
|
45
46
|
orientation: o,
|
|
46
|
-
dir:
|
|
47
|
-
loop:
|
|
48
|
-
currentTabStopId:
|
|
49
|
-
onItemFocus:
|
|
50
|
-
(n) =>
|
|
51
|
-
[
|
|
47
|
+
dir: R,
|
|
48
|
+
loop: T,
|
|
49
|
+
currentTabStopId: E,
|
|
50
|
+
onItemFocus: c.useCallback(
|
|
51
|
+
(n) => t(n),
|
|
52
|
+
[t]
|
|
52
53
|
),
|
|
53
|
-
onItemShiftTab:
|
|
54
|
-
onFocusableItemAdd:
|
|
55
|
-
() =>
|
|
54
|
+
onItemShiftTab: c.useCallback(() => h(!0), []),
|
|
55
|
+
onFocusableItemAdd: c.useCallback(
|
|
56
|
+
() => P((n) => n + 1),
|
|
56
57
|
[]
|
|
57
58
|
),
|
|
58
|
-
onFocusableItemRemove:
|
|
59
|
-
() =>
|
|
59
|
+
onFocusableItemRemove: c.useCallback(
|
|
60
|
+
() => P((n) => n - 1),
|
|
60
61
|
[]
|
|
61
62
|
),
|
|
62
63
|
children: /* @__PURE__ */ d(
|
|
63
|
-
|
|
64
|
+
G.div,
|
|
64
65
|
{
|
|
65
|
-
tabIndex:
|
|
66
|
+
tabIndex: i || L === 0 ? -1 : 0,
|
|
66
67
|
"data-orientation": o,
|
|
67
|
-
...
|
|
68
|
-
ref:
|
|
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 && !
|
|
76
|
-
const
|
|
77
|
-
if (n.currentTarget.dispatchEvent(
|
|
78
|
-
const _ =
|
|
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
|
-
|
|
82
|
+
k(H, u);
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
A.current = !1;
|
|
85
86
|
}),
|
|
86
|
-
onBlur: p(e.onBlur, () =>
|
|
87
|
+
onBlur: p(e.onBlur, () => h(!1))
|
|
87
88
|
}
|
|
88
89
|
)
|
|
89
90
|
}
|
|
90
91
|
);
|
|
91
|
-
}),
|
|
92
|
+
}), K = "RovingFocusGroupItem", M = c.forwardRef(
|
|
92
93
|
(e, r) => {
|
|
93
94
|
const {
|
|
94
|
-
__scopeRovingFocusGroup:
|
|
95
|
+
__scopeRovingFocusGroup: s,
|
|
95
96
|
focusable: o = !0,
|
|
96
|
-
active:
|
|
97
|
-
tabStopId:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
|
103
|
-
}, [o,
|
|
104
|
-
|
|
104
|
+
return g(), () => R();
|
|
105
|
+
}, [o, g, R]), /* @__PURE__ */ d(
|
|
106
|
+
D.ItemSlot,
|
|
105
107
|
{
|
|
106
|
-
scope:
|
|
108
|
+
scope: s,
|
|
107
109
|
id: m,
|
|
108
110
|
focusable: o,
|
|
109
|
-
active:
|
|
111
|
+
active: T,
|
|
110
112
|
children: /* @__PURE__ */ d(
|
|
111
|
-
|
|
113
|
+
G.span,
|
|
112
114
|
{
|
|
113
|
-
tabIndex:
|
|
115
|
+
tabIndex: b ? 0 : -1,
|
|
114
116
|
"data-orientation": u.orientation,
|
|
115
|
-
...
|
|
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
|
|
128
|
-
if (
|
|
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 =
|
|
132
|
-
if (
|
|
133
|
-
else if (
|
|
134
|
-
|
|
135
|
-
const
|
|
136
|
-
a = u.loop ?
|
|
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(() =>
|
|
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
|
-
|
|
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
|
|
162
|
-
const o = ne(e.key,
|
|
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
|
|
167
|
-
const
|
|
169
|
+
function k(e, r = !1) {
|
|
170
|
+
const s = document.activeElement;
|
|
168
171
|
for (const o of e)
|
|
169
|
-
if (o ===
|
|
172
|
+
if (o === s || (o.focus({ preventScroll: r }), document.activeElement !== s)) return;
|
|
170
173
|
}
|
|
171
|
-
function
|
|
172
|
-
return e.map((
|
|
174
|
+
function se(e, r) {
|
|
175
|
+
return e.map((s, o) => e[(r + o) % e.length]);
|
|
173
176
|
}
|
|
174
|
-
var ge =
|
|
177
|
+
var ge = O, Re = M;
|
|
175
178
|
export {
|
|
176
179
|
Re as Item,
|
|
177
180
|
ge as Root,
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
O as RovingFocusGroup,
|
|
182
|
+
M as RovingFocusGroupItem,
|
|
180
183
|
Fe as createRovingFocusGroupScope
|
|
181
184
|
};
|