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