seam-react 0.7.0 → 0.8.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/dist/Select.d.ts +33 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1109 -777
- package/dist/index.js.map +1 -1
- package/dist/styles.cjs +223 -2
- package/dist/styles.cjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.js +224 -3
- package/dist/styles.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { jsxs as C, jsx as
|
|
2
|
-
import { forwardRef as N, useId as
|
|
3
|
-
import { useControllableState as
|
|
4
|
-
import {
|
|
5
|
-
import { createPortal as
|
|
6
|
-
function
|
|
1
|
+
import { jsxs as C, jsx as l, Fragment as ke } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useId as R, useState as O, useCallback as B, useMemo as G, useRef as L, useEffect as $, createContext as U, useContext as j, useSyncExternalStore as te, useLayoutEffect as ne, isValidElement as W, cloneElement as Y, Children as et } from "react";
|
|
3
|
+
import { useControllableState as V, useEventCallback as S, useLockBodyScroll as tt, useFocusTrap as nt } from "seam-hooks";
|
|
4
|
+
import { AnimatePresence as A, useReducedMotion as z, useIsPresent as oe, motion as D, LayoutGroup as Ie, useMotionValue as ot, animate as me, MotionConfig as le } from "motion/react";
|
|
5
|
+
import { createPortal as re } from "react-dom";
|
|
6
|
+
function w(...t) {
|
|
7
7
|
return t.filter(Boolean).join(" ");
|
|
8
8
|
}
|
|
9
|
-
const
|
|
9
|
+
const we = N(function({
|
|
10
10
|
variant: e = "primary",
|
|
11
11
|
size: n = "md",
|
|
12
12
|
loading: o = !1,
|
|
13
|
-
iconOnly:
|
|
13
|
+
iconOnly: i = !1,
|
|
14
14
|
type: s = "button",
|
|
15
15
|
className: a,
|
|
16
|
-
children:
|
|
17
|
-
...
|
|
18
|
-
},
|
|
16
|
+
children: r,
|
|
17
|
+
...p
|
|
18
|
+
}, c) {
|
|
19
19
|
return /* @__PURE__ */ C(
|
|
20
20
|
"button",
|
|
21
21
|
{
|
|
22
|
-
...
|
|
23
|
-
ref:
|
|
22
|
+
...p,
|
|
23
|
+
ref: c,
|
|
24
24
|
type: s,
|
|
25
|
-
className:
|
|
25
|
+
className: w("uk-button", a),
|
|
26
26
|
"data-variant": e,
|
|
27
27
|
"data-size": n,
|
|
28
28
|
"data-loading": o ? "true" : void 0,
|
|
29
|
-
"data-icon-only":
|
|
30
|
-
disabled:
|
|
29
|
+
"data-icon-only": i ? "true" : void 0,
|
|
30
|
+
disabled: p.disabled || o,
|
|
31
31
|
"aria-busy": o || void 0,
|
|
32
32
|
children: [
|
|
33
|
-
o ? /* @__PURE__ */
|
|
34
|
-
|
|
33
|
+
o ? /* @__PURE__ */ l("span", { className: "uk-button__spinner", "aria-hidden": "true" }) : null,
|
|
34
|
+
r
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
}),
|
|
38
|
+
}), rt = N(function({
|
|
39
39
|
checked: e,
|
|
40
40
|
defaultChecked: n,
|
|
41
41
|
onCheckedChange: o,
|
|
42
|
-
disabled:
|
|
42
|
+
disabled: i,
|
|
43
43
|
className: s,
|
|
44
44
|
children: a,
|
|
45
|
-
id:
|
|
46
|
-
...
|
|
47
|
-
},
|
|
48
|
-
const
|
|
45
|
+
id: r,
|
|
46
|
+
...p
|
|
47
|
+
}, c) {
|
|
48
|
+
const u = R(), h = r ?? u, [d, y] = V({
|
|
49
49
|
value: e,
|
|
50
50
|
defaultValue: n ?? !1,
|
|
51
51
|
onChange: o
|
|
@@ -53,26 +53,26 @@ const ye = N(function({
|
|
|
53
53
|
return /* @__PURE__ */ C(
|
|
54
54
|
"label",
|
|
55
55
|
{
|
|
56
|
-
className:
|
|
57
|
-
"data-disabled":
|
|
58
|
-
htmlFor:
|
|
56
|
+
className: w("uk-checkbox", s),
|
|
57
|
+
"data-disabled": i ? "true" : void 0,
|
|
58
|
+
htmlFor: h,
|
|
59
59
|
children: [
|
|
60
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ l(
|
|
61
61
|
"input",
|
|
62
62
|
{
|
|
63
|
-
...
|
|
64
|
-
ref:
|
|
65
|
-
id:
|
|
63
|
+
...p,
|
|
64
|
+
ref: c,
|
|
65
|
+
id: h,
|
|
66
66
|
type: "checkbox",
|
|
67
67
|
className: "uk-checkbox__input",
|
|
68
|
-
checked:
|
|
69
|
-
disabled:
|
|
70
|
-
onChange: (
|
|
71
|
-
|
|
68
|
+
checked: d,
|
|
69
|
+
disabled: i,
|
|
70
|
+
onChange: (f) => {
|
|
71
|
+
i || y(f.target.checked);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
),
|
|
75
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ l("span", { className: "uk-checkbox__box", "aria-hidden": "true", children: /* @__PURE__ */ l(
|
|
76
76
|
"svg",
|
|
77
77
|
{
|
|
78
78
|
className: "uk-checkbox__check",
|
|
@@ -82,223 +82,554 @@ const ye = N(function({
|
|
|
82
82
|
strokeWidth: 3.2,
|
|
83
83
|
strokeLinecap: "round",
|
|
84
84
|
strokeLinejoin: "round",
|
|
85
|
-
children: /* @__PURE__ */
|
|
85
|
+
children: /* @__PURE__ */ l("path", { d: "M4 12.5 L9.5 18 L20 7", pathLength: 1 })
|
|
86
86
|
}
|
|
87
87
|
) }),
|
|
88
|
-
a ? /* @__PURE__ */
|
|
88
|
+
a ? /* @__PURE__ */ l("span", { className: "uk-checkbox__label", children: a }) : null
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
});
|
|
93
|
-
|
|
94
|
-
const
|
|
95
|
-
inputSize: e = "md",
|
|
96
|
-
invalid: n = !1,
|
|
97
|
-
className: o,
|
|
98
|
-
"aria-invalid": r,
|
|
99
|
-
...s
|
|
100
|
-
}, a) {
|
|
101
|
-
return /* @__PURE__ */ c(
|
|
102
|
-
"input",
|
|
103
|
-
{
|
|
104
|
-
...s,
|
|
105
|
-
ref: a,
|
|
106
|
-
className: T("uk-input", o),
|
|
107
|
-
"data-size": e,
|
|
108
|
-
"aria-invalid": n ? !0 : r
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
}), Z = [0.23, 1, 0.32, 1], et = [0.77, 0, 0.175, 1], he = {
|
|
93
|
+
rt.displayName = "CheckBox";
|
|
94
|
+
const ee = [0.23, 1, 0.32, 1], it = [0.77, 0, 0.175, 1], be = {
|
|
112
95
|
type: "spring",
|
|
113
96
|
bounce: 0,
|
|
114
97
|
duration: 0.3
|
|
115
|
-
},
|
|
98
|
+
}, ge = {
|
|
116
99
|
type: "spring",
|
|
117
100
|
bounce: 0.04,
|
|
118
101
|
duration: 0.38
|
|
119
|
-
},
|
|
102
|
+
}, ie = {
|
|
120
103
|
type: "spring",
|
|
121
104
|
bounce: 0.08,
|
|
122
105
|
duration: 0.34
|
|
123
|
-
},
|
|
106
|
+
}, xe = {
|
|
124
107
|
duration: 0.2,
|
|
125
|
-
ease:
|
|
126
|
-
},
|
|
108
|
+
ease: it
|
|
109
|
+
}, Te = {
|
|
127
110
|
duration: 0.12,
|
|
128
|
-
ease:
|
|
129
|
-
},
|
|
111
|
+
ease: ee
|
|
112
|
+
}, at = {
|
|
130
113
|
layout: { type: "spring", bounce: 0, duration: 0.22 },
|
|
131
|
-
opacity: { duration: 0.12, ease:
|
|
132
|
-
scale: { duration: 0.12, ease:
|
|
133
|
-
},
|
|
114
|
+
opacity: { duration: 0.12, ease: ee },
|
|
115
|
+
scale: { duration: 0.12, ease: ee }
|
|
116
|
+
}, q = {
|
|
134
117
|
duration: 0.12,
|
|
135
|
-
ease:
|
|
136
|
-
},
|
|
118
|
+
ease: ee
|
|
119
|
+
}, _e = U(null);
|
|
120
|
+
function ue(t) {
|
|
121
|
+
const e = j(_e);
|
|
122
|
+
if (!e)
|
|
123
|
+
throw new Error(`<${t}> must be rendered inside <Select>`);
|
|
124
|
+
return e;
|
|
125
|
+
}
|
|
126
|
+
const st = () => () => {
|
|
127
|
+
}, ct = () => !0, lt = () => !1;
|
|
128
|
+
function ye(t, e) {
|
|
129
|
+
return (n) => {
|
|
130
|
+
t?.(n), n.defaultPrevented || e(n);
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function ut(t, e, n) {
|
|
134
|
+
return n < e ? e : Math.min(Math.max(t, e), n);
|
|
135
|
+
}
|
|
136
|
+
function dt(t) {
|
|
137
|
+
return t === "bottom" ? "center top" : "center bottom";
|
|
138
|
+
}
|
|
139
|
+
function pt({
|
|
140
|
+
options: t,
|
|
141
|
+
value: e,
|
|
142
|
+
defaultValue: n = null,
|
|
143
|
+
onValueChange: o,
|
|
144
|
+
children: i
|
|
145
|
+
}) {
|
|
146
|
+
const s = R(), [a, r] = V({
|
|
147
|
+
value: e,
|
|
148
|
+
defaultValue: n,
|
|
149
|
+
onChange: (v) => {
|
|
150
|
+
v !== null && o?.(v);
|
|
151
|
+
}
|
|
152
|
+
}), [p, c] = O(!1), u = t.findIndex((v) => v.value === a), [h, d] = O(
|
|
153
|
+
null
|
|
154
|
+
), y = h ?? Math.max(u, 0), f = B((v) => {
|
|
155
|
+
d(v);
|
|
156
|
+
}, []), b = S((v) => {
|
|
157
|
+
const k = t[v];
|
|
158
|
+
!k || k.disabled || (r(k.value), c(!1), d(null));
|
|
159
|
+
}), g = G(
|
|
160
|
+
() => ({
|
|
161
|
+
value: a,
|
|
162
|
+
activeIndex: y,
|
|
163
|
+
open: p,
|
|
164
|
+
setOpen: c,
|
|
165
|
+
setActiveIndex: f,
|
|
166
|
+
commit: b,
|
|
167
|
+
triggerId: `${s}-trigger`,
|
|
168
|
+
contentId: `${s}-content`,
|
|
169
|
+
options: t
|
|
170
|
+
}),
|
|
171
|
+
[y, s, b, a, p, t, f]
|
|
172
|
+
);
|
|
173
|
+
return /* @__PURE__ */ l(_e.Provider, { value: g, children: i });
|
|
174
|
+
}
|
|
175
|
+
function Q(t, e, n, o = !0) {
|
|
176
|
+
const i = t.length;
|
|
177
|
+
if (i === 0)
|
|
178
|
+
return -1;
|
|
179
|
+
for (let s = 1; s <= i; s += 1) {
|
|
180
|
+
const a = o ? (e + n * s + i * s) % i : e + n * s;
|
|
181
|
+
if (a < 0 || a >= i)
|
|
182
|
+
break;
|
|
183
|
+
if (!t[a]?.disabled)
|
|
184
|
+
return a;
|
|
185
|
+
}
|
|
186
|
+
return e;
|
|
187
|
+
}
|
|
188
|
+
const ft = N(function({ className: e, placeholder: n = "请选择", onPointerDown: o, onKeyDown: i, ...s }, a) {
|
|
189
|
+
const r = ue("Select.Trigger"), p = r.options.find(
|
|
190
|
+
(b) => b.value === r.value
|
|
191
|
+
), c = s.disabled, u = L({ search: "", timer: null }), h = B(() => {
|
|
192
|
+
u.current.timer && (clearTimeout(u.current.timer), u.current.timer = null), u.current.search = "";
|
|
193
|
+
}, []);
|
|
194
|
+
$(() => h, [h]);
|
|
195
|
+
const d = S((b) => {
|
|
196
|
+
const g = u.current;
|
|
197
|
+
g.timer && clearTimeout(g.timer), g.search += b.toLowerCase(), g.timer = setTimeout(h, 500);
|
|
198
|
+
const v = r.options.map((_) => {
|
|
199
|
+
const E = _.label;
|
|
200
|
+
return (typeof E == "string" ? E : _.value).toLowerCase();
|
|
201
|
+
}), k = r.open && r.activeIndex >= 0 ? r.activeIndex + 1 : 0, m = Array.from(
|
|
202
|
+
{ length: v.length },
|
|
203
|
+
(_, E) => (k + E) % v.length
|
|
204
|
+
), I = m.find(
|
|
205
|
+
(_) => !r.options[_]?.disabled && v[_]?.startsWith(g.search)
|
|
206
|
+
), T = m.find(
|
|
207
|
+
(_) => !r.options[_]?.disabled && v[_]?.includes(g.search)
|
|
208
|
+
), x = I ?? T;
|
|
209
|
+
x !== void 0 && (r.open ? r.setActiveIndex(x) : r.commit(x));
|
|
210
|
+
}), y = S(
|
|
211
|
+
(b) => {
|
|
212
|
+
c || r.setOpen(!r.open);
|
|
213
|
+
}
|
|
214
|
+
), f = S(
|
|
215
|
+
(b) => {
|
|
216
|
+
if (!c) {
|
|
217
|
+
if (b.key.length === 1 && !b.metaKey && !b.ctrlKey && !b.altKey) {
|
|
218
|
+
b.preventDefault(), d(b.key);
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
if (!r.open) {
|
|
222
|
+
["ArrowDown", "ArrowUp", "Enter", " "].includes(b.key) && (b.preventDefault(), r.setOpen(!0), r.setActiveIndex(
|
|
223
|
+
r.activeIndex >= 0 ? r.activeIndex : Q(r.options, -1, 1)
|
|
224
|
+
));
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (b.key === "Escape" || b.key === "Tab") {
|
|
228
|
+
r.setOpen(!1), b.currentTarget.focus();
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
if (b.key === "Enter" || b.key === " ") {
|
|
232
|
+
b.preventDefault(), r.commit(r.activeIndex), b.currentTarget.focus();
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
if (b.key === "ArrowDown") {
|
|
236
|
+
b.preventDefault(), r.setActiveIndex(
|
|
237
|
+
Q(r.options, r.activeIndex, 1)
|
|
238
|
+
);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
if (b.key === "ArrowUp") {
|
|
242
|
+
b.preventDefault(), r.setActiveIndex(
|
|
243
|
+
Q(r.options, r.activeIndex, -1)
|
|
244
|
+
);
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
247
|
+
if (b.key === "Home" || b.key === "End") {
|
|
248
|
+
b.preventDefault();
|
|
249
|
+
const g = b.key === "Home" ? 1 : -1, v = b.key === "Home" ? -1 : r.options.length;
|
|
250
|
+
r.setActiveIndex(
|
|
251
|
+
Q(r.options, v, g, !1)
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
return /* @__PURE__ */ C(
|
|
258
|
+
"button",
|
|
259
|
+
{
|
|
260
|
+
...s,
|
|
261
|
+
ref: a,
|
|
262
|
+
id: r.triggerId,
|
|
263
|
+
type: "button",
|
|
264
|
+
role: "combobox",
|
|
265
|
+
"aria-expanded": r.open,
|
|
266
|
+
"aria-haspopup": "listbox",
|
|
267
|
+
"aria-controls": r.open ? r.contentId : void 0,
|
|
268
|
+
"aria-activedescendant": r.open && r.options[r.activeIndex] ? `${r.contentId}-option-${r.activeIndex}` : void 0,
|
|
269
|
+
"data-size": "md",
|
|
270
|
+
className: w("uk-select__trigger", e),
|
|
271
|
+
onPointerDown: ye(o, y),
|
|
272
|
+
onKeyDown: ye(i, f),
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ l("span", { className: "uk-select__value", children: p?.label ?? r.value ?? n }),
|
|
275
|
+
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "uk-select__chevron" })
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
);
|
|
279
|
+
});
|
|
280
|
+
function ht(t, e) {
|
|
281
|
+
const [n, o] = O(null), i = B(() => {
|
|
282
|
+
const s = e.current;
|
|
283
|
+
if (!t || !s)
|
|
284
|
+
return;
|
|
285
|
+
const a = t.getBoundingClientRect(), r = s.getBoundingClientRect(), p = window.innerHeight - a.bottom - 8, c = a.top - 8, u = p >= Math.min(r.height, 320) || p >= c ? "bottom" : "top", h = u === "bottom" ? a.bottom + 6 : a.top - r.height - 6, d = ut(
|
|
286
|
+
a.left,
|
|
287
|
+
8,
|
|
288
|
+
Math.max(8, window.innerWidth - a.width - 8)
|
|
289
|
+
);
|
|
290
|
+
o({ x: d, y: h, side: u });
|
|
291
|
+
}, [e, t]);
|
|
292
|
+
return ne(() => {
|
|
293
|
+
if (!t)
|
|
294
|
+
return;
|
|
295
|
+
i(), window.addEventListener("resize", i), window.addEventListener("scroll", i, !0);
|
|
296
|
+
const s = typeof ResizeObserver > "u" ? null : new ResizeObserver(i);
|
|
297
|
+
return s?.observe(t), s?.observe(e.current ?? t), () => {
|
|
298
|
+
window.removeEventListener("resize", i), window.removeEventListener("scroll", i, !0), s?.disconnect();
|
|
299
|
+
};
|
|
300
|
+
}, [e, t, i]), n;
|
|
301
|
+
}
|
|
302
|
+
function mt({
|
|
303
|
+
emptyText: t
|
|
304
|
+
}) {
|
|
305
|
+
const e = ue("Select.Content"), n = e.triggerId, o = document.getElementById(
|
|
306
|
+
n
|
|
307
|
+
), i = L(null), s = z() ?? !1, a = oe(), r = ht(o, i), p = te(
|
|
308
|
+
st,
|
|
309
|
+
ct,
|
|
310
|
+
lt
|
|
311
|
+
);
|
|
312
|
+
if ($(() => {
|
|
313
|
+
if (!e.open)
|
|
314
|
+
return;
|
|
315
|
+
const u = (y) => {
|
|
316
|
+
const f = y.target;
|
|
317
|
+
f instanceof Node && (o?.contains(f) || i.current?.contains(f) || (e.setOpen(!1), o?.focus()));
|
|
318
|
+
};
|
|
319
|
+
document.addEventListener("pointerdown", u, !0);
|
|
320
|
+
const h = (y) => {
|
|
321
|
+
y.key === "Escape" && (e.setOpen(!1), o?.focus());
|
|
322
|
+
}, d = () => {
|
|
323
|
+
e.setOpen(!1);
|
|
324
|
+
};
|
|
325
|
+
return document.addEventListener("keydown", h, !0), window.addEventListener("blur", d), () => {
|
|
326
|
+
document.removeEventListener("pointerdown", u, !0), document.removeEventListener("keydown", h, !0), window.removeEventListener("blur", d);
|
|
327
|
+
};
|
|
328
|
+
}, [e, o]), !p)
|
|
329
|
+
return null;
|
|
330
|
+
const c = o?.closest("dialog") ?? document.body;
|
|
331
|
+
return re(
|
|
332
|
+
/* @__PURE__ */ l(
|
|
333
|
+
"div",
|
|
334
|
+
{
|
|
335
|
+
ref: i,
|
|
336
|
+
className: "uk-select",
|
|
337
|
+
"data-side": r?.side ?? "bottom",
|
|
338
|
+
"data-state": a ? "open" : "closed",
|
|
339
|
+
"aria-hidden": a ? void 0 : !0,
|
|
340
|
+
style: {
|
|
341
|
+
left: r ? `${r.x}px` : 0,
|
|
342
|
+
top: r ? `${r.y}px` : 0,
|
|
343
|
+
"--uk-select-width": `${o?.offsetWidth ?? 220}px`,
|
|
344
|
+
visibility: r ? "visible" : "hidden"
|
|
345
|
+
},
|
|
346
|
+
children: /* @__PURE__ */ l(
|
|
347
|
+
D.div,
|
|
348
|
+
{
|
|
349
|
+
className: "uk-select__surface",
|
|
350
|
+
style: { transformOrigin: dt(r?.side ?? "bottom") },
|
|
351
|
+
initial: s ? { opacity: 0 } : { opacity: 0, scale: 0.97, y: -4 },
|
|
352
|
+
animate: s ? { opacity: 1 } : { opacity: 1, scale: 1, y: 0 },
|
|
353
|
+
exit: s ? { opacity: 0 } : { opacity: 0, scale: 0.97, y: -2 },
|
|
354
|
+
transition: s ? q : xe,
|
|
355
|
+
children: e.options.length === 0 ? /* @__PURE__ */ l("p", { className: "uk-select__empty", children: t }) : /* @__PURE__ */ l(Ie, { id: `select-${e.contentId}`, children: /* @__PURE__ */ l(
|
|
356
|
+
"ul",
|
|
357
|
+
{
|
|
358
|
+
id: e.contentId,
|
|
359
|
+
className: "uk-select__list",
|
|
360
|
+
role: "listbox",
|
|
361
|
+
"aria-labelledby": n,
|
|
362
|
+
children: e.options.map((u, h) => /* @__PURE__ */ C(
|
|
363
|
+
"li",
|
|
364
|
+
{
|
|
365
|
+
id: `${e.contentId}-option-${h}`,
|
|
366
|
+
role: "option",
|
|
367
|
+
"aria-disabled": u.disabled || void 0,
|
|
368
|
+
"aria-selected": u.value === e.value,
|
|
369
|
+
"data-disabled": u.disabled || void 0,
|
|
370
|
+
"data-selected": u.value === e.value || void 0,
|
|
371
|
+
"data-active": h === e.activeIndex || void 0,
|
|
372
|
+
className: "uk-select__option",
|
|
373
|
+
onPointerEnter: (d) => {
|
|
374
|
+
d.pointerType === "mouse" && !u.disabled && e.setActiveIndex(h);
|
|
375
|
+
},
|
|
376
|
+
onClick: (d) => {
|
|
377
|
+
d.stopPropagation(), e.commit(h);
|
|
378
|
+
},
|
|
379
|
+
children: [
|
|
380
|
+
/* @__PURE__ */ l(A, { initial: !1, children: h === e.activeIndex ? /* @__PURE__ */ l(
|
|
381
|
+
D.span,
|
|
382
|
+
{
|
|
383
|
+
className: "uk-select__option-highlight",
|
|
384
|
+
"data-slot": "select-active-highlight",
|
|
385
|
+
layoutId: `${e.contentId}-active`,
|
|
386
|
+
"aria-hidden": "true",
|
|
387
|
+
initial: { opacity: 0 },
|
|
388
|
+
animate: { opacity: 1 },
|
|
389
|
+
exit: { opacity: 0 },
|
|
390
|
+
transition: s ? { duration: 0 } : ie
|
|
391
|
+
}
|
|
392
|
+
) : null }),
|
|
393
|
+
/* @__PURE__ */ l("span", { className: "uk-select__option-label", children: u.label ?? u.value }),
|
|
394
|
+
/* @__PURE__ */ l("span", { "aria-hidden": "true", className: "uk-select__check" })
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
u.value
|
|
398
|
+
))
|
|
399
|
+
}
|
|
400
|
+
) })
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
c
|
|
406
|
+
);
|
|
407
|
+
}
|
|
408
|
+
const Ut = N(function({
|
|
409
|
+
options: e,
|
|
410
|
+
value: n,
|
|
411
|
+
defaultValue: o,
|
|
412
|
+
onValueChange: i,
|
|
413
|
+
placeholder: s,
|
|
414
|
+
size: a = "md",
|
|
415
|
+
disabled: r,
|
|
416
|
+
invalid: p,
|
|
417
|
+
emptyText: c = "暂无可选项",
|
|
418
|
+
className: u,
|
|
419
|
+
...h
|
|
420
|
+
}, d) {
|
|
421
|
+
return /* @__PURE__ */ C(
|
|
422
|
+
pt,
|
|
423
|
+
{
|
|
424
|
+
options: e,
|
|
425
|
+
value: n,
|
|
426
|
+
defaultValue: o,
|
|
427
|
+
onValueChange: i,
|
|
428
|
+
children: [
|
|
429
|
+
/* @__PURE__ */ l(
|
|
430
|
+
ft,
|
|
431
|
+
{
|
|
432
|
+
...h,
|
|
433
|
+
ref: d,
|
|
434
|
+
placeholder: s,
|
|
435
|
+
disabled: r,
|
|
436
|
+
"aria-invalid": p || void 0,
|
|
437
|
+
"data-size": a,
|
|
438
|
+
className: u
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
/* @__PURE__ */ l(bt, { emptyText: c })
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
);
|
|
445
|
+
});
|
|
446
|
+
function bt({ emptyText: t }) {
|
|
447
|
+
const e = ue("Select.Content");
|
|
448
|
+
return /* @__PURE__ */ l(A, { children: e.open ? /* @__PURE__ */ l(mt, { emptyText: t }, "select-layer") : null });
|
|
449
|
+
}
|
|
450
|
+
const jt = N(function({
|
|
451
|
+
inputSize: e = "md",
|
|
452
|
+
invalid: n = !1,
|
|
453
|
+
className: o,
|
|
454
|
+
"aria-invalid": i,
|
|
455
|
+
...s
|
|
456
|
+
}, a) {
|
|
457
|
+
return /* @__PURE__ */ l(
|
|
458
|
+
"input",
|
|
459
|
+
{
|
|
460
|
+
...s,
|
|
461
|
+
ref: a,
|
|
462
|
+
className: w("uk-input", o),
|
|
463
|
+
"data-size": e,
|
|
464
|
+
"aria-invalid": n ? !0 : i
|
|
465
|
+
}
|
|
466
|
+
);
|
|
467
|
+
}), Xt = N(function({
|
|
137
468
|
checked: e,
|
|
138
469
|
defaultChecked: n,
|
|
139
470
|
onCheckedChange: o,
|
|
140
|
-
disabled:
|
|
471
|
+
disabled: i,
|
|
141
472
|
className: s,
|
|
142
473
|
children: a,
|
|
143
|
-
id:
|
|
144
|
-
...
|
|
145
|
-
},
|
|
146
|
-
const
|
|
474
|
+
id: r,
|
|
475
|
+
...p
|
|
476
|
+
}, c) {
|
|
477
|
+
const u = R(), h = r ?? u, d = z() ?? !1, y = L(!1), f = L(null), [b, g] = V({
|
|
147
478
|
value: e,
|
|
148
479
|
defaultValue: n ?? !1,
|
|
149
480
|
onChange: o
|
|
150
|
-
}), v =
|
|
151
|
-
|
|
152
|
-
if (
|
|
481
|
+
}), v = ot(b ? 16 : 0);
|
|
482
|
+
$(() => {
|
|
483
|
+
if (f.current)
|
|
153
484
|
return;
|
|
154
|
-
const
|
|
485
|
+
const m = me(
|
|
155
486
|
v,
|
|
156
|
-
|
|
157
|
-
|
|
487
|
+
b ? 16 : 0,
|
|
488
|
+
d ? { duration: 0 } : be
|
|
158
489
|
);
|
|
159
|
-
return () =>
|
|
160
|
-
}, [
|
|
161
|
-
const
|
|
162
|
-
const I =
|
|
163
|
-
if (!(!I || I.pointerId !==
|
|
490
|
+
return () => m.stop();
|
|
491
|
+
}, [b, d, v]);
|
|
492
|
+
const k = (m) => {
|
|
493
|
+
const I = f.current;
|
|
494
|
+
if (!(!I || I.pointerId !== m.pointerId)) {
|
|
164
495
|
if (I.moved) {
|
|
165
|
-
const
|
|
166
|
-
|
|
496
|
+
const T = I.samples[0], x = I.samples[I.samples.length - 1], _ = T && x ? Math.max(x.time - T.time, 1) : 1, E = T && x ? (x.x - T.x) / _ * 1e3 : 0, P = Math.abs(E) > 220 ? E > 0 : v.get() >= 8;
|
|
497
|
+
y.current = !0, f.current = null, g(P), me(
|
|
167
498
|
v,
|
|
168
|
-
|
|
169
|
-
|
|
499
|
+
P ? 16 : 0,
|
|
500
|
+
d ? { duration: 0 } : { ...be, velocity: E }
|
|
170
501
|
), window.setTimeout(() => {
|
|
171
|
-
|
|
502
|
+
y.current = !1;
|
|
172
503
|
}, 0);
|
|
173
504
|
} else
|
|
174
|
-
|
|
175
|
-
|
|
505
|
+
f.current = null;
|
|
506
|
+
m.currentTarget.hasPointerCapture(m.pointerId) && typeof m.currentTarget.releasePointerCapture == "function" && m.currentTarget.releasePointerCapture(m.pointerId);
|
|
176
507
|
}
|
|
177
508
|
};
|
|
178
509
|
return /* @__PURE__ */ C(
|
|
179
510
|
"label",
|
|
180
511
|
{
|
|
181
|
-
className:
|
|
182
|
-
"data-disabled":
|
|
183
|
-
htmlFor:
|
|
184
|
-
onClickCapture: (
|
|
185
|
-
|
|
512
|
+
className: w("uk-switch", s),
|
|
513
|
+
"data-disabled": i ? "true" : void 0,
|
|
514
|
+
htmlFor: h,
|
|
515
|
+
onClickCapture: (m) => {
|
|
516
|
+
y.current && (m.preventDefault(), m.stopPropagation());
|
|
186
517
|
},
|
|
187
518
|
children: [
|
|
188
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ l(
|
|
189
520
|
"input",
|
|
190
521
|
{
|
|
191
|
-
...
|
|
192
|
-
ref:
|
|
193
|
-
id:
|
|
522
|
+
...p,
|
|
523
|
+
ref: c,
|
|
524
|
+
id: h,
|
|
194
525
|
type: "checkbox",
|
|
195
526
|
role: "switch",
|
|
196
527
|
className: "uk-switch__input",
|
|
197
|
-
checked:
|
|
198
|
-
disabled:
|
|
199
|
-
"aria-checked":
|
|
200
|
-
onChange: (
|
|
528
|
+
checked: b,
|
|
529
|
+
disabled: i,
|
|
530
|
+
"aria-checked": b,
|
|
531
|
+
onChange: (m) => g(m.target.checked)
|
|
201
532
|
}
|
|
202
533
|
),
|
|
203
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ l(
|
|
204
535
|
"span",
|
|
205
536
|
{
|
|
206
537
|
className: "uk-switch__track",
|
|
207
538
|
"aria-hidden": "true",
|
|
208
|
-
onPointerDown: (
|
|
209
|
-
|
|
210
|
-
pointerId:
|
|
211
|
-
startX:
|
|
539
|
+
onPointerDown: (m) => {
|
|
540
|
+
i || (f.current = {
|
|
541
|
+
pointerId: m.pointerId,
|
|
542
|
+
startX: m.clientX,
|
|
212
543
|
startValue: v.get(),
|
|
213
544
|
moved: !1,
|
|
214
|
-
samples: [{ x:
|
|
215
|
-
}, typeof
|
|
545
|
+
samples: [{ x: m.clientX, time: performance.now() }]
|
|
546
|
+
}, typeof m.currentTarget.setPointerCapture == "function" && m.currentTarget.setPointerCapture(m.pointerId));
|
|
216
547
|
},
|
|
217
|
-
onPointerMove: (
|
|
218
|
-
const I =
|
|
219
|
-
if (!I || I.pointerId !==
|
|
548
|
+
onPointerMove: (m) => {
|
|
549
|
+
const I = f.current;
|
|
550
|
+
if (!I || I.pointerId !== m.pointerId)
|
|
220
551
|
return;
|
|
221
|
-
const
|
|
222
|
-
Math.abs(
|
|
223
|
-
(
|
|
552
|
+
const T = m.clientX - I.startX;
|
|
553
|
+
Math.abs(T) > 4 && (I.moved = !0), I.moved && (m.preventDefault(), v.set(Math.max(0, Math.min(16, I.startValue + T))), I.samples.push({ x: m.clientX, time: performance.now() }), I.samples = I.samples.filter(
|
|
554
|
+
(x) => performance.now() - x.time < 120
|
|
224
555
|
));
|
|
225
556
|
},
|
|
226
|
-
onPointerUp:
|
|
227
|
-
onPointerCancel:
|
|
228
|
-
children: /* @__PURE__ */
|
|
557
|
+
onPointerUp: k,
|
|
558
|
+
onPointerCancel: k,
|
|
559
|
+
children: /* @__PURE__ */ l(D.span, { className: "uk-switch__thumb", style: { x: v } })
|
|
229
560
|
}
|
|
230
561
|
),
|
|
231
|
-
a ? /* @__PURE__ */
|
|
562
|
+
a ? /* @__PURE__ */ l("span", { className: "uk-switch__label", children: a }) : null
|
|
232
563
|
]
|
|
233
564
|
}
|
|
234
565
|
);
|
|
235
|
-
}),
|
|
236
|
-
function
|
|
237
|
-
const e =
|
|
566
|
+
}), Ce = U(null);
|
|
567
|
+
function Ne(t) {
|
|
568
|
+
const e = j(Ce);
|
|
238
569
|
if (!e)
|
|
239
570
|
throw new Error(`<${t}> must be rendered inside <Sidebar>`);
|
|
240
571
|
return e;
|
|
241
572
|
}
|
|
242
|
-
function
|
|
573
|
+
function se(t, e) {
|
|
243
574
|
return (n) => {
|
|
244
575
|
t?.(n), n.defaultPrevented || e(n);
|
|
245
576
|
};
|
|
246
577
|
}
|
|
247
|
-
function
|
|
578
|
+
function gt({
|
|
248
579
|
children: t,
|
|
249
580
|
className: e,
|
|
250
581
|
hoverPreview: n = !0,
|
|
251
582
|
hoverIndicator: o = "rail",
|
|
252
|
-
groupGap:
|
|
583
|
+
groupGap: i,
|
|
253
584
|
style: s,
|
|
254
585
|
...a
|
|
255
586
|
}) {
|
|
256
|
-
const [
|
|
587
|
+
const [r, p] = O(null), c = R().replace(/:/g, ""), u = G(
|
|
257
588
|
() => ({
|
|
258
|
-
hoveredId:
|
|
259
|
-
setHoveredId:
|
|
260
|
-
indicatorBaseId:
|
|
589
|
+
hoveredId: r,
|
|
590
|
+
setHoveredId: p,
|
|
591
|
+
indicatorBaseId: c,
|
|
261
592
|
hoverPreview: n,
|
|
262
593
|
hoverIndicator: o
|
|
263
594
|
}),
|
|
264
|
-
[
|
|
265
|
-
),
|
|
595
|
+
[r, c, n, o]
|
|
596
|
+
), h = typeof i == "number" ? `${i}px` : i, d = {
|
|
266
597
|
...s,
|
|
267
|
-
...
|
|
598
|
+
...h === void 0 ? {} : { "--uk-sidebar-group-gap": h }
|
|
268
599
|
};
|
|
269
|
-
return /* @__PURE__ */
|
|
600
|
+
return /* @__PURE__ */ l(Ce.Provider, { value: u, children: /* @__PURE__ */ l(Ie, { id: `sidebar-${c}`, children: /* @__PURE__ */ l(
|
|
270
601
|
"nav",
|
|
271
602
|
{
|
|
272
603
|
...a,
|
|
273
|
-
className:
|
|
274
|
-
style:
|
|
604
|
+
className: w("uk-sidebar", e),
|
|
605
|
+
style: d,
|
|
275
606
|
children: t
|
|
276
607
|
}
|
|
277
608
|
) }) });
|
|
278
609
|
}
|
|
279
|
-
function
|
|
610
|
+
function yt({
|
|
280
611
|
title: t,
|
|
281
612
|
icon: e,
|
|
282
613
|
collapsible: n = !1,
|
|
283
614
|
open: o,
|
|
284
|
-
defaultOpen:
|
|
615
|
+
defaultOpen: i = !0,
|
|
285
616
|
onOpenChange: s,
|
|
286
617
|
children: a,
|
|
287
|
-
className:
|
|
288
|
-
...
|
|
618
|
+
className: r,
|
|
619
|
+
...p
|
|
289
620
|
}) {
|
|
290
|
-
const
|
|
621
|
+
const c = R(), u = R(), h = R(), d = L(null), y = L(null), f = Ne("Sidebar.Group"), b = e != null, g = z() ?? !1, [v, k] = V({
|
|
291
622
|
value: o,
|
|
292
|
-
defaultValue:
|
|
623
|
+
defaultValue: i,
|
|
293
624
|
onChange: s
|
|
294
|
-
}),
|
|
295
|
-
|
|
296
|
-
!n ||
|
|
297
|
-
}, [n,
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
/* @__PURE__ */
|
|
301
|
-
n ? /* @__PURE__ */
|
|
625
|
+
}), m = n ? v : !0, I = f.hoveredId === h;
|
|
626
|
+
$(() => {
|
|
627
|
+
!n || m || y.current?.contains(document.activeElement) && d.current?.focus();
|
|
628
|
+
}, [n, m]);
|
|
629
|
+
const T = /* @__PURE__ */ C(ke, { children: [
|
|
630
|
+
b ? /* @__PURE__ */ l("span", { className: "uk-sidebar__group-icon", "aria-hidden": "true", children: e }) : null,
|
|
631
|
+
/* @__PURE__ */ l("span", { className: "uk-sidebar__group-label", children: t }),
|
|
632
|
+
n ? /* @__PURE__ */ l("span", { className: "uk-sidebar__chevron", "aria-hidden": "true", children: /* @__PURE__ */ l("svg", { viewBox: "0 0 16 16", width: "12", height: "12", fill: "none", children: /* @__PURE__ */ l(
|
|
302
633
|
"path",
|
|
303
634
|
{
|
|
304
635
|
d: "m6 3.8 4.2 4.2L6 12.2",
|
|
@@ -312,86 +643,86 @@ function rt({
|
|
|
312
643
|
return /* @__PURE__ */ C(
|
|
313
644
|
"section",
|
|
314
645
|
{
|
|
315
|
-
...
|
|
316
|
-
className:
|
|
317
|
-
"aria-labelledby":
|
|
646
|
+
...p,
|
|
647
|
+
className: w("uk-sidebar__group", r),
|
|
648
|
+
"aria-labelledby": p["aria-labelledby"] ?? c,
|
|
318
649
|
"data-collapsible": n ? "true" : "false",
|
|
319
|
-
"data-has-icon":
|
|
320
|
-
"data-state":
|
|
650
|
+
"data-has-icon": b ? "true" : "false",
|
|
651
|
+
"data-state": m ? "open" : "closed",
|
|
321
652
|
children: [
|
|
322
653
|
n ? /* @__PURE__ */ C(
|
|
323
654
|
"button",
|
|
324
655
|
{
|
|
325
|
-
ref:
|
|
656
|
+
ref: d,
|
|
326
657
|
type: "button",
|
|
327
658
|
className: "uk-sidebar__group-title uk-sidebar__group-trigger",
|
|
328
|
-
id:
|
|
329
|
-
"aria-controls":
|
|
330
|
-
"aria-expanded":
|
|
331
|
-
"data-preview":
|
|
332
|
-
onClick: () =>
|
|
333
|
-
onPointerEnter: (
|
|
334
|
-
|
|
659
|
+
id: c,
|
|
660
|
+
"aria-controls": u,
|
|
661
|
+
"aria-expanded": m,
|
|
662
|
+
"data-preview": f.hoverIndicator === "background" && I ? "true" : void 0,
|
|
663
|
+
onClick: () => k((x) => !x),
|
|
664
|
+
onPointerEnter: (x) => {
|
|
665
|
+
f.hoverPreview && f.hoverIndicator === "background" && x.pointerType === "mouse" && f.setHoveredId(h);
|
|
335
666
|
},
|
|
336
667
|
onPointerLeave: () => {
|
|
337
|
-
|
|
668
|
+
f.hoveredId === h && f.setHoveredId(null);
|
|
338
669
|
},
|
|
339
670
|
onPointerCancel: () => {
|
|
340
|
-
|
|
671
|
+
f.hoveredId === h && f.setHoveredId(null);
|
|
341
672
|
},
|
|
342
673
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
|
|
674
|
+
/* @__PURE__ */ l(A, { initial: !1, children: f.hoverPreview && f.hoverIndicator === "background" && I ? /* @__PURE__ */ l(
|
|
675
|
+
D.span,
|
|
345
676
|
{
|
|
346
677
|
className: "uk-sidebar__group-surface",
|
|
347
678
|
"data-kind": "hover",
|
|
348
679
|
"data-slot": "sidebar-hover-highlight",
|
|
349
|
-
layoutId: `${
|
|
680
|
+
layoutId: `${f.indicatorBaseId}-hover`,
|
|
350
681
|
"aria-hidden": "true",
|
|
351
682
|
initial: { opacity: 0 },
|
|
352
683
|
animate: { opacity: 1 },
|
|
353
684
|
exit: { opacity: 0 },
|
|
354
|
-
transition:
|
|
685
|
+
transition: g ? { duration: 0 } : ie
|
|
355
686
|
}
|
|
356
687
|
) : null }),
|
|
357
|
-
|
|
688
|
+
T
|
|
358
689
|
]
|
|
359
690
|
}
|
|
360
|
-
) : /* @__PURE__ */
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
|
|
691
|
+
) : /* @__PURE__ */ l("div", { className: "uk-sidebar__group-title", id: c, children: T }),
|
|
692
|
+
/* @__PURE__ */ l(
|
|
693
|
+
D.div,
|
|
363
694
|
{
|
|
364
|
-
ref:
|
|
695
|
+
ref: y,
|
|
365
696
|
className: "uk-sidebar__content",
|
|
366
|
-
id:
|
|
367
|
-
"data-state":
|
|
697
|
+
id: u,
|
|
698
|
+
"data-state": m ? "open" : "closed",
|
|
368
699
|
initial: !1,
|
|
369
700
|
animate: {
|
|
370
|
-
height:
|
|
371
|
-
opacity:
|
|
701
|
+
height: m ? "auto" : 0,
|
|
702
|
+
opacity: m ? 1 : 0
|
|
372
703
|
},
|
|
373
|
-
transition:
|
|
374
|
-
inert: n && !
|
|
375
|
-
"aria-hidden": n && !
|
|
376
|
-
children: /* @__PURE__ */
|
|
704
|
+
transition: g ? { duration: 0 } : xe,
|
|
705
|
+
inert: n && !m,
|
|
706
|
+
"aria-hidden": n && !m ? !0 : void 0,
|
|
707
|
+
children: /* @__PURE__ */ l("ul", { className: "uk-sidebar__list", children: a })
|
|
377
708
|
}
|
|
378
709
|
)
|
|
379
710
|
]
|
|
380
711
|
}
|
|
381
712
|
);
|
|
382
713
|
}
|
|
383
|
-
function
|
|
714
|
+
function vt({
|
|
384
715
|
active: t = !1,
|
|
385
716
|
children: e,
|
|
386
717
|
className: n
|
|
387
718
|
}) {
|
|
388
|
-
const o =
|
|
389
|
-
if (!
|
|
719
|
+
const o = Ne("Sidebar.Item"), i = R(), a = z() ?? !1 ? { duration: 0 } : ie;
|
|
720
|
+
if (!W(e))
|
|
390
721
|
throw new Error("<Sidebar.Item> expects a single valid React element");
|
|
391
|
-
const
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
|
|
722
|
+
const r = e, p = r.props, c = p.className, u = typeof c == "function" ? (g) => w("uk-sidebar__link", c(g), n) : w("uk-sidebar__link", c, n), h = p.onPointerEnter, d = p.onPointerLeave, y = p.onPointerCancel, f = o.hoveredId === i, b = /* @__PURE__ */ C(ke, { children: [
|
|
723
|
+
/* @__PURE__ */ l("span", { className: "uk-sidebar__rail", "aria-hidden": "true" }),
|
|
724
|
+
/* @__PURE__ */ l(A, { initial: !1, children: o.hoverPreview && o.hoverIndicator === "rail" && f ? /* @__PURE__ */ l(
|
|
725
|
+
D.span,
|
|
395
726
|
{
|
|
396
727
|
className: "uk-sidebar__rail-indicator",
|
|
397
728
|
"data-kind": "hover",
|
|
@@ -404,8 +735,8 @@ function it({
|
|
|
404
735
|
transition: a
|
|
405
736
|
}
|
|
406
737
|
) : null }),
|
|
407
|
-
/* @__PURE__ */
|
|
408
|
-
|
|
738
|
+
/* @__PURE__ */ l(A, { initial: !1, children: o.hoverIndicator === "rail" && t ? /* @__PURE__ */ l(
|
|
739
|
+
D.span,
|
|
409
740
|
{
|
|
410
741
|
className: "uk-sidebar__rail-indicator",
|
|
411
742
|
"data-kind": "active",
|
|
@@ -418,8 +749,8 @@ function it({
|
|
|
418
749
|
transition: a
|
|
419
750
|
}
|
|
420
751
|
) : null }),
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
|
|
752
|
+
/* @__PURE__ */ l(A, { initial: !1, children: o.hoverPreview && o.hoverIndicator === "background" && f ? /* @__PURE__ */ l(
|
|
753
|
+
D.span,
|
|
423
754
|
{
|
|
424
755
|
className: "uk-sidebar__surface",
|
|
425
756
|
"data-kind": "hover",
|
|
@@ -432,8 +763,8 @@ function it({
|
|
|
432
763
|
transition: a
|
|
433
764
|
}
|
|
434
765
|
) : null }),
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
|
|
766
|
+
/* @__PURE__ */ l(A, { initial: !1, children: o.hoverIndicator === "background" && t ? /* @__PURE__ */ l(
|
|
767
|
+
D.span,
|
|
437
768
|
{
|
|
438
769
|
className: "uk-sidebar__surface",
|
|
439
770
|
"data-kind": "active",
|
|
@@ -446,361 +777,361 @@ function it({
|
|
|
446
777
|
transition: a
|
|
447
778
|
}
|
|
448
779
|
) : null }),
|
|
449
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ l("span", { className: "uk-sidebar__label", children: p.children })
|
|
450
781
|
] });
|
|
451
|
-
return /* @__PURE__ */
|
|
452
|
-
|
|
782
|
+
return /* @__PURE__ */ l("li", { className: "uk-sidebar__item", children: Y(
|
|
783
|
+
r,
|
|
453
784
|
{
|
|
454
|
-
className:
|
|
785
|
+
className: u,
|
|
455
786
|
"data-active": t ? "true" : "false",
|
|
456
|
-
"data-preview": t ||
|
|
457
|
-
"aria-current":
|
|
458
|
-
onPointerEnter:
|
|
459
|
-
|
|
460
|
-
(
|
|
461
|
-
o.hoverPreview &&
|
|
787
|
+
"data-preview": t || f ? "true" : "false",
|
|
788
|
+
"aria-current": p["aria-current"] ?? (t ? "page" : void 0),
|
|
789
|
+
onPointerEnter: se(
|
|
790
|
+
h,
|
|
791
|
+
(g) => {
|
|
792
|
+
o.hoverPreview && g.pointerType === "mouse" && o.setHoveredId(i);
|
|
462
793
|
}
|
|
463
794
|
),
|
|
464
|
-
onPointerLeave:
|
|
465
|
-
o.hoveredId ===
|
|
795
|
+
onPointerLeave: se(d, () => {
|
|
796
|
+
o.hoveredId === i && o.setHoveredId(null);
|
|
466
797
|
}),
|
|
467
|
-
onPointerCancel:
|
|
468
|
-
o.hoveredId ===
|
|
798
|
+
onPointerCancel: se(y, () => {
|
|
799
|
+
o.hoveredId === i && o.setHoveredId(null);
|
|
469
800
|
})
|
|
470
801
|
},
|
|
471
|
-
|
|
802
|
+
b
|
|
472
803
|
) });
|
|
473
804
|
}
|
|
474
|
-
const
|
|
475
|
-
Group:
|
|
476
|
-
Item:
|
|
477
|
-
}),
|
|
478
|
-
function
|
|
479
|
-
const e =
|
|
805
|
+
const Wt = Object.assign(gt, {
|
|
806
|
+
Group: yt,
|
|
807
|
+
Item: vt
|
|
808
|
+
}), Ee = U(null);
|
|
809
|
+
function de(t) {
|
|
810
|
+
const e = j(Ee);
|
|
480
811
|
if (!e)
|
|
481
812
|
throw new Error(`<${t}> must be rendered inside <Tabs>`);
|
|
482
813
|
return e;
|
|
483
814
|
}
|
|
484
|
-
function
|
|
815
|
+
function Pe(t, e) {
|
|
485
816
|
return `${t}-tab-${encodeURIComponent(e)}`;
|
|
486
817
|
}
|
|
487
|
-
function
|
|
818
|
+
function De(t, e) {
|
|
488
819
|
return `${t}-panel-${encodeURIComponent(e)}`;
|
|
489
820
|
}
|
|
490
|
-
function
|
|
821
|
+
function kt({
|
|
491
822
|
value: t,
|
|
492
823
|
defaultValue: e,
|
|
493
824
|
onValueChange: n,
|
|
494
825
|
orientation: o = "horizontal",
|
|
495
|
-
className:
|
|
826
|
+
className: i,
|
|
496
827
|
children: s
|
|
497
828
|
}) {
|
|
498
|
-
const a =
|
|
829
|
+
const a = R(), [r, p] = V({
|
|
499
830
|
value: t,
|
|
500
831
|
defaultValue: e ?? "",
|
|
501
832
|
onChange: n
|
|
502
|
-
}),
|
|
833
|
+
}), c = G(
|
|
503
834
|
() => ({
|
|
504
835
|
baseId: a,
|
|
505
|
-
value:
|
|
506
|
-
setValue:
|
|
836
|
+
value: r,
|
|
837
|
+
setValue: p,
|
|
507
838
|
orientation: o,
|
|
508
839
|
indicatorId: `${a}-indicator`
|
|
509
840
|
}),
|
|
510
|
-
[a,
|
|
841
|
+
[a, r, o, p]
|
|
511
842
|
);
|
|
512
|
-
return /* @__PURE__ */
|
|
843
|
+
return /* @__PURE__ */ l(Ee.Provider, { value: c, children: /* @__PURE__ */ l("div", { className: w("uk-tabs", i), "data-orientation": o, children: s }) });
|
|
513
844
|
}
|
|
514
|
-
const
|
|
515
|
-
const { orientation: s } =
|
|
516
|
-
return /* @__PURE__ */
|
|
845
|
+
const It = N(function({ className: e, onKeyDown: n, ...o }, i) {
|
|
846
|
+
const { orientation: s } = de("Tabs.List");
|
|
847
|
+
return /* @__PURE__ */ l(
|
|
517
848
|
"div",
|
|
518
849
|
{
|
|
519
850
|
...o,
|
|
520
|
-
ref:
|
|
851
|
+
ref: i,
|
|
521
852
|
role: "tablist",
|
|
522
853
|
"aria-orientation": s,
|
|
523
854
|
tabIndex: -1,
|
|
524
|
-
className:
|
|
855
|
+
className: w("uk-tabs__list", e),
|
|
525
856
|
onKeyDown: (a) => {
|
|
526
857
|
if (n?.(a), a.defaultPrevented)
|
|
527
858
|
return;
|
|
528
|
-
const
|
|
529
|
-
if (!
|
|
859
|
+
const p = a.target?.closest('[role="tab"]');
|
|
860
|
+
if (!p || p.hasAttribute("disabled"))
|
|
530
861
|
return;
|
|
531
|
-
const
|
|
862
|
+
const c = Array.from(
|
|
532
863
|
a.currentTarget.querySelectorAll(
|
|
533
864
|
'[role="tab"]:not([disabled])'
|
|
534
865
|
)
|
|
535
|
-
),
|
|
536
|
-
if (
|
|
866
|
+
), u = c.indexOf(p);
|
|
867
|
+
if (u === -1)
|
|
537
868
|
return;
|
|
538
|
-
const
|
|
539
|
-
let
|
|
869
|
+
const h = s === "horizontal" ? "ArrowRight" : "ArrowDown", d = s === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
870
|
+
let y = -1;
|
|
540
871
|
switch (a.key) {
|
|
541
|
-
case
|
|
542
|
-
|
|
872
|
+
case h:
|
|
873
|
+
y = (u + 1) % c.length;
|
|
543
874
|
break;
|
|
544
|
-
case
|
|
545
|
-
|
|
875
|
+
case d:
|
|
876
|
+
y = (u - 1 + c.length) % c.length;
|
|
546
877
|
break;
|
|
547
878
|
case "Home":
|
|
548
|
-
|
|
879
|
+
y = 0;
|
|
549
880
|
break;
|
|
550
881
|
case "End":
|
|
551
|
-
|
|
882
|
+
y = c.length - 1;
|
|
552
883
|
break;
|
|
553
884
|
default:
|
|
554
885
|
return;
|
|
555
886
|
}
|
|
556
887
|
a.preventDefault();
|
|
557
|
-
const
|
|
558
|
-
|
|
888
|
+
const f = c[y];
|
|
889
|
+
f && (f.focus(), f.click());
|
|
559
890
|
}
|
|
560
891
|
}
|
|
561
892
|
);
|
|
562
|
-
}),
|
|
563
|
-
const
|
|
893
|
+
}), wt = N(function({ value: e, type: n = "button", className: o, onClick: i, children: s, ...a }, r) {
|
|
894
|
+
const p = de("Tabs.Trigger"), c = p.value === e, u = z() ?? !1;
|
|
564
895
|
return /* @__PURE__ */ C(
|
|
565
896
|
"button",
|
|
566
897
|
{
|
|
567
898
|
...a,
|
|
568
|
-
ref:
|
|
899
|
+
ref: r,
|
|
569
900
|
type: n,
|
|
570
901
|
role: "tab",
|
|
571
|
-
id:
|
|
572
|
-
"aria-selected":
|
|
573
|
-
"aria-controls":
|
|
574
|
-
tabIndex:
|
|
575
|
-
"data-state":
|
|
576
|
-
className:
|
|
577
|
-
onClick: (
|
|
578
|
-
|
|
902
|
+
id: Pe(p.baseId, e),
|
|
903
|
+
"aria-selected": c,
|
|
904
|
+
"aria-controls": De(p.baseId, e),
|
|
905
|
+
tabIndex: c ? 0 : -1,
|
|
906
|
+
"data-state": c ? "active" : "inactive",
|
|
907
|
+
className: w("uk-tabs__trigger", o),
|
|
908
|
+
onClick: (h) => {
|
|
909
|
+
i?.(h), h.defaultPrevented || p.setValue(e);
|
|
579
910
|
},
|
|
580
911
|
children: [
|
|
581
912
|
s,
|
|
582
|
-
|
|
583
|
-
|
|
913
|
+
c ? /* @__PURE__ */ l(
|
|
914
|
+
D.span,
|
|
584
915
|
{
|
|
585
916
|
className: "uk-tabs__indicator",
|
|
586
|
-
layoutId:
|
|
917
|
+
layoutId: p.indicatorId,
|
|
587
918
|
"aria-hidden": "true",
|
|
588
|
-
transition:
|
|
919
|
+
transition: u ? { duration: 0 } : ie
|
|
589
920
|
}
|
|
590
921
|
) : null
|
|
591
922
|
]
|
|
592
923
|
}
|
|
593
924
|
);
|
|
594
|
-
}),
|
|
595
|
-
const s =
|
|
596
|
-
return /* @__PURE__ */
|
|
925
|
+
}), xt = N(function({ value: e, className: n, ...o }, i) {
|
|
926
|
+
const s = de("Tabs.Content"), a = s.value === e;
|
|
927
|
+
return /* @__PURE__ */ l(
|
|
597
928
|
"div",
|
|
598
929
|
{
|
|
599
930
|
...o,
|
|
600
|
-
ref:
|
|
931
|
+
ref: i,
|
|
601
932
|
role: "tabpanel",
|
|
602
|
-
id:
|
|
603
|
-
"aria-labelledby":
|
|
933
|
+
id: De(s.baseId, e),
|
|
934
|
+
"aria-labelledby": Pe(s.baseId, e),
|
|
604
935
|
hidden: !a,
|
|
605
936
|
tabIndex: 0,
|
|
606
937
|
"data-state": a ? "active" : "inactive",
|
|
607
|
-
className:
|
|
938
|
+
className: w("uk-tabs__panel", n)
|
|
608
939
|
}
|
|
609
940
|
);
|
|
610
|
-
}),
|
|
611
|
-
List:
|
|
612
|
-
Trigger:
|
|
613
|
-
Content:
|
|
614
|
-
}),
|
|
615
|
-
},
|
|
941
|
+
}), Yt = Object.assign(kt, {
|
|
942
|
+
List: It,
|
|
943
|
+
Trigger: wt,
|
|
944
|
+
Content: xt
|
|
945
|
+
}), Le = U(null), Tt = () => () => {
|
|
946
|
+
}, _t = () => !0, Ct = () => !1;
|
|
616
947
|
function J(t) {
|
|
617
|
-
const e =
|
|
948
|
+
const e = j(Le);
|
|
618
949
|
if (!e)
|
|
619
950
|
throw new Error(`<${t}> must be rendered inside <Dialog.Root>`);
|
|
620
951
|
return e;
|
|
621
952
|
}
|
|
622
|
-
function
|
|
953
|
+
function Se(t, e) {
|
|
623
954
|
return (n) => {
|
|
624
955
|
t?.(n), n.defaultPrevented || e(n);
|
|
625
956
|
};
|
|
626
957
|
}
|
|
627
|
-
function
|
|
958
|
+
function Re({
|
|
628
959
|
children: t,
|
|
629
960
|
open: e,
|
|
630
961
|
defaultOpen: n,
|
|
631
962
|
onOpenChange: o
|
|
632
963
|
}) {
|
|
633
|
-
const
|
|
964
|
+
const i = R(), [s, a] = O(!1), [r, p] = O(!1), [c, u] = V({
|
|
634
965
|
value: e,
|
|
635
966
|
defaultValue: n ?? !1,
|
|
636
967
|
onChange: o
|
|
637
|
-
}),
|
|
968
|
+
}), h = G(
|
|
638
969
|
() => ({
|
|
639
|
-
open:
|
|
640
|
-
setOpen:
|
|
641
|
-
triggerId: `${
|
|
642
|
-
contentId: `${
|
|
643
|
-
titleId: `${
|
|
644
|
-
descriptionId: `${
|
|
970
|
+
open: c,
|
|
971
|
+
setOpen: u,
|
|
972
|
+
triggerId: `${i}-trigger`,
|
|
973
|
+
contentId: `${i}-content`,
|
|
974
|
+
titleId: `${i}-title`,
|
|
975
|
+
descriptionId: `${i}-description`,
|
|
645
976
|
hasTitle: s,
|
|
646
977
|
setHasTitle: a,
|
|
647
|
-
hasDescription:
|
|
648
|
-
setHasDescription:
|
|
978
|
+
hasDescription: r,
|
|
979
|
+
setHasDescription: p
|
|
649
980
|
}),
|
|
650
|
-
[
|
|
981
|
+
[i, c, r, s, u]
|
|
651
982
|
);
|
|
652
|
-
return /* @__PURE__ */
|
|
983
|
+
return /* @__PURE__ */ l(Le.Provider, { value: h, children: t });
|
|
653
984
|
}
|
|
654
|
-
function
|
|
985
|
+
function Nt({ children: t }) {
|
|
655
986
|
const e = J("Dialog.Trigger"), n = t, o = n.props.onClick;
|
|
656
|
-
return
|
|
987
|
+
return Y(n, {
|
|
657
988
|
id: e.triggerId,
|
|
658
989
|
"aria-haspopup": "dialog",
|
|
659
990
|
"aria-expanded": e.open,
|
|
660
991
|
"aria-controls": e.open ? e.contentId : void 0,
|
|
661
|
-
onClick:
|
|
992
|
+
onClick: Se(o, () => {
|
|
662
993
|
e.setOpen(!e.open);
|
|
663
994
|
})
|
|
664
995
|
});
|
|
665
996
|
}
|
|
666
|
-
function
|
|
997
|
+
function Oe({
|
|
667
998
|
children: t,
|
|
668
999
|
label: e = "Close"
|
|
669
1000
|
}) {
|
|
670
1001
|
const n = J("Dialog.Close");
|
|
671
|
-
if (
|
|
672
|
-
const o = t,
|
|
673
|
-
return
|
|
674
|
-
onClick:
|
|
1002
|
+
if (W(t)) {
|
|
1003
|
+
const o = t, i = o.props.onClick;
|
|
1004
|
+
return Y(o, {
|
|
1005
|
+
onClick: Se(i, () => {
|
|
675
1006
|
n.setOpen(!1);
|
|
676
1007
|
})
|
|
677
1008
|
});
|
|
678
1009
|
}
|
|
679
|
-
return /* @__PURE__ */
|
|
1010
|
+
return /* @__PURE__ */ l(we, { variant: "ghost", onClick: () => n.setOpen(!1), children: e });
|
|
680
1011
|
}
|
|
681
|
-
const
|
|
682
|
-
return /* @__PURE__ */
|
|
1012
|
+
const $e = N(function({ className: e, ...n }, o) {
|
|
1013
|
+
return /* @__PURE__ */ l(
|
|
683
1014
|
"header",
|
|
684
1015
|
{
|
|
685
1016
|
...n,
|
|
686
1017
|
ref: o,
|
|
687
|
-
className:
|
|
1018
|
+
className: w("uk-dialog__header", e)
|
|
688
1019
|
}
|
|
689
1020
|
);
|
|
690
|
-
}),
|
|
1021
|
+
}), Me = N(function({ className: e, children: n, ...o }, i) {
|
|
691
1022
|
const s = J("Dialog.Title"), a = s.setHasTitle;
|
|
692
|
-
return
|
|
1023
|
+
return $(() => (a(!0), () => a(!1)), [a]), /* @__PURE__ */ l(
|
|
693
1024
|
"h2",
|
|
694
1025
|
{
|
|
695
1026
|
...o,
|
|
696
|
-
ref:
|
|
1027
|
+
ref: i,
|
|
697
1028
|
id: s.titleId,
|
|
698
|
-
className:
|
|
1029
|
+
className: w("uk-dialog__title", e),
|
|
699
1030
|
children: n
|
|
700
1031
|
}
|
|
701
1032
|
);
|
|
702
|
-
}),
|
|
1033
|
+
}), Ae = N(
|
|
703
1034
|
function({ className: e, ...n }, o) {
|
|
704
|
-
const
|
|
705
|
-
return
|
|
1035
|
+
const i = J("Dialog.Description"), s = i.setHasDescription;
|
|
1036
|
+
return $(() => (s(!0), () => s(!1)), [s]), /* @__PURE__ */ l(
|
|
706
1037
|
"p",
|
|
707
1038
|
{
|
|
708
1039
|
...n,
|
|
709
1040
|
ref: o,
|
|
710
|
-
id:
|
|
711
|
-
className:
|
|
1041
|
+
id: i.descriptionId,
|
|
1042
|
+
className: w("uk-dialog__description", e)
|
|
712
1043
|
}
|
|
713
1044
|
);
|
|
714
1045
|
}
|
|
715
|
-
),
|
|
716
|
-
return /* @__PURE__ */
|
|
717
|
-
}),
|
|
718
|
-
return /* @__PURE__ */
|
|
1046
|
+
), Be = N(function({ className: e, ...n }, o) {
|
|
1047
|
+
return /* @__PURE__ */ l("div", { ...n, ref: o, className: w("uk-dialog__body", e) });
|
|
1048
|
+
}), He = N(function({ className: e, ...n }, o) {
|
|
1049
|
+
return /* @__PURE__ */ l(
|
|
719
1050
|
"footer",
|
|
720
1051
|
{
|
|
721
1052
|
...n,
|
|
722
1053
|
ref: o,
|
|
723
|
-
className:
|
|
1054
|
+
className: w("uk-dialog__footer", e)
|
|
724
1055
|
}
|
|
725
1056
|
);
|
|
726
1057
|
});
|
|
727
|
-
function
|
|
1058
|
+
function Et({
|
|
728
1059
|
requestClose: t,
|
|
729
1060
|
contentId: e,
|
|
730
1061
|
titleId: n,
|
|
731
1062
|
descriptionId: o,
|
|
732
|
-
hasTitle:
|
|
1063
|
+
hasTitle: i,
|
|
733
1064
|
hasDescription: s,
|
|
734
1065
|
children: a,
|
|
735
|
-
closeOnBackdropClick:
|
|
736
|
-
closeOnEscape:
|
|
737
|
-
initialFocusRef:
|
|
738
|
-
returnFocusRef:
|
|
739
|
-
className:
|
|
740
|
-
"aria-label":
|
|
741
|
-
"aria-labelledby":
|
|
742
|
-
"aria-describedby":
|
|
1066
|
+
closeOnBackdropClick: r = !0,
|
|
1067
|
+
closeOnEscape: p = !0,
|
|
1068
|
+
initialFocusRef: c,
|
|
1069
|
+
returnFocusRef: u,
|
|
1070
|
+
className: h,
|
|
1071
|
+
"aria-label": d,
|
|
1072
|
+
"aria-labelledby": y,
|
|
1073
|
+
"aria-describedby": f
|
|
743
1074
|
}) {
|
|
744
|
-
const
|
|
745
|
-
return
|
|
746
|
-
const
|
|
747
|
-
|
|
748
|
-
}, []),
|
|
1075
|
+
const b = L(null), g = L(null), v = oe(), k = z() ?? !1;
|
|
1076
|
+
return tt(!0), ne(() => {
|
|
1077
|
+
const m = b.current;
|
|
1078
|
+
m && (g.current ?? (g.current = document.activeElement instanceof HTMLElement ? document.activeElement : null), !m.open && (typeof m.showModal == "function" ? m.showModal() : m.setAttribute("open", "")));
|
|
1079
|
+
}, []), nt({
|
|
749
1080
|
active: !0,
|
|
750
|
-
containerRef:
|
|
751
|
-
initialFocusRef:
|
|
752
|
-
returnFocusRef:
|
|
753
|
-
}),
|
|
754
|
-
const
|
|
755
|
-
if (!
|
|
1081
|
+
containerRef: b,
|
|
1082
|
+
initialFocusRef: c,
|
|
1083
|
+
returnFocusRef: u ?? g
|
|
1084
|
+
}), $(() => {
|
|
1085
|
+
const m = b.current;
|
|
1086
|
+
if (!m)
|
|
756
1087
|
return;
|
|
757
1088
|
const I = () => {
|
|
758
|
-
|
|
759
|
-
},
|
|
760
|
-
if (!
|
|
1089
|
+
m.open || (typeof m.showModal == "function" ? m.showModal() : m.setAttribute("open", ""));
|
|
1090
|
+
}, T = () => {
|
|
1091
|
+
if (!p) {
|
|
761
1092
|
I();
|
|
762
1093
|
return;
|
|
763
1094
|
}
|
|
764
1095
|
t();
|
|
765
|
-
},
|
|
766
|
-
|
|
767
|
-
},
|
|
768
|
-
|
|
769
|
-
},
|
|
770
|
-
|
|
1096
|
+
}, x = (P) => {
|
|
1097
|
+
P.preventDefault(), p && t();
|
|
1098
|
+
}, _ = (P) => {
|
|
1099
|
+
p || P.key !== "Escape" || P.defaultPrevented || (P.preventDefault(), P.stopPropagation());
|
|
1100
|
+
}, E = (P) => {
|
|
1101
|
+
r && P.target === m && t();
|
|
771
1102
|
};
|
|
772
|
-
return
|
|
773
|
-
|
|
1103
|
+
return m.addEventListener("close", T), m.addEventListener("cancel", x), m.addEventListener("keydown", _, !0), m.addEventListener("click", E), () => {
|
|
1104
|
+
m.removeEventListener("close", T), m.removeEventListener("cancel", x), m.removeEventListener("keydown", _, !0), m.removeEventListener("click", E);
|
|
774
1105
|
};
|
|
775
|
-
}, [
|
|
1106
|
+
}, [r, p, t]), /* @__PURE__ */ l(
|
|
776
1107
|
"dialog",
|
|
777
1108
|
{
|
|
778
|
-
ref:
|
|
1109
|
+
ref: b,
|
|
779
1110
|
id: e,
|
|
780
|
-
className:
|
|
781
|
-
closedby:
|
|
1111
|
+
className: w("uk-dialog", h),
|
|
1112
|
+
closedby: p || r ? "any" : "none",
|
|
782
1113
|
"data-state": v ? "open" : "closed",
|
|
783
1114
|
inert: !v,
|
|
784
|
-
"aria-label":
|
|
785
|
-
"aria-labelledby":
|
|
786
|
-
"aria-describedby":
|
|
787
|
-
children: /* @__PURE__ */
|
|
788
|
-
|
|
1115
|
+
"aria-label": d,
|
|
1116
|
+
"aria-labelledby": y ?? (d ? void 0 : i ? n : void 0),
|
|
1117
|
+
"aria-describedby": f ?? (s ? o : void 0),
|
|
1118
|
+
children: /* @__PURE__ */ l(
|
|
1119
|
+
D.div,
|
|
789
1120
|
{
|
|
790
1121
|
className: "uk-dialog__panel",
|
|
791
|
-
initial:
|
|
1122
|
+
initial: k ? { opacity: 0 } : {
|
|
792
1123
|
opacity: 0,
|
|
793
1124
|
transform: "translateY(12px) scale(0.96)"
|
|
794
1125
|
},
|
|
795
1126
|
animate: {
|
|
796
1127
|
opacity: 1,
|
|
797
1128
|
transform: "translateY(0px) scale(1)",
|
|
798
|
-
transition:
|
|
1129
|
+
transition: k ? q : { ...ge, delay: 0.06 }
|
|
799
1130
|
},
|
|
800
|
-
exit:
|
|
1131
|
+
exit: k ? { opacity: 0, transition: q } : {
|
|
801
1132
|
opacity: 0,
|
|
802
1133
|
transform: "translateY(8px) scale(0.97)",
|
|
803
|
-
transition:
|
|
1134
|
+
transition: ge
|
|
804
1135
|
},
|
|
805
1136
|
children: a
|
|
806
1137
|
}
|
|
@@ -808,42 +1139,42 @@ function ht({
|
|
|
808
1139
|
}
|
|
809
1140
|
);
|
|
810
1141
|
}
|
|
811
|
-
function
|
|
1142
|
+
function ze({
|
|
812
1143
|
children: t,
|
|
813
1144
|
closeOnBackdropClick: e = !0,
|
|
814
1145
|
closeOnEscape: n = !0,
|
|
815
1146
|
initialFocusRef: o,
|
|
816
|
-
returnFocusRef:
|
|
1147
|
+
returnFocusRef: i,
|
|
817
1148
|
className: s,
|
|
818
1149
|
"aria-label": a,
|
|
819
|
-
"aria-labelledby":
|
|
820
|
-
"aria-describedby":
|
|
1150
|
+
"aria-labelledby": r,
|
|
1151
|
+
"aria-describedby": p
|
|
821
1152
|
}) {
|
|
822
|
-
const
|
|
823
|
-
|
|
1153
|
+
const c = J("Dialog.Content"), u = S(() => {
|
|
1154
|
+
c.setOpen(!1);
|
|
824
1155
|
});
|
|
825
|
-
return
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
) ?
|
|
830
|
-
/* @__PURE__ */
|
|
831
|
-
|
|
1156
|
+
return te(
|
|
1157
|
+
Tt,
|
|
1158
|
+
_t,
|
|
1159
|
+
Ct
|
|
1160
|
+
) ? re(
|
|
1161
|
+
/* @__PURE__ */ l(le, { reducedMotion: "user", children: /* @__PURE__ */ l(A, { children: c.open ? /* @__PURE__ */ l(
|
|
1162
|
+
Et,
|
|
832
1163
|
{
|
|
833
|
-
requestClose:
|
|
834
|
-
contentId:
|
|
835
|
-
titleId:
|
|
836
|
-
descriptionId:
|
|
837
|
-
hasTitle:
|
|
838
|
-
hasDescription:
|
|
1164
|
+
requestClose: u,
|
|
1165
|
+
contentId: c.contentId,
|
|
1166
|
+
titleId: c.titleId,
|
|
1167
|
+
descriptionId: c.descriptionId,
|
|
1168
|
+
hasTitle: c.hasTitle,
|
|
1169
|
+
hasDescription: c.hasDescription,
|
|
839
1170
|
closeOnBackdropClick: e,
|
|
840
1171
|
closeOnEscape: n,
|
|
841
1172
|
initialFocusRef: o,
|
|
842
|
-
returnFocusRef:
|
|
1173
|
+
returnFocusRef: i,
|
|
843
1174
|
className: s,
|
|
844
1175
|
"aria-label": a,
|
|
845
|
-
"aria-labelledby":
|
|
846
|
-
"aria-describedby":
|
|
1176
|
+
"aria-labelledby": r,
|
|
1177
|
+
"aria-describedby": p,
|
|
847
1178
|
children: t
|
|
848
1179
|
},
|
|
849
1180
|
"uk-dialog"
|
|
@@ -851,53 +1182,53 @@ function Me({
|
|
|
851
1182
|
document.body
|
|
852
1183
|
) : null;
|
|
853
1184
|
}
|
|
854
|
-
function
|
|
1185
|
+
function Pt({
|
|
855
1186
|
open: t,
|
|
856
1187
|
onOpenChange: e,
|
|
857
1188
|
title: n,
|
|
858
1189
|
description: o,
|
|
859
|
-
footer:
|
|
1190
|
+
footer: i,
|
|
860
1191
|
children: s,
|
|
861
1192
|
closeLabel: a = "Close",
|
|
862
|
-
showCloseButton:
|
|
863
|
-
closeOnBackdropClick:
|
|
864
|
-
closeOnEscape:
|
|
865
|
-
initialFocusRef:
|
|
866
|
-
returnFocusRef:
|
|
867
|
-
className:
|
|
868
|
-
"aria-label":
|
|
1193
|
+
showCloseButton: r = !0,
|
|
1194
|
+
closeOnBackdropClick: p = !0,
|
|
1195
|
+
closeOnEscape: c = !0,
|
|
1196
|
+
initialFocusRef: u,
|
|
1197
|
+
returnFocusRef: h,
|
|
1198
|
+
className: d,
|
|
1199
|
+
"aria-label": y
|
|
869
1200
|
}) {
|
|
870
|
-
return /* @__PURE__ */
|
|
871
|
-
|
|
1201
|
+
return /* @__PURE__ */ l(Re, { open: t, onOpenChange: e, children: /* @__PURE__ */ C(
|
|
1202
|
+
ze,
|
|
872
1203
|
{
|
|
873
|
-
className:
|
|
874
|
-
closeOnBackdropClick:
|
|
875
|
-
closeOnEscape:
|
|
876
|
-
initialFocusRef:
|
|
877
|
-
returnFocusRef:
|
|
878
|
-
"aria-label":
|
|
1204
|
+
className: d,
|
|
1205
|
+
closeOnBackdropClick: p,
|
|
1206
|
+
closeOnEscape: c,
|
|
1207
|
+
initialFocusRef: u,
|
|
1208
|
+
returnFocusRef: h,
|
|
1209
|
+
"aria-label": y,
|
|
879
1210
|
children: [
|
|
880
|
-
n || o ||
|
|
1211
|
+
n || o || r ? /* @__PURE__ */ C($e, { children: [
|
|
881
1212
|
/* @__PURE__ */ C("div", { className: "uk-dialog__heading", children: [
|
|
882
|
-
n ? /* @__PURE__ */
|
|
883
|
-
o ? /* @__PURE__ */
|
|
1213
|
+
n ? /* @__PURE__ */ l(Me, { children: n }) : null,
|
|
1214
|
+
o ? /* @__PURE__ */ l(Ae, { children: o }) : null
|
|
884
1215
|
] }),
|
|
885
|
-
|
|
886
|
-
|
|
1216
|
+
r ? /* @__PURE__ */ l(Oe, { children: /* @__PURE__ */ l(
|
|
1217
|
+
we,
|
|
887
1218
|
{
|
|
888
1219
|
variant: "ghost",
|
|
889
1220
|
size: "sm",
|
|
890
1221
|
iconOnly: !0,
|
|
891
1222
|
"aria-label": a,
|
|
892
1223
|
className: "uk-dialog__close",
|
|
893
|
-
children: /* @__PURE__ */
|
|
1224
|
+
children: /* @__PURE__ */ l(
|
|
894
1225
|
"svg",
|
|
895
1226
|
{
|
|
896
1227
|
viewBox: "0 0 20 20",
|
|
897
1228
|
width: "16",
|
|
898
1229
|
height: "16",
|
|
899
1230
|
"aria-hidden": "true",
|
|
900
|
-
children: /* @__PURE__ */
|
|
1231
|
+
children: /* @__PURE__ */ l(
|
|
901
1232
|
"path",
|
|
902
1233
|
{
|
|
903
1234
|
d: "M5 5l10 10M15 5L5 15",
|
|
@@ -911,24 +1242,24 @@ function mt({
|
|
|
911
1242
|
}
|
|
912
1243
|
) }) : null
|
|
913
1244
|
] }) : null,
|
|
914
|
-
/* @__PURE__ */
|
|
915
|
-
|
|
1245
|
+
/* @__PURE__ */ l(Be, { children: s }),
|
|
1246
|
+
i ? /* @__PURE__ */ l(He, { children: i }) : null
|
|
916
1247
|
]
|
|
917
1248
|
}
|
|
918
1249
|
) });
|
|
919
1250
|
}
|
|
920
|
-
const
|
|
921
|
-
Root:
|
|
922
|
-
Trigger:
|
|
923
|
-
Content:
|
|
924
|
-
Header:
|
|
925
|
-
Title:
|
|
926
|
-
Description:
|
|
927
|
-
Body:
|
|
928
|
-
Footer:
|
|
929
|
-
Close:
|
|
1251
|
+
const Jt = Object.assign(Pt, {
|
|
1252
|
+
Root: Re,
|
|
1253
|
+
Trigger: Nt,
|
|
1254
|
+
Content: ze,
|
|
1255
|
+
Header: $e,
|
|
1256
|
+
Title: Me,
|
|
1257
|
+
Description: Ae,
|
|
1258
|
+
Body: Be,
|
|
1259
|
+
Footer: He,
|
|
1260
|
+
Close: Oe
|
|
930
1261
|
});
|
|
931
|
-
function
|
|
1262
|
+
function Dt(t, e) {
|
|
932
1263
|
if (!(e instanceof Element))
|
|
933
1264
|
return !1;
|
|
934
1265
|
const n = e.closest(
|
|
@@ -936,196 +1267,196 @@ function bt(t, e) {
|
|
|
936
1267
|
);
|
|
937
1268
|
return n !== null && n !== t;
|
|
938
1269
|
}
|
|
939
|
-
const
|
|
1270
|
+
const Qt = N(function({
|
|
940
1271
|
children: e,
|
|
941
1272
|
className: n,
|
|
942
1273
|
direction: o = "left",
|
|
943
|
-
speed:
|
|
1274
|
+
speed: i = 30,
|
|
944
1275
|
pauseOnHover: s = !0,
|
|
945
1276
|
gap: a = "1rem",
|
|
946
|
-
fade:
|
|
947
|
-
paused:
|
|
948
|
-
items:
|
|
949
|
-
onItemClick:
|
|
950
|
-
...
|
|
951
|
-
},
|
|
952
|
-
const
|
|
953
|
-
key:
|
|
954
|
-
content:
|
|
955
|
-
data:
|
|
956
|
-
})) :
|
|
957
|
-
key:
|
|
958
|
-
content:
|
|
1277
|
+
fade: r = !0,
|
|
1278
|
+
paused: p = !1,
|
|
1279
|
+
items: c,
|
|
1280
|
+
onItemClick: u,
|
|
1281
|
+
...h
|
|
1282
|
+
}, d) {
|
|
1283
|
+
const y = c ? c.map((g) => ({
|
|
1284
|
+
key: g.key,
|
|
1285
|
+
content: g.content,
|
|
1286
|
+
data: g.data
|
|
1287
|
+
})) : et.toArray(e).map((g, v) => ({
|
|
1288
|
+
key: W(g) ? g.key ?? null : null,
|
|
1289
|
+
content: g,
|
|
959
1290
|
data: void 0
|
|
960
|
-
})),
|
|
961
|
-
!
|
|
962
|
-
},
|
|
963
|
-
!
|
|
1291
|
+
})), f = (g, v, k) => {
|
|
1292
|
+
!u || k.defaultPrevented || Dt(k.currentTarget, k.target) || u({ index: v, key: g.key, data: g.data }, k);
|
|
1293
|
+
}, b = (g, v, k) => {
|
|
1294
|
+
!u || k.defaultPrevented || (k.key === "Enter" || k.key === " ") && (k.preventDefault(), u({ index: v, key: g.key, data: g.data }, k));
|
|
964
1295
|
};
|
|
965
|
-
return /* @__PURE__ */
|
|
1296
|
+
return /* @__PURE__ */ l(
|
|
966
1297
|
"div",
|
|
967
1298
|
{
|
|
968
|
-
...
|
|
969
|
-
ref:
|
|
970
|
-
className:
|
|
1299
|
+
...h,
|
|
1300
|
+
ref: d,
|
|
1301
|
+
className: w("uk-marquee", n),
|
|
971
1302
|
"data-direction": o,
|
|
972
|
-
"data-fade":
|
|
1303
|
+
"data-fade": r ? "true" : void 0,
|
|
973
1304
|
"data-pause-on-hover": s ? "true" : void 0,
|
|
974
|
-
"data-paused":
|
|
1305
|
+
"data-paused": p ? "true" : "false",
|
|
975
1306
|
style: {
|
|
976
|
-
...
|
|
1307
|
+
...h.style,
|
|
977
1308
|
"--uk-marquee-gap": a,
|
|
978
|
-
"--uk-marquee-duration": `${
|
|
1309
|
+
"--uk-marquee-duration": `${i}s`,
|
|
979
1310
|
gap: a
|
|
980
1311
|
},
|
|
981
|
-
children: [!1, !0].map((
|
|
1312
|
+
children: [!1, !0].map((g) => /* @__PURE__ */ l(
|
|
982
1313
|
"div",
|
|
983
1314
|
{
|
|
984
|
-
"aria-hidden":
|
|
1315
|
+
"aria-hidden": g,
|
|
985
1316
|
className: "uk-marquee__track",
|
|
986
|
-
"data-duplicate":
|
|
987
|
-
inert:
|
|
988
|
-
role:
|
|
989
|
-
onFocusCapture:
|
|
1317
|
+
"data-duplicate": g ? "true" : void 0,
|
|
1318
|
+
inert: g && !u,
|
|
1319
|
+
role: g ? "presentation" : void 0,
|
|
1320
|
+
onFocusCapture: g ? (v) => {
|
|
990
1321
|
v.target instanceof HTMLElement && v.target.blur();
|
|
991
1322
|
} : void 0,
|
|
992
|
-
children:
|
|
1323
|
+
children: y.map((v, k) => /* @__PURE__ */ l(
|
|
993
1324
|
"div",
|
|
994
1325
|
{
|
|
995
1326
|
className: "uk-marquee__item",
|
|
996
|
-
"data-clickable":
|
|
997
|
-
...
|
|
998
|
-
role:
|
|
999
|
-
tabIndex:
|
|
1000
|
-
onClick: (
|
|
1001
|
-
onKeyDown:
|
|
1327
|
+
"data-clickable": u ? "true" : void 0,
|
|
1328
|
+
...u ? {
|
|
1329
|
+
role: g ? void 0 : "button",
|
|
1330
|
+
tabIndex: g ? -1 : 0,
|
|
1331
|
+
onClick: (m) => f(v, k, m),
|
|
1332
|
+
onKeyDown: g ? void 0 : (m) => b(v, k, m)
|
|
1002
1333
|
} : {},
|
|
1003
1334
|
children: v.content
|
|
1004
1335
|
},
|
|
1005
|
-
|
|
1336
|
+
g ? `duplicate-${k}` : v.key ?? k
|
|
1006
1337
|
))
|
|
1007
1338
|
},
|
|
1008
|
-
|
|
1339
|
+
g ? "duplicate" : "primary"
|
|
1009
1340
|
))
|
|
1010
1341
|
}
|
|
1011
1342
|
);
|
|
1012
|
-
}),
|
|
1013
|
-
},
|
|
1014
|
-
function
|
|
1015
|
-
const e =
|
|
1343
|
+
}), Ke = U(null), Ve = () => () => {
|
|
1344
|
+
}, Fe = () => !0, qe = () => !1;
|
|
1345
|
+
function Ge(t) {
|
|
1346
|
+
const e = j(Ke);
|
|
1016
1347
|
if (!e)
|
|
1017
1348
|
throw new Error(`<${t}> must be rendered inside <Tooltip.Root>`);
|
|
1018
1349
|
return e;
|
|
1019
1350
|
}
|
|
1020
|
-
function
|
|
1351
|
+
function Ue(t, e) {
|
|
1021
1352
|
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
1022
1353
|
}
|
|
1023
|
-
function
|
|
1354
|
+
function je(t, e) {
|
|
1024
1355
|
const n = typeof t == "string" ? t.split(/\s+/).filter(Boolean) : [];
|
|
1025
1356
|
return Array.from(/* @__PURE__ */ new Set([...n, e])).join(" ");
|
|
1026
1357
|
}
|
|
1027
|
-
function
|
|
1358
|
+
function M(t, e) {
|
|
1028
1359
|
return (n) => {
|
|
1029
1360
|
t?.(n), n.defaultPrevented || e(n);
|
|
1030
1361
|
};
|
|
1031
1362
|
}
|
|
1032
|
-
function
|
|
1363
|
+
function Lt({
|
|
1033
1364
|
children: t,
|
|
1034
1365
|
open: e,
|
|
1035
1366
|
defaultOpen: n,
|
|
1036
1367
|
onOpenChange: o,
|
|
1037
|
-
delayDuration:
|
|
1368
|
+
delayDuration: i = 300,
|
|
1038
1369
|
closeDelay: s = 80
|
|
1039
1370
|
}) {
|
|
1040
|
-
const a =
|
|
1371
|
+
const a = R(), [r, p] = O(
|
|
1041
1372
|
null
|
|
1042
|
-
),
|
|
1373
|
+
), c = L(null), u = L(null), [h, d] = V({
|
|
1043
1374
|
value: e,
|
|
1044
1375
|
defaultValue: n ?? !1,
|
|
1045
1376
|
onChange: o
|
|
1046
|
-
}),
|
|
1047
|
-
|
|
1048
|
-
}, []),
|
|
1049
|
-
|
|
1050
|
-
}, []),
|
|
1051
|
-
if (
|
|
1052
|
-
if (
|
|
1053
|
-
|
|
1377
|
+
}), y = B(() => {
|
|
1378
|
+
c.current !== null && (clearTimeout(c.current), c.current = null);
|
|
1379
|
+
}, []), f = B(() => {
|
|
1380
|
+
u.current !== null && (clearTimeout(u.current), u.current = null);
|
|
1381
|
+
}, []), b = S((m = !1) => {
|
|
1382
|
+
if (y(), f(), !h) {
|
|
1383
|
+
if (m || i <= 0) {
|
|
1384
|
+
d(!0);
|
|
1054
1385
|
return;
|
|
1055
1386
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
},
|
|
1387
|
+
c.current = setTimeout(() => {
|
|
1388
|
+
c.current = null, d(!0);
|
|
1389
|
+
}, i);
|
|
1059
1390
|
}
|
|
1060
|
-
}),
|
|
1061
|
-
if (
|
|
1391
|
+
}), g = S(() => {
|
|
1392
|
+
if (y(), f(), !!h) {
|
|
1062
1393
|
if (s <= 0) {
|
|
1063
|
-
|
|
1394
|
+
d(!1);
|
|
1064
1395
|
return;
|
|
1065
1396
|
}
|
|
1066
|
-
|
|
1067
|
-
|
|
1397
|
+
u.current = setTimeout(() => {
|
|
1398
|
+
u.current = null, d(!1);
|
|
1068
1399
|
}, s);
|
|
1069
1400
|
}
|
|
1070
1401
|
}), v = S(() => {
|
|
1071
|
-
|
|
1402
|
+
y(), f(), d(!1);
|
|
1072
1403
|
});
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
}, [
|
|
1404
|
+
$(() => {
|
|
1405
|
+
h ? f() : y();
|
|
1406
|
+
}, [f, y, h]), $(
|
|
1076
1407
|
() => () => {
|
|
1077
|
-
|
|
1408
|
+
y(), f();
|
|
1078
1409
|
},
|
|
1079
|
-
[
|
|
1410
|
+
[f, y]
|
|
1080
1411
|
);
|
|
1081
|
-
const
|
|
1412
|
+
const k = G(
|
|
1082
1413
|
() => ({
|
|
1083
|
-
open:
|
|
1084
|
-
triggerElement:
|
|
1085
|
-
setTriggerElement:
|
|
1414
|
+
open: h,
|
|
1415
|
+
triggerElement: r,
|
|
1416
|
+
setTriggerElement: p,
|
|
1086
1417
|
contentId: a,
|
|
1087
|
-
requestOpen:
|
|
1088
|
-
requestClose:
|
|
1418
|
+
requestOpen: b,
|
|
1419
|
+
requestClose: g,
|
|
1089
1420
|
dismiss: v
|
|
1090
1421
|
}),
|
|
1091
|
-
[a,
|
|
1422
|
+
[a, h, v, g, b, r]
|
|
1092
1423
|
);
|
|
1093
|
-
return /* @__PURE__ */
|
|
1424
|
+
return /* @__PURE__ */ l(Ke.Provider, { value: k, children: t });
|
|
1094
1425
|
}
|
|
1095
|
-
function
|
|
1096
|
-
const e =
|
|
1097
|
-
if (!
|
|
1426
|
+
function St({ children: t }) {
|
|
1427
|
+
const e = Ge("Tooltip.Trigger"), { setTriggerElement: n } = e;
|
|
1428
|
+
if (!W(t))
|
|
1098
1429
|
throw new Error("<Tooltip.Trigger> expects a single valid React element");
|
|
1099
|
-
const o = t,
|
|
1100
|
-
(
|
|
1101
|
-
|
|
1430
|
+
const o = t, i = o.props, s = i.ref ?? o.ref, a = i.onPointerEnter, r = i.onPointerLeave, p = i.onFocus, c = i.onBlur, u = i.onKeyDown, h = B(
|
|
1431
|
+
(d) => {
|
|
1432
|
+
Ue(s, d), n(d);
|
|
1102
1433
|
},
|
|
1103
1434
|
[s, n]
|
|
1104
1435
|
);
|
|
1105
|
-
return
|
|
1106
|
-
ref:
|
|
1107
|
-
"aria-describedby": e.open ?
|
|
1108
|
-
onPointerEnter:
|
|
1109
|
-
e.requestOpen(
|
|
1436
|
+
return Y(o, {
|
|
1437
|
+
ref: h,
|
|
1438
|
+
"aria-describedby": e.open ? je(i["aria-describedby"], e.contentId) : i["aria-describedby"],
|
|
1439
|
+
onPointerEnter: M(a, (d) => {
|
|
1440
|
+
e.requestOpen(d.pointerType === "touch");
|
|
1110
1441
|
}),
|
|
1111
|
-
onPointerLeave:
|
|
1112
|
-
|
|
1442
|
+
onPointerLeave: M(r, (d) => {
|
|
1443
|
+
d.pointerType !== "touch" && e.requestClose();
|
|
1113
1444
|
}),
|
|
1114
|
-
onFocus:
|
|
1445
|
+
onFocus: M(p, () => {
|
|
1115
1446
|
e.requestOpen();
|
|
1116
1447
|
}),
|
|
1117
|
-
onBlur:
|
|
1448
|
+
onBlur: M(c, () => {
|
|
1118
1449
|
e.requestClose();
|
|
1119
1450
|
}),
|
|
1120
|
-
onKeyDown:
|
|
1121
|
-
|
|
1451
|
+
onKeyDown: M(u, (d) => {
|
|
1452
|
+
d.key === "Escape" && e.open && (d.preventDefault(), d.stopPropagation(), e.dismiss());
|
|
1122
1453
|
})
|
|
1123
1454
|
});
|
|
1124
1455
|
}
|
|
1125
|
-
function
|
|
1456
|
+
function Z(t, e, n) {
|
|
1126
1457
|
return n < e ? e : Math.min(Math.max(t, e), n);
|
|
1127
1458
|
}
|
|
1128
|
-
function
|
|
1459
|
+
function Rt(t) {
|
|
1129
1460
|
switch (t) {
|
|
1130
1461
|
case "top":
|
|
1131
1462
|
return "bottom";
|
|
@@ -1137,124 +1468,124 @@ function vt(t) {
|
|
|
1137
1468
|
return "right";
|
|
1138
1469
|
}
|
|
1139
1470
|
}
|
|
1140
|
-
function
|
|
1471
|
+
function ce(t, e, n, o, i) {
|
|
1141
1472
|
switch (e) {
|
|
1142
1473
|
case "top":
|
|
1143
|
-
return t.top -
|
|
1474
|
+
return t.top - i;
|
|
1144
1475
|
case "right":
|
|
1145
|
-
return n - t.right -
|
|
1476
|
+
return n - t.right - i;
|
|
1146
1477
|
case "bottom":
|
|
1147
|
-
return o - t.bottom -
|
|
1478
|
+
return o - t.bottom - i;
|
|
1148
1479
|
case "left":
|
|
1149
|
-
return t.left -
|
|
1480
|
+
return t.left - i;
|
|
1150
1481
|
}
|
|
1151
1482
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return
|
|
1483
|
+
function ve(t, e, n, o, i, s, a) {
|
|
1484
|
+
return ce(
|
|
1154
1485
|
t,
|
|
1155
1486
|
n,
|
|
1156
|
-
|
|
1487
|
+
i,
|
|
1157
1488
|
s,
|
|
1158
1489
|
a
|
|
1159
1490
|
) >= (n === "top" || n === "bottom" ? e.height : e.width) + o;
|
|
1160
1491
|
}
|
|
1161
|
-
function
|
|
1492
|
+
function Ot({
|
|
1162
1493
|
trigger: t,
|
|
1163
1494
|
tooltip: e,
|
|
1164
1495
|
side: n,
|
|
1165
1496
|
align: o,
|
|
1166
|
-
sideOffset:
|
|
1497
|
+
sideOffset: i,
|
|
1167
1498
|
collisionPadding: s,
|
|
1168
1499
|
avoidCollisions: a,
|
|
1169
|
-
viewportWidth:
|
|
1170
|
-
viewportHeight:
|
|
1500
|
+
viewportWidth: r,
|
|
1501
|
+
viewportHeight: p
|
|
1171
1502
|
}) {
|
|
1172
|
-
let
|
|
1173
|
-
if (a && !
|
|
1503
|
+
let c = n;
|
|
1504
|
+
if (a && !ve(
|
|
1174
1505
|
t,
|
|
1175
1506
|
e,
|
|
1176
1507
|
n,
|
|
1508
|
+
i,
|
|
1177
1509
|
r,
|
|
1178
1510
|
p,
|
|
1179
|
-
d,
|
|
1180
1511
|
s
|
|
1181
1512
|
)) {
|
|
1182
|
-
const
|
|
1513
|
+
const g = Rt(n), v = ve(
|
|
1183
1514
|
t,
|
|
1184
1515
|
e,
|
|
1185
|
-
|
|
1516
|
+
g,
|
|
1517
|
+
i,
|
|
1186
1518
|
r,
|
|
1187
1519
|
p,
|
|
1188
|
-
d,
|
|
1189
1520
|
s
|
|
1190
|
-
),
|
|
1521
|
+
), k = ce(
|
|
1191
1522
|
t,
|
|
1192
1523
|
n,
|
|
1524
|
+
r,
|
|
1193
1525
|
p,
|
|
1194
|
-
d,
|
|
1195
1526
|
s
|
|
1196
|
-
),
|
|
1527
|
+
), m = ce(
|
|
1197
1528
|
t,
|
|
1198
|
-
|
|
1529
|
+
g,
|
|
1530
|
+
r,
|
|
1199
1531
|
p,
|
|
1200
|
-
d,
|
|
1201
1532
|
s
|
|
1202
1533
|
);
|
|
1203
|
-
(v ||
|
|
1534
|
+
(v || m > k) && (c = g);
|
|
1204
1535
|
}
|
|
1205
|
-
const
|
|
1206
|
-
let
|
|
1207
|
-
switch (
|
|
1536
|
+
const u = t.left + t.width / 2, h = t.top + t.height / 2;
|
|
1537
|
+
let d = 0, y = 0;
|
|
1538
|
+
switch (c) {
|
|
1208
1539
|
case "top":
|
|
1209
1540
|
case "bottom":
|
|
1210
|
-
|
|
1541
|
+
d = o === "start" ? t.left : o === "end" ? t.right - e.width : u - e.width / 2, y = c === "top" ? t.top - e.height - i : t.bottom + i;
|
|
1211
1542
|
break;
|
|
1212
1543
|
case "left":
|
|
1213
1544
|
case "right":
|
|
1214
|
-
|
|
1545
|
+
d = c === "left" ? t.left - e.width - i : t.right + i, y = o === "start" ? t.top : o === "end" ? t.bottom - e.height : h - e.height / 2;
|
|
1215
1546
|
break;
|
|
1216
1547
|
}
|
|
1217
|
-
a && (
|
|
1218
|
-
|
|
1548
|
+
a && (d = Z(
|
|
1549
|
+
d,
|
|
1219
1550
|
s,
|
|
1220
|
-
|
|
1221
|
-
),
|
|
1222
|
-
|
|
1551
|
+
r - e.width - s
|
|
1552
|
+
), y = Z(
|
|
1553
|
+
y,
|
|
1223
1554
|
s,
|
|
1224
|
-
|
|
1555
|
+
p - e.height - s
|
|
1225
1556
|
));
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
Math.max(
|
|
1230
|
-
) :
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
Math.max(
|
|
1557
|
+
const f = 10, b = c === "top" || c === "bottom" ? Z(
|
|
1558
|
+
u - d,
|
|
1559
|
+
f,
|
|
1560
|
+
Math.max(f, e.width - f)
|
|
1561
|
+
) : Z(
|
|
1562
|
+
h - y,
|
|
1563
|
+
f,
|
|
1564
|
+
Math.max(f, e.height - f)
|
|
1234
1565
|
);
|
|
1235
|
-
return { x:
|
|
1566
|
+
return { x: d, y, side: c, arrowOffset: b };
|
|
1236
1567
|
}
|
|
1237
|
-
function
|
|
1568
|
+
function Xe(t, e, {
|
|
1238
1569
|
side: n,
|
|
1239
1570
|
align: o,
|
|
1240
|
-
sideOffset:
|
|
1571
|
+
sideOffset: i,
|
|
1241
1572
|
collisionPadding: s,
|
|
1242
1573
|
avoidCollisions: a
|
|
1243
1574
|
}) {
|
|
1244
|
-
const [
|
|
1245
|
-
return
|
|
1246
|
-
const
|
|
1247
|
-
if (!
|
|
1575
|
+
const [r, p] = O(null);
|
|
1576
|
+
return ne(() => {
|
|
1577
|
+
const c = e.current;
|
|
1578
|
+
if (!c || !t)
|
|
1248
1579
|
return;
|
|
1249
|
-
const
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
trigger:
|
|
1254
|
-
tooltip:
|
|
1580
|
+
const u = () => {
|
|
1581
|
+
const d = t.getBoundingClientRect(), y = c.getBoundingClientRect();
|
|
1582
|
+
p(
|
|
1583
|
+
Ot({
|
|
1584
|
+
trigger: d,
|
|
1585
|
+
tooltip: y,
|
|
1255
1586
|
side: n,
|
|
1256
1587
|
align: o,
|
|
1257
|
-
sideOffset:
|
|
1588
|
+
sideOffset: i,
|
|
1258
1589
|
collisionPadding: s,
|
|
1259
1590
|
avoidCollisions: a,
|
|
1260
1591
|
viewportWidth: window.innerWidth || document.documentElement.clientWidth,
|
|
@@ -1262,10 +1593,10 @@ function qe(t, e, {
|
|
|
1262
1593
|
})
|
|
1263
1594
|
);
|
|
1264
1595
|
};
|
|
1265
|
-
|
|
1266
|
-
const
|
|
1267
|
-
return
|
|
1268
|
-
window.removeEventListener("resize",
|
|
1596
|
+
u(), window.addEventListener("resize", u), window.addEventListener("scroll", u, !0);
|
|
1597
|
+
const h = typeof ResizeObserver > "u" ? null : new ResizeObserver(u);
|
|
1598
|
+
return h?.observe(t), h?.observe(c), () => {
|
|
1599
|
+
window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0), h?.disconnect();
|
|
1269
1600
|
};
|
|
1270
1601
|
}, [
|
|
1271
1602
|
o,
|
|
@@ -1273,27 +1604,27 @@ function qe(t, e, {
|
|
|
1273
1604
|
s,
|
|
1274
1605
|
e,
|
|
1275
1606
|
n,
|
|
1276
|
-
|
|
1607
|
+
i,
|
|
1277
1608
|
t
|
|
1278
|
-
]),
|
|
1609
|
+
]), r;
|
|
1279
1610
|
}
|
|
1280
|
-
function
|
|
1281
|
-
|
|
1611
|
+
function We(t, e, n) {
|
|
1612
|
+
$(() => {
|
|
1282
1613
|
const o = (a) => {
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1285
|
-
},
|
|
1614
|
+
const r = a.target;
|
|
1615
|
+
r instanceof Node && (t.contains(r) || e.current?.contains(r) || n());
|
|
1616
|
+
}, i = () => {
|
|
1286
1617
|
document.visibilityState === "hidden" && n();
|
|
1287
1618
|
}, s = (a) => {
|
|
1288
|
-
const
|
|
1289
|
-
a.key !== "Escape" ||
|
|
1619
|
+
const r = a.target;
|
|
1620
|
+
a.key !== "Escape" || r instanceof Node && t.contains(r) || n();
|
|
1290
1621
|
};
|
|
1291
|
-
return document.addEventListener("pointerdown", o, !0), document.addEventListener("visibilitychange",
|
|
1292
|
-
document.removeEventListener("pointerdown", o, !0), document.removeEventListener("visibilitychange",
|
|
1622
|
+
return document.addEventListener("pointerdown", o, !0), document.addEventListener("visibilitychange", i), document.addEventListener("keydown", s, !0), window.addEventListener("blur", n), () => {
|
|
1623
|
+
document.removeEventListener("pointerdown", o, !0), document.removeEventListener("visibilitychange", i), document.removeEventListener("keydown", s, !0), window.removeEventListener("blur", n);
|
|
1293
1624
|
};
|
|
1294
1625
|
}, [n, e, t]);
|
|
1295
1626
|
}
|
|
1296
|
-
function
|
|
1627
|
+
function Ye(t) {
|
|
1297
1628
|
switch (t) {
|
|
1298
1629
|
case "top":
|
|
1299
1630
|
return "center bottom";
|
|
@@ -1307,64 +1638,64 @@ function Ke(t) {
|
|
|
1307
1638
|
return "center";
|
|
1308
1639
|
}
|
|
1309
1640
|
}
|
|
1310
|
-
function
|
|
1641
|
+
function $t({
|
|
1311
1642
|
contentId: t,
|
|
1312
1643
|
triggerElement: e,
|
|
1313
1644
|
dismiss: n,
|
|
1314
1645
|
children: o,
|
|
1315
|
-
className:
|
|
1646
|
+
className: i,
|
|
1316
1647
|
style: s,
|
|
1317
1648
|
side: a = "top",
|
|
1318
|
-
align:
|
|
1319
|
-
sideOffset:
|
|
1320
|
-
collisionPadding:
|
|
1321
|
-
avoidCollisions:
|
|
1322
|
-
...
|
|
1649
|
+
align: r = "center",
|
|
1650
|
+
sideOffset: p = 8,
|
|
1651
|
+
collisionPadding: c = 8,
|
|
1652
|
+
avoidCollisions: u = !0,
|
|
1653
|
+
...h
|
|
1323
1654
|
}) {
|
|
1324
|
-
const
|
|
1655
|
+
const d = L(null), y = z() ?? !1, f = oe(), b = Xe(e, d, {
|
|
1325
1656
|
side: a,
|
|
1326
|
-
align:
|
|
1327
|
-
sideOffset:
|
|
1328
|
-
collisionPadding:
|
|
1329
|
-
avoidCollisions:
|
|
1657
|
+
align: r,
|
|
1658
|
+
sideOffset: p,
|
|
1659
|
+
collisionPadding: c,
|
|
1660
|
+
avoidCollisions: u
|
|
1330
1661
|
});
|
|
1331
|
-
|
|
1332
|
-
const
|
|
1662
|
+
We(e, d, n);
|
|
1663
|
+
const g = Ye(b?.side ?? a), v = {
|
|
1333
1664
|
...s,
|
|
1334
|
-
left:
|
|
1335
|
-
top:
|
|
1336
|
-
visibility:
|
|
1665
|
+
left: b ? `${b.x}px` : 0,
|
|
1666
|
+
top: b ? `${b.y}px` : 0,
|
|
1667
|
+
visibility: b ? "visible" : "hidden"
|
|
1337
1668
|
};
|
|
1338
|
-
return /* @__PURE__ */
|
|
1669
|
+
return /* @__PURE__ */ l(
|
|
1339
1670
|
"div",
|
|
1340
1671
|
{
|
|
1341
|
-
...
|
|
1342
|
-
ref:
|
|
1672
|
+
...h,
|
|
1673
|
+
ref: d,
|
|
1343
1674
|
id: t,
|
|
1344
1675
|
role: "tooltip",
|
|
1345
|
-
"data-side":
|
|
1346
|
-
"data-align":
|
|
1347
|
-
"data-state":
|
|
1348
|
-
"aria-hidden":
|
|
1349
|
-
className:
|
|
1676
|
+
"data-side": b?.side ?? a,
|
|
1677
|
+
"data-align": r,
|
|
1678
|
+
"data-state": f ? "open" : "closed",
|
|
1679
|
+
"aria-hidden": f ? void 0 : !0,
|
|
1680
|
+
className: w("uk-tooltip", i),
|
|
1350
1681
|
style: v,
|
|
1351
1682
|
children: /* @__PURE__ */ C(
|
|
1352
|
-
|
|
1683
|
+
D.div,
|
|
1353
1684
|
{
|
|
1354
1685
|
className: "uk-tooltip__surface",
|
|
1355
|
-
style: { transformOrigin:
|
|
1356
|
-
initial:
|
|
1686
|
+
style: { transformOrigin: g },
|
|
1687
|
+
initial: y ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1357
1688
|
animate: { opacity: 1, scale: 1 },
|
|
1358
|
-
exit:
|
|
1359
|
-
transition:
|
|
1689
|
+
exit: y ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1690
|
+
transition: y ? q : Te,
|
|
1360
1691
|
children: [
|
|
1361
|
-
/* @__PURE__ */
|
|
1692
|
+
/* @__PURE__ */ l(
|
|
1362
1693
|
"span",
|
|
1363
1694
|
{
|
|
1364
1695
|
className: "uk-tooltip__arrow",
|
|
1365
1696
|
"aria-hidden": "true",
|
|
1366
1697
|
style: {
|
|
1367
|
-
"--uk-tooltip-arrow-offset": `${
|
|
1698
|
+
"--uk-tooltip-arrow-offset": `${b?.arrowOffset ?? 0}px`
|
|
1368
1699
|
}
|
|
1369
1700
|
}
|
|
1370
1701
|
),
|
|
@@ -1375,15 +1706,15 @@ function It({
|
|
|
1375
1706
|
}
|
|
1376
1707
|
);
|
|
1377
1708
|
}
|
|
1378
|
-
function
|
|
1379
|
-
const e =
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1709
|
+
function Mt(t) {
|
|
1710
|
+
const e = Ge("Tooltip.Content"), o = te(
|
|
1711
|
+
Ve,
|
|
1712
|
+
Fe,
|
|
1713
|
+
qe
|
|
1383
1714
|
) && e.triggerElement ? e.triggerElement.closest("dialog") ?? document.body : null;
|
|
1384
|
-
return !o || !e.triggerElement ? null :
|
|
1385
|
-
/* @__PURE__ */
|
|
1386
|
-
|
|
1715
|
+
return !o || !e.triggerElement ? null : re(
|
|
1716
|
+
/* @__PURE__ */ l(le, { reducedMotion: "user", children: /* @__PURE__ */ l(A, { children: e.open ? /* @__PURE__ */ l(
|
|
1717
|
+
$t,
|
|
1387
1718
|
{
|
|
1388
1719
|
contentId: e.contentId,
|
|
1389
1720
|
triggerElement: e.triggerElement,
|
|
@@ -1395,83 +1726,83 @@ function Tt(t) {
|
|
|
1395
1726
|
o
|
|
1396
1727
|
);
|
|
1397
1728
|
}
|
|
1398
|
-
const
|
|
1729
|
+
const Je = U(
|
|
1399
1730
|
null
|
|
1400
1731
|
);
|
|
1401
|
-
function
|
|
1402
|
-
const e =
|
|
1732
|
+
function At(t) {
|
|
1733
|
+
const e = j(Je);
|
|
1403
1734
|
if (!e)
|
|
1404
1735
|
throw new Error(`<${t}> must be rendered inside <Tooltip.Group>`);
|
|
1405
1736
|
return e;
|
|
1406
1737
|
}
|
|
1407
|
-
function
|
|
1738
|
+
function Bt({
|
|
1408
1739
|
activeValue: t,
|
|
1409
1740
|
content: e,
|
|
1410
1741
|
contentClassName: n,
|
|
1411
1742
|
contentId: o,
|
|
1412
|
-
dismiss:
|
|
1743
|
+
dismiss: i,
|
|
1413
1744
|
triggerElement: s,
|
|
1414
1745
|
side: a,
|
|
1415
|
-
align:
|
|
1416
|
-
sideOffset:
|
|
1417
|
-
collisionPadding:
|
|
1418
|
-
avoidCollisions:
|
|
1746
|
+
align: r,
|
|
1747
|
+
sideOffset: p,
|
|
1748
|
+
collisionPadding: c,
|
|
1749
|
+
avoidCollisions: u
|
|
1419
1750
|
}) {
|
|
1420
|
-
const
|
|
1751
|
+
const h = L(null), d = z() ?? !1, y = oe(), f = Xe(s, h, {
|
|
1421
1752
|
side: a,
|
|
1422
|
-
align:
|
|
1423
|
-
sideOffset:
|
|
1424
|
-
collisionPadding:
|
|
1425
|
-
avoidCollisions:
|
|
1753
|
+
align: r,
|
|
1754
|
+
sideOffset: p,
|
|
1755
|
+
collisionPadding: c,
|
|
1756
|
+
avoidCollisions: u
|
|
1426
1757
|
});
|
|
1427
|
-
|
|
1428
|
-
const
|
|
1429
|
-
left:
|
|
1430
|
-
top:
|
|
1431
|
-
transformOrigin:
|
|
1432
|
-
visibility:
|
|
1758
|
+
We(s, h, i);
|
|
1759
|
+
const b = {
|
|
1760
|
+
left: f ? `${f.x}px` : 0,
|
|
1761
|
+
top: f ? `${f.y}px` : 0,
|
|
1762
|
+
transformOrigin: Ye(f?.side ?? a),
|
|
1763
|
+
visibility: f ? "visible" : "hidden"
|
|
1433
1764
|
};
|
|
1434
1765
|
return /* @__PURE__ */ C(
|
|
1435
|
-
|
|
1766
|
+
D.div,
|
|
1436
1767
|
{
|
|
1437
|
-
ref:
|
|
1768
|
+
ref: h,
|
|
1438
1769
|
id: o,
|
|
1439
1770
|
role: "tooltip",
|
|
1440
|
-
layout: !
|
|
1771
|
+
layout: !d,
|
|
1441
1772
|
layoutDependency: t,
|
|
1442
|
-
"data-side":
|
|
1443
|
-
"data-align":
|
|
1444
|
-
"data-state":
|
|
1445
|
-
"aria-hidden":
|
|
1446
|
-
className:
|
|
1773
|
+
"data-side": f?.side ?? a,
|
|
1774
|
+
"data-align": r,
|
|
1775
|
+
"data-state": y ? "open" : "closed",
|
|
1776
|
+
"aria-hidden": y ? void 0 : !0,
|
|
1777
|
+
className: w(
|
|
1447
1778
|
"uk-tooltip",
|
|
1448
1779
|
"uk-tooltip__surface",
|
|
1449
1780
|
"uk-tooltip--group",
|
|
1450
1781
|
n
|
|
1451
1782
|
),
|
|
1452
|
-
style:
|
|
1453
|
-
initial:
|
|
1783
|
+
style: b,
|
|
1784
|
+
initial: d ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1454
1785
|
animate: { opacity: 1, scale: 1 },
|
|
1455
|
-
exit:
|
|
1456
|
-
transition:
|
|
1786
|
+
exit: d ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1787
|
+
transition: d ? { ...q, layout: { duration: 0 } } : at,
|
|
1457
1788
|
children: [
|
|
1458
|
-
/* @__PURE__ */
|
|
1789
|
+
/* @__PURE__ */ l(
|
|
1459
1790
|
"span",
|
|
1460
1791
|
{
|
|
1461
1792
|
className: "uk-tooltip__arrow",
|
|
1462
1793
|
"aria-hidden": "true",
|
|
1463
1794
|
style: {
|
|
1464
|
-
"--uk-tooltip-arrow-offset": `${
|
|
1795
|
+
"--uk-tooltip-arrow-offset": `${f?.arrowOffset ?? 0}px`
|
|
1465
1796
|
}
|
|
1466
1797
|
}
|
|
1467
1798
|
),
|
|
1468
|
-
/* @__PURE__ */
|
|
1469
|
-
|
|
1799
|
+
/* @__PURE__ */ l(
|
|
1800
|
+
D.div,
|
|
1470
1801
|
{
|
|
1471
1802
|
className: "uk-tooltip__content",
|
|
1472
1803
|
initial: { opacity: 0 },
|
|
1473
1804
|
animate: { opacity: 1 },
|
|
1474
|
-
transition:
|
|
1805
|
+
transition: d ? q : Te,
|
|
1475
1806
|
children: e
|
|
1476
1807
|
},
|
|
1477
1808
|
t
|
|
@@ -1480,174 +1811,175 @@ function wt({
|
|
|
1480
1811
|
}
|
|
1481
1812
|
);
|
|
1482
1813
|
}
|
|
1483
|
-
function
|
|
1814
|
+
function Ht({
|
|
1484
1815
|
children: t,
|
|
1485
1816
|
side: e = "top",
|
|
1486
1817
|
align: n = "center",
|
|
1487
1818
|
sideOffset: o = 8,
|
|
1488
|
-
collisionPadding:
|
|
1819
|
+
collisionPadding: i = 8,
|
|
1489
1820
|
avoidCollisions: s = !0,
|
|
1490
1821
|
delayDuration: a = 180,
|
|
1491
|
-
closeDelay:
|
|
1492
|
-
contentClassName:
|
|
1822
|
+
closeDelay: r = 80,
|
|
1823
|
+
contentClassName: p
|
|
1493
1824
|
}) {
|
|
1494
|
-
const
|
|
1825
|
+
const c = R(), [u, h] = O(
|
|
1495
1826
|
() => /* @__PURE__ */ new Map()
|
|
1496
|
-
), [
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
),
|
|
1501
|
-
|
|
1502
|
-
}, []), I =
|
|
1827
|
+
), [d, y] = O(!1), [f, b] = O(null), g = L(null), v = L(null), k = te(
|
|
1828
|
+
Ve,
|
|
1829
|
+
Fe,
|
|
1830
|
+
qe
|
|
1831
|
+
), m = B(() => {
|
|
1832
|
+
g.current !== null && (clearTimeout(g.current), g.current = null);
|
|
1833
|
+
}, []), I = B(() => {
|
|
1503
1834
|
v.current !== null && (clearTimeout(v.current), v.current = null);
|
|
1504
|
-
}, []),
|
|
1505
|
-
if (
|
|
1506
|
-
if (
|
|
1507
|
-
|
|
1835
|
+
}, []), T = S((K, H = !1) => {
|
|
1836
|
+
if (m(), I(), b(K), !d) {
|
|
1837
|
+
if (H || a <= 0) {
|
|
1838
|
+
y(!0);
|
|
1508
1839
|
return;
|
|
1509
1840
|
}
|
|
1510
|
-
|
|
1511
|
-
|
|
1841
|
+
g.current = setTimeout(() => {
|
|
1842
|
+
g.current = null, y(!0);
|
|
1512
1843
|
}, a);
|
|
1513
1844
|
}
|
|
1514
|
-
}),
|
|
1515
|
-
if (
|
|
1516
|
-
if (
|
|
1517
|
-
|
|
1845
|
+
}), x = S(() => {
|
|
1846
|
+
if (m(), I(), !!d) {
|
|
1847
|
+
if (r <= 0) {
|
|
1848
|
+
y(!1);
|
|
1518
1849
|
return;
|
|
1519
1850
|
}
|
|
1520
1851
|
v.current = setTimeout(() => {
|
|
1521
|
-
v.current = null,
|
|
1522
|
-
},
|
|
1852
|
+
v.current = null, y(!1);
|
|
1853
|
+
}, r);
|
|
1523
1854
|
}
|
|
1524
|
-
}),
|
|
1525
|
-
|
|
1526
|
-
}),
|
|
1527
|
-
(
|
|
1528
|
-
|
|
1529
|
-
const
|
|
1530
|
-
if (
|
|
1531
|
-
return
|
|
1532
|
-
const
|
|
1533
|
-
return
|
|
1855
|
+
}), _ = S(() => {
|
|
1856
|
+
m(), I(), y(!1);
|
|
1857
|
+
}), E = S(
|
|
1858
|
+
(K, H, X) => {
|
|
1859
|
+
h((ae) => {
|
|
1860
|
+
const fe = ae.get(K);
|
|
1861
|
+
if (fe?.triggerElement === H && Object.is(fe.content, X))
|
|
1862
|
+
return ae;
|
|
1863
|
+
const he = new Map(ae);
|
|
1864
|
+
return he.set(K, { triggerElement: H, content: X }), he;
|
|
1534
1865
|
});
|
|
1535
1866
|
}
|
|
1536
|
-
),
|
|
1537
|
-
|
|
1538
|
-
if (!
|
|
1539
|
-
return
|
|
1540
|
-
const
|
|
1541
|
-
return
|
|
1867
|
+
), P = S((K) => {
|
|
1868
|
+
h((H) => {
|
|
1869
|
+
if (!H.has(K))
|
|
1870
|
+
return H;
|
|
1871
|
+
const X = new Map(H);
|
|
1872
|
+
return X.delete(K), X;
|
|
1542
1873
|
});
|
|
1543
1874
|
});
|
|
1544
|
-
|
|
1875
|
+
$(
|
|
1545
1876
|
() => () => {
|
|
1546
|
-
|
|
1877
|
+
m(), I();
|
|
1547
1878
|
},
|
|
1548
|
-
[I,
|
|
1879
|
+
[I, m]
|
|
1549
1880
|
);
|
|
1550
|
-
const
|
|
1881
|
+
const Qe = G(
|
|
1551
1882
|
() => ({
|
|
1552
|
-
open:
|
|
1553
|
-
activeValue:
|
|
1554
|
-
contentId:
|
|
1555
|
-
activate:
|
|
1556
|
-
requestClose:
|
|
1557
|
-
dismiss:
|
|
1558
|
-
register:
|
|
1559
|
-
unregister:
|
|
1883
|
+
open: d,
|
|
1884
|
+
activeValue: f,
|
|
1885
|
+
contentId: c,
|
|
1886
|
+
activate: T,
|
|
1887
|
+
requestClose: x,
|
|
1888
|
+
dismiss: _,
|
|
1889
|
+
register: E,
|
|
1890
|
+
unregister: P
|
|
1560
1891
|
}),
|
|
1561
1892
|
[
|
|
1562
|
-
|
|
1563
|
-
u,
|
|
1564
|
-
i,
|
|
1565
|
-
$,
|
|
1893
|
+
T,
|
|
1566
1894
|
f,
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1895
|
+
c,
|
|
1896
|
+
_,
|
|
1897
|
+
d,
|
|
1898
|
+
E,
|
|
1899
|
+
x,
|
|
1900
|
+
P
|
|
1570
1901
|
]
|
|
1571
|
-
), F =
|
|
1572
|
-
return /* @__PURE__ */ C(
|
|
1902
|
+
), F = f ? u.get(f) : void 0, Ze = d && !!F, pe = k && F ? F.triggerElement.closest("dialog") ?? document.body : null;
|
|
1903
|
+
return /* @__PURE__ */ C(Je.Provider, { value: Qe, children: [
|
|
1573
1904
|
t,
|
|
1574
|
-
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
|
|
1905
|
+
pe && F ? re(
|
|
1906
|
+
/* @__PURE__ */ l(le, { reducedMotion: "user", children: /* @__PURE__ */ l(A, { children: Ze ? /* @__PURE__ */ l(
|
|
1907
|
+
Bt,
|
|
1577
1908
|
{
|
|
1578
|
-
activeValue:
|
|
1909
|
+
activeValue: f ?? "",
|
|
1579
1910
|
content: F.content,
|
|
1580
|
-
contentClassName:
|
|
1581
|
-
contentId:
|
|
1582
|
-
dismiss:
|
|
1911
|
+
contentClassName: p,
|
|
1912
|
+
contentId: c,
|
|
1913
|
+
dismiss: _,
|
|
1583
1914
|
triggerElement: F.triggerElement,
|
|
1584
1915
|
side: e,
|
|
1585
1916
|
align: n,
|
|
1586
1917
|
sideOffset: o,
|
|
1587
|
-
collisionPadding:
|
|
1918
|
+
collisionPadding: i,
|
|
1588
1919
|
avoidCollisions: s
|
|
1589
1920
|
},
|
|
1590
1921
|
"uk-tooltip-group"
|
|
1591
1922
|
) : null }) }),
|
|
1592
|
-
|
|
1923
|
+
pe
|
|
1593
1924
|
) : null
|
|
1594
1925
|
] });
|
|
1595
1926
|
}
|
|
1596
|
-
function
|
|
1927
|
+
function zt({
|
|
1597
1928
|
value: t,
|
|
1598
1929
|
content: e,
|
|
1599
1930
|
children: n
|
|
1600
1931
|
}) {
|
|
1601
|
-
const o =
|
|
1932
|
+
const o = At("Tooltip.Item"), { register: i, unregister: s } = o, [a, r] = O(
|
|
1602
1933
|
null
|
|
1603
1934
|
);
|
|
1604
|
-
if (!
|
|
1935
|
+
if (!W(n))
|
|
1605
1936
|
throw new Error("<Tooltip.Item> expects a single valid React element");
|
|
1606
|
-
const
|
|
1607
|
-
(
|
|
1608
|
-
|
|
1937
|
+
const p = n, c = p.props, u = c.ref ?? p.ref, h = c.onPointerEnter, d = c.onPointerLeave, y = c.onFocus, f = c.onBlur, b = c.onKeyDown, g = o.open && o.activeValue === t, v = B(
|
|
1938
|
+
(k) => {
|
|
1939
|
+
Ue(u, k), r(k);
|
|
1609
1940
|
},
|
|
1610
|
-
[
|
|
1941
|
+
[u, r]
|
|
1611
1942
|
);
|
|
1612
|
-
return
|
|
1943
|
+
return ne(() => {
|
|
1613
1944
|
if (a)
|
|
1614
|
-
return
|
|
1615
|
-
}, [e,
|
|
1945
|
+
return i(t, a, e), () => s(t);
|
|
1946
|
+
}, [e, i, a, s, t]), Y(p, {
|
|
1616
1947
|
ref: v,
|
|
1617
|
-
"aria-describedby":
|
|
1618
|
-
onPointerEnter:
|
|
1619
|
-
o.activate(t,
|
|
1948
|
+
"aria-describedby": g ? je(c["aria-describedby"], o.contentId) : c["aria-describedby"],
|
|
1949
|
+
onPointerEnter: M(h, (k) => {
|
|
1950
|
+
o.activate(t, k.pointerType === "touch");
|
|
1620
1951
|
}),
|
|
1621
|
-
onPointerLeave:
|
|
1622
|
-
|
|
1952
|
+
onPointerLeave: M(d, (k) => {
|
|
1953
|
+
k.pointerType !== "touch" && o.requestClose();
|
|
1623
1954
|
}),
|
|
1624
|
-
onFocus:
|
|
1955
|
+
onFocus: M(y, () => {
|
|
1625
1956
|
o.activate(t);
|
|
1626
1957
|
}),
|
|
1627
|
-
onBlur:
|
|
1958
|
+
onBlur: M(f, () => {
|
|
1628
1959
|
o.requestClose();
|
|
1629
1960
|
}),
|
|
1630
|
-
onKeyDown:
|
|
1631
|
-
|
|
1961
|
+
onKeyDown: M(b, (k) => {
|
|
1962
|
+
k.key === "Escape" && g && (k.preventDefault(), k.stopPropagation(), o.dismiss());
|
|
1632
1963
|
})
|
|
1633
1964
|
});
|
|
1634
1965
|
}
|
|
1635
|
-
const
|
|
1636
|
-
Root:
|
|
1637
|
-
Trigger:
|
|
1638
|
-
Content:
|
|
1639
|
-
Group:
|
|
1640
|
-
Item:
|
|
1966
|
+
const Zt = {
|
|
1967
|
+
Root: Lt,
|
|
1968
|
+
Trigger: St,
|
|
1969
|
+
Content: Mt,
|
|
1970
|
+
Group: Ht,
|
|
1971
|
+
Item: zt
|
|
1641
1972
|
};
|
|
1642
1973
|
export {
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1974
|
+
we as Button,
|
|
1975
|
+
rt as CheckBox,
|
|
1976
|
+
Jt as Dialog,
|
|
1977
|
+
jt as Input,
|
|
1978
|
+
Qt as Marquee,
|
|
1979
|
+
Ut as Select,
|
|
1980
|
+
Wt as Sidebar,
|
|
1981
|
+
Xt as Switch,
|
|
1982
|
+
Yt as Tabs,
|
|
1983
|
+
Zt as Tooltip
|
|
1652
1984
|
};
|
|
1653
1985
|
//# sourceMappingURL=index.js.map
|