@spear-ai/spectral 1.8.8 → 1.9.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.
Files changed (54) hide show
  1. package/dist/.js +214 -210
  2. package/dist/Accordion.js +4 -4
  3. package/dist/Combobox/ComboboxBase.d.ts +8 -0
  4. package/dist/Combobox/ComboboxBase.js +80 -0
  5. package/dist/Combobox.d.ts +20 -0
  6. package/dist/Combobox.js +175 -0
  7. package/dist/ComboboxBase-CxNxYtdT.js +408 -0
  8. package/dist/ControlGroup/ControlGroupSelect.d.ts +33 -0
  9. package/dist/ControlGroup/ControlGroupSelect.js +104 -0
  10. package/dist/ControlGroup.d.ts +24 -0
  11. package/dist/ControlGroup.js +51 -0
  12. package/dist/Dialog.js +2 -2
  13. package/dist/Drawer.js +1 -1
  14. package/dist/HoverCard.js +4 -4
  15. package/dist/MultiSelect/MultiSelectBase.js +128 -126
  16. package/dist/Popover.js +1 -1
  17. package/dist/RadioGroup.d.ts +1 -1
  18. package/dist/RadioGroup.js +194 -204
  19. package/dist/Select.js +1 -1
  20. package/dist/Slider.js +3 -3
  21. package/dist/Tooltip.js +6 -6
  22. package/dist/Tray.d.ts +3 -1
  23. package/dist/Tray.js +36 -32
  24. package/dist/{Combination-CQ5bXZqE.js → index-6oYKCvIn.js} +179 -178
  25. package/dist/{index-CtqlhLRO.js → index-BFOf48AQ.js} +1 -1
  26. package/dist/{index-BJ6qs9i5.js → index-BlHU_t18.js} +7 -7
  27. package/dist/{index-D2Qxe4uK.js → index-Bm1RbF6w.js} +1 -1
  28. package/dist/{index-CXltlPV-.js → index-Bv2OIg5P.js} +6 -6
  29. package/dist/{index-Cgdmxb3F.js → index-CKEI0pDv.js} +1 -1
  30. package/dist/{index-CDkQCeZY.js → index-CM_hWgfC.js} +1 -1
  31. package/dist/{index-CJKg3MVV.js → index-C_YVr64u.js} +2 -2
  32. package/dist/{index-obMGvcdD.js → index-CwSyIPrv.js} +1 -1
  33. package/dist/{index-9OmOYyjJ.js → index-Dc0No4pV.js} +2 -1
  34. package/dist/{index-DqvTB1Bv.js → index-T6XEa11q.js} +7 -7
  35. package/dist/{index-CmWCa9Ae.js → index-pBCLb6Gr.js} +5 -5
  36. package/dist/{index-WBfSMXvE.js → index-psiVrsnE.js} +1 -1
  37. package/dist/index.d.ts +3 -1
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/primitives/button.d.ts +1 -1
  40. package/dist/primitives/button.d.ts.map +1 -1
  41. package/dist/primitives/button.js +4 -4
  42. package/dist/{InputGroup.d.ts → primitives/input-group.d.ts} +10 -7
  43. package/dist/primitives/input-group.d.ts.map +1 -0
  44. package/dist/primitives/input-group.js +74 -0
  45. package/dist/primitives/input.d.ts +6 -1
  46. package/dist/primitives/input.d.ts.map +1 -1
  47. package/dist/primitives/input.js +1 -1
  48. package/dist/primitives/popover.d.ts +10 -0
  49. package/dist/primitives/popover.d.ts.map +1 -0
  50. package/dist/primitives/popover.js +26 -0
  51. package/dist/primitives/select.js +2 -2
  52. package/dist/styles/spectral.css +2 -2
  53. package/package.json +1 -1
  54. package/dist/InputGroup.js +0 -84
@@ -1,23 +1,10 @@
1
1
  import "./styles/main.css";
2
2
  import * as u from "react";
3
3
  import { useState as ge } from "react";
4
- import { u as ye, P as be } from "./index-9OmOYyjJ.js";
4
+ import { u as ye, P as be } from "./index-Dc0No4pV.js";
5
5
  import { u as q } from "./index-0ioNhtNM.js";
6
6
  import { jsx as Ee } from "react/jsx-runtime";
7
- var _ = 0;
8
- function bt() {
9
- u.useEffect(() => {
10
- const e = document.querySelectorAll("[data-radix-focus-guard]");
11
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Q()), document.body.insertAdjacentElement("beforeend", e[1] ?? Q()), _++, () => {
12
- _ === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), _--;
13
- };
14
- }, []);
15
- }
16
- function Q() {
17
- const e = document.createElement("span");
18
- 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;
19
- }
20
- var j = "focusScope.autoFocusOnMount", K = "focusScope.autoFocusOnUnmount", $ = { bubbles: !1, cancelable: !0 }, Se = "FocusScope", we = u.forwardRef((e, t) => {
7
+ var _ = "focusScope.autoFocusOnMount", j = "focusScope.autoFocusOnUnmount", Q = { bubbles: !1, cancelable: !0 }, Se = "FocusScope", we = u.forwardRef((e, t) => {
21
8
  const {
22
9
  loop: n = !1,
23
10
  trapped: r = !1,
@@ -56,16 +43,16 @@ var j = "focusScope.autoFocusOnMount", K = "focusScope.autoFocusOnUnmount", $ =
56
43
  }
57
44
  }, [r, a, h.paused]), u.useEffect(() => {
58
45
  if (a) {
59
- ee.add(h);
46
+ J.add(h);
60
47
  const o = document.activeElement;
61
48
  if (!a.contains(o)) {
62
- const d = new CustomEvent(j, $);
63
- a.addEventListener(j, b), a.dispatchEvent(d), d.defaultPrevented || (Ce(Ne(ue(a)), { select: !0 }), document.activeElement === o && A(a));
49
+ const d = new CustomEvent(_, Q);
50
+ a.addEventListener(_, b), a.dispatchEvent(d), d.defaultPrevented || (Ce(Ne(ue(a)), { select: !0 }), document.activeElement === o && A(a));
64
51
  }
65
52
  return () => {
66
- a.removeEventListener(j, b), setTimeout(() => {
67
- const d = new CustomEvent(K, $);
68
- a.addEventListener(K, g), a.dispatchEvent(d), d.defaultPrevented || A(o ?? document.body, { select: !0 }), a.removeEventListener(K, g), ee.remove(h);
53
+ a.removeEventListener(_, b), setTimeout(() => {
54
+ const d = new CustomEvent(j, Q);
55
+ a.addEventListener(j, g), a.dispatchEvent(d), d.defaultPrevented || A(o ?? document.body, { select: !0 }), a.removeEventListener(j, g), J.remove(h);
69
56
  }, 0);
70
57
  };
71
58
  }
@@ -90,7 +77,7 @@ function Ce(e, { select: t = !1 } = {}) {
90
77
  if (A(r, { select: t }), document.activeElement !== n) return;
91
78
  }
92
79
  function Re(e) {
93
- const t = ue(e), n = J(t, e), r = J(t.reverse(), e);
80
+ const t = ue(e), n = $(t, e), r = $(t.reverse(), e);
94
81
  return [n, r];
95
82
  }
96
83
  function ue(e) {
@@ -103,7 +90,7 @@ function ue(e) {
103
90
  for (; n.nextNode(); ) t.push(n.currentNode);
104
91
  return t;
105
92
  }
106
- function J(e, t) {
93
+ function $(e, t) {
107
94
  for (const n of e)
108
95
  if (!ke(n, { upTo: t })) return n;
109
96
  }
@@ -125,75 +112,40 @@ function A(e, { select: t = !1 } = {}) {
125
112
  e.focus({ preventScroll: !0 }), e !== n && Ae(e) && t && e.select();
126
113
  }
127
114
  }
128
- var ee = Te();
115
+ var J = Te();
129
116
  function Te() {
130
117
  let e = [];
131
118
  return {
132
119
  add(t) {
133
120
  const n = e[0];
134
- t !== n && n?.pause(), e = te(e, t), e.unshift(t);
121
+ t !== n && n?.pause(), e = ee(e, t), e.unshift(t);
135
122
  },
136
123
  remove(t) {
137
- e = te(e, t), e[0]?.resume();
124
+ e = ee(e, t), e[0]?.resume();
138
125
  }
139
126
  };
140
127
  }
141
- function te(e, t) {
128
+ function ee(e, t) {
142
129
  const n = [...e], r = n.indexOf(t);
143
130
  return r !== -1 && n.splice(r, 1), n;
144
131
  }
145
132
  function Ne(e) {
146
133
  return e.filter((t) => t.tagName !== "A");
147
134
  }
148
- var Me = function(e) {
149
- if (typeof document > "u")
150
- return null;
151
- var t = Array.isArray(e) ? e[0] : e;
152
- return t.ownerDocument.body;
153
- }, T = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), L = {}, H = 0, ie = function(e) {
154
- return e && (e.host || ie(e.parentNode));
155
- }, Fe = function(e, t) {
156
- return t.map(function(n) {
157
- if (e.contains(n))
158
- return n;
159
- var r = ie(n);
160
- return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
161
- }).filter(function(n) {
162
- return !!n;
163
- });
164
- }, Pe = function(e, t, n, r) {
165
- var c = Fe(t, Array.isArray(e) ? e : [e]);
166
- L[n] || (L[n] = /* @__PURE__ */ new WeakMap());
167
- var i = L[n], s = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
168
- !f || a.has(f) || (a.add(f), b(f.parentNode));
169
- };
170
- c.forEach(b);
171
- var g = function(f) {
172
- !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
173
- if (a.has(v))
174
- g(v);
175
- else
176
- try {
177
- var h = v.getAttribute(r), w = h !== null && h !== "false", o = (T.get(v) || 0) + 1, l = (i.get(v) || 0) + 1;
178
- T.set(v, o), i.set(v, l), s.push(v), o === 1 && w && O.set(v, !0), l === 1 && v.setAttribute(n, "true"), w || v.setAttribute(r, "true");
179
- } catch (d) {
180
- console.error("aria-hidden: cannot operate on ", v, d);
181
- }
182
- });
183
- };
184
- return g(t), a.clear(), H++, function() {
185
- s.forEach(function(f) {
186
- var v = T.get(f) - 1, h = i.get(f) - 1;
187
- T.set(f, v), i.set(f, h), v || (O.has(f) || f.removeAttribute(r), O.delete(f)), h || f.removeAttribute(n);
188
- }), H--, H || (T = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), L = {});
189
- };
190
- }, Et = function(e, t, n) {
191
- n === void 0 && (n = "data-aria-hidden");
192
- var r = Array.from(Array.isArray(e) ? e : [e]), c = Me(e);
193
- return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), Pe(r, c, n, "aria-hidden")) : function() {
194
- return null;
195
- };
196
- }, C = function() {
135
+ var K = 0;
136
+ function bt() {
137
+ u.useEffect(() => {
138
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
139
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? te()), document.body.insertAdjacentElement("beforeend", e[1] ?? te()), K++, () => {
140
+ K === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), K--;
141
+ };
142
+ }, []);
143
+ }
144
+ function te() {
145
+ const e = document.createElement("span");
146
+ 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;
147
+ }
148
+ var C = function() {
197
149
  return C = Object.assign || function(t) {
198
150
  for (var n, r = 1, c = arguments.length; r < c; r++) {
199
151
  n = arguments[r];
@@ -202,7 +154,7 @@ var Me = function(e) {
202
154
  return t;
203
155
  }, C.apply(this, arguments);
204
156
  };
205
- function le(e, t) {
157
+ function ie(e, t) {
206
158
  var n = {};
207
159
  for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
208
160
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -210,16 +162,16 @@ function le(e, t) {
210
162
  t.indexOf(r[c]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[c]) && (n[r[c]] = e[r[c]]);
211
163
  return n;
212
164
  }
213
- function Oe(e, t, n) {
165
+ function Me(e, t, n) {
214
166
  if (n || arguments.length === 2) for (var r = 0, c = t.length, i; r < c; r++)
215
167
  (i || !(r in t)) && (i || (i = Array.prototype.slice.call(t, 0, r)), i[r] = t[r]);
216
168
  return e.concat(i || Array.prototype.slice.call(t));
217
169
  }
218
- var W = "right-scroll-bar-position", B = "width-before-scroll-bar", Le = "with-scroll-bars-hidden", Ie = "--removed-body-scroll-bar-size";
219
- function V(e, t) {
170
+ var W = "right-scroll-bar-position", B = "width-before-scroll-bar", Fe = "with-scroll-bars-hidden", Pe = "--removed-body-scroll-bar-size";
171
+ function H(e, t) {
220
172
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
221
173
  }
222
- function xe(e, t) {
174
+ function Oe(e, t) {
223
175
  var n = ge(function() {
224
176
  return {
225
177
  // value
@@ -240,31 +192,31 @@ function xe(e, t) {
240
192
  })[0];
241
193
  return n.callback = t, n.facade;
242
194
  }
243
- var We = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ne = /* @__PURE__ */ new WeakMap();
244
- function Be(e, t) {
245
- var n = xe(null, function(r) {
195
+ var Le = typeof window < "u" ? u.useLayoutEffect : u.useEffect, ne = /* @__PURE__ */ new WeakMap();
196
+ function Ie(e, t) {
197
+ var n = Oe(null, function(r) {
246
198
  return e.forEach(function(c) {
247
- return V(c, r);
199
+ return H(c, r);
248
200
  });
249
201
  });
250
- return We(function() {
202
+ return Le(function() {
251
203
  var r = ne.get(n);
252
204
  if (r) {
253
205
  var c = new Set(r), i = new Set(e), s = n.current;
254
206
  c.forEach(function(a) {
255
- i.has(a) || V(a, null);
207
+ i.has(a) || H(a, null);
256
208
  }), i.forEach(function(a) {
257
- c.has(a) || V(a, s);
209
+ c.has(a) || H(a, s);
258
210
  });
259
211
  }
260
212
  ne.set(n, e);
261
213
  }, [e]), n;
262
214
  }
263
- function De(e) {
215
+ function xe(e) {
264
216
  return e;
265
217
  }
266
- function Ue(e, t) {
267
- t === void 0 && (t = De);
218
+ function We(e, t) {
219
+ t === void 0 && (t = xe);
268
220
  var n = [], r = !1, c = {
269
221
  read: function() {
270
222
  if (r)
@@ -318,13 +270,13 @@ function Ue(e, t) {
318
270
  };
319
271
  return c;
320
272
  }
321
- function _e(e) {
273
+ function Be(e) {
322
274
  e === void 0 && (e = {});
323
- var t = Ue(null);
275
+ var t = We(null);
324
276
  return t.options = C({ async: !0, ssr: !1 }, e), t;
325
277
  }
326
- var se = function(e) {
327
- var t = e.sideCar, n = le(e, ["sideCar"]);
278
+ var le = function(e) {
279
+ var t = e.sideCar, n = ie(e, ["sideCar"]);
328
280
  if (!t)
329
281
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
330
282
  var r = t.read();
@@ -332,21 +284,21 @@ var se = function(e) {
332
284
  throw new Error("Sidecar medium not found");
333
285
  return u.createElement(r, C({}, n));
334
286
  };
335
- se.isSideCarExport = !0;
336
- function je(e, t) {
337
- return e.useMedium(t), se;
287
+ le.isSideCarExport = !0;
288
+ function De(e, t) {
289
+ return e.useMedium(t), le;
338
290
  }
339
- var fe = _e(), X = function() {
291
+ var se = Be(), V = function() {
340
292
  }, D = u.forwardRef(function(e, t) {
341
293
  var n = u.useRef(null), r = u.useState({
342
- onScrollCapture: X,
343
- onWheelCapture: X,
344
- onTouchMoveCapture: X
345
- }), 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 = le(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, R = Be([n, t]), k = C(C({}, y), c);
294
+ onScrollCapture: V,
295
+ onWheelCapture: V,
296
+ onTouchMoveCapture: V
297
+ }), 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 = ie(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = v, R = Ie([n, t]), k = C(C({}, y), c);
346
298
  return u.createElement(
347
299
  u.Fragment,
348
300
  null,
349
- g && u.createElement(E, { sideCar: fe, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: p }),
301
+ g && u.createElement(E, { sideCar: se, removeScrollBar: b, shards: f, noRelative: h, noIsolation: w, inert: o, setCallbacks: i, allowPinchZoom: !!l, lockRef: n, gapMode: p }),
350
302
  s ? u.cloneElement(u.Children.only(a), C(C({}, k), { ref: R })) : u.createElement(m, C({}, k, { className: S, ref: R }), a)
351
303
  );
352
304
  });
@@ -359,37 +311,37 @@ D.classNames = {
359
311
  fullWidth: B,
360
312
  zeroRight: W
361
313
  };
362
- var Ke = function() {
314
+ var Ue = function() {
363
315
  if (typeof __webpack_nonce__ < "u")
364
316
  return __webpack_nonce__;
365
317
  };
366
- function He() {
318
+ function _e() {
367
319
  if (!document)
368
320
  return null;
369
321
  var e = document.createElement("style");
370
322
  e.type = "text/css";
371
- var t = Ke();
323
+ var t = Ue();
372
324
  return t && e.setAttribute("nonce", t), e;
373
325
  }
374
- function Ve(e, t) {
326
+ function je(e, t) {
375
327
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
376
328
  }
377
- function Xe(e) {
329
+ function Ke(e) {
378
330
  var t = document.head || document.getElementsByTagName("head")[0];
379
331
  t.appendChild(e);
380
332
  }
381
- var Ye = function() {
333
+ var He = function() {
382
334
  var e = 0, t = null;
383
335
  return {
384
336
  add: function(n) {
385
- e == 0 && (t = He()) && (Ve(t, n), Xe(t)), e++;
337
+ e == 0 && (t = _e()) && (je(t, n), Ke(t)), e++;
386
338
  },
387
339
  remove: function() {
388
340
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
389
341
  }
390
342
  };
391
- }, Ge = function() {
392
- var e = Ye();
343
+ }, Ve = function() {
344
+ var e = He();
393
345
  return function(t, n) {
394
346
  u.useEffect(function() {
395
347
  return e.add(t), function() {
@@ -397,36 +349,36 @@ var Ye = function() {
397
349
  };
398
350
  }, [t && n]);
399
351
  };
400
- }, de = function() {
401
- var e = Ge(), t = function(n) {
352
+ }, fe = function() {
353
+ var e = Ve(), t = function(n) {
402
354
  var r = n.styles, c = n.dynamic;
403
355
  return e(r, c), null;
404
356
  };
405
357
  return t;
406
- }, ze = {
358
+ }, Xe = {
407
359
  left: 0,
408
360
  top: 0,
409
361
  right: 0,
410
362
  gap: 0
411
- }, Y = function(e) {
363
+ }, X = function(e) {
412
364
  return parseInt(e || "", 10) || 0;
413
- }, Ze = function(e) {
365
+ }, Ye = function(e) {
414
366
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], c = t[e === "padding" ? "paddingRight" : "marginRight"];
415
- return [Y(n), Y(r), Y(c)];
416
- }, qe = function(e) {
367
+ return [X(n), X(r), X(c)];
368
+ }, Ge = function(e) {
417
369
  if (e === void 0 && (e = "margin"), typeof window > "u")
418
- return ze;
419
- var t = Ze(e), n = document.documentElement.clientWidth, r = window.innerWidth;
370
+ return Xe;
371
+ var t = Ye(e), n = document.documentElement.clientWidth, r = window.innerWidth;
420
372
  return {
421
373
  left: t[0],
422
374
  top: t[1],
423
375
  right: t[2],
424
376
  gap: Math.max(0, r - n + t[2] - t[0])
425
377
  };
426
- }, Qe = de(), F = "data-scroll-locked", $e = function(e, t, n, r) {
378
+ }, ze = fe(), F = "data-scroll-locked", Ze = function(e, t, n, r) {
427
379
  var c = e.left, i = e.top, s = e.right, a = e.gap;
428
380
  return n === void 0 && (n = "margin"), `
429
- .`.concat(Le, ` {
381
+ .`.concat(Fe, ` {
430
382
  overflow: hidden `).concat(r, `;
431
383
  padding-right: `).concat(a, "px ").concat(r, `;
432
384
  }
@@ -464,93 +416,93 @@ var Ye = function() {
464
416
  }
465
417
 
466
418
  body[`).concat(F, `] {
467
- `).concat(Ie, ": ").concat(a, `px;
419
+ `).concat(Pe, ": ").concat(a, `px;
468
420
  }
469
421
  `);
470
422
  }, re = function() {
471
423
  var e = parseInt(document.body.getAttribute(F) || "0", 10);
472
424
  return isFinite(e) ? e : 0;
473
- }, Je = function() {
425
+ }, qe = function() {
474
426
  u.useEffect(function() {
475
427
  return document.body.setAttribute(F, (re() + 1).toString()), function() {
476
428
  var e = re() - 1;
477
429
  e <= 0 ? document.body.removeAttribute(F) : document.body.setAttribute(F, e.toString());
478
430
  };
479
431
  }, []);
480
- }, et = function(e) {
432
+ }, Qe = function(e) {
481
433
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, c = r === void 0 ? "margin" : r;
482
- Je();
434
+ qe();
483
435
  var i = u.useMemo(function() {
484
- return qe(c);
436
+ return Ge(c);
485
437
  }, [c]);
486
- return u.createElement(Qe, { styles: $e(i, !t, c, n ? "" : "!important") });
438
+ return u.createElement(ze, { styles: Ze(i, !t, c, n ? "" : "!important") });
487
439
  }, G = !1;
488
440
  if (typeof window < "u")
489
441
  try {
490
- var I = Object.defineProperty({}, "passive", {
442
+ var O = Object.defineProperty({}, "passive", {
491
443
  get: function() {
492
444
  return G = !0, !0;
493
445
  }
494
446
  });
495
- window.addEventListener("test", I, I), window.removeEventListener("test", I, I);
447
+ window.addEventListener("test", O, O), window.removeEventListener("test", O, O);
496
448
  } catch {
497
449
  G = !1;
498
450
  }
499
- var N = G ? { passive: !1 } : !1, tt = function(e) {
451
+ var T = G ? { passive: !1 } : !1, $e = function(e) {
500
452
  return e.tagName === "TEXTAREA";
501
- }, ve = function(e, t) {
453
+ }, de = function(e, t) {
502
454
  if (!(e instanceof Element))
503
455
  return !1;
504
456
  var n = window.getComputedStyle(e);
505
457
  return (
506
458
  // not-not-scrollable
507
459
  n[t] !== "hidden" && // contains scroll inside self
508
- !(n.overflowY === n.overflowX && !tt(e) && n[t] === "visible")
460
+ !(n.overflowY === n.overflowX && !$e(e) && n[t] === "visible")
509
461
  );
510
- }, nt = function(e) {
511
- return ve(e, "overflowY");
512
- }, rt = function(e) {
513
- return ve(e, "overflowX");
462
+ }, Je = function(e) {
463
+ return de(e, "overflowY");
464
+ }, et = function(e) {
465
+ return de(e, "overflowX");
514
466
  }, ae = function(e, t) {
515
467
  var n = t.ownerDocument, r = t;
516
468
  do {
517
469
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
518
- var c = he(e, r);
470
+ var c = ve(e, r);
519
471
  if (c) {
520
- var i = me(e, r), s = i[1], a = i[2];
472
+ var i = he(e, r), s = i[1], a = i[2];
521
473
  if (s > a)
522
474
  return !0;
523
475
  }
524
476
  r = r.parentNode;
525
477
  } while (r && r !== n.body);
526
478
  return !1;
527
- }, at = function(e) {
479
+ }, tt = function(e) {
528
480
  var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
529
481
  return [
530
482
  t,
531
483
  n,
532
484
  r
533
485
  ];
534
- }, ot = function(e) {
486
+ }, nt = function(e) {
535
487
  var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
536
488
  return [
537
489
  t,
538
490
  n,
539
491
  r
540
492
  ];
493
+ }, ve = function(e, t) {
494
+ return e === "v" ? Je(t) : et(t);
541
495
  }, he = function(e, t) {
542
- return e === "v" ? nt(t) : rt(t);
543
- }, me = function(e, t) {
544
- return e === "v" ? at(t) : ot(t);
545
- }, ct = function(e, t) {
496
+ return e === "v" ? tt(t) : nt(t);
497
+ }, rt = function(e, t) {
546
498
  return e === "h" && t === "rtl" ? -1 : 1;
547
- }, ut = function(e, t, n, r, c) {
548
- var i = ct(e, window.getComputedStyle(t).direction), s = i * r, a = n.target, S = t.contains(a), b = !1, g = s > 0, f = 0, v = 0;
499
+ }, at = function(e, t, n, r, c) {
500
+ var i = rt(e, window.getComputedStyle(t).direction), s = i * r, a = n.target, S = t.contains(a), b = !1, g = s > 0, f = 0, v = 0;
549
501
  do {
550
502
  if (!a)
551
503
  break;
552
- var h = me(e, a), w = h[0], o = h[1], l = h[2], d = o - l - i * w;
553
- (w || d) && he(e, a) && (f += d, v += w);
504
+ var h = he(e, a), w = h[0], o = h[1], l = h[2], d = o - l - i * w;
505
+ (w || d) && ve(e, a) && (f += d, v += w);
554
506
  var m = a.parentNode;
555
507
  a = m && m.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? m.host : m;
556
508
  } while (
@@ -559,28 +511,28 @@ var N = G ? { passive: !1 } : !1, tt = function(e) {
559
511
  S && (t.contains(a) || t === a)
560
512
  );
561
513
  return (g && Math.abs(f) < 1 || !g && Math.abs(v) < 1) && (b = !0), b;
562
- }, x = function(e) {
514
+ }, L = function(e) {
563
515
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
564
516
  }, oe = function(e) {
565
517
  return [e.deltaX, e.deltaY];
566
518
  }, ce = function(e) {
567
519
  return e && "current" in e ? e.current : e;
568
- }, it = function(e, t) {
520
+ }, ot = function(e, t) {
569
521
  return e[0] === t[0] && e[1] === t[1];
570
- }, lt = function(e) {
522
+ }, ct = function(e) {
571
523
  return `
572
524
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
573
525
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
574
526
  `);
575
- }, st = 0, M = [];
576
- function ft(e) {
577
- var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(st++)[0], i = u.useState(de)[0], s = u.useRef(e);
527
+ }, ut = 0, N = [];
528
+ function it(e) {
529
+ var t = u.useRef([]), n = u.useRef([0, 0]), r = u.useRef(), c = u.useState(ut++)[0], i = u.useState(fe)[0], s = u.useRef(e);
578
530
  u.useEffect(function() {
579
531
  s.current = e;
580
532
  }, [e]), u.useEffect(function() {
581
533
  if (e.inert) {
582
534
  document.body.classList.add("block-interactivity-".concat(c));
583
- var o = Oe([e.lockRef.current], (e.shards || []).map(ce), !0).filter(Boolean);
535
+ var o = Me([e.lockRef.current], (e.shards || []).map(ce), !0).filter(Boolean);
584
536
  return o.forEach(function(l) {
585
537
  return l.classList.add("allow-interactivity-".concat(c));
586
538
  }), function() {
@@ -593,7 +545,7 @@ function ft(e) {
593
545
  var a = u.useCallback(function(o, l) {
594
546
  if ("touches" in o && o.touches.length === 2 || o.type === "wheel" && o.ctrlKey)
595
547
  return !s.current.allowPinchZoom;
596
- var d = x(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, R = o.target, k = Math.abs(p) > Math.abs(y) ? "h" : "v";
548
+ 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, R = o.target, k = Math.abs(p) > Math.abs(y) ? "h" : "v";
597
549
  if ("touches" in o && k === "h" && R.type === "range")
598
550
  return !1;
599
551
  var z = window.getSelection(), U = z && z.anchorNode, pe = U ? U === R || U.contains(R) : !1;
@@ -607,12 +559,12 @@ function ft(e) {
607
559
  if (!r.current && "changedTouches" in o && (p || y) && (r.current = E), !E)
608
560
  return !0;
609
561
  var Z = r.current || E;
610
- return ut(Z, l, o, Z === "h" ? p : y);
562
+ return at(Z, l, o, Z === "h" ? p : y);
611
563
  }, []), S = u.useCallback(function(o) {
612
564
  var l = o;
613
- if (!(!M.length || M[M.length - 1] !== i)) {
614
- var d = "deltaY" in l ? oe(l) : x(l), m = t.current.filter(function(E) {
615
- return E.name === l.type && (E.target === l.target || l.target === E.shadowParent) && it(E.delta, d);
565
+ if (!(!N.length || N[N.length - 1] !== i)) {
566
+ var d = "deltaY" in l ? oe(l) : L(l), m = t.current.filter(function(E) {
567
+ return E.name === l.type && (E.target === l.target || l.target === E.shadowParent) && ot(E.delta, d);
616
568
  })[0];
617
569
  if (m && m.should) {
618
570
  l.cancelable && l.preventDefault();
@@ -626,51 +578,100 @@ function ft(e) {
626
578
  }
627
579
  }
628
580
  }, []), b = u.useCallback(function(o, l, d, m) {
629
- var p = { name: o, delta: l, target: d, should: m, shadowParent: dt(d) };
581
+ var p = { name: o, delta: l, target: d, should: m, shadowParent: lt(d) };
630
582
  t.current.push(p), setTimeout(function() {
631
583
  t.current = t.current.filter(function(y) {
632
584
  return y !== p;
633
585
  });
634
586
  }, 1);
635
587
  }, []), g = u.useCallback(function(o) {
636
- n.current = x(o), r.current = void 0;
588
+ n.current = L(o), r.current = void 0;
637
589
  }, []), f = u.useCallback(function(o) {
638
590
  b(o.type, oe(o), o.target, a(o, e.lockRef.current));
639
591
  }, []), v = u.useCallback(function(o) {
640
- b(o.type, x(o), o.target, a(o, e.lockRef.current));
592
+ b(o.type, L(o), o.target, a(o, e.lockRef.current));
641
593
  }, []);
642
594
  u.useEffect(function() {
643
- return M.push(i), e.setCallbacks({
595
+ return N.push(i), e.setCallbacks({
644
596
  onScrollCapture: f,
645
597
  onWheelCapture: f,
646
598
  onTouchMoveCapture: v
647
- }), document.addEventListener("wheel", S, N), document.addEventListener("touchmove", S, N), document.addEventListener("touchstart", g, N), function() {
648
- M = M.filter(function(o) {
599
+ }), document.addEventListener("wheel", S, T), document.addEventListener("touchmove", S, T), document.addEventListener("touchstart", g, T), function() {
600
+ N = N.filter(function(o) {
649
601
  return o !== i;
650
- }), document.removeEventListener("wheel", S, N), document.removeEventListener("touchmove", S, N), document.removeEventListener("touchstart", g, N);
602
+ }), document.removeEventListener("wheel", S, T), document.removeEventListener("touchmove", S, T), document.removeEventListener("touchstart", g, T);
651
603
  };
652
604
  }, []);
653
605
  var h = e.removeScrollBar, w = e.inert;
654
606
  return u.createElement(
655
607
  u.Fragment,
656
608
  null,
657
- w ? u.createElement(i, { styles: lt(c) }) : null,
658
- h ? u.createElement(et, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
609
+ w ? u.createElement(i, { styles: ct(c) }) : null,
610
+ h ? u.createElement(Qe, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
659
611
  );
660
612
  }
661
- function dt(e) {
613
+ function lt(e) {
662
614
  for (var t = null; e !== null; )
663
615
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
664
616
  return t;
665
617
  }
666
- const vt = je(fe, ft);
667
- var ht = u.forwardRef(function(e, t) {
668
- return u.createElement(D, C({}, e, { ref: t, sideCar: vt }));
618
+ const st = De(se, it);
619
+ var ft = u.forwardRef(function(e, t) {
620
+ return u.createElement(D, C({}, e, { ref: t, sideCar: st }));
669
621
  });
670
- ht.classNames = D.classNames;
622
+ ft.classNames = D.classNames;
623
+ var dt = function(e) {
624
+ if (typeof document > "u")
625
+ return null;
626
+ var t = Array.isArray(e) ? e[0] : e;
627
+ return t.ownerDocument.body;
628
+ }, M = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), x = {}, Y = 0, me = function(e) {
629
+ return e && (e.host || me(e.parentNode));
630
+ }, vt = function(e, t) {
631
+ return t.map(function(n) {
632
+ if (e.contains(n))
633
+ return n;
634
+ var r = me(n);
635
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
636
+ }).filter(function(n) {
637
+ return !!n;
638
+ });
639
+ }, ht = function(e, t, n, r) {
640
+ var c = vt(t, Array.isArray(e) ? e : [e]);
641
+ x[n] || (x[n] = /* @__PURE__ */ new WeakMap());
642
+ var i = x[n], s = [], a = /* @__PURE__ */ new Set(), S = new Set(c), b = function(f) {
643
+ !f || a.has(f) || (a.add(f), b(f.parentNode));
644
+ };
645
+ c.forEach(b);
646
+ var g = function(f) {
647
+ !f || S.has(f) || Array.prototype.forEach.call(f.children, function(v) {
648
+ if (a.has(v))
649
+ g(v);
650
+ else
651
+ try {
652
+ var h = v.getAttribute(r), w = h !== null && h !== "false", o = (M.get(v) || 0) + 1, l = (i.get(v) || 0) + 1;
653
+ M.set(v, o), i.set(v, l), s.push(v), o === 1 && w && I.set(v, !0), l === 1 && v.setAttribute(n, "true"), w || v.setAttribute(r, "true");
654
+ } catch (d) {
655
+ console.error("aria-hidden: cannot operate on ", v, d);
656
+ }
657
+ });
658
+ };
659
+ return g(t), a.clear(), Y++, function() {
660
+ s.forEach(function(f) {
661
+ var v = M.get(f) - 1, h = i.get(f) - 1;
662
+ M.set(f, v), i.set(f, h), v || (I.has(f) || f.removeAttribute(r), I.delete(f)), h || f.removeAttribute(n);
663
+ }), Y--, Y || (M = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), x = {});
664
+ };
665
+ }, Et = function(e, t, n) {
666
+ n === void 0 && (n = "data-aria-hidden");
667
+ var r = Array.from(Array.isArray(e) ? e : [e]), c = dt(e);
668
+ return c ? (r.push.apply(r, Array.from(c.querySelectorAll("[aria-live], script"))), ht(r, c, n, "aria-hidden")) : function() {
669
+ return null;
670
+ };
671
+ };
671
672
  export {
672
673
  we as F,
673
- ht as R,
674
+ ft as R,
674
675
  Et as h,
675
676
  bt as u
676
677
  };