seam-react 0.7.0 → 0.8.0

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