@alfadocs/ui-kit 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/_chunks/{ai-prompt-input-noh-N3cf.js → ai-prompt-input-DEiQwIMn.js} +21 -20
  2. package/dist/_chunks/{audio-recorder-BHBonrFf.js → audio-recorder-CRh4uyFL.js} +2 -2
  3. package/dist/_chunks/{autocomplete-C34hbfKh.js → autocomplete-mOg7WLOh.js} +2 -2
  4. package/dist/_chunks/{chat-input-Bov-gkwP.js → chat-input-UK-bXU7u.js} +9 -8
  5. package/dist/_chunks/{combobox-BHhnR3qm.js → combobox-D5tWe0t_.js} +2 -2
  6. package/dist/_chunks/{date-picker-BD5FYW08.js → date-picker-BlhtBhPo.js} +2 -2
  7. package/dist/_chunks/{date-range-picker-BZLVgcXE.js → date-range-picker-C2hRu_Ke.js} +2 -2
  8. package/dist/_chunks/{date-time-picker-CCoRWX7R.js → date-time-picker-B67mPZmP.js} +2 -2
  9. package/dist/_chunks/{input-surface-u4QB0lxe.js → input-surface-xyERuLU_.js} +9 -3
  10. package/dist/_chunks/{leo-sidebar-B054wsZm.js → leo-sidebar-D3TuyH5_.js} +2 -2
  11. package/dist/_chunks/{multi-select-Bh-xR8kP.js → multi-select-DooDzQIp.js} +2 -2
  12. package/dist/_chunks/{number-input-mpSLk-ld.js → number-input-DH00o0DN.js} +28 -27
  13. package/dist/_chunks/{otp-input-CI-Zv5q6.js → otp-input-BBXYvLx5.js} +49 -48
  14. package/dist/_chunks/{phone-input-DtBVs5fz.js → phone-input-DKSHX7NQ.js} +23 -22
  15. package/dist/_chunks/{react-day-picker-C04L_28V.js → react-day-picker-C5F3-TTX.js} +6 -3
  16. package/dist/_chunks/{search-bar-DmZZ9UvV.js → search-bar-DORSAzNt.js} +2 -2
  17. package/dist/_chunks/{search-input-BBtSRH-Q.js → search-input-BtEJAJHa.js} +2 -2
  18. package/dist/_chunks/{select-i9MwQeQy.js → select-Ca6ibiDL.js} +13 -12
  19. package/dist/_chunks/{tabs-Cg794H0Q.js → tabs-CRCyPpJo.js} +2 -2
  20. package/dist/_chunks/{text-area-DHtcpcLv.js → text-area-D5GAe8pV.js} +26 -25
  21. package/dist/_chunks/{text-input-1oqFRbVI.js → text-input-CakysYnD.js} +26 -25
  22. package/dist/_chunks/{transcript-panel-BpJqPr7I.js → transcript-panel-DUrjx5sa.js} +2 -2
  23. package/dist/_chunks/{use-password-requirements-DbPZMfV9.js → use-password-requirements-BOgFsoIe.js} +2 -2
  24. package/dist/agent-catalog.json +1 -1
  25. package/dist/components/ai-prompt-input/index.js +1 -1
  26. package/dist/components/audio-recorder/index.js +1 -1
  27. package/dist/components/autocomplete/index.js +1 -1
  28. package/dist/components/chat-input/index.js +1 -1
  29. package/dist/components/combobox/index.js +1 -1
  30. package/dist/components/date-picker/index.js +1 -1
  31. package/dist/components/date-range-picker/index.js +1 -1
  32. package/dist/components/date-time-picker/index.js +1 -1
  33. package/dist/components/multi-select/index.js +1 -1
  34. package/dist/components/number-input/index.js +1 -1
  35. package/dist/components/otp-input/index.js +1 -1
  36. package/dist/components/password-input/index.js +1 -1
  37. package/dist/components/phone-input/index.js +1 -1
  38. package/dist/components/search-bar/index.js +1 -1
  39. package/dist/components/search-input/index.js +1 -1
  40. package/dist/components/select/index.js +1 -1
  41. package/dist/components/tabs/index.js +1 -1
  42. package/dist/components/text-area/index.js +1 -1
  43. package/dist/components/text-input/index.js +1 -1
  44. package/dist/components/transcript-panel/index.js +1 -1
  45. package/dist/index.js +21 -21
  46. package/dist/patterns/leo-assistant/index.js +1 -1
  47. package/dist/tokens.css +1 -1
  48. package/package.json +1 -1
@@ -6,7 +6,7 @@ import { u as Ae } from "./registry-C9nwlNyL.js";
6
6
  import { _ as b } from "./index-4xgbg-sn.js";
7
7
  import { u as Ce } from "./index-CFoBa86t.js";
8
8
  import { I as ne } from "./icon-button-C4CGcYuz.js";
9
- import { S as Le } from "./select-i9MwQeQy.js";
9
+ import { S as Le } from "./select-Ca6ibiDL.js";
10
10
  import { S as Re } from "./send-CySZIRPJ.js";
11
11
  import { X as Ue } from "./x-CCcI3eJp.js";
12
12
  const We = {
@@ -82,8 +82,9 @@ const We = {
82
82
  }, Ze = _e(
83
83
  [
84
84
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full",
85
- "ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-background",
86
- "ds:transition-[border-color] ds:duration-[var(--animation-duration)]",
85
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-border ds:bg-input",
86
+ "ds:shadow-[var(--shadow-input)]",
87
+ "ds:transition-[border-color,box-shadow] ds:duration-[var(--animation-duration)]",
87
88
  "ds:focus-within:border-[color:var(--primary)]",
88
89
  "ds:motion-reduce:transition-none"
89
90
  ].join(" "),
@@ -109,8 +110,8 @@ const We = {
109
110
  context: B,
110
111
  onContextDismiss: y,
111
112
  onSubmit: I,
112
- onAttach: k,
113
- onAttachmentRejected: N,
113
+ onAttach: w,
114
+ onAttachmentRejected: k,
114
115
  minRows: $ = 2,
115
116
  maxRows: W = 8,
116
117
  value: Z,
@@ -128,14 +129,14 @@ const We = {
128
129
  ...ce
129
130
  }, pe) => {
130
131
  var se;
131
- const { t: o } = re(), ue = $e(), w = T(null), S = T(!1), me = T(null), fe = g((e) => {
132
- w.current = e;
132
+ const { t: o } = re(), ue = $e(), N = T(null), S = T(!1), me = T(null), fe = g((e) => {
133
+ N.current = e;
133
134
  }, []), c = Z !== void 0, [ve, f] = h(
134
135
  String(Q ?? "")
135
136
  ), i = c ? String(Z) : ve, [u, z] = h([]), [v, P] = h(!1), [ge, M] = h(""), [he, be] = h(
136
137
  E ?? ((se = d == null ? void 0 : d[0]) == null ? void 0 : se.id) ?? ""
137
138
  ), X = U !== void 0, L = X ? U : he, Y = g(() => {
138
- const e = w.current;
139
+ const e = N.current;
139
140
  if (!e) return;
140
141
  const t = window.getComputedStyle(e), n = parseFloat(t.lineHeight) || 24, r = parseFloat(t.paddingTop) || 0, p = parseFloat(t.paddingBottom) || 0, l = parseFloat(t.borderTopWidth) || 0, R = parseFloat(t.borderBottomWidth) || 0, K = r + p + l + R, Ee = n * $ + K, ae = n * W + K;
141
142
  e.style.height = "auto";
@@ -163,9 +164,9 @@ const We = {
163
164
  xe(e.target.value, t);
164
165
  }, Ie = (e) => {
165
166
  S.current = !0, D == null || D(e);
166
- }, ke = (e) => {
167
+ }, we = (e) => {
167
168
  S.current = !1, _ == null || _(e);
168
- }, Ne = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || S.current, V = g(() => {
169
+ }, ke = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || S.current, V = g(() => {
169
170
  if (!i.trim() && u.length === 0) return;
170
171
  let t, n = i;
171
172
  const r = i.match(/^\/(\S+)\s?/);
@@ -177,7 +178,7 @@ const We = {
177
178
  }), c || f(""), z([]);
178
179
  }, [i, u, I, L, c]), G = T(null);
179
180
  je(pe, () => G.current, []);
180
- const we = De(
181
+ const Ne = De(
181
182
  () => ({
182
183
  getValue: () => i,
183
184
  isEmpty: () => !i.trim() && u.length === 0,
@@ -193,14 +194,14 @@ const We = {
193
194
  },
194
195
  focus: () => {
195
196
  var e;
196
- (e = w.current) == null || e.focus();
197
+ (e = N.current) == null || e.focus();
197
198
  }
198
199
  }),
199
200
  [i, u, c, V]
200
201
  );
201
- Ae(We, we, C);
202
+ Ae(We, Ne, C);
202
203
  const Se = (e) => {
203
- if (j == null || j(e), !e.defaultPrevented && !Ne(e)) {
204
+ if (j == null || j(e), !e.defaultPrevented && !ke(e)) {
204
205
  if (v && e.key === "Escape") {
205
206
  e.preventDefault(), P(!1);
206
207
  return;
@@ -208,7 +209,7 @@ const We = {
208
209
  e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), V());
209
210
  }
210
211
  }, ze = (e) => {
211
- const t = w.current;
212
+ const t = N.current;
212
213
  if (!t) return;
213
214
  const n = t.selectionStart ?? i.length, p = i.slice(0, n).lastIndexOf(`
214
215
  `) + 1;
@@ -236,7 +237,7 @@ const We = {
236
237
  const t = [];
237
238
  for (const r of e) {
238
239
  if (typeof x == "number" && r.size > x) {
239
- N == null || N(
240
+ k == null || k(
240
241
  o("chat.attachment.rejected", { reason: "size" })
241
242
  );
242
243
  continue;
@@ -246,9 +247,9 @@ const We = {
246
247
  file: r
247
248
  });
248
249
  }
249
- t.length > 0 && (z((r) => [...r, ...t]), k == null || k(t.map((r) => r.file)));
250
+ t.length > 0 && (z((r) => [...r, ...t]), w == null || w(t.map((r) => r.file)));
250
251
  },
251
- [x, k, N, o]
252
+ [x, w, k, o]
252
253
  ), { getRootProps: Me, getInputProps: Ve, isDragActive: He } = Ce({
253
254
  onDrop: J,
254
255
  maxSize: x,
@@ -315,7 +316,7 @@ const We = {
315
316
  onKeyDown: Se,
316
317
  onPaste: Pe,
317
318
  onCompositionStart: Ie,
318
- onCompositionEnd: ke,
319
+ onCompositionEnd: we,
319
320
  className: [
320
321
  "ds:w-full ds:resize-none ds:bg-transparent ds:outline-none",
321
322
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]",
@@ -473,4 +474,4 @@ export {
473
474
  Qe as A,
474
475
  We as a
475
476
  };
476
- //# sourceMappingURL=ai-prompt-input-noh-N3cf.js.map
477
+ //# sourceMappingURL=ai-prompt-input-DEiQwIMn.js.map
@@ -4,7 +4,7 @@ import { c as ce } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as oe } from "react-i18next";
5
5
  import { B as G } from "./button-DD_0Xdmr.js";
6
6
  import { I as N } from "./icon-button-C4CGcYuz.js";
7
- import { S as ue } from "./select-i9MwQeQy.js";
7
+ import { S as ue } from "./select-Ca6ibiDL.js";
8
8
  import { A as pe } from "./audio-visualiser-I-T4Z7EU.js";
9
9
  import { A as F } from "./alert-pgdXrEO5.js";
10
10
  import { u as le } from "./registry-C9nwlNyL.js";
@@ -454,4 +454,4 @@ export {
454
454
  Ne as A,
455
455
  Re as a
456
456
  };
457
- //# sourceMappingURL=audio-recorder-BHBonrFf.js.map
457
+ //# sourceMappingURL=audio-recorder-CRh4uyFL.js.map
@@ -8,7 +8,7 @@ import { S as me } from "./spinner-DirtWZNG.js";
8
8
  import { u as tt } from "./form-field-context-B3APVHKx.js";
9
9
  import { u as st } from "./use-debounced-callback-BisrB-Fq.js";
10
10
  import { g as nt } from "./group-options-BvKhQ3xb.js";
11
- import { I as ot, a as X, b as J, c as at } from "./input-surface-u4QB0lxe.js";
11
+ import { I as ot, a as X, b as J, c as at } from "./input-surface-xyERuLU_.js";
12
12
  import { u as rt } from "./registry-C9nwlNyL.js";
13
13
  const it = {
14
14
  id: "autocomplete",
@@ -463,4 +463,4 @@ export {
463
463
  it as a,
464
464
  dt as b
465
465
  };
466
- //# sourceMappingURL=autocomplete-C34hbfKh.js.map
466
+ //# sourceMappingURL=autocomplete-mOg7WLOh.js.map
@@ -88,13 +88,14 @@ const Me = [
88
88
  }, Ke = we(
89
89
  [
90
90
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full",
91
- // Soft drop-shadow + transparent border replaces a flat
92
- // `border-border` (grey-800 since the WCAG 1.4.11 bump). Border kept
93
- // at 1px so the focus-within color override + forced-colors
94
- // fallback still paint a visible edge.
95
- "ds:rounded-[var(--radius-md)] ds:shadow-[var(--shadow-sm)] ds:border ds:border-transparent",
96
- "ds:bg-background ds:focus-within:border-[color:var(--primary)]",
97
- "ds:transition-[border-color] ds:duration-[var(--animation-duration)]",
91
+ // Uses the kit's shared input-chrome tokens `--input` for fill,
92
+ // `--shadow-input` for the halo. Border stays at 1px (`--border`,
93
+ // softened to `grey-700` in light) so the focus-within override and
94
+ // forced-colors fallback both still paint a visible edge.
95
+ "ds:rounded-[var(--radius-md)] ds:border ds:border-border",
96
+ "ds:bg-input ds:shadow-[var(--shadow-input)]",
97
+ "ds:focus-within:border-[color:var(--primary)]",
98
+ "ds:transition-[border-color,box-shadow] ds:duration-[var(--animation-duration)]",
98
99
  "ds:motion-reduce:transition-none",
99
100
  "ds:forced-colors:border-[CanvasText]"
100
101
  ].join(" "),
@@ -332,4 +333,4 @@ export {
332
333
  je as C,
333
334
  Fe as c
334
335
  };
335
- //# sourceMappingURL=chat-input-Bov-gkwP.js.map
336
+ //# sourceMappingURL=chat-input-UK-bXU7u.js.map
@@ -8,7 +8,7 @@ import { u as He, F as Ge } from "./form-field-context-B3APVHKx.js";
8
8
  import { c as Me } from "./compose-refs-C0k0tdqF.js";
9
9
  import { n as L } from "./normalize-diacritics-BNGbFNlJ.js";
10
10
  import { g as Le } from "./group-options-BvKhQ3xb.js";
11
- import { I as Qe, a as Q, d as K, c as Ke } from "./input-surface-u4QB0lxe.js";
11
+ import { I as Qe, a as Q, d as K, c as Ke } from "./input-surface-xyERuLU_.js";
12
12
  import { u as Xe } from "./registry-C9nwlNyL.js";
13
13
  import { X as We } from "./x-CCcI3eJp.js";
14
14
  import { C as Je } from "./check-DPdL_Sm7.js";
@@ -452,4 +452,4 @@ export {
452
452
  ae as d,
453
453
  et as e
454
454
  };
455
- //# sourceMappingURL=combobox-BHhnR3qm.js.map
455
+ //# sourceMappingURL=combobox-D5tWe0t_.js.map
@@ -6,7 +6,7 @@ import { forwardRef as _e, useState as G, useRef as se, useEffect as Ie, useCall
6
6
  import { useTranslation as He } from "react-i18next";
7
7
  import * as Z from "@radix-ui/react-popover";
8
8
  import { u as qe } from "./form-field-context-B3APVHKx.js";
9
- import { g as Le, k as Ne, b as Ce, i as Re, j as Qe, t as We, C as Ae, d as Fe, p as Be, D as Ge, f as Ve, h as Xe } from "./react-day-picker-C04L_28V.js";
9
+ import { g as Le, k as Ne, b as Ce, i as Re, j as Qe, t as We, C as Ae, d as Fe, p as Be, D as Ge, f as Ve, h as Xe } from "./react-day-picker-C5F3-TTX.js";
10
10
  import { g as ue, e as Ke, b as S, h as le, j as ze, k as Ze, c as de, l as fe, m as je, n as ie, o as $e, w as oe, p as Ue, f as ce, q as Je } from "./isSameMonth-5wNF2f4I.js";
11
11
  import { u as Se } from "./registry-C9nwlNyL.js";
12
12
  import { t as H, c as _, m as et, a as tt, e as rt } from "./isSameDay-ecuM8PBB.js";
@@ -1819,4 +1819,4 @@ export {
1819
1819
  rr as D,
1820
1820
  tr as d
1821
1821
  };
1822
- //# sourceMappingURL=date-picker-BD5FYW08.js.map
1822
+ //# sourceMappingURL=date-picker-BlhtBhPo.js.map
@@ -3,7 +3,7 @@ import { forwardRef as Q, useState as v, useRef as U, useCallback as X, useMemo
3
3
  import { useTranslation as ee } from "react-i18next";
4
4
  import * as m from "@radix-ui/react-popover";
5
5
  import { u as te } from "./form-field-context-B3APVHKx.js";
6
- import { a as ae, g as ne, b as re, e as I, c as se, C as oe, d as ie, t as de, p as ce, D as le, f as pe, h as fe } from "./react-day-picker-C04L_28V.js";
6
+ import { a as ae, g as ne, b as re, e as I, c as se, C as oe, d as ie, t as de, p as ce, D as le, f as pe, h as fe } from "./react-day-picker-C5F3-TTX.js";
7
7
  import { c as ge, b as N, s as ue, f as R, d as me } from "./isSameMonth-5wNF2f4I.js";
8
8
  import { u as ye } from "./registry-C9nwlNyL.js";
9
9
  function D(t, s, n) {
@@ -284,4 +284,4 @@ export {
284
284
  be as D,
285
285
  ke as d
286
286
  };
287
- //# sourceMappingURL=date-range-picker-BZLVgcXE.js.map
287
+ //# sourceMappingURL=date-range-picker-C2hRu_Ke.js.map
@@ -5,7 +5,7 @@ import { useTranslation as me } from "react-i18next";
5
5
  import * as k from "@radix-ui/react-popover";
6
6
  import { u as pe } from "./form-field-context-B3APVHKx.js";
7
7
  import { T as fe } from "./time-picker-DeVZkIY2.js";
8
- import { g as ge, b as he, i as ve, j as be, C as ye, d as Te, t as ke, D as we, f as De, h as Pe } from "./react-day-picker-C04L_28V.js";
8
+ import { g as ge, b as he, i as ve, j as be, C as ye, d as Te, t as ke, D as we, f as De, h as Pe } from "./react-day-picker-C5F3-TTX.js";
9
9
  import { f as xe } from "./isSameMonth-5wNF2f4I.js";
10
10
  import { u as Ce } from "./registry-C9nwlNyL.js";
11
11
  import { t as j } from "./isSameDay-ecuM8PBB.js";
@@ -305,4 +305,4 @@ export {
305
305
  Ie as D,
306
306
  Oe as d
307
307
  };
308
- //# sourceMappingURL=date-time-picker-CCoRWX7R.js.map
308
+ //# sourceMappingURL=date-time-picker-B67mPZmP.js.map
@@ -1,7 +1,13 @@
1
1
  const s = [
2
2
  "ds:rounded-[var(--radius-sm)]",
3
- "ds:border ds:border-border ds:bg-background ds:text-foreground",
4
- "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
3
+ // Soft-chrome look: subtle fill (`--input`) + halo shadow (`--shadow-input`)
4
+ // do the visual containment, so the border tone can stay quiet
5
+ // (`grey-700` in light, `violet-500` in dark). Both `.theme-accessible`
6
+ // variants re-override `--input` back to `--background` and
7
+ // `--shadow-input` to `none`, so AAA consumers see the explicit edge.
8
+ "ds:border ds:border-border ds:bg-input ds:text-foreground",
9
+ "ds:shadow-[var(--shadow-input)]",
10
+ "ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
5
11
  "ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
6
12
  "ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
7
13
  "ds:forced-colors:focus-within:outline-[CanvasText]",
@@ -29,4 +35,4 @@ export {
29
35
  s as c,
30
36
  r as d
31
37
  };
32
- //# sourceMappingURL=input-surface-u4QB0lxe.js.map
38
+ //# sourceMappingURL=input-surface-xyERuLU_.js.map
@@ -10,7 +10,7 @@ import { A as L } from "./avatar-I10iCDs8.js";
10
10
  import { B as D } from "./button-DD_0Xdmr.js";
11
11
  import { C as ae } from "./chat-container-izziXViv.js";
12
12
  import { C as re } from "./chat-message-g3lxpXM_.js";
13
- import { C as le } from "./chat-input-Bov-gkwP.js";
13
+ import { C as le } from "./chat-input-UK-bXU7u.js";
14
14
  import { S as ie } from "./streaming-text-BgjCTVOw.js";
15
15
  import { a as q, S as O } from "./suggestion-chip-C4Jz0LrM.js";
16
16
  import { T as oe } from "./typing-indicator-DHeVN4ob.js";
@@ -756,4 +756,4 @@ export {
756
756
  we as b,
757
757
  Ce as c
758
758
  };
759
- //# sourceMappingURL=leo-sidebar-B054wsZm.js.map
759
+ //# sourceMappingURL=leo-sidebar-D3TuyH5_.js.map
@@ -8,7 +8,7 @@ import { u as Ke, F as Ue } from "./form-field-context-B3APVHKx.js";
8
8
  import { T as de } from "./tooltip-DHik5yRI.js";
9
9
  import { c as Qe } from "./compose-refs-C0k0tdqF.js";
10
10
  import { g as Ye } from "./group-options-BvKhQ3xb.js";
11
- import { b as Y, c as Ge } from "./input-surface-u4QB0lxe.js";
11
+ import { b as Y, c as Ge } from "./input-surface-xyERuLU_.js";
12
12
  import { u as He } from "./registry-C9nwlNyL.js";
13
13
  import { X as Xe } from "./x-CCcI3eJp.js";
14
14
  import { C as Je } from "./check-DPdL_Sm7.js";
@@ -542,4 +542,4 @@ export {
542
542
  Ze as a,
543
543
  We as m
544
544
  };
545
- //# sourceMappingURL=multi-select-Bh-xR8kP.js.map
545
+ //# sourceMappingURL=multi-select-DooDzQIp.js.map
@@ -1,12 +1,12 @@
1
- import { jsxs as be, jsx as x } from "react/jsx-runtime";
1
+ import { jsxs as be, jsx as F } from "react/jsx-runtime";
2
2
  import { useMemo as J, forwardRef as ge, useRef as A, useState as E, useCallback as $, useEffect as he } from "react";
3
3
  import { c as Ne } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as ye } from "react-i18next";
5
5
  import { u as we } from "./form-field-context-B3APVHKx.js";
6
6
  import { c as Ie } from "./compose-refs-C0k0tdqF.js";
7
7
  import { u as De } from "./registry-C9nwlNyL.js";
8
- import { C as Fe } from "./chevron-down-BX_NP2Yh.js";
9
- import { C as xe } from "./chevron-up-zOEDrmBB.js";
8
+ import { C as xe } from "./chevron-down-BX_NP2Yh.js";
9
+ import { C as Fe } from "./chevron-up-zOEDrmBB.js";
10
10
  const Se = {
11
11
  id: "number-input",
12
12
  capabilities: ["edit_inline"],
@@ -83,9 +83,9 @@ function Ve(t, r, u) {
83
83
  maximumFractionDigits: 4
84
84
  }) : r === "integer" ? new Intl.NumberFormat(t, { maximumFractionDigits: 0 }) : new Intl.NumberFormat(t, { maximumFractionDigits: 10 }), T = (a) => Number.isFinite(a) ? p.format(a) : "", z = (a) => {
85
85
  if (!a) return NaN;
86
- const k = Me(a), g = k.trim(), I = g.startsWith("-") || g.startsWith("−");
86
+ const C = Me(a), g = C.trim(), I = g.startsWith("-") || g.startsWith("−");
87
87
  let c = "";
88
- for (const h of k)
88
+ for (const h of C)
89
89
  h >= "0" && h <= "9" ? c += h : h === d && (c += ".");
90
90
  if (!c || c === ".") return NaN;
91
91
  let m = Number(c);
@@ -113,11 +113,12 @@ function Ve(t, r, u) {
113
113
  };
114
114
  }, [t, r, u]);
115
115
  }
116
- const ke = Ne(
116
+ const Ce = Ne(
117
117
  [
118
118
  "ds:flex ds:items-center ds:w-full ds:rounded-[var(--radius-sm)]",
119
- "ds:border ds:bg-background ds:text-foreground",
120
- "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
119
+ "ds:border ds:bg-input ds:text-foreground",
120
+ "ds:shadow-[var(--shadow-input)]",
121
+ "ds:transition-[colors,box-shadow] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
121
122
  "ds:focus-within:outline-[length:var(--focus-ring-width)] ds:focus-within:outline-solid",
122
123
  "ds:focus-within:outline-ring ds:focus-within:outline-offset-[length:var(--focus-ring-offset)]",
123
124
  "ds:has-[:disabled]:cursor-not-allowed ds:has-[:disabled]:opacity-50"
@@ -142,7 +143,7 @@ const ke = Ne(
142
143
  "ds:text-muted-foreground ds:hover:text-foreground",
143
144
  "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
144
145
  "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
145
- ].join(" "), Ce = () => typeof navigator < "u" && navigator.language ? navigator.language : "en-US";
146
+ ].join(" "), ke = () => typeof navigator < "u" && navigator.language ? navigator.language : "en-US";
146
147
  function Te(t) {
147
148
  if (!Number.isFinite(t)) return 0;
148
149
  const r = String(t), u = r.indexOf(".");
@@ -168,13 +169,13 @@ const Pe = ge(
168
169
  tone: M,
169
170
  className: V,
170
171
  id: a,
171
- disabled: k,
172
+ disabled: C,
172
173
  onFocus: g,
173
174
  onBlur: I,
174
175
  onKeyDown: c,
175
176
  ...m
176
177
  }, h) => {
177
- const { t: U } = ye(), D = we(), Q = a ?? D.id, C = !!(D.disabled || k), X = z ?? Ce(), P = Ve(X, p, T), {
178
+ const { t: U } = ye(), D = we(), Q = a ?? D.id, k = !!(D.disabled || C), X = z ?? ke(), P = Ve(X, p, T), {
178
179
  decimalSeparator: B,
179
180
  format: R,
180
181
  parse: K
@@ -182,7 +183,7 @@ const Pe = ge(
182
183
  r ?? null
183
184
  ), s = H ? t ?? null : Z, W = A(s);
184
185
  W.current = s;
185
- const F = $(
186
+ const x = $(
186
187
  (e) => {
187
188
  const i = p === "percentage" ? e * 100 : e;
188
189
  return (Number.isInteger(i) ? String(i) : i.toString()).replace(".", B);
@@ -202,14 +203,14 @@ const Pe = ge(
202
203
  }, w = (e) => {
203
204
  let o = (s ?? 0) + S * e;
204
205
  n !== void 0 && (o = Math.max(n, o)), d !== void 0 && (o = Math.min(d, o)), o = ze(o, S), v(o), y(!1), l(
205
- N.current ? F(o) : f(o)
206
+ N.current ? x(o) : f(o)
206
207
  );
207
208
  }, O = (e) => {
208
209
  v(e), y(!1), l(
209
- N.current ? F(e) : f(e)
210
+ N.current ? x(e) : f(e)
210
211
  );
211
212
  }, se = (e) => {
212
- if (c == null || c(e), e.defaultPrevented || C) return;
213
+ if (c == null || c(e), e.defaultPrevented || k) return;
213
214
  const { key: i, shiftKey: o } = e;
214
215
  i === "ArrowUp" ? (e.preventDefault(), w(o ? 10 : 1)) : i === "ArrowDown" ? (e.preventDefault(), w(o ? -10 : -1)) : i === "PageUp" ? (e.preventDefault(), w(100)) : i === "PageDown" ? (e.preventDefault(), w(-100)) : i === "Home" && n !== void 0 ? (e.preventDefault(), O(n)) : i === "End" && d !== void 0 && (e.preventDefault(), O(d));
215
216
  }, ie = (e) => {
@@ -221,7 +222,7 @@ const Pe = ge(
221
222
  const o = K(i);
222
223
  Number.isNaN(o) || v(o);
223
224
  }, oe = (e) => {
224
- g == null || g(e), N.current = !0, s != null && l(F(s));
225
+ g == null || g(e), N.current = !0, s != null && l(x(s));
225
226
  }, ae = (e) => {
226
227
  if (I == null || I(e), N.current = !1, j.trim() === "") {
227
228
  v(null), y(!1), l("");
@@ -241,7 +242,7 @@ const Pe = ge(
241
242
  getValue: () => W.current,
242
243
  setValue: (e) => {
243
244
  v(e), l(
244
- e === null ? "" : N.current ? F(e) : f(e)
245
+ e === null ? "" : N.current ? x(e) : f(e)
245
246
  );
246
247
  },
247
248
  clear: () => {
@@ -255,14 +256,14 @@ const Pe = ge(
255
256
  // The handle is reconstructed per render; consumers (the agent runtime)
256
257
  // re-register only when the identity changes, which is a cheap no-op.
257
258
  // eslint-disable-next-line react-hooks/exhaustive-deps
258
- [F, f]
259
+ [x, f]
259
260
  );
260
261
  De(Se, le, a);
261
- const ce = C || n !== void 0 && s !== null && s <= n, fe = C || d !== void 0 && s !== null && s >= d, pe = s ?? void 0, me = (p === "currency" || p === "percentage") && s !== null && s !== null ? R(s) : void 0, ve = P.inputMode === "numeric" ? "[0-9]*" : void 0;
262
+ const ce = k || n !== void 0 && s !== null && s <= n, fe = k || d !== void 0 && s !== null && s >= d, pe = s ?? void 0, me = (p === "currency" || p === "percentage") && s !== null && s !== null ? R(s) : void 0, ve = P.inputMode === "numeric" ? "[0-9]*" : void 0;
262
263
  return /* @__PURE__ */ be(
263
264
  "div",
264
265
  {
265
- className: ke({
266
+ className: Ce({
266
267
  size: b,
267
268
  tone: re,
268
269
  className: V
@@ -271,7 +272,7 @@ const Pe = ge(
271
272
  "data-component-id": a,
272
273
  "data-mode": p,
273
274
  children: [
274
- /* @__PURE__ */ x(
275
+ /* @__PURE__ */ F(
275
276
  "button",
276
277
  {
277
278
  type: "button",
@@ -281,10 +282,10 @@ const Pe = ge(
281
282
  onMouseDown: _,
282
283
  disabled: ce,
283
284
  className: `${G} ds:ps-2 ds:pe-1`,
284
- children: /* @__PURE__ */ x(Fe, { "aria-hidden": "true", className: "ds:size-4" })
285
+ children: /* @__PURE__ */ F(xe, { "aria-hidden": "true", className: "ds:size-4" })
285
286
  }
286
287
  ),
287
- /* @__PURE__ */ x(
288
+ /* @__PURE__ */ F(
288
289
  "input",
289
290
  {
290
291
  ref: Y,
@@ -295,7 +296,7 @@ const Pe = ge(
295
296
  pattern: ve,
296
297
  autoComplete: "off",
297
298
  value: j,
298
- disabled: C,
299
+ disabled: k,
299
300
  "aria-valuemin": n,
300
301
  "aria-valuemax": d,
301
302
  "aria-valuenow": pe,
@@ -311,7 +312,7 @@ const Pe = ge(
311
312
  ...m
312
313
  }
313
314
  ),
314
- /* @__PURE__ */ x(
315
+ /* @__PURE__ */ F(
315
316
  "button",
316
317
  {
317
318
  type: "button",
@@ -321,7 +322,7 @@ const Pe = ge(
321
322
  onMouseDown: _,
322
323
  disabled: fe,
323
324
  className: `${G} ds:ps-1 ds:pe-2`,
324
- children: /* @__PURE__ */ x(xe, { "aria-hidden": "true", className: "ds:size-4" })
325
+ children: /* @__PURE__ */ F(Fe, { "aria-hidden": "true", className: "ds:size-4" })
325
326
  }
326
327
  )
327
328
  ]
@@ -334,4 +335,4 @@ export {
334
335
  Pe as N,
335
336
  Ve as u
336
337
  };
337
- //# sourceMappingURL=number-input-mpSLk-ld.js.map
338
+ //# sourceMappingURL=number-input-DH00o0DN.js.map