@component-labs/ui 0.0.1

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.
Files changed (114) hide show
  1. package/dist/HMKTUWOU-DlOdK4rt.js +25 -0
  2. package/dist/HMKTUWOU-DlOdK4rt.js.map +1 -0
  3. package/dist/HOITXJDS-DBccNHOl.js +48 -0
  4. package/dist/HOITXJDS-DBccNHOl.js.map +1 -0
  5. package/dist/I7KWAPMF-CcAk8kiH.js +86 -0
  6. package/dist/I7KWAPMF-CcAk8kiH.js.map +1 -0
  7. package/dist/IQYAUKXT-CoP_Jrsi.js +546 -0
  8. package/dist/IQYAUKXT-CoP_Jrsi.js.map +1 -0
  9. package/dist/PZ3OL7I2-h7WHitqi.js +61 -0
  10. package/dist/PZ3OL7I2-h7WHitqi.js.map +1 -0
  11. package/dist/Provider.d.ts +8 -0
  12. package/dist/Provider.d.ts.map +1 -0
  13. package/dist/Q5W46E73-DjlVG3LH.js +353 -0
  14. package/dist/Q5W46E73-DjlVG3LH.js.map +1 -0
  15. package/dist/U6HHPQDW-BkT6kvCd.js +888 -0
  16. package/dist/U6HHPQDW-BkT6kvCd.js.map +1 -0
  17. package/dist/X6LNAU2F-DroCIVyL.js +1692 -0
  18. package/dist/X6LNAU2F-DroCIVyL.js.map +1 -0
  19. package/dist/Z32PU2LQ-CPSDShGU.js +1116 -0
  20. package/dist/Z32PU2LQ-CPSDShGU.js.map +1 -0
  21. package/dist/button.d.ts +4 -0
  22. package/dist/button.d.ts.map +1 -0
  23. package/dist/button.js +252 -0
  24. package/dist/button.js.map +1 -0
  25. package/dist/checkbox.d.ts +4 -0
  26. package/dist/checkbox.d.ts.map +1 -0
  27. package/dist/checkbox.js +210 -0
  28. package/dist/checkbox.js.map +1 -0
  29. package/dist/combobox.d.ts +4 -0
  30. package/dist/combobox.d.ts.map +1 -0
  31. package/dist/combobox.js +948 -0
  32. package/dist/combobox.js.map +1 -0
  33. package/dist/components/button/Button.d.ts +26 -0
  34. package/dist/components/button/Button.d.ts.map +1 -0
  35. package/dist/components/button/Button.docs.d.ts +4 -0
  36. package/dist/components/button/Button.docs.d.ts.map +1 -0
  37. package/dist/components/button/Button.showcase.d.ts +40 -0
  38. package/dist/components/button/Button.showcase.d.ts.map +1 -0
  39. package/dist/components/checkbox/Checkbox.d.ts +19 -0
  40. package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
  41. package/dist/components/checkbox/Checkbox.docs.d.ts +4 -0
  42. package/dist/components/checkbox/Checkbox.docs.d.ts.map +1 -0
  43. package/dist/components/checkbox/Checkbox.showcase.d.ts +35 -0
  44. package/dist/components/checkbox/Checkbox.showcase.d.ts.map +1 -0
  45. package/dist/components/combobox/Combobox.d.ts +36 -0
  46. package/dist/components/combobox/Combobox.d.ts.map +1 -0
  47. package/dist/components/combobox/Combobox.docs.d.ts +4 -0
  48. package/dist/components/combobox/Combobox.docs.d.ts.map +1 -0
  49. package/dist/components/combobox/Combobox.showcase.d.ts +43 -0
  50. package/dist/components/combobox/Combobox.showcase.d.ts.map +1 -0
  51. package/dist/components/data-table/DataTable.d.ts +86 -0
  52. package/dist/components/data-table/DataTable.d.ts.map +1 -0
  53. package/dist/components/data-table/DataTable.docs.d.ts +4 -0
  54. package/dist/components/data-table/DataTable.docs.d.ts.map +1 -0
  55. package/dist/components/data-table/DataTable.showcase.d.ts +36 -0
  56. package/dist/components/data-table/DataTable.showcase.d.ts.map +1 -0
  57. package/dist/components/date-picker/date-picker.d.ts +1 -0
  58. package/dist/components/date-picker/date-picker.d.ts.map +1 -0
  59. package/dist/components/dialog/Dialog.d.ts +56 -0
  60. package/dist/components/dialog/Dialog.d.ts.map +1 -0
  61. package/dist/components/dialog/Dialog.docs.d.ts +4 -0
  62. package/dist/components/dialog/Dialog.docs.d.ts.map +1 -0
  63. package/dist/components/input/Input.d.ts +22 -0
  64. package/dist/components/input/Input.d.ts.map +1 -0
  65. package/dist/components/input/Input.docs.d.ts +4 -0
  66. package/dist/components/input/Input.docs.d.ts.map +1 -0
  67. package/dist/components/menu/Menu.d.ts +41 -0
  68. package/dist/components/menu/Menu.d.ts.map +1 -0
  69. package/dist/components/menu/Menu.docs.d.ts +4 -0
  70. package/dist/components/menu/Menu.docs.d.ts.map +1 -0
  71. package/dist/components/menu/Menu.showcase.d.ts +43 -0
  72. package/dist/components/menu/Menu.showcase.d.ts.map +1 -0
  73. package/dist/components/slider/date-picker.d.ts +1 -0
  74. package/dist/components/slider/date-picker.d.ts.map +1 -0
  75. package/dist/components/sub-menu/date-picker.d.ts +1 -0
  76. package/dist/components/sub-menu/date-picker.d.ts.map +1 -0
  77. package/dist/components/switch/Switch.d.ts +17 -0
  78. package/dist/components/switch/Switch.d.ts.map +1 -0
  79. package/dist/components/switch/Switch.docs.d.ts +4 -0
  80. package/dist/components/switch/Switch.docs.d.ts.map +1 -0
  81. package/dist/components/toast/date-picker.d.ts +1 -0
  82. package/dist/components/toast/date-picker.d.ts.map +1 -0
  83. package/dist/data-table.d.ts +4 -0
  84. package/dist/data-table.d.ts.map +1 -0
  85. package/dist/data-table.js +298 -0
  86. package/dist/data-table.js.map +1 -0
  87. package/dist/dialog.d.ts +4 -0
  88. package/dist/dialog.d.ts.map +1 -0
  89. package/dist/dialog.js +323 -0
  90. package/dist/dialog.js.map +1 -0
  91. package/dist/index.d.ts +27 -0
  92. package/dist/index.d.ts.map +1 -0
  93. package/dist/input.d.ts +4 -0
  94. package/dist/input.d.ts.map +1 -0
  95. package/dist/input.js +230 -0
  96. package/dist/input.js.map +1 -0
  97. package/dist/lib/IntersectionObserver.d.ts +30 -0
  98. package/dist/lib/IntersectionObserver.d.ts.map +1 -0
  99. package/dist/lib/utils.d.ts +7 -0
  100. package/dist/lib/utils.d.ts.map +1 -0
  101. package/dist/menu.d.ts +4 -0
  102. package/dist/menu.d.ts.map +1 -0
  103. package/dist/menu.js +1335 -0
  104. package/dist/menu.js.map +1 -0
  105. package/dist/switch.d.ts +4 -0
  106. package/dist/switch.d.ts.map +1 -0
  107. package/dist/switch.js +194 -0
  108. package/dist/switch.js.map +1 -0
  109. package/dist/types/docs.d.ts +24 -0
  110. package/dist/types/docs.d.ts.map +1 -0
  111. package/dist/utils-BZvHF7th.js +2806 -0
  112. package/dist/utils-BZvHF7th.js.map +1 -0
  113. package/package.json +98 -0
  114. package/src/styles.css +91 -0
@@ -0,0 +1,888 @@
1
+ import * as v from "react";
2
+ import { isValidElement as Tt, useMemo as V, useLayoutEffect as Ft, useEffect as p, useReducer as At, useRef as R, useCallback as ct, useState as E, createContext as St, useContext as It } from "react";
3
+ import { jsx as w } from "react/jsx-runtime";
4
+ function we(...t) {
5
+ }
6
+ function xe(t, e) {
7
+ if (t === e) return !0;
8
+ if (!t || !e || typeof t != "object" || typeof e != "object") return !1;
9
+ const n = Object.keys(t), r = Object.keys(e), { length: u } = n;
10
+ if (r.length !== u) return !1;
11
+ for (const o of n)
12
+ if (t[o] !== e[o])
13
+ return !1;
14
+ return !0;
15
+ }
16
+ function Ce(t, e) {
17
+ if (Rt(t)) {
18
+ const n = Pt(e) ? e() : e;
19
+ return t(n);
20
+ }
21
+ return t;
22
+ }
23
+ function Rt(t) {
24
+ return typeof t == "function";
25
+ }
26
+ function Pt(t) {
27
+ return typeof t == "function";
28
+ }
29
+ function k(t, e) {
30
+ return typeof Object.hasOwn == "function" ? Object.hasOwn(t, e) : Object.prototype.hasOwnProperty.call(t, e);
31
+ }
32
+ function Te(...t) {
33
+ return (...e) => {
34
+ for (const n of t)
35
+ typeof n == "function" && n(...e);
36
+ };
37
+ }
38
+ function Fe(t) {
39
+ return t.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
40
+ }
41
+ function Ae(t, e) {
42
+ const n = { ...t };
43
+ for (const r of e)
44
+ k(n, r) && delete n[r];
45
+ return n;
46
+ }
47
+ function Se(t, e) {
48
+ const n = {};
49
+ for (const r of e)
50
+ k(t, r) && (n[r] = t[r]);
51
+ return n;
52
+ }
53
+ function Ie(t) {
54
+ return t;
55
+ }
56
+ function Re(t, e) {
57
+ if (!t)
58
+ throw typeof e != "string" ? new Error("Invariant failed") : new Error(e);
59
+ }
60
+ function Pe(t) {
61
+ return Object.keys(t);
62
+ }
63
+ function Me(t, ...e) {
64
+ const n = typeof t == "function" ? t(...e) : t;
65
+ return n == null ? !1 : !n;
66
+ }
67
+ function Mt(t) {
68
+ return t.disabled || t["aria-disabled"] === !0 || t["aria-disabled"] === "true";
69
+ }
70
+ function Nt(t) {
71
+ const e = {};
72
+ for (const n in t)
73
+ t[n] !== void 0 && (e[n] = t[n]);
74
+ return e;
75
+ }
76
+ function Ne(...t) {
77
+ for (const e of t)
78
+ if (e !== void 0) return e;
79
+ }
80
+ function Dt(t, e) {
81
+ typeof t == "function" ? t(e) : t && (t.current = e);
82
+ }
83
+ function Lt(t) {
84
+ return !t || !Tt(t) ? !1 : "ref" in t.props || "ref" in t;
85
+ }
86
+ function Vt(t) {
87
+ return Lt(t) ? { ...t.props }.ref || t.ref : null;
88
+ }
89
+ function kt(t, e) {
90
+ const n = { ...t };
91
+ for (const r in e) {
92
+ if (!k(e, r)) continue;
93
+ if (r === "className") {
94
+ const o = "className";
95
+ n[o] = t[o] ? `${t[o]} ${e[o]}` : e[o];
96
+ continue;
97
+ }
98
+ if (r === "style") {
99
+ const o = "style";
100
+ n[o] = t[o] ? { ...t[o], ...e[o] } : e[o];
101
+ continue;
102
+ }
103
+ const u = e[r];
104
+ if (typeof u == "function" && r.startsWith("on")) {
105
+ const o = t[r];
106
+ if (typeof o == "function") {
107
+ n[r] = (...s) => {
108
+ u(...s), o(...s);
109
+ };
110
+ continue;
111
+ }
112
+ }
113
+ n[r] = u;
114
+ }
115
+ return n;
116
+ }
117
+ var T = Ot();
118
+ function Ot() {
119
+ var t;
120
+ return typeof window < "u" && !!((t = window.document) != null && t.createElement);
121
+ }
122
+ function A(t) {
123
+ return t ? "self" in t ? t.document : t.ownerDocument || document : document;
124
+ }
125
+ function De(t) {
126
+ return t ? "self" in t ? t.self : A(t).defaultView || window : self;
127
+ }
128
+ function F(t, e = !1) {
129
+ var n;
130
+ const { activeElement: r } = A(t);
131
+ if (!(r != null && r.nodeName))
132
+ return null;
133
+ if (O(r) && ((n = r.contentDocument) != null && n.body))
134
+ return F(
135
+ r.contentDocument.body,
136
+ e
137
+ );
138
+ if (e) {
139
+ const u = r.getAttribute("aria-activedescendant");
140
+ if (u) {
141
+ const o = A(r).getElementById(u);
142
+ if (o)
143
+ return o;
144
+ }
145
+ }
146
+ return r;
147
+ }
148
+ function S(t, e) {
149
+ return t === e || t.contains(e);
150
+ }
151
+ function O(t) {
152
+ return t.tagName === "IFRAME";
153
+ }
154
+ function Kt(t) {
155
+ const e = t.tagName.toLowerCase();
156
+ return e === "button" ? !0 : e === "input" && t.type ? Bt.indexOf(t.type) !== -1 : !1;
157
+ }
158
+ var Bt = [
159
+ "button",
160
+ "color",
161
+ "file",
162
+ "image",
163
+ "reset",
164
+ "submit"
165
+ ];
166
+ function _t(t) {
167
+ if (typeof t.checkVisibility == "function")
168
+ return t.checkVisibility();
169
+ const e = t;
170
+ return e.offsetWidth > 0 || e.offsetHeight > 0 || t.getClientRects().length > 0;
171
+ }
172
+ function K(t) {
173
+ try {
174
+ const e = t instanceof HTMLInputElement && t.selectionStart !== null, n = t.tagName === "TEXTAREA";
175
+ return e || n || !1;
176
+ } catch {
177
+ return !1;
178
+ }
179
+ }
180
+ function Le(t) {
181
+ return t.isContentEditable || K(t);
182
+ }
183
+ function Ve(t) {
184
+ if (K(t))
185
+ return t.value;
186
+ if (t.isContentEditable) {
187
+ const e = A(t).createRange();
188
+ return e.selectNodeContents(t), e.toString();
189
+ }
190
+ return "";
191
+ }
192
+ function ke(t) {
193
+ let e = 0, n = 0;
194
+ if (K(t))
195
+ e = t.selectionStart || 0, n = t.selectionEnd || 0;
196
+ else if (t.isContentEditable) {
197
+ const r = A(t).getSelection();
198
+ if (r != null && r.rangeCount && r.anchorNode && S(t, r.anchorNode) && r.focusNode && S(t, r.focusNode)) {
199
+ const u = r.getRangeAt(0), o = u.cloneRange();
200
+ o.selectNodeContents(t), o.setEnd(u.startContainer, u.startOffset), e = o.toString().length, o.setEnd(u.endContainer, u.endOffset), n = o.toString().length;
201
+ }
202
+ }
203
+ return { start: e, end: n };
204
+ }
205
+ function qt(t, e) {
206
+ const n = ["dialog", "menu", "listbox", "tree", "grid"], r = t == null ? void 0 : t.getAttribute("role");
207
+ return r && n.indexOf(r) !== -1 ? r : e;
208
+ }
209
+ function Oe(t, e) {
210
+ var n;
211
+ const r = {
212
+ menu: "menuitem",
213
+ listbox: "option",
214
+ tree: "treeitem"
215
+ }, u = qt(t);
216
+ return u && (n = r[u]) != null ? n : e;
217
+ }
218
+ function Ut(t) {
219
+ if (!t) return null;
220
+ const e = (n) => n === "auto" || n === "scroll";
221
+ if (t.clientHeight && t.scrollHeight > t.clientHeight) {
222
+ const { overflowY: n } = getComputedStyle(t);
223
+ if (e(n)) return t;
224
+ } else if (t.clientWidth && t.scrollWidth > t.clientWidth) {
225
+ const { overflowX: n } = getComputedStyle(t);
226
+ if (e(n)) return t;
227
+ }
228
+ return Ut(t.parentElement) || document.scrollingElement || document.body;
229
+ }
230
+ function Ke(t, ...e) {
231
+ /text|search|password|tel|url/i.test(t.type) && t.setSelectionRange(...e);
232
+ }
233
+ function Be(t, e) {
234
+ const n = t.map((u, o) => [o, u]);
235
+ let r = !1;
236
+ return n.sort(([u, o], [s, a]) => {
237
+ const l = e(o), c = e(a);
238
+ return l === c || !l || !c ? 0 : Wt(l, c) ? (u > s && (r = !0), -1) : (u < s && (r = !0), 1);
239
+ }), r ? n.map(([u, o]) => o) : t;
240
+ }
241
+ function Wt(t, e) {
242
+ return !!(e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING);
243
+ }
244
+ function jt() {
245
+ return T && !!navigator.maxTouchPoints;
246
+ }
247
+ function ft() {
248
+ return T ? /mac|iphone|ipad|ipod/i.test(navigator.platform) : !1;
249
+ }
250
+ function Xt() {
251
+ return T && ft() && /apple/i.test(navigator.vendor);
252
+ }
253
+ function _e() {
254
+ return T && /firefox\//i.test(navigator.userAgent);
255
+ }
256
+ function qe() {
257
+ return T && navigator.platform.startsWith("Mac") && !jt();
258
+ }
259
+ function Gt(t) {
260
+ return !!(t.currentTarget && !S(t.currentTarget, t.target));
261
+ }
262
+ function Q(t) {
263
+ return t.target === t.currentTarget;
264
+ }
265
+ function Ue(t) {
266
+ const e = t.currentTarget;
267
+ if (!e) return !1;
268
+ const n = ft();
269
+ if (n && !t.metaKey || !n && !t.ctrlKey) return !1;
270
+ const r = e.tagName.toLowerCase();
271
+ return r === "a" || r === "button" && e.type === "submit" || r === "input" && e.type === "submit";
272
+ }
273
+ function We(t) {
274
+ const e = t.currentTarget;
275
+ if (!e) return !1;
276
+ const n = e.tagName.toLowerCase();
277
+ return t.altKey ? n === "a" || n === "button" && e.type === "submit" || n === "input" && e.type === "submit" : !1;
278
+ }
279
+ function je(t, e, n) {
280
+ const r = new Event(e, n);
281
+ return t.dispatchEvent(r);
282
+ }
283
+ function Xe(t, e) {
284
+ const n = new FocusEvent("blur", e), r = t.dispatchEvent(n), u = { ...e, bubbles: !0 };
285
+ return t.dispatchEvent(new FocusEvent("focusout", u)), r;
286
+ }
287
+ function Ge(t, e, n) {
288
+ const r = new KeyboardEvent(e, n);
289
+ return t.dispatchEvent(r);
290
+ }
291
+ function He(t, e) {
292
+ const n = new MouseEvent("click", e);
293
+ return t.dispatchEvent(n);
294
+ }
295
+ function Ht(t, e) {
296
+ const n = e || t.currentTarget, r = t.relatedTarget;
297
+ return !r || !S(n, r);
298
+ }
299
+ function D(t, e, n, r) {
300
+ const o = ((a) => {
301
+ const l = requestAnimationFrame(a);
302
+ return () => cancelAnimationFrame(l);
303
+ })(() => {
304
+ t.removeEventListener(e, s, !0), n();
305
+ }), s = () => {
306
+ o(), n();
307
+ };
308
+ return t.addEventListener(e, s, { once: !0, capture: !0 }), o;
309
+ }
310
+ function g(t, e, n, r = window) {
311
+ const u = [];
312
+ try {
313
+ r.document.addEventListener(t, e, n);
314
+ for (const s of Array.from(r.frames))
315
+ u.push(g(t, e, n, s));
316
+ } catch {
317
+ }
318
+ return () => {
319
+ try {
320
+ r.document.removeEventListener(t, e, n);
321
+ } catch {
322
+ }
323
+ for (const s of u)
324
+ s();
325
+ };
326
+ }
327
+ var lt = { ...v }, Z = lt.useId, tt = lt.useInsertionEffect, x = T ? Ft : p;
328
+ function Yt(t) {
329
+ const [e] = E(t);
330
+ return e;
331
+ }
332
+ function Ye(t) {
333
+ const e = R(t);
334
+ return x(() => {
335
+ e.current = t;
336
+ }), e;
337
+ }
338
+ function y(t) {
339
+ const e = R(() => {
340
+ throw new Error("Cannot call an event handler while rendering.");
341
+ });
342
+ return tt ? tt(() => {
343
+ e.current = t;
344
+ }) : e.current = t, ct((...n) => {
345
+ var r;
346
+ return (r = e.current) == null ? void 0 : r.call(e, ...n);
347
+ }, []);
348
+ }
349
+ function $e(t) {
350
+ const [e, n] = E(null);
351
+ return x(() => {
352
+ if (e == null || !t) return;
353
+ let r = null;
354
+ return t((u) => (r = u, e)), () => {
355
+ t(r);
356
+ };
357
+ }, [e, t]), [e, n];
358
+ }
359
+ function B(...t) {
360
+ return V(() => {
361
+ if (t.some(Boolean))
362
+ return (e) => {
363
+ for (const n of t)
364
+ Dt(n, e);
365
+ };
366
+ }, t);
367
+ }
368
+ function ze(t) {
369
+ if (Z) {
370
+ const r = Z();
371
+ return t || r;
372
+ }
373
+ const [e, n] = E(t);
374
+ return x(() => {
375
+ if (t || e) return;
376
+ const r = Math.random().toString(36).slice(2, 8);
377
+ n(`id-${r}`);
378
+ }, [t, e]), t || e;
379
+ }
380
+ function $t(t, e) {
381
+ const n = (o) => {
382
+ if (typeof o == "string")
383
+ return o;
384
+ }, [r, u] = E(() => n(e));
385
+ return x(() => {
386
+ const o = t && "current" in t ? t.current : t;
387
+ u((o == null ? void 0 : o.tagName.toLowerCase()) || n(e));
388
+ }, [t, e]), r;
389
+ }
390
+ function Je(t, e, n) {
391
+ const r = Yt(n), [u, o] = E(r);
392
+ return p(() => {
393
+ const s = t && "current" in t ? t.current : t;
394
+ if (!s) return;
395
+ const a = () => {
396
+ const c = s.getAttribute(e);
397
+ o(c ?? r);
398
+ }, l = new MutationObserver(a);
399
+ return l.observe(s, { attributeFilter: [e] }), a(), () => l.disconnect();
400
+ }, [t, e, r]), u;
401
+ }
402
+ function Qe(t, e) {
403
+ const n = R(!1);
404
+ p(() => {
405
+ if (n.current)
406
+ return t();
407
+ n.current = !0;
408
+ }, e), p(
409
+ () => () => {
410
+ n.current = !1;
411
+ },
412
+ []
413
+ );
414
+ }
415
+ function Ze(t, e) {
416
+ const n = R(!1);
417
+ x(() => {
418
+ if (n.current)
419
+ return t();
420
+ n.current = !0;
421
+ }, e), x(
422
+ () => () => {
423
+ n.current = !1;
424
+ },
425
+ []
426
+ );
427
+ }
428
+ function tn() {
429
+ return At(() => [], []);
430
+ }
431
+ function en(t) {
432
+ return y(
433
+ typeof t == "function" ? t : () => t
434
+ );
435
+ }
436
+ function nn(t, e, n = []) {
437
+ const r = ct(
438
+ (u) => (t.wrapElement && (u = t.wrapElement(u)), e(u)),
439
+ [...n, t.wrapElement]
440
+ );
441
+ return { ...t, wrapElement: r };
442
+ }
443
+ function rn(t = !1, e) {
444
+ const [n, r] = E(null);
445
+ return { portalRef: B(r, e), portalNode: n, domReady: !t || n };
446
+ }
447
+ function on(t, e, n) {
448
+ const r = t.onLoadedMetadataCapture, u = V(() => Object.assign(() => {
449
+ }, { ...r, [e]: n }), [r, e, n]);
450
+ return [r == null ? void 0 : r[e], { onLoadedMetadataCapture: u }];
451
+ }
452
+ var et = !1;
453
+ function un() {
454
+ return p(() => {
455
+ et || (g("mousemove", Jt, !0), g("mousedown", P, !0), g("mouseup", P, !0), g("keydown", P, !0), g("scroll", P, !0), et = !0);
456
+ }, []), y(() => _);
457
+ }
458
+ var _ = !1, nt = 0, rt = 0;
459
+ function zt(t) {
460
+ const e = t.movementX || t.screenX - nt, n = t.movementY || t.screenY - rt;
461
+ return nt = t.screenX, rt = t.screenY, e || n || process.env.NODE_ENV === "test";
462
+ }
463
+ function Jt(t) {
464
+ zt(t) && (_ = !0);
465
+ }
466
+ function P() {
467
+ _ = !1;
468
+ }
469
+ function Qt(t) {
470
+ const e = v.forwardRef(
471
+ // @ts-ignore Incompatible with React 19 types. Ignore for now.
472
+ (n, r) => t({ ...n, ref: r })
473
+ );
474
+ return e.displayName = t.displayName || t.name, e;
475
+ }
476
+ function sn(t, e) {
477
+ return v.memo(t, e);
478
+ }
479
+ function Zt(t, e) {
480
+ const { wrapElement: n, render: r, ...u } = e, o = B(e.ref, Vt(r));
481
+ let s;
482
+ if (v.isValidElement(r)) {
483
+ const a = {
484
+ // @ts-ignore Incompatible with React 19 types. Ignore for now.
485
+ ...r.props,
486
+ ref: o
487
+ };
488
+ s = v.cloneElement(r, kt(u, a));
489
+ } else r ? s = r(u) : s = /* @__PURE__ */ w(t, { ...u });
490
+ return n ? n(s) : s;
491
+ }
492
+ function te(t) {
493
+ const e = (n = {}) => t(n);
494
+ return e.displayName = t.name, e;
495
+ }
496
+ function an(t = [], e = []) {
497
+ const n = v.createContext(void 0), r = v.createContext(void 0), u = () => v.useContext(n), o = (c = !1) => {
498
+ const d = v.useContext(r), m = u();
499
+ return c ? d : d || m;
500
+ }, s = () => {
501
+ const c = v.useContext(r), d = u();
502
+ if (!(c && c === d))
503
+ return d;
504
+ }, a = (c) => t.reduceRight(
505
+ (d, m) => /* @__PURE__ */ w(m, { ...c, children: d }),
506
+ /* @__PURE__ */ w(n.Provider, { ...c })
507
+ );
508
+ return {
509
+ context: n,
510
+ scopedContext: r,
511
+ useContext: u,
512
+ useScopedContext: o,
513
+ useProviderContext: s,
514
+ ContextProvider: a,
515
+ ScopedContextProvider: (c) => /* @__PURE__ */ w(a, { ...c, children: e.reduceRight(
516
+ (d, m) => /* @__PURE__ */ w(m, { ...c, children: d }),
517
+ /* @__PURE__ */ w(r.Provider, { ...c })
518
+ ) })
519
+ };
520
+ }
521
+ var ee = St(!0), M = "input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], summary, iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false'])";
522
+ function ne(t) {
523
+ return Number.parseInt(t.getAttribute("tabindex") || "0", 10) < 0;
524
+ }
525
+ function C(t) {
526
+ return !(!t.matches(M) || !_t(t) || t.closest("[inert]"));
527
+ }
528
+ function I(t) {
529
+ if (!C(t) || ne(t)) return !1;
530
+ if (!("form" in t) || !t.form || t.checked || t.type !== "radio") return !0;
531
+ const e = t.form.elements.namedItem(t.name);
532
+ if (!e || !("length" in e)) return !0;
533
+ const n = F(t);
534
+ return !n || n === t || !("form" in n) || n.form !== t.form || n.name !== t.name;
535
+ }
536
+ function q(t, e) {
537
+ const n = Array.from(
538
+ t.querySelectorAll(M)
539
+ );
540
+ e && n.unshift(t);
541
+ const r = n.filter(C);
542
+ return r.forEach((u, o) => {
543
+ var s;
544
+ if (!O(u)) return;
545
+ const a = (s = u.contentDocument) == null ? void 0 : s.body;
546
+ a && r.splice(o, 1, ...q(a));
547
+ }), r;
548
+ }
549
+ function U(t, e, n) {
550
+ const r = Array.from(
551
+ t.querySelectorAll(M)
552
+ ), u = r.filter(I);
553
+ return e && I(t) && u.unshift(t), u.forEach((o, s) => {
554
+ var a;
555
+ if (!O(o)) return;
556
+ const l = (a = o.contentDocument) == null ? void 0 : a.body;
557
+ if (!l) return;
558
+ const c = U(
559
+ l,
560
+ !1,
561
+ n
562
+ );
563
+ u.splice(s, 1, ...c);
564
+ }), !u.length && n ? r : u;
565
+ }
566
+ function cn(t, e, n) {
567
+ const [r] = U(
568
+ t,
569
+ e,
570
+ n
571
+ );
572
+ return r || null;
573
+ }
574
+ function re(t, e, n, r) {
575
+ const u = F(t), o = q(t, e), s = o.indexOf(u), a = o.slice(s + 1);
576
+ return a.find(I) || (n ? o.find(I) : null) || (r ? a[0] : null) || null;
577
+ }
578
+ function fn(t, e) {
579
+ return re(
580
+ document.body,
581
+ !1,
582
+ t,
583
+ e
584
+ );
585
+ }
586
+ function oe(t, e, n, r) {
587
+ const u = F(t), o = q(t, e).reverse(), s = o.indexOf(u);
588
+ return o.slice(s + 1).find(I) || null || null || null;
589
+ }
590
+ function ln(t, e) {
591
+ return oe(
592
+ document.body,
593
+ !1
594
+ );
595
+ }
596
+ function ue(t) {
597
+ for (; t && !C(t); )
598
+ t = t.closest(M);
599
+ return t || null;
600
+ }
601
+ function ot(t) {
602
+ const e = F(t);
603
+ if (!e) return !1;
604
+ if (e === t) return !0;
605
+ const n = e.getAttribute("aria-activedescendant");
606
+ return n ? n === t.id : !1;
607
+ }
608
+ function ie(t) {
609
+ const e = F(t);
610
+ if (!e) return !1;
611
+ if (S(t, e)) return !0;
612
+ const n = e.getAttribute("aria-activedescendant");
613
+ return !n || !("id" in t) ? !1 : n === t.id ? !0 : !!t.querySelector(`#${CSS.escape(n)}`);
614
+ }
615
+ function se(t) {
616
+ !ie(t) && C(t) && t.focus();
617
+ }
618
+ function ae(t) {
619
+ var e;
620
+ const n = (e = t.getAttribute("tabindex")) != null ? e : "";
621
+ t.setAttribute("data-tabindex", n), t.setAttribute("tabindex", "-1");
622
+ }
623
+ function dn(t, e) {
624
+ const n = U(t, e);
625
+ for (const r of n)
626
+ ae(r);
627
+ }
628
+ function bn(t) {
629
+ const e = t.querySelectorAll("[data-tabindex]"), n = (r) => {
630
+ const u = r.getAttribute("data-tabindex");
631
+ r.removeAttribute("data-tabindex"), u ? r.setAttribute("tabindex", u) : r.removeAttribute("tabindex");
632
+ };
633
+ t.hasAttribute("data-tabindex") && n(t);
634
+ for (const r of e)
635
+ n(r);
636
+ }
637
+ function vn(t, e) {
638
+ "scrollIntoView" in t ? (t.focus({ preventScroll: !0 }), t.scrollIntoView({ block: "nearest", inline: "nearest", ...e })) : t.focus();
639
+ }
640
+ var ce = "div", ut = Xt(), fe = [
641
+ "text",
642
+ "search",
643
+ "url",
644
+ "tel",
645
+ "email",
646
+ "password",
647
+ "number",
648
+ "date",
649
+ "month",
650
+ "week",
651
+ "time",
652
+ "datetime",
653
+ "datetime-local"
654
+ ], dt = Symbol("safariFocusAncestor");
655
+ function pn(t) {
656
+ return t ? !!t[dt] : !1;
657
+ }
658
+ function it(t, e) {
659
+ t && (t[dt] = e);
660
+ }
661
+ function le(t) {
662
+ const { tagName: e, readOnly: n, type: r } = t;
663
+ return e === "TEXTAREA" && !n || e === "SELECT" && !n ? !0 : e === "INPUT" && !n ? fe.includes(r) : !!(t.isContentEditable || t.getAttribute("role") === "combobox" && t.dataset.name);
664
+ }
665
+ function de(t) {
666
+ return "labels" in t ? t.labels : null;
667
+ }
668
+ function st(t) {
669
+ return t.tagName.toLowerCase() === "input" && t.type ? t.type === "radio" || t.type === "checkbox" : !1;
670
+ }
671
+ function be(t) {
672
+ return t ? t === "button" || t === "summary" || t === "input" || t === "select" || t === "textarea" || t === "a" : !0;
673
+ }
674
+ function ve(t) {
675
+ return t ? t === "button" || t === "input" || t === "select" || t === "textarea" : !0;
676
+ }
677
+ function pe(t, e, n, r, u) {
678
+ return t ? e ? n && !r ? -1 : void 0 : n ? u : u || 0 : u;
679
+ }
680
+ function L(t, e) {
681
+ return y((n) => {
682
+ t == null || t(n), !n.defaultPrevented && e && (n.stopPropagation(), n.preventDefault());
683
+ });
684
+ }
685
+ var at = !1, W = !0;
686
+ function ge(t) {
687
+ const e = t.target;
688
+ e && "hasAttribute" in e && (e.hasAttribute("data-focus-visible") || (W = !1));
689
+ }
690
+ function ye(t) {
691
+ t.metaKey || t.ctrlKey || t.altKey || (W = !0);
692
+ }
693
+ var me = te(
694
+ function({
695
+ focusable: e = !0,
696
+ accessibleWhenDisabled: n,
697
+ autoFocus: r,
698
+ onFocusVisible: u,
699
+ ...o
700
+ }) {
701
+ const s = R(null);
702
+ p(() => {
703
+ e && (at || (g("mousedown", ge, !0), g("keydown", ye, !0), at = !0));
704
+ }, [e]), ut && p(() => {
705
+ if (!e) return;
706
+ const i = s.current;
707
+ if (!i || !st(i)) return;
708
+ const f = de(i);
709
+ if (!f) return;
710
+ const b = () => queueMicrotask(() => i.focus());
711
+ for (const h of f)
712
+ h.addEventListener("mouseup", b);
713
+ return () => {
714
+ for (const h of f)
715
+ h.removeEventListener("mouseup", b);
716
+ };
717
+ }, [e]);
718
+ const a = e && Mt(o), l = !!a && !n, [c, d] = E(!1);
719
+ p(() => {
720
+ e && l && c && d(!1);
721
+ }, [e, l, c]), p(() => {
722
+ if (!e || !c) return;
723
+ const i = s.current;
724
+ if (!i || typeof IntersectionObserver > "u") return;
725
+ const f = new IntersectionObserver(() => {
726
+ C(i) || d(!1);
727
+ });
728
+ return f.observe(i), () => f.disconnect();
729
+ }, [e, c]);
730
+ const m = L(
731
+ o.onKeyPressCapture,
732
+ a
733
+ ), bt = L(
734
+ o.onMouseDownCapture,
735
+ a
736
+ ), vt = L(o.onClickCapture, a), j = o.onMouseDown, pt = y((i) => {
737
+ if (j == null || j(i), i.defaultPrevented || !e) return;
738
+ const f = i.currentTarget;
739
+ if (!ut || Gt(i) || !Kt(f) && !st(f)) return;
740
+ let b = !1;
741
+ const h = () => {
742
+ b = !0;
743
+ }, Ct = { capture: !0, once: !0 };
744
+ f.addEventListener("focusin", h, Ct);
745
+ const J = ue(f.parentElement);
746
+ it(J, !0), D(f, "mouseup", () => {
747
+ f.removeEventListener("focusin", h, !0), it(J, !1), !b && se(f);
748
+ });
749
+ }), X = (i, f) => {
750
+ if (f && (i.currentTarget = f), !e) return;
751
+ const b = i.currentTarget;
752
+ b && ot(b) && (u == null || u(i), !i.defaultPrevented && (b.dataset.focusVisible = "true", d(!0)));
753
+ }, G = o.onKeyDownCapture, gt = y((i) => {
754
+ if (G == null || G(i), i.defaultPrevented || !e || c || i.metaKey || i.altKey || i.ctrlKey || !Q(i)) return;
755
+ const f = i.currentTarget;
756
+ D(f, "focusout", () => X(i, f));
757
+ }), H = o.onFocusCapture, yt = y((i) => {
758
+ if (H == null || H(i), i.defaultPrevented || !e) return;
759
+ if (!Q(i)) {
760
+ d(!1);
761
+ return;
762
+ }
763
+ const f = i.currentTarget, b = () => X(i, f);
764
+ W || le(i.target) ? D(i.target, "focusout", b) : d(!1);
765
+ }), Y = o.onBlur, mt = y((i) => {
766
+ Y == null || Y(i), e && Ht(i) && (i.currentTarget.removeAttribute("data-focus-visible"), d(!1));
767
+ }), Et = It(ee), ht = y((i) => {
768
+ e && r && i && Et && queueMicrotask(() => {
769
+ ot(i) || C(i) && i.focus();
770
+ });
771
+ }), $ = $t(s), wt = e && be($), z = e && ve($), N = o.style, xt = V(() => l ? { pointerEvents: "none", ...N } : N, [l, N]);
772
+ return o = {
773
+ "data-focus-visible": e && c || void 0,
774
+ "data-autofocus": r || void 0,
775
+ "aria-disabled": a || void 0,
776
+ ...o,
777
+ ref: B(s, ht, o.ref),
778
+ style: xt,
779
+ tabIndex: pe(
780
+ e,
781
+ l,
782
+ wt,
783
+ z,
784
+ o.tabIndex
785
+ ),
786
+ disabled: z && l ? !0 : void 0,
787
+ // TODO: Test Focusable contentEditable.
788
+ contentEditable: a ? void 0 : o.contentEditable,
789
+ onKeyPressCapture: m,
790
+ onClickCapture: vt,
791
+ onMouseDownCapture: bt,
792
+ onMouseDown: pt,
793
+ onKeyDownCapture: gt,
794
+ onFocusCapture: yt,
795
+ onBlur: mt
796
+ }, Nt(o);
797
+ }
798
+ );
799
+ Qt(function(e) {
800
+ const n = me(e);
801
+ return Zt(ce, n);
802
+ });
803
+ export {
804
+ Gt as $,
805
+ Ue as A,
806
+ Je as B,
807
+ Nt as C,
808
+ A as D,
809
+ an as E,
810
+ Ne as F,
811
+ Te as G,
812
+ Xt as H,
813
+ jt as I,
814
+ $t as J,
815
+ rn as K,
816
+ un as L,
817
+ g as M,
818
+ Ye as N,
819
+ S as O,
820
+ ie as P,
821
+ Mt as Q,
822
+ me as R,
823
+ on as S,
824
+ Be as T,
825
+ Q as U,
826
+ je as V,
827
+ Oe as W,
828
+ Yt as X,
829
+ xe as Y,
830
+ Ce as Z,
831
+ Ie as _,
832
+ Zt as a,
833
+ Le as a0,
834
+ Ve as a1,
835
+ Kt as a2,
836
+ k as a3,
837
+ $e as a4,
838
+ vn as a5,
839
+ Xe as a6,
840
+ F as a7,
841
+ Ge as a8,
842
+ Dt as a9,
843
+ fn as aa,
844
+ ln as ab,
845
+ bn as ac,
846
+ dn as ad,
847
+ ee as ae,
848
+ pn as af,
849
+ _t as ag,
850
+ De as ah,
851
+ ft as ai,
852
+ qe as aj,
853
+ U as ak,
854
+ cn as al,
855
+ C as am,
856
+ se as an,
857
+ _e as ao,
858
+ He as ap,
859
+ Ae as aq,
860
+ Se as ar,
861
+ Pe as as,
862
+ Ze as b,
863
+ te as c,
864
+ y as d,
865
+ Ut as e,
866
+ Qt as f,
867
+ ke as g,
868
+ x as h,
869
+ Re as i,
870
+ Qe as j,
871
+ en as k,
872
+ ze as l,
873
+ B as m,
874
+ we as n,
875
+ qt as o,
876
+ Me as p,
877
+ ot as q,
878
+ Ht as r,
879
+ Ke as s,
880
+ Fe as t,
881
+ tn as u,
882
+ D as v,
883
+ nn as w,
884
+ sn as x,
885
+ K as y,
886
+ We as z
887
+ };
888
+ //# sourceMappingURL=U6HHPQDW-BkT6kvCd.js.map