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