lizaui 3.0.31 → 3.0.33
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/chunks/{tooltip-BQO-Kw-i.js → tooltip-Dh3LI-sS.js} +2 -2
- package/dist/chunks/{tooltip-BQO-Kw-i.js.map → tooltip-Dh3LI-sS.js.map} +1 -1
- package/dist/chunks/{tooltip-DaHqUGD8.js → tooltip-jYlWnuGh.js} +156 -156
- package/dist/chunks/{tooltip-DaHqUGD8.js.map → tooltip-jYlWnuGh.js.map} +1 -1
- package/dist/table/index.cjs.js +1 -1
- package/dist/table/index.es.js +1 -1
- package/dist/tooltip/index.cjs.js +1 -1
- package/dist/tooltip/index.es.js +1 -1
- package/dist/ui/index.cjs.js +1 -1
- package/dist/ui/index.cjs.js.map +1 -1
- package/dist/ui/index.es.js +1 -1
- package/dist/ui/index.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as V } from "./jsx-runtime-BYq8_R6m.js";
|
|
2
2
|
import * as i from "react";
|
|
3
|
-
import { useLayoutEffect as Oe, useState as Fe, useRef as
|
|
4
|
-
import { i as
|
|
3
|
+
import { useLayoutEffect as Oe, useState as Fe, useRef as Ae } from "react";
|
|
4
|
+
import { i as ke, d as ae, e as _, g as _e, j as te, k as Ce, m as Ne, n as ne, p as je, q as Ke } from "./floating-ui.dom-Cg-kYEhk.js";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
import { u as $e, o as Be, f as We, s as He, a as Ve } from "./floating-ui.react-dom-CryFonyk.js";
|
|
7
7
|
import { t as Ye } from "./bundle-mjs-kGHm2Pod.js";
|
|
@@ -12,11 +12,11 @@ function Xe() {
|
|
|
12
12
|
}
|
|
13
13
|
function qe() {
|
|
14
14
|
const e = navigator.userAgentData;
|
|
15
|
-
return e && Array.isArray(e.brands) ? e.brands.map((
|
|
15
|
+
return e && Array.isArray(e.brands) ? e.brands.map((r) => {
|
|
16
16
|
let {
|
|
17
17
|
brand: n,
|
|
18
18
|
version: t
|
|
19
|
-
} =
|
|
19
|
+
} = r;
|
|
20
20
|
return n + "/" + t;
|
|
21
21
|
}).join(" ") : navigator.userAgent;
|
|
22
22
|
}
|
|
@@ -31,21 +31,21 @@ function Qe() {
|
|
|
31
31
|
}
|
|
32
32
|
const pe = "data-floating-ui-focusable", Ze = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
|
|
33
33
|
function Re(e) {
|
|
34
|
-
let
|
|
35
|
-
for (; ((n =
|
|
34
|
+
let r = e.activeElement;
|
|
35
|
+
for (; ((n = r) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
|
|
36
36
|
var n;
|
|
37
|
-
|
|
37
|
+
r = r.shadowRoot.activeElement;
|
|
38
38
|
}
|
|
39
|
-
return
|
|
39
|
+
return r;
|
|
40
40
|
}
|
|
41
|
-
function Z(e,
|
|
42
|
-
if (!e || !
|
|
41
|
+
function Z(e, r) {
|
|
42
|
+
if (!e || !r)
|
|
43
43
|
return !1;
|
|
44
|
-
const n =
|
|
45
|
-
if (e.contains(
|
|
44
|
+
const n = r.getRootNode == null ? void 0 : r.getRootNode();
|
|
45
|
+
if (e.contains(r))
|
|
46
46
|
return !0;
|
|
47
|
-
if (n &&
|
|
48
|
-
let t =
|
|
47
|
+
if (n && ke(n)) {
|
|
48
|
+
let t = r;
|
|
49
49
|
for (; t; ) {
|
|
50
50
|
if (e === t)
|
|
51
51
|
return !0;
|
|
@@ -57,13 +57,13 @@ function Z(e, o) {
|
|
|
57
57
|
function G(e) {
|
|
58
58
|
return "composedPath" in e ? e.composedPath()[0] : e.target;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
if (
|
|
60
|
+
function re(e, r) {
|
|
61
|
+
if (r == null)
|
|
62
62
|
return !1;
|
|
63
63
|
if ("composedPath" in e)
|
|
64
|
-
return e.composedPath().includes(
|
|
64
|
+
return e.composedPath().includes(r);
|
|
65
65
|
const n = e;
|
|
66
|
-
return n.target != null &&
|
|
66
|
+
return n.target != null && r.contains(n.target);
|
|
67
67
|
}
|
|
68
68
|
function ze(e) {
|
|
69
69
|
return e.matches("html,body");
|
|
@@ -85,51 +85,51 @@ function tt(e) {
|
|
|
85
85
|
function nt(e) {
|
|
86
86
|
return e ? e.hasAttribute(pe) ? e : e.querySelector("[" + pe + "]") || e : null;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function oe(e, r) {
|
|
89
89
|
let n = e.filter((s) => {
|
|
90
90
|
var l;
|
|
91
|
-
return s.parentId ===
|
|
91
|
+
return s.parentId === r && ((l = s.context) == null ? void 0 : l.open);
|
|
92
92
|
}), t = n;
|
|
93
93
|
for (; t.length; )
|
|
94
94
|
t = e.filter((s) => {
|
|
95
95
|
var l;
|
|
96
96
|
return (l = t) == null ? void 0 : l.some((c) => {
|
|
97
|
-
var
|
|
98
|
-
return s.parentId === c.id && ((
|
|
97
|
+
var o;
|
|
98
|
+
return s.parentId === c.id && ((o = s.context) == null ? void 0 : o.open);
|
|
99
99
|
});
|
|
100
100
|
}), n = n.concat(t);
|
|
101
101
|
return n;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function rt(e) {
|
|
104
104
|
return "nativeEvent" in e;
|
|
105
105
|
}
|
|
106
|
-
function le(e,
|
|
106
|
+
function le(e, r) {
|
|
107
107
|
const n = ["mouse", "pen"];
|
|
108
108
|
return n.push("", void 0), n.includes(e);
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
}, q =
|
|
110
|
+
var ot = typeof document < "u", st = function() {
|
|
111
|
+
}, q = ot ? Oe : st;
|
|
112
112
|
const it = {
|
|
113
113
|
...i
|
|
114
114
|
};
|
|
115
115
|
function ee(e) {
|
|
116
|
-
const
|
|
116
|
+
const r = i.useRef(e);
|
|
117
117
|
return q(() => {
|
|
118
|
-
|
|
119
|
-
}),
|
|
118
|
+
r.current = e;
|
|
119
|
+
}), r;
|
|
120
120
|
}
|
|
121
121
|
const ct = it.useInsertionEffect, ut = ct || ((e) => e());
|
|
122
122
|
function Y(e) {
|
|
123
|
-
const
|
|
123
|
+
const r = i.useRef(() => {
|
|
124
124
|
if (process.env.NODE_ENV !== "production")
|
|
125
125
|
throw new Error("Cannot call an event handler while rendering.");
|
|
126
126
|
});
|
|
127
127
|
return ut(() => {
|
|
128
|
-
|
|
128
|
+
r.current = e;
|
|
129
129
|
}), i.useCallback(function() {
|
|
130
130
|
for (var n = arguments.length, t = new Array(n), s = 0; s < n; s++)
|
|
131
131
|
t[s] = arguments[s];
|
|
132
|
-
return
|
|
132
|
+
return r.current == null ? void 0 : r.current(...t);
|
|
133
133
|
}, []);
|
|
134
134
|
}
|
|
135
135
|
const lt = "data-floating-ui-focusable", Ee = "active", he = "selected", at = {
|
|
@@ -142,9 +142,9 @@ const we = () => (
|
|
|
142
142
|
"floating-ui-" + Math.random().toString(36).slice(2, 6) + ft++
|
|
143
143
|
);
|
|
144
144
|
function dt() {
|
|
145
|
-
const [e,
|
|
145
|
+
const [e, r] = i.useState(() => be ? we() : void 0);
|
|
146
146
|
return q(() => {
|
|
147
|
-
e == null &&
|
|
147
|
+
e == null && r(we());
|
|
148
148
|
}, []), i.useEffect(() => {
|
|
149
149
|
be = !0;
|
|
150
150
|
}, []), e;
|
|
@@ -153,7 +153,7 @@ const mt = at.useId, fe = mt || dt;
|
|
|
153
153
|
let z;
|
|
154
154
|
process.env.NODE_ENV !== "production" && (z = /* @__PURE__ */ new Set());
|
|
155
155
|
function vt() {
|
|
156
|
-
for (var e,
|
|
156
|
+
for (var e, r = arguments.length, n = new Array(r), t = 0; t < r; t++)
|
|
157
157
|
n[t] = arguments[t];
|
|
158
158
|
const s = "Floating UI: " + n.join(" ");
|
|
159
159
|
if (!((e = z) != null && e.has(s))) {
|
|
@@ -162,7 +162,7 @@ function vt() {
|
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
function gt() {
|
|
165
|
-
for (var e,
|
|
165
|
+
for (var e, r = arguments.length, n = new Array(r), t = 0; t < r; t++)
|
|
166
166
|
n[t] = arguments[t];
|
|
167
167
|
const s = "Floating UI: " + n.join(" ");
|
|
168
168
|
if (!((e = z) != null && e.has(s))) {
|
|
@@ -170,7 +170,7 @@ function gt() {
|
|
|
170
170
|
(l = z) == null || l.add(s);
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
const pt = /* @__PURE__ */ i.forwardRef(function(
|
|
173
|
+
const pt = /* @__PURE__ */ i.forwardRef(function(r, n) {
|
|
174
174
|
const {
|
|
175
175
|
context: {
|
|
176
176
|
placement: t,
|
|
@@ -182,7 +182,7 @@ const pt = /* @__PURE__ */ i.forwardRef(function(o, n) {
|
|
|
182
182
|
shift: c
|
|
183
183
|
}
|
|
184
184
|
},
|
|
185
|
-
width:
|
|
185
|
+
width: o = 14,
|
|
186
186
|
height: v = 7,
|
|
187
187
|
tipRadius: p = 0,
|
|
188
188
|
strokeWidth: R = 0,
|
|
@@ -194,7 +194,7 @@ const pt = /* @__PURE__ */ i.forwardRef(function(o, n) {
|
|
|
194
194
|
...f
|
|
195
195
|
} = {},
|
|
196
196
|
...x
|
|
197
|
-
} =
|
|
197
|
+
} = r;
|
|
198
198
|
process.env.NODE_ENV !== "production" && (n || vt("The `ref` prop is required for `FloatingArrow`."));
|
|
199
199
|
const T = fe(), [C, w] = i.useState(!1);
|
|
200
200
|
if (q(() => {
|
|
@@ -205,10 +205,10 @@ const pt = /* @__PURE__ */ i.forwardRef(function(o, n) {
|
|
|
205
205
|
const [P, D] = t.split("-"), F = P === "top" || P === "bottom";
|
|
206
206
|
let N = y;
|
|
207
207
|
(F && c != null && c.x || !F && c != null && c.y) && (N = null);
|
|
208
|
-
const j = R * 2,
|
|
209
|
-
let
|
|
210
|
-
N && C && (
|
|
211
|
-
const g = (l == null ? void 0 : l.x) != null ? N || l.x : "", L = (l == null ? void 0 : l.y) != null ? N || l.y : "", d = u || "M0,0" + (" H" +
|
|
208
|
+
const j = R * 2, A = j / 2, B = o / 2 * (p / -8 + 1), W = v / 2 * p / 4, O = !!u, H = N && D === "end" ? "bottom" : "top";
|
|
209
|
+
let k = N && D === "end" ? "right" : "left";
|
|
210
|
+
N && C && (k = D === "end" ? "left" : "right");
|
|
211
|
+
const g = (l == null ? void 0 : l.x) != null ? N || l.x : "", L = (l == null ? void 0 : l.y) != null ? N || l.y : "", d = u || "M0,0" + (" H" + o) + (" L" + (o - B) + "," + (v - W)) + (" Q" + o / 2 + "," + v + " " + B + "," + (v - W)) + " Z", m = {
|
|
212
212
|
top: O ? "rotate(180deg)" : "",
|
|
213
213
|
left: O ? "rotate(90deg)" : "rotate(-90deg)",
|
|
214
214
|
bottom: O ? "" : "rotate(180deg)",
|
|
@@ -218,13 +218,13 @@ const pt = /* @__PURE__ */ i.forwardRef(function(o, n) {
|
|
|
218
218
|
...x,
|
|
219
219
|
"aria-hidden": !0,
|
|
220
220
|
ref: n,
|
|
221
|
-
width: O ?
|
|
222
|
-
height:
|
|
223
|
-
viewBox: "0 0 " +
|
|
221
|
+
width: O ? o : o + j,
|
|
222
|
+
height: o,
|
|
223
|
+
viewBox: "0 0 " + o + " " + (v > o ? v : o),
|
|
224
224
|
style: {
|
|
225
225
|
position: "absolute",
|
|
226
226
|
pointerEvents: "none",
|
|
227
|
-
[
|
|
227
|
+
[k]: g,
|
|
228
228
|
[H]: L,
|
|
229
229
|
[P]: F || O ? "100%" : "calc(100% - " + j / 2 + "px)",
|
|
230
230
|
transform: [m, b].filter((a) => !!a).join(" "),
|
|
@@ -242,10 +242,10 @@ const pt = /* @__PURE__ */ i.forwardRef(function(o, n) {
|
|
|
242
242
|
}), /* @__PURE__ */ V.jsx("clipPath", {
|
|
243
243
|
id: T,
|
|
244
244
|
children: /* @__PURE__ */ V.jsx("rect", {
|
|
245
|
-
x: -
|
|
246
|
-
y:
|
|
247
|
-
width:
|
|
248
|
-
height:
|
|
245
|
+
x: -A,
|
|
246
|
+
y: A * (O ? -1 : 1),
|
|
247
|
+
width: o + j,
|
|
248
|
+
height: o
|
|
249
249
|
})
|
|
250
250
|
})]
|
|
251
251
|
});
|
|
@@ -253,16 +253,16 @@ const pt = /* @__PURE__ */ i.forwardRef(function(o, n) {
|
|
|
253
253
|
function Rt() {
|
|
254
254
|
const e = /* @__PURE__ */ new Map();
|
|
255
255
|
return {
|
|
256
|
-
emit(
|
|
256
|
+
emit(r, n) {
|
|
257
257
|
var t;
|
|
258
|
-
(t = e.get(
|
|
258
|
+
(t = e.get(r)) == null || t.forEach((s) => s(n));
|
|
259
259
|
},
|
|
260
|
-
on(
|
|
261
|
-
e.has(
|
|
260
|
+
on(r, n) {
|
|
261
|
+
e.has(r) || e.set(r, /* @__PURE__ */ new Set()), e.get(r).add(n);
|
|
262
262
|
},
|
|
263
|
-
off(
|
|
263
|
+
off(r, n) {
|
|
264
264
|
var t;
|
|
265
|
-
(t = e.get(
|
|
265
|
+
(t = e.get(r)) == null || t.delete(n);
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
268
|
}
|
|
@@ -277,22 +277,22 @@ function $(e) {
|
|
|
277
277
|
e.current !== -1 && (clearTimeout(e.current), e.current = -1);
|
|
278
278
|
}
|
|
279
279
|
const ye = /* @__PURE__ */ ve("safe-polygon");
|
|
280
|
-
function se(e,
|
|
280
|
+
function se(e, r, n) {
|
|
281
281
|
if (n && !le(n))
|
|
282
282
|
return 0;
|
|
283
283
|
if (typeof e == "number")
|
|
284
284
|
return e;
|
|
285
285
|
if (typeof e == "function") {
|
|
286
286
|
const t = e();
|
|
287
|
-
return typeof t == "number" ? t : t == null ? void 0 : t[
|
|
287
|
+
return typeof t == "number" ? t : t == null ? void 0 : t[r];
|
|
288
288
|
}
|
|
289
|
-
return e == null ? void 0 : e[
|
|
289
|
+
return e == null ? void 0 : e[r];
|
|
290
290
|
}
|
|
291
291
|
function ie(e) {
|
|
292
292
|
return typeof e == "function" ? e() : e;
|
|
293
293
|
}
|
|
294
|
-
function bt(e,
|
|
295
|
-
|
|
294
|
+
function bt(e, r) {
|
|
295
|
+
r === void 0 && (r = {});
|
|
296
296
|
const {
|
|
297
297
|
open: n,
|
|
298
298
|
onOpenChange: t,
|
|
@@ -300,20 +300,20 @@ function bt(e, o) {
|
|
|
300
300
|
events: l,
|
|
301
301
|
elements: c
|
|
302
302
|
} = e, {
|
|
303
|
-
enabled:
|
|
303
|
+
enabled: o = !0,
|
|
304
304
|
delay: v = 0,
|
|
305
305
|
handleClose: p = null,
|
|
306
306
|
mouseOnly: R = !1,
|
|
307
307
|
restMs: y = 0,
|
|
308
308
|
move: h = !0
|
|
309
|
-
} =
|
|
309
|
+
} = r, u = me(), b = de(), f = ee(p), x = ee(v), T = ee(n), C = ee(y), w = i.useRef(), P = i.useRef(-1), D = i.useRef(), F = i.useRef(-1), N = i.useRef(!0), j = i.useRef(!1), A = i.useRef(() => {
|
|
310
310
|
}), B = i.useRef(!1), W = Y(() => {
|
|
311
311
|
var d;
|
|
312
312
|
const m = (d = s.current.openEvent) == null ? void 0 : d.type;
|
|
313
313
|
return (m == null ? void 0 : m.includes("mouse")) && m !== "mousedown";
|
|
314
314
|
});
|
|
315
315
|
i.useEffect(() => {
|
|
316
|
-
if (!
|
|
316
|
+
if (!o) return;
|
|
317
317
|
function d(m) {
|
|
318
318
|
let {
|
|
319
319
|
open: a
|
|
@@ -323,8 +323,8 @@ function bt(e, o) {
|
|
|
323
323
|
return l.on("openchange", d), () => {
|
|
324
324
|
l.off("openchange", d);
|
|
325
325
|
};
|
|
326
|
-
}, [
|
|
327
|
-
if (!
|
|
326
|
+
}, [o, l]), i.useEffect(() => {
|
|
327
|
+
if (!o || !f.current || !n) return;
|
|
328
328
|
function d(a) {
|
|
329
329
|
W() && t(!1, a, "hover");
|
|
330
330
|
}
|
|
@@ -332,21 +332,21 @@ function bt(e, o) {
|
|
|
332
332
|
return m.addEventListener("mouseleave", d), () => {
|
|
333
333
|
m.removeEventListener("mouseleave", d);
|
|
334
334
|
};
|
|
335
|
-
}, [c.floating, n, t,
|
|
335
|
+
}, [c.floating, n, t, o, f, W]);
|
|
336
336
|
const O = i.useCallback(function(d, m, a) {
|
|
337
337
|
m === void 0 && (m = !0), a === void 0 && (a = "hover");
|
|
338
338
|
const M = se(x.current, "close", w.current);
|
|
339
339
|
M && !D.current ? ($(P), P.current = window.setTimeout(() => t(!1, d, a), M)) : m && ($(P), t(!1, d, a));
|
|
340
340
|
}, [x, t]), H = Y(() => {
|
|
341
|
-
|
|
342
|
-
}),
|
|
341
|
+
A.current(), D.current = void 0;
|
|
342
|
+
}), k = Y(() => {
|
|
343
343
|
if (j.current) {
|
|
344
344
|
const d = X(c.floating).body;
|
|
345
345
|
d.style.pointerEvents = "", d.removeAttribute(ye), j.current = !1;
|
|
346
346
|
}
|
|
347
347
|
}), g = Y(() => s.current.openEvent ? ["click", "mousedown"].includes(s.current.openEvent.type) : !1);
|
|
348
348
|
i.useEffect(() => {
|
|
349
|
-
if (!
|
|
349
|
+
if (!o) return;
|
|
350
350
|
function d(E) {
|
|
351
351
|
if ($(P), N.current = !1, R && !le(w.current) || ie(C.current) > 0 && !se(x.current, "open"))
|
|
352
352
|
return;
|
|
@@ -357,10 +357,10 @@ function bt(e, o) {
|
|
|
357
357
|
}
|
|
358
358
|
function m(E) {
|
|
359
359
|
if (g()) {
|
|
360
|
-
|
|
360
|
+
k();
|
|
361
361
|
return;
|
|
362
362
|
}
|
|
363
|
-
|
|
363
|
+
A.current();
|
|
364
364
|
const I = X(c.floating);
|
|
365
365
|
if ($(F), B.current = !1, f.current && s.current.floatingContext) {
|
|
366
366
|
n || $(P), D.current = f.current({
|
|
@@ -369,11 +369,11 @@ function bt(e, o) {
|
|
|
369
369
|
x: E.clientX,
|
|
370
370
|
y: E.clientY,
|
|
371
371
|
onClose() {
|
|
372
|
-
|
|
372
|
+
k(), H(), g() || O(E, !0, "safe-polygon");
|
|
373
373
|
}
|
|
374
374
|
});
|
|
375
375
|
const J = D.current;
|
|
376
|
-
I.addEventListener("mousemove", J),
|
|
376
|
+
I.addEventListener("mousemove", J), A.current = () => {
|
|
377
377
|
I.removeEventListener("mousemove", J);
|
|
378
378
|
};
|
|
379
379
|
return;
|
|
@@ -387,7 +387,7 @@ function bt(e, o) {
|
|
|
387
387
|
x: E.clientX,
|
|
388
388
|
y: E.clientY,
|
|
389
389
|
onClose() {
|
|
390
|
-
|
|
390
|
+
k(), H(), g() || O(E);
|
|
391
391
|
}
|
|
392
392
|
})(E));
|
|
393
393
|
}
|
|
@@ -405,9 +405,9 @@ function bt(e, o) {
|
|
|
405
405
|
n && E.removeEventListener("mouseleave", a), h && E.removeEventListener("mousemove", d), E.removeEventListener("mouseenter", d), E.removeEventListener("mouseleave", m), I && (I.removeEventListener("mouseleave", a), I.removeEventListener("mouseenter", M), I.removeEventListener("mouseleave", S));
|
|
406
406
|
};
|
|
407
407
|
}
|
|
408
|
-
}, [c,
|
|
408
|
+
}, [c, o, e, R, h, O, H, k, t, n, T, u, x, f, s, g, C]), q(() => {
|
|
409
409
|
var d;
|
|
410
|
-
if (
|
|
410
|
+
if (o && n && (d = f.current) != null && (d = d.__options) != null && d.blockPointerEvents && W()) {
|
|
411
411
|
j.current = !0;
|
|
412
412
|
const a = c.floating;
|
|
413
413
|
if (_(c.domReference) && a) {
|
|
@@ -420,11 +420,11 @@ function bt(e, o) {
|
|
|
420
420
|
};
|
|
421
421
|
}
|
|
422
422
|
}
|
|
423
|
-
}, [
|
|
424
|
-
n || (w.current = void 0, B.current = !1, H(),
|
|
425
|
-
}, [n, H,
|
|
426
|
-
H(), $(P), $(F),
|
|
427
|
-
}, [
|
|
423
|
+
}, [o, n, b, c, u, f, W]), q(() => {
|
|
424
|
+
n || (w.current = void 0, B.current = !1, H(), k());
|
|
425
|
+
}, [n, H, k]), i.useEffect(() => () => {
|
|
426
|
+
H(), $(P), $(F), k();
|
|
427
|
+
}, [o, c.domReference, H, k]);
|
|
428
428
|
const L = i.useMemo(() => {
|
|
429
429
|
function d(m) {
|
|
430
430
|
w.current = m.pointerType;
|
|
@@ -443,9 +443,9 @@ function bt(e, o) {
|
|
|
443
443
|
}
|
|
444
444
|
};
|
|
445
445
|
}, [R, t, n, T, C]);
|
|
446
|
-
return i.useMemo(() =>
|
|
446
|
+
return i.useMemo(() => o ? {
|
|
447
447
|
reference: L
|
|
448
|
-
} : {}, [
|
|
448
|
+
} : {}, [o, L]);
|
|
449
449
|
}
|
|
450
450
|
const wt = {
|
|
451
451
|
pointerdown: "onPointerDown",
|
|
@@ -456,14 +456,14 @@ const wt = {
|
|
|
456
456
|
mousedown: "onMouseDownCapture",
|
|
457
457
|
click: "onClickCapture"
|
|
458
458
|
}, xe = (e) => {
|
|
459
|
-
var
|
|
459
|
+
var r, n;
|
|
460
460
|
return {
|
|
461
|
-
escapeKey: typeof e == "boolean" ? e : (
|
|
461
|
+
escapeKey: typeof e == "boolean" ? e : (r = e == null ? void 0 : e.escapeKey) != null ? r : !1,
|
|
462
462
|
outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
|
|
463
463
|
};
|
|
464
464
|
};
|
|
465
|
-
function xt(e,
|
|
466
|
-
|
|
465
|
+
function xt(e, r) {
|
|
466
|
+
r === void 0 && (r = {});
|
|
467
467
|
const {
|
|
468
468
|
open: n,
|
|
469
469
|
onOpenChange: t,
|
|
@@ -471,7 +471,7 @@ function xt(e, o) {
|
|
|
471
471
|
dataRef: l
|
|
472
472
|
} = e, {
|
|
473
473
|
enabled: c = !0,
|
|
474
|
-
escapeKey:
|
|
474
|
+
escapeKey: o = !0,
|
|
475
475
|
outsidePress: v = !0,
|
|
476
476
|
outsidePressEvent: p = "pointerdown",
|
|
477
477
|
referencePress: R = !1,
|
|
@@ -479,17 +479,17 @@ function xt(e, o) {
|
|
|
479
479
|
ancestorScroll: h = !1,
|
|
480
480
|
bubbles: u,
|
|
481
481
|
capture: b
|
|
482
|
-
} =
|
|
482
|
+
} = r, f = me(), x = Y(typeof v == "function" ? v : () => !1), T = typeof v == "function" ? x : v, C = i.useRef(!1), {
|
|
483
483
|
escapeKey: w,
|
|
484
484
|
outsidePress: P
|
|
485
485
|
} = xe(u), {
|
|
486
486
|
escapeKey: D,
|
|
487
487
|
outsidePress: F
|
|
488
|
-
} = xe(b), N = i.useRef(!1), j = i.useRef(-1),
|
|
488
|
+
} = xe(b), N = i.useRef(!1), j = i.useRef(-1), A = Y((g) => {
|
|
489
489
|
var L;
|
|
490
|
-
if (!n || !c || !
|
|
490
|
+
if (!n || !c || !o || g.key !== "Escape" || N.current)
|
|
491
491
|
return;
|
|
492
|
-
const d = (L = l.current.floatingContext) == null ? void 0 : L.nodeId, m = f ?
|
|
492
|
+
const d = (L = l.current.floatingContext) == null ? void 0 : L.nodeId, m = f ? oe(f.nodesRef.current, d) : [];
|
|
493
493
|
if (!w && (g.stopPropagation(), m.length > 0)) {
|
|
494
494
|
let a = !0;
|
|
495
495
|
if (m.forEach((M) => {
|
|
@@ -501,12 +501,12 @@ function xt(e, o) {
|
|
|
501
501
|
}), !a)
|
|
502
502
|
return;
|
|
503
503
|
}
|
|
504
|
-
t(!1,
|
|
504
|
+
t(!1, rt(g) ? g.nativeEvent : g, "escape-key");
|
|
505
505
|
}), B = Y((g) => {
|
|
506
506
|
var L;
|
|
507
507
|
const d = () => {
|
|
508
508
|
var m;
|
|
509
|
-
|
|
509
|
+
A(g), (m = G(g)) == null || m.removeEventListener("keydown", d);
|
|
510
510
|
};
|
|
511
511
|
(L = G(g)) == null || L.addEventListener("keydown", d);
|
|
512
512
|
}), W = Y((g) => {
|
|
@@ -529,18 +529,18 @@ function xt(e, o) {
|
|
|
529
529
|
// element was injected after the floating element rendered.
|
|
530
530
|
Array.from(S).every((K) => !Z(E, K)))
|
|
531
531
|
return;
|
|
532
|
-
if (ae(a) &&
|
|
532
|
+
if (ae(a) && k) {
|
|
533
533
|
const K = ne(a), U = Ce(a), Q = /auto|scroll/, Te = K || Q.test(U.overflowX), Me = K || Q.test(U.overflowY), Pe = Te && a.clientWidth > 0 && a.scrollWidth > a.clientWidth, Le = Me && a.clientHeight > 0 && a.scrollHeight > a.clientHeight, Se = U.direction === "rtl", Ie = Le && (Se ? g.offsetX <= a.offsetWidth - a.clientWidth : g.offsetX > a.clientWidth), De = Pe && g.offsetY > a.clientHeight;
|
|
534
534
|
if (Ie || De)
|
|
535
535
|
return;
|
|
536
536
|
}
|
|
537
|
-
const I = (L = l.current.floatingContext) == null ? void 0 : L.nodeId, ge = f &&
|
|
537
|
+
const I = (L = l.current.floatingContext) == null ? void 0 : L.nodeId, ge = f && oe(f.nodesRef.current, I).some((K) => {
|
|
538
538
|
var U;
|
|
539
|
-
return
|
|
539
|
+
return re(g, (U = K.context) == null ? void 0 : U.elements.floating);
|
|
540
540
|
});
|
|
541
|
-
if (
|
|
541
|
+
if (re(g, s.floating) || re(g, s.domReference) || ge)
|
|
542
542
|
return;
|
|
543
|
-
const J = f ?
|
|
543
|
+
const J = f ? oe(f.nodesRef.current, I) : [];
|
|
544
544
|
if (J.length > 0) {
|
|
545
545
|
let K = !0;
|
|
546
546
|
if (J.forEach((U) => {
|
|
@@ -583,7 +583,7 @@ function xt(e, o) {
|
|
|
583
583
|
);
|
|
584
584
|
}
|
|
585
585
|
const a = X(s.floating);
|
|
586
|
-
|
|
586
|
+
o && (a.addEventListener("keydown", D ? B : A, D), a.addEventListener("compositionstart", d), a.addEventListener("compositionend", m)), T && a.addEventListener(p, F ? O : W, F);
|
|
587
587
|
let M = [];
|
|
588
588
|
return h && (_(s.domReference) && (M = te(s.domReference)), _(s.floating) && (M = M.concat(te(s.floating))), !_(s.reference) && s.reference && s.reference.contextElement && (M = M.concat(te(s.reference.contextElement)))), M = M.filter((S) => {
|
|
589
589
|
var E;
|
|
@@ -593,15 +593,15 @@ function xt(e, o) {
|
|
|
593
593
|
passive: !0
|
|
594
594
|
});
|
|
595
595
|
}), () => {
|
|
596
|
-
|
|
596
|
+
o && (a.removeEventListener("keydown", D ? B : A, D), a.removeEventListener("compositionstart", d), a.removeEventListener("compositionend", m)), T && a.removeEventListener(p, F ? O : W, F), M.forEach((S) => {
|
|
597
597
|
S.removeEventListener("scroll", L);
|
|
598
598
|
}), window.clearTimeout(g);
|
|
599
599
|
};
|
|
600
|
-
}, [l, s,
|
|
600
|
+
}, [l, s, o, T, p, n, t, h, c, w, P, A, D, B, W, F, O]), i.useEffect(() => {
|
|
601
601
|
l.current.insideReactTree = !1;
|
|
602
602
|
}, [l, T, p]);
|
|
603
603
|
const H = i.useMemo(() => ({
|
|
604
|
-
onKeyDown:
|
|
604
|
+
onKeyDown: A,
|
|
605
605
|
...R && {
|
|
606
606
|
[wt[y]]: (g) => {
|
|
607
607
|
t(!1, g.nativeEvent, "reference-press");
|
|
@@ -612,8 +612,8 @@ function xt(e, o) {
|
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
|
-
}), [
|
|
616
|
-
onKeyDown:
|
|
615
|
+
}), [A, t, R, y]), k = i.useMemo(() => ({
|
|
616
|
+
onKeyDown: A,
|
|
617
617
|
onMouseDown() {
|
|
618
618
|
C.current = !0;
|
|
619
619
|
},
|
|
@@ -628,18 +628,18 @@ function xt(e, o) {
|
|
|
628
628
|
l.current.insideReactTree = !1;
|
|
629
629
|
}));
|
|
630
630
|
}
|
|
631
|
-
}), [
|
|
631
|
+
}), [A, p, l, f]);
|
|
632
632
|
return i.useMemo(() => c ? {
|
|
633
633
|
reference: H,
|
|
634
|
-
floating:
|
|
635
|
-
} : {}, [c, H,
|
|
634
|
+
floating: k
|
|
635
|
+
} : {}, [c, H, k]);
|
|
636
636
|
}
|
|
637
637
|
function Ct(e) {
|
|
638
638
|
const {
|
|
639
|
-
open:
|
|
639
|
+
open: r = !1,
|
|
640
640
|
onOpenChange: n,
|
|
641
641
|
elements: t
|
|
642
|
-
} = e, s = fe(), l = i.useRef({}), [c] = i.useState(() => Rt()),
|
|
642
|
+
} = e, s = fe(), l = i.useRef({}), [c] = i.useState(() => Rt()), o = de() != null;
|
|
643
643
|
if (process.env.NODE_ENV !== "production") {
|
|
644
644
|
const u = t.reference;
|
|
645
645
|
u && !_(u) && gt("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
|
|
@@ -649,7 +649,7 @@ function Ct(e) {
|
|
|
649
649
|
open: u,
|
|
650
650
|
event: b,
|
|
651
651
|
reason: f,
|
|
652
|
-
nested:
|
|
652
|
+
nested: o
|
|
653
653
|
}), n == null || n(u, b, f);
|
|
654
654
|
}), y = i.useMemo(() => ({
|
|
655
655
|
setPositionReference: p
|
|
@@ -660,18 +660,18 @@ function Ct(e) {
|
|
|
660
660
|
}), [v, t.reference, t.floating]);
|
|
661
661
|
return i.useMemo(() => ({
|
|
662
662
|
dataRef: l,
|
|
663
|
-
open:
|
|
663
|
+
open: r,
|
|
664
664
|
onOpenChange: R,
|
|
665
665
|
elements: h,
|
|
666
666
|
events: c,
|
|
667
667
|
floatingId: s,
|
|
668
668
|
refs: y
|
|
669
|
-
}), [
|
|
669
|
+
}), [r, R, h, c, s, y]);
|
|
670
670
|
}
|
|
671
671
|
function Tt(e) {
|
|
672
672
|
e === void 0 && (e = {});
|
|
673
673
|
const {
|
|
674
|
-
nodeId:
|
|
674
|
+
nodeId: r
|
|
675
675
|
} = e, n = Ct({
|
|
676
676
|
...e,
|
|
677
677
|
elements: {
|
|
@@ -679,7 +679,7 @@ function Tt(e) {
|
|
|
679
679
|
floating: null,
|
|
680
680
|
...e.elements
|
|
681
681
|
}
|
|
682
|
-
}), t = e.rootContext || n, s = t.elements, [l, c] = i.useState(null), [
|
|
682
|
+
}), t = e.rootContext || n, s = t.elements, [l, c] = i.useState(null), [o, v] = i.useState(null), R = (s == null ? void 0 : s.domReference) || l, y = i.useRef(null), h = me();
|
|
683
683
|
q(() => {
|
|
684
684
|
R && (y.current = R);
|
|
685
685
|
}, [R]);
|
|
@@ -687,8 +687,8 @@ function Tt(e) {
|
|
|
687
687
|
...e,
|
|
688
688
|
elements: {
|
|
689
689
|
...s,
|
|
690
|
-
...
|
|
691
|
-
reference:
|
|
690
|
+
...o && {
|
|
691
|
+
reference: o
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
694
|
}), b = i.useCallback((w) => {
|
|
@@ -716,11 +716,11 @@ function Tt(e) {
|
|
|
716
716
|
...t,
|
|
717
717
|
refs: x,
|
|
718
718
|
elements: T,
|
|
719
|
-
nodeId:
|
|
720
|
-
}), [u, x, T,
|
|
719
|
+
nodeId: r
|
|
720
|
+
}), [u, x, T, r, t]);
|
|
721
721
|
return q(() => {
|
|
722
722
|
t.dataRef.current.floatingContext = C;
|
|
723
|
-
const w = h == null ? void 0 : h.nodesRef.current.find((P) => P.id ===
|
|
723
|
+
const w = h == null ? void 0 : h.nodesRef.current.find((P) => P.id === r);
|
|
724
724
|
w && (w.context = C);
|
|
725
725
|
}), i.useMemo(() => ({
|
|
726
726
|
...u,
|
|
@@ -732,8 +732,8 @@ function Tt(e) {
|
|
|
732
732
|
function ce() {
|
|
733
733
|
return Je() && Ge();
|
|
734
734
|
}
|
|
735
|
-
function Mt(e,
|
|
736
|
-
|
|
735
|
+
function Mt(e, r) {
|
|
736
|
+
r === void 0 && (r = {});
|
|
737
737
|
const {
|
|
738
738
|
open: n,
|
|
739
739
|
onOpenChange: t,
|
|
@@ -741,11 +741,11 @@ function Mt(e, o) {
|
|
|
741
741
|
dataRef: l,
|
|
742
742
|
elements: c
|
|
743
743
|
} = e, {
|
|
744
|
-
enabled:
|
|
744
|
+
enabled: o = !0,
|
|
745
745
|
visibleOnly: v = !0
|
|
746
|
-
} =
|
|
746
|
+
} = r, p = i.useRef(!1), R = i.useRef(-1), y = i.useRef(!0);
|
|
747
747
|
i.useEffect(() => {
|
|
748
|
-
if (!
|
|
748
|
+
if (!o) return;
|
|
749
749
|
const u = _e(c.domReference);
|
|
750
750
|
function b() {
|
|
751
751
|
!n && ae(c.domReference) && c.domReference === Re(X(c.domReference)) && (p.current = !0);
|
|
@@ -759,8 +759,8 @@ function Mt(e, o) {
|
|
|
759
759
|
return u.addEventListener("blur", b), ce() && (u.addEventListener("keydown", f, !0), u.addEventListener("pointerdown", x, !0)), () => {
|
|
760
760
|
u.removeEventListener("blur", b), ce() && (u.removeEventListener("keydown", f, !0), u.removeEventListener("pointerdown", x, !0));
|
|
761
761
|
};
|
|
762
|
-
}, [c.domReference, n,
|
|
763
|
-
if (!
|
|
762
|
+
}, [c.domReference, n, o]), i.useEffect(() => {
|
|
763
|
+
if (!o) return;
|
|
764
764
|
function u(b) {
|
|
765
765
|
let {
|
|
766
766
|
reason: f
|
|
@@ -770,7 +770,7 @@ function Mt(e, o) {
|
|
|
770
770
|
return s.on("openchange", u), () => {
|
|
771
771
|
s.off("openchange", u);
|
|
772
772
|
};
|
|
773
|
-
}, [s,
|
|
773
|
+
}, [s, o]), i.useEffect(() => () => {
|
|
774
774
|
$(R);
|
|
775
775
|
}, []);
|
|
776
776
|
const h = i.useMemo(() => ({
|
|
@@ -799,17 +799,17 @@ function Mt(e, o) {
|
|
|
799
799
|
});
|
|
800
800
|
}
|
|
801
801
|
}), [l, c.domReference, t, v]);
|
|
802
|
-
return i.useMemo(() =>
|
|
802
|
+
return i.useMemo(() => o ? {
|
|
803
803
|
reference: h
|
|
804
|
-
} : {}, [
|
|
804
|
+
} : {}, [o, h]);
|
|
805
805
|
}
|
|
806
|
-
function ue(e,
|
|
806
|
+
function ue(e, r, n) {
|
|
807
807
|
const t = /* @__PURE__ */ new Map(), s = n === "item";
|
|
808
808
|
let l = e;
|
|
809
809
|
if (s && e) {
|
|
810
810
|
const {
|
|
811
811
|
[Ee]: c,
|
|
812
|
-
[he]:
|
|
812
|
+
[he]: o,
|
|
813
813
|
...v
|
|
814
814
|
} = e;
|
|
815
815
|
l = v;
|
|
@@ -820,10 +820,10 @@ function ue(e, o, n) {
|
|
|
820
820
|
[lt]: ""
|
|
821
821
|
},
|
|
822
822
|
...l,
|
|
823
|
-
...
|
|
824
|
-
const
|
|
825
|
-
return typeof
|
|
826
|
-
}).concat(e).reduce((c,
|
|
823
|
+
...r.map((c) => {
|
|
824
|
+
const o = c ? c[n] : null;
|
|
825
|
+
return typeof o == "function" ? e ? o(e) : null : o;
|
|
826
|
+
}).concat(e).reduce((c, o) => (o && Object.entries(o).forEach((v) => {
|
|
827
827
|
let [p, R] = v;
|
|
828
828
|
if (!(s && [Ee, he].includes(p)))
|
|
829
829
|
if (p.indexOf("on") === 0) {
|
|
@@ -842,16 +842,16 @@ function ue(e, o, n) {
|
|
|
842
842
|
}
|
|
843
843
|
function Pt(e) {
|
|
844
844
|
e === void 0 && (e = []);
|
|
845
|
-
const
|
|
846
|
-
(
|
|
845
|
+
const r = e.map((o) => o == null ? void 0 : o.reference), n = e.map((o) => o == null ? void 0 : o.floating), t = e.map((o) => o == null ? void 0 : o.item), s = i.useCallback(
|
|
846
|
+
(o) => ue(o, e, "reference"),
|
|
847
847
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
848
|
-
|
|
848
|
+
r
|
|
849
849
|
), l = i.useCallback(
|
|
850
|
-
(
|
|
850
|
+
(o) => ue(o, e, "floating"),
|
|
851
851
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
852
852
|
n
|
|
853
853
|
), c = i.useCallback(
|
|
854
|
-
(
|
|
854
|
+
(o) => ue(o, e, "item"),
|
|
855
855
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
856
856
|
t
|
|
857
857
|
);
|
|
@@ -862,17 +862,17 @@ function Pt(e) {
|
|
|
862
862
|
}), [s, l, c]);
|
|
863
863
|
}
|
|
864
864
|
const Lt = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
|
|
865
|
-
function St(e,
|
|
865
|
+
function St(e, r) {
|
|
866
866
|
var n, t;
|
|
867
|
-
|
|
867
|
+
r === void 0 && (r = {});
|
|
868
868
|
const {
|
|
869
869
|
open: s,
|
|
870
870
|
elements: l,
|
|
871
871
|
floatingId: c
|
|
872
872
|
} = e, {
|
|
873
|
-
enabled:
|
|
873
|
+
enabled: o = !0,
|
|
874
874
|
role: v = "dialog"
|
|
875
|
-
} =
|
|
875
|
+
} = r, p = fe(), R = ((n = l.domReference) == null ? void 0 : n.id) || p, y = i.useMemo(() => {
|
|
876
876
|
var C;
|
|
877
877
|
return ((C = nt(l.floating)) == null ? void 0 : C.id) || c;
|
|
878
878
|
}, [l.floating, c]), h = (t = Lt.get(v)) != null ? t : v, b = de() != null, f = i.useMemo(() => h === "tooltip" || v === "label" ? {
|
|
@@ -934,31 +934,31 @@ function St(e, o) {
|
|
|
934
934
|
}
|
|
935
935
|
return {};
|
|
936
936
|
}, [y, v]);
|
|
937
|
-
return i.useMemo(() =>
|
|
937
|
+
return i.useMemo(() => o ? {
|
|
938
938
|
reference: f,
|
|
939
939
|
floating: x,
|
|
940
940
|
item: T
|
|
941
|
-
} : {}, [
|
|
941
|
+
} : {}, [o, f, x, T]);
|
|
942
942
|
}
|
|
943
|
-
const Nt = ({ children: e, content:
|
|
944
|
-
const [l, c] = Fe(!1),
|
|
943
|
+
const Nt = ({ children: e, content: r, className: n, placement: t = "top", showArrow: s = !0 }) => {
|
|
944
|
+
const [l, c] = Fe(!1), o = Ae(null), { refs: v, floatingStyles: p, context: R } = Tt({
|
|
945
945
|
open: l,
|
|
946
946
|
onOpenChange: c,
|
|
947
947
|
placement: t,
|
|
948
|
-
middleware: [Be(8), We(), He(), Ve({ element:
|
|
948
|
+
middleware: [Be(8), We(), He(), Ve({ element: o })],
|
|
949
949
|
whileElementsMounted: Ke
|
|
950
950
|
}), y = bt(R), h = Mt(R), u = xt(R), b = St(R), { getReferenceProps: f, getFloatingProps: x } = Pt([y, h, u, b]), T = Ye(
|
|
951
|
-
Ue("bg-content1 font-normal text-sm rounded-md
|
|
951
|
+
Ue("bg-content1 font-normal text-sm rounded-md filter-(--filter-drop-shadow-small) flex justify-center items-center z-10 px-2.5 py-1 outline-none box-border subpixel-antialiased normal-case", n)
|
|
952
952
|
);
|
|
953
953
|
return /* @__PURE__ */ V.jsxs(V.Fragment, { children: [
|
|
954
954
|
/* @__PURE__ */ V.jsx("div", { ref: v.setReference, ...f(), children: e }),
|
|
955
955
|
l && /* @__PURE__ */ V.jsxs("div", { ref: v.setFloating, style: p, ...x(), className: T, children: [
|
|
956
|
-
|
|
957
|
-
s && /* @__PURE__ */ V.jsx(pt, { ref:
|
|
956
|
+
r,
|
|
957
|
+
s && /* @__PURE__ */ V.jsx(pt, { ref: o, context: R, className: "text-content1", fill: "currentColor" })
|
|
958
958
|
] })
|
|
959
959
|
] });
|
|
960
960
|
};
|
|
961
961
|
export {
|
|
962
962
|
Nt as T
|
|
963
963
|
};
|
|
964
|
-
//# sourceMappingURL=tooltip-
|
|
964
|
+
//# sourceMappingURL=tooltip-jYlWnuGh.js.map
|