@n3wth/ui 0.5.2 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ var bn = Object.defineProperty;
2
2
  var gn = (t, e, r) => e in t ? bn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
3
  var Wr = (t, e, r) => gn(t, typeof e != "symbol" ? e + "" : e, r);
4
4
  import * as a from "react";
5
- import vn, { forwardRef as b, isValidElement as yn, cloneElement as wn, useMemo as ne, useState as T, useRef as I, useId as pe, useCallback as P, useEffect as S, Component as xn, createContext as Lr, useContext as jr, createElement as xe } from "react";
5
+ import vn, { forwardRef as b, isValidElement as yn, cloneElement as wn, useMemo as re, useState as T, useRef as I, useId as pe, useCallback as P, useEffect as S, Component as xn, createContext as Lr, useContext as jr, createElement as xe } from "react";
6
6
  import { jsx as s, jsxs as k, Fragment as Z } from "react/jsx-runtime";
7
7
  import R from "gsap";
8
8
  import { ScrollTrigger as fe } from "gsap/ScrollTrigger";
@@ -422,7 +422,7 @@ function zn(t, ...e) {
422
422
  const W = (t) => {
423
423
  const e = (r) => r[t] || [];
424
424
  return e.isThemeGetter = !0, e;
425
- }, qo = /^\[(?:([a-z-]+):)?(.+)\]$/i, An = /^\d+\/\d+$/, Vn = /* @__PURE__ */ new Set(["px", "full", "screen"]), Wn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Tn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Fn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Dn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Hn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ee = (t) => le(t) || Vn.has(t) || An.test(t), re = (t) => ie(t, "length", _n), le = (t) => !!t && !Number.isNaN(Number(t)), ke = (t) => ie(t, "number", le), ce = (t) => !!t && Number.isInteger(Number(t)), Rn = (t) => t.endsWith("%") && le(t.slice(0, -1)), M = (t) => qo.test(t), te = (t) => Wn.test(t), Yn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Xn = (t) => ie(t, Yn, _o), Zn = (t) => ie(t, "position", _o), Gn = /* @__PURE__ */ new Set(["image", "url"]), Kn = (t) => ie(t, Gn, Qn), qn = (t) => ie(t, "", Un), de = () => !0, ie = (t, e, r) => {
425
+ }, qo = /^\[(?:([a-z-]+):)?(.+)\]$/i, An = /^\d+\/\d+$/, Vn = /* @__PURE__ */ new Set(["px", "full", "screen"]), Wn = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, Tn = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, Fn = /^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/, Dn = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, Hn = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, ee = (t) => le(t) || Vn.has(t) || An.test(t), te = (t) => ie(t, "length", _n), le = (t) => !!t && !Number.isNaN(Number(t)), ke = (t) => ie(t, "number", le), ce = (t) => !!t && Number.isInteger(Number(t)), Rn = (t) => t.endsWith("%") && le(t.slice(0, -1)), M = (t) => qo.test(t), oe = (t) => Wn.test(t), Yn = /* @__PURE__ */ new Set(["length", "size", "percentage"]), Xn = (t) => ie(t, Yn, _o), Zn = (t) => ie(t, "position", _o), Gn = /* @__PURE__ */ new Set(["image", "url"]), Kn = (t) => ie(t, Gn, Qn), qn = (t) => ie(t, "", Un), de = () => !0, ie = (t, e, r) => {
426
426
  const o = qo.exec(t);
427
427
  return o ? o[1] ? typeof e == "string" ? o[1] === e : e.has(o[1]) : r(o[2]) : !1;
428
428
  }, _n = (t) => (
@@ -431,17 +431,17 @@ const W = (t) => {
431
431
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
432
432
  Tn.test(t) && !Fn.test(t)
433
433
  ), _o = () => !1, Un = (t) => Dn.test(t), Qn = (t) => Hn.test(t), Jn = () => {
434
- const t = W("colors"), e = W("spacing"), r = W("blur"), o = W("brightness"), n = W("borderColor"), l = W("borderRadius"), i = W("borderSpacing"), c = W("borderWidth"), d = W("contrast"), p = W("grayscale"), u = W("hueRotate"), f = W("invert"), h = W("gap"), w = W("gradientColorStops"), v = W("gradientColorStopPositions"), g = W("inset"), x = W("margin"), C = W("opacity"), y = W("padding"), B = W("saturate"), O = W("scale"), E = W("sepia"), j = W("skew"), F = W("space"), z = W("translate"), _ = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], H = () => ["auto", M, e], A = () => [M, e], me = () => ["", ee, re], ae = () => ["auto", le, M], he = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], U = () => ["solid", "dashed", "dotted", "double", "none"], Q = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], G = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], J = () => ["", "0", M], se = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], X = () => [le, M];
434
+ const t = W("colors"), e = W("spacing"), r = W("blur"), o = W("brightness"), n = W("borderColor"), l = W("borderRadius"), i = W("borderSpacing"), c = W("borderWidth"), d = W("contrast"), p = W("grayscale"), u = W("hueRotate"), f = W("invert"), h = W("gap"), w = W("gradientColorStops"), v = W("gradientColorStopPositions"), g = W("inset"), x = W("margin"), C = W("opacity"), y = W("padding"), B = W("saturate"), O = W("scale"), E = W("sepia"), j = W("skew"), F = W("space"), z = W("translate"), U = () => ["auto", "contain", "none"], D = () => ["auto", "hidden", "clip", "visible", "scroll"], H = () => ["auto", M, e], A = () => [M, e], me = () => ["", ee, te], ne = () => ["auto", le, M], he = () => ["bottom", "center", "left", "left-bottom", "left-top", "right", "right-bottom", "right-top", "top"], G = () => ["solid", "dashed", "dotted", "double", "none"], Q = () => ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion", "hue", "saturation", "color", "luminosity"], K = () => ["start", "end", "center", "between", "around", "evenly", "stretch"], J = () => ["", "0", M], se = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], X = () => [le, M];
435
435
  return {
436
436
  cacheSize: 500,
437
437
  separator: ":",
438
438
  theme: {
439
439
  colors: [de],
440
- spacing: [ee, re],
441
- blur: ["none", "", te, M],
440
+ spacing: [ee, te],
441
+ blur: ["none", "", oe, M],
442
442
  brightness: X(),
443
443
  borderColor: [t],
444
- borderRadius: ["none", "", "full", te, M],
444
+ borderRadius: ["none", "", "full", oe, M],
445
445
  borderSpacing: A(),
446
446
  borderWidth: me(),
447
447
  contrast: X(),
@@ -450,7 +450,7 @@ const W = (t) => {
450
450
  invert: J(),
451
451
  gap: A(),
452
452
  gradientColorStops: [t],
453
- gradientColorStopPositions: [Rn, re],
453
+ gradientColorStopPositions: [Rn, te],
454
454
  inset: H(),
455
455
  margin: H(),
456
456
  opacity: X(),
@@ -481,7 +481,7 @@ const W = (t) => {
481
481
  * @see https://tailwindcss.com/docs/columns
482
482
  */
483
483
  columns: [{
484
- columns: [te]
484
+ columns: [oe]
485
485
  }],
486
486
  /**
487
487
  * Break After
@@ -582,21 +582,21 @@ const W = (t) => {
582
582
  * @see https://tailwindcss.com/docs/overscroll-behavior
583
583
  */
584
584
  overscroll: [{
585
- overscroll: _()
585
+ overscroll: U()
586
586
  }],
587
587
  /**
588
588
  * Overscroll Behavior X
589
589
  * @see https://tailwindcss.com/docs/overscroll-behavior
590
590
  */
591
591
  "overscroll-x": [{
592
- "overscroll-x": _()
592
+ "overscroll-x": U()
593
593
  }],
594
594
  /**
595
595
  * Overscroll Behavior Y
596
596
  * @see https://tailwindcss.com/docs/overscroll-behavior
597
597
  */
598
598
  "overscroll-y": [{
599
- "overscroll-y": _()
599
+ "overscroll-y": U()
600
600
  }],
601
601
  /**
602
602
  * Position
@@ -749,14 +749,14 @@ const W = (t) => {
749
749
  * @see https://tailwindcss.com/docs/grid-column
750
750
  */
751
751
  "col-start": [{
752
- "col-start": ae()
752
+ "col-start": ne()
753
753
  }],
754
754
  /**
755
755
  * Grid Column End
756
756
  * @see https://tailwindcss.com/docs/grid-column
757
757
  */
758
758
  "col-end": [{
759
- "col-end": ae()
759
+ "col-end": ne()
760
760
  }],
761
761
  /**
762
762
  * Grid Template Rows
@@ -779,14 +779,14 @@ const W = (t) => {
779
779
  * @see https://tailwindcss.com/docs/grid-row
780
780
  */
781
781
  "row-start": [{
782
- "row-start": ae()
782
+ "row-start": ne()
783
783
  }],
784
784
  /**
785
785
  * Grid Row End
786
786
  * @see https://tailwindcss.com/docs/grid-row
787
787
  */
788
788
  "row-end": [{
789
- "row-end": ae()
789
+ "row-end": ne()
790
790
  }],
791
791
  /**
792
792
  * Grid Auto Flow
@@ -835,7 +835,7 @@ const W = (t) => {
835
835
  * @see https://tailwindcss.com/docs/justify-content
836
836
  */
837
837
  "justify-content": [{
838
- justify: ["normal", ...G()]
838
+ justify: ["normal", ...K()]
839
839
  }],
840
840
  /**
841
841
  * Justify Items
@@ -856,7 +856,7 @@ const W = (t) => {
856
856
  * @see https://tailwindcss.com/docs/align-content
857
857
  */
858
858
  "align-content": [{
859
- content: ["normal", ...G(), "baseline"]
859
+ content: ["normal", ...K(), "baseline"]
860
860
  }],
861
861
  /**
862
862
  * Align Items
@@ -877,7 +877,7 @@ const W = (t) => {
877
877
  * @see https://tailwindcss.com/docs/place-content
878
878
  */
879
879
  "place-content": [{
880
- "place-content": [...G(), "baseline"]
880
+ "place-content": [...K(), "baseline"]
881
881
  }],
882
882
  /**
883
883
  * Place Items
@@ -1065,8 +1065,8 @@ const W = (t) => {
1065
1065
  */
1066
1066
  "max-w": [{
1067
1067
  "max-w": [M, e, "none", "full", "min", "max", "fit", "prose", {
1068
- screen: [te]
1069
- }, te]
1068
+ screen: [oe]
1069
+ }, oe]
1070
1070
  }],
1071
1071
  /**
1072
1072
  * Height
@@ -1102,7 +1102,7 @@ const W = (t) => {
1102
1102
  * @see https://tailwindcss.com/docs/font-size
1103
1103
  */
1104
1104
  "font-size": [{
1105
- text: ["base", te, re]
1105
+ text: ["base", oe, te]
1106
1106
  }],
1107
1107
  /**
1108
1108
  * Font Smoothing
@@ -1246,14 +1246,14 @@ const W = (t) => {
1246
1246
  * @see https://tailwindcss.com/docs/text-decoration-style
1247
1247
  */
1248
1248
  "text-decoration-style": [{
1249
- decoration: [...U(), "wavy"]
1249
+ decoration: [...G(), "wavy"]
1250
1250
  }],
1251
1251
  /**
1252
1252
  * Text Decoration Thickness
1253
1253
  * @see https://tailwindcss.com/docs/text-decoration-thickness
1254
1254
  */
1255
1255
  "text-decoration-thickness": [{
1256
- decoration: ["auto", "from-font", ee, re]
1256
+ decoration: ["auto", "from-font", ee, te]
1257
1257
  }],
1258
1258
  /**
1259
1259
  * Text Underline Offset
@@ -1620,7 +1620,7 @@ const W = (t) => {
1620
1620
  * @see https://tailwindcss.com/docs/border-style
1621
1621
  */
1622
1622
  "border-style": [{
1623
- border: [...U(), "hidden"]
1623
+ border: [...G(), "hidden"]
1624
1624
  }],
1625
1625
  /**
1626
1626
  * Divide Width X
@@ -1658,7 +1658,7 @@ const W = (t) => {
1658
1658
  * @see https://tailwindcss.com/docs/divide-style
1659
1659
  */
1660
1660
  "divide-style": [{
1661
- divide: U()
1661
+ divide: G()
1662
1662
  }],
1663
1663
  /**
1664
1664
  * Border Color
@@ -1735,7 +1735,7 @@ const W = (t) => {
1735
1735
  * @see https://tailwindcss.com/docs/outline-style
1736
1736
  */
1737
1737
  "outline-style": [{
1738
- outline: ["", ...U()]
1738
+ outline: ["", ...G()]
1739
1739
  }],
1740
1740
  /**
1741
1741
  * Outline Offset
@@ -1749,7 +1749,7 @@ const W = (t) => {
1749
1749
  * @see https://tailwindcss.com/docs/outline-width
1750
1750
  */
1751
1751
  "outline-w": [{
1752
- outline: [ee, re]
1752
+ outline: [ee, te]
1753
1753
  }],
1754
1754
  /**
1755
1755
  * Outline Color
@@ -1789,7 +1789,7 @@ const W = (t) => {
1789
1789
  * @see https://tailwindcss.com/docs/ring-offset-width
1790
1790
  */
1791
1791
  "ring-offset-w": [{
1792
- "ring-offset": [ee, re]
1792
+ "ring-offset": [ee, te]
1793
1793
  }],
1794
1794
  /**
1795
1795
  * Ring Offset Color
@@ -1804,7 +1804,7 @@ const W = (t) => {
1804
1804
  * @see https://tailwindcss.com/docs/box-shadow
1805
1805
  */
1806
1806
  shadow: [{
1807
- shadow: ["", "inner", "none", te, qn]
1807
+ shadow: ["", "inner", "none", oe, qn]
1808
1808
  }],
1809
1809
  /**
1810
1810
  * Box Shadow Color
@@ -1869,7 +1869,7 @@ const W = (t) => {
1869
1869
  * @see https://tailwindcss.com/docs/drop-shadow
1870
1870
  */
1871
1871
  "drop-shadow": [{
1872
- "drop-shadow": ["", "none", te, M]
1872
+ "drop-shadow": ["", "none", oe, M]
1873
1873
  }],
1874
1874
  /**
1875
1875
  * Grayscale
@@ -2384,7 +2384,7 @@ const W = (t) => {
2384
2384
  * @see https://tailwindcss.com/docs/stroke-width
2385
2385
  */
2386
2386
  "stroke-w": [{
2387
- stroke: [ee, re, ke]
2387
+ stroke: [ee, te, ke]
2388
2388
  }],
2389
2389
  /**
2390
2390
  * Stroke
@@ -3468,7 +3468,7 @@ function f1({
3468
3468
  showLineNumbers: r = !1,
3469
3469
  className: o
3470
3470
  }) {
3471
- const n = ne(() => uu(t), [t]), l = ne(() => t.split(`
3471
+ const n = re(() => uu(t), [t]), l = re(() => t.split(`
3472
3472
  `), [t]);
3473
3473
  return /* @__PURE__ */ s(
3474
3474
  "pre",
@@ -4007,9 +4007,9 @@ const Lu = b(
4007
4007
  className: c
4008
4008
  }, d) => {
4009
4009
  const [p, u] = T(!1), [f, h] = T(null), w = I(null), v = I(null), g = I(void 0), x = I(void 0), C = pe(), y = P(() => {
4010
- const z = w.current, _ = v.current;
4011
- if (!z || !_) return;
4012
- const D = z.getBoundingClientRect(), H = _.getBoundingClientRect();
4010
+ const z = w.current, U = v.current;
4011
+ if (!z || !U) return;
4012
+ const D = z.getBoundingClientRect(), H = U.getBoundingClientRect();
4013
4013
  h($u(D, H, r, 8));
4014
4014
  }, [r]), B = P(() => {
4015
4015
  l || (x.current !== void 0 && clearTimeout(x.current), g.current = setTimeout(() => {
@@ -4905,7 +4905,7 @@ function Qo() {
4905
4905
  }
4906
4906
  function E1() {
4907
4907
  const t = Qo();
4908
- return ne(
4908
+ return re(
4909
4909
  () => ({
4910
4910
  /** Whether reduced motion is preferred */
4911
4911
  isReduced: t,
@@ -5037,7 +5037,7 @@ const Wu = b(
5037
5037
  (y) => {
5038
5038
  if (o?.(y), y.defaultPrevented) return;
5039
5039
  const B = f(), O = Array.from(B.keys()), E = O.indexOf(t);
5040
- let j = null;
5040
+ let j;
5041
5041
  switch (y.key) {
5042
5042
  case "ArrowRight":
5043
5043
  j = (E + 1) % O.length;
@@ -5454,31 +5454,37 @@ const qu = Object.assign(
5454
5454
  portal: x = !1,
5455
5455
  children: C
5456
5456
  }, y) => {
5457
- const B = pe(), O = `dropdown-trigger-${B}`, E = `dropdown-listbox-${B}`, [j, F] = T(!1), [z, _] = T(""), [D, H] = T(-1), [A, me] = T(o), [ae, he] = T(n ?? []), U = c ? r !== void 0 : e !== void 0, Q = U ? e : A, G = U ? r ?? [] : ae, J = ne(
5458
- () => new Set(c ? G : Q ? [Q] : []),
5459
- [c, G, Q]
5460
- ), se = I(null), X = I(null), we = I(null), Nr = I(null), ln = I(/* @__PURE__ */ new Map()), Y = ne(() => {
5457
+ const B = pe(), O = `dropdown-trigger-${B}`, E = `dropdown-listbox-${B}`, [j, F] = T(!1), [z, U] = T(""), [D, H] = T(-1), [A, me] = T(o), [ne, he] = T(n ?? []), G = c ? r !== void 0 : e !== void 0, Q = re(
5458
+ () => G ? e : A,
5459
+ [G, e, A]
5460
+ ), K = re(
5461
+ () => G ? r ?? [] : ne,
5462
+ [G, r, ne]
5463
+ ), J = re(
5464
+ () => new Set(c ? K : Q ? [Q] : []),
5465
+ [c, K, Q]
5466
+ ), se = I(null), X = I(null), we = I(null), Nr = I(null), ln = I(/* @__PURE__ */ new Map()), Y = re(() => {
5461
5467
  if (!z) return t;
5462
5468
  const L = z.toLowerCase();
5463
5469
  return t.filter((N) => N.label.toLowerCase().includes(L));
5464
- }, [t, z]), cn = Zu(se, j && x), oe = P(() => {
5465
- F(!1), _(""), H(-1), se.current?.focus();
5470
+ }, [t, z]), cn = Zu(se, j && x), ae = P(() => {
5471
+ F(!1), U(""), H(-1), se.current?.focus();
5466
5472
  }, []), Sr = P(() => {
5467
- f || F((L) => (L && (_(""), H(-1)), !L));
5473
+ f || F((L) => (L && (U(""), H(-1)), !L));
5468
5474
  }, [f]), be = P(
5469
5475
  (L) => {
5470
5476
  if (c) {
5471
- const N = J.has(L) ? G.filter((V) => V !== L) : [...G, L];
5472
- U || he(N), i?.(N);
5477
+ const N = J.has(L) ? K.filter((V) => V !== L) : [...K, L];
5478
+ G || he(N), i?.(N);
5473
5479
  } else
5474
- U || me(L), l?.(L), oe();
5480
+ G || me(L), l?.(L), ae();
5475
5481
  },
5476
- [c, J, G, U, l, i, oe]
5482
+ [c, J, K, G, l, i, ae]
5477
5483
  ), dn = P((L, N) => {
5478
5484
  ln.current.set(N, L);
5479
5485
  }, []);
5480
5486
  Xu([Nr, X], () => {
5481
- j && oe();
5487
+ j && ae();
5482
5488
  }), S(() => {
5483
5489
  j && d && requestAnimationFrame(() => we.current?.focus());
5484
5490
  }, [j, d]);
@@ -5493,9 +5499,9 @@ const qu = Object.assign(
5493
5499
  }
5494
5500
  H((N) => {
5495
5501
  const V = Y.length - 1;
5496
- let q = N + 1;
5497
- for (; q <= V && Y[q]?.disabled; ) q++;
5498
- return q > V ? N : q;
5502
+ let _ = N + 1;
5503
+ for (; _ <= V && Y[_]?.disabled; ) _++;
5504
+ return _ > V ? N : _;
5499
5505
  });
5500
5506
  break;
5501
5507
  }
@@ -5523,7 +5529,7 @@ const qu = Object.assign(
5523
5529
  break;
5524
5530
  }
5525
5531
  case "Escape": {
5526
- L.preventDefault(), oe();
5532
+ L.preventDefault(), ae();
5527
5533
  break;
5528
5534
  }
5529
5535
  case "Home": {
@@ -5546,7 +5552,7 @@ const qu = Object.assign(
5546
5552
  break;
5547
5553
  }
5548
5554
  case "Tab": {
5549
- j && oe();
5555
+ j && ae();
5550
5556
  break;
5551
5557
  }
5552
5558
  default:
@@ -5562,7 +5568,7 @@ const qu = Object.assign(
5562
5568
  }
5563
5569
  }
5564
5570
  },
5565
- [f, j, Y, D, d, be, oe]
5571
+ [f, j, Y, D, d, be, ae]
5566
5572
  );
5567
5573
  S(() => {
5568
5574
  if (!j || D < 0 || !X.current) return;
@@ -5588,14 +5594,14 @@ const qu = Object.assign(
5588
5594
  "border-[var(--glass-border)]",
5589
5595
  "hover:bg-[rgba(255,255,255,0.08)]"
5590
5596
  ]
5591
- }, Br = ne(() => {
5597
+ }, Br = re(() => {
5592
5598
  if (c) {
5593
- if (G.length === 0) return null;
5594
- const L = G.map((N) => t.find((V) => V.value === N)?.label ?? N);
5599
+ if (K.length === 0) return null;
5600
+ const L = K.map((N) => t.find((V) => V.value === N)?.label ?? N);
5595
5601
  return L.length <= 2 ? L.join(", ") : `${L[0]}, ${L[1]} +${L.length - 2}`;
5596
5602
  }
5597
5603
  return Q ? t.find((L) => L.value === Q)?.label ?? Q : null;
5598
- }, [c, G, Q, t]), mn = j && D >= 0 ? `${E}-option-${D}` : void 0, hn = {
5604
+ }, [c, K, Q, t]), mn = j && D >= 0 ? `${E}-option-${D}` : void 0, hn = {
5599
5605
  isOpen: j,
5600
5606
  activeIndex: D,
5601
5607
  selectedValues: J,
@@ -5603,7 +5609,7 @@ const qu = Object.assign(
5603
5609
  listboxId: E,
5604
5610
  triggerId: O,
5605
5611
  toggle: Sr,
5606
- close: oe,
5612
+ close: ae,
5607
5613
  select: be,
5608
5614
  setActiveIndex: H,
5609
5615
  registerItem: dn
@@ -5641,7 +5647,7 @@ const qu = Object.assign(
5641
5647
  "aria-label": "Filter options",
5642
5648
  value: z,
5643
5649
  onChange: (L) => {
5644
- _(L.target.value), H(0);
5650
+ U(L.target.value), H(0);
5645
5651
  },
5646
5652
  placeholder: u,
5647
5653
  className: m(
@@ -5663,7 +5669,7 @@ const qu = Object.assign(
5663
5669
  }
5664
5670
  ),
5665
5671
  Y.map((L, N) => {
5666
- const V = J.has(L.value), q = N === D;
5672
+ const V = J.has(L.value), _ = N === D;
5667
5673
  return /* @__PURE__ */ k(
5668
5674
  "li",
5669
5675
  {
@@ -5677,11 +5683,11 @@ const qu = Object.assign(
5677
5683
  "flex items-center gap-2 cursor-pointer",
5678
5684
  "transition-[background-color,color] duration-150",
5679
5685
  pn[h],
5680
- q && "bg-[var(--glass-highlight)]",
5681
- V && !q && "text-[var(--color-white)]",
5682
- !V && !q && "text-[var(--color-grey-300)]",
5686
+ _ && "bg-[var(--glass-highlight)]",
5687
+ V && !_ && "text-[var(--color-white)]",
5688
+ !V && !_ && "text-[var(--color-grey-300)]",
5683
5689
  L.disabled && "opacity-40 cursor-not-allowed pointer-events-none",
5684
- !L.disabled && !q && "hover:bg-[var(--glass-bg)]"
5690
+ !L.disabled && !_ && "hover:bg-[var(--glass-bg)]"
5685
5691
  ),
5686
5692
  onClick: () => {
5687
5693
  L.disabled || be(L.value);
@@ -6200,7 +6206,7 @@ const ue = {
6200
6206
  xl: 1280,
6201
6207
  "2xl": 1536
6202
6208
  };
6203
- function K(t, e = !1) {
6209
+ function q(t, e = !1) {
6204
6210
  const r = P(() => typeof window > "u" ? e : window.matchMedia(t).matches, [t, e]), [o, n] = T(r);
6205
6211
  return S(() => {
6206
6212
  if (typeof window > "u")
@@ -6214,29 +6220,29 @@ function K(t, e = !1) {
6214
6220
  }, [t]), o;
6215
6221
  }
6216
6222
  function W1() {
6217
- return K("(max-width: 767px)", !0);
6223
+ return q("(max-width: 767px)", !0);
6218
6224
  }
6219
6225
  function T1() {
6220
- return K("(min-width: 768px) and (max-width: 1023px)");
6226
+ return q("(min-width: 768px) and (max-width: 1023px)");
6221
6227
  }
6222
6228
  function F1() {
6223
- return K("(min-width: 1024px)");
6229
+ return q("(min-width: 1024px)");
6224
6230
  }
6225
6231
  function D1() {
6226
- return K("(min-width: 1280px)");
6232
+ return q("(min-width: 1280px)");
6227
6233
  }
6228
6234
  function H1() {
6229
- const t = K(`(min-width: ${ue.sm}px)`), e = K(`(min-width: ${ue.md}px)`), r = K(`(min-width: ${ue.lg}px)`), o = K(`(min-width: ${ue.xl}px)`), n = K(`(min-width: ${ue["2xl"]}px)`);
6230
- return ne(() => n ? "2xl" : o ? "xl" : r ? "lg" : e ? "md" : t ? "sm" : "xs", [t, e, r, o, n]);
6235
+ const t = q(`(min-width: ${ue.sm}px)`), e = q(`(min-width: ${ue.md}px)`), r = q(`(min-width: ${ue.lg}px)`), o = q(`(min-width: ${ue.xl}px)`), n = q(`(min-width: ${ue["2xl"]}px)`);
6236
+ return re(() => n ? "2xl" : o ? "xl" : r ? "lg" : e ? "md" : t ? "sm" : "xs", [t, e, r, o, n]);
6231
6237
  }
6232
6238
  function R1() {
6233
- return K("(hover: none) and (pointer: coarse)");
6239
+ return q("(hover: none) and (pointer: coarse)");
6234
6240
  }
6235
6241
  function Y1() {
6236
- return K("(orientation: portrait)");
6242
+ return q("(orientation: portrait)");
6237
6243
  }
6238
6244
  function X1() {
6239
- return K("(orientation: landscape)");
6245
+ return q("(orientation: landscape)");
6240
6246
  }
6241
6247
  let _u = 0;
6242
6248
  function Uu() {
@@ -6657,7 +6663,7 @@ export {
6657
6663
  T1 as useIsTablet,
6658
6664
  R1 as useIsTouchDevice,
6659
6665
  z1 as useKeyboardShortcuts,
6660
- K as useMediaQuery,
6666
+ q as useMediaQuery,
6661
6667
  E1 as useMotionConfig,
6662
6668
  U1 as usePageTransition,
6663
6669
  M1 as usePrefersHighContrast,