@konstructio/ui 0.1.2-alpha.20 → 0.1.2-alpha.22
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/{Modal-B8jrP02v.js → Modal-Dpk-1N9W.js} +2 -2
- package/dist/chevron-down-DgT-uSF9.js +5 -0
- package/dist/chevron-right-DYvXLeql.js +7 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +2 -8
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +1 -1
- package/dist/components/Breadcrumb/hooks/useBreadcrumb.js +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Checkbox/Checkbox.js +6 -7
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +1 -1
- package/dist/components/Dropdown/components/List/List.js +1 -1
- package/dist/components/Dropdown/components/Wrapper.js +52 -64
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +1 -7
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Body/Body.js +1 -1
- package/dist/components/Modal/components/Footer/Footer.js +1 -1
- package/dist/components/Modal/components/Header/Header.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +0 -18
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +10 -11
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Toast/Toast.js +233 -210
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +64 -67
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +2 -2
- package/dist/components/VirtualizedTable/components/Body/Body.js +36 -22
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +1 -1
- package/dist/components/VirtualizedTable/components/Header/Header.js +40 -38
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +23 -16
- package/dist/components/VirtualizedTable/components/Skeleton/Skeleton.js +52 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +263 -236
- package/dist/components/VirtualizedTable/components/WrapperBody/WrapperBody.js +27 -0
- package/dist/components/VirtualizedTable/components/index.js +8 -6
- package/dist/components/VirtualizedTable/contexts/table.context.js +1 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +43 -42
- package/dist/components/index.js +1 -1
- package/dist/contexts/theme.provider.js +0 -1
- package/dist/{createLucideIcon-DGhJ8Z4k.js → createLucideIcon-D4r5Phnh.js} +0 -24
- package/dist/{ellipsis-vertical-DpnVYRxI.js → ellipsis-vertical-BVPtjl5f.js} +1 -7
- package/dist/{index-N2OStZoU.js → index--V_ZsiQe.js} +0 -21
- package/dist/{index-bwWKd82e.js → index-BbQkJE5L.js} +1 -1
- package/dist/index-BtQfgaSF.js +60 -0
- package/dist/index-CIAmiWcw.js +200 -0
- package/dist/index-CSFe9uC5.js +14 -0
- package/dist/{index-Dx2grAuN.js → index-CSWGJT-v.js} +0 -20
- package/dist/index-CigKKiZS.js +91 -0
- package/dist/index-DDByhzds.js +137 -0
- package/dist/{index-DQJhMz8c.js → index-DH2Fnov1.js} +11 -12
- package/dist/index-DLcqcWxM.js +29 -0
- package/dist/{index-CffpTFMi.js → index-Dbt2vBmS.js} +5 -6
- package/dist/{index-l3NwplN0.js → index-DpW9ExsS.js} +10 -11
- package/dist/index-DrWQH0QF.js +55 -0
- package/dist/{index-0XtjXVpJ.js → index-X4k_cU8k.js} +4 -4
- package/dist/index-kyuBfLcN.js +479 -0
- package/dist/{index-C1g_chDT.js → index-mPY_8Y5v.js} +2 -2
- package/dist/{index-BAEWsOG1.js → index-ohdbKsws.js} +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/package.json +17 -17
- package/dist/styles.css +1 -1
- package/dist/{useBreadcrumb-B8DnuqkR.js → useBreadcrumb-BAHbGQ_O.js} +0 -10
- package/dist/{x-4F_5p77m.js → x-DPU9OdYH.js} +1 -1
- package/package.json +17 -17
- package/dist/chevron-down-J5nS1Tu0.js +0 -11
- package/dist/chevron-right-DeMVrnIg.js +0 -19
- package/dist/components/Skeleton/Skeleton.js +0 -42
- package/dist/index-BVRIAMfe.js +0 -36
- package/dist/index-BfXxHr_2.js +0 -125
- package/dist/index-Bn4c-gww.js +0 -131
- package/dist/index-Cvx4lqTq.js +0 -47
- package/dist/index-DQH6odE9.js +0 -82
- package/dist/index-DdXGVVBv.js +0 -15
- package/dist/index-amYX3uxF.js +0 -436
- package/dist/index-sp5ZfG6g.js +0 -31
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as R, Fragment as zt, jsxs as nt } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
|
-
import { useLayoutEffect as
|
|
4
|
-
import { c as ot, u as je, a as
|
|
5
|
-
import { u as
|
|
6
|
-
import { D as
|
|
7
|
-
import { u as
|
|
8
|
-
import * as
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
import {
|
|
12
|
-
import { P as Qt } from "../../../../index-C1g_chDT.js";
|
|
13
|
-
import { R as en } from "../../../../index-sp5ZfG6g.js";
|
|
3
|
+
import { useLayoutEffect as jt, useRef as Yt, useState as Xt, useCallback as Gt, useEffect as ze } from "react";
|
|
4
|
+
import { P as le, c as ot, u as je, a as qt, b as J } from "../../../../index-CIAmiWcw.js";
|
|
5
|
+
import { u as we } from "../../../../index-DLcqcWxM.js";
|
|
6
|
+
import { D as Ut } from "../../../../index-Dbt2vBmS.js";
|
|
7
|
+
import { u as Kt } from "../../../../index-BbQkJE5L.js";
|
|
8
|
+
import * as Zt from "react-dom";
|
|
9
|
+
import { u as Jt } from "../../../../index-0ioNhtNM.js";
|
|
10
|
+
import { u as Qt } from "../../../../index-ohdbKsws.js";
|
|
11
|
+
import { P as en } from "../../../../index-mPY_8Y5v.js";
|
|
14
12
|
import { d as tn } from "../../../../debounce-BFejQm9P.js";
|
|
15
|
-
const nn = ["top", "right", "bottom", "left"], U = Math.min, F = Math.max,
|
|
13
|
+
const nn = ["top", "right", "bottom", "left"], U = Math.min, F = Math.max, pe = Math.round, ue = Math.floor, j = (e) => ({
|
|
16
14
|
x: e,
|
|
17
15
|
y: e
|
|
18
16
|
}), on = {
|
|
@@ -53,10 +51,10 @@ function cn(e, t, n) {
|
|
|
53
51
|
n === void 0 && (n = !1);
|
|
54
52
|
const o = ne(e), r = _e(e), i = ke(r);
|
|
55
53
|
let s = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
56
|
-
return t.reference[i] > t.floating[i] && (s =
|
|
54
|
+
return t.reference[i] > t.floating[i] && (s = he(s)), [s, he(s)];
|
|
57
55
|
}
|
|
58
56
|
function ln(e) {
|
|
59
|
-
const t =
|
|
57
|
+
const t = he(e);
|
|
60
58
|
return [Ee(e), t, Ee(t)];
|
|
61
59
|
}
|
|
62
60
|
function Ee(e) {
|
|
@@ -80,7 +78,7 @@ function dn(e, t, n, o) {
|
|
|
80
78
|
let i = un(q(e), n === "start", o);
|
|
81
79
|
return r && (i = i.map((s) => s + "-" + r), t && (i = i.concat(i.map(Ee)))), i;
|
|
82
80
|
}
|
|
83
|
-
function
|
|
81
|
+
function he(e) {
|
|
84
82
|
return e.replace(/left|right|bottom|top/g, (t) => on[t]);
|
|
85
83
|
}
|
|
86
84
|
function pn(e) {
|
|
@@ -166,7 +164,7 @@ function Ge(e, t, n) {
|
|
|
166
164
|
}
|
|
167
165
|
return d;
|
|
168
166
|
}
|
|
169
|
-
const
|
|
167
|
+
const hn = async (e, t, n) => {
|
|
170
168
|
const {
|
|
171
169
|
placement: o = "bottom",
|
|
172
170
|
strategy: r = "absolute",
|
|
@@ -180,12 +178,12 @@ const mn = async (e, t, n) => {
|
|
|
180
178
|
}), {
|
|
181
179
|
x: a,
|
|
182
180
|
y: u
|
|
183
|
-
} = Ge(f, o, c), p = o, d = {},
|
|
184
|
-
for (let
|
|
181
|
+
} = Ge(f, o, c), p = o, d = {}, h = 0;
|
|
182
|
+
for (let m = 0; m < l.length; m++) {
|
|
185
183
|
const {
|
|
186
184
|
name: w,
|
|
187
185
|
fn: x
|
|
188
|
-
} = l[
|
|
186
|
+
} = l[m], {
|
|
189
187
|
x: y,
|
|
190
188
|
y: C,
|
|
191
189
|
data: v,
|
|
@@ -210,14 +208,14 @@ const mn = async (e, t, n) => {
|
|
|
210
208
|
...d[w],
|
|
211
209
|
...v
|
|
212
210
|
}
|
|
213
|
-
}, b &&
|
|
211
|
+
}, b && h <= 50 && (h++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (f = b.rects === !0 ? await s.getElementRects({
|
|
214
212
|
reference: e,
|
|
215
213
|
floating: t,
|
|
216
214
|
strategy: r
|
|
217
215
|
}) : b.rects), {
|
|
218
216
|
x: a,
|
|
219
217
|
y: u
|
|
220
|
-
} = Ge(f, p, c)),
|
|
218
|
+
} = Ge(f, p, c)), m = -1);
|
|
221
219
|
}
|
|
222
220
|
return {
|
|
223
221
|
x: a,
|
|
@@ -243,7 +241,7 @@ async function ie(e, t) {
|
|
|
243
241
|
elementContext: u = "floating",
|
|
244
242
|
altBoundary: p = !1,
|
|
245
243
|
padding: d = 0
|
|
246
|
-
} = G(t, e),
|
|
244
|
+
} = G(t, e), h = rt(d), w = l[p ? u === "floating" ? "reference" : "floating" : u], x = me(await i.getClippingRect({
|
|
247
245
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(w))) == null || n ? w : w.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)),
|
|
248
246
|
boundary: f,
|
|
249
247
|
rootBoundary: a,
|
|
@@ -266,13 +264,13 @@ async function ie(e, t) {
|
|
|
266
264
|
strategy: c
|
|
267
265
|
}) : y);
|
|
268
266
|
return {
|
|
269
|
-
top: (x.top - b.top +
|
|
270
|
-
bottom: (b.bottom - x.bottom +
|
|
271
|
-
left: (x.left - b.left +
|
|
272
|
-
right: (b.right - x.right +
|
|
267
|
+
top: (x.top - b.top + h.top) / v.y,
|
|
268
|
+
bottom: (b.bottom - x.bottom + h.bottom) / v.y,
|
|
269
|
+
left: (x.left - b.left + h.left) / v.x,
|
|
270
|
+
right: (b.right - x.right + h.right) / v.x
|
|
273
271
|
};
|
|
274
272
|
}
|
|
275
|
-
const
|
|
273
|
+
const mn = (e) => ({
|
|
276
274
|
name: "arrow",
|
|
277
275
|
options: e,
|
|
278
276
|
async fn(t) {
|
|
@@ -293,10 +291,10 @@ const hn = (e) => ({
|
|
|
293
291
|
const u = rt(a), p = {
|
|
294
292
|
x: n,
|
|
295
293
|
y: o
|
|
296
|
-
}, d = _e(r),
|
|
297
|
-
let
|
|
298
|
-
(!
|
|
299
|
-
const M = v / 2 - b / 2, H =
|
|
294
|
+
}, d = _e(r), h = ke(d), m = await s.getDimensions(f), w = d === "y", x = w ? "top" : "left", y = w ? "bottom" : "right", C = w ? "clientHeight" : "clientWidth", v = i.reference[h] + i.reference[d] - p[d] - i.floating[h], b = p[d] - i.reference[d], T = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(f));
|
|
295
|
+
let P = T ? T[C] : 0;
|
|
296
|
+
(!P || !await (s.isElement == null ? void 0 : s.isElement(T))) && (P = l.floating[C] || i.floating[h]);
|
|
297
|
+
const M = v / 2 - b / 2, H = P / 2 - m[h] / 2 - 1, D = U(u[x], H), _ = U(u[y], H), N = D, E = P - m[h] - _, O = P / 2 - m[h] / 2 + M, $ = Oe(N, O, E), S = !c.arrow && ne(r) != null && O !== $ && i.reference[h] / 2 - (O < N ? D : _) - m[h] / 2 < 0, L = S ? O < N ? O - N : O - E : 0;
|
|
300
298
|
return {
|
|
301
299
|
[d]: p[d] + L,
|
|
302
300
|
data: {
|
|
@@ -327,15 +325,15 @@ const hn = (e) => ({
|
|
|
327
325
|
crossAxis: u = !0,
|
|
328
326
|
fallbackPlacements: p,
|
|
329
327
|
fallbackStrategy: d = "bestFit",
|
|
330
|
-
fallbackAxisSideDirection:
|
|
331
|
-
flipAlignment:
|
|
328
|
+
fallbackAxisSideDirection: h = "none",
|
|
329
|
+
flipAlignment: m = !0,
|
|
332
330
|
...w
|
|
333
331
|
} = G(e, t);
|
|
334
332
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
335
333
|
return {};
|
|
336
|
-
const x = q(r), y = z(l), C = q(l) === l, v = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), b = p || (C || !
|
|
337
|
-
!p && T && b.push(...dn(l,
|
|
338
|
-
const
|
|
334
|
+
const x = q(r), y = z(l), C = q(l) === l, v = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), b = p || (C || !m ? [he(l)] : ln(l)), T = h !== "none";
|
|
335
|
+
!p && T && b.push(...dn(l, m, h, v));
|
|
336
|
+
const P = [l, ...b], M = await ie(t, w), H = [];
|
|
339
337
|
let D = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
340
338
|
if (a && H.push(M[x]), u) {
|
|
341
339
|
const O = cn(r, s, v);
|
|
@@ -346,7 +344,7 @@ const hn = (e) => ({
|
|
|
346
344
|
overflows: H
|
|
347
345
|
}], !H.every((O) => O <= 0)) {
|
|
348
346
|
var _, N;
|
|
349
|
-
const O = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, $ =
|
|
347
|
+
const O = (((_ = i.flip) == null ? void 0 : _.index) || 0) + 1, $ = P[O];
|
|
350
348
|
if ($ && (!(u === "alignment" ? y !== z($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
351
349
|
// overflows the main axis.
|
|
352
350
|
D.every((A) => z(A.placement) === y ? A.overflows[0] > 0 : !0)))
|
|
@@ -453,7 +451,7 @@ async function xn(e, t) {
|
|
|
453
451
|
let {
|
|
454
452
|
mainAxis: p,
|
|
455
453
|
crossAxis: d,
|
|
456
|
-
alignmentAxis:
|
|
454
|
+
alignmentAxis: h
|
|
457
455
|
} = typeof u == "number" ? {
|
|
458
456
|
mainAxis: u,
|
|
459
457
|
crossAxis: 0,
|
|
@@ -463,7 +461,7 @@ async function xn(e, t) {
|
|
|
463
461
|
crossAxis: u.crossAxis || 0,
|
|
464
462
|
alignmentAxis: u.alignmentAxis
|
|
465
463
|
};
|
|
466
|
-
return l && typeof
|
|
464
|
+
return l && typeof h == "number" && (d = l === "end" ? h * -1 : h), c ? {
|
|
467
465
|
x: d * a,
|
|
468
466
|
y: p * f
|
|
469
467
|
} : {
|
|
@@ -522,25 +520,25 @@ const yn = function(e) {
|
|
|
522
520
|
x: n,
|
|
523
521
|
y: o
|
|
524
522
|
}, a = await ie(t, c), u = z(q(r)), p = Me(u);
|
|
525
|
-
let d = f[p],
|
|
523
|
+
let d = f[p], h = f[u];
|
|
526
524
|
if (i) {
|
|
527
525
|
const w = p === "y" ? "top" : "left", x = p === "y" ? "bottom" : "right", y = d + a[w], C = d - a[x];
|
|
528
526
|
d = Oe(y, d, C);
|
|
529
527
|
}
|
|
530
528
|
if (s) {
|
|
531
|
-
const w = u === "y" ? "top" : "left", x = u === "y" ? "bottom" : "right", y =
|
|
532
|
-
|
|
529
|
+
const w = u === "y" ? "top" : "left", x = u === "y" ? "bottom" : "right", y = h + a[w], C = h - a[x];
|
|
530
|
+
h = Oe(y, h, C);
|
|
533
531
|
}
|
|
534
|
-
const
|
|
532
|
+
const m = l.fn({
|
|
535
533
|
...t,
|
|
536
534
|
[p]: d,
|
|
537
|
-
[u]:
|
|
535
|
+
[u]: h
|
|
538
536
|
});
|
|
539
537
|
return {
|
|
540
|
-
...
|
|
538
|
+
...m,
|
|
541
539
|
data: {
|
|
542
|
-
x:
|
|
543
|
-
y:
|
|
540
|
+
x: m.x - n,
|
|
541
|
+
y: m.y - o,
|
|
544
542
|
enabled: {
|
|
545
543
|
[p]: i,
|
|
546
544
|
[u]: s
|
|
@@ -567,14 +565,14 @@ const yn = function(e) {
|
|
|
567
565
|
x: n,
|
|
568
566
|
y: o
|
|
569
567
|
}, u = z(r), p = Me(u);
|
|
570
|
-
let d = a[p],
|
|
571
|
-
const
|
|
572
|
-
mainAxis:
|
|
568
|
+
let d = a[p], h = a[u];
|
|
569
|
+
const m = G(l, t), w = typeof m == "number" ? {
|
|
570
|
+
mainAxis: m,
|
|
573
571
|
crossAxis: 0
|
|
574
572
|
} : {
|
|
575
573
|
mainAxis: 0,
|
|
576
574
|
crossAxis: 0,
|
|
577
|
-
...
|
|
575
|
+
...m
|
|
578
576
|
};
|
|
579
577
|
if (c) {
|
|
580
578
|
const C = p === "y" ? "height" : "width", v = i.reference[p] - i.floating[C] + w.mainAxis, b = i.reference[p] + i.reference[C] - w.mainAxis;
|
|
@@ -583,11 +581,11 @@ const yn = function(e) {
|
|
|
583
581
|
if (f) {
|
|
584
582
|
var x, y;
|
|
585
583
|
const C = p === "y" ? "width" : "height", v = it.has(q(r)), b = i.reference[u] - i.floating[C] + (v && ((x = s.offset) == null ? void 0 : x[u]) || 0) + (v ? 0 : w.crossAxis), T = i.reference[u] + i.reference[C] + (v ? 0 : ((y = s.offset) == null ? void 0 : y[u]) || 0) - (v ? w.crossAxis : 0);
|
|
586
|
-
|
|
584
|
+
h < b ? h = b : h > T && (h = T);
|
|
587
585
|
}
|
|
588
586
|
return {
|
|
589
587
|
[p]: d,
|
|
590
|
-
[u]:
|
|
588
|
+
[u]: h
|
|
591
589
|
};
|
|
592
590
|
}
|
|
593
591
|
};
|
|
@@ -607,24 +605,24 @@ const yn = function(e) {
|
|
|
607
605
|
},
|
|
608
606
|
...f
|
|
609
607
|
} = G(e, t), a = await ie(t, f), u = q(r), p = ne(r), d = z(r) === "y", {
|
|
610
|
-
width:
|
|
611
|
-
height:
|
|
608
|
+
width: h,
|
|
609
|
+
height: m
|
|
612
610
|
} = i.floating;
|
|
613
611
|
let w, x;
|
|
614
612
|
u === "top" || u === "bottom" ? (w = u, x = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (x = u, w = p === "end" ? "top" : "bottom");
|
|
615
|
-
const y =
|
|
616
|
-
let
|
|
617
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = C), (o = t.middlewareData.shift) != null && o.enabled.y && (
|
|
613
|
+
const y = m - a.top - a.bottom, C = h - a.left - a.right, v = U(m - a[w], y), b = U(h - a[x], C), T = !t.middlewareData.shift;
|
|
614
|
+
let P = v, M = b;
|
|
615
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (M = C), (o = t.middlewareData.shift) != null && o.enabled.y && (P = y), T && !p) {
|
|
618
616
|
const D = F(a.left, 0), _ = F(a.right, 0), N = F(a.top, 0), E = F(a.bottom, 0);
|
|
619
|
-
d ? M =
|
|
617
|
+
d ? M = h - 2 * (D !== 0 || _ !== 0 ? D + _ : F(a.left, a.right)) : P = m - 2 * (N !== 0 || E !== 0 ? N + E : F(a.top, a.bottom));
|
|
620
618
|
}
|
|
621
619
|
await c({
|
|
622
620
|
...t,
|
|
623
621
|
availableWidth: M,
|
|
624
|
-
availableHeight:
|
|
622
|
+
availableHeight: P
|
|
625
623
|
});
|
|
626
624
|
const H = await s.getDimensions(l.floating);
|
|
627
|
-
return
|
|
625
|
+
return h !== H.width || m !== H.height ? {
|
|
628
626
|
reset: {
|
|
629
627
|
rects: !0
|
|
630
628
|
}
|
|
@@ -638,7 +636,7 @@ function xe() {
|
|
|
638
636
|
function oe(e) {
|
|
639
637
|
return st(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
640
638
|
}
|
|
641
|
-
function
|
|
639
|
+
function I(e) {
|
|
642
640
|
var t;
|
|
643
641
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
644
642
|
}
|
|
@@ -647,19 +645,19 @@ function X(e) {
|
|
|
647
645
|
return (t = (st(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
648
646
|
}
|
|
649
647
|
function st(e) {
|
|
650
|
-
return xe() ? e instanceof Node || e instanceof
|
|
648
|
+
return xe() ? e instanceof Node || e instanceof I(e).Node : !1;
|
|
651
649
|
}
|
|
652
|
-
function
|
|
653
|
-
return xe() ? e instanceof Element || e instanceof
|
|
650
|
+
function W(e) {
|
|
651
|
+
return xe() ? e instanceof Element || e instanceof I(e).Element : !1;
|
|
654
652
|
}
|
|
655
653
|
function Y(e) {
|
|
656
|
-
return xe() ? e instanceof HTMLElement || e instanceof
|
|
654
|
+
return xe() ? e instanceof HTMLElement || e instanceof I(e).HTMLElement : !1;
|
|
657
655
|
}
|
|
658
656
|
function Ke(e) {
|
|
659
|
-
return !xe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
657
|
+
return !xe() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof I(e).ShadowRoot;
|
|
660
658
|
}
|
|
661
659
|
const An = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
662
|
-
function
|
|
660
|
+
function ae(e) {
|
|
663
661
|
const {
|
|
664
662
|
overflow: t,
|
|
665
663
|
overflowX: n,
|
|
@@ -684,7 +682,7 @@ function ye(e) {
|
|
|
684
682
|
}
|
|
685
683
|
const On = ["transform", "translate", "scale", "rotate", "perspective"], En = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Sn = ["paint", "layout", "strict", "content"];
|
|
686
684
|
function Ne(e) {
|
|
687
|
-
const t = He(), n =
|
|
685
|
+
const t = He(), n = W(e) ? B(e) : e;
|
|
688
686
|
return On.some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || En.some((o) => (n.willChange || "").includes(o)) || Sn.some((o) => (n.contain || "").includes(o));
|
|
689
687
|
}
|
|
690
688
|
function Ln(e) {
|
|
@@ -706,10 +704,10 @@ function ee(e) {
|
|
|
706
704
|
return Dn.has(oe(e));
|
|
707
705
|
}
|
|
708
706
|
function B(e) {
|
|
709
|
-
return
|
|
707
|
+
return I(e).getComputedStyle(e);
|
|
710
708
|
}
|
|
711
709
|
function ve(e) {
|
|
712
|
-
return
|
|
710
|
+
return W(e) ? {
|
|
713
711
|
scrollLeft: e.scrollLeft,
|
|
714
712
|
scrollTop: e.scrollTop
|
|
715
713
|
} : {
|
|
@@ -731,15 +729,15 @@ function K(e) {
|
|
|
731
729
|
}
|
|
732
730
|
function ct(e) {
|
|
733
731
|
const t = K(e);
|
|
734
|
-
return ee(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) &&
|
|
732
|
+
return ee(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && ae(t) ? t : ct(t);
|
|
735
733
|
}
|
|
736
734
|
function se(e, t, n) {
|
|
737
735
|
var o;
|
|
738
736
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
739
|
-
const r = ct(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), s =
|
|
737
|
+
const r = ct(e), i = r === ((o = e.ownerDocument) == null ? void 0 : o.body), s = I(r);
|
|
740
738
|
if (i) {
|
|
741
739
|
const l = Se(s);
|
|
742
|
-
return t.concat(s, s.visualViewport || [],
|
|
740
|
+
return t.concat(s, s.visualViewport || [], ae(r) ? r : [], l && n ? se(l) : []);
|
|
743
741
|
}
|
|
744
742
|
return t.concat(r, se(r, [], n));
|
|
745
743
|
}
|
|
@@ -749,7 +747,7 @@ function Se(e) {
|
|
|
749
747
|
function lt(e) {
|
|
750
748
|
const t = B(e);
|
|
751
749
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
752
|
-
const r = Y(e), i = r ? e.offsetWidth : n, s = r ? e.offsetHeight : o, l =
|
|
750
|
+
const r = Y(e), i = r ? e.offsetWidth : n, s = r ? e.offsetHeight : o, l = pe(n) !== i || pe(o) !== s;
|
|
753
751
|
return l && (n = i, o = s), {
|
|
754
752
|
width: n,
|
|
755
753
|
height: o,
|
|
@@ -757,7 +755,7 @@ function lt(e) {
|
|
|
757
755
|
};
|
|
758
756
|
}
|
|
759
757
|
function $e(e) {
|
|
760
|
-
return
|
|
758
|
+
return W(e) ? e : e.contextElement;
|
|
761
759
|
}
|
|
762
760
|
function Q(e) {
|
|
763
761
|
const t = $e(e);
|
|
@@ -768,7 +766,7 @@ function Q(e) {
|
|
|
768
766
|
height: r,
|
|
769
767
|
$: i
|
|
770
768
|
} = lt(t);
|
|
771
|
-
let s = (i ?
|
|
769
|
+
let s = (i ? pe(n.width) : n.width) / o, l = (i ? pe(n.height) : n.height) / r;
|
|
772
770
|
return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
773
771
|
x: s,
|
|
774
772
|
y: l
|
|
@@ -776,28 +774,28 @@ function Q(e) {
|
|
|
776
774
|
}
|
|
777
775
|
const Mn = /* @__PURE__ */ j(0);
|
|
778
776
|
function at(e) {
|
|
779
|
-
const t =
|
|
777
|
+
const t = I(e);
|
|
780
778
|
return !He() || !t.visualViewport ? Mn : {
|
|
781
779
|
x: t.visualViewport.offsetLeft,
|
|
782
780
|
y: t.visualViewport.offsetTop
|
|
783
781
|
};
|
|
784
782
|
}
|
|
785
783
|
function kn(e, t, n) {
|
|
786
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
784
|
+
return t === void 0 && (t = !1), !n || t && n !== I(e) ? !1 : t;
|
|
787
785
|
}
|
|
788
786
|
function Z(e, t, n, o) {
|
|
789
787
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
790
788
|
const r = e.getBoundingClientRect(), i = $e(e);
|
|
791
789
|
let s = j(1);
|
|
792
|
-
t && (o ?
|
|
790
|
+
t && (o ? W(o) && (s = Q(o)) : s = Q(e));
|
|
793
791
|
const l = kn(i, n, o) ? at(i) : j(0);
|
|
794
792
|
let c = (r.left + l.x) / s.x, f = (r.top + l.y) / s.y, a = r.width / s.x, u = r.height / s.y;
|
|
795
793
|
if (i) {
|
|
796
|
-
const p =
|
|
797
|
-
let
|
|
798
|
-
for (;
|
|
799
|
-
const w = Q(
|
|
800
|
-
c *= w.x, f *= w.y, a *= w.x, u *= w.y, c += C, f += v,
|
|
794
|
+
const p = I(i), d = o && W(o) ? I(o) : o;
|
|
795
|
+
let h = p, m = Se(h);
|
|
796
|
+
for (; m && o && d !== h; ) {
|
|
797
|
+
const w = Q(m), x = m.getBoundingClientRect(), y = B(m), C = x.left + (m.clientLeft + parseFloat(y.paddingLeft)) * w.x, v = x.top + (m.clientTop + parseFloat(y.paddingTop)) * w.y;
|
|
798
|
+
c *= w.x, f *= w.y, a *= w.x, u *= w.y, c += C, f += v, h = I(m), m = Se(h);
|
|
801
799
|
}
|
|
802
800
|
}
|
|
803
801
|
return me({
|
|
@@ -833,7 +831,7 @@ function _n(e) {
|
|
|
833
831
|
scrollTop: 0
|
|
834
832
|
}, f = j(1);
|
|
835
833
|
const a = j(0), u = Y(o);
|
|
836
|
-
if ((u || !u && !i) && ((oe(o) !== "body" ||
|
|
834
|
+
if ((u || !u && !i) && ((oe(o) !== "body" || ae(s)) && (c = ve(o)), Y(o))) {
|
|
837
835
|
const d = Z(o);
|
|
838
836
|
f = Q(o), a.x = d.x + o.clientLeft, a.y = d.y + o.clientTop;
|
|
839
837
|
}
|
|
@@ -861,7 +859,7 @@ function Hn(e) {
|
|
|
861
859
|
}
|
|
862
860
|
const Ze = 25;
|
|
863
861
|
function $n(e, t) {
|
|
864
|
-
const n =
|
|
862
|
+
const n = I(e), o = X(e), r = n.visualViewport;
|
|
865
863
|
let i = o.clientWidth, s = o.clientHeight, l = 0, c = 0;
|
|
866
864
|
if (r) {
|
|
867
865
|
i = r.width, s = r.height;
|
|
@@ -870,8 +868,8 @@ function $n(e, t) {
|
|
|
870
868
|
}
|
|
871
869
|
const f = be(o);
|
|
872
870
|
if (f <= 0) {
|
|
873
|
-
const a = o.ownerDocument, u = a.body, p = getComputedStyle(u), d = a.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0,
|
|
874
|
-
|
|
871
|
+
const a = o.ownerDocument, u = a.body, p = getComputedStyle(u), d = a.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, h = Math.abs(o.clientWidth - u.clientWidth - d);
|
|
872
|
+
h <= Ze && (i -= h);
|
|
875
873
|
} else f <= Ze && (i += f);
|
|
876
874
|
return {
|
|
877
875
|
width: i,
|
|
@@ -881,7 +879,7 @@ function $n(e, t) {
|
|
|
881
879
|
};
|
|
882
880
|
}
|
|
883
881
|
const Fn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
884
|
-
function
|
|
882
|
+
function In(e, t) {
|
|
885
883
|
const n = Z(e, !0, t === "fixed"), o = n.top + e.clientTop, r = n.left + e.clientLeft, i = Y(e) ? Q(e) : j(1), s = e.clientWidth * i.x, l = e.clientHeight * i.y, c = r * i.x, f = o * i.y;
|
|
886
884
|
return {
|
|
887
885
|
width: s,
|
|
@@ -896,8 +894,8 @@ function Je(e, t, n) {
|
|
|
896
894
|
o = $n(e, n);
|
|
897
895
|
else if (t === "document")
|
|
898
896
|
o = Hn(X(e));
|
|
899
|
-
else if (
|
|
900
|
-
o =
|
|
897
|
+
else if (W(t))
|
|
898
|
+
o = In(t, n);
|
|
901
899
|
else {
|
|
902
900
|
const r = at(e);
|
|
903
901
|
o = {
|
|
@@ -911,18 +909,18 @@ function Je(e, t, n) {
|
|
|
911
909
|
}
|
|
912
910
|
function ut(e, t) {
|
|
913
911
|
const n = K(e);
|
|
914
|
-
return n === t || !
|
|
912
|
+
return n === t || !W(n) || ee(n) ? !1 : B(n).position === "fixed" || ut(n, t);
|
|
915
913
|
}
|
|
916
|
-
function
|
|
914
|
+
function Wn(e, t) {
|
|
917
915
|
const n = t.get(e);
|
|
918
916
|
if (n)
|
|
919
917
|
return n;
|
|
920
|
-
let o = se(e, [], !1).filter((l) =>
|
|
918
|
+
let o = se(e, [], !1).filter((l) => W(l) && oe(l) !== "body"), r = null;
|
|
921
919
|
const i = B(e).position === "fixed";
|
|
922
920
|
let s = i ? K(e) : e;
|
|
923
|
-
for (;
|
|
921
|
+
for (; W(s) && !ee(s); ) {
|
|
924
922
|
const l = B(s), c = Ne(s);
|
|
925
|
-
!c && l.position === "fixed" && (r = null), (i ? !c && !r : !c && l.position === "static" && !!r && Fn.has(r.position) ||
|
|
923
|
+
!c && l.position === "fixed" && (r = null), (i ? !c && !r : !c && l.position === "static" && !!r && Fn.has(r.position) || ae(s) && !c && ut(e, s)) ? o = o.filter((a) => a !== s) : r = l, s = K(s);
|
|
926
924
|
}
|
|
927
925
|
return t.set(e, o), o;
|
|
928
926
|
}
|
|
@@ -933,7 +931,7 @@ function Bn(e) {
|
|
|
933
931
|
rootBoundary: o,
|
|
934
932
|
strategy: r
|
|
935
933
|
} = e;
|
|
936
|
-
const s = [...n === "clippingAncestors" ? ye(t) ? [] :
|
|
934
|
+
const s = [...n === "clippingAncestors" ? ye(t) ? [] : Wn(t, this._c) : [].concat(n), o], l = s[0], c = s.reduce((f, a) => {
|
|
937
935
|
const u = Je(t, a, r);
|
|
938
936
|
return f.top = F(u.top, f.top), f.right = U(u.right, f.right), f.bottom = U(u.bottom, f.bottom), f.left = F(u.left, f.left), f;
|
|
939
937
|
}, Je(t, l, r));
|
|
@@ -965,7 +963,7 @@ function zn(e, t, n) {
|
|
|
965
963
|
c.x = be(r);
|
|
966
964
|
}
|
|
967
965
|
if (o || !o && !i)
|
|
968
|
-
if ((oe(t) !== "body" ||
|
|
966
|
+
if ((oe(t) !== "body" || ae(r)) && (l = ve(t)), o) {
|
|
969
967
|
const d = Z(t, !0, i, t);
|
|
970
968
|
c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
|
|
971
969
|
} else r && f();
|
|
@@ -990,13 +988,13 @@ function Qe(e, t) {
|
|
|
990
988
|
return X(e) === n && (n = n.ownerDocument.body), n;
|
|
991
989
|
}
|
|
992
990
|
function dt(e, t) {
|
|
993
|
-
const n =
|
|
991
|
+
const n = I(e);
|
|
994
992
|
if (ye(e))
|
|
995
993
|
return n;
|
|
996
994
|
if (!Y(e)) {
|
|
997
995
|
let r = K(e);
|
|
998
996
|
for (; r && !ee(r); ) {
|
|
999
|
-
if (
|
|
997
|
+
if (W(r) && !Pe(r))
|
|
1000
998
|
return r;
|
|
1001
999
|
r = K(r);
|
|
1002
1000
|
}
|
|
@@ -1031,7 +1029,7 @@ const Xn = {
|
|
|
1031
1029
|
getClientRects: Nn,
|
|
1032
1030
|
getDimensions: Vn,
|
|
1033
1031
|
getScale: Q,
|
|
1034
|
-
isElement:
|
|
1032
|
+
isElement: W,
|
|
1035
1033
|
isRTL: Yn
|
|
1036
1034
|
};
|
|
1037
1035
|
function pt(e, t) {
|
|
@@ -1054,21 +1052,21 @@ function Gn(e, t) {
|
|
|
1054
1052
|
} = f;
|
|
1055
1053
|
if (l || t(), !p || !d)
|
|
1056
1054
|
return;
|
|
1057
|
-
const
|
|
1058
|
-
rootMargin: -
|
|
1055
|
+
const h = ue(u), m = ue(r.clientWidth - (a + p)), w = ue(r.clientHeight - (u + d)), x = ue(a), C = {
|
|
1056
|
+
rootMargin: -h + "px " + -m + "px " + -w + "px " + -x + "px",
|
|
1059
1057
|
threshold: F(0, U(1, c)) || 1
|
|
1060
1058
|
};
|
|
1061
1059
|
let v = !0;
|
|
1062
1060
|
function b(T) {
|
|
1063
|
-
const
|
|
1064
|
-
if (
|
|
1061
|
+
const P = T[0].intersectionRatio;
|
|
1062
|
+
if (P !== c) {
|
|
1065
1063
|
if (!v)
|
|
1066
1064
|
return s();
|
|
1067
|
-
|
|
1065
|
+
P ? s(!1, P) : o = setTimeout(() => {
|
|
1068
1066
|
s(!1, 1e-7);
|
|
1069
1067
|
}, 1e3);
|
|
1070
1068
|
}
|
|
1071
|
-
|
|
1069
|
+
P === 1 && !pt(f, e.getBoundingClientRect()) && s(), v = !1;
|
|
1072
1070
|
}
|
|
1073
1071
|
try {
|
|
1074
1072
|
n = new IntersectionObserver(b, {
|
|
@@ -1106,20 +1104,20 @@ function qn(e, t, n, o) {
|
|
|
1106
1104
|
(C = d) == null || C.observe(t);
|
|
1107
1105
|
})), n();
|
|
1108
1106
|
}), f && !c && d.observe(f), d.observe(t));
|
|
1109
|
-
let
|
|
1107
|
+
let h, m = c ? Z(e) : null;
|
|
1110
1108
|
c && w();
|
|
1111
1109
|
function w() {
|
|
1112
1110
|
const x = Z(e);
|
|
1113
|
-
|
|
1111
|
+
m && !pt(m, x) && n(), m = x, h = requestAnimationFrame(w);
|
|
1114
1112
|
}
|
|
1115
1113
|
return n(), () => {
|
|
1116
1114
|
var x;
|
|
1117
1115
|
a.forEach((y) => {
|
|
1118
1116
|
r && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
|
|
1119
|
-
}), u?.(), (x = d) == null || x.disconnect(), d = null, c && cancelAnimationFrame(
|
|
1117
|
+
}), u?.(), (x = d) == null || x.disconnect(), d = null, c && cancelAnimationFrame(h);
|
|
1120
1118
|
};
|
|
1121
1119
|
}
|
|
1122
|
-
const Un = yn, Kn = vn, Zn = gn, Jn = Cn, Qn = wn, et =
|
|
1120
|
+
const Un = yn, Kn = vn, Zn = gn, Jn = Cn, Qn = wn, et = mn, eo = bn, to = (e, t, n) => {
|
|
1123
1121
|
const o = /* @__PURE__ */ new Map(), r = {
|
|
1124
1122
|
platform: Xn,
|
|
1125
1123
|
...n
|
|
@@ -1127,14 +1125,14 @@ const Un = yn, Kn = vn, Zn = gn, Jn = Cn, Qn = wn, et = hn, eo = bn, to = (e, t,
|
|
|
1127
1125
|
...r.platform,
|
|
1128
1126
|
_c: o
|
|
1129
1127
|
};
|
|
1130
|
-
return
|
|
1128
|
+
return hn(e, t, {
|
|
1131
1129
|
...r,
|
|
1132
1130
|
platform: i
|
|
1133
1131
|
});
|
|
1134
1132
|
};
|
|
1135
1133
|
var no = typeof document < "u", oo = function() {
|
|
1136
|
-
},
|
|
1137
|
-
function
|
|
1134
|
+
}, de = no ? jt : oo;
|
|
1135
|
+
function ge(e, t) {
|
|
1138
1136
|
if (e === t)
|
|
1139
1137
|
return !0;
|
|
1140
1138
|
if (typeof e != typeof t)
|
|
@@ -1146,7 +1144,7 @@ function he(e, t) {
|
|
|
1146
1144
|
if (Array.isArray(e)) {
|
|
1147
1145
|
if (n = e.length, n !== t.length) return !1;
|
|
1148
1146
|
for (o = n; o-- !== 0; )
|
|
1149
|
-
if (!
|
|
1147
|
+
if (!ge(e[o], t[o]))
|
|
1150
1148
|
return !1;
|
|
1151
1149
|
return !0;
|
|
1152
1150
|
}
|
|
@@ -1157,23 +1155,23 @@ function he(e, t) {
|
|
|
1157
1155
|
return !1;
|
|
1158
1156
|
for (o = n; o-- !== 0; ) {
|
|
1159
1157
|
const i = r[o];
|
|
1160
|
-
if (!(i === "_owner" && e.$$typeof) && !
|
|
1158
|
+
if (!(i === "_owner" && e.$$typeof) && !ge(e[i], t[i]))
|
|
1161
1159
|
return !1;
|
|
1162
1160
|
}
|
|
1163
1161
|
return !0;
|
|
1164
1162
|
}
|
|
1165
1163
|
return e !== e && t !== t;
|
|
1166
1164
|
}
|
|
1167
|
-
function
|
|
1165
|
+
function ht(e) {
|
|
1168
1166
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1169
1167
|
}
|
|
1170
1168
|
function tt(e, t) {
|
|
1171
|
-
const n =
|
|
1169
|
+
const n = ht(e);
|
|
1172
1170
|
return Math.round(t * n) / n;
|
|
1173
1171
|
}
|
|
1174
1172
|
function Te(e) {
|
|
1175
1173
|
const t = g.useRef(e);
|
|
1176
|
-
return
|
|
1174
|
+
return de(() => {
|
|
1177
1175
|
t.current = e;
|
|
1178
1176
|
}), t;
|
|
1179
1177
|
}
|
|
@@ -1199,20 +1197,20 @@ function ro(e) {
|
|
|
1199
1197
|
middlewareData: {},
|
|
1200
1198
|
isPositioned: !1
|
|
1201
1199
|
}), [p, d] = g.useState(o);
|
|
1202
|
-
|
|
1203
|
-
const [
|
|
1204
|
-
A !== T.current && (T.current = A,
|
|
1200
|
+
ge(p, o) || d(o);
|
|
1201
|
+
const [h, m] = g.useState(null), [w, x] = g.useState(null), y = g.useCallback((A) => {
|
|
1202
|
+
A !== T.current && (T.current = A, m(A));
|
|
1205
1203
|
}, []), C = g.useCallback((A) => {
|
|
1206
|
-
A !==
|
|
1207
|
-
}, []), v = i ||
|
|
1208
|
-
if (!T.current || !
|
|
1204
|
+
A !== P.current && (P.current = A, x(A));
|
|
1205
|
+
}, []), v = i || h, b = s || w, T = g.useRef(null), P = g.useRef(null), M = g.useRef(a), H = c != null, D = Te(c), _ = Te(r), N = Te(f), E = g.useCallback(() => {
|
|
1206
|
+
if (!T.current || !P.current)
|
|
1209
1207
|
return;
|
|
1210
1208
|
const A = {
|
|
1211
1209
|
placement: t,
|
|
1212
1210
|
strategy: n,
|
|
1213
1211
|
middleware: p
|
|
1214
1212
|
};
|
|
1215
|
-
_.current && (A.platform = _.current), to(T.current,
|
|
1213
|
+
_.current && (A.platform = _.current), to(T.current, P.current, A).then((k) => {
|
|
1216
1214
|
const V = {
|
|
1217
1215
|
...k,
|
|
1218
1216
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -1221,22 +1219,22 @@ function ro(e) {
|
|
|
1221
1219
|
// setting it to `true` when `open === false` (must be specified).
|
|
1222
1220
|
isPositioned: N.current !== !1
|
|
1223
1221
|
};
|
|
1224
|
-
O.current && !
|
|
1222
|
+
O.current && !ge(M.current, V) && (M.current = V, Zt.flushSync(() => {
|
|
1225
1223
|
u(V);
|
|
1226
1224
|
}));
|
|
1227
1225
|
});
|
|
1228
1226
|
}, [p, t, n, _, N]);
|
|
1229
|
-
|
|
1227
|
+
de(() => {
|
|
1230
1228
|
f === !1 && M.current.isPositioned && (M.current.isPositioned = !1, u((A) => ({
|
|
1231
1229
|
...A,
|
|
1232
1230
|
isPositioned: !1
|
|
1233
1231
|
})));
|
|
1234
1232
|
}, [f]);
|
|
1235
1233
|
const O = g.useRef(!1);
|
|
1236
|
-
|
|
1234
|
+
de(() => (O.current = !0, () => {
|
|
1237
1235
|
O.current = !1;
|
|
1238
|
-
}), []),
|
|
1239
|
-
if (v && (T.current = v), b && (
|
|
1236
|
+
}), []), de(() => {
|
|
1237
|
+
if (v && (T.current = v), b && (P.current = b), v && b) {
|
|
1240
1238
|
if (D.current)
|
|
1241
1239
|
return D.current(v, b, E);
|
|
1242
1240
|
E();
|
|
@@ -1244,7 +1242,7 @@ function ro(e) {
|
|
|
1244
1242
|
}, [v, b, E, D, H]);
|
|
1245
1243
|
const $ = g.useMemo(() => ({
|
|
1246
1244
|
reference: T,
|
|
1247
|
-
floating:
|
|
1245
|
+
floating: P,
|
|
1248
1246
|
setReference: y,
|
|
1249
1247
|
setFloating: C
|
|
1250
1248
|
}), [y, C]), S = g.useMemo(() => ({
|
|
@@ -1262,7 +1260,7 @@ function ro(e) {
|
|
|
1262
1260
|
return l ? {
|
|
1263
1261
|
...A,
|
|
1264
1262
|
transform: "translate(" + k + "px, " + V + "px)",
|
|
1265
|
-
...
|
|
1263
|
+
...ht(S.floating) >= 1.5 && {
|
|
1266
1264
|
willChange: "transform"
|
|
1267
1265
|
}
|
|
1268
1266
|
} : {
|
|
@@ -1322,10 +1320,10 @@ const io = (e) => {
|
|
|
1322
1320
|
...io(e),
|
|
1323
1321
|
options: [e, t]
|
|
1324
1322
|
});
|
|
1325
|
-
var
|
|
1323
|
+
var ho = "Arrow", mt = g.forwardRef((e, t) => {
|
|
1326
1324
|
const { children: n, width: o = 10, height: r = 5, ...i } = e;
|
|
1327
|
-
return /* @__PURE__ */
|
|
1328
|
-
|
|
1325
|
+
return /* @__PURE__ */ R(
|
|
1326
|
+
le.svg,
|
|
1329
1327
|
{
|
|
1330
1328
|
...i,
|
|
1331
1329
|
ref: t,
|
|
@@ -1333,27 +1331,27 @@ var mo = "Arrow", ht = g.forwardRef((e, t) => {
|
|
|
1333
1331
|
height: r,
|
|
1334
1332
|
viewBox: "0 0 30 10",
|
|
1335
1333
|
preserveAspectRatio: "none",
|
|
1336
|
-
children: e.asChild ? n : /* @__PURE__ */
|
|
1334
|
+
children: e.asChild ? n : /* @__PURE__ */ R("polygon", { points: "0,0 30,0 15,10" })
|
|
1337
1335
|
}
|
|
1338
1336
|
);
|
|
1339
1337
|
});
|
|
1340
|
-
|
|
1341
|
-
var
|
|
1338
|
+
mt.displayName = ho;
|
|
1339
|
+
var mo = mt, Fe = "Popper", [gt, wt] = ot(Fe), [go, xt] = gt(Fe), yt = (e) => {
|
|
1342
1340
|
const { __scopePopper: t, children: n } = e, [o, r] = g.useState(null);
|
|
1343
|
-
return /* @__PURE__ */
|
|
1341
|
+
return /* @__PURE__ */ R(go, { scope: t, anchor: o, onAnchorChange: r, children: n });
|
|
1344
1342
|
};
|
|
1345
1343
|
yt.displayName = Fe;
|
|
1346
1344
|
var vt = "PopperAnchor", bt = g.forwardRef(
|
|
1347
1345
|
(e, t) => {
|
|
1348
|
-
const { __scopePopper: n, virtualRef: o, ...r } = e, i = xt(vt, n), s = g.useRef(null), l =
|
|
1346
|
+
const { __scopePopper: n, virtualRef: o, ...r } = e, i = xt(vt, n), s = g.useRef(null), l = we(t, s), c = g.useRef(null);
|
|
1349
1347
|
return g.useEffect(() => {
|
|
1350
1348
|
const f = c.current;
|
|
1351
1349
|
c.current = o?.current || s.current, f !== c.current && i.onAnchorChange(c.current);
|
|
1352
|
-
}), o ? null : /* @__PURE__ */
|
|
1350
|
+
}), o ? null : /* @__PURE__ */ R(le.div, { ...r, ref: l });
|
|
1353
1351
|
}
|
|
1354
1352
|
);
|
|
1355
1353
|
bt.displayName = vt;
|
|
1356
|
-
var
|
|
1354
|
+
var Ie = "PopperContent", [wo, xo] = gt(Ie), Ct = g.forwardRef(
|
|
1357
1355
|
(e, t) => {
|
|
1358
1356
|
const {
|
|
1359
1357
|
__scopePopper: n,
|
|
@@ -1368,9 +1366,9 @@ var We = "PopperContent", [wo, xo] = gt(We), Ct = g.forwardRef(
|
|
|
1368
1366
|
sticky: u = "partial",
|
|
1369
1367
|
hideWhenDetached: p = !1,
|
|
1370
1368
|
updatePositionStrategy: d = "optimized",
|
|
1371
|
-
onPlaced:
|
|
1372
|
-
...
|
|
1373
|
-
} = e, w = xt(
|
|
1369
|
+
onPlaced: h,
|
|
1370
|
+
...m
|
|
1371
|
+
} = e, w = xt(Ie, n), [x, y] = g.useState(null), C = we(t, (re) => y(re)), [v, b] = g.useState(null), T = Qt(v), P = T?.width ?? 0, M = T?.height ?? 0, H = o + (i !== "center" ? "-" + i : ""), D = typeof a == "number" ? a : { top: 0, right: 0, bottom: 0, left: 0, ...a }, _ = Array.isArray(f) ? f : [f], N = _.length > 0, E = {
|
|
1374
1372
|
padding: D,
|
|
1375
1373
|
boundary: _.filter(vo),
|
|
1376
1374
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
@@ -1396,23 +1394,23 @@ var We = "PopperContent", [wo, xo] = gt(We), Ct = g.forwardRef(
|
|
|
1396
1394
|
c && ao({ ...E }),
|
|
1397
1395
|
fo({
|
|
1398
1396
|
...E,
|
|
1399
|
-
apply: ({ elements: re, rects: Ve, availableWidth:
|
|
1400
|
-
const { width:
|
|
1401
|
-
|
|
1397
|
+
apply: ({ elements: re, rects: Ve, availableWidth: It, availableHeight: Wt }) => {
|
|
1398
|
+
const { width: Bt, height: Vt } = Ve.reference, fe = re.floating.style;
|
|
1399
|
+
fe.setProperty("--radix-popper-available-width", `${It}px`), fe.setProperty("--radix-popper-available-height", `${Wt}px`), fe.setProperty("--radix-popper-anchor-width", `${Bt}px`), fe.setProperty("--radix-popper-anchor-height", `${Vt}px`);
|
|
1402
1400
|
}
|
|
1403
1401
|
}),
|
|
1404
1402
|
v && po({ element: v, padding: l }),
|
|
1405
|
-
bo({ arrowWidth:
|
|
1403
|
+
bo({ arrowWidth: P, arrowHeight: M }),
|
|
1406
1404
|
p && uo({ strategy: "referenceHidden", ...E })
|
|
1407
1405
|
]
|
|
1408
|
-
}), [k, V] = Pt(S), Be =
|
|
1406
|
+
}), [k, V] = Pt(S), Be = Jt(h);
|
|
1409
1407
|
je(() => {
|
|
1410
1408
|
L && Be?.();
|
|
1411
1409
|
}, [L, Be]);
|
|
1412
|
-
const
|
|
1410
|
+
const _t = A.arrow?.x, Nt = A.arrow?.y, Ht = A.arrow?.centerOffset !== 0, [$t, Ft] = g.useState();
|
|
1413
1411
|
return je(() => {
|
|
1414
|
-
x &&
|
|
1415
|
-
}, [x]), /* @__PURE__ */
|
|
1412
|
+
x && Ft(window.getComputedStyle(x).zIndex);
|
|
1413
|
+
}, [x]), /* @__PURE__ */ R(
|
|
1416
1414
|
"div",
|
|
1417
1415
|
{
|
|
1418
1416
|
ref: O.setFloating,
|
|
@@ -1422,7 +1420,7 @@ var We = "PopperContent", [wo, xo] = gt(We), Ct = g.forwardRef(
|
|
|
1422
1420
|
transform: L ? $.transform : "translate(0, -200%)",
|
|
1423
1421
|
// keep off the page when measuring
|
|
1424
1422
|
minWidth: "max-content",
|
|
1425
|
-
zIndex:
|
|
1423
|
+
zIndex: $t,
|
|
1426
1424
|
"--radix-popper-transform-origin": [
|
|
1427
1425
|
A.transformOrigin?.x,
|
|
1428
1426
|
A.transformOrigin?.y
|
|
@@ -1436,24 +1434,24 @@ var We = "PopperContent", [wo, xo] = gt(We), Ct = g.forwardRef(
|
|
|
1436
1434
|
}
|
|
1437
1435
|
},
|
|
1438
1436
|
dir: e.dir,
|
|
1439
|
-
children: /* @__PURE__ */
|
|
1437
|
+
children: /* @__PURE__ */ R(
|
|
1440
1438
|
wo,
|
|
1441
1439
|
{
|
|
1442
1440
|
scope: n,
|
|
1443
1441
|
placedSide: k,
|
|
1444
1442
|
onArrowChange: b,
|
|
1445
|
-
arrowX:
|
|
1446
|
-
arrowY:
|
|
1447
|
-
shouldHideArrow:
|
|
1448
|
-
children: /* @__PURE__ */
|
|
1449
|
-
|
|
1443
|
+
arrowX: _t,
|
|
1444
|
+
arrowY: Nt,
|
|
1445
|
+
shouldHideArrow: Ht,
|
|
1446
|
+
children: /* @__PURE__ */ R(
|
|
1447
|
+
le.div,
|
|
1450
1448
|
{
|
|
1451
1449
|
"data-side": k,
|
|
1452
1450
|
"data-align": V,
|
|
1453
|
-
...
|
|
1451
|
+
...m,
|
|
1454
1452
|
ref: C,
|
|
1455
1453
|
style: {
|
|
1456
|
-
...
|
|
1454
|
+
...m.style,
|
|
1457
1455
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
1458
1456
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
1459
1457
|
animation: L ? void 0 : "none"
|
|
@@ -1466,7 +1464,7 @@ var We = "PopperContent", [wo, xo] = gt(We), Ct = g.forwardRef(
|
|
|
1466
1464
|
);
|
|
1467
1465
|
}
|
|
1468
1466
|
);
|
|
1469
|
-
Ct.displayName =
|
|
1467
|
+
Ct.displayName = Ie;
|
|
1470
1468
|
var At = "PopperArrow", yo = {
|
|
1471
1469
|
top: "bottom",
|
|
1472
1470
|
right: "left",
|
|
@@ -1478,7 +1476,7 @@ var At = "PopperArrow", yo = {
|
|
|
1478
1476
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
1479
1477
|
// doesn't report size as we'd expect on SVG elements.
|
|
1480
1478
|
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
1481
|
-
/* @__PURE__ */
|
|
1479
|
+
/* @__PURE__ */ R(
|
|
1482
1480
|
"span",
|
|
1483
1481
|
{
|
|
1484
1482
|
ref: i.onArrowChange,
|
|
@@ -1501,8 +1499,8 @@ var At = "PopperArrow", yo = {
|
|
|
1501
1499
|
}[i.placedSide],
|
|
1502
1500
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
1503
1501
|
},
|
|
1504
|
-
children: /* @__PURE__ */
|
|
1505
|
-
|
|
1502
|
+
children: /* @__PURE__ */ R(
|
|
1503
|
+
mo,
|
|
1506
1504
|
{
|
|
1507
1505
|
...r,
|
|
1508
1506
|
ref: n,
|
|
@@ -1526,20 +1524,49 @@ var bo = (e) => ({
|
|
|
1526
1524
|
options: e,
|
|
1527
1525
|
fn(t) {
|
|
1528
1526
|
const { placement: n, rects: o, middlewareData: r } = t, s = r.arrow?.centerOffset !== 0, l = s ? 0 : e.arrowWidth, c = s ? 0 : e.arrowHeight, [f, a] = Pt(n), u = { start: "0%", center: "50%", end: "100%" }[a], p = (r.arrow?.x ?? 0) + l / 2, d = (r.arrow?.y ?? 0) + c / 2;
|
|
1529
|
-
let
|
|
1530
|
-
return f === "bottom" ? (
|
|
1527
|
+
let h = "", m = "";
|
|
1528
|
+
return f === "bottom" ? (h = s ? u : `${p}px`, m = `${-c}px`) : f === "top" ? (h = s ? u : `${p}px`, m = `${o.floating.height + c}px`) : f === "right" ? (h = `${-c}px`, m = s ? u : `${d}px`) : f === "left" && (h = `${o.floating.width + c}px`, m = s ? u : `${d}px`), { data: { x: h, y: m } };
|
|
1531
1529
|
}
|
|
1532
1530
|
});
|
|
1533
1531
|
function Pt(e) {
|
|
1534
1532
|
const [t, n = "center"] = e.split("-");
|
|
1535
1533
|
return [t, n];
|
|
1536
1534
|
}
|
|
1537
|
-
var Co = yt, Ao = bt, Ro = Ct, Po = Rt,
|
|
1535
|
+
var Co = yt, Ao = bt, Ro = Ct, Po = Rt, To = Symbol("radix.slottable");
|
|
1536
|
+
// @__NO_SIDE_EFFECTS__
|
|
1537
|
+
function Oo(e) {
|
|
1538
|
+
const t = ({ children: n }) => /* @__PURE__ */ R(zt, { children: n });
|
|
1539
|
+
return t.displayName = `${e}.Slottable`, t.__radixId = To, t;
|
|
1540
|
+
}
|
|
1541
|
+
var Eo = Object.freeze({
|
|
1542
|
+
// See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
|
|
1543
|
+
position: "absolute",
|
|
1544
|
+
border: 0,
|
|
1545
|
+
width: 1,
|
|
1546
|
+
height: 1,
|
|
1547
|
+
padding: 0,
|
|
1548
|
+
margin: -1,
|
|
1549
|
+
overflow: "hidden",
|
|
1550
|
+
clip: "rect(0, 0, 0, 0)",
|
|
1551
|
+
whiteSpace: "nowrap",
|
|
1552
|
+
wordWrap: "normal"
|
|
1553
|
+
}), So = "VisuallyHidden", Tt = g.forwardRef(
|
|
1554
|
+
(e, t) => /* @__PURE__ */ R(
|
|
1555
|
+
le.span,
|
|
1556
|
+
{
|
|
1557
|
+
...e,
|
|
1558
|
+
ref: t,
|
|
1559
|
+
style: { ...Eo, ...e.style }
|
|
1560
|
+
}
|
|
1561
|
+
)
|
|
1562
|
+
);
|
|
1563
|
+
Tt.displayName = So;
|
|
1564
|
+
var Lo = Tt, [Ce, cr] = ot("Tooltip", [
|
|
1538
1565
|
wt
|
|
1539
|
-
]), Ae = wt(),
|
|
1566
|
+
]), Ae = wt(), Ot = "TooltipProvider", Do = 700, Le = "tooltip.open", [Mo, We] = Ce(Ot), Et = (e) => {
|
|
1540
1567
|
const {
|
|
1541
1568
|
__scopeTooltip: t,
|
|
1542
|
-
delayDuration: n =
|
|
1569
|
+
delayDuration: n = Do,
|
|
1543
1570
|
skipDelayDuration: o = 300,
|
|
1544
1571
|
disableHoverableContent: r = !1,
|
|
1545
1572
|
children: i
|
|
@@ -1547,8 +1574,8 @@ var Co = yt, Ao = bt, Ro = Ct, Po = Rt, [Ce, rr] = ot("Tooltip", [
|
|
|
1547
1574
|
return g.useEffect(() => {
|
|
1548
1575
|
const f = c.current;
|
|
1549
1576
|
return () => window.clearTimeout(f);
|
|
1550
|
-
}, []), /* @__PURE__ */
|
|
1551
|
-
|
|
1577
|
+
}, []), /* @__PURE__ */ R(
|
|
1578
|
+
Mo,
|
|
1552
1579
|
{
|
|
1553
1580
|
scope: t,
|
|
1554
1581
|
isOpenDelayedRef: s,
|
|
@@ -1571,8 +1598,8 @@ var Co = yt, Ao = bt, Ro = Ct, Po = Rt, [Ce, rr] = ot("Tooltip", [
|
|
|
1571
1598
|
}
|
|
1572
1599
|
);
|
|
1573
1600
|
};
|
|
1574
|
-
|
|
1575
|
-
var ce = "Tooltip", [
|
|
1601
|
+
Et.displayName = Ot;
|
|
1602
|
+
var ce = "Tooltip", [ko, Re] = Ce(ce), St = (e) => {
|
|
1576
1603
|
const {
|
|
1577
1604
|
__scopeTooltip: t,
|
|
1578
1605
|
children: n,
|
|
@@ -1581,11 +1608,11 @@ var ce = "Tooltip", [Eo, Re] = Ce(ce), Et = (e) => {
|
|
|
1581
1608
|
onOpenChange: i,
|
|
1582
1609
|
disableHoverableContent: s,
|
|
1583
1610
|
delayDuration: l
|
|
1584
|
-
} = e, c =
|
|
1611
|
+
} = e, c = We(ce, e.__scopeTooltip), f = Ae(t), [a, u] = g.useState(null), p = Kt(), d = g.useRef(0), h = s ?? c.disableHoverableContent, m = l ?? c.delayDuration, w = g.useRef(!1), [x, y] = qt({
|
|
1585
1612
|
prop: o,
|
|
1586
1613
|
defaultProp: r ?? !1,
|
|
1587
|
-
onChange: (
|
|
1588
|
-
|
|
1614
|
+
onChange: (P) => {
|
|
1615
|
+
P ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Le))) : c.onClose(), i?.(P);
|
|
1589
1616
|
},
|
|
1590
1617
|
caller: ce
|
|
1591
1618
|
}), C = g.useMemo(() => x ? w.current ? "delayed-open" : "instant-open" : "closed", [x]), v = g.useCallback(() => {
|
|
@@ -1595,12 +1622,12 @@ var ce = "Tooltip", [Eo, Re] = Ce(ce), Et = (e) => {
|
|
|
1595
1622
|
}, [y]), T = g.useCallback(() => {
|
|
1596
1623
|
window.clearTimeout(d.current), d.current = window.setTimeout(() => {
|
|
1597
1624
|
w.current = !0, y(!0), d.current = 0;
|
|
1598
|
-
},
|
|
1599
|
-
}, [
|
|
1625
|
+
}, m);
|
|
1626
|
+
}, [m, y]);
|
|
1600
1627
|
return g.useEffect(() => () => {
|
|
1601
1628
|
d.current && (window.clearTimeout(d.current), d.current = 0);
|
|
1602
|
-
}, []), /* @__PURE__ */
|
|
1603
|
-
|
|
1629
|
+
}, []), /* @__PURE__ */ R(Co, { ...f, children: /* @__PURE__ */ R(
|
|
1630
|
+
ko,
|
|
1604
1631
|
{
|
|
1605
1632
|
scope: t,
|
|
1606
1633
|
contentId: p,
|
|
@@ -1612,21 +1639,21 @@ var ce = "Tooltip", [Eo, Re] = Ce(ce), Et = (e) => {
|
|
|
1612
1639
|
c.isOpenDelayedRef.current ? T() : v();
|
|
1613
1640
|
}, [c.isOpenDelayedRef, T, v]),
|
|
1614
1641
|
onTriggerLeave: g.useCallback(() => {
|
|
1615
|
-
|
|
1616
|
-
}, [b,
|
|
1642
|
+
h ? b() : (window.clearTimeout(d.current), d.current = 0);
|
|
1643
|
+
}, [b, h]),
|
|
1617
1644
|
onOpen: v,
|
|
1618
1645
|
onClose: b,
|
|
1619
|
-
disableHoverableContent:
|
|
1646
|
+
disableHoverableContent: h,
|
|
1620
1647
|
children: n
|
|
1621
1648
|
}
|
|
1622
1649
|
) });
|
|
1623
1650
|
};
|
|
1624
|
-
|
|
1625
|
-
var De = "TooltipTrigger",
|
|
1651
|
+
St.displayName = ce;
|
|
1652
|
+
var De = "TooltipTrigger", Lt = g.forwardRef(
|
|
1626
1653
|
(e, t) => {
|
|
1627
|
-
const { __scopeTooltip: n, ...o } = e, r = Re(De, n), i =
|
|
1628
|
-
return g.useEffect(() => () => document.removeEventListener("pointerup", u), [u]), /* @__PURE__ */
|
|
1629
|
-
|
|
1654
|
+
const { __scopeTooltip: n, ...o } = e, r = Re(De, n), i = We(De, n), s = Ae(n), l = g.useRef(null), c = we(t, l, r.onTriggerChange), f = g.useRef(!1), a = g.useRef(!1), u = g.useCallback(() => f.current = !1, []);
|
|
1655
|
+
return g.useEffect(() => () => document.removeEventListener("pointerup", u), [u]), /* @__PURE__ */ R(Ao, { asChild: !0, ...s, children: /* @__PURE__ */ R(
|
|
1656
|
+
le.button,
|
|
1630
1657
|
{
|
|
1631
1658
|
"aria-describedby": r.open ? r.contentId : void 0,
|
|
1632
1659
|
"data-state": r.stateAttribute,
|
|
@@ -1650,41 +1677,41 @@ var De = "TooltipTrigger", St = g.forwardRef(
|
|
|
1650
1677
|
) });
|
|
1651
1678
|
}
|
|
1652
1679
|
);
|
|
1653
|
-
|
|
1654
|
-
var
|
|
1680
|
+
Lt.displayName = De;
|
|
1681
|
+
var _o = "TooltipPortal", [lr, No] = Ce(_o, {
|
|
1655
1682
|
forceMount: void 0
|
|
1656
|
-
}), te = "TooltipContent",
|
|
1683
|
+
}), te = "TooltipContent", Dt = g.forwardRef(
|
|
1657
1684
|
(e, t) => {
|
|
1658
|
-
const n =
|
|
1659
|
-
return /* @__PURE__ */
|
|
1685
|
+
const n = No(te, e.__scopeTooltip), { forceMount: o = n.forceMount, side: r = "top", ...i } = e, s = Re(te, e.__scopeTooltip);
|
|
1686
|
+
return /* @__PURE__ */ R(en, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ R(Mt, { side: r, ...i, ref: t }) : /* @__PURE__ */ R(Ho, { side: r, ...i, ref: t }) });
|
|
1660
1687
|
}
|
|
1661
|
-
),
|
|
1662
|
-
const n = Re(te, e.__scopeTooltip), o =
|
|
1688
|
+
), Ho = g.forwardRef((e, t) => {
|
|
1689
|
+
const n = Re(te, e.__scopeTooltip), o = We(te, e.__scopeTooltip), r = g.useRef(null), i = we(t, r), [s, l] = g.useState(null), { trigger: c, onClose: f } = n, a = r.current, { onPointerInTransitChange: u } = o, p = g.useCallback(() => {
|
|
1663
1690
|
l(null), u(!1);
|
|
1664
1691
|
}, [u]), d = g.useCallback(
|
|
1665
|
-
(
|
|
1666
|
-
const w =
|
|
1692
|
+
(h, m) => {
|
|
1693
|
+
const w = h.currentTarget, x = { x: h.clientX, y: h.clientY }, y = Bo(x, w.getBoundingClientRect()), C = Vo(x, y), v = zo(m.getBoundingClientRect()), b = Yo([...C, ...v]);
|
|
1667
1694
|
l(b), u(!0);
|
|
1668
1695
|
},
|
|
1669
1696
|
[u]
|
|
1670
1697
|
);
|
|
1671
1698
|
return g.useEffect(() => () => p(), [p]), g.useEffect(() => {
|
|
1672
1699
|
if (c && a) {
|
|
1673
|
-
const
|
|
1674
|
-
return c.addEventListener("pointerleave",
|
|
1675
|
-
c.removeEventListener("pointerleave",
|
|
1700
|
+
const h = (w) => d(w, a), m = (w) => d(w, c);
|
|
1701
|
+
return c.addEventListener("pointerleave", h), a.addEventListener("pointerleave", m), () => {
|
|
1702
|
+
c.removeEventListener("pointerleave", h), a.removeEventListener("pointerleave", m);
|
|
1676
1703
|
};
|
|
1677
1704
|
}
|
|
1678
1705
|
}, [c, a, d, p]), g.useEffect(() => {
|
|
1679
1706
|
if (s) {
|
|
1680
|
-
const
|
|
1681
|
-
const w =
|
|
1707
|
+
const h = (m) => {
|
|
1708
|
+
const w = m.target, x = { x: m.clientX, y: m.clientY }, y = c?.contains(w) || a?.contains(w), C = !jo(x, s);
|
|
1682
1709
|
y ? p() : C && (p(), f());
|
|
1683
1710
|
};
|
|
1684
|
-
return document.addEventListener("pointermove",
|
|
1711
|
+
return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
|
|
1685
1712
|
}
|
|
1686
|
-
}, [c, a, s, f, p]), /* @__PURE__ */
|
|
1687
|
-
}), [
|
|
1713
|
+
}, [c, a, s, f, p]), /* @__PURE__ */ R(Mt, { ...e, ref: i });
|
|
1714
|
+
}), [$o, Fo] = Ce(ce, { isInside: !1 }), Io = /* @__PURE__ */ Oo("TooltipContent"), Mt = g.forwardRef(
|
|
1688
1715
|
(e, t) => {
|
|
1689
1716
|
const {
|
|
1690
1717
|
__scopeTooltip: n,
|
|
@@ -1701,8 +1728,8 @@ var So = "TooltipPortal", [ir, Lo] = Ce(So, {
|
|
|
1701
1728
|
};
|
|
1702
1729
|
return window.addEventListener("scroll", u, { capture: !0 }), () => window.removeEventListener("scroll", u, { capture: !0 });
|
|
1703
1730
|
}
|
|
1704
|
-
}, [c.trigger, a]), /* @__PURE__ */
|
|
1705
|
-
|
|
1731
|
+
}, [c.trigger, a]), /* @__PURE__ */ R(
|
|
1732
|
+
Ut,
|
|
1706
1733
|
{
|
|
1707
1734
|
asChild: !0,
|
|
1708
1735
|
disableOutsidePointerEvents: !1,
|
|
@@ -1726,8 +1753,8 @@ var So = "TooltipPortal", [ir, Lo] = Ce(So, {
|
|
|
1726
1753
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1727
1754
|
},
|
|
1728
1755
|
children: [
|
|
1729
|
-
/* @__PURE__ */
|
|
1730
|
-
/* @__PURE__ */
|
|
1756
|
+
/* @__PURE__ */ R(Io, { children: o }),
|
|
1757
|
+
/* @__PURE__ */ R($o, { scope: n, isInside: !0, children: /* @__PURE__ */ R(Lo, { id: c.contentId, role: "tooltip", children: r || o }) })
|
|
1731
1758
|
]
|
|
1732
1759
|
}
|
|
1733
1760
|
)
|
|
@@ -1735,18 +1762,18 @@ var So = "TooltipPortal", [ir, Lo] = Ce(So, {
|
|
|
1735
1762
|
);
|
|
1736
1763
|
}
|
|
1737
1764
|
);
|
|
1738
|
-
|
|
1739
|
-
var
|
|
1765
|
+
Dt.displayName = te;
|
|
1766
|
+
var kt = "TooltipArrow", Wo = g.forwardRef(
|
|
1740
1767
|
(e, t) => {
|
|
1741
1768
|
const { __scopeTooltip: n, ...o } = e, r = Ae(n);
|
|
1742
|
-
return
|
|
1743
|
-
|
|
1769
|
+
return Fo(
|
|
1770
|
+
kt,
|
|
1744
1771
|
n
|
|
1745
|
-
).isInside ? null : /* @__PURE__ */
|
|
1772
|
+
).isInside ? null : /* @__PURE__ */ R(Po, { ...r, ...o, ref: t });
|
|
1746
1773
|
}
|
|
1747
1774
|
);
|
|
1748
|
-
|
|
1749
|
-
function
|
|
1775
|
+
Wo.displayName = kt;
|
|
1776
|
+
function Bo(e, t) {
|
|
1750
1777
|
const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), r = Math.abs(t.right - e.x), i = Math.abs(t.left - e.x);
|
|
1751
1778
|
switch (Math.min(n, o, r, i)) {
|
|
1752
1779
|
case i:
|
|
@@ -1761,7 +1788,7 @@ function Ho(e, t) {
|
|
|
1761
1788
|
throw new Error("unreachable");
|
|
1762
1789
|
}
|
|
1763
1790
|
}
|
|
1764
|
-
function
|
|
1791
|
+
function Vo(e, t, n = 5) {
|
|
1765
1792
|
const o = [];
|
|
1766
1793
|
switch (t) {
|
|
1767
1794
|
case "top":
|
|
@@ -1791,7 +1818,7 @@ function $o(e, t, n = 5) {
|
|
|
1791
1818
|
}
|
|
1792
1819
|
return o;
|
|
1793
1820
|
}
|
|
1794
|
-
function
|
|
1821
|
+
function zo(e) {
|
|
1795
1822
|
const { top: t, right: n, bottom: o, left: r } = e;
|
|
1796
1823
|
return [
|
|
1797
1824
|
{ x: r, y: t },
|
|
@@ -1800,7 +1827,7 @@ function Fo(e) {
|
|
|
1800
1827
|
{ x: r, y: o }
|
|
1801
1828
|
];
|
|
1802
1829
|
}
|
|
1803
|
-
function
|
|
1830
|
+
function jo(e, t) {
|
|
1804
1831
|
const { x: n, y: o } = e;
|
|
1805
1832
|
let r = !1;
|
|
1806
1833
|
for (let i = 0, s = t.length - 1; i < t.length; s = i++) {
|
|
@@ -1809,11 +1836,11 @@ function Wo(e, t) {
|
|
|
1809
1836
|
}
|
|
1810
1837
|
return r;
|
|
1811
1838
|
}
|
|
1812
|
-
function
|
|
1839
|
+
function Yo(e) {
|
|
1813
1840
|
const t = e.slice();
|
|
1814
|
-
return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0),
|
|
1841
|
+
return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), Xo(t);
|
|
1815
1842
|
}
|
|
1816
|
-
function
|
|
1843
|
+
function Xo(e) {
|
|
1817
1844
|
if (e.length <= 1) return e.slice();
|
|
1818
1845
|
const t = [];
|
|
1819
1846
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -1838,9 +1865,9 @@ function Bo(e) {
|
|
|
1838
1865
|
}
|
|
1839
1866
|
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
1840
1867
|
}
|
|
1841
|
-
var
|
|
1842
|
-
const
|
|
1843
|
-
const n =
|
|
1868
|
+
var Go = Et, qo = St, Uo = Lt, Ko = Dt;
|
|
1869
|
+
const ar = ({ getValue: e, value: t }) => {
|
|
1870
|
+
const n = Yt(null), [o, r] = Xt(!1), i = t ?? e().toLocaleLowerCase(), s = Gt(() => {
|
|
1844
1871
|
const l = n.current;
|
|
1845
1872
|
l && r(l.scrollWidth > l.clientWidth);
|
|
1846
1873
|
}, []);
|
|
@@ -1853,10 +1880,10 @@ const sr = ({ getValue: e, value: t }) => {
|
|
|
1853
1880
|
};
|
|
1854
1881
|
}, [s]), ze(() => {
|
|
1855
1882
|
s();
|
|
1856
|
-
}, [s]), o ? /* @__PURE__ */
|
|
1857
|
-
/* @__PURE__ */
|
|
1858
|
-
/* @__PURE__ */
|
|
1859
|
-
|
|
1883
|
+
}, [s]), o ? /* @__PURE__ */ R(Go, { delayDuration: 0, children: /* @__PURE__ */ nt(qo, { children: [
|
|
1884
|
+
/* @__PURE__ */ R(Uo, { asChild: !0, children: /* @__PURE__ */ R("p", { ref: n, className: "w-full truncate cursor-pointer", children: i }) }),
|
|
1885
|
+
/* @__PURE__ */ R(
|
|
1886
|
+
Ko,
|
|
1860
1887
|
{
|
|
1861
1888
|
side: "bottom",
|
|
1862
1889
|
align: "center",
|
|
@@ -1864,8 +1891,8 @@ const sr = ({ getValue: e, value: t }) => {
|
|
|
1864
1891
|
children: i
|
|
1865
1892
|
}
|
|
1866
1893
|
)
|
|
1867
|
-
] }) }) : /* @__PURE__ */
|
|
1894
|
+
] }) }) : /* @__PURE__ */ R("p", { ref: n, className: "w-full truncate", children: i });
|
|
1868
1895
|
};
|
|
1869
1896
|
export {
|
|
1870
|
-
|
|
1897
|
+
ar as TruncateText
|
|
1871
1898
|
};
|