@purpurds/tooltip 8.4.0 → 8.5.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/chunked-rush-logs/tooltip.test_unit.chunks.jsonl +4 -4
- package/.rush/temp/ci_build/@purpurds/tooltip/{89c6154691d3a5ae298caeaa47dc130420d4e282.untar.log → dcd44d817ed0b43245c6fc11a6a9e36069705634.untar.log} +2 -2
- package/.rush/temp/operation/ci_build/all.log +3 -3
- package/.rush/temp/operation/ci_build/log-chunks.jsonl +3 -3
- package/.rush/temp/operation/ci_build/state.json +1 -1
- package/.rush/temp/operation/test_unit/all.log +4 -4
- package/.rush/temp/operation/test_unit/log-chunks.jsonl +4 -4
- package/.rush/temp/operation/test_unit/state.json +1 -1
- package/dist/LICENSE.txt +4 -4
- package/dist/tooltip.cjs.js +6 -6
- package/dist/tooltip.cjs.js.map +1 -1
- package/dist/tooltip.es.js +298 -294
- package/dist/tooltip.es.js.map +1 -1
- package/package.json +7 -7
package/dist/tooltip.es.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as _e, jsx as x, Fragment as jn } from "react/jsx-runtime";
|
|
2
2
|
import * as f from "react";
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
3
|
+
import { forwardRef as $t, useLayoutEffect as Wn, useState as Bn, Children as Hn } from "react";
|
|
4
|
+
import * as kt from "react-dom";
|
|
5
|
+
import zn from "react-dom";
|
|
6
|
+
const Vn = {
|
|
7
7
|
LG: "lg"
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function Un(e) {
|
|
10
10
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
11
11
|
}
|
|
12
12
|
var lt = { exports: {} };
|
|
@@ -16,7 +16,7 @@ var lt = { exports: {} };
|
|
|
16
16
|
http://jedwatson.github.io/classnames
|
|
17
17
|
*/
|
|
18
18
|
var ut;
|
|
19
|
-
function
|
|
19
|
+
function Yn() {
|
|
20
20
|
return ut || (ut = 1, (function(e) {
|
|
21
21
|
(function() {
|
|
22
22
|
var t = {}.hasOwnProperty;
|
|
@@ -48,27 +48,28 @@ function Vn() {
|
|
|
48
48
|
})();
|
|
49
49
|
})(lt)), lt.exports;
|
|
50
50
|
}
|
|
51
|
-
var
|
|
52
|
-
const
|
|
51
|
+
var qn = Yn();
|
|
52
|
+
const Gn = /* @__PURE__ */ Un(qn), Xn = "_rotate_12t9p_1", Zn = "_dash_12t9p_1", Kn = {
|
|
53
53
|
"purpur-spinner": "_purpur-spinner_12t9p_2",
|
|
54
|
-
rotate:
|
|
54
|
+
rotate: Xn,
|
|
55
55
|
"purpur-spinner--xxs": "_purpur-spinner--xxs_12t9p_6",
|
|
56
56
|
"purpur-spinner--xs": "_purpur-spinner--xs_12t9p_10",
|
|
57
57
|
"purpur-spinner--sm": "_purpur-spinner--sm_12t9p_14",
|
|
58
58
|
"purpur-spinner--md": "_purpur-spinner--md_12t9p_18",
|
|
59
59
|
"purpur-spinner--lg": "_purpur-spinner--lg_12t9p_22",
|
|
60
60
|
"purpur-spinner__circle": "_purpur-spinner__circle_12t9p_26",
|
|
61
|
-
dash:
|
|
61
|
+
dash: Zn,
|
|
62
62
|
"purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
|
|
63
63
|
"purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
|
|
64
|
-
}, ft =
|
|
64
|
+
}, ft = Gn.bind(Kn), fe = "purpur-spinner", Jn = {
|
|
65
65
|
SM: "sm"
|
|
66
|
-
},
|
|
66
|
+
}, Ft = ({
|
|
67
67
|
disabled: e = !1,
|
|
68
68
|
negative: t = !1,
|
|
69
|
-
size: n =
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
size: n = Jn.SM,
|
|
70
|
+
className: o,
|
|
71
|
+
...i
|
|
72
|
+
}) => /* @__PURE__ */ x("div", { className: ft(fe, `${fe}--${n}`, o), ...i, children: /* @__PURE__ */ x("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ x(
|
|
72
73
|
"circle",
|
|
73
74
|
{
|
|
74
75
|
className: ft(`${fe}__circle`, {
|
|
@@ -80,7 +81,8 @@ const Yn = /* @__PURE__ */ zn(Un), qn = "_rotate_12t9p_1", Gn = "_dash_12t9p_1",
|
|
|
80
81
|
r: "20"
|
|
81
82
|
}
|
|
82
83
|
) }) });
|
|
83
|
-
|
|
84
|
+
Ft.displayName = "Spinner";
|
|
85
|
+
function Qn(e) {
|
|
84
86
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
85
87
|
}
|
|
86
88
|
var pt = { exports: {} };
|
|
@@ -90,7 +92,7 @@ var pt = { exports: {} };
|
|
|
90
92
|
http://jedwatson.github.io/classnames
|
|
91
93
|
*/
|
|
92
94
|
var dt;
|
|
93
|
-
function
|
|
95
|
+
function er() {
|
|
94
96
|
return dt || (dt = 1, (function(e) {
|
|
95
97
|
(function() {
|
|
96
98
|
var t = {}.hasOwnProperty;
|
|
@@ -122,32 +124,33 @@ function Qn() {
|
|
|
122
124
|
})();
|
|
123
125
|
})(pt)), pt.exports;
|
|
124
126
|
}
|
|
125
|
-
var
|
|
126
|
-
const
|
|
127
|
-
"purpur-button": "_purpur-
|
|
128
|
-
"purpur-button--xs": "_purpur-button--
|
|
129
|
-
"purpur-button--icon-only": "_purpur-button--icon-
|
|
130
|
-
"purpur-button--sm": "_purpur-button--
|
|
131
|
-
"purpur-button--md": "_purpur-button--
|
|
132
|
-
"purpur-button--lg": "_purpur-button--
|
|
133
|
-
"purpur-button--full-width": "_purpur-button--full-
|
|
134
|
-
"purpur-button--primary": "_purpur-button--
|
|
135
|
-
"purpur-button--disabled": "_purpur-button--
|
|
136
|
-
"purpur-button--primary-negative": "_purpur-button--primary-
|
|
137
|
-
"purpur-button--secondary": "_purpur-button--
|
|
138
|
-
"purpur-button--secondary-negative": "_purpur-button--secondary-
|
|
139
|
-
"purpur-button--expressive": "_purpur-button--
|
|
140
|
-
"purpur-button--expressive-negative": "_purpur-button--expressive-
|
|
141
|
-
"purpur-button--negative": "_purpur-button--
|
|
142
|
-
"purpur-button--destructive": "_purpur-button--
|
|
143
|
-
"purpur-button--destructive-negative": "_purpur-button--destructive-
|
|
144
|
-
"purpur-button--tertiary-purple": "_purpur-button--tertiary-
|
|
145
|
-
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-
|
|
146
|
-
"purpur-button--text-negative": "_purpur-button--text-
|
|
147
|
-
"purpur-button--text": "_purpur-button--
|
|
148
|
-
|
|
127
|
+
var tr = er();
|
|
128
|
+
const nr = /* @__PURE__ */ Qn(tr), rr = {
|
|
129
|
+
"purpur-button": "_purpur-button_10jh0_1",
|
|
130
|
+
"purpur-button--xs": "_purpur-button--xs_10jh0_22",
|
|
131
|
+
"purpur-button--icon-only": "_purpur-button--icon-only_10jh0_25",
|
|
132
|
+
"purpur-button--sm": "_purpur-button--sm_10jh0_28",
|
|
133
|
+
"purpur-button--md": "_purpur-button--md_10jh0_34",
|
|
134
|
+
"purpur-button--lg": "_purpur-button--lg_10jh0_40",
|
|
135
|
+
"purpur-button--full-width": "_purpur-button--full-width_10jh0_46",
|
|
136
|
+
"purpur-button--primary": "_purpur-button--primary_10jh0_64",
|
|
137
|
+
"purpur-button--disabled": "_purpur-button--disabled_10jh0_68",
|
|
138
|
+
"purpur-button--primary-negative": "_purpur-button--primary-negative_10jh0_74",
|
|
139
|
+
"purpur-button--secondary": "_purpur-button--secondary_10jh0_86",
|
|
140
|
+
"purpur-button--secondary-negative": "_purpur-button--secondary-negative_10jh0_97",
|
|
141
|
+
"purpur-button--expressive": "_purpur-button--expressive_10jh0_108",
|
|
142
|
+
"purpur-button--expressive-negative": "_purpur-button--expressive-negative_10jh0_118",
|
|
143
|
+
"purpur-button--negative": "_purpur-button--negative_10jh0_130",
|
|
144
|
+
"purpur-button--destructive": "_purpur-button--destructive_10jh0_137",
|
|
145
|
+
"purpur-button--destructive-negative": "_purpur-button--destructive-negative_10jh0_147",
|
|
146
|
+
"purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_10jh0_157",
|
|
147
|
+
"purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_10jh0_170",
|
|
148
|
+
"purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
|
|
149
|
+
"purpur-button--text": "_purpur-button--text_10jh0_185",
|
|
150
|
+
"purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
|
|
151
|
+
}, or = {
|
|
149
152
|
TERTIARY_PURPLE: "tertiary-purple"
|
|
150
|
-
},
|
|
153
|
+
}, ht = nr.bind(rr), Z = "purpur-button", It = $t(
|
|
151
154
|
({
|
|
152
155
|
children: e,
|
|
153
156
|
className: t,
|
|
@@ -164,17 +167,17 @@ const tr = /* @__PURE__ */ Jn(er), nr = {
|
|
|
164
167
|
}, h) => {
|
|
165
168
|
if (i && c === "destructive")
|
|
166
169
|
return null;
|
|
167
|
-
const d =
|
|
170
|
+
const d = ht(
|
|
168
171
|
[
|
|
169
|
-
|
|
170
|
-
`${
|
|
171
|
-
`${
|
|
172
|
+
Z,
|
|
173
|
+
`${Z}--${s ? `${c}-negative` : c}`,
|
|
174
|
+
`${Z}--${l}`
|
|
172
175
|
],
|
|
173
176
|
{
|
|
174
|
-
[`${
|
|
175
|
-
[`${
|
|
176
|
-
[`${
|
|
177
|
-
[`${
|
|
177
|
+
[`${Z}--icon-only`]: i,
|
|
178
|
+
[`${Z}--negative`]: s,
|
|
179
|
+
[`${Z}--full-width`]: o,
|
|
180
|
+
[`${Z}--disabled`]: n || r
|
|
178
181
|
},
|
|
179
182
|
t
|
|
180
183
|
), m = (v) => {
|
|
@@ -191,11 +194,12 @@ const tr = /* @__PURE__ */ Jn(er), nr = {
|
|
|
191
194
|
...p,
|
|
192
195
|
children: [
|
|
193
196
|
r && /* @__PURE__ */ x(
|
|
194
|
-
|
|
197
|
+
Ft,
|
|
195
198
|
{
|
|
196
|
-
size: l ===
|
|
199
|
+
size: l === Vn.LG ? "xs" : "xxs",
|
|
197
200
|
negative: s,
|
|
198
|
-
disabled: g
|
|
201
|
+
disabled: g,
|
|
202
|
+
className: ht(`${Z}__spinner`)
|
|
199
203
|
}
|
|
200
204
|
),
|
|
201
205
|
" ",
|
|
@@ -205,19 +209,19 @@ const tr = /* @__PURE__ */ Jn(er), nr = {
|
|
|
205
209
|
);
|
|
206
210
|
}
|
|
207
211
|
);
|
|
208
|
-
|
|
212
|
+
It.displayName = "Button";
|
|
209
213
|
function ir(e) {
|
|
210
214
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
211
215
|
}
|
|
212
|
-
var
|
|
216
|
+
var mt = { exports: {} };
|
|
213
217
|
/*!
|
|
214
218
|
Copyright (c) 2018 Jed Watson.
|
|
215
219
|
Licensed under the MIT License (MIT), see
|
|
216
220
|
http://jedwatson.github.io/classnames
|
|
217
221
|
*/
|
|
218
|
-
var
|
|
222
|
+
var gt;
|
|
219
223
|
function sr() {
|
|
220
|
-
return
|
|
224
|
+
return gt || (gt = 1, (function(e) {
|
|
221
225
|
(function() {
|
|
222
226
|
var t = {}.hasOwnProperty;
|
|
223
227
|
function n() {
|
|
@@ -246,7 +250,7 @@ function sr() {
|
|
|
246
250
|
}
|
|
247
251
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
248
252
|
})();
|
|
249
|
-
})(
|
|
253
|
+
})(mt)), mt.exports;
|
|
250
254
|
}
|
|
251
255
|
var ar = sr();
|
|
252
256
|
const cr = /* @__PURE__ */ ir(ar), lr = {
|
|
@@ -257,7 +261,7 @@ const cr = /* @__PURE__ */ ir(ar), lr = {
|
|
|
257
261
|
"purpur-icon--md": "_purpur-icon--md_8u1lq_16",
|
|
258
262
|
"purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
|
|
259
263
|
"purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
|
|
260
|
-
}, ur = cr.bind(lr),
|
|
264
|
+
}, ur = cr.bind(lr), vt = "purpur-icon", fr = "md", pr = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), dr = ({ content: e = "", title: t } = {}) => {
|
|
261
265
|
const n = [
|
|
262
266
|
{ name: "xmlns", value: "http://www.w3.org/2000/svg" },
|
|
263
267
|
{ name: "fill", value: "currentColor" },
|
|
@@ -269,7 +273,7 @@ const cr = /* @__PURE__ */ ir(ar), lr = {
|
|
|
269
273
|
const r = dr({
|
|
270
274
|
content: hr(e.svg),
|
|
271
275
|
title: t
|
|
272
|
-
}), s = ur(n,
|
|
276
|
+
}), s = ur(n, vt, `${vt}--${o}`);
|
|
273
277
|
return /* @__PURE__ */ x("span", { className: s, dangerouslySetInnerHTML: { __html: r }, ...i });
|
|
274
278
|
};
|
|
275
279
|
jt.displayName = "Icon";
|
|
@@ -278,20 +282,20 @@ const mr = {
|
|
|
278
282
|
svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
|
|
279
283
|
keywords: ["info"],
|
|
280
284
|
category: "status"
|
|
281
|
-
},
|
|
282
|
-
|
|
285
|
+
}, Wt = (e) => /* @__PURE__ */ x(jt, { ...e, svg: mr });
|
|
286
|
+
Wt.displayName = "IconInfo";
|
|
283
287
|
function gr(e) {
|
|
284
288
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
285
289
|
}
|
|
286
|
-
var
|
|
290
|
+
var yt = { exports: {} };
|
|
287
291
|
/*!
|
|
288
292
|
Copyright (c) 2018 Jed Watson.
|
|
289
293
|
Licensed under the MIT License (MIT), see
|
|
290
294
|
http://jedwatson.github.io/classnames
|
|
291
295
|
*/
|
|
292
|
-
var
|
|
296
|
+
var wt;
|
|
293
297
|
function vr() {
|
|
294
|
-
return
|
|
298
|
+
return wt || (wt = 1, (function(e) {
|
|
295
299
|
(function() {
|
|
296
300
|
var t = {}.hasOwnProperty;
|
|
297
301
|
function n() {
|
|
@@ -320,7 +324,7 @@ function vr() {
|
|
|
320
324
|
}
|
|
321
325
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
322
326
|
})();
|
|
323
|
-
})(
|
|
327
|
+
})(yt)), yt.exports;
|
|
324
328
|
}
|
|
325
329
|
var yr = vr();
|
|
326
330
|
const wr = /* @__PURE__ */ gr(yr), xr = {
|
|
@@ -338,15 +342,15 @@ const wr = /* @__PURE__ */ gr(yr), xr = {
|
|
|
338
342
|
"purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
|
|
339
343
|
"purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
|
|
340
344
|
"purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
|
|
341
|
-
}, br = wr.bind(xr),
|
|
345
|
+
}, br = wr.bind(xr), Bt = {
|
|
342
346
|
PARAGRAPH100: "paragraph-100"
|
|
343
|
-
}, pe = "purpur-paragraph",
|
|
347
|
+
}, pe = "purpur-paragraph", Ht = ({
|
|
344
348
|
children: e,
|
|
345
349
|
className: t,
|
|
346
350
|
disabled: n,
|
|
347
351
|
enableHyphenation: o = !1,
|
|
348
352
|
negative: i = !1,
|
|
349
|
-
variant: r =
|
|
353
|
+
variant: r = Bt.PARAGRAPH100,
|
|
350
354
|
...s
|
|
351
355
|
}) => {
|
|
352
356
|
const a = br(t, pe, `${pe}--${r}`, {
|
|
@@ -356,7 +360,7 @@ const wr = /* @__PURE__ */ gr(yr), xr = {
|
|
|
356
360
|
});
|
|
357
361
|
return /* @__PURE__ */ x("p", { ...s, className: a, children: e });
|
|
358
362
|
};
|
|
359
|
-
|
|
363
|
+
Ht.displayName = "Paragraph";
|
|
360
364
|
const _r = "400ms";
|
|
361
365
|
function q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
362
366
|
return function(i) {
|
|
@@ -364,31 +368,31 @@ function q(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
|
|
|
364
368
|
return t == null ? void 0 : t(i);
|
|
365
369
|
};
|
|
366
370
|
}
|
|
367
|
-
function
|
|
371
|
+
function xt(e, t) {
|
|
368
372
|
if (typeof e == "function")
|
|
369
373
|
return e(t);
|
|
370
374
|
e != null && (e.current = t);
|
|
371
375
|
}
|
|
372
|
-
function
|
|
376
|
+
function zt(...e) {
|
|
373
377
|
return (t) => {
|
|
374
378
|
let n = !1;
|
|
375
379
|
const o = e.map((i) => {
|
|
376
|
-
const r =
|
|
380
|
+
const r = xt(i, t);
|
|
377
381
|
return !n && typeof r == "function" && (n = !0), r;
|
|
378
382
|
});
|
|
379
383
|
if (n)
|
|
380
384
|
return () => {
|
|
381
385
|
for (let i = 0; i < o.length; i++) {
|
|
382
386
|
const r = o[i];
|
|
383
|
-
typeof r == "function" ? r() :
|
|
387
|
+
typeof r == "function" ? r() : xt(e[i], null);
|
|
384
388
|
}
|
|
385
389
|
};
|
|
386
390
|
};
|
|
387
391
|
}
|
|
388
392
|
function ne(...e) {
|
|
389
|
-
return f.useCallback(
|
|
393
|
+
return f.useCallback(zt(...e), e);
|
|
390
394
|
}
|
|
391
|
-
function
|
|
395
|
+
function Vt(e, t = []) {
|
|
392
396
|
let n = [];
|
|
393
397
|
function o(r, s) {
|
|
394
398
|
const a = f.createContext(s), l = n.length;
|
|
@@ -438,27 +442,27 @@ function Ar(...e) {
|
|
|
438
442
|
};
|
|
439
443
|
return n.scopeName = t.scopeName, n;
|
|
440
444
|
}
|
|
441
|
-
var
|
|
445
|
+
var Ut = f.forwardRef((e, t) => {
|
|
442
446
|
const { children: n, ...o } = e, i = f.Children.toArray(n), r = i.find(Cr);
|
|
443
447
|
if (r) {
|
|
444
448
|
const s = r.props.children, a = i.map((l) => l === r ? f.Children.count(s) > 1 ? f.Children.only(null) : f.isValidElement(s) ? s.props.children : null : l);
|
|
445
|
-
return /* @__PURE__ */ x(
|
|
449
|
+
return /* @__PURE__ */ x(Ie, { ...o, ref: t, children: f.isValidElement(s) ? f.cloneElement(s, void 0, a) : null });
|
|
446
450
|
}
|
|
447
|
-
return /* @__PURE__ */ x(
|
|
451
|
+
return /* @__PURE__ */ x(Ie, { ...o, ref: t, children: n });
|
|
448
452
|
});
|
|
449
|
-
|
|
450
|
-
var
|
|
453
|
+
Ut.displayName = "Slot";
|
|
454
|
+
var Ie = f.forwardRef((e, t) => {
|
|
451
455
|
const { children: n, ...o } = e;
|
|
452
456
|
if (f.isValidElement(n)) {
|
|
453
457
|
const i = Or(n), r = Pr(o, n.props);
|
|
454
|
-
return n.type !== f.Fragment && (r.ref = t ?
|
|
458
|
+
return n.type !== f.Fragment && (r.ref = t ? zt(t, i) : i), f.cloneElement(n, r);
|
|
455
459
|
}
|
|
456
460
|
return f.Children.count(n) > 1 ? f.Children.only(null) : null;
|
|
457
461
|
});
|
|
458
|
-
|
|
459
|
-
var
|
|
462
|
+
Ie.displayName = "SlotClone";
|
|
463
|
+
var Yt = ({ children: e }) => /* @__PURE__ */ x(jn, { children: e });
|
|
460
464
|
function Cr(e) {
|
|
461
|
-
return f.isValidElement(e) && e.type ===
|
|
465
|
+
return f.isValidElement(e) && e.type === Yt;
|
|
462
466
|
}
|
|
463
467
|
function Pr(e, t) {
|
|
464
468
|
const n = { ...t };
|
|
@@ -492,15 +496,15 @@ var Rr = [
|
|
|
492
496
|
"span",
|
|
493
497
|
"svg",
|
|
494
498
|
"ul"
|
|
495
|
-
],
|
|
499
|
+
], Q = Rr.reduce((e, t) => {
|
|
496
500
|
const n = f.forwardRef((o, i) => {
|
|
497
|
-
const { asChild: r, ...s } = o, a = r ?
|
|
501
|
+
const { asChild: r, ...s } = o, a = r ? Ut : t;
|
|
498
502
|
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ x(a, { ...s, ref: i });
|
|
499
503
|
});
|
|
500
504
|
return n.displayName = `Primitive.${t}`, { ...e, [t]: n };
|
|
501
505
|
}, {});
|
|
502
506
|
function Er(e, t) {
|
|
503
|
-
e &&
|
|
507
|
+
e && kt.flushSync(() => e.dispatchEvent(t));
|
|
504
508
|
}
|
|
505
509
|
function ae(e) {
|
|
506
510
|
const t = f.useRef(e);
|
|
@@ -520,11 +524,11 @@ function Sr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
520
524
|
return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
|
|
521
525
|
}, [n, t]);
|
|
522
526
|
}
|
|
523
|
-
var Tr = "DismissableLayer",
|
|
527
|
+
var Tr = "DismissableLayer", je = "dismissableLayer.update", Nr = "dismissableLayer.pointerDownOutside", Dr = "dismissableLayer.focusOutside", bt, qt = f.createContext({
|
|
524
528
|
layers: /* @__PURE__ */ new Set(),
|
|
525
529
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
526
530
|
branches: /* @__PURE__ */ new Set()
|
|
527
|
-
}),
|
|
531
|
+
}), Gt = f.forwardRef(
|
|
528
532
|
(e, t) => {
|
|
529
533
|
const {
|
|
530
534
|
disableOutsidePointerEvents: n = !1,
|
|
@@ -534,7 +538,7 @@ var Tr = "DismissableLayer", Ie = "dismissableLayer.update", Nr = "dismissableLa
|
|
|
534
538
|
onInteractOutside: s,
|
|
535
539
|
onDismiss: a,
|
|
536
540
|
...l
|
|
537
|
-
} = e, c = f.useContext(
|
|
541
|
+
} = e, c = f.useContext(qt), [u, p] = f.useState(null), h = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, d] = f.useState({}), m = ne(t, (_) => p(_)), g = Array.from(c.layers), [v] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), y = g.indexOf(v), w = u ? g.indexOf(u) : -1, C = c.layersWithOutsidePointerEventsDisabled.size > 0, b = w >= y, A = $r((_) => {
|
|
538
542
|
const R = _.target, L = [...c.branches].some((E) => E.contains(R));
|
|
539
543
|
!b || L || (i == null || i(_), s == null || s(_), _.defaultPrevented || a == null || a());
|
|
540
544
|
}, h), P = kr((_) => {
|
|
@@ -545,16 +549,16 @@ var Tr = "DismissableLayer", Ie = "dismissableLayer.update", Nr = "dismissableLa
|
|
|
545
549
|
w === c.layers.size - 1 && (o == null || o(_), !_.defaultPrevented && a && (_.preventDefault(), a()));
|
|
546
550
|
}, h), f.useEffect(() => {
|
|
547
551
|
if (u)
|
|
548
|
-
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
549
|
-
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents =
|
|
552
|
+
return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (bt = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), _t(), () => {
|
|
553
|
+
n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = bt);
|
|
550
554
|
};
|
|
551
555
|
}, [u, h, n, c]), f.useEffect(() => () => {
|
|
552
|
-
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u),
|
|
556
|
+
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), _t());
|
|
553
557
|
}, [u, c]), f.useEffect(() => {
|
|
554
558
|
const _ = () => d({});
|
|
555
|
-
return document.addEventListener(
|
|
559
|
+
return document.addEventListener(je, _), () => document.removeEventListener(je, _);
|
|
556
560
|
}, []), /* @__PURE__ */ x(
|
|
557
|
-
|
|
561
|
+
Q.div,
|
|
558
562
|
{
|
|
559
563
|
...l,
|
|
560
564
|
ref: m,
|
|
@@ -572,16 +576,16 @@ var Tr = "DismissableLayer", Ie = "dismissableLayer.update", Nr = "dismissableLa
|
|
|
572
576
|
);
|
|
573
577
|
}
|
|
574
578
|
);
|
|
575
|
-
|
|
579
|
+
Gt.displayName = Tr;
|
|
576
580
|
var Lr = "DismissableLayerBranch", Mr = f.forwardRef((e, t) => {
|
|
577
|
-
const n = f.useContext(
|
|
581
|
+
const n = f.useContext(qt), o = f.useRef(null), i = ne(t, o);
|
|
578
582
|
return f.useEffect(() => {
|
|
579
583
|
const r = o.current;
|
|
580
584
|
if (r)
|
|
581
585
|
return n.branches.add(r), () => {
|
|
582
586
|
n.branches.delete(r);
|
|
583
587
|
};
|
|
584
|
-
}, [n.branches]), /* @__PURE__ */ x(
|
|
588
|
+
}, [n.branches]), /* @__PURE__ */ x(Q.div, { ...e, ref: i });
|
|
585
589
|
});
|
|
586
590
|
Mr.displayName = Lr;
|
|
587
591
|
function $r(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
@@ -591,7 +595,7 @@ function $r(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
591
595
|
const r = (a) => {
|
|
592
596
|
if (a.target && !o.current) {
|
|
593
597
|
let l = function() {
|
|
594
|
-
|
|
598
|
+
Xt(
|
|
595
599
|
Nr,
|
|
596
600
|
n,
|
|
597
601
|
c,
|
|
@@ -618,7 +622,7 @@ function kr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
618
622
|
const n = ae(e), o = f.useRef(!1);
|
|
619
623
|
return f.useEffect(() => {
|
|
620
624
|
const i = (r) => {
|
|
621
|
-
r.target && !o.current &&
|
|
625
|
+
r.target && !o.current && Xt(Dr, n, { originalEvent: r }, {
|
|
622
626
|
discrete: !1
|
|
623
627
|
});
|
|
624
628
|
};
|
|
@@ -628,24 +632,24 @@ function kr(e, t = globalThis == null ? void 0 : globalThis.document) {
|
|
|
628
632
|
onBlurCapture: () => o.current = !1
|
|
629
633
|
};
|
|
630
634
|
}
|
|
631
|
-
function
|
|
632
|
-
const e = new CustomEvent(
|
|
635
|
+
function _t() {
|
|
636
|
+
const e = new CustomEvent(je);
|
|
633
637
|
document.dispatchEvent(e);
|
|
634
638
|
}
|
|
635
|
-
function
|
|
639
|
+
function Xt(e, t, n, { discrete: o }) {
|
|
636
640
|
const i = n.originalEvent.target, r = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
|
|
637
641
|
t && i.addEventListener(e, t, { once: !0 }), o ? Er(i, r) : i.dispatchEvent(r);
|
|
638
642
|
}
|
|
639
643
|
var ee = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
|
|
640
|
-
},
|
|
641
|
-
}),
|
|
642
|
-
function
|
|
643
|
-
const [t, n] = f.useState(
|
|
644
|
+
}, Fr = f.useId || (() => {
|
|
645
|
+
}), Ir = 0;
|
|
646
|
+
function jr(e) {
|
|
647
|
+
const [t, n] = f.useState(Fr());
|
|
644
648
|
return ee(() => {
|
|
645
|
-
n((o) => o ?? String(
|
|
649
|
+
n((o) => o ?? String(Ir++));
|
|
646
650
|
}, [e]), t ? `radix-${t}` : "";
|
|
647
651
|
}
|
|
648
|
-
const Wr = ["top", "right", "bottom", "left"],
|
|
652
|
+
const Wr = ["top", "right", "bottom", "left"], K = Math.min, I = Math.max, Ae = Math.round, we = Math.floor, V = (e) => ({
|
|
649
653
|
x: e,
|
|
650
654
|
y: e
|
|
651
655
|
}), Br = {
|
|
@@ -658,7 +662,7 @@ const Wr = ["top", "right", "bottom", "left"], Z = Math.min, F = Math.max, Ae =
|
|
|
658
662
|
end: "start"
|
|
659
663
|
};
|
|
660
664
|
function We(e, t, n) {
|
|
661
|
-
return
|
|
665
|
+
return I(e, K(t, n));
|
|
662
666
|
}
|
|
663
667
|
function G(e, t) {
|
|
664
668
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -695,12 +699,12 @@ function Ur(e) {
|
|
|
695
699
|
function Be(e) {
|
|
696
700
|
return e.replace(/start|end/g, (t) => Hr[t]);
|
|
697
701
|
}
|
|
698
|
-
const
|
|
702
|
+
const At = ["left", "right"], Ct = ["right", "left"], Yr = ["top", "bottom"], qr = ["bottom", "top"];
|
|
699
703
|
function Gr(e, t, n) {
|
|
700
704
|
switch (e) {
|
|
701
705
|
case "top":
|
|
702
706
|
case "bottom":
|
|
703
|
-
return n ? t ?
|
|
707
|
+
return n ? t ? Ct : At : t ? At : Ct;
|
|
704
708
|
case "left":
|
|
705
709
|
case "right":
|
|
706
710
|
return t ? Yr : qr;
|
|
@@ -725,7 +729,7 @@ function Zr(e) {
|
|
|
725
729
|
...e
|
|
726
730
|
};
|
|
727
731
|
}
|
|
728
|
-
function
|
|
732
|
+
function Zt(e) {
|
|
729
733
|
return typeof e != "number" ? Zr(e) : {
|
|
730
734
|
top: e,
|
|
731
735
|
right: e,
|
|
@@ -751,7 +755,7 @@ function Pe(e) {
|
|
|
751
755
|
y: n
|
|
752
756
|
};
|
|
753
757
|
}
|
|
754
|
-
function
|
|
758
|
+
function Pt(e, t, n) {
|
|
755
759
|
let {
|
|
756
760
|
reference: o,
|
|
757
761
|
floating: i
|
|
@@ -813,7 +817,7 @@ const Kr = async (e, t, n) => {
|
|
|
813
817
|
}), {
|
|
814
818
|
x: u,
|
|
815
819
|
y: p
|
|
816
|
-
} =
|
|
820
|
+
} = Pt(c, o, l), h = o, d = {}, m = 0;
|
|
817
821
|
for (let g = 0; g < a.length; g++) {
|
|
818
822
|
const {
|
|
819
823
|
name: v,
|
|
@@ -850,7 +854,7 @@ const Kr = async (e, t, n) => {
|
|
|
850
854
|
}) : A.rects), {
|
|
851
855
|
x: u,
|
|
852
856
|
y: p
|
|
853
|
-
} =
|
|
857
|
+
} = Pt(c, h, l)), g = -1);
|
|
854
858
|
}
|
|
855
859
|
return {
|
|
856
860
|
x: u,
|
|
@@ -876,7 +880,7 @@ async function de(e, t) {
|
|
|
876
880
|
elementContext: p = "floating",
|
|
877
881
|
altBoundary: h = !1,
|
|
878
882
|
padding: d = 0
|
|
879
|
-
} = G(t, e), m =
|
|
883
|
+
} = G(t, e), m = Zt(d), v = a[h ? p === "floating" ? "reference" : "floating" : p], y = Pe(await r.getClippingRect({
|
|
880
884
|
element: (n = await (r.isElement == null ? void 0 : r.isElement(v))) == null || n ? v : v.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
881
885
|
boundary: c,
|
|
882
886
|
rootBoundary: u,
|
|
@@ -923,18 +927,18 @@ const Jr = (e) => ({
|
|
|
923
927
|
} = G(e, t) || {};
|
|
924
928
|
if (c == null)
|
|
925
929
|
return {};
|
|
926
|
-
const p =
|
|
930
|
+
const p = Zt(u), h = {
|
|
927
931
|
x: n,
|
|
928
932
|
y: o
|
|
929
933
|
}, d = qe(i), m = Ye(d), g = await s.getDimensions(c), v = d === "y", y = v ? "top" : "left", w = v ? "bottom" : "right", C = v ? "clientHeight" : "clientWidth", b = r.reference[m] + r.reference[d] - h[d] - r.floating[m], A = h[d] - r.reference[d], P = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
|
|
930
934
|
let _ = P ? P[C] : 0;
|
|
931
935
|
(!_ || !await (s.isElement == null ? void 0 : s.isElement(P))) && (_ = a.floating[C] || r.floating[m]);
|
|
932
|
-
const R = b / 2 - A / 2, L = _ / 2 - g[m] / 2 - 1, E =
|
|
936
|
+
const R = b / 2 - A / 2, L = _ / 2 - g[m] / 2 - 1, E = K(p[y], L), $ = K(p[w], L), k = E, T = _ - g[m] - $, S = _ / 2 - g[m] / 2 + R, F = We(k, S, T), N = !l.arrow && ce(i) != null && S !== F && r.reference[m] / 2 - (S < k ? E : $) - g[m] / 2 < 0, D = N ? S < k ? S - k : S - T : 0;
|
|
933
937
|
return {
|
|
934
938
|
[d]: h[d] + D,
|
|
935
939
|
data: {
|
|
936
|
-
[d]:
|
|
937
|
-
centerOffset: S -
|
|
940
|
+
[d]: F,
|
|
941
|
+
centerOffset: S - F - D,
|
|
938
942
|
...N && {
|
|
939
943
|
alignmentOffset: D
|
|
940
944
|
}
|
|
@@ -979,8 +983,8 @@ const Jr = (e) => ({
|
|
|
979
983
|
overflows: L
|
|
980
984
|
}], !L.every((S) => S <= 0)) {
|
|
981
985
|
var $, k;
|
|
982
|
-
const S = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1,
|
|
983
|
-
if (
|
|
986
|
+
const S = ((($ = r.flip) == null ? void 0 : $.index) || 0) + 1, F = _[S];
|
|
987
|
+
if (F && (!(p === "alignment" ? w !== z(F) : !1) || // We leave the current main axis only if every placement on that axis
|
|
984
988
|
// overflows the main axis.
|
|
985
989
|
E.every((O) => z(O.placement) === w ? O.overflows[0] > 0 : !0)))
|
|
986
990
|
return {
|
|
@@ -989,7 +993,7 @@ const Jr = (e) => ({
|
|
|
989
993
|
overflows: E
|
|
990
994
|
},
|
|
991
995
|
reset: {
|
|
992
|
-
placement:
|
|
996
|
+
placement: F
|
|
993
997
|
}
|
|
994
998
|
};
|
|
995
999
|
let N = (k = E.filter((D) => D.overflows[0] <= 0).sort((D, O) => D.overflows[1] - O.overflows[1])[0]) == null ? void 0 : k.placement;
|
|
@@ -1024,7 +1028,7 @@ const Jr = (e) => ({
|
|
|
1024
1028
|
}
|
|
1025
1029
|
};
|
|
1026
1030
|
};
|
|
1027
|
-
function
|
|
1031
|
+
function Ot(e, t) {
|
|
1028
1032
|
return {
|
|
1029
1033
|
top: e.top - t.height,
|
|
1030
1034
|
right: e.right - t.width,
|
|
@@ -1032,7 +1036,7 @@ function Pt(e, t) {
|
|
|
1032
1036
|
left: e.left - t.width
|
|
1033
1037
|
};
|
|
1034
1038
|
}
|
|
1035
|
-
function
|
|
1039
|
+
function Rt(e) {
|
|
1036
1040
|
return Wr.some((t) => e[t] >= 0);
|
|
1037
1041
|
}
|
|
1038
1042
|
const eo = function(e) {
|
|
@@ -1051,11 +1055,11 @@ const eo = function(e) {
|
|
|
1051
1055
|
const r = await de(t, {
|
|
1052
1056
|
...i,
|
|
1053
1057
|
elementContext: "reference"
|
|
1054
|
-
}), s =
|
|
1058
|
+
}), s = Ot(r, n.reference);
|
|
1055
1059
|
return {
|
|
1056
1060
|
data: {
|
|
1057
1061
|
referenceHiddenOffsets: s,
|
|
1058
|
-
referenceHidden:
|
|
1062
|
+
referenceHidden: Rt(s)
|
|
1059
1063
|
}
|
|
1060
1064
|
};
|
|
1061
1065
|
}
|
|
@@ -1063,11 +1067,11 @@ const eo = function(e) {
|
|
|
1063
1067
|
const r = await de(t, {
|
|
1064
1068
|
...i,
|
|
1065
1069
|
altBoundary: !0
|
|
1066
|
-
}), s =
|
|
1070
|
+
}), s = Ot(r, n.floating);
|
|
1067
1071
|
return {
|
|
1068
1072
|
data: {
|
|
1069
1073
|
escapedOffsets: s,
|
|
1070
|
-
escaped:
|
|
1074
|
+
escaped: Rt(s)
|
|
1071
1075
|
}
|
|
1072
1076
|
};
|
|
1073
1077
|
}
|
|
@@ -1076,13 +1080,13 @@ const eo = function(e) {
|
|
|
1076
1080
|
}
|
|
1077
1081
|
}
|
|
1078
1082
|
};
|
|
1079
|
-
},
|
|
1083
|
+
}, Kt = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1080
1084
|
async function to(e, t) {
|
|
1081
1085
|
const {
|
|
1082
1086
|
placement: n,
|
|
1083
1087
|
platform: o,
|
|
1084
1088
|
elements: i
|
|
1085
|
-
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = X(n), a = ce(n), l = z(n) === "y", c =
|
|
1089
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = X(n), a = ce(n), l = z(n) === "y", c = Kt.has(s) ? -1 : 1, u = r && l ? -1 : 1, p = G(t, e);
|
|
1086
1090
|
let {
|
|
1087
1091
|
mainAxis: h,
|
|
1088
1092
|
crossAxis: d,
|
|
@@ -1215,7 +1219,7 @@ const no = function(e) {
|
|
|
1215
1219
|
}
|
|
1216
1220
|
if (c) {
|
|
1217
1221
|
var y, w;
|
|
1218
|
-
const C = h === "y" ? "width" : "height", b =
|
|
1222
|
+
const C = h === "y" ? "width" : "height", b = Kt.has(X(i)), A = r.reference[p] - r.floating[C] + (b && ((y = s.offset) == null ? void 0 : y[p]) || 0) + (b ? 0 : v.crossAxis), P = r.reference[p] + r.reference[C] + (b ? 0 : ((w = s.offset) == null ? void 0 : w[p]) || 0) - (b ? v.crossAxis : 0);
|
|
1219
1223
|
m < A ? m = A : m > P && (m = P);
|
|
1220
1224
|
}
|
|
1221
1225
|
return {
|
|
@@ -1245,11 +1249,11 @@ const no = function(e) {
|
|
|
1245
1249
|
} = r.floating;
|
|
1246
1250
|
let v, y;
|
|
1247
1251
|
p === "top" || p === "bottom" ? (v = p, y = h === (await (s.isRTL == null ? void 0 : s.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = p, v = h === "end" ? "top" : "bottom");
|
|
1248
|
-
const w = g - u.top - u.bottom, C = m - u.left - u.right, b =
|
|
1252
|
+
const w = g - u.top - u.bottom, C = m - u.left - u.right, b = K(g - u[v], w), A = K(m - u[y], C), P = !t.middlewareData.shift;
|
|
1249
1253
|
let _ = b, R = A;
|
|
1250
1254
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = C), (o = t.middlewareData.shift) != null && o.enabled.y && (_ = w), P && !h) {
|
|
1251
|
-
const E =
|
|
1252
|
-
d ? R = m - 2 * (E !== 0 || $ !== 0 ? E + $ :
|
|
1255
|
+
const E = I(u.left, 0), $ = I(u.right, 0), k = I(u.top, 0), T = I(u.bottom, 0);
|
|
1256
|
+
d ? R = m - 2 * (E !== 0 || $ !== 0 ? E + $ : I(u.left, u.right)) : _ = g - 2 * (k !== 0 || T !== 0 ? k + T : I(u.top, u.bottom));
|
|
1253
1257
|
}
|
|
1254
1258
|
await l({
|
|
1255
1259
|
...t,
|
|
@@ -1269,27 +1273,27 @@ function Re() {
|
|
|
1269
1273
|
return typeof window < "u";
|
|
1270
1274
|
}
|
|
1271
1275
|
function le(e) {
|
|
1272
|
-
return
|
|
1276
|
+
return Jt(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1273
1277
|
}
|
|
1274
|
-
function
|
|
1278
|
+
function j(e) {
|
|
1275
1279
|
var t;
|
|
1276
1280
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1277
1281
|
}
|
|
1278
1282
|
function Y(e) {
|
|
1279
1283
|
var t;
|
|
1280
|
-
return (t = (
|
|
1284
|
+
return (t = (Jt(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1281
1285
|
}
|
|
1282
|
-
function
|
|
1283
|
-
return Re() ? e instanceof Node || e instanceof
|
|
1286
|
+
function Jt(e) {
|
|
1287
|
+
return Re() ? e instanceof Node || e instanceof j(e).Node : !1;
|
|
1284
1288
|
}
|
|
1285
1289
|
function W(e) {
|
|
1286
|
-
return Re() ? e instanceof Element || e instanceof
|
|
1290
|
+
return Re() ? e instanceof Element || e instanceof j(e).Element : !1;
|
|
1287
1291
|
}
|
|
1288
1292
|
function U(e) {
|
|
1289
|
-
return Re() ? e instanceof HTMLElement || e instanceof
|
|
1293
|
+
return Re() ? e instanceof HTMLElement || e instanceof j(e).HTMLElement : !1;
|
|
1290
1294
|
}
|
|
1291
|
-
function
|
|
1292
|
-
return !Re() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
1295
|
+
function Et(e) {
|
|
1296
|
+
return !Re() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof j(e).ShadowRoot;
|
|
1293
1297
|
}
|
|
1294
1298
|
const so = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1295
1299
|
function me(e) {
|
|
@@ -1321,13 +1325,13 @@ function Ge(e) {
|
|
|
1321
1325
|
return uo.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) || fo.some((o) => (n.willChange || "").includes(o)) || po.some((o) => (n.contain || "").includes(o));
|
|
1322
1326
|
}
|
|
1323
1327
|
function ho(e) {
|
|
1324
|
-
let t =
|
|
1328
|
+
let t = J(e);
|
|
1325
1329
|
for (; U(t) && !ie(t); ) {
|
|
1326
1330
|
if (Ge(t))
|
|
1327
1331
|
return t;
|
|
1328
1332
|
if (Ee(t))
|
|
1329
1333
|
return null;
|
|
1330
|
-
t =
|
|
1334
|
+
t = J(t);
|
|
1331
1335
|
}
|
|
1332
1336
|
return null;
|
|
1333
1337
|
}
|
|
@@ -1339,7 +1343,7 @@ function ie(e) {
|
|
|
1339
1343
|
return mo.has(le(e));
|
|
1340
1344
|
}
|
|
1341
1345
|
function B(e) {
|
|
1342
|
-
return
|
|
1346
|
+
return j(e).getComputedStyle(e);
|
|
1343
1347
|
}
|
|
1344
1348
|
function Se(e) {
|
|
1345
1349
|
return W(e) ? {
|
|
@@ -1350,26 +1354,26 @@ function Se(e) {
|
|
|
1350
1354
|
scrollTop: e.scrollY
|
|
1351
1355
|
};
|
|
1352
1356
|
}
|
|
1353
|
-
function
|
|
1357
|
+
function J(e) {
|
|
1354
1358
|
if (le(e) === "html")
|
|
1355
1359
|
return e;
|
|
1356
1360
|
const t = (
|
|
1357
1361
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1358
1362
|
e.assignedSlot || // DOM Element detected.
|
|
1359
1363
|
e.parentNode || // ShadowRoot detected.
|
|
1360
|
-
|
|
1364
|
+
Et(e) && e.host || // Fallback.
|
|
1361
1365
|
Y(e)
|
|
1362
1366
|
);
|
|
1363
|
-
return
|
|
1367
|
+
return Et(t) ? t.host : t;
|
|
1364
1368
|
}
|
|
1365
|
-
function
|
|
1366
|
-
const t =
|
|
1367
|
-
return ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && me(t) ? t :
|
|
1369
|
+
function Qt(e) {
|
|
1370
|
+
const t = J(e);
|
|
1371
|
+
return ie(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : U(t) && me(t) ? t : Qt(t);
|
|
1368
1372
|
}
|
|
1369
1373
|
function he(e, t, n) {
|
|
1370
1374
|
var o;
|
|
1371
1375
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1372
|
-
const i =
|
|
1376
|
+
const i = Qt(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), s = j(i);
|
|
1373
1377
|
if (r) {
|
|
1374
1378
|
const a = He(s);
|
|
1375
1379
|
return t.concat(s, s.visualViewport || [], me(i) ? i : [], a && n ? he(a) : []);
|
|
@@ -1379,7 +1383,7 @@ function he(e, t, n) {
|
|
|
1379
1383
|
function He(e) {
|
|
1380
1384
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1381
1385
|
}
|
|
1382
|
-
function
|
|
1386
|
+
function en(e) {
|
|
1383
1387
|
const t = B(e);
|
|
1384
1388
|
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1385
1389
|
const i = U(e), r = i ? e.offsetWidth : n, s = i ? e.offsetHeight : o, a = Ae(n) !== r || Ae(o) !== s;
|
|
@@ -1400,7 +1404,7 @@ function oe(e) {
|
|
|
1400
1404
|
width: o,
|
|
1401
1405
|
height: i,
|
|
1402
1406
|
$: r
|
|
1403
|
-
} =
|
|
1407
|
+
} = en(t);
|
|
1404
1408
|
let s = (r ? Ae(n.width) : n.width) / o, a = (r ? Ae(n.height) : n.height) / i;
|
|
1405
1409
|
return (!s || !Number.isFinite(s)) && (s = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1406
1410
|
x: s,
|
|
@@ -1408,29 +1412,29 @@ function oe(e) {
|
|
|
1408
1412
|
};
|
|
1409
1413
|
}
|
|
1410
1414
|
const go = /* @__PURE__ */ V(0);
|
|
1411
|
-
function
|
|
1412
|
-
const t =
|
|
1415
|
+
function tn(e) {
|
|
1416
|
+
const t = j(e);
|
|
1413
1417
|
return !Xe() || !t.visualViewport ? go : {
|
|
1414
1418
|
x: t.visualViewport.offsetLeft,
|
|
1415
1419
|
y: t.visualViewport.offsetTop
|
|
1416
1420
|
};
|
|
1417
1421
|
}
|
|
1418
1422
|
function vo(e, t, n) {
|
|
1419
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
1423
|
+
return t === void 0 && (t = !1), !n || t && n !== j(e) ? !1 : t;
|
|
1420
1424
|
}
|
|
1421
1425
|
function te(e, t, n, o) {
|
|
1422
1426
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1423
1427
|
const i = e.getBoundingClientRect(), r = Ze(e);
|
|
1424
1428
|
let s = V(1);
|
|
1425
1429
|
t && (o ? W(o) && (s = oe(o)) : s = oe(e));
|
|
1426
|
-
const a = vo(r, n, o) ?
|
|
1430
|
+
const a = vo(r, n, o) ? tn(r) : V(0);
|
|
1427
1431
|
let l = (i.left + a.x) / s.x, c = (i.top + a.y) / s.y, u = i.width / s.x, p = i.height / s.y;
|
|
1428
1432
|
if (r) {
|
|
1429
|
-
const h =
|
|
1433
|
+
const h = j(r), d = o && W(o) ? j(o) : o;
|
|
1430
1434
|
let m = h, g = He(m);
|
|
1431
1435
|
for (; g && o && d !== m; ) {
|
|
1432
1436
|
const v = oe(g), y = g.getBoundingClientRect(), w = B(g), C = y.left + (g.clientLeft + parseFloat(w.paddingLeft)) * v.x, b = y.top + (g.clientTop + parseFloat(w.paddingTop)) * v.y;
|
|
1433
|
-
l *= v.x, c *= v.y, u *= v.x, p *= v.y, l += C, c += b, m =
|
|
1437
|
+
l *= v.x, c *= v.y, u *= v.x, p *= v.y, l += C, c += b, m = j(g), g = He(m);
|
|
1434
1438
|
}
|
|
1435
1439
|
}
|
|
1436
1440
|
return Pe({
|
|
@@ -1444,7 +1448,7 @@ function Te(e, t) {
|
|
|
1444
1448
|
const n = Se(e).scrollLeft;
|
|
1445
1449
|
return t ? t.left + n : te(Y(e)).left + n;
|
|
1446
1450
|
}
|
|
1447
|
-
function
|
|
1451
|
+
function nn(e, t) {
|
|
1448
1452
|
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Te(e, n), i = n.top + t.scrollTop;
|
|
1449
1453
|
return {
|
|
1450
1454
|
x: o,
|
|
@@ -1470,7 +1474,7 @@ function yo(e) {
|
|
|
1470
1474
|
const d = te(o);
|
|
1471
1475
|
c = oe(o), u.x = d.x + o.clientLeft, u.y = d.y + o.clientTop;
|
|
1472
1476
|
}
|
|
1473
|
-
const h = s && !p && !r ?
|
|
1477
|
+
const h = s && !p && !r ? nn(s, l) : V(0);
|
|
1474
1478
|
return {
|
|
1475
1479
|
width: n.width * c.x,
|
|
1476
1480
|
height: n.height * c.y,
|
|
@@ -1482,19 +1486,19 @@ function wo(e) {
|
|
|
1482
1486
|
return Array.from(e.getClientRects());
|
|
1483
1487
|
}
|
|
1484
1488
|
function xo(e) {
|
|
1485
|
-
const t = Y(e), n = Se(e), o = e.ownerDocument.body, i =
|
|
1489
|
+
const t = Y(e), n = Se(e), o = e.ownerDocument.body, i = I(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = I(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1486
1490
|
let s = -n.scrollLeft + Te(e);
|
|
1487
1491
|
const a = -n.scrollTop;
|
|
1488
|
-
return B(o).direction === "rtl" && (s +=
|
|
1492
|
+
return B(o).direction === "rtl" && (s += I(t.clientWidth, o.clientWidth) - i), {
|
|
1489
1493
|
width: i,
|
|
1490
1494
|
height: r,
|
|
1491
1495
|
x: s,
|
|
1492
1496
|
y: a
|
|
1493
1497
|
};
|
|
1494
1498
|
}
|
|
1495
|
-
const
|
|
1499
|
+
const St = 25;
|
|
1496
1500
|
function bo(e, t) {
|
|
1497
|
-
const n =
|
|
1501
|
+
const n = j(e), o = Y(e), i = n.visualViewport;
|
|
1498
1502
|
let r = o.clientWidth, s = o.clientHeight, a = 0, l = 0;
|
|
1499
1503
|
if (i) {
|
|
1500
1504
|
r = i.width, s = i.height;
|
|
@@ -1504,8 +1508,8 @@ function bo(e, t) {
|
|
|
1504
1508
|
const c = Te(o);
|
|
1505
1509
|
if (c <= 0) {
|
|
1506
1510
|
const u = o.ownerDocument, p = u.body, h = getComputedStyle(p), d = u.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, m = Math.abs(o.clientWidth - p.clientWidth - d);
|
|
1507
|
-
m <=
|
|
1508
|
-
} else c <=
|
|
1511
|
+
m <= St && (r -= m);
|
|
1512
|
+
} else c <= St && (r += c);
|
|
1509
1513
|
return {
|
|
1510
1514
|
width: r,
|
|
1511
1515
|
height: s,
|
|
@@ -1523,7 +1527,7 @@ function Ao(e, t) {
|
|
|
1523
1527
|
y: c
|
|
1524
1528
|
};
|
|
1525
1529
|
}
|
|
1526
|
-
function
|
|
1530
|
+
function Tt(e, t, n) {
|
|
1527
1531
|
let o;
|
|
1528
1532
|
if (t === "viewport")
|
|
1529
1533
|
o = bo(e, n);
|
|
@@ -1532,7 +1536,7 @@ function St(e, t, n) {
|
|
|
1532
1536
|
else if (W(t))
|
|
1533
1537
|
o = Ao(t, n);
|
|
1534
1538
|
else {
|
|
1535
|
-
const i =
|
|
1539
|
+
const i = tn(e);
|
|
1536
1540
|
o = {
|
|
1537
1541
|
x: t.x - i.x,
|
|
1538
1542
|
y: t.y - i.y,
|
|
@@ -1542,9 +1546,9 @@ function St(e, t, n) {
|
|
|
1542
1546
|
}
|
|
1543
1547
|
return Pe(o);
|
|
1544
1548
|
}
|
|
1545
|
-
function
|
|
1546
|
-
const n =
|
|
1547
|
-
return n === t || !W(n) || ie(n) ? !1 : B(n).position === "fixed" ||
|
|
1549
|
+
function rn(e, t) {
|
|
1550
|
+
const n = J(e);
|
|
1551
|
+
return n === t || !W(n) || ie(n) ? !1 : B(n).position === "fixed" || rn(n, t);
|
|
1548
1552
|
}
|
|
1549
1553
|
function Co(e, t) {
|
|
1550
1554
|
const n = t.get(e);
|
|
@@ -1552,10 +1556,10 @@ function Co(e, t) {
|
|
|
1552
1556
|
return n;
|
|
1553
1557
|
let o = he(e, [], !1).filter((a) => W(a) && le(a) !== "body"), i = null;
|
|
1554
1558
|
const r = B(e).position === "fixed";
|
|
1555
|
-
let s = r ?
|
|
1559
|
+
let s = r ? J(e) : e;
|
|
1556
1560
|
for (; W(s) && !ie(s); ) {
|
|
1557
1561
|
const a = B(s), l = Ge(s);
|
|
1558
|
-
!l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i && _o.has(i.position) || me(s) && !l &&
|
|
1562
|
+
!l && a.position === "fixed" && (i = null), (r ? !l && !i : !l && a.position === "static" && !!i && _o.has(i.position) || me(s) && !l && rn(e, s)) ? o = o.filter((u) => u !== s) : i = a, s = J(s);
|
|
1559
1563
|
}
|
|
1560
1564
|
return t.set(e, o), o;
|
|
1561
1565
|
}
|
|
@@ -1567,9 +1571,9 @@ function Po(e) {
|
|
|
1567
1571
|
strategy: i
|
|
1568
1572
|
} = e;
|
|
1569
1573
|
const s = [...n === "clippingAncestors" ? Ee(t) ? [] : Co(t, this._c) : [].concat(n), o], a = s[0], l = s.reduce((c, u) => {
|
|
1570
|
-
const p =
|
|
1571
|
-
return c.top =
|
|
1572
|
-
},
|
|
1574
|
+
const p = Tt(t, u, i);
|
|
1575
|
+
return c.top = I(p.top, c.top), c.right = K(p.right, c.right), c.bottom = K(p.bottom, c.bottom), c.left = I(p.left, c.left), c;
|
|
1576
|
+
}, Tt(t, a, i));
|
|
1573
1577
|
return {
|
|
1574
1578
|
width: l.right - l.left,
|
|
1575
1579
|
height: l.bottom - l.top,
|
|
@@ -1581,7 +1585,7 @@ function Oo(e) {
|
|
|
1581
1585
|
const {
|
|
1582
1586
|
width: t,
|
|
1583
1587
|
height: n
|
|
1584
|
-
} =
|
|
1588
|
+
} = en(e);
|
|
1585
1589
|
return {
|
|
1586
1590
|
width: t,
|
|
1587
1591
|
height: n
|
|
@@ -1603,7 +1607,7 @@ function Ro(e, t, n) {
|
|
|
1603
1607
|
l.x = d.x + t.clientLeft, l.y = d.y + t.clientTop;
|
|
1604
1608
|
} else i && c();
|
|
1605
1609
|
r && !o && i && c();
|
|
1606
|
-
const u = i && !o && !r ?
|
|
1610
|
+
const u = i && !o && !r ? nn(i, a) : V(0), p = s.left + a.scrollLeft - l.x - u.x, h = s.top + a.scrollTop - l.y - u.y;
|
|
1607
1611
|
return {
|
|
1608
1612
|
x: p,
|
|
1609
1613
|
y: h,
|
|
@@ -1614,7 +1618,7 @@ function Ro(e, t, n) {
|
|
|
1614
1618
|
function Me(e) {
|
|
1615
1619
|
return B(e).position === "static";
|
|
1616
1620
|
}
|
|
1617
|
-
function
|
|
1621
|
+
function Nt(e, t) {
|
|
1618
1622
|
if (!U(e) || B(e).position === "fixed")
|
|
1619
1623
|
return null;
|
|
1620
1624
|
if (t)
|
|
@@ -1622,26 +1626,26 @@ function Tt(e, t) {
|
|
|
1622
1626
|
let n = e.offsetParent;
|
|
1623
1627
|
return Y(e) === n && (n = n.ownerDocument.body), n;
|
|
1624
1628
|
}
|
|
1625
|
-
function
|
|
1626
|
-
const n =
|
|
1629
|
+
function on(e, t) {
|
|
1630
|
+
const n = j(e);
|
|
1627
1631
|
if (Ee(e))
|
|
1628
1632
|
return n;
|
|
1629
1633
|
if (!U(e)) {
|
|
1630
|
-
let i =
|
|
1634
|
+
let i = J(e);
|
|
1631
1635
|
for (; i && !ie(i); ) {
|
|
1632
1636
|
if (W(i) && !Me(i))
|
|
1633
1637
|
return i;
|
|
1634
|
-
i =
|
|
1638
|
+
i = J(i);
|
|
1635
1639
|
}
|
|
1636
1640
|
return n;
|
|
1637
1641
|
}
|
|
1638
|
-
let o =
|
|
1642
|
+
let o = Nt(e, t);
|
|
1639
1643
|
for (; o && co(o) && Me(o); )
|
|
1640
|
-
o =
|
|
1644
|
+
o = Nt(o, t);
|
|
1641
1645
|
return o && ie(o) && Me(o) && !Ge(o) ? n : o || ho(e) || n;
|
|
1642
1646
|
}
|
|
1643
1647
|
const Eo = async function(e) {
|
|
1644
|
-
const t = this.getOffsetParent ||
|
|
1648
|
+
const t = this.getOffsetParent || on, n = this.getDimensions, o = await n(e.floating);
|
|
1645
1649
|
return {
|
|
1646
1650
|
reference: Ro(e.reference, await t(e.floating), e.strategy),
|
|
1647
1651
|
floating: {
|
|
@@ -1659,7 +1663,7 @@ const To = {
|
|
|
1659
1663
|
convertOffsetParentRelativeRectToViewportRelativeRect: yo,
|
|
1660
1664
|
getDocumentElement: Y,
|
|
1661
1665
|
getClippingRect: Po,
|
|
1662
|
-
getOffsetParent:
|
|
1666
|
+
getOffsetParent: on,
|
|
1663
1667
|
getElementRects: Eo,
|
|
1664
1668
|
getClientRects: wo,
|
|
1665
1669
|
getDimensions: Oo,
|
|
@@ -1667,7 +1671,7 @@ const To = {
|
|
|
1667
1671
|
isElement: W,
|
|
1668
1672
|
isRTL: So
|
|
1669
1673
|
};
|
|
1670
|
-
function
|
|
1674
|
+
function sn(e, t) {
|
|
1671
1675
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1672
1676
|
}
|
|
1673
1677
|
function No(e, t) {
|
|
@@ -1689,7 +1693,7 @@ function No(e, t) {
|
|
|
1689
1693
|
return;
|
|
1690
1694
|
const m = we(p), g = we(i.clientWidth - (u + h)), v = we(i.clientHeight - (p + d)), y = we(u), C = {
|
|
1691
1695
|
rootMargin: -m + "px " + -g + "px " + -v + "px " + -y + "px",
|
|
1692
|
-
threshold:
|
|
1696
|
+
threshold: I(0, K(1, l)) || 1
|
|
1693
1697
|
};
|
|
1694
1698
|
let b = !0;
|
|
1695
1699
|
function A(P) {
|
|
@@ -1701,7 +1705,7 @@ function No(e, t) {
|
|
|
1701
1705
|
s(!1, 1e-7);
|
|
1702
1706
|
}, 1e3);
|
|
1703
1707
|
}
|
|
1704
|
-
_ === 1 && !
|
|
1708
|
+
_ === 1 && !sn(c, e.getBoundingClientRect()) && s(), b = !1;
|
|
1705
1709
|
}
|
|
1706
1710
|
try {
|
|
1707
1711
|
n = new IntersectionObserver(A, {
|
|
@@ -1743,7 +1747,7 @@ function Do(e, t, n, o) {
|
|
|
1743
1747
|
l && v();
|
|
1744
1748
|
function v() {
|
|
1745
1749
|
const y = te(e);
|
|
1746
|
-
g && !
|
|
1750
|
+
g && !sn(g, y) && n(), g = y, m = requestAnimationFrame(v);
|
|
1747
1751
|
}
|
|
1748
1752
|
return n(), () => {
|
|
1749
1753
|
var y;
|
|
@@ -1752,7 +1756,7 @@ function Do(e, t, n, o) {
|
|
|
1752
1756
|
}), p == null || p(), (y = d) == null || y.disconnect(), d = null, l && cancelAnimationFrame(m);
|
|
1753
1757
|
};
|
|
1754
1758
|
}
|
|
1755
|
-
const Lo = no, Mo = ro, $o = Qr, ko = io,
|
|
1759
|
+
const Lo = no, Mo = ro, $o = Qr, ko = io, Fo = eo, Dt = Jr, Io = oo, jo = (e, t, n) => {
|
|
1756
1760
|
const o = /* @__PURE__ */ new Map(), i = {
|
|
1757
1761
|
platform: To,
|
|
1758
1762
|
...n
|
|
@@ -1766,7 +1770,7 @@ const Lo = no, Mo = ro, $o = Qr, ko = io, jo = eo, Nt = Jr, Fo = oo, Io = (e, t,
|
|
|
1766
1770
|
});
|
|
1767
1771
|
};
|
|
1768
1772
|
var Wo = typeof document < "u", Bo = function() {
|
|
1769
|
-
}, be = Wo ?
|
|
1773
|
+
}, be = Wo ? Wn : Bo;
|
|
1770
1774
|
function Oe(e, t) {
|
|
1771
1775
|
if (e === t)
|
|
1772
1776
|
return !0;
|
|
@@ -1797,11 +1801,11 @@ function Oe(e, t) {
|
|
|
1797
1801
|
}
|
|
1798
1802
|
return e !== e && t !== t;
|
|
1799
1803
|
}
|
|
1800
|
-
function
|
|
1804
|
+
function an(e) {
|
|
1801
1805
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1802
1806
|
}
|
|
1803
|
-
function
|
|
1804
|
-
const n =
|
|
1807
|
+
function Lt(e, t) {
|
|
1808
|
+
const n = an(e);
|
|
1805
1809
|
return Math.round(t * n) / n;
|
|
1806
1810
|
}
|
|
1807
1811
|
function $e(e) {
|
|
@@ -1845,7 +1849,7 @@ function Ho(e) {
|
|
|
1845
1849
|
strategy: n,
|
|
1846
1850
|
middleware: h
|
|
1847
1851
|
};
|
|
1848
|
-
$.current && (O.platform = $.current),
|
|
1852
|
+
$.current && (O.platform = $.current), jo(P.current, _.current, O).then((M) => {
|
|
1849
1853
|
const H = {
|
|
1850
1854
|
...M,
|
|
1851
1855
|
// The floating element's position may be recomputed while it's closed
|
|
@@ -1854,7 +1858,7 @@ function Ho(e) {
|
|
|
1854
1858
|
// setting it to `true` when `open === false` (must be specified).
|
|
1855
1859
|
isPositioned: k.current !== !1
|
|
1856
1860
|
};
|
|
1857
|
-
S.current && !Oe(R.current, H) && (R.current = H,
|
|
1861
|
+
S.current && !Oe(R.current, H) && (R.current = H, kt.flushSync(() => {
|
|
1858
1862
|
p(H);
|
|
1859
1863
|
}));
|
|
1860
1864
|
});
|
|
@@ -1875,7 +1879,7 @@ function Ho(e) {
|
|
|
1875
1879
|
T();
|
|
1876
1880
|
}
|
|
1877
1881
|
}, [b, A, T, E, L]);
|
|
1878
|
-
const
|
|
1882
|
+
const F = f.useMemo(() => ({
|
|
1879
1883
|
reference: P,
|
|
1880
1884
|
floating: _,
|
|
1881
1885
|
setReference: w,
|
|
@@ -1891,11 +1895,11 @@ function Ho(e) {
|
|
|
1891
1895
|
};
|
|
1892
1896
|
if (!N.floating)
|
|
1893
1897
|
return O;
|
|
1894
|
-
const M =
|
|
1898
|
+
const M = Lt(N.floating, u.x), H = Lt(N.floating, u.y);
|
|
1895
1899
|
return a ? {
|
|
1896
1900
|
...O,
|
|
1897
1901
|
transform: "translate(" + M + "px, " + H + "px)",
|
|
1898
|
-
...
|
|
1902
|
+
...an(N.floating) >= 1.5 && {
|
|
1899
1903
|
willChange: "transform"
|
|
1900
1904
|
}
|
|
1901
1905
|
} : {
|
|
@@ -1907,10 +1911,10 @@ function Ho(e) {
|
|
|
1907
1911
|
return f.useMemo(() => ({
|
|
1908
1912
|
...u,
|
|
1909
1913
|
update: T,
|
|
1910
|
-
refs:
|
|
1914
|
+
refs: F,
|
|
1911
1915
|
elements: N,
|
|
1912
1916
|
floatingStyles: D
|
|
1913
|
-
}), [u, T,
|
|
1917
|
+
}), [u, T, F, N, D]);
|
|
1914
1918
|
}
|
|
1915
1919
|
const zo = (e) => {
|
|
1916
1920
|
function t(n) {
|
|
@@ -1924,10 +1928,10 @@ const zo = (e) => {
|
|
|
1924
1928
|
element: o,
|
|
1925
1929
|
padding: i
|
|
1926
1930
|
} = typeof e == "function" ? e(n) : e;
|
|
1927
|
-
return o && t(o) ? o.current != null ?
|
|
1931
|
+
return o && t(o) ? o.current != null ? Dt({
|
|
1928
1932
|
element: o.current,
|
|
1929
1933
|
padding: i
|
|
1930
|
-
}).fn(n) : {} : o ?
|
|
1934
|
+
}).fn(n) : {} : o ? Dt({
|
|
1931
1935
|
element: o,
|
|
1932
1936
|
padding: i
|
|
1933
1937
|
}).fn(n) : {};
|
|
@@ -1940,7 +1944,7 @@ const zo = (e) => {
|
|
|
1940
1944
|
...Mo(e),
|
|
1941
1945
|
options: [e, t]
|
|
1942
1946
|
}), Yo = (e, t) => ({
|
|
1943
|
-
...
|
|
1947
|
+
...Io(e),
|
|
1944
1948
|
options: [e, t]
|
|
1945
1949
|
}), qo = (e, t) => ({
|
|
1946
1950
|
...$o(e),
|
|
@@ -1949,16 +1953,16 @@ const zo = (e) => {
|
|
|
1949
1953
|
...ko(e),
|
|
1950
1954
|
options: [e, t]
|
|
1951
1955
|
}), Xo = (e, t) => ({
|
|
1952
|
-
...
|
|
1956
|
+
...Fo(e),
|
|
1953
1957
|
options: [e, t]
|
|
1954
1958
|
}), Zo = (e, t) => ({
|
|
1955
1959
|
...zo(e),
|
|
1956
1960
|
options: [e, t]
|
|
1957
1961
|
});
|
|
1958
|
-
var Ko = "Arrow",
|
|
1962
|
+
var Ko = "Arrow", cn = f.forwardRef((e, t) => {
|
|
1959
1963
|
const { children: n, width: o = 10, height: i = 5, ...r } = e;
|
|
1960
1964
|
return /* @__PURE__ */ x(
|
|
1961
|
-
|
|
1965
|
+
Q.svg,
|
|
1962
1966
|
{
|
|
1963
1967
|
...r,
|
|
1964
1968
|
ref: t,
|
|
@@ -1970,8 +1974,8 @@ var Ko = "Arrow", sn = f.forwardRef((e, t) => {
|
|
|
1970
1974
|
}
|
|
1971
1975
|
);
|
|
1972
1976
|
});
|
|
1973
|
-
|
|
1974
|
-
var Jo =
|
|
1977
|
+
cn.displayName = Ko;
|
|
1978
|
+
var Jo = cn;
|
|
1975
1979
|
function Qo(e) {
|
|
1976
1980
|
const [t, n] = f.useState(void 0);
|
|
1977
1981
|
return ee(() => {
|
|
@@ -1994,21 +1998,21 @@ function Qo(e) {
|
|
|
1994
1998
|
n(void 0);
|
|
1995
1999
|
}, [e]), t;
|
|
1996
2000
|
}
|
|
1997
|
-
var Ke = "Popper", [
|
|
2001
|
+
var Ke = "Popper", [ln, un] = Vt(Ke), [ei, fn] = ln(Ke), pn = (e) => {
|
|
1998
2002
|
const { __scopePopper: t, children: n } = e, [o, i] = f.useState(null);
|
|
1999
2003
|
return /* @__PURE__ */ x(ei, { scope: t, anchor: o, onAnchorChange: i, children: n });
|
|
2000
2004
|
};
|
|
2001
|
-
|
|
2002
|
-
var
|
|
2005
|
+
pn.displayName = Ke;
|
|
2006
|
+
var dn = "PopperAnchor", hn = f.forwardRef(
|
|
2003
2007
|
(e, t) => {
|
|
2004
|
-
const { __scopePopper: n, virtualRef: o, ...i } = e, r =
|
|
2008
|
+
const { __scopePopper: n, virtualRef: o, ...i } = e, r = fn(dn, n), s = f.useRef(null), a = ne(t, s);
|
|
2005
2009
|
return f.useEffect(() => {
|
|
2006
2010
|
r.onAnchorChange((o == null ? void 0 : o.current) || s.current);
|
|
2007
|
-
}), o ? null : /* @__PURE__ */ x(
|
|
2011
|
+
}), o ? null : /* @__PURE__ */ x(Q.div, { ...i, ref: a });
|
|
2008
2012
|
}
|
|
2009
2013
|
);
|
|
2010
|
-
|
|
2011
|
-
var Je = "PopperContent", [ti, ni] =
|
|
2014
|
+
hn.displayName = dn;
|
|
2015
|
+
var Je = "PopperContent", [ti, ni] = ln(Je), mn = f.forwardRef(
|
|
2012
2016
|
(e, t) => {
|
|
2013
2017
|
var nt, rt, ot, it, st, at;
|
|
2014
2018
|
const {
|
|
@@ -2026,12 +2030,12 @@ var Je = "PopperContent", [ti, ni] = an(Je), dn = f.forwardRef(
|
|
|
2026
2030
|
updatePositionStrategy: d = "optimized",
|
|
2027
2031
|
onPlaced: m,
|
|
2028
2032
|
...g
|
|
2029
|
-
} = e, v =
|
|
2033
|
+
} = e, v = fn(Je, n), [y, w] = f.useState(null), C = ne(t, (ue) => w(ue)), [b, A] = f.useState(null), P = Qo(b), _ = (P == null ? void 0 : P.width) ?? 0, R = (P == null ? void 0 : P.height) ?? 0, L = o + (r !== "center" ? "-" + r : ""), E = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, $ = Array.isArray(c) ? c : [c], k = $.length > 0, T = {
|
|
2030
2034
|
padding: E,
|
|
2031
2035
|
boundary: $.filter(oi),
|
|
2032
2036
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
2033
2037
|
altBoundary: k
|
|
2034
|
-
}, { refs: S, floatingStyles:
|
|
2038
|
+
}, { refs: S, floatingStyles: F, placement: N, isPositioned: D, middlewareData: O } = Ho({
|
|
2035
2039
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
2036
2040
|
strategy: "fixed",
|
|
2037
2041
|
placement: L,
|
|
@@ -2052,33 +2056,33 @@ var Je = "PopperContent", [ti, ni] = an(Je), dn = f.forwardRef(
|
|
|
2052
2056
|
l && qo({ ...T }),
|
|
2053
2057
|
Go({
|
|
2054
2058
|
...T,
|
|
2055
|
-
apply: ({ elements: ue, rects: ct, availableWidth:
|
|
2056
|
-
const { width:
|
|
2057
|
-
ye.setProperty("--radix-popper-available-width", `${
|
|
2059
|
+
apply: ({ elements: ue, rects: ct, availableWidth: $n, availableHeight: kn }) => {
|
|
2060
|
+
const { width: Fn, height: In } = ct.reference, ye = ue.floating.style;
|
|
2061
|
+
ye.setProperty("--radix-popper-available-width", `${$n}px`), ye.setProperty("--radix-popper-available-height", `${kn}px`), ye.setProperty("--radix-popper-anchor-width", `${Fn}px`), ye.setProperty("--radix-popper-anchor-height", `${In}px`);
|
|
2058
2062
|
}
|
|
2059
2063
|
}),
|
|
2060
2064
|
b && Zo({ element: b, padding: a }),
|
|
2061
2065
|
ii({ arrowWidth: _, arrowHeight: R }),
|
|
2062
2066
|
h && Xo({ strategy: "referenceHidden", ...T })
|
|
2063
2067
|
]
|
|
2064
|
-
}), [M, H] =
|
|
2068
|
+
}), [M, H] = yn(N), ve = ae(m);
|
|
2065
2069
|
ee(() => {
|
|
2066
2070
|
D && (ve == null || ve());
|
|
2067
2071
|
}, [D, ve]);
|
|
2068
|
-
const
|
|
2072
|
+
const Tn = (nt = O.arrow) == null ? void 0 : nt.x, Nn = (rt = O.arrow) == null ? void 0 : rt.y, Dn = ((ot = O.arrow) == null ? void 0 : ot.centerOffset) !== 0, [Ln, Mn] = f.useState();
|
|
2069
2073
|
return ee(() => {
|
|
2070
|
-
y &&
|
|
2074
|
+
y && Mn(window.getComputedStyle(y).zIndex);
|
|
2071
2075
|
}, [y]), /* @__PURE__ */ x(
|
|
2072
2076
|
"div",
|
|
2073
2077
|
{
|
|
2074
2078
|
ref: S.setFloating,
|
|
2075
2079
|
"data-radix-popper-content-wrapper": "",
|
|
2076
2080
|
style: {
|
|
2077
|
-
...
|
|
2078
|
-
transform: D ?
|
|
2081
|
+
...F,
|
|
2082
|
+
transform: D ? F.transform : "translate(0, -200%)",
|
|
2079
2083
|
// keep off the page when measuring
|
|
2080
2084
|
minWidth: "max-content",
|
|
2081
|
-
zIndex:
|
|
2085
|
+
zIndex: Ln,
|
|
2082
2086
|
"--radix-popper-transform-origin": [
|
|
2083
2087
|
(it = O.transformOrigin) == null ? void 0 : it.x,
|
|
2084
2088
|
(st = O.transformOrigin) == null ? void 0 : st.y
|
|
@@ -2098,11 +2102,11 @@ var Je = "PopperContent", [ti, ni] = an(Je), dn = f.forwardRef(
|
|
|
2098
2102
|
scope: n,
|
|
2099
2103
|
placedSide: M,
|
|
2100
2104
|
onArrowChange: A,
|
|
2101
|
-
arrowX:
|
|
2102
|
-
arrowY:
|
|
2103
|
-
shouldHideArrow:
|
|
2105
|
+
arrowX: Tn,
|
|
2106
|
+
arrowY: Nn,
|
|
2107
|
+
shouldHideArrow: Dn,
|
|
2104
2108
|
children: /* @__PURE__ */ x(
|
|
2105
|
-
|
|
2109
|
+
Q.div,
|
|
2106
2110
|
{
|
|
2107
2111
|
"data-side": M,
|
|
2108
2112
|
"data-align": H,
|
|
@@ -2122,14 +2126,14 @@ var Je = "PopperContent", [ti, ni] = an(Je), dn = f.forwardRef(
|
|
|
2122
2126
|
);
|
|
2123
2127
|
}
|
|
2124
2128
|
);
|
|
2125
|
-
|
|
2126
|
-
var
|
|
2129
|
+
mn.displayName = Je;
|
|
2130
|
+
var gn = "PopperArrow", ri = {
|
|
2127
2131
|
top: "bottom",
|
|
2128
2132
|
right: "left",
|
|
2129
2133
|
bottom: "top",
|
|
2130
2134
|
left: "right"
|
|
2131
|
-
},
|
|
2132
|
-
const { __scopePopper: o, ...i } = t, r = ni(
|
|
2135
|
+
}, vn = f.forwardRef(function(t, n) {
|
|
2136
|
+
const { __scopePopper: o, ...i } = t, r = ni(gn, o), s = ri[r.placedSide];
|
|
2133
2137
|
return (
|
|
2134
2138
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
2135
2139
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -2173,7 +2177,7 @@ var hn = "PopperArrow", ri = {
|
|
|
2173
2177
|
)
|
|
2174
2178
|
);
|
|
2175
2179
|
});
|
|
2176
|
-
|
|
2180
|
+
vn.displayName = gn;
|
|
2177
2181
|
function oi(e) {
|
|
2178
2182
|
return e !== null;
|
|
2179
2183
|
}
|
|
@@ -2182,23 +2186,23 @@ var ii = (e) => ({
|
|
|
2182
2186
|
options: e,
|
|
2183
2187
|
fn(t) {
|
|
2184
2188
|
var v, y, w;
|
|
2185
|
-
const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [c, u] =
|
|
2189
|
+
const { placement: n, rects: o, middlewareData: i } = t, s = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, a = s ? 0 : e.arrowWidth, l = s ? 0 : e.arrowHeight, [c, u] = yn(n), p = { start: "0%", center: "50%", end: "100%" }[u], h = (((y = i.arrow) == null ? void 0 : y.x) ?? 0) + a / 2, d = (((w = i.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
|
|
2186
2190
|
let m = "", g = "";
|
|
2187
2191
|
return c === "bottom" ? (m = s ? p : `${h}px`, g = `${-l}px`) : c === "top" ? (m = s ? p : `${h}px`, g = `${o.floating.height + l}px`) : c === "right" ? (m = `${-l}px`, g = s ? p : `${d}px`) : c === "left" && (m = `${o.floating.width + l}px`, g = s ? p : `${d}px`), { data: { x: m, y: g } };
|
|
2188
2192
|
}
|
|
2189
2193
|
});
|
|
2190
|
-
function
|
|
2194
|
+
function yn(e) {
|
|
2191
2195
|
const [t, n = "center"] = e.split("-");
|
|
2192
2196
|
return [t, n];
|
|
2193
2197
|
}
|
|
2194
|
-
var si =
|
|
2198
|
+
var si = pn, ai = hn, ci = mn, li = vn, ui = "Portal", wn = f.forwardRef((e, t) => {
|
|
2195
2199
|
var a;
|
|
2196
2200
|
const { container: n, ...o } = e, [i, r] = f.useState(!1);
|
|
2197
2201
|
ee(() => r(!0), []);
|
|
2198
2202
|
const s = n || i && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
|
|
2199
|
-
return s ?
|
|
2203
|
+
return s ? zn.createPortal(/* @__PURE__ */ x(Q.div, { ...o, ref: t }), s) : null;
|
|
2200
2204
|
});
|
|
2201
|
-
|
|
2205
|
+
wn.displayName = ui;
|
|
2202
2206
|
function fi(e, t) {
|
|
2203
2207
|
return f.useReducer((n, o) => t[n][o] ?? n, e);
|
|
2204
2208
|
}
|
|
@@ -2291,9 +2295,9 @@ function mi({
|
|
|
2291
2295
|
i.current !== o && (r(o), i.current = o);
|
|
2292
2296
|
}, [o, i, r]), n;
|
|
2293
2297
|
}
|
|
2294
|
-
var gi = "VisuallyHidden",
|
|
2298
|
+
var gi = "VisuallyHidden", xn = f.forwardRef(
|
|
2295
2299
|
(e, t) => /* @__PURE__ */ x(
|
|
2296
|
-
|
|
2300
|
+
Q.span,
|
|
2297
2301
|
{
|
|
2298
2302
|
...e,
|
|
2299
2303
|
ref: t,
|
|
@@ -2314,10 +2318,10 @@ var gi = "VisuallyHidden", yn = f.forwardRef(
|
|
|
2314
2318
|
}
|
|
2315
2319
|
)
|
|
2316
2320
|
);
|
|
2317
|
-
|
|
2318
|
-
var vi =
|
|
2319
|
-
|
|
2320
|
-
]), De =
|
|
2321
|
+
xn.displayName = gi;
|
|
2322
|
+
var vi = xn, [Ne] = Vt("Tooltip", [
|
|
2323
|
+
un
|
|
2324
|
+
]), De = un(), bn = "TooltipProvider", yi = 700, ze = "tooltip.open", [wi, et] = Ne(bn), _n = (e) => {
|
|
2321
2325
|
const {
|
|
2322
2326
|
__scopeTooltip: t,
|
|
2323
2327
|
delayDuration: n = yi,
|
|
@@ -2352,8 +2356,8 @@ var vi = yn, [Ne] = Ht("Tooltip", [
|
|
|
2352
2356
|
}
|
|
2353
2357
|
);
|
|
2354
2358
|
};
|
|
2355
|
-
|
|
2356
|
-
var Le = "Tooltip", [xi, ge] = Ne(Le),
|
|
2359
|
+
_n.displayName = bn;
|
|
2360
|
+
var Le = "Tooltip", [xi, ge] = Ne(Le), An = (e) => {
|
|
2357
2361
|
const {
|
|
2358
2362
|
__scopeTooltip: t,
|
|
2359
2363
|
children: n,
|
|
@@ -2362,7 +2366,7 @@ var Le = "Tooltip", [xi, ge] = Ne(Le), bn = (e) => {
|
|
|
2362
2366
|
onOpenChange: r,
|
|
2363
2367
|
disableHoverableContent: s,
|
|
2364
2368
|
delayDuration: a
|
|
2365
|
-
} = e, l = et(Le, e.__scopeTooltip), c = De(t), [u, p] = f.useState(null), h =
|
|
2369
|
+
} = e, l = et(Le, e.__scopeTooltip), c = De(t), [u, p] = f.useState(null), h = jr(), d = f.useRef(0), m = s ?? l.disableHoverableContent, g = a ?? l.delayDuration, v = f.useRef(!1), [y = !1, w] = hi({
|
|
2366
2370
|
prop: o,
|
|
2367
2371
|
defaultProp: i,
|
|
2368
2372
|
onChange: (_) => {
|
|
@@ -2401,12 +2405,12 @@ var Le = "Tooltip", [xi, ge] = Ne(Le), bn = (e) => {
|
|
|
2401
2405
|
}
|
|
2402
2406
|
) });
|
|
2403
2407
|
};
|
|
2404
|
-
|
|
2405
|
-
var Ve = "TooltipTrigger",
|
|
2408
|
+
An.displayName = Le;
|
|
2409
|
+
var Ve = "TooltipTrigger", Cn = f.forwardRef(
|
|
2406
2410
|
(e, t) => {
|
|
2407
2411
|
const { __scopeTooltip: n, ...o } = e, i = ge(Ve, n), r = et(Ve, n), s = De(n), a = f.useRef(null), l = ne(t, a, i.onTriggerChange), c = f.useRef(!1), u = f.useRef(!1), p = f.useCallback(() => c.current = !1, []);
|
|
2408
2412
|
return f.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ x(ai, { asChild: !0, ...s, children: /* @__PURE__ */ x(
|
|
2409
|
-
|
|
2413
|
+
Q.button,
|
|
2410
2414
|
{
|
|
2411
2415
|
"aria-describedby": i.open ? i.contentId : void 0,
|
|
2412
2416
|
"data-state": i.stateAttribute,
|
|
@@ -2430,18 +2434,18 @@ var Ve = "TooltipTrigger", _n = f.forwardRef(
|
|
|
2430
2434
|
) });
|
|
2431
2435
|
}
|
|
2432
2436
|
);
|
|
2433
|
-
|
|
2437
|
+
Cn.displayName = Ve;
|
|
2434
2438
|
var tt = "TooltipPortal", [bi, _i] = Ne(tt, {
|
|
2435
2439
|
forceMount: void 0
|
|
2436
|
-
}),
|
|
2440
|
+
}), Pn = (e) => {
|
|
2437
2441
|
const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = ge(tt, t);
|
|
2438
|
-
return /* @__PURE__ */ x(bi, { scope: t, forceMount: n, children: /* @__PURE__ */ x(Qe, { present: n || r.open, children: /* @__PURE__ */ x(
|
|
2442
|
+
return /* @__PURE__ */ x(bi, { scope: t, forceMount: n, children: /* @__PURE__ */ x(Qe, { present: n || r.open, children: /* @__PURE__ */ x(wn, { asChild: !0, container: i, children: o }) }) });
|
|
2439
2443
|
};
|
|
2440
|
-
|
|
2441
|
-
var se = "TooltipContent",
|
|
2444
|
+
Pn.displayName = tt;
|
|
2445
|
+
var se = "TooltipContent", On = f.forwardRef(
|
|
2442
2446
|
(e, t) => {
|
|
2443
2447
|
const n = _i(se, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = ge(se, e.__scopeTooltip);
|
|
2444
|
-
return /* @__PURE__ */ x(Qe, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ x(
|
|
2448
|
+
return /* @__PURE__ */ x(Qe, { present: o || s.open, children: s.disableHoverableContent ? /* @__PURE__ */ x(Rn, { side: i, ...r, ref: t }) : /* @__PURE__ */ x(Ai, { side: i, ...r, ref: t }) });
|
|
2445
2449
|
}
|
|
2446
2450
|
), Ai = f.forwardRef((e, t) => {
|
|
2447
2451
|
const n = ge(se, e.__scopeTooltip), o = et(se, e.__scopeTooltip), i = f.useRef(null), r = ne(t, i), [s, a] = f.useState(null), { trigger: l, onClose: c } = n, u = i.current, { onPointerInTransitChange: p } = o, h = f.useCallback(() => {
|
|
@@ -2468,8 +2472,8 @@ var se = "TooltipContent", Cn = f.forwardRef(
|
|
|
2468
2472
|
};
|
|
2469
2473
|
return document.addEventListener("pointermove", m), () => document.removeEventListener("pointermove", m);
|
|
2470
2474
|
}
|
|
2471
|
-
}, [l, u, s, c, h]), /* @__PURE__ */ x(
|
|
2472
|
-
}), [Ci, Pi] = Ne(Le, { isInside: !1 }),
|
|
2475
|
+
}, [l, u, s, c, h]), /* @__PURE__ */ x(Rn, { ...e, ref: r });
|
|
2476
|
+
}), [Ci, Pi] = Ne(Le, { isInside: !1 }), Rn = f.forwardRef(
|
|
2473
2477
|
(e, t) => {
|
|
2474
2478
|
const {
|
|
2475
2479
|
__scopeTooltip: n,
|
|
@@ -2488,7 +2492,7 @@ var se = "TooltipContent", Cn = f.forwardRef(
|
|
|
2488
2492
|
return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
|
|
2489
2493
|
}
|
|
2490
2494
|
}, [l.trigger, u]), /* @__PURE__ */ x(
|
|
2491
|
-
|
|
2495
|
+
Gt,
|
|
2492
2496
|
{
|
|
2493
2497
|
asChild: !0,
|
|
2494
2498
|
disableOutsidePointerEvents: !1,
|
|
@@ -2512,7 +2516,7 @@ var se = "TooltipContent", Cn = f.forwardRef(
|
|
|
2512
2516
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
2513
2517
|
},
|
|
2514
2518
|
children: [
|
|
2515
|
-
/* @__PURE__ */ x(
|
|
2519
|
+
/* @__PURE__ */ x(Yt, { children: o }),
|
|
2516
2520
|
/* @__PURE__ */ x(Ci, { scope: n, isInside: !0, children: /* @__PURE__ */ x(vi, { id: l.contentId, role: "tooltip", children: i || o }) })
|
|
2517
2521
|
]
|
|
2518
2522
|
}
|
|
@@ -2521,17 +2525,17 @@ var se = "TooltipContent", Cn = f.forwardRef(
|
|
|
2521
2525
|
);
|
|
2522
2526
|
}
|
|
2523
2527
|
);
|
|
2524
|
-
|
|
2525
|
-
var
|
|
2528
|
+
On.displayName = se;
|
|
2529
|
+
var En = "TooltipArrow", Sn = f.forwardRef(
|
|
2526
2530
|
(e, t) => {
|
|
2527
2531
|
const { __scopeTooltip: n, ...o } = e, i = De(n);
|
|
2528
2532
|
return Pi(
|
|
2529
|
-
|
|
2533
|
+
En,
|
|
2530
2534
|
n
|
|
2531
2535
|
).isInside ? null : /* @__PURE__ */ x(li, { ...i, ...o, ref: t });
|
|
2532
2536
|
}
|
|
2533
2537
|
);
|
|
2534
|
-
|
|
2538
|
+
Sn.displayName = En;
|
|
2535
2539
|
function Oi(e, t) {
|
|
2536
2540
|
const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), r = Math.abs(t.left - e.x);
|
|
2537
2541
|
switch (Math.min(n, o, i, r)) {
|
|
@@ -2624,8 +2628,8 @@ function Ni(e) {
|
|
|
2624
2628
|
}
|
|
2625
2629
|
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);
|
|
2626
2630
|
}
|
|
2627
|
-
var Di =
|
|
2628
|
-
function
|
|
2631
|
+
var Di = _n, Li = An, Mi = Cn, $i = Pn, ki = On, Fi = Sn;
|
|
2632
|
+
function Ii(e) {
|
|
2629
2633
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
2630
2634
|
}
|
|
2631
2635
|
var ke = { exports: {} };
|
|
@@ -2634,9 +2638,9 @@ var ke = { exports: {} };
|
|
|
2634
2638
|
Licensed under the MIT License (MIT), see
|
|
2635
2639
|
http://jedwatson.github.io/classnames
|
|
2636
2640
|
*/
|
|
2637
|
-
var
|
|
2638
|
-
function
|
|
2639
|
-
return
|
|
2641
|
+
var Mt;
|
|
2642
|
+
function ji() {
|
|
2643
|
+
return Mt || (Mt = 1, (function(e) {
|
|
2640
2644
|
(function() {
|
|
2641
2645
|
var t = {}.hasOwnProperty;
|
|
2642
2646
|
function n() {
|
|
@@ -2667,8 +2671,8 @@ function Ii() {
|
|
|
2667
2671
|
})();
|
|
2668
2672
|
})(ke)), ke.exports;
|
|
2669
2673
|
}
|
|
2670
|
-
var Wi =
|
|
2671
|
-
const Bi = /* @__PURE__ */
|
|
2674
|
+
var Wi = ji();
|
|
2675
|
+
const Bi = /* @__PURE__ */ Ii(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slideLeftAndFade_fkagk_1", Vi = "_slideUpAndFade_fkagk_1", Ui = "_slideRightAndFade_fkagk_1", Yi = {
|
|
2672
2676
|
"purpur-tooltip": "_purpur-tooltip_fkagk_1",
|
|
2673
2677
|
"purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
|
|
2674
2678
|
"purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
|
|
@@ -2679,7 +2683,7 @@ const Bi = /* @__PURE__ */ Fi(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2679
2683
|
slideRightAndFade: Ui,
|
|
2680
2684
|
"purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
|
|
2681
2685
|
"purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
|
|
2682
|
-
},
|
|
2686
|
+
}, Fe = Bi.bind(Yi), qi = {
|
|
2683
2687
|
TOP: "top",
|
|
2684
2688
|
BOTTOM: "bottom",
|
|
2685
2689
|
LEFT: "left",
|
|
@@ -2688,7 +2692,7 @@ const Bi = /* @__PURE__ */ Fi(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2688
2692
|
START: "start",
|
|
2689
2693
|
CENTER: "center",
|
|
2690
2694
|
END: "end"
|
|
2691
|
-
}, re = "purpur-tooltip", Xi =
|
|
2695
|
+
}, re = "purpur-tooltip", Xi = $t(
|
|
2692
2696
|
({
|
|
2693
2697
|
["data-testid"]: e,
|
|
2694
2698
|
buttonSize: t = "md",
|
|
@@ -2702,22 +2706,22 @@ const Bi = /* @__PURE__ */ Fi(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2702
2706
|
triggerElement: c,
|
|
2703
2707
|
...u
|
|
2704
2708
|
}, p) => {
|
|
2705
|
-
const [h, d] =
|
|
2709
|
+
const [h, d] = Bn(!1), m = Fe(
|
|
2706
2710
|
o,
|
|
2707
2711
|
re,
|
|
2708
2712
|
`${re}--primary${r ? "-negative" : ""}`
|
|
2709
2713
|
), g = /* @__PURE__ */ x(
|
|
2710
|
-
|
|
2714
|
+
It,
|
|
2711
2715
|
{
|
|
2712
2716
|
ref: p,
|
|
2713
2717
|
"aria-label": l,
|
|
2714
2718
|
"aria-expanded": h,
|
|
2715
|
-
variant:
|
|
2719
|
+
variant: or.TERTIARY_PURPLE,
|
|
2716
2720
|
negative: r,
|
|
2717
2721
|
iconOnly: !0,
|
|
2718
2722
|
"data-testid": `${e}-trigger-button`,
|
|
2719
2723
|
size: t,
|
|
2720
|
-
children: /* @__PURE__ */ x(
|
|
2724
|
+
children: /* @__PURE__ */ x(Wt, { size: "md" })
|
|
2721
2725
|
}
|
|
2722
2726
|
);
|
|
2723
2727
|
return /* @__PURE__ */ x("div", { "data-testid": e, className: m, children: /* @__PURE__ */ x(Di, { delayDuration: parseInt(_r), children: /* @__PURE__ */ _e(Li, { open: h, onOpenChange: d, ...u, children: [
|
|
@@ -2728,7 +2732,7 @@ const Bi = /* @__PURE__ */ Fi(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2728
2732
|
onClick: (v) => {
|
|
2729
2733
|
v.preventDefault(), d(!0);
|
|
2730
2734
|
},
|
|
2731
|
-
children:
|
|
2735
|
+
children: Hn.count(c) === 0 ? g : c
|
|
2732
2736
|
}
|
|
2733
2737
|
),
|
|
2734
2738
|
/* @__PURE__ */ x($i, { children: /* @__PURE__ */ _e(
|
|
@@ -2736,7 +2740,7 @@ const Bi = /* @__PURE__ */ Fi(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2736
2740
|
{
|
|
2737
2741
|
side: s,
|
|
2738
2742
|
align: a,
|
|
2739
|
-
className:
|
|
2743
|
+
className: Fe(
|
|
2740
2744
|
i,
|
|
2741
2745
|
`${re}__content`,
|
|
2742
2746
|
`${re}__content--primary${r ? "-negative" : ""}`
|
|
@@ -2745,18 +2749,18 @@ const Bi = /* @__PURE__ */ Fi(Wi), Hi = "_slideDownAndFade_fkagk_1", zi = "_slid
|
|
|
2745
2749
|
"data-testid": `${e}-content`,
|
|
2746
2750
|
children: [
|
|
2747
2751
|
typeof n == "string" ? /* @__PURE__ */ x(
|
|
2748
|
-
|
|
2752
|
+
Ht,
|
|
2749
2753
|
{
|
|
2750
|
-
variant:
|
|
2754
|
+
variant: Bt.PARAGRAPH100,
|
|
2751
2755
|
negative: !r,
|
|
2752
2756
|
"data-testid": `${e}-paragraph`,
|
|
2753
2757
|
children: n
|
|
2754
2758
|
}
|
|
2755
2759
|
) : n,
|
|
2756
2760
|
/* @__PURE__ */ x(
|
|
2757
|
-
|
|
2761
|
+
Fi,
|
|
2758
2762
|
{
|
|
2759
|
-
className:
|
|
2763
|
+
className: Fe(
|
|
2760
2764
|
`${re}__arrow`,
|
|
2761
2765
|
`${re}__arrow--primary${r ? "-negative" : ""}`
|
|
2762
2766
|
)
|