@purpurds/tooltip 4.1.0 → 4.2.0
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/.rush/temp/ci_build/@purpurds/tooltip/{9d52370f374d7e49002785731d3fae04f55893f9.untar.log → 4c3a7f222c4996ef0f8ed80f842462ee3ea037ef.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +5 -5
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +3 -3
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.es.js +73 -70
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +5 -5
package/dist/tooltip.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as Ue, jsx as I } from "react/jsx-runtime";
|
|
2
2
|
import * as N from "react";
|
|
3
|
-
import { forwardRef as M, useCallback as H, createContext as Ge, useMemo as
|
|
3
|
+
import { forwardRef as M, useCallback as H, createContext as Ge, useMemo as xe, createElement as w, useContext as Tt, Fragment as $n, Children as se, isValidElement as Ie, cloneElement as Je, useEffect as R, useRef as L, useState as z, useLayoutEffect as Ct, useReducer as _n } from "react";
|
|
4
4
|
import * as wn from "react-dom";
|
|
5
5
|
import An, { flushSync as Rt } from "react-dom";
|
|
6
6
|
const Pn = {
|
|
@@ -55,7 +55,7 @@ var St = { exports: {} };
|
|
|
55
55
|
})();
|
|
56
56
|
})(St);
|
|
57
57
|
var On = St.exports;
|
|
58
|
-
const pt = /* @__PURE__ */ En(On), Tn = "_rotate_7s2g1_1", Cn = "_dash_7s2g1_1",
|
|
58
|
+
const pt = /* @__PURE__ */ En(On), Tn = "_rotate_7s2g1_1", Cn = "_dash_7s2g1_1", Re = {
|
|
59
59
|
"purpur-spinner": "_purpur-spinner_7s2g1_1",
|
|
60
60
|
rotate: Tn,
|
|
61
61
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_7s2g1_4",
|
|
@@ -68,7 +68,7 @@ const pt = /* @__PURE__ */ En(On), Tn = "_rotate_7s2g1_1", Cn = "_dash_7s2g1_1",
|
|
|
68
68
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_7s2g1_33",
|
|
69
69
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_7s2g1_36",
|
|
70
70
|
"purpur-spinner__circle--negative-disabled": "_purpur-spinner__circle--negative-disabled_7s2g1_39"
|
|
71
|
-
},
|
|
71
|
+
}, Se = "purpur-spinner", Rn = {
|
|
72
72
|
PRIMARY: "primary",
|
|
73
73
|
DISABLED: "disabled",
|
|
74
74
|
NEGATIVE: "negative",
|
|
@@ -87,15 +87,15 @@ const pt = /* @__PURE__ */ En(On), Tn = "_rotate_7s2g1_1", Cn = "_dash_7s2g1_1",
|
|
|
87
87
|
}) => /* @__PURE__ */ I(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
|
-
className: pt([
|
|
90
|
+
className: pt([Re[Se], Re[`${Se}--${t}`]]),
|
|
91
91
|
"data-testid": e,
|
|
92
92
|
...o,
|
|
93
93
|
children: /* @__PURE__ */ I("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ I(
|
|
94
94
|
"circle",
|
|
95
95
|
{
|
|
96
96
|
className: pt(
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
Re[`${Se}__circle`],
|
|
98
|
+
Re[`${Se}__circle--${n}`]
|
|
99
99
|
),
|
|
100
100
|
cx: "25",
|
|
101
101
|
cy: "25",
|
|
@@ -356,20 +356,21 @@ var It = { exports: {} };
|
|
|
356
356
|
})();
|
|
357
357
|
})(It);
|
|
358
358
|
var qn = It.exports;
|
|
359
|
-
const Kn = /* @__PURE__ */ Xn(qn),
|
|
360
|
-
"purpur-paragraph": "_purpur-
|
|
361
|
-
"purpur-paragraph--disabled": "_purpur-paragraph--
|
|
362
|
-
"purpur-paragraph--hyphens": "_purpur-paragraph--
|
|
363
|
-
"purpur-paragraph--
|
|
364
|
-
"purpur-paragraph--paragraph-100
|
|
365
|
-
"purpur-paragraph--paragraph-100-
|
|
366
|
-
"purpur-paragraph--paragraph-
|
|
367
|
-
"purpur-paragraph--
|
|
368
|
-
"purpur-paragraph--preamble-
|
|
369
|
-
"purpur-paragraph--
|
|
370
|
-
"purpur-paragraph--additional-100
|
|
371
|
-
"purpur-paragraph--
|
|
372
|
-
"purpur-paragraph--overline-
|
|
359
|
+
const Kn = /* @__PURE__ */ Xn(qn), ye = {
|
|
360
|
+
"purpur-paragraph": "_purpur-paragraph_15yuz_1",
|
|
361
|
+
"purpur-paragraph--disabled": "_purpur-paragraph--disabled_15yuz_7",
|
|
362
|
+
"purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_15yuz_10",
|
|
363
|
+
"purpur-paragraph--negative": "_purpur-paragraph--negative_15yuz_13",
|
|
364
|
+
"purpur-paragraph--paragraph-100": "_purpur-paragraph--paragraph-100_15yuz_16",
|
|
365
|
+
"purpur-paragraph--paragraph-100-medium": "_purpur-paragraph--paragraph-100-medium_15yuz_22",
|
|
366
|
+
"purpur-paragraph--paragraph-100-bold": "_purpur-paragraph--paragraph-100-bold_15yuz_29",
|
|
367
|
+
"purpur-paragraph--paragraph-200": "_purpur-paragraph--paragraph-200_15yuz_36",
|
|
368
|
+
"purpur-paragraph--preamble-100": "_purpur-paragraph--preamble-100_15yuz_42",
|
|
369
|
+
"purpur-paragraph--preamble-200": "_purpur-paragraph--preamble-200_15yuz_48",
|
|
370
|
+
"purpur-paragraph--additional-100": "_purpur-paragraph--additional-100_15yuz_54",
|
|
371
|
+
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_15yuz_60",
|
|
372
|
+
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_15yuz_67",
|
|
373
|
+
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_15yuz_75"
|
|
373
374
|
}, Ft = {
|
|
374
375
|
PARAGRAPH100: "paragraph-100",
|
|
375
376
|
PARAGRAPH100MEDIUM: "paragraph-100-medium",
|
|
@@ -381,25 +382,27 @@ const Kn = /* @__PURE__ */ Xn(qn), Re = {
|
|
|
381
382
|
ADDITIONAL100MEDIUM: "additional-100-medium",
|
|
382
383
|
OVERLINE100: "overline-100",
|
|
383
384
|
OVERLINE200: "overline-200"
|
|
384
|
-
},
|
|
385
|
+
}, be = "purpur-paragraph", Zn = ({
|
|
385
386
|
["data-testid"]: e,
|
|
386
387
|
children: t,
|
|
387
388
|
className: n = "",
|
|
388
389
|
disabled: o,
|
|
389
390
|
enableHyphenation: i = !1,
|
|
390
|
-
|
|
391
|
-
|
|
391
|
+
negative: r = !1,
|
|
392
|
+
variant: s = Ft.PARAGRAPH100,
|
|
393
|
+
...a
|
|
392
394
|
}) => {
|
|
393
|
-
const
|
|
395
|
+
const c = Kn([
|
|
394
396
|
n,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
+
ye[be],
|
|
398
|
+
ye[`${be}--${s}`],
|
|
397
399
|
{
|
|
398
|
-
[
|
|
399
|
-
[
|
|
400
|
+
[ye[`${be}--hyphens`]]: i,
|
|
401
|
+
[ye[`${be}--disabled`]]: o,
|
|
402
|
+
[ye[`${be}--negative`]]: r
|
|
400
403
|
}
|
|
401
404
|
]);
|
|
402
|
-
return /* @__PURE__ */ I("p", { ...
|
|
405
|
+
return /* @__PURE__ */ I("p", { ...a, className: c, "data-testid": e, children: t });
|
|
403
406
|
}, Jn = "400ms";
|
|
404
407
|
function S() {
|
|
405
408
|
return S = Object.assign ? Object.assign.bind() : function(e) {
|
|
@@ -437,7 +440,7 @@ function kt(e, t = []) {
|
|
|
437
440
|
s
|
|
438
441
|
];
|
|
439
442
|
function l(u) {
|
|
440
|
-
const { scope: p, children: f, ...h } = u, g = (p == null ? void 0 : p[e][c]) || a, m =
|
|
443
|
+
const { scope: p, children: f, ...h } = u, g = (p == null ? void 0 : p[e][c]) || a, m = xe(
|
|
441
444
|
() => h,
|
|
442
445
|
Object.values(h)
|
|
443
446
|
);
|
|
@@ -462,7 +465,7 @@ function kt(e, t = []) {
|
|
|
462
465
|
const r = n.map((s) => /* @__PURE__ */ Ge(s));
|
|
463
466
|
return function(a) {
|
|
464
467
|
const c = (a == null ? void 0 : a[e]) || r;
|
|
465
|
-
return
|
|
468
|
+
return xe(
|
|
466
469
|
() => ({
|
|
467
470
|
[`__scope${e}`]: {
|
|
468
471
|
...a,
|
|
@@ -500,7 +503,7 @@ function er(...e) {
|
|
|
500
503
|
...u
|
|
501
504
|
};
|
|
502
505
|
}, {});
|
|
503
|
-
return
|
|
506
|
+
return xe(
|
|
504
507
|
() => ({
|
|
505
508
|
[`__scope${t.scopeName}`]: s
|
|
506
509
|
}),
|
|
@@ -598,7 +601,7 @@ function he(e) {
|
|
|
598
601
|
const t = L(e);
|
|
599
602
|
return R(() => {
|
|
600
603
|
t.current = e;
|
|
601
|
-
}),
|
|
604
|
+
}), xe(
|
|
602
605
|
() => (...n) => {
|
|
603
606
|
var o;
|
|
604
607
|
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
|
@@ -966,7 +969,7 @@ const wr = async (e, t, n) => {
|
|
|
966
969
|
middlewareData: f
|
|
967
970
|
};
|
|
968
971
|
};
|
|
969
|
-
async function
|
|
972
|
+
async function $e(e, t) {
|
|
970
973
|
var n;
|
|
971
974
|
t === void 0 && (t = {});
|
|
972
975
|
const {
|
|
@@ -1064,7 +1067,7 @@ const bt = (e) => ({
|
|
|
1064
1067
|
...g
|
|
1065
1068
|
} = Y(e, t), m = X(o), v = X(s) === s, y = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), x = u || (v || !h ? [He(s)] : br(s));
|
|
1066
1069
|
!u && f !== "none" && x.push(...$r(s, h, f, y));
|
|
1067
|
-
const $ = [s, ...x], b = await
|
|
1070
|
+
const $ = [s, ...x], b = await $e(t, g), _ = [];
|
|
1068
1071
|
let E = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
1069
1072
|
if (l && _.push(b[m]), d) {
|
|
1070
1073
|
const T = yr(o, r, y);
|
|
@@ -1134,7 +1137,7 @@ const Pr = function(e) {
|
|
|
1134
1137
|
} = Y(e, t);
|
|
1135
1138
|
switch (o) {
|
|
1136
1139
|
case "referenceHidden": {
|
|
1137
|
-
const r = await
|
|
1140
|
+
const r = await $e(t, {
|
|
1138
1141
|
...i,
|
|
1139
1142
|
elementContext: "reference"
|
|
1140
1143
|
}), s = xt(r, n.reference);
|
|
@@ -1146,7 +1149,7 @@ const Pr = function(e) {
|
|
|
1146
1149
|
};
|
|
1147
1150
|
}
|
|
1148
1151
|
case "escaped": {
|
|
1149
|
-
const r = await
|
|
1152
|
+
const r = await $e(t, {
|
|
1150
1153
|
...i,
|
|
1151
1154
|
altBoundary: !0
|
|
1152
1155
|
}), s = xt(r, n.floating);
|
|
@@ -1235,7 +1238,7 @@ const Or = function(e) {
|
|
|
1235
1238
|
} = Y(e, t), l = {
|
|
1236
1239
|
x: n,
|
|
1237
1240
|
y: o
|
|
1238
|
-
}, d = await
|
|
1241
|
+
}, d = await $e(t, c), u = me(X(i)), p = Qe(u);
|
|
1239
1242
|
let f = l[p], h = l[u];
|
|
1240
1243
|
if (r) {
|
|
1241
1244
|
const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", y = f + d[m], x = f - d[v];
|
|
@@ -1315,7 +1318,7 @@ const Or = function(e) {
|
|
|
1315
1318
|
apply: s = () => {
|
|
1316
1319
|
},
|
|
1317
1320
|
...a
|
|
1318
|
-
} = Y(e, t), c = await
|
|
1321
|
+
} = Y(e, t), c = await $e(t, a), l = X(n), d = ge(n), u = me(n) === "y", {
|
|
1319
1322
|
width: p,
|
|
1320
1323
|
height: f
|
|
1321
1324
|
} = o.floating;
|
|
@@ -1371,7 +1374,7 @@ function U(e) {
|
|
|
1371
1374
|
function _t(e) {
|
|
1372
1375
|
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof W(e).ShadowRoot;
|
|
1373
1376
|
}
|
|
1374
|
-
function
|
|
1377
|
+
function Ae(e) {
|
|
1375
1378
|
const {
|
|
1376
1379
|
overflow: t,
|
|
1377
1380
|
overflowX: n,
|
|
@@ -1428,13 +1431,13 @@ function fe(e) {
|
|
|
1428
1431
|
}
|
|
1429
1432
|
function Ut(e) {
|
|
1430
1433
|
const t = fe(e);
|
|
1431
|
-
return ze(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) &&
|
|
1434
|
+
return ze(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && Ae(t) ? t : Ut(t);
|
|
1432
1435
|
}
|
|
1433
|
-
function
|
|
1436
|
+
function _e(e, t) {
|
|
1434
1437
|
var n;
|
|
1435
1438
|
t === void 0 && (t = []);
|
|
1436
1439
|
const o = Ut(e), i = o === ((n = e.ownerDocument) == null ? void 0 : n.body), r = W(o);
|
|
1437
|
-
return i ? t.concat(r, r.visualViewport || [],
|
|
1440
|
+
return i ? t.concat(r, r.visualViewport || [], Ae(o) ? o : [], r.frameElement ? _e(r.frameElement) : []) : t.concat(o, _e(o));
|
|
1438
1441
|
}
|
|
1439
1442
|
function Gt(e) {
|
|
1440
1443
|
const t = j(e);
|
|
@@ -1511,7 +1514,7 @@ function Mr(e) {
|
|
|
1511
1514
|
scrollTop: 0
|
|
1512
1515
|
}, a = te(1);
|
|
1513
1516
|
const c = te(0);
|
|
1514
|
-
if ((i || !i && o !== "fixed") && ((ne(n) !== "body" ||
|
|
1517
|
+
if ((i || !i && o !== "fixed") && ((ne(n) !== "body" || Ae(r)) && (s = We(n)), U(n))) {
|
|
1515
1518
|
const l = ae(n);
|
|
1516
1519
|
a = ue(n), c.x = l.x + n.clientLeft, c.y = l.y + n.clientTop;
|
|
1517
1520
|
}
|
|
@@ -1589,12 +1592,12 @@ function Br(e, t) {
|
|
|
1589
1592
|
const n = t.get(e);
|
|
1590
1593
|
if (n)
|
|
1591
1594
|
return n;
|
|
1592
|
-
let o =
|
|
1595
|
+
let o = _e(e).filter((a) => q(a) && ne(a) !== "body"), i = null;
|
|
1593
1596
|
const r = j(e).position === "fixed";
|
|
1594
1597
|
let s = r ? fe(e) : e;
|
|
1595
1598
|
for (; q(s) && !ze(s); ) {
|
|
1596
1599
|
const a = j(s), c = nt(s);
|
|
1597
|
-
!c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) ||
|
|
1600
|
+
!c && a.position === "fixed" && (i = null), (r ? !c && !i : !c && a.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ae(s) && !c && qt(e, s)) ? o = o.filter((d) => d !== s) : i = a, s = fe(s);
|
|
1598
1601
|
}
|
|
1599
1602
|
return t.set(e, o), o;
|
|
1600
1603
|
}
|
|
@@ -1627,7 +1630,7 @@ function Vr(e, t, n) {
|
|
|
1627
1630
|
};
|
|
1628
1631
|
const c = te(0);
|
|
1629
1632
|
if (o || !o && !r)
|
|
1630
|
-
if ((ne(t) !== "body" ||
|
|
1633
|
+
if ((ne(t) !== "body" || Ae(i)) && (a = We(t)), o) {
|
|
1631
1634
|
const l = ae(t, !0, r, t);
|
|
1632
1635
|
c.x = l.x + t.clientLeft, c.y = l.y + t.clientTop;
|
|
1633
1636
|
} else
|
|
@@ -1735,7 +1738,7 @@ function Xr(e, t, n, o) {
|
|
|
1735
1738
|
elementResize: s = typeof ResizeObserver == "function",
|
|
1736
1739
|
layoutShift: a = typeof IntersectionObserver == "function",
|
|
1737
1740
|
animationFrame: c = !1
|
|
1738
|
-
} = o, l = ot(e), d = i || r ? [...l ?
|
|
1741
|
+
} = o, l = ot(e), d = i || r ? [...l ? _e(l) : [], ..._e(t)] : [];
|
|
1739
1742
|
d.forEach((v) => {
|
|
1740
1743
|
i && v.addEventListener("scroll", n, {
|
|
1741
1744
|
passive: !0
|
|
@@ -2009,12 +2012,12 @@ const Jt = "Popper", [Qt, en] = kt(Jt), [to, tn] = Qt(Jt), no = (e) => {
|
|
|
2009
2012
|
...y
|
|
2010
2013
|
}, ct = Array.isArray(v) ? v : [
|
|
2011
2014
|
v
|
|
2012
|
-
], cn = ct.length > 0,
|
|
2015
|
+
], cn = ct.length > 0, Ee = {
|
|
2013
2016
|
padding: J,
|
|
2014
2017
|
boundary: ct.filter(fo),
|
|
2015
2018
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2016
2019
|
altBoundary: cn
|
|
2017
|
-
}, { refs: ln, floatingStyles: lt, placement: un, isPositioned:
|
|
2020
|
+
}, { refs: ln, floatingStyles: lt, placement: un, isPositioned: Oe, middlewareData: le } = Zr({
|
|
2018
2021
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2019
2022
|
strategy: "fixed",
|
|
2020
2023
|
placement: Z,
|
|
@@ -2033,16 +2036,16 @@ const Jt = "Popper", [Qt, en] = kt(Jt), [to, tn] = Qt(Jt), no = (e) => {
|
|
|
2033
2036
|
mainAxis: !0,
|
|
2034
2037
|
crossAxis: !1,
|
|
2035
2038
|
limiter: x === "partial" ? Cr() : void 0,
|
|
2036
|
-
...
|
|
2039
|
+
...Ee
|
|
2037
2040
|
}),
|
|
2038
2041
|
m && Ar({
|
|
2039
|
-
...
|
|
2042
|
+
...Ee
|
|
2040
2043
|
}),
|
|
2041
2044
|
Rr({
|
|
2042
|
-
...
|
|
2045
|
+
...Ee,
|
|
2043
2046
|
apply: ({ elements: ve, rects: dt, availableWidth: vn, availableHeight: yn }) => {
|
|
2044
|
-
const { width: bn, height: xn } = dt.reference,
|
|
2045
|
-
|
|
2047
|
+
const { width: bn, height: xn } = dt.reference, Ce = ve.floating.style;
|
|
2048
|
+
Ce.setProperty("--radix-popper-available-width", `${vn}px`), Ce.setProperty("--radix-popper-available-height", `${yn}px`), Ce.setProperty("--radix-popper-anchor-width", `${bn}px`), Ce.setProperty("--radix-popper-anchor-height", `${xn}px`);
|
|
2046
2049
|
}
|
|
2047
2050
|
}),
|
|
2048
2051
|
k && Kr({
|
|
@@ -2055,15 +2058,15 @@ const Jt = "Popper", [Qt, en] = kt(Jt), [to, tn] = Qt(Jt), no = (e) => {
|
|
|
2055
2058
|
}),
|
|
2056
2059
|
$ && Pr({
|
|
2057
2060
|
strategy: "referenceHidden",
|
|
2058
|
-
...
|
|
2061
|
+
...Ee
|
|
2059
2062
|
})
|
|
2060
2063
|
]
|
|
2061
|
-
}), [ut, dn] = rn(un),
|
|
2064
|
+
}), [ut, dn] = rn(un), Te = he(_);
|
|
2062
2065
|
de(() => {
|
|
2063
|
-
|
|
2066
|
+
Oe && (Te == null || Te());
|
|
2064
2067
|
}, [
|
|
2065
|
-
|
|
2066
|
-
|
|
2068
|
+
Oe,
|
|
2069
|
+
Te
|
|
2067
2070
|
]);
|
|
2068
2071
|
const fn = (i = le.arrow) === null || i === void 0 ? void 0 : i.x, pn = (r = le.arrow) === null || r === void 0 ? void 0 : r.y, hn = ((s = le.arrow) === null || s === void 0 ? void 0 : s.centerOffset) !== 0, [gn, mn] = z();
|
|
2069
2072
|
return de(() => {
|
|
@@ -2075,7 +2078,7 @@ const Jt = "Popper", [Qt, en] = kt(Jt), [to, tn] = Qt(Jt), no = (e) => {
|
|
|
2075
2078
|
"data-radix-popper-content-wrapper": "",
|
|
2076
2079
|
style: {
|
|
2077
2080
|
...lt,
|
|
2078
|
-
transform:
|
|
2081
|
+
transform: Oe ? lt.transform : "translate(0, -200%)",
|
|
2079
2082
|
// keep off the page when measuring
|
|
2080
2083
|
minWidth: "max-content",
|
|
2081
2084
|
zIndex: gn,
|
|
@@ -2101,7 +2104,7 @@ const Jt = "Popper", [Qt, en] = kt(Jt), [to, tn] = Qt(Jt), no = (e) => {
|
|
|
2101
2104
|
...E.style,
|
|
2102
2105
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
2103
2106
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
2104
|
-
animation:
|
|
2107
|
+
animation: Oe ? void 0 : "none",
|
|
2105
2108
|
// hide the content if using the hide middleware and should be hidden
|
|
2106
2109
|
opacity: (l = le.hide) !== null && l !== void 0 && l.referenceHidden ? 0 : void 0
|
|
2107
2110
|
}
|
|
@@ -2334,14 +2337,14 @@ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ w(ce.span, S({}, e, {
|
|
|
2334
2337
|
}, []),
|
|
2335
2338
|
disableHoverableContent: i
|
|
2336
2339
|
}, r);
|
|
2337
|
-
}, at = "Tooltip", [Co,
|
|
2340
|
+
}, at = "Tooltip", [Co, Pe] = Ve(at), Ro = (e) => {
|
|
2338
2341
|
const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c = st(at, e.__scopeTooltip), l = je(t), [d, u] = z(null), p = hr(), f = L(0), h = s ?? c.disableHoverableContent, g = a ?? c.delayDuration, m = L(!1), [v = !1, y] = $o({
|
|
2339
2342
|
prop: o,
|
|
2340
2343
|
defaultProp: i,
|
|
2341
2344
|
onChange: (E) => {
|
|
2342
2345
|
E ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Ze))) : c.onClose(), r == null || r(E);
|
|
2343
2346
|
}
|
|
2344
|
-
}), x =
|
|
2347
|
+
}), x = xe(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [
|
|
2345
2348
|
v
|
|
2346
2349
|
]), $ = H(() => {
|
|
2347
2350
|
window.clearTimeout(f.current), m.current = !1, y(!0);
|
|
@@ -2384,7 +2387,7 @@ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ w(ce.span, S({}, e, {
|
|
|
2384
2387
|
disableHoverableContent: h
|
|
2385
2388
|
}, n));
|
|
2386
2389
|
}, Ot = "TooltipTrigger", So = /* @__PURE__ */ M((e, t) => {
|
|
2387
|
-
const { __scopeTooltip: n, ...o } = e, i =
|
|
2390
|
+
const { __scopeTooltip: n, ...o } = e, i = Pe(Ot, n), r = st(Ot, n), s = je(n), a = L(null), c = pe(t, a, i.onTriggerChange), l = L(!1), d = L(!1), u = H(
|
|
2388
2391
|
() => l.current = !1,
|
|
2389
2392
|
[]
|
|
2390
2393
|
);
|
|
@@ -2419,7 +2422,7 @@ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ w(ce.span, S({}, e, {
|
|
|
2419
2422
|
}), on = "TooltipPortal", [Do, No] = Ve(on, {
|
|
2420
2423
|
forceMount: void 0
|
|
2421
2424
|
}), Lo = (e) => {
|
|
2422
|
-
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r =
|
|
2425
|
+
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = Pe(on, t);
|
|
2423
2426
|
return /* @__PURE__ */ w(Do, {
|
|
2424
2427
|
scope: t,
|
|
2425
2428
|
forceMount: n
|
|
@@ -2429,8 +2432,8 @@ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ w(ce.span, S({}, e, {
|
|
|
2429
2432
|
asChild: !0,
|
|
2430
2433
|
container: i
|
|
2431
2434
|
}, o)));
|
|
2432
|
-
},
|
|
2433
|
-
const n = No(
|
|
2435
|
+
}, we = "TooltipContent", Mo = /* @__PURE__ */ M((e, t) => {
|
|
2436
|
+
const n = No(we, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = Pe(we, e.__scopeTooltip);
|
|
2434
2437
|
return /* @__PURE__ */ w(it, {
|
|
2435
2438
|
present: o || s.open
|
|
2436
2439
|
}, s.disableHoverableContent ? /* @__PURE__ */ w(sn, S({
|
|
@@ -2443,7 +2446,7 @@ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ w(ce.span, S({}, e, {
|
|
|
2443
2446
|
ref: t
|
|
2444
2447
|
})));
|
|
2445
2448
|
}), Io = /* @__PURE__ */ M((e, t) => {
|
|
2446
|
-
const n = we
|
|
2449
|
+
const n = Pe(we, e.__scopeTooltip), o = st(we, e.__scopeTooltip), i = L(null), r = pe(t, i), [s, a] = z(null), { trigger: c, onClose: l } = n, d = i.current, { onPointerInTransitChange: u } = o, p = H(() => {
|
|
2447
2450
|
a(null), u(!1);
|
|
2448
2451
|
}, [
|
|
2449
2452
|
u
|
|
@@ -2496,7 +2499,7 @@ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ w(ce.span, S({}, e, {
|
|
|
2496
2499
|
}), [Fo, Ho] = Ve(at, {
|
|
2497
2500
|
isInside: !1
|
|
2498
2501
|
}), sn = /* @__PURE__ */ M((e, t) => {
|
|
2499
|
-
const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c = we
|
|
2502
|
+
const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c = Pe(we, n), l = je(n), { onClose: d } = c;
|
|
2500
2503
|
return R(() => (document.addEventListener(Ze, d), () => document.removeEventListener(Ze, d)), [
|
|
2501
2504
|
d
|
|
2502
2505
|
]), R(() => {
|