seam-react 0.5.1 → 0.6.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/README.md +0 -2
- package/dist/Marquee.d.ts +11 -0
- package/dist/SeamStyles.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +385 -345
- package/dist/index.js.map +1 -1
- package/dist/styles.cjs +117 -2
- package/dist/styles.cjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.js +117 -2
- package/dist/styles.js.map +1 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as C, jsx as c, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as P, useId as R, useRef as
|
|
3
|
-
import { useReducedMotion as V, useMotionValue as
|
|
2
|
+
import { forwardRef as P, useId as R, useRef as E, useEffect as O, useState as M, useMemo as K, isValidElement as Z, cloneElement as U, createContext as j, useContext as X, useSyncExternalStore as oe, useLayoutEffect as re, Children as Xe, useCallback as F } from "react";
|
|
3
|
+
import { useReducedMotion as V, useMotionValue as Ye, animate as fe, motion as N, LayoutGroup as We, AnimatePresence as A, MotionConfig as ie, useIsPresent as ae } from "motion/react";
|
|
4
4
|
import { createPortal as se } from "react-dom";
|
|
5
|
-
import { useControllableState as Y, useEventCallback as S, useLockBodyScroll as
|
|
6
|
-
function
|
|
5
|
+
import { useControllableState as Y, useEventCallback as S, useLockBodyScroll as Je, useFocusTrap as Qe } from "seam-hooks";
|
|
6
|
+
function T(...t) {
|
|
7
7
|
return t.filter(Boolean).join(" ");
|
|
8
8
|
}
|
|
9
9
|
const ye = P(function({
|
|
@@ -13,29 +13,29 @@ const ye = P(function({
|
|
|
13
13
|
iconOnly: r = !1,
|
|
14
14
|
type: s = "button",
|
|
15
15
|
className: a,
|
|
16
|
-
children:
|
|
17
|
-
...
|
|
16
|
+
children: d,
|
|
17
|
+
...l
|
|
18
18
|
}, i) {
|
|
19
19
|
return /* @__PURE__ */ C(
|
|
20
20
|
"button",
|
|
21
21
|
{
|
|
22
|
-
...
|
|
22
|
+
...l,
|
|
23
23
|
ref: i,
|
|
24
24
|
type: s,
|
|
25
|
-
className:
|
|
25
|
+
className: T("uk-button", a),
|
|
26
26
|
"data-variant": e,
|
|
27
27
|
"data-size": n,
|
|
28
28
|
"data-loading": o ? "true" : void 0,
|
|
29
29
|
"data-icon-only": r ? "true" : void 0,
|
|
30
|
-
disabled:
|
|
30
|
+
disabled: l.disabled || o,
|
|
31
31
|
"aria-busy": o || void 0,
|
|
32
32
|
children: [
|
|
33
33
|
o ? /* @__PURE__ */ c("span", { className: "uk-button__spinner", "aria-hidden": "true" }) : null,
|
|
34
|
-
|
|
34
|
+
d
|
|
35
35
|
]
|
|
36
36
|
}
|
|
37
37
|
);
|
|
38
|
-
}),
|
|
38
|
+
}), Dt = P(function({
|
|
39
39
|
inputSize: e = "md",
|
|
40
40
|
invalid: n = !1,
|
|
41
41
|
className: o,
|
|
@@ -47,12 +47,12 @@ const ye = P(function({
|
|
|
47
47
|
{
|
|
48
48
|
...s,
|
|
49
49
|
ref: a,
|
|
50
|
-
className:
|
|
50
|
+
className: T("uk-input", o),
|
|
51
51
|
"data-size": e,
|
|
52
52
|
"aria-invalid": n ? !0 : r
|
|
53
53
|
}
|
|
54
54
|
);
|
|
55
|
-
}), Q = [0.23, 1, 0.32, 1],
|
|
55
|
+
}), Q = [0.23, 1, 0.32, 1], Ze = [0.77, 0, 0.175, 1], he = {
|
|
56
56
|
type: "spring",
|
|
57
57
|
bounce: 0,
|
|
58
58
|
duration: 0.3
|
|
@@ -64,50 +64,50 @@ const ye = P(function({
|
|
|
64
64
|
type: "spring",
|
|
65
65
|
bounce: 0.08,
|
|
66
66
|
duration: 0.34
|
|
67
|
-
},
|
|
67
|
+
}, et = {
|
|
68
68
|
duration: 0.2,
|
|
69
|
-
ease:
|
|
69
|
+
ease: Ze
|
|
70
70
|
}, ve = {
|
|
71
71
|
duration: 0.12,
|
|
72
72
|
ease: Q
|
|
73
|
-
},
|
|
73
|
+
}, tt = {
|
|
74
74
|
layout: { type: "spring", bounce: 0, duration: 0.22 },
|
|
75
75
|
opacity: { duration: 0.12, ease: Q },
|
|
76
76
|
scale: { duration: 0.12, ease: Q }
|
|
77
|
-
},
|
|
77
|
+
}, z = {
|
|
78
78
|
duration: 0.12,
|
|
79
79
|
ease: Q
|
|
80
|
-
},
|
|
80
|
+
}, Rt = P(function({
|
|
81
81
|
checked: e,
|
|
82
82
|
defaultChecked: n,
|
|
83
83
|
onCheckedChange: o,
|
|
84
84
|
disabled: r,
|
|
85
85
|
className: s,
|
|
86
86
|
children: a,
|
|
87
|
-
id:
|
|
88
|
-
...
|
|
87
|
+
id: d,
|
|
88
|
+
...l
|
|
89
89
|
}, i) {
|
|
90
|
-
const m = R(), h =
|
|
90
|
+
const m = R(), h = d ?? m, f = V() ?? !1, b = E(!1), p = E(null), [g, y] = Y({
|
|
91
91
|
value: e,
|
|
92
92
|
defaultValue: n ?? !1,
|
|
93
93
|
onChange: o
|
|
94
|
-
}), v =
|
|
94
|
+
}), v = Ye(g ? 16 : 0);
|
|
95
95
|
O(() => {
|
|
96
|
-
if (
|
|
96
|
+
if (p.current)
|
|
97
97
|
return;
|
|
98
|
-
const
|
|
98
|
+
const u = fe(
|
|
99
99
|
v,
|
|
100
100
|
g ? 16 : 0,
|
|
101
101
|
f ? { duration: 0 } : he
|
|
102
102
|
);
|
|
103
|
-
return () =>
|
|
103
|
+
return () => u.stop();
|
|
104
104
|
}, [g, f, v]);
|
|
105
|
-
const
|
|
106
|
-
const I =
|
|
107
|
-
if (!(!I || I.pointerId !==
|
|
105
|
+
const k = (u) => {
|
|
106
|
+
const I = p.current;
|
|
107
|
+
if (!(!I || I.pointerId !== u.pointerId)) {
|
|
108
108
|
if (I.moved) {
|
|
109
109
|
const w = I.samples[0], _ = I.samples[I.samples.length - 1], $ = w && _ ? Math.max(_.time - w.time, 1) : 1, L = w && _ ? (_.x - w.x) / $ * 1e3 : 0, x = Math.abs(L) > 220 ? L > 0 : v.get() >= 8;
|
|
110
|
-
b.current = !0,
|
|
110
|
+
b.current = !0, p.current = null, y(x), fe(
|
|
111
111
|
v,
|
|
112
112
|
x ? 16 : 0,
|
|
113
113
|
f ? { duration: 0 } : { ...he, velocity: L }
|
|
@@ -115,24 +115,24 @@ const ye = P(function({
|
|
|
115
115
|
b.current = !1;
|
|
116
116
|
}, 0);
|
|
117
117
|
} else
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
p.current = null;
|
|
119
|
+
u.currentTarget.hasPointerCapture(u.pointerId) && typeof u.currentTarget.releasePointerCapture == "function" && u.currentTarget.releasePointerCapture(u.pointerId);
|
|
120
120
|
}
|
|
121
121
|
};
|
|
122
122
|
return /* @__PURE__ */ C(
|
|
123
123
|
"label",
|
|
124
124
|
{
|
|
125
|
-
className:
|
|
125
|
+
className: T("uk-switch", s),
|
|
126
126
|
"data-disabled": r ? "true" : void 0,
|
|
127
127
|
htmlFor: h,
|
|
128
|
-
onClickCapture: (
|
|
129
|
-
b.current && (
|
|
128
|
+
onClickCapture: (u) => {
|
|
129
|
+
b.current && (u.preventDefault(), u.stopPropagation());
|
|
130
130
|
},
|
|
131
131
|
children: [
|
|
132
132
|
/* @__PURE__ */ c(
|
|
133
133
|
"input",
|
|
134
134
|
{
|
|
135
|
-
...
|
|
135
|
+
...l,
|
|
136
136
|
ref: i,
|
|
137
137
|
id: h,
|
|
138
138
|
type: "checkbox",
|
|
@@ -141,7 +141,7 @@ const ye = P(function({
|
|
|
141
141
|
checked: g,
|
|
142
142
|
disabled: r,
|
|
143
143
|
"aria-checked": g,
|
|
144
|
-
onChange: (
|
|
144
|
+
onChange: (u) => y(u.target.checked)
|
|
145
145
|
}
|
|
146
146
|
),
|
|
147
147
|
/* @__PURE__ */ c(
|
|
@@ -149,35 +149,35 @@ const ye = P(function({
|
|
|
149
149
|
{
|
|
150
150
|
className: "uk-switch__track",
|
|
151
151
|
"aria-hidden": "true",
|
|
152
|
-
onPointerDown: (
|
|
153
|
-
r || (
|
|
154
|
-
pointerId:
|
|
155
|
-
startX:
|
|
152
|
+
onPointerDown: (u) => {
|
|
153
|
+
r || (p.current = {
|
|
154
|
+
pointerId: u.pointerId,
|
|
155
|
+
startX: u.clientX,
|
|
156
156
|
startValue: v.get(),
|
|
157
157
|
moved: !1,
|
|
158
|
-
samples: [{ x:
|
|
159
|
-
}, typeof
|
|
158
|
+
samples: [{ x: u.clientX, time: performance.now() }]
|
|
159
|
+
}, typeof u.currentTarget.setPointerCapture == "function" && u.currentTarget.setPointerCapture(u.pointerId));
|
|
160
160
|
},
|
|
161
|
-
onPointerMove: (
|
|
162
|
-
const I =
|
|
163
|
-
if (!I || I.pointerId !==
|
|
161
|
+
onPointerMove: (u) => {
|
|
162
|
+
const I = p.current;
|
|
163
|
+
if (!I || I.pointerId !== u.pointerId)
|
|
164
164
|
return;
|
|
165
|
-
const w =
|
|
166
|
-
Math.abs(w) > 4 && (I.moved = !0), I.moved && (
|
|
165
|
+
const w = u.clientX - I.startX;
|
|
166
|
+
Math.abs(w) > 4 && (I.moved = !0), I.moved && (u.preventDefault(), v.set(Math.max(0, Math.min(16, I.startValue + w))), I.samples.push({ x: u.clientX, time: performance.now() }), I.samples = I.samples.filter(
|
|
167
167
|
(_) => performance.now() - _.time < 120
|
|
168
168
|
));
|
|
169
169
|
},
|
|
170
|
-
onPointerUp:
|
|
171
|
-
onPointerCancel:
|
|
172
|
-
children: /* @__PURE__ */ c(
|
|
170
|
+
onPointerUp: k,
|
|
171
|
+
onPointerCancel: k,
|
|
172
|
+
children: /* @__PURE__ */ c(N.span, { className: "uk-switch__thumb", style: { x: v } })
|
|
173
173
|
}
|
|
174
174
|
),
|
|
175
175
|
a ? /* @__PURE__ */ c("span", { className: "uk-switch__label", children: a }) : null
|
|
176
176
|
]
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
|
-
}), Ie =
|
|
180
|
-
function
|
|
179
|
+
}), Ie = j(null);
|
|
180
|
+
function ke(t) {
|
|
181
181
|
const e = X(Ie);
|
|
182
182
|
if (!e)
|
|
183
183
|
throw new Error(`<${t}> must be rendered inside <Sidebar>`);
|
|
@@ -188,7 +188,7 @@ function te(t, e) {
|
|
|
188
188
|
t?.(n), n.defaultPrevented || e(n);
|
|
189
189
|
};
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function nt({
|
|
192
192
|
children: t,
|
|
193
193
|
className: e,
|
|
194
194
|
hoverPreview: n = !0,
|
|
@@ -197,30 +197,30 @@ function tt({
|
|
|
197
197
|
style: s,
|
|
198
198
|
...a
|
|
199
199
|
}) {
|
|
200
|
-
const [
|
|
200
|
+
const [d, l] = M(null), i = R().replace(/:/g, ""), m = K(
|
|
201
201
|
() => ({
|
|
202
|
-
hoveredId:
|
|
203
|
-
setHoveredId:
|
|
202
|
+
hoveredId: d,
|
|
203
|
+
setHoveredId: l,
|
|
204
204
|
indicatorBaseId: i,
|
|
205
205
|
hoverPreview: n,
|
|
206
206
|
hoverIndicator: o
|
|
207
207
|
}),
|
|
208
|
-
[
|
|
208
|
+
[d, i, n, o]
|
|
209
209
|
), h = typeof r == "number" ? `${r}px` : r, f = {
|
|
210
210
|
...s,
|
|
211
211
|
...h === void 0 ? {} : { "--uk-sidebar-group-gap": h }
|
|
212
212
|
};
|
|
213
|
-
return /* @__PURE__ */ c(Ie.Provider, { value: m, children: /* @__PURE__ */ c(
|
|
213
|
+
return /* @__PURE__ */ c(Ie.Provider, { value: m, children: /* @__PURE__ */ c(We, { id: `sidebar-${i}`, children: /* @__PURE__ */ c(
|
|
214
214
|
"nav",
|
|
215
215
|
{
|
|
216
216
|
...a,
|
|
217
|
-
className:
|
|
217
|
+
className: T("uk-sidebar", e),
|
|
218
218
|
style: f,
|
|
219
219
|
children: t
|
|
220
220
|
}
|
|
221
221
|
) }) });
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function ot({
|
|
224
224
|
title: t,
|
|
225
225
|
icon: e,
|
|
226
226
|
collapsible: n = !1,
|
|
@@ -228,17 +228,17 @@ function nt({
|
|
|
228
228
|
defaultOpen: r = !0,
|
|
229
229
|
onOpenChange: s,
|
|
230
230
|
children: a,
|
|
231
|
-
className:
|
|
232
|
-
...
|
|
231
|
+
className: d,
|
|
232
|
+
...l
|
|
233
233
|
}) {
|
|
234
|
-
const i = R(), m = R(), h = R(), f =
|
|
234
|
+
const i = R(), m = R(), h = R(), f = E(null), b = E(null), p = ke("Sidebar.Group"), g = e != null, y = V() ?? !1, [v, k] = Y({
|
|
235
235
|
value: o,
|
|
236
236
|
defaultValue: r,
|
|
237
237
|
onChange: s
|
|
238
|
-
}),
|
|
238
|
+
}), u = n ? v : !0, I = p.hoveredId === h;
|
|
239
239
|
O(() => {
|
|
240
|
-
!n ||
|
|
241
|
-
}, [n,
|
|
240
|
+
!n || u || b.current?.contains(document.activeElement) && f.current?.focus();
|
|
241
|
+
}, [n, u]);
|
|
242
242
|
const w = /* @__PURE__ */ C(ge, { children: [
|
|
243
243
|
g ? /* @__PURE__ */ c("span", { className: "uk-sidebar__group-icon", "aria-hidden": "true", children: e }) : null,
|
|
244
244
|
/* @__PURE__ */ c("span", { className: "uk-sidebar__group-label", children: t }),
|
|
@@ -256,12 +256,12 @@ function nt({
|
|
|
256
256
|
return /* @__PURE__ */ C(
|
|
257
257
|
"section",
|
|
258
258
|
{
|
|
259
|
-
...
|
|
260
|
-
className:
|
|
261
|
-
"aria-labelledby":
|
|
259
|
+
...l,
|
|
260
|
+
className: T("uk-sidebar__group", d),
|
|
261
|
+
"aria-labelledby": l["aria-labelledby"] ?? i,
|
|
262
262
|
"data-collapsible": n ? "true" : "false",
|
|
263
263
|
"data-has-icon": g ? "true" : "false",
|
|
264
|
-
"data-state":
|
|
264
|
+
"data-state": u ? "open" : "closed",
|
|
265
265
|
children: [
|
|
266
266
|
n ? /* @__PURE__ */ C(
|
|
267
267
|
"button",
|
|
@@ -271,26 +271,26 @@ function nt({
|
|
|
271
271
|
className: "uk-sidebar__group-title uk-sidebar__group-trigger",
|
|
272
272
|
id: i,
|
|
273
273
|
"aria-controls": m,
|
|
274
|
-
"aria-expanded":
|
|
275
|
-
"data-preview":
|
|
276
|
-
onClick: () =>
|
|
274
|
+
"aria-expanded": u,
|
|
275
|
+
"data-preview": p.hoverIndicator === "background" && I ? "true" : void 0,
|
|
276
|
+
onClick: () => k((_) => !_),
|
|
277
277
|
onPointerEnter: (_) => {
|
|
278
|
-
|
|
278
|
+
p.hoverPreview && p.hoverIndicator === "background" && _.pointerType === "mouse" && p.setHoveredId(h);
|
|
279
279
|
},
|
|
280
280
|
onPointerLeave: () => {
|
|
281
|
-
|
|
281
|
+
p.hoveredId === h && p.setHoveredId(null);
|
|
282
282
|
},
|
|
283
283
|
onPointerCancel: () => {
|
|
284
|
-
|
|
284
|
+
p.hoveredId === h && p.setHoveredId(null);
|
|
285
285
|
},
|
|
286
286
|
children: [
|
|
287
|
-
/* @__PURE__ */ c(A, { initial: !1, children:
|
|
288
|
-
|
|
287
|
+
/* @__PURE__ */ c(A, { initial: !1, children: p.hoverPreview && p.hoverIndicator === "background" && I ? /* @__PURE__ */ c(
|
|
288
|
+
N.span,
|
|
289
289
|
{
|
|
290
290
|
className: "uk-sidebar__group-surface",
|
|
291
291
|
"data-kind": "hover",
|
|
292
292
|
"data-slot": "sidebar-hover-highlight",
|
|
293
|
-
layoutId: `${
|
|
293
|
+
layoutId: `${p.indicatorBaseId}-hover`,
|
|
294
294
|
"aria-hidden": "true",
|
|
295
295
|
initial: { opacity: 0 },
|
|
296
296
|
animate: { opacity: 1 },
|
|
@@ -303,20 +303,20 @@ function nt({
|
|
|
303
303
|
}
|
|
304
304
|
) : /* @__PURE__ */ c("div", { className: "uk-sidebar__group-title", id: i, children: w }),
|
|
305
305
|
/* @__PURE__ */ c(
|
|
306
|
-
|
|
306
|
+
N.div,
|
|
307
307
|
{
|
|
308
308
|
ref: b,
|
|
309
309
|
className: "uk-sidebar__content",
|
|
310
310
|
id: m,
|
|
311
|
-
"data-state":
|
|
311
|
+
"data-state": u ? "open" : "closed",
|
|
312
312
|
initial: !1,
|
|
313
313
|
animate: {
|
|
314
|
-
height:
|
|
315
|
-
opacity:
|
|
314
|
+
height: u ? "auto" : 0,
|
|
315
|
+
opacity: u ? 1 : 0
|
|
316
316
|
},
|
|
317
|
-
transition: y ? { duration: 0 } :
|
|
318
|
-
inert: n && !
|
|
319
|
-
"aria-hidden": n && !
|
|
317
|
+
transition: y ? { duration: 0 } : et,
|
|
318
|
+
inert: n && !u,
|
|
319
|
+
"aria-hidden": n && !u ? !0 : void 0,
|
|
320
320
|
children: /* @__PURE__ */ c("ul", { className: "uk-sidebar__list", children: a })
|
|
321
321
|
}
|
|
322
322
|
)
|
|
@@ -324,18 +324,18 @@ function nt({
|
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function rt({
|
|
328
328
|
active: t = !1,
|
|
329
329
|
children: e,
|
|
330
330
|
className: n
|
|
331
331
|
}) {
|
|
332
|
-
const o =
|
|
332
|
+
const o = ke("Sidebar.Item"), r = R(), a = V() ?? !1 ? { duration: 0 } : ce;
|
|
333
333
|
if (!Z(e))
|
|
334
334
|
throw new Error("<Sidebar.Item> expects a single valid React element");
|
|
335
|
-
const
|
|
335
|
+
const d = e, l = d.props, i = l.className, m = typeof i == "function" ? (y) => T("uk-sidebar__link", i(y), n) : T("uk-sidebar__link", i, n), h = l.onPointerEnter, f = l.onPointerLeave, b = l.onPointerCancel, p = o.hoveredId === r, g = /* @__PURE__ */ C(ge, { children: [
|
|
336
336
|
/* @__PURE__ */ c("span", { className: "uk-sidebar__rail", "aria-hidden": "true" }),
|
|
337
|
-
/* @__PURE__ */ c(A, { initial: !1, children: o.hoverPreview && o.hoverIndicator === "rail" &&
|
|
338
|
-
|
|
337
|
+
/* @__PURE__ */ c(A, { initial: !1, children: o.hoverPreview && o.hoverIndicator === "rail" && p ? /* @__PURE__ */ c(
|
|
338
|
+
N.span,
|
|
339
339
|
{
|
|
340
340
|
className: "uk-sidebar__rail-indicator",
|
|
341
341
|
"data-kind": "hover",
|
|
@@ -349,7 +349,7 @@ function ot({
|
|
|
349
349
|
}
|
|
350
350
|
) : null }),
|
|
351
351
|
/* @__PURE__ */ c(A, { initial: !1, children: o.hoverIndicator === "rail" && t ? /* @__PURE__ */ c(
|
|
352
|
-
|
|
352
|
+
N.span,
|
|
353
353
|
{
|
|
354
354
|
className: "uk-sidebar__rail-indicator",
|
|
355
355
|
"data-kind": "active",
|
|
@@ -362,8 +362,8 @@ function ot({
|
|
|
362
362
|
transition: a
|
|
363
363
|
}
|
|
364
364
|
) : null }),
|
|
365
|
-
/* @__PURE__ */ c(A, { initial: !1, children: o.hoverPreview && o.hoverIndicator === "background" &&
|
|
366
|
-
|
|
365
|
+
/* @__PURE__ */ c(A, { initial: !1, children: o.hoverPreview && o.hoverIndicator === "background" && p ? /* @__PURE__ */ c(
|
|
366
|
+
N.span,
|
|
367
367
|
{
|
|
368
368
|
className: "uk-sidebar__surface",
|
|
369
369
|
"data-kind": "hover",
|
|
@@ -377,7 +377,7 @@ function ot({
|
|
|
377
377
|
}
|
|
378
378
|
) : null }),
|
|
379
379
|
/* @__PURE__ */ c(A, { initial: !1, children: o.hoverIndicator === "background" && t ? /* @__PURE__ */ c(
|
|
380
|
-
|
|
380
|
+
N.span,
|
|
381
381
|
{
|
|
382
382
|
className: "uk-sidebar__surface",
|
|
383
383
|
"data-kind": "active",
|
|
@@ -390,15 +390,15 @@ function ot({
|
|
|
390
390
|
transition: a
|
|
391
391
|
}
|
|
392
392
|
) : null }),
|
|
393
|
-
/* @__PURE__ */ c("span", { className: "uk-sidebar__label", children:
|
|
393
|
+
/* @__PURE__ */ c("span", { className: "uk-sidebar__label", children: l.children })
|
|
394
394
|
] });
|
|
395
|
-
return /* @__PURE__ */ c("li", { className: "uk-sidebar__item", children:
|
|
396
|
-
|
|
395
|
+
return /* @__PURE__ */ c("li", { className: "uk-sidebar__item", children: U(
|
|
396
|
+
d,
|
|
397
397
|
{
|
|
398
398
|
className: m,
|
|
399
399
|
"data-active": t ? "true" : "false",
|
|
400
|
-
"data-preview": t ||
|
|
401
|
-
"aria-current":
|
|
400
|
+
"data-preview": t || p ? "true" : "false",
|
|
401
|
+
"aria-current": l["aria-current"] ?? (t ? "page" : void 0),
|
|
402
402
|
onPointerEnter: te(
|
|
403
403
|
h,
|
|
404
404
|
(y) => {
|
|
@@ -415,12 +415,12 @@ function ot({
|
|
|
415
415
|
g
|
|
416
416
|
) });
|
|
417
417
|
}
|
|
418
|
-
const
|
|
419
|
-
Group:
|
|
420
|
-
Item:
|
|
421
|
-
}),
|
|
418
|
+
const Lt = Object.assign(nt, {
|
|
419
|
+
Group: ot,
|
|
420
|
+
Item: rt
|
|
421
|
+
}), Te = j(null);
|
|
422
422
|
function le(t) {
|
|
423
|
-
const e = X(
|
|
423
|
+
const e = X(Te);
|
|
424
424
|
if (!e)
|
|
425
425
|
throw new Error(`<${t}> must be rendered inside <Tabs>`);
|
|
426
426
|
return e;
|
|
@@ -431,7 +431,7 @@ function we(t, e) {
|
|
|
431
431
|
function _e(t, e) {
|
|
432
432
|
return `${t}-panel-${encodeURIComponent(e)}`;
|
|
433
433
|
}
|
|
434
|
-
function
|
|
434
|
+
function it({
|
|
435
435
|
value: t,
|
|
436
436
|
defaultValue: e,
|
|
437
437
|
onValueChange: n,
|
|
@@ -439,23 +439,23 @@ function rt({
|
|
|
439
439
|
className: r,
|
|
440
440
|
children: s
|
|
441
441
|
}) {
|
|
442
|
-
const a = R(), [
|
|
442
|
+
const a = R(), [d, l] = Y({
|
|
443
443
|
value: t,
|
|
444
444
|
defaultValue: e ?? "",
|
|
445
445
|
onChange: n
|
|
446
|
-
}), i =
|
|
446
|
+
}), i = K(
|
|
447
447
|
() => ({
|
|
448
448
|
baseId: a,
|
|
449
|
-
value:
|
|
450
|
-
setValue:
|
|
449
|
+
value: d,
|
|
450
|
+
setValue: l,
|
|
451
451
|
orientation: o,
|
|
452
452
|
indicatorId: `${a}-indicator`
|
|
453
453
|
}),
|
|
454
|
-
[a,
|
|
454
|
+
[a, d, o, l]
|
|
455
455
|
);
|
|
456
|
-
return /* @__PURE__ */ c(
|
|
456
|
+
return /* @__PURE__ */ c(Te.Provider, { value: i, children: /* @__PURE__ */ c("div", { className: T("uk-tabs", r), "data-orientation": o, children: s }) });
|
|
457
457
|
}
|
|
458
|
-
const
|
|
458
|
+
const at = P(function({ className: e, onKeyDown: n, ...o }, r) {
|
|
459
459
|
const { orientation: s } = le("Tabs.List");
|
|
460
460
|
return /* @__PURE__ */ c(
|
|
461
461
|
"div",
|
|
@@ -465,18 +465,18 @@ const it = P(function({ className: e, onKeyDown: n, ...o }, r) {
|
|
|
465
465
|
role: "tablist",
|
|
466
466
|
"aria-orientation": s,
|
|
467
467
|
tabIndex: -1,
|
|
468
|
-
className:
|
|
468
|
+
className: T("uk-tabs__list", e),
|
|
469
469
|
onKeyDown: (a) => {
|
|
470
470
|
if (n?.(a), a.defaultPrevented)
|
|
471
471
|
return;
|
|
472
|
-
const
|
|
473
|
-
if (!
|
|
472
|
+
const l = a.target?.closest('[role="tab"]');
|
|
473
|
+
if (!l || l.hasAttribute("disabled"))
|
|
474
474
|
return;
|
|
475
475
|
const i = Array.from(
|
|
476
476
|
a.currentTarget.querySelectorAll(
|
|
477
477
|
'[role="tab"]:not([disabled])'
|
|
478
478
|
)
|
|
479
|
-
), m = i.indexOf(
|
|
479
|
+
), m = i.indexOf(l);
|
|
480
480
|
if (m === -1)
|
|
481
481
|
return;
|
|
482
482
|
const h = s === "horizontal" ? "ArrowRight" : "ArrowDown", f = s === "horizontal" ? "ArrowLeft" : "ArrowUp";
|
|
@@ -498,36 +498,36 @@ const it = P(function({ className: e, onKeyDown: n, ...o }, r) {
|
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
500
|
a.preventDefault();
|
|
501
|
-
const
|
|
502
|
-
|
|
501
|
+
const p = i[b];
|
|
502
|
+
p && (p.focus(), p.click());
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
505
|
);
|
|
506
|
-
}),
|
|
507
|
-
const
|
|
506
|
+
}), st = P(function({ value: e, type: n = "button", className: o, onClick: r, children: s, ...a }, d) {
|
|
507
|
+
const l = le("Tabs.Trigger"), i = l.value === e, m = V() ?? !1;
|
|
508
508
|
return /* @__PURE__ */ C(
|
|
509
509
|
"button",
|
|
510
510
|
{
|
|
511
511
|
...a,
|
|
512
|
-
ref:
|
|
512
|
+
ref: d,
|
|
513
513
|
type: n,
|
|
514
514
|
role: "tab",
|
|
515
|
-
id: we(
|
|
515
|
+
id: we(l.baseId, e),
|
|
516
516
|
"aria-selected": i,
|
|
517
|
-
"aria-controls": _e(
|
|
517
|
+
"aria-controls": _e(l.baseId, e),
|
|
518
518
|
tabIndex: i ? 0 : -1,
|
|
519
519
|
"data-state": i ? "active" : "inactive",
|
|
520
|
-
className:
|
|
520
|
+
className: T("uk-tabs__trigger", o),
|
|
521
521
|
onClick: (h) => {
|
|
522
|
-
r?.(h), h.defaultPrevented ||
|
|
522
|
+
r?.(h), h.defaultPrevented || l.setValue(e);
|
|
523
523
|
},
|
|
524
524
|
children: [
|
|
525
525
|
s,
|
|
526
526
|
i ? /* @__PURE__ */ c(
|
|
527
|
-
|
|
527
|
+
N.span,
|
|
528
528
|
{
|
|
529
529
|
className: "uk-tabs__indicator",
|
|
530
|
-
layoutId:
|
|
530
|
+
layoutId: l.indicatorId,
|
|
531
531
|
"aria-hidden": "true",
|
|
532
532
|
transition: m ? { duration: 0 } : ce
|
|
533
533
|
}
|
|
@@ -535,7 +535,7 @@ const it = P(function({ className: e, onKeyDown: n, ...o }, r) {
|
|
|
535
535
|
]
|
|
536
536
|
}
|
|
537
537
|
);
|
|
538
|
-
}),
|
|
538
|
+
}), ct = P(function({ value: e, className: n, ...o }, r) {
|
|
539
539
|
const s = le("Tabs.Content"), a = s.value === e;
|
|
540
540
|
return /* @__PURE__ */ c(
|
|
541
541
|
"div",
|
|
@@ -548,15 +548,15 @@ const it = P(function({ className: e, onKeyDown: n, ...o }, r) {
|
|
|
548
548
|
hidden: !a,
|
|
549
549
|
tabIndex: 0,
|
|
550
550
|
"data-state": a ? "active" : "inactive",
|
|
551
|
-
className:
|
|
551
|
+
className: T("uk-tabs__panel", n)
|
|
552
552
|
}
|
|
553
553
|
);
|
|
554
|
-
}),
|
|
555
|
-
List:
|
|
556
|
-
Trigger:
|
|
557
|
-
Content:
|
|
558
|
-
}), xe =
|
|
559
|
-
},
|
|
554
|
+
}), St = Object.assign(it, {
|
|
555
|
+
List: at,
|
|
556
|
+
Trigger: st,
|
|
557
|
+
Content: ct
|
|
558
|
+
}), xe = j(null), lt = () => () => {
|
|
559
|
+
}, ut = () => !0, dt = () => !1;
|
|
560
560
|
function W(t) {
|
|
561
561
|
const e = X(xe);
|
|
562
562
|
if (!e)
|
|
@@ -568,17 +568,17 @@ function Ce(t, e) {
|
|
|
568
568
|
t?.(n), n.defaultPrevented || e(n);
|
|
569
569
|
};
|
|
570
570
|
}
|
|
571
|
-
function
|
|
571
|
+
function Ne({
|
|
572
572
|
children: t,
|
|
573
573
|
open: e,
|
|
574
574
|
defaultOpen: n,
|
|
575
575
|
onOpenChange: o
|
|
576
576
|
}) {
|
|
577
|
-
const r = R(), [s, a] = M(!1), [
|
|
577
|
+
const r = R(), [s, a] = M(!1), [d, l] = M(!1), [i, m] = Y({
|
|
578
578
|
value: e,
|
|
579
579
|
defaultValue: n ?? !1,
|
|
580
580
|
onChange: o
|
|
581
|
-
}), h =
|
|
581
|
+
}), h = K(
|
|
582
582
|
() => ({
|
|
583
583
|
open: i,
|
|
584
584
|
setOpen: m,
|
|
@@ -588,16 +588,16 @@ function Ee({
|
|
|
588
588
|
descriptionId: `${r}-description`,
|
|
589
589
|
hasTitle: s,
|
|
590
590
|
setHasTitle: a,
|
|
591
|
-
hasDescription:
|
|
592
|
-
setHasDescription:
|
|
591
|
+
hasDescription: d,
|
|
592
|
+
setHasDescription: l
|
|
593
593
|
}),
|
|
594
|
-
[r, i,
|
|
594
|
+
[r, i, d, s, m]
|
|
595
595
|
);
|
|
596
596
|
return /* @__PURE__ */ c(xe.Provider, { value: h, children: t });
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function pt({ children: t }) {
|
|
599
599
|
const e = W("Dialog.Trigger"), n = t, o = n.props.onClick;
|
|
600
|
-
return
|
|
600
|
+
return U(n, {
|
|
601
601
|
id: e.triggerId,
|
|
602
602
|
"aria-haspopup": "dialog",
|
|
603
603
|
"aria-expanded": e.open,
|
|
@@ -607,14 +607,14 @@ function dt({ children: t }) {
|
|
|
607
607
|
})
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function Ee({
|
|
611
611
|
children: t,
|
|
612
612
|
label: e = "Close"
|
|
613
613
|
}) {
|
|
614
614
|
const n = W("Dialog.Close");
|
|
615
615
|
if (Z(t)) {
|
|
616
616
|
const o = t, r = o.props.onClick;
|
|
617
|
-
return
|
|
617
|
+
return U(o, {
|
|
618
618
|
onClick: Ce(r, () => {
|
|
619
619
|
n.setOpen(!1);
|
|
620
620
|
})
|
|
@@ -628,7 +628,7 @@ const Pe = P(function({ className: e, ...n }, o) {
|
|
|
628
628
|
{
|
|
629
629
|
...n,
|
|
630
630
|
ref: o,
|
|
631
|
-
className:
|
|
631
|
+
className: T("uk-dialog__header", e)
|
|
632
632
|
}
|
|
633
633
|
);
|
|
634
634
|
}), De = P(function({ className: e, children: n, ...o }, r) {
|
|
@@ -639,7 +639,7 @@ const Pe = P(function({ className: e, ...n }, o) {
|
|
|
639
639
|
...o,
|
|
640
640
|
ref: r,
|
|
641
641
|
id: s.titleId,
|
|
642
|
-
className:
|
|
642
|
+
className: T("uk-dialog__title", e),
|
|
643
643
|
children: n
|
|
644
644
|
}
|
|
645
645
|
);
|
|
@@ -652,23 +652,23 @@ const Pe = P(function({ className: e, ...n }, o) {
|
|
|
652
652
|
...n,
|
|
653
653
|
ref: o,
|
|
654
654
|
id: r.descriptionId,
|
|
655
|
-
className:
|
|
655
|
+
className: T("uk-dialog__description", e)
|
|
656
656
|
}
|
|
657
657
|
);
|
|
658
658
|
}
|
|
659
659
|
), Le = P(function({ className: e, ...n }, o) {
|
|
660
|
-
return /* @__PURE__ */ c("div", { ...n, ref: o, className:
|
|
660
|
+
return /* @__PURE__ */ c("div", { ...n, ref: o, className: T("uk-dialog__body", e) });
|
|
661
661
|
}), Se = P(function({ className: e, ...n }, o) {
|
|
662
662
|
return /* @__PURE__ */ c(
|
|
663
663
|
"footer",
|
|
664
664
|
{
|
|
665
665
|
...n,
|
|
666
666
|
ref: o,
|
|
667
|
-
className:
|
|
667
|
+
className: T("uk-dialog__footer", e)
|
|
668
668
|
}
|
|
669
669
|
);
|
|
670
670
|
});
|
|
671
|
-
function
|
|
671
|
+
function ft({
|
|
672
672
|
requestClose: t,
|
|
673
673
|
contentId: e,
|
|
674
674
|
titleId: n,
|
|
@@ -676,72 +676,72 @@ function pt({
|
|
|
676
676
|
hasTitle: r,
|
|
677
677
|
hasDescription: s,
|
|
678
678
|
children: a,
|
|
679
|
-
closeOnBackdropClick:
|
|
680
|
-
closeOnEscape:
|
|
679
|
+
closeOnBackdropClick: d = !0,
|
|
680
|
+
closeOnEscape: l = !0,
|
|
681
681
|
initialFocusRef: i,
|
|
682
682
|
returnFocusRef: m,
|
|
683
683
|
className: h,
|
|
684
684
|
"aria-label": f,
|
|
685
685
|
"aria-labelledby": b,
|
|
686
|
-
"aria-describedby":
|
|
686
|
+
"aria-describedby": p
|
|
687
687
|
}) {
|
|
688
|
-
const g =
|
|
689
|
-
return
|
|
690
|
-
const
|
|
691
|
-
|
|
692
|
-
}, []),
|
|
688
|
+
const g = E(null), y = E(null), v = ae(), k = V() ?? !1;
|
|
689
|
+
return Je(!0), re(() => {
|
|
690
|
+
const u = g.current;
|
|
691
|
+
u && (y.current ?? (y.current = document.activeElement instanceof HTMLElement ? document.activeElement : null), !u.open && (typeof u.showModal == "function" ? u.showModal() : u.setAttribute("open", "")));
|
|
692
|
+
}, []), Qe({
|
|
693
693
|
active: !0,
|
|
694
694
|
containerRef: g,
|
|
695
695
|
initialFocusRef: i,
|
|
696
696
|
returnFocusRef: m ?? y
|
|
697
697
|
}), O(() => {
|
|
698
|
-
const
|
|
699
|
-
if (!
|
|
698
|
+
const u = g.current;
|
|
699
|
+
if (!u)
|
|
700
700
|
return;
|
|
701
701
|
const I = () => {
|
|
702
|
-
|
|
702
|
+
u.open || (typeof u.showModal == "function" ? u.showModal() : u.setAttribute("open", ""));
|
|
703
703
|
}, w = () => {
|
|
704
|
-
if (!
|
|
704
|
+
if (!l) {
|
|
705
705
|
I();
|
|
706
706
|
return;
|
|
707
707
|
}
|
|
708
708
|
t();
|
|
709
709
|
}, _ = (x) => {
|
|
710
|
-
x.preventDefault(),
|
|
710
|
+
x.preventDefault(), l && t();
|
|
711
711
|
}, $ = (x) => {
|
|
712
|
-
|
|
712
|
+
l || x.key !== "Escape" || x.defaultPrevented || (x.preventDefault(), x.stopPropagation());
|
|
713
713
|
}, L = (x) => {
|
|
714
|
-
|
|
714
|
+
d && x.target === u && t();
|
|
715
715
|
};
|
|
716
|
-
return
|
|
717
|
-
|
|
716
|
+
return u.addEventListener("close", w), u.addEventListener("cancel", _), u.addEventListener("keydown", $, !0), u.addEventListener("click", L), () => {
|
|
717
|
+
u.removeEventListener("close", w), u.removeEventListener("cancel", _), u.removeEventListener("keydown", $, !0), u.removeEventListener("click", L);
|
|
718
718
|
};
|
|
719
|
-
}, [
|
|
719
|
+
}, [d, l, t]), /* @__PURE__ */ c(
|
|
720
720
|
"dialog",
|
|
721
721
|
{
|
|
722
722
|
ref: g,
|
|
723
723
|
id: e,
|
|
724
|
-
className:
|
|
725
|
-
closedby:
|
|
724
|
+
className: T("uk-dialog", h),
|
|
725
|
+
closedby: l || d ? "any" : "none",
|
|
726
726
|
"data-state": v ? "open" : "closed",
|
|
727
727
|
inert: !v,
|
|
728
728
|
"aria-label": f,
|
|
729
729
|
"aria-labelledby": b ?? (f ? void 0 : r ? n : void 0),
|
|
730
|
-
"aria-describedby":
|
|
730
|
+
"aria-describedby": p ?? (s ? o : void 0),
|
|
731
731
|
children: /* @__PURE__ */ c(
|
|
732
|
-
|
|
732
|
+
N.div,
|
|
733
733
|
{
|
|
734
734
|
className: "uk-dialog__panel",
|
|
735
|
-
initial:
|
|
735
|
+
initial: k ? { opacity: 0 } : {
|
|
736
736
|
opacity: 0,
|
|
737
737
|
transform: "translateY(12px) scale(0.96)"
|
|
738
738
|
},
|
|
739
739
|
animate: {
|
|
740
740
|
opacity: 1,
|
|
741
741
|
transform: "translateY(0px) scale(1)",
|
|
742
|
-
transition:
|
|
742
|
+
transition: k ? z : { ...me, delay: 0.06 }
|
|
743
743
|
},
|
|
744
|
-
exit:
|
|
744
|
+
exit: k ? { opacity: 0, transition: z } : {
|
|
745
745
|
opacity: 0,
|
|
746
746
|
transform: "translateY(8px) scale(0.97)",
|
|
747
747
|
transition: me
|
|
@@ -760,19 +760,19 @@ function Me({
|
|
|
760
760
|
returnFocusRef: r,
|
|
761
761
|
className: s,
|
|
762
762
|
"aria-label": a,
|
|
763
|
-
"aria-labelledby":
|
|
764
|
-
"aria-describedby":
|
|
763
|
+
"aria-labelledby": d,
|
|
764
|
+
"aria-describedby": l
|
|
765
765
|
}) {
|
|
766
766
|
const i = W("Dialog.Content"), m = S(() => {
|
|
767
767
|
i.setOpen(!1);
|
|
768
768
|
});
|
|
769
769
|
return oe(
|
|
770
|
-
ct,
|
|
771
770
|
lt,
|
|
772
|
-
ut
|
|
771
|
+
ut,
|
|
772
|
+
dt
|
|
773
773
|
) ? se(
|
|
774
774
|
/* @__PURE__ */ c(ie, { reducedMotion: "user", children: /* @__PURE__ */ c(A, { children: i.open ? /* @__PURE__ */ c(
|
|
775
|
-
|
|
775
|
+
ft,
|
|
776
776
|
{
|
|
777
777
|
requestClose: m,
|
|
778
778
|
contentId: i.contentId,
|
|
@@ -786,8 +786,8 @@ function Me({
|
|
|
786
786
|
returnFocusRef: r,
|
|
787
787
|
className: s,
|
|
788
788
|
"aria-label": a,
|
|
789
|
-
"aria-labelledby":
|
|
790
|
-
"aria-describedby":
|
|
789
|
+
"aria-labelledby": d,
|
|
790
|
+
"aria-describedby": l,
|
|
791
791
|
children: t
|
|
792
792
|
},
|
|
793
793
|
"uk-dialog"
|
|
@@ -795,7 +795,7 @@ function Me({
|
|
|
795
795
|
document.body
|
|
796
796
|
) : null;
|
|
797
797
|
}
|
|
798
|
-
function
|
|
798
|
+
function ht({
|
|
799
799
|
open: t,
|
|
800
800
|
onOpenChange: e,
|
|
801
801
|
title: n,
|
|
@@ -803,30 +803,30 @@ function ft({
|
|
|
803
803
|
footer: r,
|
|
804
804
|
children: s,
|
|
805
805
|
closeLabel: a = "Close",
|
|
806
|
-
showCloseButton:
|
|
807
|
-
closeOnBackdropClick:
|
|
806
|
+
showCloseButton: d = !0,
|
|
807
|
+
closeOnBackdropClick: l = !0,
|
|
808
808
|
closeOnEscape: i = !0,
|
|
809
809
|
initialFocusRef: m,
|
|
810
810
|
returnFocusRef: h,
|
|
811
811
|
className: f,
|
|
812
812
|
"aria-label": b
|
|
813
813
|
}) {
|
|
814
|
-
return /* @__PURE__ */ c(
|
|
814
|
+
return /* @__PURE__ */ c(Ne, { open: t, onOpenChange: e, children: /* @__PURE__ */ C(
|
|
815
815
|
Me,
|
|
816
816
|
{
|
|
817
817
|
className: f,
|
|
818
|
-
closeOnBackdropClick:
|
|
818
|
+
closeOnBackdropClick: l,
|
|
819
819
|
closeOnEscape: i,
|
|
820
820
|
initialFocusRef: m,
|
|
821
821
|
returnFocusRef: h,
|
|
822
822
|
"aria-label": b,
|
|
823
823
|
children: [
|
|
824
|
-
n || o ||
|
|
824
|
+
n || o || d ? /* @__PURE__ */ C(Pe, { children: [
|
|
825
825
|
/* @__PURE__ */ C("div", { className: "uk-dialog__heading", children: [
|
|
826
826
|
n ? /* @__PURE__ */ c(De, { children: n }) : null,
|
|
827
827
|
o ? /* @__PURE__ */ c(Re, { children: o }) : null
|
|
828
828
|
] }),
|
|
829
|
-
|
|
829
|
+
d ? /* @__PURE__ */ c(Ee, { children: /* @__PURE__ */ c(
|
|
830
830
|
ye,
|
|
831
831
|
{
|
|
832
832
|
variant: "ghost",
|
|
@@ -861,17 +861,56 @@ function ft({
|
|
|
861
861
|
}
|
|
862
862
|
) });
|
|
863
863
|
}
|
|
864
|
-
const
|
|
865
|
-
Root:
|
|
866
|
-
Trigger:
|
|
864
|
+
const Mt = Object.assign(ht, {
|
|
865
|
+
Root: Ne,
|
|
866
|
+
Trigger: pt,
|
|
867
867
|
Content: Me,
|
|
868
868
|
Header: Pe,
|
|
869
869
|
Title: De,
|
|
870
870
|
Description: Re,
|
|
871
871
|
Body: Le,
|
|
872
872
|
Footer: Se,
|
|
873
|
-
Close:
|
|
874
|
-
}),
|
|
873
|
+
Close: Ee
|
|
874
|
+
}), Ot = P(function({
|
|
875
|
+
children: e,
|
|
876
|
+
className: n,
|
|
877
|
+
direction: o = "left",
|
|
878
|
+
speed: r = 30,
|
|
879
|
+
pauseOnHover: s = !0,
|
|
880
|
+
gap: a = "1rem",
|
|
881
|
+
fade: d = !0,
|
|
882
|
+
...l
|
|
883
|
+
}, i) {
|
|
884
|
+
const m = Xe.toArray(e);
|
|
885
|
+
return /* @__PURE__ */ c(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
...l,
|
|
889
|
+
ref: i,
|
|
890
|
+
className: T("uk-marquee", n),
|
|
891
|
+
"data-direction": o,
|
|
892
|
+
"data-fade": d ? "true" : void 0,
|
|
893
|
+
"data-pause-on-hover": s ? "true" : void 0,
|
|
894
|
+
style: {
|
|
895
|
+
...l.style,
|
|
896
|
+
"--uk-marquee-gap": a,
|
|
897
|
+
"--uk-marquee-duration": `${r}s`,
|
|
898
|
+
gap: a
|
|
899
|
+
},
|
|
900
|
+
children: [!1, !0].map((h) => /* @__PURE__ */ c(
|
|
901
|
+
"div",
|
|
902
|
+
{
|
|
903
|
+
"aria-hidden": h,
|
|
904
|
+
className: "uk-marquee__track",
|
|
905
|
+
"data-duplicate": h ? "true" : void 0,
|
|
906
|
+
inert: h,
|
|
907
|
+
children: m.map((f, b) => /* @__PURE__ */ c("div", { className: "uk-marquee__item", children: f }, b))
|
|
908
|
+
},
|
|
909
|
+
h ? "duplicate" : "primary"
|
|
910
|
+
))
|
|
911
|
+
}
|
|
912
|
+
);
|
|
913
|
+
}), Oe = j(null), $e = () => () => {
|
|
875
914
|
}, Be = () => !0, Ae = () => !1;
|
|
876
915
|
function He(t) {
|
|
877
916
|
const e = X(Oe);
|
|
@@ -882,7 +921,7 @@ function He(t) {
|
|
|
882
921
|
function Ve(t, e) {
|
|
883
922
|
typeof t == "function" ? t(e) : t && (t.current = e);
|
|
884
923
|
}
|
|
885
|
-
function
|
|
924
|
+
function qe(t, e) {
|
|
886
925
|
const n = typeof t == "string" ? t.split(/\s+/).filter(Boolean) : [];
|
|
887
926
|
return Array.from(/* @__PURE__ */ new Set([...n, e])).join(" ");
|
|
888
927
|
}
|
|
@@ -891,7 +930,7 @@ function D(t, e) {
|
|
|
891
930
|
t?.(n), n.defaultPrevented || e(n);
|
|
892
931
|
};
|
|
893
932
|
}
|
|
894
|
-
function
|
|
933
|
+
function mt({
|
|
895
934
|
children: t,
|
|
896
935
|
open: e,
|
|
897
936
|
defaultOpen: n,
|
|
@@ -899,19 +938,19 @@ function ht({
|
|
|
899
938
|
delayDuration: r = 300,
|
|
900
939
|
closeDelay: s = 80
|
|
901
940
|
}) {
|
|
902
|
-
const a = R(), [
|
|
941
|
+
const a = R(), [d, l] = M(
|
|
903
942
|
null
|
|
904
|
-
), i =
|
|
943
|
+
), i = E(null), m = E(null), [h, f] = Y({
|
|
905
944
|
value: e,
|
|
906
945
|
defaultValue: n ?? !1,
|
|
907
946
|
onChange: o
|
|
908
|
-
}), b =
|
|
947
|
+
}), b = F(() => {
|
|
909
948
|
i.current !== null && (clearTimeout(i.current), i.current = null);
|
|
910
|
-
}, []),
|
|
949
|
+
}, []), p = F(() => {
|
|
911
950
|
m.current !== null && (clearTimeout(m.current), m.current = null);
|
|
912
|
-
}, []), g = S((
|
|
913
|
-
if (b(),
|
|
914
|
-
if (
|
|
951
|
+
}, []), g = S((u = !1) => {
|
|
952
|
+
if (b(), p(), !h) {
|
|
953
|
+
if (u || r <= 0) {
|
|
915
954
|
f(!0);
|
|
916
955
|
return;
|
|
917
956
|
}
|
|
@@ -920,7 +959,7 @@ function ht({
|
|
|
920
959
|
}, r);
|
|
921
960
|
}
|
|
922
961
|
}), y = S(() => {
|
|
923
|
-
if (b(),
|
|
962
|
+
if (b(), p(), !!h) {
|
|
924
963
|
if (s <= 0) {
|
|
925
964
|
f(!1);
|
|
926
965
|
return;
|
|
@@ -930,50 +969,50 @@ function ht({
|
|
|
930
969
|
}, s);
|
|
931
970
|
}
|
|
932
971
|
}), v = S(() => {
|
|
933
|
-
b(),
|
|
972
|
+
b(), p(), f(!1);
|
|
934
973
|
});
|
|
935
974
|
O(() => {
|
|
936
|
-
h ?
|
|
937
|
-
}, [
|
|
975
|
+
h ? p() : b();
|
|
976
|
+
}, [p, b, h]), O(
|
|
938
977
|
() => () => {
|
|
939
|
-
b(),
|
|
978
|
+
b(), p();
|
|
940
979
|
},
|
|
941
|
-
[
|
|
980
|
+
[p, b]
|
|
942
981
|
);
|
|
943
|
-
const
|
|
982
|
+
const k = K(
|
|
944
983
|
() => ({
|
|
945
984
|
open: h,
|
|
946
|
-
triggerElement:
|
|
947
|
-
setTriggerElement:
|
|
985
|
+
triggerElement: d,
|
|
986
|
+
setTriggerElement: l,
|
|
948
987
|
contentId: a,
|
|
949
988
|
requestOpen: g,
|
|
950
989
|
requestClose: y,
|
|
951
990
|
dismiss: v
|
|
952
991
|
}),
|
|
953
|
-
[a, h, v, y, g,
|
|
992
|
+
[a, h, v, y, g, d]
|
|
954
993
|
);
|
|
955
|
-
return /* @__PURE__ */ c(Oe.Provider, { value:
|
|
994
|
+
return /* @__PURE__ */ c(Oe.Provider, { value: k, children: t });
|
|
956
995
|
}
|
|
957
|
-
function
|
|
996
|
+
function bt({ children: t }) {
|
|
958
997
|
const e = He("Tooltip.Trigger"), { setTriggerElement: n } = e;
|
|
959
998
|
if (!Z(t))
|
|
960
999
|
throw new Error("<Tooltip.Trigger> expects a single valid React element");
|
|
961
|
-
const o = t, r = o.props, s = r.ref ?? o.ref, a = r.onPointerEnter,
|
|
1000
|
+
const o = t, r = o.props, s = r.ref ?? o.ref, a = r.onPointerEnter, d = r.onPointerLeave, l = r.onFocus, i = r.onBlur, m = r.onKeyDown, h = F(
|
|
962
1001
|
(f) => {
|
|
963
1002
|
Ve(s, f), n(f);
|
|
964
1003
|
},
|
|
965
1004
|
[s, n]
|
|
966
1005
|
);
|
|
967
|
-
return
|
|
1006
|
+
return U(o, {
|
|
968
1007
|
ref: h,
|
|
969
|
-
"aria-describedby": e.open ?
|
|
1008
|
+
"aria-describedby": e.open ? qe(r["aria-describedby"], e.contentId) : r["aria-describedby"],
|
|
970
1009
|
onPointerEnter: D(a, (f) => {
|
|
971
1010
|
e.requestOpen(f.pointerType === "touch");
|
|
972
1011
|
}),
|
|
973
|
-
onPointerLeave: D(
|
|
1012
|
+
onPointerLeave: D(d, (f) => {
|
|
974
1013
|
f.pointerType !== "touch" && e.requestClose();
|
|
975
1014
|
}),
|
|
976
|
-
onFocus: D(
|
|
1015
|
+
onFocus: D(l, () => {
|
|
977
1016
|
e.requestOpen();
|
|
978
1017
|
}),
|
|
979
1018
|
onBlur: D(i, () => {
|
|
@@ -987,7 +1026,7 @@ function mt({ children: t }) {
|
|
|
987
1026
|
function J(t, e, n) {
|
|
988
1027
|
return n < e ? e : Math.min(Math.max(t, e), n);
|
|
989
1028
|
}
|
|
990
|
-
function
|
|
1029
|
+
function gt(t) {
|
|
991
1030
|
switch (t) {
|
|
992
1031
|
case "top":
|
|
993
1032
|
return "bottom";
|
|
@@ -1020,7 +1059,7 @@ function be(t, e, n, o, r, s, a) {
|
|
|
1020
1059
|
a
|
|
1021
1060
|
) >= (n === "top" || n === "bottom" ? e.height : e.width) + o;
|
|
1022
1061
|
}
|
|
1023
|
-
function
|
|
1062
|
+
function yt({
|
|
1024
1063
|
trigger: t,
|
|
1025
1064
|
tooltip: e,
|
|
1026
1065
|
side: n,
|
|
@@ -1028,8 +1067,8 @@ function gt({
|
|
|
1028
1067
|
sideOffset: r,
|
|
1029
1068
|
collisionPadding: s,
|
|
1030
1069
|
avoidCollisions: a,
|
|
1031
|
-
viewportWidth:
|
|
1032
|
-
viewportHeight:
|
|
1070
|
+
viewportWidth: d,
|
|
1071
|
+
viewportHeight: l
|
|
1033
1072
|
}) {
|
|
1034
1073
|
let i = n;
|
|
1035
1074
|
if (a && !be(
|
|
@@ -1037,32 +1076,32 @@ function gt({
|
|
|
1037
1076
|
e,
|
|
1038
1077
|
n,
|
|
1039
1078
|
r,
|
|
1040
|
-
p,
|
|
1041
1079
|
d,
|
|
1080
|
+
l,
|
|
1042
1081
|
s
|
|
1043
1082
|
)) {
|
|
1044
|
-
const y =
|
|
1083
|
+
const y = gt(n), v = be(
|
|
1045
1084
|
t,
|
|
1046
1085
|
e,
|
|
1047
1086
|
y,
|
|
1048
1087
|
r,
|
|
1049
|
-
p,
|
|
1050
1088
|
d,
|
|
1089
|
+
l,
|
|
1051
1090
|
s
|
|
1052
|
-
),
|
|
1091
|
+
), k = ne(
|
|
1053
1092
|
t,
|
|
1054
1093
|
n,
|
|
1055
|
-
p,
|
|
1056
1094
|
d,
|
|
1095
|
+
l,
|
|
1057
1096
|
s
|
|
1058
|
-
),
|
|
1097
|
+
), u = ne(
|
|
1059
1098
|
t,
|
|
1060
1099
|
y,
|
|
1061
|
-
p,
|
|
1062
1100
|
d,
|
|
1101
|
+
l,
|
|
1063
1102
|
s
|
|
1064
1103
|
);
|
|
1065
|
-
(v ||
|
|
1104
|
+
(v || u > k) && (i = y);
|
|
1066
1105
|
}
|
|
1067
1106
|
const m = t.left + t.width / 2, h = t.top + t.height / 2;
|
|
1068
1107
|
let f = 0, b = 0;
|
|
@@ -1079,39 +1118,39 @@ function gt({
|
|
|
1079
1118
|
a && (f = J(
|
|
1080
1119
|
f,
|
|
1081
1120
|
s,
|
|
1082
|
-
|
|
1121
|
+
d - e.width - s
|
|
1083
1122
|
), b = J(
|
|
1084
1123
|
b,
|
|
1085
1124
|
s,
|
|
1086
|
-
|
|
1125
|
+
l - e.height - s
|
|
1087
1126
|
));
|
|
1088
|
-
const
|
|
1127
|
+
const p = 10, g = i === "top" || i === "bottom" ? J(
|
|
1089
1128
|
m - f,
|
|
1090
|
-
|
|
1091
|
-
Math.max(
|
|
1129
|
+
p,
|
|
1130
|
+
Math.max(p, e.width - p)
|
|
1092
1131
|
) : J(
|
|
1093
1132
|
h - b,
|
|
1094
|
-
|
|
1095
|
-
Math.max(
|
|
1133
|
+
p,
|
|
1134
|
+
Math.max(p, e.height - p)
|
|
1096
1135
|
);
|
|
1097
1136
|
return { x: f, y: b, side: i, arrowOffset: g };
|
|
1098
1137
|
}
|
|
1099
|
-
function
|
|
1138
|
+
function Fe(t, e, {
|
|
1100
1139
|
side: n,
|
|
1101
1140
|
align: o,
|
|
1102
1141
|
sideOffset: r,
|
|
1103
1142
|
collisionPadding: s,
|
|
1104
1143
|
avoidCollisions: a
|
|
1105
1144
|
}) {
|
|
1106
|
-
const [
|
|
1145
|
+
const [d, l] = M(null);
|
|
1107
1146
|
return re(() => {
|
|
1108
1147
|
const i = e.current;
|
|
1109
1148
|
if (!i || !t)
|
|
1110
1149
|
return;
|
|
1111
1150
|
const m = () => {
|
|
1112
1151
|
const f = t.getBoundingClientRect(), b = i.getBoundingClientRect();
|
|
1113
|
-
|
|
1114
|
-
|
|
1152
|
+
l(
|
|
1153
|
+
yt({
|
|
1115
1154
|
trigger: f,
|
|
1116
1155
|
tooltip: b,
|
|
1117
1156
|
side: n,
|
|
@@ -1137,25 +1176,25 @@ function Ge(t, e, {
|
|
|
1137
1176
|
n,
|
|
1138
1177
|
r,
|
|
1139
1178
|
t
|
|
1140
|
-
]),
|
|
1179
|
+
]), d;
|
|
1141
1180
|
}
|
|
1142
|
-
function
|
|
1181
|
+
function Ge(t, e, n) {
|
|
1143
1182
|
O(() => {
|
|
1144
1183
|
const o = (a) => {
|
|
1145
|
-
const
|
|
1146
|
-
|
|
1184
|
+
const d = a.target;
|
|
1185
|
+
d instanceof Node && (t.contains(d) || e.current?.contains(d) || n());
|
|
1147
1186
|
}, r = () => {
|
|
1148
1187
|
document.visibilityState === "hidden" && n();
|
|
1149
1188
|
}, s = (a) => {
|
|
1150
|
-
const
|
|
1151
|
-
a.key !== "Escape" ||
|
|
1189
|
+
const d = a.target;
|
|
1190
|
+
a.key !== "Escape" || d instanceof Node && t.contains(d) || n();
|
|
1152
1191
|
};
|
|
1153
1192
|
return document.addEventListener("pointerdown", o, !0), document.addEventListener("visibilitychange", r), document.addEventListener("keydown", s, !0), window.addEventListener("blur", n), () => {
|
|
1154
1193
|
document.removeEventListener("pointerdown", o, !0), document.removeEventListener("visibilitychange", r), document.removeEventListener("keydown", s, !0), window.removeEventListener("blur", n);
|
|
1155
1194
|
};
|
|
1156
1195
|
}, [n, e, t]);
|
|
1157
1196
|
}
|
|
1158
|
-
function
|
|
1197
|
+
function ze(t) {
|
|
1159
1198
|
switch (t) {
|
|
1160
1199
|
case "top":
|
|
1161
1200
|
return "center bottom";
|
|
@@ -1169,7 +1208,7 @@ function Ke(t) {
|
|
|
1169
1208
|
return "center";
|
|
1170
1209
|
}
|
|
1171
1210
|
}
|
|
1172
|
-
function
|
|
1211
|
+
function vt({
|
|
1173
1212
|
contentId: t,
|
|
1174
1213
|
triggerElement: e,
|
|
1175
1214
|
dismiss: n,
|
|
@@ -1177,21 +1216,21 @@ function yt({
|
|
|
1177
1216
|
className: r,
|
|
1178
1217
|
style: s,
|
|
1179
1218
|
side: a = "top",
|
|
1180
|
-
align:
|
|
1181
|
-
sideOffset:
|
|
1219
|
+
align: d = "center",
|
|
1220
|
+
sideOffset: l = 8,
|
|
1182
1221
|
collisionPadding: i = 8,
|
|
1183
1222
|
avoidCollisions: m = !0,
|
|
1184
1223
|
...h
|
|
1185
1224
|
}) {
|
|
1186
|
-
const f =
|
|
1225
|
+
const f = E(null), b = V() ?? !1, p = ae(), g = Fe(e, f, {
|
|
1187
1226
|
side: a,
|
|
1188
|
-
align:
|
|
1189
|
-
sideOffset:
|
|
1227
|
+
align: d,
|
|
1228
|
+
sideOffset: l,
|
|
1190
1229
|
collisionPadding: i,
|
|
1191
1230
|
avoidCollisions: m
|
|
1192
1231
|
});
|
|
1193
|
-
|
|
1194
|
-
const y =
|
|
1232
|
+
Ge(e, f, n);
|
|
1233
|
+
const y = ze(g?.side ?? a), v = {
|
|
1195
1234
|
...s,
|
|
1196
1235
|
left: g ? `${g.x}px` : 0,
|
|
1197
1236
|
top: g ? `${g.y}px` : 0,
|
|
@@ -1205,20 +1244,20 @@ function yt({
|
|
|
1205
1244
|
id: t,
|
|
1206
1245
|
role: "tooltip",
|
|
1207
1246
|
"data-side": g?.side ?? a,
|
|
1208
|
-
"data-align":
|
|
1209
|
-
"data-state":
|
|
1210
|
-
"aria-hidden":
|
|
1211
|
-
className:
|
|
1247
|
+
"data-align": d,
|
|
1248
|
+
"data-state": p ? "open" : "closed",
|
|
1249
|
+
"aria-hidden": p ? void 0 : !0,
|
|
1250
|
+
className: T("uk-tooltip", r),
|
|
1212
1251
|
style: v,
|
|
1213
1252
|
children: /* @__PURE__ */ C(
|
|
1214
|
-
|
|
1253
|
+
N.div,
|
|
1215
1254
|
{
|
|
1216
1255
|
className: "uk-tooltip__surface",
|
|
1217
1256
|
style: { transformOrigin: y },
|
|
1218
1257
|
initial: b ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1219
1258
|
animate: { opacity: 1, scale: 1 },
|
|
1220
1259
|
exit: b ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1221
|
-
transition: b ?
|
|
1260
|
+
transition: b ? z : ve,
|
|
1222
1261
|
children: [
|
|
1223
1262
|
/* @__PURE__ */ c(
|
|
1224
1263
|
"span",
|
|
@@ -1237,7 +1276,7 @@ function yt({
|
|
|
1237
1276
|
}
|
|
1238
1277
|
);
|
|
1239
1278
|
}
|
|
1240
|
-
function
|
|
1279
|
+
function It(t) {
|
|
1241
1280
|
const e = He("Tooltip.Content"), o = oe(
|
|
1242
1281
|
$e,
|
|
1243
1282
|
Be,
|
|
@@ -1245,7 +1284,7 @@ function vt(t) {
|
|
|
1245
1284
|
) && e.triggerElement ? e.triggerElement.closest("dialog") ?? document.body : null;
|
|
1246
1285
|
return !o || !e.triggerElement ? null : se(
|
|
1247
1286
|
/* @__PURE__ */ c(ie, { reducedMotion: "user", children: /* @__PURE__ */ c(A, { children: e.open ? /* @__PURE__ */ c(
|
|
1248
|
-
|
|
1287
|
+
vt,
|
|
1249
1288
|
{
|
|
1250
1289
|
contentId: e.contentId,
|
|
1251
1290
|
triggerElement: e.triggerElement,
|
|
@@ -1257,11 +1296,11 @@ function vt(t) {
|
|
|
1257
1296
|
o
|
|
1258
1297
|
);
|
|
1259
1298
|
}
|
|
1260
|
-
const
|
|
1299
|
+
const Ke = j(
|
|
1261
1300
|
null
|
|
1262
1301
|
);
|
|
1263
|
-
function
|
|
1264
|
-
const e = X(
|
|
1302
|
+
function kt(t) {
|
|
1303
|
+
const e = X(Ke);
|
|
1265
1304
|
if (!e)
|
|
1266
1305
|
throw new Error(`<${t}> must be rendered inside <Tooltip.Group>`);
|
|
1267
1306
|
return e;
|
|
@@ -1274,38 +1313,38 @@ function Tt({
|
|
|
1274
1313
|
dismiss: r,
|
|
1275
1314
|
triggerElement: s,
|
|
1276
1315
|
side: a,
|
|
1277
|
-
align:
|
|
1278
|
-
sideOffset:
|
|
1316
|
+
align: d,
|
|
1317
|
+
sideOffset: l,
|
|
1279
1318
|
collisionPadding: i,
|
|
1280
1319
|
avoidCollisions: m
|
|
1281
1320
|
}) {
|
|
1282
|
-
const h =
|
|
1321
|
+
const h = E(null), f = V() ?? !1, b = ae(), p = Fe(s, h, {
|
|
1283
1322
|
side: a,
|
|
1284
|
-
align:
|
|
1285
|
-
sideOffset:
|
|
1323
|
+
align: d,
|
|
1324
|
+
sideOffset: l,
|
|
1286
1325
|
collisionPadding: i,
|
|
1287
1326
|
avoidCollisions: m
|
|
1288
1327
|
});
|
|
1289
|
-
|
|
1328
|
+
Ge(s, h, r);
|
|
1290
1329
|
const g = {
|
|
1291
|
-
left:
|
|
1292
|
-
top:
|
|
1293
|
-
transformOrigin:
|
|
1294
|
-
visibility:
|
|
1330
|
+
left: p ? `${p.x}px` : 0,
|
|
1331
|
+
top: p ? `${p.y}px` : 0,
|
|
1332
|
+
transformOrigin: ze(p?.side ?? a),
|
|
1333
|
+
visibility: p ? "visible" : "hidden"
|
|
1295
1334
|
};
|
|
1296
1335
|
return /* @__PURE__ */ C(
|
|
1297
|
-
|
|
1336
|
+
N.div,
|
|
1298
1337
|
{
|
|
1299
1338
|
ref: h,
|
|
1300
1339
|
id: o,
|
|
1301
1340
|
role: "tooltip",
|
|
1302
1341
|
layout: !f,
|
|
1303
1342
|
layoutDependency: t,
|
|
1304
|
-
"data-side":
|
|
1305
|
-
"data-align":
|
|
1343
|
+
"data-side": p?.side ?? a,
|
|
1344
|
+
"data-align": d,
|
|
1306
1345
|
"data-state": b ? "open" : "closed",
|
|
1307
1346
|
"aria-hidden": b ? void 0 : !0,
|
|
1308
|
-
className:
|
|
1347
|
+
className: T(
|
|
1309
1348
|
"uk-tooltip",
|
|
1310
1349
|
"uk-tooltip__surface",
|
|
1311
1350
|
"uk-tooltip--group",
|
|
@@ -1315,7 +1354,7 @@ function Tt({
|
|
|
1315
1354
|
initial: f ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1316
1355
|
animate: { opacity: 1, scale: 1 },
|
|
1317
1356
|
exit: f ? { opacity: 0 } : { opacity: 0, scale: 0.96 },
|
|
1318
|
-
transition: f ? { ...
|
|
1357
|
+
transition: f ? { ...z, layout: { duration: 0 } } : tt,
|
|
1319
1358
|
children: [
|
|
1320
1359
|
/* @__PURE__ */ c(
|
|
1321
1360
|
"span",
|
|
@@ -1323,17 +1362,17 @@ function Tt({
|
|
|
1323
1362
|
className: "uk-tooltip__arrow",
|
|
1324
1363
|
"aria-hidden": "true",
|
|
1325
1364
|
style: {
|
|
1326
|
-
"--uk-tooltip-arrow-offset": `${
|
|
1365
|
+
"--uk-tooltip-arrow-offset": `${p?.arrowOffset ?? 0}px`
|
|
1327
1366
|
}
|
|
1328
1367
|
}
|
|
1329
1368
|
),
|
|
1330
1369
|
/* @__PURE__ */ c(
|
|
1331
|
-
|
|
1370
|
+
N.div,
|
|
1332
1371
|
{
|
|
1333
1372
|
className: "uk-tooltip__content",
|
|
1334
1373
|
initial: { opacity: 0 },
|
|
1335
1374
|
animate: { opacity: 1 },
|
|
1336
|
-
transition: f ?
|
|
1375
|
+
transition: f ? z : ve,
|
|
1337
1376
|
children: e
|
|
1338
1377
|
},
|
|
1339
1378
|
t
|
|
@@ -1342,7 +1381,7 @@ function Tt({
|
|
|
1342
1381
|
}
|
|
1343
1382
|
);
|
|
1344
1383
|
}
|
|
1345
|
-
function
|
|
1384
|
+
function wt({
|
|
1346
1385
|
children: t,
|
|
1347
1386
|
side: e = "top",
|
|
1348
1387
|
align: n = "center",
|
|
@@ -1350,21 +1389,21 @@ function kt({
|
|
|
1350
1389
|
collisionPadding: r = 8,
|
|
1351
1390
|
avoidCollisions: s = !0,
|
|
1352
1391
|
delayDuration: a = 180,
|
|
1353
|
-
closeDelay:
|
|
1354
|
-
contentClassName:
|
|
1392
|
+
closeDelay: d = 80,
|
|
1393
|
+
contentClassName: l
|
|
1355
1394
|
}) {
|
|
1356
1395
|
const i = R(), [m, h] = M(
|
|
1357
1396
|
() => /* @__PURE__ */ new Map()
|
|
1358
|
-
), [f, b] = M(!1), [
|
|
1397
|
+
), [f, b] = M(!1), [p, g] = M(null), y = E(null), v = E(null), k = oe(
|
|
1359
1398
|
$e,
|
|
1360
1399
|
Be,
|
|
1361
1400
|
Ae
|
|
1362
|
-
),
|
|
1401
|
+
), u = F(() => {
|
|
1363
1402
|
y.current !== null && (clearTimeout(y.current), y.current = null);
|
|
1364
|
-
}, []), I =
|
|
1403
|
+
}, []), I = F(() => {
|
|
1365
1404
|
v.current !== null && (clearTimeout(v.current), v.current = null);
|
|
1366
1405
|
}, []), w = S((H, B = !1) => {
|
|
1367
|
-
if (
|
|
1406
|
+
if (u(), I(), g(H), !f) {
|
|
1368
1407
|
if (B || a <= 0) {
|
|
1369
1408
|
b(!0);
|
|
1370
1409
|
return;
|
|
@@ -1374,45 +1413,45 @@ function kt({
|
|
|
1374
1413
|
}, a);
|
|
1375
1414
|
}
|
|
1376
1415
|
}), _ = S(() => {
|
|
1377
|
-
if (
|
|
1378
|
-
if (
|
|
1416
|
+
if (u(), I(), !!f) {
|
|
1417
|
+
if (d <= 0) {
|
|
1379
1418
|
b(!1);
|
|
1380
1419
|
return;
|
|
1381
1420
|
}
|
|
1382
1421
|
v.current = setTimeout(() => {
|
|
1383
1422
|
v.current = null, b(!1);
|
|
1384
|
-
},
|
|
1423
|
+
}, d);
|
|
1385
1424
|
}
|
|
1386
1425
|
}), $ = S(() => {
|
|
1387
|
-
|
|
1426
|
+
u(), I(), b(!1);
|
|
1388
1427
|
}), L = S(
|
|
1389
|
-
(H, B,
|
|
1428
|
+
(H, B, G) => {
|
|
1390
1429
|
h((ee) => {
|
|
1391
1430
|
const de = ee.get(H);
|
|
1392
|
-
if (de?.triggerElement === B && Object.is(de.content,
|
|
1431
|
+
if (de?.triggerElement === B && Object.is(de.content, G))
|
|
1393
1432
|
return ee;
|
|
1394
1433
|
const pe = new Map(ee);
|
|
1395
|
-
return pe.set(H, { triggerElement: B, content:
|
|
1434
|
+
return pe.set(H, { triggerElement: B, content: G }), pe;
|
|
1396
1435
|
});
|
|
1397
1436
|
}
|
|
1398
1437
|
), x = S((H) => {
|
|
1399
1438
|
h((B) => {
|
|
1400
1439
|
if (!B.has(H))
|
|
1401
1440
|
return B;
|
|
1402
|
-
const
|
|
1403
|
-
return
|
|
1441
|
+
const G = new Map(B);
|
|
1442
|
+
return G.delete(H), G;
|
|
1404
1443
|
});
|
|
1405
1444
|
});
|
|
1406
1445
|
O(
|
|
1407
1446
|
() => () => {
|
|
1408
|
-
|
|
1447
|
+
u(), I();
|
|
1409
1448
|
},
|
|
1410
|
-
[I,
|
|
1449
|
+
[I, u]
|
|
1411
1450
|
);
|
|
1412
|
-
const
|
|
1451
|
+
const Ue = K(
|
|
1413
1452
|
() => ({
|
|
1414
1453
|
open: f,
|
|
1415
|
-
activeValue:
|
|
1454
|
+
activeValue: p,
|
|
1416
1455
|
contentId: i,
|
|
1417
1456
|
activate: w,
|
|
1418
1457
|
requestClose: _,
|
|
@@ -1422,7 +1461,7 @@ function kt({
|
|
|
1422
1461
|
}),
|
|
1423
1462
|
[
|
|
1424
1463
|
w,
|
|
1425
|
-
|
|
1464
|
+
p,
|
|
1426
1465
|
i,
|
|
1427
1466
|
$,
|
|
1428
1467
|
f,
|
|
@@ -1430,19 +1469,19 @@ function kt({
|
|
|
1430
1469
|
_,
|
|
1431
1470
|
x
|
|
1432
1471
|
]
|
|
1433
|
-
),
|
|
1434
|
-
return /* @__PURE__ */ C(
|
|
1472
|
+
), q = p ? m.get(p) : void 0, je = f && !!q, ue = k && q ? q.triggerElement.closest("dialog") ?? document.body : null;
|
|
1473
|
+
return /* @__PURE__ */ C(Ke.Provider, { value: Ue, children: [
|
|
1435
1474
|
t,
|
|
1436
|
-
ue &&
|
|
1437
|
-
/* @__PURE__ */ c(ie, { reducedMotion: "user", children: /* @__PURE__ */ c(A, { children:
|
|
1475
|
+
ue && q ? se(
|
|
1476
|
+
/* @__PURE__ */ c(ie, { reducedMotion: "user", children: /* @__PURE__ */ c(A, { children: je ? /* @__PURE__ */ c(
|
|
1438
1477
|
Tt,
|
|
1439
1478
|
{
|
|
1440
|
-
activeValue:
|
|
1441
|
-
content:
|
|
1442
|
-
contentClassName:
|
|
1479
|
+
activeValue: p ?? "",
|
|
1480
|
+
content: q.content,
|
|
1481
|
+
contentClassName: l,
|
|
1443
1482
|
contentId: i,
|
|
1444
1483
|
dismiss: $,
|
|
1445
|
-
triggerElement:
|
|
1484
|
+
triggerElement: q.triggerElement,
|
|
1446
1485
|
side: e,
|
|
1447
1486
|
align: n,
|
|
1448
1487
|
sideOffset: o,
|
|
@@ -1455,59 +1494,60 @@ function kt({
|
|
|
1455
1494
|
) : null
|
|
1456
1495
|
] });
|
|
1457
1496
|
}
|
|
1458
|
-
function
|
|
1497
|
+
function _t({
|
|
1459
1498
|
value: t,
|
|
1460
1499
|
content: e,
|
|
1461
1500
|
children: n
|
|
1462
1501
|
}) {
|
|
1463
|
-
const o =
|
|
1502
|
+
const o = kt("Tooltip.Item"), { register: r, unregister: s } = o, [a, d] = M(
|
|
1464
1503
|
null
|
|
1465
1504
|
);
|
|
1466
1505
|
if (!Z(n))
|
|
1467
1506
|
throw new Error("<Tooltip.Item> expects a single valid React element");
|
|
1468
|
-
const
|
|
1469
|
-
(
|
|
1470
|
-
Ve(m,
|
|
1507
|
+
const l = n, i = l.props, m = i.ref ?? l.ref, h = i.onPointerEnter, f = i.onPointerLeave, b = i.onFocus, p = i.onBlur, g = i.onKeyDown, y = o.open && o.activeValue === t, v = F(
|
|
1508
|
+
(k) => {
|
|
1509
|
+
Ve(m, k), d(k);
|
|
1471
1510
|
},
|
|
1472
|
-
[m,
|
|
1511
|
+
[m, d]
|
|
1473
1512
|
);
|
|
1474
1513
|
return re(() => {
|
|
1475
1514
|
if (a)
|
|
1476
1515
|
return r(t, a, e), () => s(t);
|
|
1477
|
-
}, [e, r, a, s, t]),
|
|
1516
|
+
}, [e, r, a, s, t]), U(l, {
|
|
1478
1517
|
ref: v,
|
|
1479
|
-
"aria-describedby": y ?
|
|
1480
|
-
onPointerEnter: D(h, (
|
|
1481
|
-
o.activate(t,
|
|
1518
|
+
"aria-describedby": y ? qe(i["aria-describedby"], o.contentId) : i["aria-describedby"],
|
|
1519
|
+
onPointerEnter: D(h, (k) => {
|
|
1520
|
+
o.activate(t, k.pointerType === "touch");
|
|
1482
1521
|
}),
|
|
1483
|
-
onPointerLeave: D(f, (
|
|
1484
|
-
|
|
1522
|
+
onPointerLeave: D(f, (k) => {
|
|
1523
|
+
k.pointerType !== "touch" && o.requestClose();
|
|
1485
1524
|
}),
|
|
1486
1525
|
onFocus: D(b, () => {
|
|
1487
1526
|
o.activate(t);
|
|
1488
1527
|
}),
|
|
1489
|
-
onBlur: D(
|
|
1528
|
+
onBlur: D(p, () => {
|
|
1490
1529
|
o.requestClose();
|
|
1491
1530
|
}),
|
|
1492
|
-
onKeyDown: D(g, (
|
|
1493
|
-
|
|
1531
|
+
onKeyDown: D(g, (k) => {
|
|
1532
|
+
k.key === "Escape" && y && (k.preventDefault(), k.stopPropagation(), o.dismiss());
|
|
1494
1533
|
})
|
|
1495
1534
|
});
|
|
1496
1535
|
}
|
|
1497
|
-
const
|
|
1498
|
-
Root:
|
|
1499
|
-
Trigger:
|
|
1500
|
-
Content:
|
|
1501
|
-
Group:
|
|
1502
|
-
Item:
|
|
1536
|
+
const $t = {
|
|
1537
|
+
Root: mt,
|
|
1538
|
+
Trigger: bt,
|
|
1539
|
+
Content: It,
|
|
1540
|
+
Group: wt,
|
|
1541
|
+
Item: _t
|
|
1503
1542
|
};
|
|
1504
1543
|
export {
|
|
1505
1544
|
ye as Button,
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1545
|
+
Mt as Dialog,
|
|
1546
|
+
Dt as Input,
|
|
1547
|
+
Ot as Marquee,
|
|
1548
|
+
Lt as Sidebar,
|
|
1549
|
+
Rt as Switch,
|
|
1550
|
+
St as Tabs,
|
|
1551
|
+
$t as Tooltip
|
|
1512
1552
|
};
|
|
1513
1553
|
//# sourceMappingURL=index.js.map
|