@koide-labs/ui 0.1.1 → 0.1.2

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 (93) hide show
  1. package/dist/accordion.css +1 -1
  2. package/dist/alert-dialog.css +1 -1
  3. package/dist/anchor.css +1 -1
  4. package/dist/avatar.css +1 -1
  5. package/dist/badge.css +1 -1
  6. package/dist/button.css +1 -1
  7. package/dist/checkbox.css +1 -1
  8. package/dist/code.css +1 -1
  9. package/dist/collapse.css +1 -1
  10. package/dist/command.css +1 -1
  11. package/dist/components/accordion/accordion.js +40 -40
  12. package/dist/components/alert-dialog/alert-dialog.js +9 -9
  13. package/dist/components/anchor/anchor.js +5 -5
  14. package/dist/components/avatar/avatar.js +26 -26
  15. package/dist/components/badge/badge.js +13 -13
  16. package/dist/components/button/button.js +13 -13
  17. package/dist/components/checkbox/checkbox.js +1 -1
  18. package/dist/components/code/code.js +48 -48
  19. package/dist/components/collapse/collapse.js +14 -14
  20. package/dist/components/command/command.js +121 -121
  21. package/dist/components/context-menu/context-menu.js +6 -6
  22. package/dist/components/dialog/dialog.js +1 -1
  23. package/dist/components/heading/heading.js +6 -6
  24. package/dist/components/icon/icon.js +12 -12
  25. package/dist/components/icon-button/icon-button.js +26 -26
  26. package/dist/components/inline-code/inline-code.js +2 -2
  27. package/dist/components/input/input.js +1 -1
  28. package/dist/components/meter/meter.js +40 -40
  29. package/dist/components/multiline-input/multiline-input.js +1 -1
  30. package/dist/components/number-input/number-input.js +7 -7
  31. package/dist/components/password-input/password-input.js +2 -2
  32. package/dist/components/pill/pill.js +11 -11
  33. package/dist/components/popover/popover.js +21 -21
  34. package/dist/components/preview-card/preview-card.js +2 -2
  35. package/dist/components/radio-group/radio-group.js +54 -54
  36. package/dist/components/search-bar/search-bar.js +8 -8
  37. package/dist/components/select/select.js +75 -75
  38. package/dist/components/separator/index.js +1 -1
  39. package/dist/components/separator/separator.js +1 -1
  40. package/dist/components/slider/slider.js +128 -128
  41. package/dist/components/spinner/spinner.js +4 -4
  42. package/dist/components/stacked-avatars/stacked-avatars.js +35 -35
  43. package/dist/components/status-banner/status-banner.js +22 -22
  44. package/dist/components/surface/surface.js +14 -14
  45. package/dist/components/switch/switch.js +28 -28
  46. package/dist/components/tabs/tabs.js +132 -132
  47. package/dist/components/text/text.js +15 -15
  48. package/dist/components/timestamp/timestamp.js +73 -73
  49. package/dist/components/toaster/toaster.js +165 -165
  50. package/dist/components/tooltip/index.js +1 -1
  51. package/dist/components/tooltip/tooltip.js +1 -1
  52. package/dist/components/view/view.js +40 -40
  53. package/dist/context-menu.css +1 -1
  54. package/dist/dialog.css +1 -1
  55. package/dist/{dialog.module-DsbQRp-d.js → dialog.module-Pi1eHwli.js} +13 -13
  56. package/dist/heading.css +1 -1
  57. package/dist/icon-button.css +1 -1
  58. package/dist/icon.css +1 -1
  59. package/dist/index.js +2 -2
  60. package/dist/inline-code.css +1 -1
  61. package/dist/input.css +1 -1
  62. package/dist/input.module-zw1dlr1_.js +8 -0
  63. package/dist/integrations/react-markdown/index.js +1 -1
  64. package/dist/meter.css +1 -1
  65. package/dist/number-input.css +1 -1
  66. package/dist/password-input.css +1 -1
  67. package/dist/pill.css +1 -1
  68. package/dist/popover.css +1 -1
  69. package/dist/preview-card.css +1 -1
  70. package/dist/radio-group.css +1 -1
  71. package/dist/search-bar.css +1 -1
  72. package/dist/select.css +1 -1
  73. package/dist/{separator-fh_wDZNf.js → separator-wNYojB9q.js} +8 -8
  74. package/dist/separator.css +1 -1
  75. package/dist/slider.css +1 -1
  76. package/dist/spinner.css +1 -1
  77. package/dist/stacked-avatars.css +1 -1
  78. package/dist/status-banner.css +1 -1
  79. package/dist/styles/core.css +1 -1
  80. package/dist/surface.css +1 -1
  81. package/dist/switch.css +1 -1
  82. package/dist/tabs.css +1 -1
  83. package/dist/text.css +1 -1
  84. package/dist/timestamp.css +1 -1
  85. package/dist/toaster.css +1 -1
  86. package/dist/{tooltip-oCp-elli.js → tooltip-DZkByWDR.js} +63 -63
  87. package/dist/tooltip.css +1 -1
  88. package/dist/view.css +1 -1
  89. package/dist/view.module-DlwuNdUj.js +6 -0
  90. package/dist/view2.css +1 -1
  91. package/package.json +1 -1
  92. package/dist/input.module-CtE19OH8.js +0 -8
  93. package/dist/view.module-Dj7wj0kk.js +0 -6
@@ -4,41 +4,41 @@ import { View as Pt } from "../view/view.js";
4
4
  import * as a from "react";
5
5
  import { o as Ne } from "../../owner-rKN292Q9.js";
6
6
  import { u as _t } from "../../useControlled-Du4sJyMj.js";
7
- import { u as H } from "../../useStableCallback-DKZHlUAT.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";
9
+ import { u as ze } from "../../useIsoLayoutEffect-CIDbvm3Q.js";
10
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";
11
+ import { c as we, n as wt, g as Ze, k as Et, m as Vt, r as At, u as Ye } 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";
25
- import { v as je } from "../../visuallyHidden-CpJ-mhai.js";
24
+ import { v as qe } from "../../valueToPercent-DaP9qN4u.js";
25
+ import { v as Ge } 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.
@@ -69,7 +69,7 @@ function Le() {
69
69
  function Kt(e) {
70
70
  return "key" in e ? Et : Vt;
71
71
  }
72
- function Yt(e, t) {
72
+ function jt(e, t) {
73
73
  return typeof e == "number" && typeof t == "number" ? e === t : Array.isArray(e) && Array.isArray(t) ? ct(e, t) : !1;
74
74
  }
75
75
  const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
@@ -82,7 +82,7 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
82
82
  format: p,
83
83
  largeStep: w = 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
- setTouched: Y,
104
+ setTouched: j,
105
105
  setDirty: A,
106
106
  validityData: R,
107
107
  shouldValidateOnChange: _,
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, Y = K || u, de = S ?? V, [C, Ie] = _t({
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,15 +123,15 @@ 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), _() ? 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) => {
134
- if (Number.isNaN(v) || Yt(v, C))
133
+ }), Q = Array.isArray(C), Z = a.useMemo(() => Q ? C.slice().sort(dt) : [ue(C, m, E)], [E, m, Q, C]), G = z((v, pe) => {
134
+ if (Number.isNaN(v) || jt(v, C))
135
135
  return;
136
136
  const ae = pe ?? we(wt, void 0, void 0, {
137
137
  activeThumbIndex: -1
@@ -144,26 +144,26 @@ 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
+ G(ve, we(Te, ae.nativeEvent, void 0, {
153
153
  activeThumbIndex: pe
154
- })), Y(!0);
155
- const Ye = L.current ?? ve;
156
- ce(Ye, Ze(Te, ae.nativeEvent));
154
+ })), j(!0);
155
+ const je = L.current ?? ve;
156
+ ce(je, 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(() => {
159
+ process.env.NODE_ENV !== "production" && m >= E && Nt("Slider `max` must be greater than `min`."), ze(() => {
160
160
  const v = tt(Ne(ie.current));
161
- G && v && ie.current?.contains(v) && v.blur();
162
- }, [G]), G && f !== -1 && I(-1);
161
+ Y && v && ie.current?.contains(v) && v.blur();
162
+ }, [Y]), Y && f !== -1 && I(-1);
163
163
  const ee = a.useMemo(() => ({
164
- ...q,
164
+ ...U,
165
165
  activeThumbIndex: f,
166
- disabled: G,
166
+ disabled: Y,
167
167
  dragging: $,
168
168
  orientation: y,
169
169
  max: E,
@@ -171,10 +171,10 @@ 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, Y, $, E, m, s, y, M, Z]), ke = a.useMemo(() => ({
175
175
  active: f,
176
176
  controlRef: he,
177
- disabled: G,
177
+ disabled: Y,
178
178
  dragging: $,
179
179
  validation: B,
180
180
  formatOptionsRef: n,
@@ -202,14 +202,14 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
202
202
  setActive: I,
203
203
  setDragging: me,
204
204
  setIndicatorPosition: Se,
205
- setValue: j,
205
+ setValue: G,
206
206
  state: ee,
207
207
  step: M,
208
208
  thumbCollisionBehavior: te,
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, Y, $, B, n, Ce, Pe, w, b, L, se, h, E, m, s, de, ce, y, F, fe, ye, D, xe, I, me, Se, G, ee, M, te, ne, J, O, Z]), Ae = Ee("div", t, {
213
213
  state: ee,
214
214
  ref: [r, ie],
215
215
  props: [{
@@ -236,7 +236,7 @@ function ht(e) {
236
236
  y: (t.top + t.bottom) / 2
237
237
  };
238
238
  }
239
- function Gt(e) {
239
+ function Yt(e) {
240
240
  if (Math.abs(e) < 1) {
241
241
  const r = e.toExponential().split("e-"), i = r[0].split(".")[1];
242
242
  return (i ? i.length : 0) + parseInt(r[1], 10);
@@ -246,7 +246,7 @@ function Gt(e) {
246
246
  }
247
247
  function gt(e, t, r) {
248
248
  const i = Math.round((e - r) / t) * t + r;
249
- return Number(i.toFixed(Gt(t)));
249
+ return Number(i.toFixed(Yt(t)));
250
250
  }
251
251
  function Xe({
252
252
  values: e,
@@ -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(), w = l * u, h = p.length - 1, W = g ?? e, E = i + t * w, m = o - (h - t) * w;
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] + w, x = o - (h - s) * w, 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] - w, x = i + s * w, 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
  }
@@ -276,7 +276,7 @@ function Xe({
276
276
  p[s] = Number(p[s].toFixed(12));
277
277
  return p;
278
278
  }
279
- function jt({
279
+ function Gt({
280
280
  behavior: e,
281
281
  values: t,
282
282
  currentValues: r,
@@ -288,7 +288,7 @@ function jt({
288
288
  step: p,
289
289
  minStepsBetweenValues: w
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,
@@ -300,43 +300,43 @@ function jt({
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];
313
+ const _ = W[R];
314
314
  return _ ?? 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
325
  minStepsBetweenValues: w,
326
- initialValues: q
327
- }), Y = W ? z - 1 : z + 1;
328
- if (Y >= 0 && Y < S.length) {
329
- const A = S[Y - 1], R = S[Y + 1];
326
+ initialValues: U
327
+ }), j = q ? H - 1 : H + 1;
328
+ if (j >= 0 && j < S.length) {
329
+ const A = S[j - 1], R = S[j + 1];
330
330
  let _ = A != null ? A + m : u;
331
- _ = Math.max(_, u + Y * m);
331
+ _ = Math.max(_, u + j * m);
332
332
  let B = R != null ? R - m : g;
333
- B = Math.min(B, g - (S.length - 1 - Y) * m);
333
+ B = Math.min(B, g - (S.length - 1 - j) * m);
334
334
  const oe = ue(re, _, B);
335
- S[Y] = Number(oe.toFixed(12));
335
+ S[j] = 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
  }
@@ -410,7 +410,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
410
410
  validation: p,
411
411
  inset: w,
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(), j = nt(), A = S.length > 1, R = x === "vertical", _ = 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), Y = 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,7 +440,7 @@ 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) => {
443
+ }), ie = z((n) => {
444
444
  const f = _.current;
445
445
  if (!f)
446
446
  return null;
@@ -450,31 +450,31 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
450
450
  bottom: d,
451
451
  left: $,
452
452
  right: me
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
- let j = (E - m) * Z + m;
455
- if (j = gt(j, z, m), j = ue(j, m, E), !A)
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 : (j === "rtl" ? me - I : I - $) - J.start, Z = ue((Q - ge) / Pe, 0, 1);
454
+ let G = (E - m) * Z + m;
455
+ if (G = gt(G, H, m), G = ue(G, m, E), !A)
456
456
  return {
457
- value: j,
457
+ value: G,
458
458
  thumbIndex: 0,
459
459
  didSwap: !1
460
460
  };
461
461
  const Ce = M.current;
462
462
  if (Ce < 0)
463
463
  return null;
464
- const ee = jt({
465
- behavior: q,
464
+ const ee = Gt({
465
+ behavior: U,
466
466
  values: S,
467
467
  currentValues: C.current ?? S,
468
468
  initialValues: te.current,
469
469
  pressedIndex: Ce,
470
- nextValue: j,
470
+ nextValue: G,
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,7 +491,7 @@ 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
  }
@@ -499,25 +499,25 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
499
499
  }
500
500
  if (c > -1 && c !== f && Ie(c), w) {
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;
515
- if (G.current += 1, n.type === "pointermove" && n.buttons === 0) {
515
+ if (Y.current += 1, n.type === "pointermove" && n.buttons === 0) {
516
516
  fe(n);
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 && Y.current > Xt && le(!0), q(c.value, we(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
531
  "pointerType" in n && _.current?.hasPointerCapture(n.pointerId) && _.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,21 +541,21 @@ 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, we(Ye, 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
- G.current = 0;
548
+ Y.current = 0;
549
549
  const b = Ne(_.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(() => {
555
+ }), D = z(() => {
556
556
  const n = Ne(_.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
560
  const n = _.current;
561
561
  return n ? (n.addEventListener("touchstart", ye, {
@@ -572,7 +572,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
572
572
  "data-base-ui-slider-control": re ? "" : void 0,
573
573
  onPointerDown(n) {
574
574
  const f = _.current;
575
- if (!f || u || n.defaultPrevented || !qe(n.target) || // Only handle left clicks
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,13 +581,13 @@ 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(Ne(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, we(Ye, 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
- n.nativeEvent.pointerId && f.setPointerCapture(n.nativeEvent.pointerId), G.current = 0;
590
+ n.nativeEvent.pointerId && f.setPointerCapture(n.nativeEvent.pointerId), Y.current = 0;
591
591
  const b = Ne(_.current);
592
592
  b.addEventListener("pointermove", F, {
593
593
  passive: !0
@@ -642,7 +642,7 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
642
642
  "aria-labelledby": p,
643
643
  disabled: w = !1,
644
644
  getAriaLabel: h,
645
- getAriaValueText: U,
645
+ getAriaValueText: W,
646
646
  id: E,
647
647
  index: m,
648
648
  inputRef: s,
@@ -651,25 +651,25 @@ 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
- locale: Y,
665
+ locale: j,
666
666
  max: A,
667
667
  min: R,
668
668
  minStepsBetweenValues: _,
669
669
  name: B,
670
670
  orientation: oe,
671
671
  pressedInputRef: X,
672
- pressedThumbCenterOffsetRef: G,
672
+ pressedThumbCenterOffsetRef: Y,
673
673
  pressedThumbIndexRef: de,
674
674
  renderBeforeHydration: C,
675
675
  setActive: Ie,
@@ -681,33 +681,33 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
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), [G, 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(() => {
693
+ const Ae = re >= 0 && re < F.length ? re : -1, v = z(() => {
694
694
  const N = Re.current, T = b.current;
695
695
  if (!N || !T)
696
696
  return;
697
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]);
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
706
  const N = 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
- visibility: C && !j || ee === void 0 ? "hidden" : void 0,
710
+ visibility: C && !G || ee === void 0 ? "hidden" : void 0,
711
711
  position: "absolute",
712
712
  [N]: "var(--position)",
713
713
  [T]: "50%",
@@ -719,8 +719,8 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
719
719
  [T]: "50%",
720
720
  translate: `${(L || !se ? -1 : 1) * 50}% ${(L ? 1 : -1) * 50}%`,
721
721
  zIndex: k
722
- } : je;
723
- }, [ne, I, q, j, ee, D, C, se, Ae, Z, L]);
722
+ } : Ge;
723
+ }, [ne, I, U, G, 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,25 +729,25 @@ 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, j, ce.current ?? void 0), Q, I) : tn(F, I, ce.current ?? void 0, j),
733
733
  disabled: ye,
734
734
  id: J,
735
735
  max: A,
736
736
  min: R,
737
737
  name: B,
738
738
  onChange(N) {
739
- z(N.target.valueAsNumber, I, N);
739
+ H(N.target.valueAsNumber, I, N);
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
747
  onKeyDown(N) {
748
748
  if (!en.has(N.key))
749
749
  return;
750
- Ht.has(N.key) && N.stopPropagation();
750
+ zt.has(N.key) && N.stopPropagation();
751
751
  let T = null;
752
752
  const k = gt(Q, O, R);
753
753
  switch (N.key) {
@@ -776,11 +776,11 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
776
776
  T = R, D && (T = Number.isFinite(F[I - 1]) ? F[I - 1] + O * _ : R);
777
777
  break;
778
778
  }
779
- T !== null && (z(T, I, N), N.preventDefault());
779
+ T !== null && (H(T, I, N), N.preventDefault());
780
780
  },
781
781
  step: O,
782
782
  style: {
783
- ...je,
783
+ ...Ge,
784
784
  // So that VoiceOver's focus indicator matches the thumb's dimensions
785
785
  width: "100%",
786
786
  height: "100%",
@@ -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 && !G && 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
@@ -815,7 +815,7 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
815
815
  onPointerDown(N) {
816
816
  if (de.current = I, b.current != null) {
817
817
  const T = oe === "horizontal" ? "x" : "y", k = ht(b.current), Me = (oe === "horizontal" ? N.clientX : N.clientY) - k[T];
818
- G.current = Me;
818
+ Y.current = Me;
819
819
  }
820
820
  d.current != null && X.current !== d.current && (X.current = d.current);
821
821
  },
@@ -856,25 +856,25 @@ const St = /* @__PURE__ */ a.forwardRef(function(t, r) {
856
856
  max: p,
857
857
  min: w,
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], w, p), qe(m[m.length - 1], w, 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_1jhfa_2", sn = "_slider__track_1jhfa_9", an = "_slider__indicator_1jhfa_17", un = "_slider__thumb_1jhfa_28", Be = {
878
878
  slider__control: on,
879
879
  slider__track: sn,
880
880
  slider__indicator: an,