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