@adamosuiteservices/ui 2.20.1 → 2.20.3

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 (90) hide show
  1. package/dist/accordion-rounded.cjs +1 -1
  2. package/dist/accordion-rounded.js +1 -1
  3. package/dist/accordion.cjs +1 -1
  4. package/dist/accordion.js +1 -1
  5. package/dist/checkbox-BHStM029.cjs +24 -0
  6. package/dist/{checkbox-DPlUjwLi.js → checkbox-DX8b_6kG.js} +4 -3
  7. package/dist/checkbox.cjs +1 -1
  8. package/dist/checkbox.js +1 -1
  9. package/dist/collapsible.cjs +1 -1
  10. package/dist/collapsible.js +1 -1
  11. package/dist/{combobox-DylTjGrw.cjs → combobox-BURhN76t.cjs} +1 -1
  12. package/dist/{combobox-DG9u4g84.js → combobox-BrHVXnf2.js} +3 -3
  13. package/dist/combobox.cjs +1 -1
  14. package/dist/combobox.js +1 -1
  15. package/dist/context-menu.cjs +8 -8
  16. package/dist/context-menu.js +56 -55
  17. package/dist/date-picker-selector.cjs +1 -1
  18. package/dist/date-picker-selector.js +2 -2
  19. package/dist/dialog.cjs +3 -3
  20. package/dist/dialog.js +3 -3
  21. package/dist/dropdown-menu.cjs +9 -9
  22. package/dist/dropdown-menu.js +33 -32
  23. package/dist/full-screen-loader.cjs +4 -4
  24. package/dist/full-screen-loader.js +27 -24
  25. package/dist/hover-card.cjs +2 -2
  26. package/dist/hover-card.js +12 -11
  27. package/dist/index-1Io41IIt.cjs +1 -0
  28. package/dist/index-437EL2iq.js +52 -0
  29. package/dist/index-B695uy69.js +9 -0
  30. package/dist/index-BE-HFcQ8.cjs +1 -0
  31. package/dist/{index-BPOsnOxS.js → index-BM2A-WRV.js} +1 -1
  32. package/dist/index-BOnhen57.cjs +1 -0
  33. package/dist/{index-D_hmhfRp.js → index-BPnOqaWN.js} +9 -8
  34. package/dist/index-BqyOu62e.cjs +1 -0
  35. package/dist/index-C8aODXfJ.cjs +1 -0
  36. package/dist/index-CFB4VzSW.js +542 -0
  37. package/dist/index-CgAmFB15.cjs +1 -0
  38. package/dist/{index-B76LQ4E5.js → index-CinpJ0oP.js} +24 -23
  39. package/dist/{index-wujanfX3.js → index-Cpaqurwq.js} +191 -190
  40. package/dist/{index-B6gxHWt9.js → index-CwrPuu3I.js} +15 -14
  41. package/dist/index-D3xJARPa.cjs +1 -0
  42. package/dist/index-DSj2iNTW.js +137 -0
  43. package/dist/{index-Ce7JfyIP.js → index-DWrql5dh.js} +11 -10
  44. package/dist/{index-BIydBVaH.js → index-E5ek046p.js} +78 -76
  45. package/dist/{index-BaCYnOIG.cjs → index-L8BhH23Y.cjs} +1 -1
  46. package/dist/index-ZzRl2Lfu.cjs +5 -0
  47. package/dist/index-_TfuLupy.cjs +41 -0
  48. package/dist/index-cBJ7G45l.cjs +1 -0
  49. package/dist/popover-Dod16CM1.cjs +15 -0
  50. package/dist/{popover-DcQ18EVl.js → popover-tP2NoMYx.js} +84 -82
  51. package/dist/popover.cjs +1 -1
  52. package/dist/popover.js +1 -1
  53. package/dist/radio-group.cjs +3 -3
  54. package/dist/radio-group.js +10 -9
  55. package/dist/select.cjs +8 -8
  56. package/dist/select.js +21 -19
  57. package/dist/{sheet-Cp6JGhWC.cjs → sheet-DR1nAs9U.cjs} +1 -1
  58. package/dist/{sheet-hWerE8S1.js → sheet-UNggtdu3.js} +1 -1
  59. package/dist/sheet.cjs +1 -1
  60. package/dist/sheet.js +1 -1
  61. package/dist/sidebar.cjs +1 -1
  62. package/dist/sidebar.js +1 -1
  63. package/dist/slider.cjs +5 -5
  64. package/dist/slider.js +7 -6
  65. package/dist/styles.css +1 -1
  66. package/dist/switch.cjs +3 -3
  67. package/dist/switch.js +8 -7
  68. package/dist/tabs-underline.cjs +1 -1
  69. package/dist/tabs-underline.js +1 -1
  70. package/dist/tabs.cjs +1 -1
  71. package/dist/tabs.js +1 -1
  72. package/dist/toggle.cjs +2 -2
  73. package/dist/toggle.js +6 -5
  74. package/dist/tooltip.cjs +3 -3
  75. package/dist/tooltip.js +23 -22
  76. package/docs/components/layout/full-screen-loader.md +19 -1
  77. package/docs/components/ui/dialog.md +28 -3
  78. package/package.json +4 -2
  79. package/dist/checkbox-CIzBdqN7.cjs +0 -24
  80. package/dist/index-8iwAKZIp.cjs +0 -1
  81. package/dist/index-BWaO7kQK.cjs +0 -1
  82. package/dist/index-BnkHpTJs.cjs +0 -1
  83. package/dist/index-C0UREtMP.js +0 -59
  84. package/dist/index-C2P2kXMc.cjs +0 -41
  85. package/dist/index-CC6DBo2g.cjs +0 -1
  86. package/dist/index-CRWn-2fF.cjs +0 -1
  87. package/dist/index-Ca99LLZF.cjs +0 -5
  88. package/dist/index-e0gNU5O1.js +0 -675
  89. package/dist/index-i5lLg35-.cjs +0 -1
  90. package/dist/popover-cGp_rNLg.cjs +0 -15
@@ -1,675 +0,0 @@
1
- "use client";
2
- import * as u from "react";
3
- import { useState as he } from "react";
4
- import { u as me } from "./index-DLcqcWxM.js";
5
- import { P as pe } from "./index-BMWt1NBG.js";
6
- import { u as z } from "./index-0ioNhtNM.js";
7
- import { j as ge } from "./jsx-runtime-BzflLqGi.js";
8
- var U = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", Z = { bubbles: !1, cancelable: !0 }, ye = "FocusScope", be = u.forwardRef((e, t) => {
9
- const {
10
- loop: n = !1,
11
- trapped: r = !1,
12
- onMountAutoFocus: c,
13
- onUnmountAutoFocus: i,
14
- ...s
15
- } = e, [a, S] = u.useState(null), b = z(c), g = z(i), f = u.useRef(null), v = me(t, (o) => S(o)), h = u.useRef({
16
- paused: !1,
17
- pause() {
18
- this.paused = !0;
19
- },
20
- resume() {
21
- this.paused = !1;
22
- }
23
- }).current;
24
- u.useEffect(() => {
25
- if (r) {
26
- let o = function(p) {
27
- if (h.paused || !a) return;
28
- const y = p.target;
29
- a.contains(y) ? f.current = y : k(f.current, { select: !0 });
30
- }, l = function(p) {
31
- if (h.paused || !a) return;
32
- const y = p.relatedTarget;
33
- y !== null && (a.contains(y) || k(f.current, { select: !0 }));
34
- }, d = function(p) {
35
- if (document.activeElement === document.body)
36
- for (const E of p)
37
- E.removedNodes.length > 0 && k(a);
38
- };
39
- document.addEventListener("focusin", o), document.addEventListener("focusout", l);
40
- const m = new MutationObserver(d);
41
- return a && m.observe(a, { childList: !0, subtree: !0 }), () => {
42
- document.removeEventListener("focusin", o), document.removeEventListener("focusout", l), m.disconnect();
43
- };
44
- }
45
- }, [r, a, h.paused]), u.useEffect(() => {
46
- if (a) {
47
- Q.add(h);
48
- const o = document.activeElement;
49
- if (!a.contains(o)) {
50
- const d = new CustomEvent(U, Z);
51
- a.addEventListener(U, b), a.dispatchEvent(d), d.defaultPrevented || (Ee(ke(oe(a)), { select: !0 }), document.activeElement === o && k(a));
52
- }
53
- return () => {
54
- a.removeEventListener(U, b), setTimeout(() => {
55
- const d = new CustomEvent(j, Z);
56
- a.addEventListener(j, g), a.dispatchEvent(d), d.defaultPrevented || k(o ?? document.body, { select: !0 }), a.removeEventListener(j, g), Q.remove(h);
57
- }, 0);
58
- };
59
- }
60
- }, [a, b, g, h]);
61
- const w = u.useCallback(
62
- (o) => {
63
- if (!n && !r || h.paused) return;
64
- const l = o.key === "Tab" && !o.altKey && !o.ctrlKey && !o.metaKey, d = document.activeElement;
65
- if (l && d) {
66
- const m = o.currentTarget, [p, y] = Se(m);
67
- p && y ? !o.shiftKey && d === y ? (o.preventDefault(), n && k(p, { select: !0 })) : o.shiftKey && d === p && (o.preventDefault(), n && k(y, { select: !0 })) : d === m && o.preventDefault();
68
- }
69
- },
70
- [n, r, h.paused]
71
- );
72
- return /* @__PURE__ */ ge.jsx(pe.div, { tabIndex: -1, ...s, ref: v, onKeyDown: w });
73
- });
74
- be.displayName = ye;
75
- function Ee(e, { select: t = !1 } = {}) {
76
- const n = document.activeElement;
77
- for (const r of e)
78
- if (k(r, { select: t }), document.activeElement !== n) return;
79
- }
80
- function Se(e) {
81
- const t = oe(e), n = q(t, e), r = q(t.reverse(), e);
82
- return [n, r];
83
- }
84
- function oe(e) {
85
- const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
86
- acceptNode: (r) => {
87
- const c = r.tagName === "INPUT" && r.type === "hidden";
88
- return r.disabled || r.hidden || c ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
89
- }
90
- });
91
- for (; n.nextNode(); ) t.push(n.currentNode);
92
- return t;
93
- }
94
- function q(e, t) {
95
- for (const n of e)
96
- if (!we(n, { upTo: t })) return n;
97
- }
98
- function we(e, { upTo: t }) {
99
- if (getComputedStyle(e).visibility === "hidden") return !0;
100
- for (; e; ) {
101
- if (t !== void 0 && e === t) return !1;
102
- if (getComputedStyle(e).display === "none") return !0;
103
- e = e.parentElement;
104
- }
105
- return !1;
106
- }
107
- function Ce(e) {
108
- return e instanceof HTMLInputElement && "select" in e;
109
- }
110
- function k(e, { select: t = !1 } = {}) {
111
- if (e && e.focus) {
112
- const n = document.activeElement;
113
- e.focus({ preventScroll: !0 }), e !== n && Ce(e) && t && e.select();
114
- }
115
- }
116
- var Q = Re();
117
- function Re() {
118
- let e = [];
119
- return {
120
- add(t) {
121
- const n = e[0];
122
- t !== n && n?.pause(), e = $(e, t), e.unshift(t);
123
- },
124
- remove(t) {
125
- e = $(e, t), e[0]?.resume();
126
- }
127
- };
128
- }
129
- function $(e, t) {
130
- const n = [...e], r = n.indexOf(t);
131
- return r !== -1 && n.splice(r, 1), n;
132
- }
133
- function ke(e) {
134
- return e.filter((t) => t.tagName !== "A");
135
- }
136
- var _ = 0;
137
- function gt() {
138
- u.useEffect(() => {
139
- const e = document.querySelectorAll("[data-radix-focus-guard]");
140
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? J()), document.body.insertAdjacentElement("beforeend", e[1] ?? J()), _++, () => {
141
- _ === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _--;
142
- };
143
- }, []);
144
- }
145
- function J() {
146
- const e = document.createElement("span");
147
- return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
148
- }
149
- var C = function() {
150
- return C = Object.assign || function(t) {
151
- for (var n, r = 1, c = arguments.length; r < c; r++) {
152
- n = arguments[r];
153
- for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (t[i] = n[i]);
154
- }
155
- return t;
156
- }, C.apply(this, arguments);
157
- };
158
- function ce(e, t) {
159
- var n = {};
160
- for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
161
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
162
- for (var c = 0, r = Object.getOwnPropertySymbols(e); c < r.length; c++)
163
- t.indexOf(r[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[c]) && (n[r[c]] = e[r[c]]);
164
- return n;
165
- }
166
- function Ae(e, t, n) {
167
- if (n || arguments.length === 2) for (var r = 0, c = t.length, i; r < c; r++)
168
- (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
169
- return e.concat(i || Array.prototype.slice.call(t));
170
- }
171
- var W = "right-scroll-bar-position", B = "width-before-scroll-bar", Te = "with-scroll-bars-hidden", Ne = "--removed-body-scroll-bar-size";
172
- function K(e, t) {
173
- return typeof e == "function" ? e(t) : e && (e.current = t), e;
174
- }
175
- function Me(e, t) {
176
- var n = he(function() {
177
- return {
178
- // value
179
- value: e,
180
- // last callback
181
- callback: t,
182
- // "memoized" public interface
183
- facade: {
184
- get current() {
185
- return n.value;
186
- },
187
- set current(r) {
188
- var c = n.value;
189
- c !== r && (n.value = r, n.callback(r, c));
190
- }
191
- }
192
- };
193
- })[0];
194
- return n.callback = t, n.facade;
195
- }
196
- var Fe = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ee = /* @__PURE__ */ new WeakMap();
197
- function Pe(e, t) {
198
- var n = Me(null, function(r) {
199
- return e.forEach(function(c) {
200
- return K(c, r);
201
- });
202
- });
203
- return Fe(function() {
204
- var r = ee.get(n);
205
- if (r) {
206
- var c = new Set(r), i = new Set(e), s = n.current;
207
- c.forEach(function(a) {
208
- i.has(a) || K(a, null);
209
- }), i.forEach(function(a) {
210
- c.has(a) || K(a, s);
211
- });
212
- }
213
- ee.set(n, e);
214
- }, [e]), n;
215
- }
216
- function Oe(e) {
217
- return e;
218
- }
219
- function Le(e, t) {
220
- t === void 0 && (t = Oe);
221
- var n = [], r = !1, c = {
222
- read: function() {
223
- if (r)
224
- throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
225
- return n.length ? n[n.length - 1] : e;
226
- },
227
- useMedium: function(i) {
228
- var s = t(i, r);
229
- return n.push(s), function() {
230
- n = n.filter(function(a) {
231
- return a !== s;
232
- });
233
- };
234
- },
235
- assignSyncMedium: function(i) {
236
- for (r = !0; n.length; ) {
237
- var s = n;
238
- n = [], s.forEach(i);
239
- }
240
- n = {
241
- push: function(a) {
242
- return i(a);
243
- },
244
- filter: function() {
245
- return n;
246
- }
247
- };
248
- },
249
- assignMedium: function(i) {
250
- r = !0;
251
- var s = [];
252
- if (n.length) {
253
- var a = n;
254
- n = [], a.forEach(i), s = n;
255
- }
256
- var S = function() {
257
- var g = s;
258
- s = [], g.forEach(i);
259
- }, b = function() {
260
- return Promise.resolve().then(S);
261
- };
262
- b(), n = {
263
- push: function(g) {
264
- s.push(g), b();
265
- },
266
- filter: function(g) {
267
- return s = s.filter(g), n;
268
- }
269
- };
270
- }
271
- };
272
- return c;
273
- }
274
- function xe(e) {
275
- e === void 0 && (e = {});
276
- var t = Le(null);
277
- return t.options = C({ async: !0, ssr: !1 }, e), t;
278
- }
279
- var ue = function(e) {
280
- var t = e.sideCar, n = ce(e, ["sideCar"]);
281
- if (!t)
282
- throw new Error("Sidecar: please provide `sideCar` property to import the right car");
283
- var r = t.read();
284
- if (!r)
285
- throw new Error("Sidecar medium not found");
286
- return u.createElement(r, C({}, n));
287
- };
288
- ue.isSideCarExport = !0;
289
- function Ie(e, t) {
290
- return e.useMedium(t), ue;
291
- }
292
- var ie = xe(), H = function() {
293
- }, D = u.forwardRef(function(e, t) {
294
- var n = u.useRef(null), r = u.useState({
295
- onScrollCapture: H,
296
- onWheelCapture: H,
297
- onTouchMoveCapture: H
298
- }), c = r[0], i = r[1], s = e.forwardProps, a = e.children, S = e.className, b = e.removeScrollBar, g = e.enabled, f = e.shards, v = e.sideCar, h = e.noRelative, w = e.noIsolation, o = e.inert, l = e.allowPinchZoom, d = e.as, m = d === void 0 ? "div" : d, p = e.gapMode, y = ce(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, A = Pe([n, t]), R = C(C({}, y), c);
299
- return u.createElement(
300
- u.Fragment,
301
- null,
302
- g && u.createElement(E, { sideCar: ie, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: p }),
303
- s ? u.cloneElement(u.Children.only(a), C(C({}, R), { ref: A })) : u.createElement(m, C({}, R, { className: S, ref: A }), a)
304
- );
305
- });
306
- D.defaultProps = {
307
- enabled: !0,
308
- removeScrollBar: !0,
309
- inert: !1
310
- };
311
- D.classNames = {
312
- fullWidth: B,
313
- zeroRight: W
314
- };
315
- var We = function() {
316
- if (typeof __webpack_nonce__ < "u")
317
- return __webpack_nonce__;
318
- };
319
- function Be() {
320
- if (!document)
321
- return null;
322
- var e = document.createElement("style");
323
- e.type = "text/css";
324
- var t = We();
325
- return t && e.setAttribute("nonce", t), e;
326
- }
327
- function De(e, t) {
328
- e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
329
- }
330
- function Ue(e) {
331
- var t = document.head || document.getElementsByTagName("head")[0];
332
- t.appendChild(e);
333
- }
334
- var je = function() {
335
- var e = 0, t = null;
336
- return {
337
- add: function(n) {
338
- e == 0 && (t = Be()) && (De(t, n), Ue(t)), e++;
339
- },
340
- remove: function() {
341
- e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
342
- }
343
- };
344
- }, _e = function() {
345
- var e = je();
346
- return function(t, n) {
347
- u.useEffect(function() {
348
- return e.add(t), function() {
349
- e.remove();
350
- };
351
- }, [t && n]);
352
- };
353
- }, le = function() {
354
- var e = _e(), t = function(n) {
355
- var r = n.styles, c = n.dynamic;
356
- return e(r, c), null;
357
- };
358
- return t;
359
- }, Ke = {
360
- left: 0,
361
- top: 0,
362
- right: 0,
363
- gap: 0
364
- }, V = function(e) {
365
- return parseInt(e || "", 10) || 0;
366
- }, He = function(e) {
367
- var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
368
- return [V(n), V(r), V(c)];
369
- }, Ve = function(e) {
370
- if (e === void 0 && (e = "margin"), typeof window > "u")
371
- return Ke;
372
- var t = He(e), n = document.documentElement.clientWidth, r = window.innerWidth;
373
- return {
374
- left: t[0],
375
- top: t[1],
376
- right: t[2],
377
- gap: Math.max(0, r - n + t[2] - t[0])
378
- };
379
- }, Xe = le(), F = "data-scroll-locked", Ye = function(e, t, n, r) {
380
- var c = e.left, i = e.top, s = e.right, a = e.gap;
381
- return n === void 0 && (n = "margin"), `
382
- .`.concat(Te, ` {
383
- overflow: hidden `).concat(r, `;
384
- padding-right: `).concat(a, "px ").concat(r, `;
385
- }
386
- body[`).concat(F, `] {
387
- overflow: hidden `).concat(r, `;
388
- overscroll-behavior: contain;
389
- `).concat([
390
- t && "position: relative ".concat(r, ";"),
391
- n === "margin" && `
392
- padding-left: `.concat(c, `px;
393
- padding-top: `).concat(i, `px;
394
- padding-right: `).concat(s, `px;
395
- margin-left:0;
396
- margin-top:0;
397
- margin-right: `).concat(a, "px ").concat(r, `;
398
- `),
399
- n === "padding" && "padding-right: ".concat(a, "px ").concat(r, ";")
400
- ].filter(Boolean).join(""), `
401
- }
402
-
403
- .`).concat(W, ` {
404
- right: `).concat(a, "px ").concat(r, `;
405
- }
406
-
407
- .`).concat(B, ` {
408
- margin-right: `).concat(a, "px ").concat(r, `;
409
- }
410
-
411
- .`).concat(W, " .").concat(W, ` {
412
- right: 0 `).concat(r, `;
413
- }
414
-
415
- .`).concat(B, " .").concat(B, ` {
416
- margin-right: 0 `).concat(r, `;
417
- }
418
-
419
- body[`).concat(F, `] {
420
- `).concat(Ne, ": ").concat(a, `px;
421
- }
422
- `);
423
- }, te = function() {
424
- var e = parseInt(document.body.getAttribute(F) || "0", 10);
425
- return isFinite(e) ? e : 0;
426
- }, Ge = function() {
427
- u.useEffect(function() {
428
- return document.body.setAttribute(F, (te() + 1).toString()), function() {
429
- var e = te() - 1;
430
- e <= 0 ? document.body.removeAttribute(F) : document.body.setAttribute(F, e.toString());
431
- };
432
- }, []);
433
- }, ze = function(e) {
434
- var t = e.noRelative, n = e.noImportant, r = e.gapMode, c = r === void 0 ? "margin" : r;
435
- Ge();
436
- var i = u.useMemo(function() {
437
- return Ve(c);
438
- }, [c]);
439
- return u.createElement(Xe, { styles: Ye(i, !t, c, n ? "" : "!important") });
440
- }, Y = !1;
441
- if (typeof window < "u")
442
- try {
443
- var O = Object.defineProperty({}, "passive", {
444
- get: function() {
445
- return Y = !0, !0;
446
- }
447
- });
448
- window.addEventListener("test", O, O), window.removeEventListener("test", O, O);
449
- } catch {
450
- Y = !1;
451
- }
452
- var T = Y ? { passive: !1 } : !1, Ze = function(e) {
453
- return e.tagName === "TEXTAREA";
454
- }, se = function(e, t) {
455
- if (!(e instanceof Element))
456
- return !1;
457
- var n = window.getComputedStyle(e);
458
- return (
459
- // not-not-scrollable
460
- n[t] !== "hidden" && // contains scroll inside self
461
- !(n.overflowY === n.overflowX && !Ze(e) && n[t] === "visible")
462
- );
463
- }, qe = function(e) {
464
- return se(e, "overflowY");
465
- }, Qe = function(e) {
466
- return se(e, "overflowX");
467
- }, ne = function(e, t) {
468
- var n = t.ownerDocument, r = t;
469
- do {
470
- typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
471
- var c = fe(e, r);
472
- if (c) {
473
- var i = de(e, r), s = i[1], a = i[2];
474
- if (s > a)
475
- return !0;
476
- }
477
- r = r.parentNode;
478
- } while (r && r !== n.body);
479
- return !1;
480
- }, $e = function(e) {
481
- var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
482
- return [
483
- t,
484
- n,
485
- r
486
- ];
487
- }, Je = function(e) {
488
- var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
489
- return [
490
- t,
491
- n,
492
- r
493
- ];
494
- }, fe = function(e, t) {
495
- return e === "v" ? qe(t) : Qe(t);
496
- }, de = function(e, t) {
497
- return e === "v" ? $e(t) : Je(t);
498
- }, et = function(e, t) {
499
- return e === "h" && t === "rtl" ? -1 : 1;
500
- }, tt = function(e, t, n, r, c) {
501
- var i = et(e, window.getComputedStyle(t).direction), s = i * r, a = n.target, S = t.contains(a), b = !1, g = s > 0, f = 0, v = 0;
502
- do {
503
- if (!a)
504
- break;
505
- var h = de(e, a), w = h[0], o = h[1], l = h[2], d = o - l - i * w;
506
- (w || d) && fe(e, a) && (f += d, v += w);
507
- var m = a.parentNode;
508
- a = m && m.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? m.host : m;
509
- } while (
510
- // portaled content
511
- !S && a !== document.body || // self content
512
- S && (t.contains(a) || t === a)
513
- );
514
- return (g && Math.abs(f) < 1 || !g && Math.abs(v) < 1) && (b = !0), b;
515
- }, L = function(e) {
516
- return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
517
- }, re = function(e) {
518
- return [e.deltaX, e.deltaY];
519
- }, ae = function(e) {
520
- return e && "current" in e ? e.current : e;
521
- }, nt = function(e, t) {
522
- return e[0] === t[0] && e[1] === t[1];
523
- }, rt = function(e) {
524
- return `
525
- .block-interactivity-`.concat(e, ` {pointer-events: none;}
526
- .allow-interactivity-`).concat(e, ` {pointer-events: all;}
527
- `);
528
- }, at = 0, N = [];
529
- function ot(e) {
530
- var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(at++)[0], i = u.useState(le)[0], s = u.useRef(e);
531
- u.useEffect(function() {
532
- s.current = e;
533
- }, [e]), u.useEffect(function() {
534
- if (e.inert) {
535
- document.body.classList.add("block-interactivity-".concat(c));
536
- var o = Ae([e.lockRef.current], (e.shards || []).map(ae), !0).filter(Boolean);
537
- return o.forEach(function(l) {
538
- return l.classList.add("allow-interactivity-".concat(c));
539
- }), function() {
540
- document.body.classList.remove("block-interactivity-".concat(c)), o.forEach(function(l) {
541
- return l.classList.remove("allow-interactivity-".concat(c));
542
- });
543
- };
544
- }
545
- }, [e.inert, e.lockRef.current, e.shards]);
546
- var a = u.useCallback(function(o, l) {
547
- if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
548
- return !s.current.allowPinchZoom;
549
- var d = L(o), m = n.current, p = "deltaX" in o ? o.deltaX : m[0] - d[0], y = "deltaY" in o ? o.deltaY : m[1] - d[1], E, A = o.target, R = Math.abs(p) > Math.abs(y) ? "h" : "v";
550
- if ("touches" in o && R === "h" && A.type === "range")
551
- return !1;
552
- var P = ne(R, A);
553
- if (!P)
554
- return !0;
555
- if (P ? E = R : (E = R === "v" ? "h" : "v", P = ne(R, A)), !P)
556
- return !1;
557
- if (!r.current && "changedTouches" in o && (p || y) && (r.current = E), !E)
558
- return !0;
559
- var G = r.current || E;
560
- return tt(G, l, o, G === "h" ? p : y);
561
- }, []), S = u.useCallback(function(o) {
562
- var l = o;
563
- if (!(!N.length || N[N.length - 1] !== i)) {
564
- var d = "deltaY" in l ? re(l) : L(l), m = t.current.filter(function(E) {
565
- return E.name === l.type && (E.target === l.target || l.target === E.shadowParent) && nt(E.delta, d);
566
- })[0];
567
- if (m && m.should) {
568
- l.cancelable && l.preventDefault();
569
- return;
570
- }
571
- if (!m) {
572
- var p = (s.current.shards || []).map(ae).filter(Boolean).filter(function(E) {
573
- return E.contains(l.target);
574
- }), y = p.length > 0 ? a(l, p[0]) : !s.current.noIsolation;
575
- y && l.cancelable && l.preventDefault();
576
- }
577
- }
578
- }, []), b = u.useCallback(function(o, l, d, m) {
579
- var p = { name: o, delta: l, target: d, should: m, shadowParent: ct(d) };
580
- t.current.push(p), setTimeout(function() {
581
- t.current = t.current.filter(function(y) {
582
- return y !== p;
583
- });
584
- }, 1);
585
- }, []), g = u.useCallback(function(o) {
586
- n.current = L(o), r.current = void 0;
587
- }, []), f = u.useCallback(function(o) {
588
- b(o.type, re(o), o.target, a(o, e.lockRef.current));
589
- }, []), v = u.useCallback(function(o) {
590
- b(o.type, L(o), o.target, a(o, e.lockRef.current));
591
- }, []);
592
- u.useEffect(function() {
593
- return N.push(i), e.setCallbacks({
594
- onScrollCapture: f,
595
- onWheelCapture: f,
596
- onTouchMoveCapture: v
597
- }), document.addEventListener("wheel", S, T), document.addEventListener("touchmove", S, T), document.addEventListener("touchstart", g, T), function() {
598
- N = N.filter(function(o) {
599
- return o !== i;
600
- }), document.removeEventListener("wheel", S, T), document.removeEventListener("touchmove", S, T), document.removeEventListener("touchstart", g, T);
601
- };
602
- }, []);
603
- var h = e.removeScrollBar, w = e.inert;
604
- return u.createElement(
605
- u.Fragment,
606
- null,
607
- w ? u.createElement(i, { styles: rt(c) }) : null,
608
- h ? u.createElement(ze, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
609
- );
610
- }
611
- function ct(e) {
612
- for (var t = null; e !== null; )
613
- e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
614
- return t;
615
- }
616
- const ut = Ie(ie, ot);
617
- var it = u.forwardRef(function(e, t) {
618
- return u.createElement(D, C({}, e, { ref: t, sideCar: ut }));
619
- });
620
- it.classNames = D.classNames;
621
- var lt = function(e) {
622
- if (typeof document > "u")
623
- return null;
624
- var t = Array.isArray(e) ? e[0] : e;
625
- return t.ownerDocument.body;
626
- }, M = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), I = {}, X = 0, ve = function(e) {
627
- return e && (e.host || ve(e.parentNode));
628
- }, st = function(e, t) {
629
- return t.map(function(n) {
630
- if (e.contains(n))
631
- return n;
632
- var r = ve(n);
633
- return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
634
- }).filter(function(n) {
635
- return !!n;
636
- });
637
- }, ft = function(e, t, n, r) {
638
- var c = st(t, Array.isArray(e) ? e : [e]);
639
- I[n] || (I[n] = /* @__PURE__ */ new WeakMap());
640
- var i = I[n], s = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
641
- !f || a.has(f) || (a.add(f), b(f.parentNode));
642
- };
643
- c.forEach(b);
644
- var g = function(f) {
645
- !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
646
- if (a.has(v))
647
- g(v);
648
- else
649
- try {
650
- var h = v.getAttribute(r), w = h !== null && h !== "false", o = (M.get(v) || 0) + 1, l = (i.get(v) || 0) + 1;
651
- M.set(v, o), i.set(v, l), s.push(v), o === 1 && w && x.set(v, !0), l === 1 && v.setAttribute(n, "true"), w || v.setAttribute(r, "true");
652
- } catch (d) {
653
- console.error("aria-hidden: cannot operate on ", v, d);
654
- }
655
- });
656
- };
657
- return g(t), a.clear(), X++, function() {
658
- s.forEach(function(f) {
659
- var v = M.get(f) - 1, h = i.get(f) - 1;
660
- M.set(f, v), i.set(f, h), v || (x.has(f) || f.removeAttribute(r), x.delete(f)), h || f.removeAttribute(n);
661
- }), X--, X || (M = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), I = {});
662
- };
663
- }, yt = function(e, t, n) {
664
- n === void 0 && (n = "data-aria-hidden");
665
- var r = Array.from(Array.isArray(e) ? e : [e]), c = lt(e);
666
- return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), ft(r, c, n, "aria-hidden")) : function() {
667
- return null;
668
- };
669
- };
670
- export {
671
- be as F,
672
- it as R,
673
- yt as h,
674
- gt as u
675
- };
@@ -1 +0,0 @@
1
- "use client";"use strict";const A=require("react"),x=require("./index-BWaO7kQK.cjs"),M=require("./index-cwZN7ZY3.cjs"),f=require("./index-CC6DBo2g.cjs"),N=require("./index-DE3jjVoC.cjs"),m=require("./index-CocSS1YK.cjs"),q=require("./index-Da298sEl.cjs"),F=require("./index-WIv2ndLu.cjs"),d=require("./jsx-runtime-BB_1_6y_.cjs");function $(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const t=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(n,o,t.get?t:{enumerable:!0,get:()=>e[o]})}}return n.default=e,Object.freeze(n)}const v=$(A);var g="Tabs",[w]=M.createContextScope(g,[f.createRovingFocusGroupScope]),R=f.createRovingFocusGroupScope(),[D,T]=w(g),j=v.forwardRef((e,n)=>{const{__scopeTabs:o,value:t,onValueChange:i,defaultValue:c,orientation:r="horizontal",dir:u,activationMode:p="automatic",...b}=e,s=q.useDirection(u),[a,l]=x.useControllableState({prop:t,onChange:i,defaultProp:c??"",caller:g});return d.jsxRuntimeExports.jsx(D,{scope:o,baseId:F.useId(),value:a,onValueChange:l,orientation:r,dir:s,activationMode:p,children:d.jsxRuntimeExports.jsx(m.Primitive.div,{dir:s,"data-orientation":r,...b,ref:n})})});j.displayName=g;var E="TabsList",C=v.forwardRef((e,n)=>{const{__scopeTabs:o,loop:t=!0,...i}=e,c=T(E,o),r=R(o);return d.jsxRuntimeExports.jsx(f.Root,{asChild:!0,...r,orientation:c.orientation,dir:c.dir,loop:t,children:d.jsxRuntimeExports.jsx(m.Primitive.div,{role:"tablist","aria-orientation":c.orientation,...i,ref:n})})});C.displayName=E;var h="TabsTrigger",I=v.forwardRef((e,n)=>{const{__scopeTabs:o,value:t,disabled:i=!1,...c}=e,r=T(h,o),u=R(o),p=P(r.baseId,t),b=S(r.baseId,t),s=t===r.value;return d.jsxRuntimeExports.jsx(f.Item,{asChild:!0,...u,focusable:!i,active:s,children:d.jsxRuntimeExports.jsx(m.Primitive.button,{type:"button",role:"tab","aria-selected":s,"aria-controls":b,"data-state":s?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:p,...c,ref:n,onMouseDown:x.composeEventHandlers(e.onMouseDown,a=>{!i&&a.button===0&&a.ctrlKey===!1?r.onValueChange(t):a.preventDefault()}),onKeyDown:x.composeEventHandlers(e.onKeyDown,a=>{[" ","Enter"].includes(a.key)&&r.onValueChange(t)}),onFocus:x.composeEventHandlers(e.onFocus,()=>{const a=r.activationMode!=="manual";!s&&!i&&a&&r.onValueChange(t)})})})});I.displayName=h;var _="TabsContent",y=v.forwardRef((e,n)=>{const{__scopeTabs:o,value:t,forceMount:i,children:c,...r}=e,u=T(_,o),p=P(u.baseId,t),b=S(u.baseId,t),s=t===u.value,a=v.useRef(s);return v.useEffect(()=>{const l=requestAnimationFrame(()=>a.current=!1);return()=>cancelAnimationFrame(l)},[]),d.jsxRuntimeExports.jsx(N.Presence,{present:i||s,children:({present:l})=>d.jsxRuntimeExports.jsx(m.Primitive.div,{"data-state":s?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":p,hidden:!l,id:b,tabIndex:0,...r,ref:n,style:{...e.style,animationDuration:a.current?"0s":void 0},children:l&&c})})});y.displayName=_;function P(e,n){return`${e}-trigger-${n}`}function S(e,n){return`${e}-content-${n}`}var G=j,V=C,O=I,L=y;exports.Content=L;exports.List=V;exports.Root2=G;exports.Trigger=O;