seam-react 0.6.0 → 0.8.0

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