@koide-labs/ui 0.1.3 → 0.1.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.
Files changed (109) hide show
  1. package/README.md +1 -4
  2. package/dist/{InternalBackdrop-BSMKU-hc.js → InternalBackdrop-DDLgWc7D.js} +1 -1
  3. package/dist/accordion.css +1 -1
  4. package/dist/alert-dialog.css +1 -1
  5. package/dist/anchor.css +1 -1
  6. package/dist/avatar.css +1 -1
  7. package/dist/badge.css +1 -1
  8. package/dist/button.css +1 -1
  9. package/dist/checkbox.css +1 -1
  10. package/dist/code.css +1 -1
  11. package/dist/collapse.css +1 -1
  12. package/dist/command.css +1 -1
  13. package/dist/components/accordion/accordion.js +88 -88
  14. package/dist/components/alert-dialog/alert-dialog.js +7 -7
  15. package/dist/components/anchor/anchor.js +6 -6
  16. package/dist/components/avatar/avatar.js +22 -22
  17. package/dist/components/badge/badge.js +17 -17
  18. package/dist/components/button/button.js +7 -7
  19. package/dist/components/checkbox/checkbox.js +15 -15
  20. package/dist/components/code/code.js +49 -49
  21. package/dist/components/collapse/collapse.js +3 -3
  22. package/dist/components/command/command.js +121 -121
  23. package/dist/components/context-menu/context-menu.js +13 -13
  24. package/dist/components/dialog/dialog.js +2 -2
  25. package/dist/components/heading/heading.js +5 -5
  26. package/dist/components/icon/icon.js +10 -10
  27. package/dist/components/icon-button/icon-button.js +15 -15
  28. package/dist/components/inline-code/inline-code.js +7 -7
  29. package/dist/components/input/input.js +1 -1
  30. package/dist/components/meter/meter.js +32 -32
  31. package/dist/components/multiline-input/multiline-input.js +1 -1
  32. package/dist/components/number-input/number-input.js +60 -60
  33. package/dist/components/password-input/password-input.js +6 -6
  34. package/dist/components/pill/pill.js +10 -10
  35. package/dist/components/popover/popover.js +22 -22
  36. package/dist/components/preview-card/preview-card.js +5 -5
  37. package/dist/components/radio-group/radio-group.js +99 -99
  38. package/dist/components/search-bar/search-bar.js +10 -10
  39. package/dist/components/select/select.js +76 -76
  40. package/dist/components/separator/index.js +1 -1
  41. package/dist/components/separator/separator.js +1 -1
  42. package/dist/components/slider/slider.js +146 -146
  43. package/dist/components/spinner/spinner.js +6 -6
  44. package/dist/components/stacked-avatars/stacked-avatars.js +25 -25
  45. package/dist/components/status-banner/status-banner.js +20 -20
  46. package/dist/components/surface/surface.js +19 -19
  47. package/dist/components/switch/switch.js +2 -2
  48. package/dist/components/tabs/tabs.js +34 -34
  49. package/dist/components/text/text.js +22 -22
  50. package/dist/components/timestamp/timestamp.js +73 -73
  51. package/dist/components/toaster/toaster.js +58 -58
  52. package/dist/components/tooltip/index.js +1 -1
  53. package/dist/components/tooltip/tooltip.js +2 -2
  54. package/dist/components/view/view.js +44 -44
  55. package/dist/context-menu.css +1 -1
  56. package/dist/dialog.css +1 -1
  57. package/dist/{dialog.module-1PAL873u.js → dialog.module-CRiRBcbM.js} +37 -37
  58. package/dist/{getDisabledMountTransitionStyles-E2x-_lte.js → getDisabledMountTransitionStyles-CyEI2117.js} +1 -1
  59. package/dist/heading.css +1 -1
  60. package/dist/icon-button.css +1 -1
  61. package/dist/icon.css +1 -1
  62. package/dist/index.css +1 -1
  63. package/dist/index.js +2 -2
  64. package/dist/index2.css +1 -1
  65. package/dist/inline-code.css +1 -1
  66. package/dist/input.css +1 -1
  67. package/dist/input.module-CYcyDtrO.js +8 -0
  68. package/dist/integrations/react-markdown/index.js +26 -26
  69. package/dist/integrations/twemoji/index.js +1 -1
  70. package/dist/meter.css +1 -1
  71. package/dist/number-input.css +1 -1
  72. package/dist/password-input.css +1 -1
  73. package/dist/pill.css +1 -1
  74. package/dist/popover.css +1 -1
  75. package/dist/preview-card.css +1 -1
  76. package/dist/radio-group.css +1 -1
  77. package/dist/{safePolygon-DnkzOIur.js → safePolygon-lAEp2rci.js} +1 -1
  78. package/dist/search-bar.css +1 -1
  79. package/dist/select.css +1 -1
  80. package/dist/{separator-DgY7BjjO.js → separator-Or-BDQYZ.js} +14 -14
  81. package/dist/separator.css +1 -1
  82. package/dist/slider.css +1 -1
  83. package/dist/spinner.css +1 -1
  84. package/dist/stacked-avatars.css +1 -1
  85. package/dist/status-banner.css +1 -1
  86. package/dist/styles/core.css +1 -1
  87. package/dist/surface.css +1 -1
  88. package/dist/switch.css +1 -1
  89. package/dist/tabs.css +1 -1
  90. package/dist/text.css +1 -1
  91. package/dist/timestamp.css +1 -1
  92. package/dist/toaster.css +1 -1
  93. package/dist/{tooltip-BJQPwudf.js → tooltip-JPnUwFFR.js} +6 -6
  94. package/dist/tooltip.css +1 -1
  95. package/dist/transitions.css +1 -1
  96. package/dist/{transitions.module-D9mMAtfI.js → transitions.module-SSNmQfsR.js} +43 -43
  97. package/dist/{useRole-BD3OL1rr.js → useRole-D1k7CnHQ.js} +1 -1
  98. package/dist/{useSyncedFloatingRootContext-BB1vwkV-.js → useSyncedFloatingRootContext-CaohymZI.js} +1 -1
  99. package/dist/{useTypeahead-BiL5IAVb.js → useTypeahead-CSZtonjF.js} +2 -2
  100. package/dist/view.css +1 -1
  101. package/dist/view.module-j3ylJCCE.js +6 -0
  102. package/dist/view2.css +1 -1
  103. package/package.json +17 -19
  104. package/dist/components/dialog/dialog.types.js +0 -1
  105. package/dist/components/icon/icon.types.js +0 -1
  106. package/dist/components/surface/surface.types.js +0 -1
  107. package/dist/components/view/view.types.js +0 -1
  108. package/dist/input.module-CtE19OH8.js +0 -8
  109. package/dist/view.module-CjopAf_0.js +0 -6
@@ -2,43 +2,43 @@ import { jsx as be, jsxs as Je } from "react/jsx-runtime";
2
2
  import { c as Ct } from "../../clsx-OuTLNxxd.js";
3
3
  import { View as Pt } from "../view/view.js";
4
4
  import * as a from "react";
5
- import { o as Ne } from "../../owner-rKN292Q9.js";
6
- import { u as _t } from "../../useControlled-Du4sJyMj.js";
7
- import { u as H } from "../../useStableCallback-DKZHlUAT.js";
5
+ import { o as _e } from "../../owner-rKN292Q9.js";
6
+ import { u as wt } from "../../useControlled-Du4sJyMj.js";
7
+ import { u as z } from "../../useStableCallback-DKZHlUAT.js";
8
8
  import { u as Qe } from "../../useValueAsRef-B4EriRsI.js";
9
- import { u as He } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
10
- import { w as Nt } from "../../warn-CKtX8MLJ.js";
11
- import { c as we, n as wt, g as Ze, k as Et, m as Vt, r as At, u as Ge } from "../../createBaseUIEventDetails-CCSfZ2vM.js";
9
+ import { u as ze } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
10
+ import { w as _t } from "../../warn-CKtX8MLJ.js";
11
+ import { c as Ne, n as Nt, g as Ze, k as Et, m as Vt, r as At, u as Ge } from "../../createBaseUIEventDetails-CCSfZ2vM.js";
12
12
  import { u as Tt } from "../../useValueChanged-MJRmEWz1.js";
13
- import { u as Ue } from "../../useBaseUiId-B7WyxtIE.js";
13
+ import { u as We } from "../../useBaseUiId-B7WyxtIE.js";
14
14
  import { u as Ee, m as Mt, d as Ot } from "../../useRenderElement-DngNDu_P.js";
15
15
  import { c as ue } from "../../clamp-D0KDAQIz.js";
16
16
  import { C as Ft, u as Bt } from "../../useCompositeListItem-CZp9WTnF.js";
17
17
  import { c as Dt, a as et, u as Lt, b as kt } from "../../LabelableContext-Be1u-eFg.js";
18
18
  import { f as $t } from "../../formatErrorMessage-BqPuTBN-.js";
19
- import { d as tt, f as zt } from "../../element-u5WgOZX1.js";
20
- import { a as qe } from "../../floating-ui.utils.dom-cbi420Pg.js";
21
- import { u as qt } from "../../useAnimationFrame-DvK1s63A.js";
19
+ import { d as tt, f as Ht } from "../../element-u5WgOZX1.js";
20
+ import { a as Ue } from "../../floating-ui.utils.dom-cbi420Pg.js";
21
+ import { u as Ut } from "../../useAnimationFrame-DvK1s63A.js";
22
22
  import { u as nt } from "../../DirectionContext-C2o_MF_i.js";
23
23
  import { u as rt } from "../../useOnMount-VRW6CK2u.js";
24
- import { v as We } from "../../valueToPercent-DaP9qN4u.js";
24
+ import { v as qe } from "../../valueToPercent-DaP9qN4u.js";
25
25
  import { v as je } from "../../visuallyHidden-CpJ-mhai.js";
26
26
  import { f as De } from "../../formatNumber-1UNwjeqf.js";
27
- import { C as Ht, H as ot, E as it, d as st, b as at, c as ut, e as lt } from "../../composite-BwEK5cWH.js";
28
- import { u as Ut } from "../../useLabelableId-CX4tcfzK.js";
27
+ import { C as zt, H as ot, E as it, d as st, b as at, c as ut, e as lt } from "../../composite-BwEK5cWH.js";
28
+ import { u as Wt } from "../../useLabelableId-CX4tcfzK.js";
29
29
  import '../../slider.css';function ct(e, t, r = (i, o) => i === o) {
30
30
  return e.length === t.length && e.every((i, o) => r(i, t[o]));
31
31
  }
32
32
  function dt(e, t) {
33
33
  return e - t;
34
34
  }
35
- function Wt(e, t, r) {
35
+ function qt(e, t, r) {
36
36
  const i = e.slice();
37
37
  return i[t] = r, i.sort(dt);
38
38
  }
39
39
  function ft(e, t, r, i, o, l) {
40
40
  let u = e;
41
- return u = ue(u, r, i), o && (u = Wt(
41
+ return u = ue(u, r, i), o && (u = qt(
42
42
  l,
43
43
  t,
44
44
  // Bound the new value to the thumb's neighbours.
@@ -80,9 +80,9 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
80
80
  disabled: u = !1,
81
81
  id: g,
82
82
  format: p,
83
- largeStep: w = 10,
83
+ largeStep: N = 10,
84
84
  locale: h,
85
- render: U,
85
+ render: W,
86
86
  max: E = 100,
87
87
  min: m = 0,
88
88
  minStepsBetweenValues: s = 0,
@@ -95,24 +95,24 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
95
95
  thumbAlignment: ne = "center",
96
96
  value: re,
97
97
  ...Re
98
- } = t, le = Ue(g), W = H(x), ce = H(P), {
99
- clearErrors: z
98
+ } = t, le = We(g), q = z(x), ce = z(P), {
99
+ clearErrors: H
100
100
  } = Dt(), {
101
- state: q,
101
+ state: U,
102
102
  disabled: K,
103
103
  name: S,
104
104
  setTouched: Y,
105
105
  setDirty: A,
106
106
  validityData: R,
107
- shouldValidateOnChange: _,
107
+ shouldValidateOnChange: w,
108
108
  validation: B
109
109
  } = et(), {
110
110
  labelId: oe
111
- } = Lt(), X = i ?? oe, G = K || u, de = S ?? V, [C, Ie] = _t({
111
+ } = Lt(), X = i ?? oe, G = K || u, de = S ?? V, [C, Ie] = wt({
112
112
  controlled: re,
113
113
  default: l ?? m,
114
114
  name: "Slider"
115
- }), ie = a.useRef(null), he = a.useRef(null), O = a.useRef([]), F = a.useRef(null), fe = a.useRef(null), ye = a.useRef(-1), D = a.useRef(null), L = a.useRef(null), se = a.useRef("none"), n = Qe(p), [f, c] = a.useState(-1), [b, d] = a.useState(-1), [$, me] = a.useState(!1), [J, ge] = a.useState(() => /* @__PURE__ */ new Map()), [Pe, Se] = a.useState([void 0, void 0]), I = H((v) => {
115
+ }), ie = a.useRef(null), he = a.useRef(null), O = a.useRef([]), F = a.useRef(null), fe = a.useRef(null), ye = a.useRef(-1), D = a.useRef(null), L = a.useRef(null), se = a.useRef("none"), n = Qe(p), [f, c] = a.useState(-1), [b, d] = a.useState(-1), [$, me] = a.useState(!1), [J, ge] = a.useState(() => /* @__PURE__ */ new Map()), [Pe, Se] = a.useState([void 0, void 0]), I = z((v) => {
116
116
  c(v), v !== -1 && d(v);
117
117
  });
118
118
  kt({
@@ -123,17 +123,17 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
123
123
  name: de,
124
124
  getValue: () => C
125
125
  }), Tt(C, () => {
126
- z(de), _() ? B.commit(C) : B.commit(C, !0);
126
+ H(de), w() ? B.commit(C) : B.commit(C, !0);
127
127
  const v = R.initialValue;
128
128
  let pe;
129
129
  Array.isArray(C) && Array.isArray(v) ? pe = !ct(C, v) : pe = C !== v, A(pe);
130
130
  });
131
- const xe = H((v) => {
131
+ const xe = z((v) => {
132
132
  v && (he.current = v);
133
- }), Q = Array.isArray(C), Z = a.useMemo(() => Q ? C.slice().sort(dt) : [ue(C, m, E)], [E, m, Q, C]), j = H((v, pe) => {
133
+ }), Q = Array.isArray(C), Z = a.useMemo(() => Q ? C.slice().sort(dt) : [ue(C, m, E)], [E, m, Q, C]), j = z((v, pe) => {
134
134
  if (Number.isNaN(v) || Yt(v, C))
135
135
  return;
136
- const ae = pe ?? we(wt, void 0, void 0, {
136
+ const ae = pe ?? Ne(Nt, void 0, void 0, {
137
137
  activeThumbIndex: -1
138
138
  });
139
139
  se.current = ae.reason;
@@ -144,24 +144,24 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
144
144
  value: v,
145
145
  name: de
146
146
  }
147
- }), ae.event = ve, L.current = v, W(v, ae), !ae.isCanceled && Ie(v);
148
- }), Ce = H((v, pe, ae) => {
147
+ }), ae.event = ve, L.current = v, q(v, ae), !ae.isCanceled && Ie(v);
148
+ }), Ce = z((v, pe, ae) => {
149
149
  const ve = ft(v, pe, m, E, Q, Z);
150
150
  if (mt(ve, M, s)) {
151
151
  const Te = Kt(ae);
152
- j(ve, we(Te, ae.nativeEvent, void 0, {
152
+ j(ve, Ne(Te, ae.nativeEvent, void 0, {
153
153
  activeThumbIndex: pe
154
154
  })), Y(!0);
155
155
  const Ye = L.current ?? ve;
156
156
  ce(Ye, Ze(Te, ae.nativeEvent));
157
157
  }
158
158
  });
159
- process.env.NODE_ENV !== "production" && m >= E && Nt("Slider `max` must be greater than `min`."), He(() => {
160
- const v = tt(Ne(ie.current));
159
+ process.env.NODE_ENV !== "production" && m >= E && _t("Slider `max` must be greater than `min`."), ze(() => {
160
+ const v = tt(_e(ie.current));
161
161
  G && v && ie.current?.contains(v) && v.blur();
162
162
  }, [G]), G && f !== -1 && I(-1);
163
163
  const ee = a.useMemo(() => ({
164
- ...q,
164
+ ...U,
165
165
  activeThumbIndex: f,
166
166
  disabled: G,
167
167
  dragging: $,
@@ -171,7 +171,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
171
171
  minStepsBetweenValues: s,
172
172
  step: M,
173
173
  values: Z
174
- }), [q, f, G, $, E, m, s, y, M, Z]), ke = a.useMemo(() => ({
174
+ }), [U, f, G, $, E, m, s, y, M, Z]), ke = a.useMemo(() => ({
175
175
  active: f,
176
176
  controlRef: he,
177
177
  disabled: G,
@@ -182,7 +182,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
182
182
  indicatorPosition: Pe,
183
183
  inset: ne !== "center",
184
184
  labelId: X,
185
- largeStep: w,
185
+ largeStep: N,
186
186
  lastUsedThumbIndex: b,
187
187
  lastChangedValueRef: L,
188
188
  lastChangeReasonRef: se,
@@ -209,7 +209,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
209
209
  thumbMap: J,
210
210
  thumbRefs: O,
211
211
  values: Z
212
- }), [f, he, X, G, $, B, n, Ce, Pe, w, b, L, se, h, E, m, s, de, ce, y, F, fe, ye, D, xe, I, me, Se, j, ee, M, te, ne, J, O, Z]), Ae = Ee("div", t, {
212
+ }), [f, he, X, G, $, B, n, Ce, Pe, N, b, L, se, h, E, m, s, de, ce, y, F, fe, ye, D, xe, I, me, Se, j, ee, M, te, ne, J, O, Z]), Ae = Ee("div", t, {
213
213
  state: ee,
214
214
  ref: [r, ie],
215
215
  props: [{
@@ -260,15 +260,15 @@ function Xe({
260
260
  }) {
261
261
  if (e.length === 0)
262
262
  return [];
263
- const p = e.slice(), w = l * u, h = p.length - 1, U = g ?? e, E = i + t * w, m = o - (h - t) * w;
263
+ const p = e.slice(), N = l * u, h = p.length - 1, W = g ?? e, E = i + t * N, m = o - (h - t) * N;
264
264
  p[t] = ue(r, E, m);
265
265
  for (let s = t + 1; s <= h; s += 1) {
266
- const V = p[s - 1] + w, x = o - (h - s) * w, P = U[s] ?? p[s];
266
+ const V = p[s - 1] + N, x = o - (h - s) * N, P = W[s] ?? p[s];
267
267
  let y = Math.max(p[s], V);
268
268
  P < y && (y = Math.max(P, V)), p[s] = ue(y, V, x);
269
269
  }
270
270
  for (let s = t - 1; s >= 0; s -= 1) {
271
- const V = p[s + 1] - w, x = i + s * w, P = U[s] ?? p[s];
271
+ const V = p[s + 1] - N, x = i + s * N, P = W[s] ?? p[s];
272
272
  let y = Math.min(p[s], V);
273
273
  P > y && (y = Math.min(P, V)), p[s] = ue(y, x, V);
274
274
  }
@@ -286,57 +286,57 @@ function jt({
286
286
  min: u,
287
287
  max: g,
288
288
  step: p,
289
- minStepsBetweenValues: w
289
+ minStepsBetweenValues: N
290
290
  }) {
291
- const h = r ?? t, U = i ?? t;
291
+ const h = r ?? t, W = i ?? t;
292
292
  if (!(h.length > 1))
293
293
  return {
294
294
  value: l,
295
295
  thumbIndex: 0,
296
296
  didSwap: !1
297
297
  };
298
- const m = p * w;
298
+ const m = p * N;
299
299
  switch (e) {
300
300
  case "swap": {
301
301
  const s = h[o], V = 1e-7, x = h.slice(), P = x[o - 1], y = x[o + 1], M = P != null ? P + m : u, te = y != null ? y - m : g, ne = ue(l, M, te), re = Number(ne.toFixed(12));
302
302
  x[o] = re;
303
- const Re = l > s, le = l < s, W = Re && y != null && l >= y - V, ce = le && P != null && l <= P + V;
304
- if (!W && !ce)
303
+ const Re = l > s, le = l < s, q = Re && y != null && l >= y - V, ce = le && P != null && l <= P + V;
304
+ if (!q && !ce)
305
305
  return {
306
306
  value: x,
307
307
  thumbIndex: o,
308
308
  didSwap: !1
309
309
  };
310
- const z = W ? o + 1 : o - 1, q = x.map((A, R) => {
310
+ const H = q ? o + 1 : o - 1, U = x.map((A, R) => {
311
311
  if (R === o)
312
312
  return re;
313
- const _ = U[R];
314
- return _ ?? h[R];
313
+ const w = W[R];
314
+ return w ?? h[R];
315
315
  });
316
316
  let K = l;
317
- W ? K = Math.max(l, x[z]) : K = Math.min(l, x[z]);
317
+ q ? K = Math.max(l, x[H]) : K = Math.min(l, x[H]);
318
318
  const S = Xe({
319
319
  values: x,
320
- index: z,
320
+ index: H,
321
321
  nextValue: K,
322
322
  min: u,
323
323
  max: g,
324
324
  step: p,
325
- minStepsBetweenValues: w,
326
- initialValues: q
327
- }), Y = W ? z - 1 : z + 1;
325
+ minStepsBetweenValues: N,
326
+ initialValues: U
327
+ }), Y = q ? H - 1 : H + 1;
328
328
  if (Y >= 0 && Y < S.length) {
329
329
  const A = S[Y - 1], R = S[Y + 1];
330
- let _ = A != null ? A + m : u;
331
- _ = Math.max(_, u + Y * m);
330
+ let w = A != null ? A + m : u;
331
+ w = Math.max(w, u + Y * m);
332
332
  let B = R != null ? R - m : g;
333
333
  B = Math.min(B, g - (S.length - 1 - Y) * m);
334
- const oe = ue(re, _, B);
334
+ const oe = ue(re, w, B);
335
335
  S[Y] = Number(oe.toFixed(12));
336
336
  }
337
337
  return {
338
338
  value: S,
339
- thumbIndex: z,
339
+ thumbIndex: H,
340
340
  didSwap: !0
341
341
  };
342
342
  }
@@ -349,7 +349,7 @@ function jt({
349
349
  min: u,
350
350
  max: g,
351
351
  step: p,
352
- minStepsBetweenValues: w
352
+ minStepsBetweenValues: N
353
353
  }),
354
354
  thumbIndex: o,
355
355
  didSwap: !1
@@ -408,9 +408,9 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
408
408
  disabled: u,
409
409
  dragging: g,
410
410
  validation: p,
411
- inset: w,
411
+ inset: N,
412
412
  lastChangedValueRef: h,
413
- lastChangeReasonRef: U,
413
+ lastChangeReasonRef: W,
414
414
  max: E,
415
415
  min: m,
416
416
  minStepsBetweenValues: s,
@@ -424,15 +424,15 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
424
424
  renderBeforeHydration: re,
425
425
  setActive: Re,
426
426
  setDragging: le,
427
- setValue: W,
427
+ setValue: q,
428
428
  state: ce,
429
- step: z,
430
- thumbCollisionBehavior: q,
429
+ step: H,
430
+ thumbCollisionBehavior: U,
431
431
  thumbRefs: K,
432
432
  values: S
433
- } = Le(), Y = nt(), A = S.length > 1, R = x === "vertical", _ = a.useRef(null), B = a.useRef(null), oe = H((n) => {
433
+ } = Le(), Y = nt(), A = S.length > 1, R = x === "vertical", w = a.useRef(null), B = a.useRef(null), oe = z((n) => {
434
434
  n && B.current == null && B.current == null && (B.current = getComputedStyle(n));
435
- }), X = a.useRef(null), G = a.useRef(0), de = a.useRef(0), C = Qe(S), Ie = H((n) => {
435
+ }), X = a.useRef(null), G = a.useRef(0), de = a.useRef(0), C = Qe(S), Ie = z((n) => {
436
436
  M.current !== n && (M.current = n);
437
437
  const f = K.current[n];
438
438
  if (!f) {
@@ -440,8 +440,8 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
440
440
  return;
441
441
  }
442
442
  P.current = f.querySelector('input[type="range"]');
443
- }), ie = H((n) => {
444
- const f = _.current;
443
+ }), ie = z((n) => {
444
+ const f = w.current;
445
445
  if (!f)
446
446
  return null;
447
447
  const {
@@ -452,7 +452,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
452
452
  right: me
453
453
  } = f.getBoundingClientRect(), J = Jt(B.current, R), ge = de.current, Pe = (R ? b : c) - J.start - J.end - ge * 2, Se = y.current ?? 0, I = n.x - Se, xe = n.y - Se, Q = R ? d - xe - J.end : (Y === "rtl" ? me - I : I - $) - J.start, Z = ue((Q - ge) / Pe, 0, 1);
454
454
  let j = (E - m) * Z + m;
455
- if (j = gt(j, z, m), j = ue(j, m, E), !A)
455
+ if (j = gt(j, H, m), j = ue(j, m, E), !A)
456
456
  return {
457
457
  value: j,
458
458
  thumbIndex: 0,
@@ -462,7 +462,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
462
462
  if (Ce < 0)
463
463
  return null;
464
464
  const ee = jt({
465
- behavior: q,
465
+ behavior: U,
466
466
  values: S,
467
467
  currentValues: C.current ?? S,
468
468
  initialValues: te.current,
@@ -470,11 +470,11 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
470
470
  nextValue: j,
471
471
  min: m,
472
472
  max: E,
473
- step: z,
473
+ step: H,
474
474
  minStepsBetweenValues: s
475
475
  });
476
- return q === "swap" && ee.didSwap ? Ie(ee.thumbIndex) : M.current = ee.thumbIndex, ee;
477
- }), he = H((n) => {
476
+ return U === "swap" && ee.didSwap ? Ie(ee.thumbIndex) : M.current = ee.thumbIndex, ee;
477
+ }), he = z((n) => {
478
478
  te.current = A ? S.slice() : null, C.current = S;
479
479
  const f = M.current;
480
480
  let c = f;
@@ -491,24 +491,24 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
491
491
  c = -1;
492
492
  for (let $ = 0; $ < K.current.length; $ += 1) {
493
493
  const me = K.current[$];
494
- if (qe(me)) {
494
+ if (Ue(me)) {
495
495
  const J = ht(me), ge = Math.abs(n[b] - J[b]);
496
496
  (d === void 0 || ge <= d) && (c = $, d = ge);
497
497
  }
498
498
  }
499
499
  }
500
- if (c > -1 && c !== f && Ie(c), w) {
500
+ if (c > -1 && c !== f && Ie(c), N) {
501
501
  const b = K.current[c];
502
- if (qe(b)) {
502
+ if (Ue(b)) {
503
503
  const d = b.getBoundingClientRect(), $ = R ? "height" : "width";
504
504
  de.current = d[$] / 2;
505
505
  }
506
506
  }
507
- }), O = H((n) => {
507
+ }), O = z((n) => {
508
508
  K.current?.[n]?.querySelector('input[type="range"]')?.focus({
509
509
  preventScroll: !0
510
510
  });
511
- }), F = H((n) => {
511
+ }), F = z((n) => {
512
512
  const f = Fe(n, X);
513
513
  if (f == null)
514
514
  return;
@@ -517,7 +517,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
517
517
  return;
518
518
  }
519
519
  const c = ie(f);
520
- c != null && mt(c.value, z, s) && (!g && G.current > Xt && le(!0), W(c.value, we(At, n, void 0, {
520
+ c != null && mt(c.value, H, s) && (!g && G.current > Xt && le(!0), q(c.value, Ne(At, n, void 0, {
521
521
  activeThumbIndex: c.thumbIndex
522
522
  })), C.current = Array.isArray(c.value) ? c.value : [c.value], c.didSwap && O(c.thumbIndex));
523
523
  });
@@ -525,12 +525,12 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
525
525
  Re(-1), le(!1), P.current = null, y.current = null, M.current = -1;
526
526
  const f = Fe(n, X), c = f != null ? ie(f) : null;
527
527
  if (c != null) {
528
- const b = U.current;
528
+ const b = W.current;
529
529
  p.commit(h.current ?? c.value), V(h.current ?? c.value, Ze(b, n));
530
530
  }
531
- "pointerType" in n && _.current?.hasPointerCapture(n.pointerId) && _.current?.releasePointerCapture(n.pointerId), X.current = null, te.current = null, D();
531
+ "pointerType" in n && w.current?.hasPointerCapture(n.pointerId) && w.current?.releasePointerCapture(n.pointerId), X.current = null, te.current = null, D();
532
532
  }
533
- const ye = H((n) => {
533
+ const ye = z((n) => {
534
534
  if (u)
535
535
  return;
536
536
  const f = n.changedTouches[0];
@@ -541,38 +541,38 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
541
541
  const d = ie(c);
542
542
  if (d == null)
543
543
  return;
544
- O(d.thumbIndex), W(d.value, we(Ge, n, void 0, {
544
+ O(d.thumbIndex), q(d.value, Ne(Ge, n, void 0, {
545
545
  activeThumbIndex: d.thumbIndex
546
546
  })), C.current = Array.isArray(d.value) ? d.value : [d.value], d.didSwap && O(d.thumbIndex);
547
547
  }
548
548
  G.current = 0;
549
- const b = Ne(_.current);
549
+ const b = _e(w.current);
550
550
  b.addEventListener("touchmove", F, {
551
551
  passive: !0
552
552
  }), b.addEventListener("touchend", fe, {
553
553
  passive: !0
554
554
  });
555
- }), D = H(() => {
556
- const n = Ne(_.current);
555
+ }), D = z(() => {
556
+ const n = _e(w.current);
557
557
  n.removeEventListener("pointermove", F), n.removeEventListener("pointerup", fe), n.removeEventListener("touchmove", F), n.removeEventListener("touchend", fe), te.current = null;
558
- }), L = qt();
558
+ }), L = Ut();
559
559
  return a.useEffect(() => {
560
- const n = _.current;
560
+ const n = w.current;
561
561
  return n ? (n.addEventListener("touchstart", ye, {
562
562
  passive: !0
563
563
  }), () => {
564
564
  n.removeEventListener("touchstart", ye), L.cancel(), D();
565
565
  }) : () => D();
566
- }, [D, ye, _, L]), a.useEffect(() => {
566
+ }, [D, ye, w, L]), a.useEffect(() => {
567
567
  u && D();
568
568
  }, [u, D]), Ee("div", t, {
569
569
  state: ce,
570
- ref: [r, ne, _, oe],
570
+ ref: [r, ne, w, oe],
571
571
  props: [{
572
572
  "data-base-ui-slider-control": re ? "" : void 0,
573
573
  onPointerDown(n) {
574
- const f = _.current;
575
- if (!f || u || n.defaultPrevented || !qe(n.target) || // Only handle left clicks
574
+ const f = w.current;
575
+ if (!f || u || n.defaultPrevented || !Ue(n.target) || // Only handle left clicks
576
576
  n.button !== 0)
577
577
  return;
578
578
  const c = Fe(n, X);
@@ -581,14 +581,14 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
581
581
  const d = ie(c);
582
582
  if (d == null)
583
583
  return;
584
- zt(K.current[d.thumbIndex], tt(Ne(f))) ? n.preventDefault() : L.request(() => {
584
+ Ht(K.current[d.thumbIndex], tt(_e(f))) ? n.preventDefault() : L.request(() => {
585
585
  O(d.thumbIndex);
586
- }), le(!0), y.current != null || (W(d.value, we(Ge, n.nativeEvent, void 0, {
586
+ }), le(!0), y.current != null || (q(d.value, Ne(Ge, n.nativeEvent, void 0, {
587
587
  activeThumbIndex: d.thumbIndex
588
588
  })), C.current = Array.isArray(d.value) ? d.value : [d.value], d.didSwap && O(d.thumbIndex));
589
589
  }
590
590
  n.nativeEvent.pointerId && f.setPointerCapture(n.nativeEvent.pointerId), G.current = 0;
591
- const b = Ne(_.current);
591
+ const b = _e(w.current);
592
592
  b.addEventListener("pointermove", F, {
593
593
  passive: !0
594
594
  }), b.addEventListener("pointerup", fe, {
@@ -629,7 +629,7 @@ function tn(e, t, r, i) {
629
629
  if (!(t < 0))
630
630
  return e.length === 2 ? t === 0 ? `${De(e[t], i, r)} start range` : `${De(e[t], i, r)} end range` : r ? De(e[t], i, r) : void 0;
631
631
  }
632
- function _e(e, t, r, i, o) {
632
+ function we(e, t, r, i, o) {
633
633
  return r === 1 ? Math.min(e + t, o) : Math.max(e - t, i);
634
634
  }
635
635
  const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
@@ -640,9 +640,9 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
640
640
  "aria-describedby": u,
641
641
  "aria-label": g,
642
642
  "aria-labelledby": p,
643
- disabled: w = !1,
643
+ disabled: N = !1,
644
644
  getAriaLabel: h,
645
- getAriaValueText: U,
645
+ getAriaValueText: W,
646
646
  id: E,
647
647
  index: m,
648
648
  inputRef: s,
@@ -651,21 +651,21 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
651
651
  onKeyDown: P,
652
652
  tabIndex: y,
653
653
  ...M
654
- } = t, te = Ue(E), {
654
+ } = t, te = We(E), {
655
655
  active: ne,
656
656
  lastUsedThumbIndex: re,
657
657
  controlRef: Re,
658
658
  disabled: le,
659
- validation: W,
659
+ validation: q,
660
660
  formatOptionsRef: ce,
661
- handleInputChange: z,
662
- inset: q,
661
+ handleInputChange: H,
662
+ inset: U,
663
663
  labelId: K,
664
664
  largeStep: S,
665
665
  locale: Y,
666
666
  max: A,
667
667
  min: R,
668
- minStepsBetweenValues: _,
668
+ minStepsBetweenValues: w,
669
669
  name: B,
670
670
  orientation: oe,
671
671
  pressedInputRef: X,
@@ -677,50 +677,50 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
677
677
  state: he,
678
678
  step: O,
679
679
  values: F
680
- } = Le(), fe = nt(), ye = w || le, D = F.length > 1, L = oe === "vertical", se = fe === "rtl", {
680
+ } = Le(), fe = nt(), ye = N || le, D = F.length > 1, L = oe === "vertical", se = fe === "rtl", {
681
681
  setTouched: n,
682
682
  setFocused: f,
683
683
  validationMode: c
684
- } = et(), b = a.useRef(null), d = a.useRef(null), $ = Ue(), me = Ut(), J = D ? $ : me, ge = a.useMemo(() => ({
684
+ } = et(), b = a.useRef(null), d = a.useRef(null), $ = We(), me = Wt(), J = D ? $ : me, ge = a.useMemo(() => ({
685
685
  inputId: J
686
686
  }), [J]), {
687
687
  ref: Pe,
688
688
  index: Se
689
689
  } = Bt({
690
690
  metadata: ge
691
- }), I = D ? m ?? Se : 0, xe = I === F.length - 1, Q = F[I], Z = We(Q, R, A), [j, Ce] = a.useState(!1), [ee, ke] = a.useState();
691
+ }), I = D ? m ?? Se : 0, xe = I === F.length - 1, Q = F[I], Z = qe(Q, R, A), [j, Ce] = a.useState(!1), [ee, ke] = a.useState();
692
692
  rt(() => Ce(!0));
693
- const Ae = re >= 0 && re < F.length ? re : -1, v = H(() => {
694
- const N = Re.current, T = b.current;
695
- if (!N || !T)
693
+ const Ae = re >= 0 && re < F.length ? re : -1, v = z(() => {
694
+ const _ = Re.current, T = b.current;
695
+ if (!_ || !T)
696
696
  return;
697
- const k = T.getBoundingClientRect(), Me = N.getBoundingClientRect(), Oe = L ? "height" : "width", xt = Me[Oe] - k[Oe], $e = (k[Oe] / 2 + xt * Z / 100) / Me[Oe] * 100;
698
- ke($e), I === 0 ? ie((ze) => [$e, ze[1]]) : xe && ie((ze) => [ze[0], $e]);
697
+ const k = T.getBoundingClientRect(), Me = _.getBoundingClientRect(), Oe = L ? "height" : "width", xt = Me[Oe] - k[Oe], $e = (k[Oe] / 2 + xt * Z / 100) / Me[Oe] * 100;
698
+ ke($e), I === 0 ? ie((He) => [$e, He[1]]) : xe && ie((He) => [He[0], $e]);
699
699
  });
700
- He(() => {
701
- q && queueMicrotask(v);
702
- }, [v, q]), He(() => {
703
- q && v();
704
- }, [v, q, Z]);
700
+ ze(() => {
701
+ U && queueMicrotask(v);
702
+ }, [v, U]), ze(() => {
703
+ U && v();
704
+ }, [v, U, Z]);
705
705
  const pe = a.useCallback(() => {
706
- const N = L ? "bottom" : "insetInlineStart", T = L ? "left" : "top";
706
+ const _ = L ? "bottom" : "insetInlineStart", T = L ? "left" : "top";
707
707
  let k;
708
- return D ? ne === I ? k = 2 : Ae === I && (k = 1) : ne === I && (k = 1), q ? {
708
+ return D ? ne === I ? k = 2 : Ae === I && (k = 1) : ne === I && (k = 1), U ? {
709
709
  "--position": `${ee}%`,
710
710
  visibility: C && !j || ee === void 0 ? "hidden" : void 0,
711
711
  position: "absolute",
712
- [N]: "var(--position)",
712
+ [_]: "var(--position)",
713
713
  [T]: "50%",
714
714
  translate: `${(L || !se ? -1 : 1) * 50}% ${(L ? 1 : -1) * 50}%`,
715
715
  zIndex: k
716
716
  } : Number.isFinite(Z) ? {
717
717
  position: "absolute",
718
- [N]: `${Z}%`,
718
+ [_]: `${Z}%`,
719
719
  [T]: "50%",
720
720
  translate: `${(L || !se ? -1 : 1) * 50}% ${(L ? 1 : -1) * 50}%`,
721
721
  zIndex: k
722
722
  } : je;
723
- }, [ne, I, q, j, ee, D, C, se, Ae, Z, L]);
723
+ }, [ne, I, U, j, ee, D, C, se, Ae, Z, L]);
724
724
  let ae;
725
725
  oe === "vertical" && (ae = se ? "vertical-rl" : "vertical-lr");
726
726
  const ve = Mt({
@@ -729,54 +729,54 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
729
729
  "aria-describedby": u,
730
730
  "aria-orientation": oe,
731
731
  "aria-valuenow": Q,
732
- "aria-valuetext": typeof U == "function" ? U(De(Q, Y, ce.current ?? void 0), Q, I) : tn(F, I, ce.current ?? void 0, Y),
732
+ "aria-valuetext": typeof W == "function" ? W(De(Q, Y, ce.current ?? void 0), Q, I) : tn(F, I, ce.current ?? void 0, Y),
733
733
  disabled: ye,
734
734
  id: J,
735
735
  max: A,
736
736
  min: R,
737
737
  name: B,
738
- onChange(N) {
739
- z(N.target.valueAsNumber, I, N);
738
+ onChange(_) {
739
+ H(_.target.valueAsNumber, I, _);
740
740
  },
741
741
  onFocus() {
742
742
  Ie(I), f(!0);
743
743
  },
744
744
  onBlur() {
745
- b.current && (Ie(-1), n(!0), f(!1), c === "onBlur" && W.commit(ft(Q, I, R, A, D, F)));
745
+ b.current && (Ie(-1), n(!0), f(!1), c === "onBlur" && q.commit(ft(Q, I, R, A, D, F)));
746
746
  },
747
- onKeyDown(N) {
748
- if (!en.has(N.key))
747
+ onKeyDown(_) {
748
+ if (!en.has(_.key))
749
749
  return;
750
- Ht.has(N.key) && N.stopPropagation();
750
+ zt.has(_.key) && _.stopPropagation();
751
751
  let T = null;
752
752
  const k = gt(Q, O, R);
753
- switch (N.key) {
753
+ switch (_.key) {
754
754
  case lt:
755
- T = _e(k, N.shiftKey ? S : O, 1, R, A);
755
+ T = we(k, _.shiftKey ? S : O, 1, R, A);
756
756
  break;
757
757
  case ut:
758
- T = _e(k, N.shiftKey ? S : O, se ? -1 : 1, R, A);
758
+ T = we(k, _.shiftKey ? S : O, se ? -1 : 1, R, A);
759
759
  break;
760
760
  case at:
761
- T = _e(k, N.shiftKey ? S : O, -1, R, A);
761
+ T = we(k, _.shiftKey ? S : O, -1, R, A);
762
762
  break;
763
763
  case st:
764
- T = _e(k, N.shiftKey ? S : O, se ? 1 : -1, R, A);
764
+ T = we(k, _.shiftKey ? S : O, se ? 1 : -1, R, A);
765
765
  break;
766
766
  case vt:
767
- T = _e(k, S, 1, R, A);
767
+ T = we(k, S, 1, R, A);
768
768
  break;
769
769
  case Rt:
770
- T = _e(k, S, -1, R, A);
770
+ T = we(k, S, -1, R, A);
771
771
  break;
772
772
  case it:
773
- T = A, D && (T = Number.isFinite(F[I + 1]) ? F[I + 1] - O * _ : A);
773
+ T = A, D && (T = Number.isFinite(F[I + 1]) ? F[I + 1] - O * w : A);
774
774
  break;
775
775
  case ot:
776
- T = R, D && (T = Number.isFinite(F[I - 1]) ? F[I - 1] + O * _ : R);
776
+ T = R, D && (T = Number.isFinite(F[I - 1]) ? F[I - 1] + O * w : R);
777
777
  break;
778
778
  }
779
- T !== null && (z(T, I, N), N.preventDefault());
779
+ T !== null && (H(T, I, _), _.preventDefault());
780
780
  },
781
781
  step: O,
782
782
  style: {
@@ -789,7 +789,7 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
789
789
  tabIndex: y ?? void 0,
790
790
  type: "range",
791
791
  value: Q ?? ""
792
- }, W.getInputValidationProps), Te = Ot(d, W.inputRef, s);
792
+ }, q.getInputValidationProps), Te = Ot(d, q.inputRef, s);
793
793
  return Ee("div", t, {
794
794
  state: he,
795
795
  ref: [r, Pe, b],
@@ -799,7 +799,7 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
799
799
  children: [o, /* @__PURE__ */ be("input", {
800
800
  ref: Te,
801
801
  ...ve
802
- }), q && !j && C && // this must be rendered with the last thumb to ensure all
802
+ }), U && !j && C && // this must be rendered with the last thumb to ensure all
803
803
  // preceding thumbs are already rendered in the DOM
804
804
  xe && /* @__PURE__ */ be("script", {
805
805
  // eslint-disable-next-line react/no-danger
@@ -812,9 +812,9 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
812
812
  id: te,
813
813
  onBlur: V,
814
814
  onFocus: x,
815
- onPointerDown(N) {
815
+ onPointerDown(_) {
816
816
  if (de.current = I, b.current != null) {
817
- const T = oe === "horizontal" ? "x" : "y", k = ht(b.current), Me = (oe === "horizontal" ? N.clientX : N.clientY) - k[T];
817
+ const T = oe === "horizontal" ? "x" : "y", k = ht(b.current), Me = (oe === "horizontal" ? _.clientX : _.clientY) - k[T];
818
818
  G.current = Me;
819
819
  }
820
820
  d.current != null && X.current !== d.current && (X.current = d.current);
@@ -854,27 +854,27 @@ const St = /* @__PURE__ */ a.forwardRef(function(t, r) {
854
854
  indicatorPosition: u,
855
855
  inset: g,
856
856
  max: p,
857
- min: w,
857
+ min: N,
858
858
  orientation: h,
859
- renderBeforeHydration: U,
859
+ renderBeforeHydration: W,
860
860
  state: E,
861
861
  values: m
862
862
  } = Le(), [s, V] = a.useState(!1);
863
863
  rt(() => V(!0));
864
- const x = h === "vertical", P = m.length > 1, y = g ? nn(x, P, u[0], u[1], U, s) : rn(x, P, We(m[0], w, p), We(m[m.length - 1], w, p));
864
+ const x = h === "vertical", P = m.length > 1, y = g ? nn(x, P, u[0], u[1], W, s) : rn(x, P, qe(m[0], N, p), qe(m[m.length - 1], N, p));
865
865
  return Ee("div", t, {
866
866
  state: E,
867
867
  ref: r,
868
868
  props: [{
869
- "data-base-ui-slider-indicator": U ? "" : void 0,
869
+ "data-base-ui-slider-indicator": W ? "" : void 0,
870
870
  style: y,
871
- suppressHydrationWarning: U || void 0
871
+ suppressHydrationWarning: W || void 0
872
872
  }, l],
873
873
  stateAttributesMapping: Ve
874
874
  });
875
875
  });
876
876
  process.env.NODE_ENV !== "production" && (St.displayName = "SliderIndicator");
877
- const on = "_slider__control_q5h2z_2", sn = "_slider__track_q5h2z_9", an = "_slider__indicator_q5h2z_17", un = "_slider__thumb_q5h2z_28", Be = {
877
+ const on = "_slider__control_158wu_3", sn = "_slider__track_158wu_10", an = "_slider__indicator_158wu_18", un = "_slider__thumb_158wu_29", Be = {
878
878
  slider__control: on,
879
879
  slider__track: sn,
880
880
  slider__indicator: an,