@koide-labs/ui 0.1.2 → 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 (108) hide show
  1. package/dist/{InternalBackdrop-BSMKU-hc.js → InternalBackdrop-DDLgWc7D.js} +1 -1
  2. package/dist/accordion.css +1 -1
  3. package/dist/alert-dialog.css +1 -1
  4. package/dist/anchor.css +1 -1
  5. package/dist/avatar.css +1 -1
  6. package/dist/badge.css +1 -1
  7. package/dist/button.css +1 -1
  8. package/dist/checkbox.css +1 -1
  9. package/dist/code.css +1 -1
  10. package/dist/collapse.css +1 -1
  11. package/dist/command.css +1 -1
  12. package/dist/components/accordion/accordion.js +54 -54
  13. package/dist/components/alert-dialog/alert-dialog.js +6 -6
  14. package/dist/components/anchor/anchor.js +7 -7
  15. package/dist/components/avatar/avatar.js +13 -13
  16. package/dist/components/badge/badge.js +17 -17
  17. package/dist/components/button/button.js +12 -12
  18. package/dist/components/checkbox/checkbox.js +15 -15
  19. package/dist/components/code/code.js +32 -32
  20. package/dist/components/collapse/collapse.js +5 -5
  21. package/dist/components/command/command.js +4 -4
  22. package/dist/components/context-menu/context-menu.js +13 -13
  23. package/dist/components/dialog/dialog.js +2 -2
  24. package/dist/components/heading/heading.js +9 -9
  25. package/dist/components/icon/icon.js +7 -7
  26. package/dist/components/icon-button/icon-button.js +24 -24
  27. package/dist/components/inline-code/inline-code.js +7 -7
  28. package/dist/components/input/input.js +1 -1
  29. package/dist/components/meter/meter.js +10 -10
  30. package/dist/components/multiline-input/multiline-input.js +1 -1
  31. package/dist/components/number-input/number-input.js +60 -60
  32. package/dist/components/password-input/password-input.js +6 -6
  33. package/dist/components/pill/pill.js +15 -15
  34. package/dist/components/popover/popover.js +31 -31
  35. package/dist/components/preview-card/preview-card.js +5 -5
  36. package/dist/components/radio-group/radio-group.js +109 -109
  37. package/dist/components/search-bar/search-bar.js +10 -10
  38. package/dist/components/select/select.js +8 -8
  39. package/dist/components/separator/index.js +1 -1
  40. package/dist/components/separator/separator.js +1 -1
  41. package/dist/components/slider/slider.js +114 -114
  42. package/dist/components/spinner/spinner.js +4 -4
  43. package/dist/components/stacked-avatars/stacked-avatars.js +37 -37
  44. package/dist/components/status-banner/status-banner.js +22 -22
  45. package/dist/components/surface/surface.js +17 -17
  46. package/dist/components/switch/switch.js +28 -28
  47. package/dist/components/tabs/tabs.js +116 -116
  48. package/dist/components/text/text.js +16 -16
  49. package/dist/components/timestamp/timestamp.js +2 -2
  50. package/dist/components/toaster/toaster.js +145 -145
  51. package/dist/components/tooltip/index.js +1 -1
  52. package/dist/components/tooltip/tooltip.js +2 -2
  53. package/dist/components/view/view.js +40 -40
  54. package/dist/context-menu.css +1 -1
  55. package/dist/dialog.css +1 -1
  56. package/dist/{dialog.module-Pi1eHwli.js → dialog.module-CRiRBcbM.js} +66 -66
  57. package/dist/{getDisabledMountTransitionStyles-E2x-_lte.js → getDisabledMountTransitionStyles-CyEI2117.js} +1 -1
  58. package/dist/heading.css +1 -1
  59. package/dist/icon-button.css +1 -1
  60. package/dist/icon.css +1 -1
  61. package/dist/index.css +1 -1
  62. package/dist/index.js +2 -2
  63. package/dist/index2.css +1 -1
  64. package/dist/inline-code.css +1 -1
  65. package/dist/input.css +1 -1
  66. package/dist/input.module-CYcyDtrO.js +8 -0
  67. package/dist/integrations/react-markdown/index.js +26 -26
  68. package/dist/integrations/twemoji/index.js +1 -1
  69. package/dist/meter.css +1 -1
  70. package/dist/number-input.css +1 -1
  71. package/dist/password-input.css +1 -1
  72. package/dist/pill.css +1 -1
  73. package/dist/popover.css +1 -1
  74. package/dist/preview-card.css +1 -1
  75. package/dist/radio-group.css +1 -1
  76. package/dist/{safePolygon-DnkzOIur.js → safePolygon-lAEp2rci.js} +1 -1
  77. package/dist/search-bar.css +1 -1
  78. package/dist/select.css +1 -1
  79. package/dist/{separator-wNYojB9q.js → separator-Or-BDQYZ.js} +13 -13
  80. package/dist/separator.css +1 -1
  81. package/dist/slider.css +1 -1
  82. package/dist/spinner.css +1 -1
  83. package/dist/stacked-avatars.css +1 -1
  84. package/dist/status-banner.css +1 -1
  85. package/dist/styles/core.css +1 -1
  86. package/dist/surface.css +1 -1
  87. package/dist/switch.css +1 -1
  88. package/dist/tabs.css +1 -1
  89. package/dist/text.css +1 -1
  90. package/dist/timestamp.css +1 -1
  91. package/dist/toaster.css +1 -1
  92. package/dist/{tooltip-DZkByWDR.js → tooltip-JPnUwFFR.js} +6 -6
  93. package/dist/tooltip.css +1 -1
  94. package/dist/transitions.css +1 -1
  95. package/dist/{transitions.module-D9mMAtfI.js → transitions.module-SSNmQfsR.js} +43 -43
  96. package/dist/{useRole-BD3OL1rr.js → useRole-D1k7CnHQ.js} +1 -1
  97. package/dist/{useSyncedFloatingRootContext-BB1vwkV-.js → useSyncedFloatingRootContext-CaohymZI.js} +1 -1
  98. package/dist/{useTypeahead-BiL5IAVb.js → useTypeahead-CSZtonjF.js} +2 -2
  99. package/dist/view.css +1 -1
  100. package/dist/view.module-j3ylJCCE.js +6 -0
  101. package/dist/view2.css +1 -1
  102. package/package.json +2 -1
  103. package/dist/components/dialog/dialog.types.js +0 -1
  104. package/dist/components/icon/icon.types.js +0 -1
  105. package/dist/components/surface/surface.types.js +0 -1
  106. package/dist/components/view/view.types.js +0 -1
  107. package/dist/input.module-zw1dlr1_.js +0 -8
  108. package/dist/view.module-DlwuNdUj.js +0 -6
@@ -2,13 +2,13 @@ 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";
5
+ import { o as _e } from "../../owner-rKN292Q9.js";
6
+ import { u as wt } from "../../useControlled-Du4sJyMj.js";
7
7
  import { u as z } from "../../useStableCallback-DKZHlUAT.js";
8
8
  import { u as Qe } from "../../useValueAsRef-B4EriRsI.js";
9
9
  import { u as ze } 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 Ye } from "../../createBaseUIEventDetails-CCSfZ2vM.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
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";
@@ -22,7 +22,7 @@ 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
24
  import { v as qe } from "../../valueToPercent-DaP9qN4u.js";
25
- import { v as Ge } from "../../visuallyHidden-CpJ-mhai.js";
25
+ import { v as je } from "../../visuallyHidden-CpJ-mhai.js";
26
26
  import { f as De } from "../../formatNumber-1UNwjeqf.js";
27
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
28
  import { u as Wt } from "../../useLabelableId-CX4tcfzK.js";
@@ -69,7 +69,7 @@ function Le() {
69
69
  function Kt(e) {
70
70
  return "key" in e ? Et : Vt;
71
71
  }
72
- function jt(e, t) {
72
+ function Yt(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) {
@@ -80,7 +80,7 @@ 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
85
  render: W,
86
86
  max: E = 100,
@@ -101,14 +101,14 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
101
101
  state: U,
102
102
  disabled: K,
103
103
  name: S,
104
- setTouched: j,
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, Y = 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"
@@ -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
- H(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
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]), G = z((v, pe) => {
134
- if (Number.isNaN(v) || jt(v, C))
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
+ 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;
@@ -149,21 +149,21 @@ const pt = /* @__PURE__ */ a.forwardRef(function(t, r) {
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
- G(ve, we(Te, ae.nativeEvent, void 0, {
152
+ j(ve, Ne(Te, ae.nativeEvent, void 0, {
153
153
  activeThumbIndex: pe
154
- })), j(!0);
155
- const je = L.current ?? ve;
156
- ce(je, Ze(Te, ae.nativeEvent));
154
+ })), Y(!0);
155
+ const Ye = L.current ?? ve;
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`."), ze(() => {
160
- const v = tt(Ne(ie.current));
161
- Y && v && ie.current?.contains(v) && v.blur();
162
- }, [Y]), Y && f !== -1 && I(-1);
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
+ G && v && ie.current?.contains(v) && v.blur();
162
+ }, [G]), G && f !== -1 && I(-1);
163
163
  const ee = a.useMemo(() => ({
164
164
  ...U,
165
165
  activeThumbIndex: f,
166
- disabled: Y,
166
+ disabled: G,
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
- }), [U, f, Y, $, 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
- disabled: Y,
177
+ disabled: G,
178
178
  dragging: $,
179
179
  validation: B,
180
180
  formatOptionsRef: n,
@@ -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,
@@ -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: G,
205
+ setValue: j,
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, 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, {
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: [{
@@ -236,7 +236,7 @@ function ht(e) {
236
236
  y: (t.top + t.bottom) / 2
237
237
  };
238
238
  }
239
- function Yt(e) {
239
+ function Gt(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 Yt(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(Yt(t)));
249
+ return Number(i.toFixed(Gt(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, W = 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 = W[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 = W[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
  }
@@ -276,7 +276,7 @@ function Xe({
276
276
  p[s] = Number(p[s].toFixed(12));
277
277
  return p;
278
278
  }
279
- function Gt({
279
+ function jt({
280
280
  behavior: e,
281
281
  values: t,
282
282
  currentValues: r,
@@ -286,7 +286,7 @@ function Gt({
286
286
  min: u,
287
287
  max: g,
288
288
  step: p,
289
- minStepsBetweenValues: w
289
+ minStepsBetweenValues: N
290
290
  }) {
291
291
  const h = r ?? t, W = i ?? t;
292
292
  if (!(h.length > 1))
@@ -295,7 +295,7 @@ function Gt({
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));
@@ -310,8 +310,8 @@ function Gt({
310
310
  const H = q ? o + 1 : o - 1, U = x.map((A, R) => {
311
311
  if (R === o)
312
312
  return re;
313
- const _ = W[R];
314
- return _ ?? h[R];
313
+ const w = W[R];
314
+ return w ?? h[R];
315
315
  });
316
316
  let K = l;
317
317
  q ? K = Math.max(l, x[H]) : K = Math.min(l, x[H]);
@@ -322,17 +322,17 @@ function Gt({
322
322
  min: u,
323
323
  max: g,
324
324
  step: p,
325
- minStepsBetweenValues: w,
325
+ minStepsBetweenValues: N,
326
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
- let _ = A != null ? A + m : u;
331
- _ = Math.max(_, u + j * m);
327
+ }), Y = q ? H - 1 : H + 1;
328
+ if (Y >= 0 && Y < S.length) {
329
+ const A = S[Y - 1], R = S[Y + 1];
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
- B = Math.min(B, g - (S.length - 1 - j) * m);
334
- const oe = ue(re, _, B);
335
- S[j] = Number(oe.toFixed(12));
333
+ B = Math.min(B, g - (S.length - 1 - Y) * m);
334
+ const oe = ue(re, w, B);
335
+ S[Y] = Number(oe.toFixed(12));
336
336
  }
337
337
  return {
338
338
  value: S,
@@ -349,7 +349,7 @@ function Gt({
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,7 +408,7 @@ 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
413
  lastChangeReasonRef: W,
414
414
  max: E,
@@ -430,9 +430,9 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
430
430
  thumbCollisionBehavior: U,
431
431
  thumbRefs: K,
432
432
  values: S
433
- } = Le(), j = nt(), A = S.length > 1, R = x === "vertical", _ = a.useRef(null), B = a.useRef(null), oe = z((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), Y = a.useRef(0), de = a.useRef(0), C = Qe(S), Ie = z((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) {
@@ -441,7 +441,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
441
441
  }
442
442
  P.current = f.querySelector('input[type="range"]');
443
443
  }), ie = z((n) => {
444
- const f = _.current;
444
+ const f = w.current;
445
445
  if (!f)
446
446
  return null;
447
447
  const {
@@ -450,24 +450,24 @@ 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 : (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)
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, H, m), j = ue(j, m, E), !A)
456
456
  return {
457
- value: G,
457
+ value: j,
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 = Gt({
464
+ const ee = jt({
465
465
  behavior: U,
466
466
  values: S,
467
467
  currentValues: C.current ?? S,
468
468
  initialValues: te.current,
469
469
  pressedIndex: Ce,
470
- nextValue: G,
470
+ nextValue: j,
471
471
  min: m,
472
472
  max: E,
473
473
  step: H,
@@ -497,7 +497,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
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
502
  if (Ue(b)) {
503
503
  const d = b.getBoundingClientRect(), $ = R ? "height" : "width";
@@ -512,12 +512,12 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
512
512
  const f = Fe(n, X);
513
513
  if (f == null)
514
514
  return;
515
- if (Y.current += 1, n.type === "pointermove" && n.buttons === 0) {
515
+ if (G.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, H, s) && (!g && Y.current > Xt && le(!0), q(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
  });
@@ -528,7 +528,7 @@ const bt = /* @__PURE__ */ a.forwardRef(function(t, r) {
528
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
533
  const ye = z((n) => {
534
534
  if (u)
@@ -541,37 +541,37 @@ 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), q(d.value, we(Ye, 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
- Y.current = 0;
549
- const b = Ne(_.current);
548
+ G.current = 0;
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
555
  }), D = z(() => {
556
- const n = Ne(_.current);
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
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;
574
+ const f = w.current;
575
575
  if (!f || u || n.defaultPrevented || !Ue(n.target) || // Only handle left clicks
576
576
  n.button !== 0)
577
577
  return;
@@ -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
- Ht(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 || (q(d.value, we(Ye, 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
- n.nativeEvent.pointerId && f.setPointerCapture(n.nativeEvent.pointerId), Y.current = 0;
591
- const b = Ne(_.current);
590
+ n.nativeEvent.pointerId && f.setPointerCapture(n.nativeEvent.pointerId), G.current = 0;
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,7 +640,7 @@ 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
645
  getAriaValueText: W,
646
646
  id: E,
@@ -662,14 +662,14 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
662
662
  inset: U,
663
663
  labelId: K,
664
664
  largeStep: S,
665
- locale: j,
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,
672
- pressedThumbCenterOffsetRef: Y,
672
+ pressedThumbCenterOffsetRef: G,
673
673
  pressedThumbIndexRef: de,
674
674
  renderBeforeHydration: C,
675
675
  setActive: Ie,
@@ -677,7 +677,7 @@ 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
@@ -688,13 +688,13 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
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 = qe(Q, R, A), [G, 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
693
  const Ae = re >= 0 && re < F.length ? re : -1, v = z(() => {
694
- const N = Re.current, T = b.current;
695
- if (!N || !T)
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;
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
698
  ke($e), I === 0 ? ie((He) => [$e, He[1]]) : xe && ie((He) => [He[0], $e]);
699
699
  });
700
700
  ze(() => {
@@ -703,24 +703,24 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
703
703
  U && v();
704
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
708
  return D ? ne === I ? k = 2 : Ae === I && (k = 1) : ne === I && (k = 1), U ? {
709
709
  "--position": `${ee}%`,
710
- visibility: C && !G || ee === void 0 ? "hidden" : void 0,
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
- } : Ge;
723
- }, [ne, I, U, G, ee, D, C, se, Ae, Z, L]);
722
+ } : je;
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,14 +729,14 @@ 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 W == "function" ? W(De(Q, j, ce.current ?? void 0), Q, I) : tn(F, I, ce.current ?? void 0, j),
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
- H(N.target.valueAsNumber, I, N);
738
+ onChange(_) {
739
+ H(_.target.valueAsNumber, I, _);
740
740
  },
741
741
  onFocus() {
742
742
  Ie(I), f(!0);
@@ -744,43 +744,43 @@ const It = /* @__PURE__ */ a.forwardRef(function(t, r) {
744
744
  onBlur() {
745
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
- zt.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 && (H(T, I, N), N.preventDefault());
779
+ T !== null && (H(T, I, _), _.preventDefault());
780
780
  },
781
781
  step: O,
782
782
  style: {
783
- ...Ge,
783
+ ...je,
784
784
  // So that VoiceOver's focus indicator matches the thumb's dimensions
785
785
  width: "100%",
786
786
  height: "100%",
@@ -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
- }), U && !G && 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,10 +812,10 @@ 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];
818
- Y.current = Me;
817
+ const T = oe === "horizontal" ? "x" : "y", k = ht(b.current), Me = (oe === "horizontal" ? _.clientX : _.clientY) - k[T];
818
+ G.current = Me;
819
819
  }
820
820
  d.current != null && X.current !== d.current && (X.current = d.current);
821
821
  },
@@ -854,14 +854,14 @@ 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
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], W, s) : rn(x, P, qe(m[0], w, p), qe(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,
@@ -874,7 +874,7 @@ const St = /* @__PURE__ */ a.forwardRef(function(t, r) {
874
874
  });
875
875
  });
876
876
  process.env.NODE_ENV !== "production" && (St.displayName = "SliderIndicator");
877
- const on = "_slider__control_1jhfa_2", sn = "_slider__track_1jhfa_9", an = "_slider__indicator_1jhfa_17", un = "_slider__thumb_1jhfa_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,
@@ -1,12 +1,12 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
2
  import { c as e } from "../../clsx-OuTLNxxd.js";
3
- import { View as i } from "../view/view.js";
4
- import { Icon as s } from "../icon/icon.js";
5
- import '../../spinner.css';const m = "_spinner_1hyco_2", p = {
3
+ import { View as s } from "../view/view.js";
4
+ import { Icon as i } from "../icon/icon.js";
5
+ import '../../spinner.css';const m = "_spinner_s5ov8_3", p = {
6
6
  spinner: m
7
7
  };
8
8
  function f({ className: r, ...o }) {
9
- return /* @__PURE__ */ n(i, { className: e(p.spinner, r), ...o, children: /* @__PURE__ */ n(s, { name: "loader-2-line" }) });
9
+ return /* @__PURE__ */ n(s, { className: e(p.spinner, r), ...o, children: /* @__PURE__ */ n(i, { name: "loader-2-line" }) });
10
10
  }
11
11
  export {
12
12
  f as Spinner