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