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.
- 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/data-table.js +10 -10
- 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
|
@@ -12,10 +12,10 @@ import { Primitive as oe } from "../../react-primitive/dist/index.js";
|
|
|
12
12
|
import { createSlottable as re } from "../../react-slot/dist/index.js";
|
|
13
13
|
import { useControllableState as ne } from "../../react-use-controllable-state/dist/index.js";
|
|
14
14
|
import { Root as se } from "../../react-visually-hidden/dist/index.js";
|
|
15
|
-
import { jsx as
|
|
16
|
-
var [
|
|
15
|
+
import { jsx as f, jsxs as ie } from "react/jsx-runtime";
|
|
16
|
+
var [A, He] = W("Tooltip", [
|
|
17
17
|
S
|
|
18
|
-
]),
|
|
18
|
+
]), D = S(), j = "TooltipProvider", ae = 700, O = "tooltip.open", [le, k] = A(j), F = (t) => {
|
|
19
19
|
const {
|
|
20
20
|
__scopeTooltip: o,
|
|
21
21
|
delayDuration: e = ae,
|
|
@@ -24,9 +24,9 @@ var [_, He] = W("Tooltip", [
|
|
|
24
24
|
children: a
|
|
25
25
|
} = t, l = s.useRef(!0), v = s.useRef(!1), i = s.useRef(0);
|
|
26
26
|
return s.useEffect(() => {
|
|
27
|
-
const
|
|
28
|
-
return () => window.clearTimeout(
|
|
29
|
-
}, []), /* @__PURE__ */
|
|
27
|
+
const p = i.current;
|
|
28
|
+
return () => window.clearTimeout(p);
|
|
29
|
+
}, []), /* @__PURE__ */ f(
|
|
30
30
|
le,
|
|
31
31
|
{
|
|
32
32
|
scope: o,
|
|
@@ -42,85 +42,86 @@ var [_, He] = W("Tooltip", [
|
|
|
42
42
|
);
|
|
43
43
|
}, [r]),
|
|
44
44
|
isPointerInTransitRef: v,
|
|
45
|
-
onPointerInTransitChange: s.useCallback((
|
|
46
|
-
v.current =
|
|
45
|
+
onPointerInTransitChange: s.useCallback((p) => {
|
|
46
|
+
v.current = p;
|
|
47
47
|
}, []),
|
|
48
48
|
disableHoverableContent: n,
|
|
49
49
|
children: a
|
|
50
50
|
}
|
|
51
51
|
);
|
|
52
52
|
};
|
|
53
|
-
|
|
54
|
-
var
|
|
53
|
+
F.displayName = j;
|
|
54
|
+
var R = "Tooltip", [ce, _] = A(R), B = (t) => {
|
|
55
55
|
const {
|
|
56
56
|
__scopeTooltip: o,
|
|
57
57
|
children: e,
|
|
58
58
|
open: r,
|
|
59
|
-
defaultOpen: n
|
|
59
|
+
defaultOpen: n,
|
|
60
60
|
onOpenChange: a,
|
|
61
61
|
disableHoverableContent: l,
|
|
62
62
|
delayDuration: v
|
|
63
|
-
} = t, i = k(
|
|
63
|
+
} = t, i = k(R, t.__scopeTooltip), p = D(o), [c, d] = s.useState(null), h = z(), u = s.useRef(0), m = l ?? i.disableHoverableContent, y = v ?? i.delayDuration, T = s.useRef(!1), [x, C] = ne({
|
|
64
64
|
prop: r,
|
|
65
|
-
defaultProp: n,
|
|
65
|
+
defaultProp: n ?? !1,
|
|
66
66
|
onChange: (H) => {
|
|
67
67
|
H ? (i.onOpen(), document.dispatchEvent(new CustomEvent(O))) : i.onClose(), a == null || a(H);
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
|
+
caller: R
|
|
69
70
|
}), w = s.useMemo(() => x ? T.current ? "delayed-open" : "instant-open" : "closed", [x]), P = s.useCallback(() => {
|
|
70
|
-
window.clearTimeout(u.current), u.current = 0, T.current = !1,
|
|
71
|
-
}, [
|
|
72
|
-
window.clearTimeout(u.current), u.current = 0,
|
|
73
|
-
}, [
|
|
71
|
+
window.clearTimeout(u.current), u.current = 0, T.current = !1, C(!0);
|
|
72
|
+
}, [C]), E = s.useCallback(() => {
|
|
73
|
+
window.clearTimeout(u.current), u.current = 0, C(!1);
|
|
74
|
+
}, [C]), I = s.useCallback(() => {
|
|
74
75
|
window.clearTimeout(u.current), u.current = window.setTimeout(() => {
|
|
75
|
-
T.current = !0,
|
|
76
|
-
},
|
|
77
|
-
}, [
|
|
76
|
+
T.current = !0, C(!0), u.current = 0;
|
|
77
|
+
}, y);
|
|
78
|
+
}, [y, C]);
|
|
78
79
|
return s.useEffect(() => () => {
|
|
79
80
|
u.current && (window.clearTimeout(u.current), u.current = 0);
|
|
80
|
-
}, []), /* @__PURE__ */
|
|
81
|
+
}, []), /* @__PURE__ */ f(J, { ...p, children: /* @__PURE__ */ f(
|
|
81
82
|
ce,
|
|
82
83
|
{
|
|
83
84
|
scope: o,
|
|
84
|
-
contentId:
|
|
85
|
+
contentId: h,
|
|
85
86
|
open: x,
|
|
86
87
|
stateAttribute: w,
|
|
87
88
|
trigger: c,
|
|
88
|
-
onTriggerChange:
|
|
89
|
+
onTriggerChange: d,
|
|
89
90
|
onTriggerEnter: s.useCallback(() => {
|
|
90
91
|
i.isOpenDelayedRef.current ? I() : P();
|
|
91
92
|
}, [i.isOpenDelayedRef, I, P]),
|
|
92
93
|
onTriggerLeave: s.useCallback(() => {
|
|
93
|
-
|
|
94
|
-
}, [E,
|
|
94
|
+
m ? E() : (window.clearTimeout(u.current), u.current = 0);
|
|
95
|
+
}, [E, m]),
|
|
95
96
|
onOpen: P,
|
|
96
97
|
onClose: E,
|
|
97
|
-
disableHoverableContent:
|
|
98
|
+
disableHoverableContent: m,
|
|
98
99
|
children: e
|
|
99
100
|
}
|
|
100
101
|
) });
|
|
101
102
|
};
|
|
102
|
-
B.displayName =
|
|
103
|
+
B.displayName = R;
|
|
103
104
|
var L = "TooltipTrigger", U = s.forwardRef(
|
|
104
105
|
(t, o) => {
|
|
105
|
-
const { __scopeTooltip: e, ...r } = t, n =
|
|
106
|
-
return s.useEffect(() => () => document.removeEventListener("pointerup",
|
|
106
|
+
const { __scopeTooltip: e, ...r } = t, n = _(L, e), a = k(L, e), l = D(e), v = s.useRef(null), i = N(o, v, n.onTriggerChange), p = s.useRef(!1), c = s.useRef(!1), d = s.useCallback(() => p.current = !1, []);
|
|
107
|
+
return s.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ f(Q, { asChild: !0, ...l, children: /* @__PURE__ */ f(
|
|
107
108
|
oe.button,
|
|
108
109
|
{
|
|
109
110
|
"aria-describedby": n.open ? n.contentId : void 0,
|
|
110
111
|
"data-state": n.stateAttribute,
|
|
111
112
|
...r,
|
|
112
113
|
ref: i,
|
|
113
|
-
onPointerMove: g(t.onPointerMove, (
|
|
114
|
-
|
|
114
|
+
onPointerMove: g(t.onPointerMove, (h) => {
|
|
115
|
+
h.pointerType !== "touch" && !c.current && !a.isPointerInTransitRef.current && (n.onTriggerEnter(), c.current = !0);
|
|
115
116
|
}),
|
|
116
117
|
onPointerLeave: g(t.onPointerLeave, () => {
|
|
117
118
|
n.onTriggerLeave(), c.current = !1;
|
|
118
119
|
}),
|
|
119
120
|
onPointerDown: g(t.onPointerDown, () => {
|
|
120
|
-
n.open && n.onClose(),
|
|
121
|
+
n.open && n.onClose(), p.current = !0, document.addEventListener("pointerup", d, { once: !0 });
|
|
121
122
|
}),
|
|
122
123
|
onFocus: g(t.onFocus, () => {
|
|
123
|
-
|
|
124
|
+
p.current || n.onOpen();
|
|
124
125
|
}),
|
|
125
126
|
onBlur: g(t.onBlur, n.onClose),
|
|
126
127
|
onClick: g(t.onClick, n.onClose)
|
|
@@ -129,45 +130,45 @@ var L = "TooltipTrigger", U = s.forwardRef(
|
|
|
129
130
|
}
|
|
130
131
|
);
|
|
131
132
|
U.displayName = L;
|
|
132
|
-
var M = "TooltipPortal", [ue, pe] =
|
|
133
|
+
var M = "TooltipPortal", [ue, pe] = A(M, {
|
|
133
134
|
forceMount: void 0
|
|
134
135
|
}), V = (t) => {
|
|
135
|
-
const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a =
|
|
136
|
-
return /* @__PURE__ */
|
|
136
|
+
const { __scopeTooltip: o, forceMount: e, children: r, container: n } = t, a = _(M, o);
|
|
137
|
+
return /* @__PURE__ */ f(ue, { scope: o, forceMount: e, children: /* @__PURE__ */ f(G, { present: e || a.open, children: /* @__PURE__ */ f(te, { asChild: !0, container: n, children: r }) }) });
|
|
137
138
|
};
|
|
138
139
|
V.displayName = M;
|
|
139
140
|
var b = "TooltipContent", Y = s.forwardRef(
|
|
140
141
|
(t, o) => {
|
|
141
|
-
const e = pe(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l =
|
|
142
|
-
return /* @__PURE__ */
|
|
142
|
+
const e = pe(b, t.__scopeTooltip), { forceMount: r = e.forceMount, side: n = "top", ...a } = t, l = _(b, t.__scopeTooltip);
|
|
143
|
+
return /* @__PURE__ */ f(G, { present: r || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ f(q, { side: n, ...a, ref: o }) : /* @__PURE__ */ f(de, { side: n, ...a, ref: o }) });
|
|
143
144
|
}
|
|
144
145
|
), de = s.forwardRef((t, o) => {
|
|
145
|
-
const e =
|
|
146
|
-
v(null),
|
|
147
|
-
}, [
|
|
148
|
-
(
|
|
149
|
-
const T =
|
|
150
|
-
v(E),
|
|
146
|
+
const e = _(b, t.__scopeTooltip), r = k(b, t.__scopeTooltip), n = s.useRef(null), a = N(o, n), [l, v] = s.useState(null), { trigger: i, onClose: p } = e, c = n.current, { onPointerInTransitChange: d } = r, h = s.useCallback(() => {
|
|
147
|
+
v(null), d(!1);
|
|
148
|
+
}, [d]), u = s.useCallback(
|
|
149
|
+
(m, y) => {
|
|
150
|
+
const T = m.currentTarget, x = { x: m.clientX, y: m.clientY }, C = me(x, T.getBoundingClientRect()), w = Te(x, C), P = ye(y.getBoundingClientRect()), E = xe([...w, ...P]);
|
|
151
|
+
v(E), d(!0);
|
|
151
152
|
},
|
|
152
|
-
[
|
|
153
|
+
[d]
|
|
153
154
|
);
|
|
154
|
-
return s.useEffect(() => () =>
|
|
155
|
+
return s.useEffect(() => () => h(), [h]), s.useEffect(() => {
|
|
155
156
|
if (i && c) {
|
|
156
|
-
const
|
|
157
|
-
return i.addEventListener("pointerleave",
|
|
158
|
-
i.removeEventListener("pointerleave",
|
|
157
|
+
const m = (T) => u(T, c), y = (T) => u(T, i);
|
|
158
|
+
return i.addEventListener("pointerleave", m), c.addEventListener("pointerleave", y), () => {
|
|
159
|
+
i.removeEventListener("pointerleave", m), c.removeEventListener("pointerleave", y);
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
}, [i, c, u,
|
|
162
|
+
}, [i, c, u, h]), s.useEffect(() => {
|
|
162
163
|
if (l) {
|
|
163
|
-
const
|
|
164
|
-
const T =
|
|
165
|
-
|
|
164
|
+
const m = (y) => {
|
|
165
|
+
const T = y.target, x = { x: y.clientX, y: y.clientY }, C = (i == null ? void 0 : i.contains(T)) || (c == null ? void 0 : c.contains(T)), w = !Ce(x, l);
|
|
166
|
+
C ? h() : w && (h(), p());
|
|
166
167
|
};
|
|
167
|
-
return document.addEventListener("pointermove",
|
|
168
|
+
return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
|
|
168
169
|
}
|
|
169
|
-
}, [i, c, l,
|
|
170
|
-
}), [fe, ve] =
|
|
170
|
+
}, [i, c, l, p, h]), /* @__PURE__ */ f(q, { ...t, ref: a });
|
|
171
|
+
}), [fe, ve] = A(R, { isInside: !1 }), he = re("TooltipContent"), q = s.forwardRef(
|
|
171
172
|
(t, o) => {
|
|
172
173
|
const {
|
|
173
174
|
__scopeTooltip: e,
|
|
@@ -176,29 +177,29 @@ var b = "TooltipContent", Y = s.forwardRef(
|
|
|
176
177
|
onEscapeKeyDown: a,
|
|
177
178
|
onPointerDownOutside: l,
|
|
178
179
|
...v
|
|
179
|
-
} = t, i =
|
|
180
|
+
} = t, i = _(b, e), p = D(e), { onClose: c } = i;
|
|
180
181
|
return s.useEffect(() => (document.addEventListener(O, c), () => document.removeEventListener(O, c)), [c]), s.useEffect(() => {
|
|
181
182
|
if (i.trigger) {
|
|
182
|
-
const
|
|
183
|
-
const u =
|
|
183
|
+
const d = (h) => {
|
|
184
|
+
const u = h.target;
|
|
184
185
|
u != null && u.contains(i.trigger) && c();
|
|
185
186
|
};
|
|
186
|
-
return window.addEventListener("scroll",
|
|
187
|
+
return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
|
|
187
188
|
}
|
|
188
|
-
}, [i.trigger, c]), /* @__PURE__ */
|
|
189
|
+
}, [i.trigger, c]), /* @__PURE__ */ f(
|
|
189
190
|
$,
|
|
190
191
|
{
|
|
191
192
|
asChild: !0,
|
|
192
193
|
disableOutsidePointerEvents: !1,
|
|
193
194
|
onEscapeKeyDown: a,
|
|
194
195
|
onPointerDownOutside: l,
|
|
195
|
-
onFocusOutside: (
|
|
196
|
+
onFocusOutside: (d) => d.preventDefault(),
|
|
196
197
|
onDismiss: c,
|
|
197
198
|
children: /* @__PURE__ */ ie(
|
|
198
199
|
ee,
|
|
199
200
|
{
|
|
200
201
|
"data-state": i.stateAttribute,
|
|
201
|
-
...
|
|
202
|
+
...p,
|
|
202
203
|
...v,
|
|
203
204
|
ref: o,
|
|
204
205
|
style: {
|
|
@@ -210,8 +211,8 @@ var b = "TooltipContent", Y = s.forwardRef(
|
|
|
210
211
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
211
212
|
},
|
|
212
213
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ f(he, { children: r }),
|
|
215
|
+
/* @__PURE__ */ f(fe, { scope: e, isInside: !0, children: /* @__PURE__ */ f(se, { id: i.contentId, role: "tooltip", children: n || r }) })
|
|
215
216
|
]
|
|
216
217
|
}
|
|
217
218
|
)
|
|
@@ -222,11 +223,11 @@ var b = "TooltipContent", Y = s.forwardRef(
|
|
|
222
223
|
Y.displayName = b;
|
|
223
224
|
var X = "TooltipArrow", K = s.forwardRef(
|
|
224
225
|
(t, o) => {
|
|
225
|
-
const { __scopeTooltip: e, ...r } = t, n =
|
|
226
|
+
const { __scopeTooltip: e, ...r } = t, n = D(e);
|
|
226
227
|
return ve(
|
|
227
228
|
X,
|
|
228
229
|
e
|
|
229
|
-
).isInside ? null : /* @__PURE__ */
|
|
230
|
+
).isInside ? null : /* @__PURE__ */ f(Z, { ...n, ...r, ref: o });
|
|
230
231
|
}
|
|
231
232
|
);
|
|
232
233
|
K.displayName = X;
|
|
@@ -275,7 +276,7 @@ function Te(t, o, e = 5) {
|
|
|
275
276
|
}
|
|
276
277
|
return r;
|
|
277
278
|
}
|
|
278
|
-
function
|
|
279
|
+
function ye(t) {
|
|
279
280
|
const { top: o, right: e, bottom: r, left: n } = t;
|
|
280
281
|
return [
|
|
281
282
|
{ x: n, y: o },
|
|
@@ -284,12 +285,12 @@ function Ce(t) {
|
|
|
284
285
|
{ x: n, y: r }
|
|
285
286
|
];
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function Ce(t, o) {
|
|
288
289
|
const { x: e, y: r } = t;
|
|
289
290
|
let n = !1;
|
|
290
291
|
for (let a = 0, l = o.length - 1; a < o.length; l = a++) {
|
|
291
|
-
const v = o[a]
|
|
292
|
-
|
|
292
|
+
const v = o[a], i = o[l], p = v.x, c = v.y, d = i.x, h = i.y;
|
|
293
|
+
c > r != h > r && e < (d - p) * (r - c) / (h - c) + p && (n = !n);
|
|
293
294
|
}
|
|
294
295
|
return n;
|
|
295
296
|
}
|
|
@@ -322,18 +323,18 @@ function ge(t) {
|
|
|
322
323
|
}
|
|
323
324
|
return e.pop(), o.length === 1 && e.length === 1 && o[0].x === e[0].x && o[0].y === e[0].y ? o : o.concat(e);
|
|
324
325
|
}
|
|
325
|
-
var Ne =
|
|
326
|
+
var Ne = F, Se = B, Ge = U, je = V, Fe = Y, Be = K;
|
|
326
327
|
export {
|
|
327
328
|
Be as Arrow,
|
|
328
|
-
|
|
329
|
-
|
|
329
|
+
Fe as Content,
|
|
330
|
+
je as Portal,
|
|
330
331
|
Ne as Provider,
|
|
331
332
|
Se as Root,
|
|
332
333
|
B as Tooltip,
|
|
333
334
|
K as TooltipArrow,
|
|
334
335
|
Y as TooltipContent,
|
|
335
336
|
V as TooltipPortal,
|
|
336
|
-
|
|
337
|
+
F as TooltipProvider,
|
|
337
338
|
U as TooltipTrigger,
|
|
338
339
|
Ge as Trigger,
|
|
339
340
|
He as createTooltipScope
|
|
@@ -1,33 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import { useLayoutEffect as v } from "../../react-use-layout-effect/dist/index.js";
|
|
4
|
+
var E = n[" useInsertionEffect ".trim().toString()] || v;
|
|
5
|
+
function y({
|
|
5
6
|
prop: t,
|
|
6
|
-
defaultProp:
|
|
7
|
-
onChange:
|
|
8
|
-
}
|
|
7
|
+
defaultProp: u,
|
|
8
|
+
onChange: e = () => {
|
|
9
|
+
},
|
|
10
|
+
caller: i
|
|
9
11
|
}) {
|
|
10
|
-
const [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const [l, o, r] = w({
|
|
13
|
+
defaultProp: u,
|
|
14
|
+
onChange: e
|
|
15
|
+
}), c = t !== void 0, a = c ? t : l;
|
|
16
|
+
{
|
|
17
|
+
const s = n.useRef(t !== void 0);
|
|
18
|
+
n.useEffect(() => {
|
|
19
|
+
const f = s.current;
|
|
20
|
+
f !== c && console.warn(
|
|
21
|
+
`${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
22
|
+
), s.current = c;
|
|
23
|
+
}, [c, i]);
|
|
24
|
+
}
|
|
25
|
+
const m = n.useCallback(
|
|
26
|
+
(s) => {
|
|
27
|
+
var f;
|
|
28
|
+
if (c) {
|
|
29
|
+
const d = R(s) ? s(t) : s;
|
|
30
|
+
d !== t && ((f = r.current) == null || f.call(r, d));
|
|
15
31
|
} else
|
|
16
|
-
|
|
32
|
+
o(s);
|
|
17
33
|
},
|
|
18
|
-
[
|
|
34
|
+
[c, t, o, r]
|
|
19
35
|
);
|
|
20
|
-
return [
|
|
36
|
+
return [a, m];
|
|
21
37
|
}
|
|
22
|
-
function
|
|
38
|
+
function w({
|
|
23
39
|
defaultProp: t,
|
|
24
|
-
onChange:
|
|
40
|
+
onChange: u
|
|
25
41
|
}) {
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
|
|
29
|
-
}, [
|
|
42
|
+
const [e, i] = n.useState(t), l = n.useRef(e), o = n.useRef(u);
|
|
43
|
+
return E(() => {
|
|
44
|
+
o.current = u;
|
|
45
|
+
}, [u]), n.useEffect(() => {
|
|
46
|
+
var r;
|
|
47
|
+
l.current !== e && ((r = o.current) == null || r.call(o, e), l.current = e);
|
|
48
|
+
}, [e, l]), [e, i, o];
|
|
49
|
+
}
|
|
50
|
+
function R(t) {
|
|
51
|
+
return typeof t == "function";
|
|
30
52
|
}
|
|
31
53
|
export {
|
|
32
|
-
|
|
54
|
+
y as useControllableState
|
|
33
55
|
};
|
|
@@ -2,32 +2,32 @@
|
|
|
2
2
|
import * as a from "react";
|
|
3
3
|
import { Primitive as o } from "../../react-primitive/dist/index.js";
|
|
4
4
|
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
-
var d =
|
|
5
|
+
var d = Object.freeze({
|
|
6
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
7
|
+
position: "absolute",
|
|
8
|
+
border: 0,
|
|
9
|
+
width: 1,
|
|
10
|
+
height: 1,
|
|
11
|
+
padding: 0,
|
|
12
|
+
margin: -1,
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
clip: "rect(0, 0, 0, 0)",
|
|
15
|
+
whiteSpace: "nowrap",
|
|
16
|
+
wordWrap: "normal"
|
|
17
|
+
}), l = "VisuallyHidden", e = a.forwardRef(
|
|
6
18
|
(r, i) => /* @__PURE__ */ t(
|
|
7
19
|
o.span,
|
|
8
20
|
{
|
|
9
21
|
...r,
|
|
10
22
|
ref: i,
|
|
11
|
-
style: {
|
|
12
|
-
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
13
|
-
position: "absolute",
|
|
14
|
-
border: 0,
|
|
15
|
-
width: 1,
|
|
16
|
-
height: 1,
|
|
17
|
-
padding: 0,
|
|
18
|
-
margin: -1,
|
|
19
|
-
overflow: "hidden",
|
|
20
|
-
clip: "rect(0, 0, 0, 0)",
|
|
21
|
-
whiteSpace: "nowrap",
|
|
22
|
-
wordWrap: "normal",
|
|
23
|
-
...r.style
|
|
24
|
-
}
|
|
23
|
+
style: { ...d, ...r.style }
|
|
25
24
|
}
|
|
26
25
|
)
|
|
27
26
|
);
|
|
28
|
-
e.displayName =
|
|
29
|
-
var
|
|
27
|
+
e.displayName = l;
|
|
28
|
+
var p = e;
|
|
30
29
|
export {
|
|
31
|
-
|
|
30
|
+
p as Root,
|
|
31
|
+
d as VISUALLY_HIDDEN_STYLES,
|
|
32
32
|
e as VisuallyHidden
|
|
33
33
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { flushSync as c } from "react-dom";
|
|
4
|
+
import { Virtualizer as f, elementScroll as i, observeElementOffset as m, observeElementRect as d } from "../../../virtual-core/dist/esm/index.js";
|
|
5
|
+
import { defaultKeyExtractor as R, defaultRangeExtractor as g, measureElement as z } from "../../../virtual-core/dist/esm/index.js";
|
|
6
|
+
const l = typeof document < "u" ? r.useLayoutEffect : r.useEffect;
|
|
7
|
+
function p(e) {
|
|
8
|
+
const n = r.useReducer(() => ({}), {})[1], o = {
|
|
9
|
+
...e,
|
|
10
|
+
onChange: (a, u) => {
|
|
11
|
+
var s;
|
|
12
|
+
u ? c(n) : n(), (s = e.onChange) == null || s.call(e, a, u);
|
|
13
|
+
}
|
|
14
|
+
}, [t] = r.useState(
|
|
15
|
+
() => new f(o)
|
|
16
|
+
);
|
|
17
|
+
return t.setOptions(o), l(() => t._didMount(), []), l(() => t._willUpdate()), t;
|
|
18
|
+
}
|
|
19
|
+
function h(e) {
|
|
20
|
+
return p({
|
|
21
|
+
observeElementRect: d,
|
|
22
|
+
observeElementOffset: m,
|
|
23
|
+
scrollToFn: i,
|
|
24
|
+
...e
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
f as Virtualizer,
|
|
29
|
+
R as defaultKeyExtractor,
|
|
30
|
+
g as defaultRangeExtractor,
|
|
31
|
+
i as elementScroll,
|
|
32
|
+
z as measureElement,
|
|
33
|
+
m as observeElementOffset,
|
|
34
|
+
d as observeElementRect,
|
|
35
|
+
h as useVirtualizer
|
|
36
|
+
};
|