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