@alfadocs/ui-kit 0.17.1 → 0.17.3

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 (100) hide show
  1. package/dist/_chunks/{accordion-DOmxGEWU.js → accordion-CNcodXuO.js} +6 -6
  2. package/dist/_chunks/{ai-prompt-input-DEiQwIMn.js → ai-prompt-input-B-w5Rx3V.js} +184 -181
  3. package/dist/_chunks/{alert-pgdXrEO5.js → alert-DBnawbmf.js} +64 -59
  4. package/dist/_chunks/{audio-recorder-CRh4uyFL.js → audio-recorder-DNkQLW1G.js} +3 -3
  5. package/dist/_chunks/{autocomplete-mOg7WLOh.js → autocomplete-BxfabhZ8.js} +167 -164
  6. package/dist/_chunks/{balance-cell-renderer-DWWtX-VM.js → balance-cell-renderer-DJB6WDPe.js} +2 -2
  7. package/dist/_chunks/{chat-input-UK-bXU7u.js → chat-input-B3XmFGDw.js} +123 -122
  8. package/dist/_chunks/checkbox-group-Bwmt1ovQ.js +213 -0
  9. package/dist/_chunks/{checkbox-D5EHnB14.js → checkbox-mwbrPZDY.js} +75 -70
  10. package/dist/_chunks/{collapsible-CuxUBoHJ.js → collapsible-hHiyZp0b.js} +61 -63
  11. package/dist/_chunks/{color-picker-BPfcByHH.js → color-picker-Bm-gzpsh.js} +2 -2
  12. package/dist/_chunks/{combobox-D5tWe0t_.js → combobox-Da9eq00i.js} +214 -211
  13. package/dist/_chunks/{copy-field-BCHAZ8QV.js → copy-field-BAF4mt9h.js} +95 -132
  14. package/dist/_chunks/{date-picker-BlhtBhPo.js → date-picker-BIoSLRly.js} +222 -219
  15. package/dist/_chunks/{date-range-picker-C2hRu_Ke.js → date-range-picker-9gANFNG9.js} +81 -78
  16. package/dist/_chunks/{date-time-picker-B67mPZmP.js → date-time-picker-DG7BiGdb.js} +98 -95
  17. package/dist/_chunks/{dialog-DRp6Dejy.js → dialog-DUomPCRS.js} +69 -71
  18. package/dist/_chunks/{dropdown-menu-dyV7gHh_.js → dropdown-menu-DZxwF23X.js} +108 -110
  19. package/dist/_chunks/{freemium-paywall-BTEiVkes.js → freemium-paywall-DXc7XlGE.js} +98 -97
  20. package/dist/_chunks/{leo-sidebar-D3TuyH5_.js → leo-sidebar-DIsiTju3.js} +2 -2
  21. package/dist/_chunks/{list-DcjV0m5B.js → list-BdvDctBz.js} +184 -180
  22. package/dist/_chunks/{message-tray-Fsend-du.js → message-tray-BNAS8al4.js} +111 -111
  23. package/dist/_chunks/{multi-select-DooDzQIp.js → multi-select-CyspR5ZF.js} +157 -154
  24. package/dist/_chunks/{navigation-menu-DdufF-_4.js → navigation-menu-CyS1fBJ7.js} +85 -87
  25. package/dist/_chunks/{notification-tray-C3dYdLAF.js → notification-tray-D_69dXFY.js} +114 -114
  26. package/dist/_chunks/{number-input-DH00o0DN.js → number-input-BZXu6bPY.js} +92 -89
  27. package/dist/_chunks/{otp-input-BBXYvLx5.js → otp-input-BDF_iNpa.js} +92 -93
  28. package/dist/_chunks/{pagination-F1ei4khE.js → pagination-BWaXF7W0.js} +194 -211
  29. package/dist/_chunks/{patient-shell-BE0CdPOJ.js → patient-shell-BOOaWZA9.js} +3 -3
  30. package/dist/_chunks/{payment-form-CI77oIx1.js → payment-form-BjkuQeqR.js} +2 -2
  31. package/dist/_chunks/{pdf-viewer-CnEJvmXC.js → pdf-viewer-BG_nsFT5.js} +2 -2
  32. package/dist/_chunks/{radio-group-Cz1a4QCA.js → radio-group-BHZOxrIK.js} +4 -4
  33. package/dist/_chunks/{select-Ca6ibiDL.js → select-C92AT_OZ.js} +7 -7
  34. package/dist/_chunks/{sidebar-D8Lq065m.js → sidebar-BqzlRBvC.js} +271 -291
  35. package/dist/_chunks/{slider-CkR6CLun.js → slider-CfEzeseL.js} +4 -4
  36. package/dist/_chunks/{tabs-CRCyPpJo.js → tabs-aEQfQV3x.js} +8 -8
  37. package/dist/_chunks/{theme-toggle-B3meAb3y.js → theme-toggle-BswYl0Yp.js} +2 -2
  38. package/dist/_chunks/use-controllable-state-BiY4xTzM.js +23 -0
  39. package/dist/_chunks/use-copy-to-clipboard-Cyfc_dlv.js +43 -0
  40. package/dist/_chunks/use-persistent-state-i23OWy6G.js +24 -0
  41. package/dist/_chunks/{warning-stack-CeRihME9.js → warning-stack-CDH9TudY.js} +2 -2
  42. package/dist/_chunks/{workflow-map-D3MvrsZV.js → workflow-map-BeKe23uw.js} +3 -3
  43. package/dist/agent-catalog.json +1 -1
  44. package/dist/components/_shared/use-debounced-callback.d.ts +1 -5
  45. package/dist/components/_shared/use-direction.d.ts +1 -18
  46. package/dist/components/_shared/use-focus-trap.d.ts +1 -31
  47. package/dist/components/accordion/index.js +1 -1
  48. package/dist/components/ai-prompt-input/index.js +1 -1
  49. package/dist/components/alert/index.js +1 -1
  50. package/dist/components/audio-recorder/index.js +1 -1
  51. package/dist/components/autocomplete/index.js +1 -1
  52. package/dist/components/chat-input/index.js +1 -1
  53. package/dist/components/checkbox/index.js +1 -1
  54. package/dist/components/checkbox-group/index.js +1 -1
  55. package/dist/components/collapsible/index.js +1 -1
  56. package/dist/components/color-picker/index.js +1 -1
  57. package/dist/components/combobox/index.js +1 -1
  58. package/dist/components/command-palette/command-palette.d.ts +1 -1
  59. package/dist/components/copy-field/index.js +1 -1
  60. package/dist/components/data-table/index.js +1 -1
  61. package/dist/components/date-picker/index.js +1 -1
  62. package/dist/components/date-range-picker/index.js +1 -1
  63. package/dist/components/date-time-picker/index.js +1 -1
  64. package/dist/components/dialog/index.js +1 -1
  65. package/dist/components/dropdown-menu/index.js +1 -1
  66. package/dist/components/freemium-paywall/index.js +1 -1
  67. package/dist/components/icon-button-group/icon-button-group.d.ts +14 -14
  68. package/dist/components/list/index.js +1 -1
  69. package/dist/components/message-tray/index.js +1 -1
  70. package/dist/components/multi-select/index.js +1 -1
  71. package/dist/components/navigation-menu/index.js +1 -1
  72. package/dist/components/notification-tray/index.js +1 -1
  73. package/dist/components/number-input/index.js +1 -1
  74. package/dist/components/otp-input/index.js +1 -1
  75. package/dist/components/pagination/index.js +1 -1
  76. package/dist/components/payment-form/index.js +1 -1
  77. package/dist/components/pdf-viewer/index.js +1 -1
  78. package/dist/components/radio-group/index.js +1 -1
  79. package/dist/components/select/index.js +1 -1
  80. package/dist/components/sidebar/index.js +8 -7
  81. package/dist/components/sidebar/sidebar.d.ts +1 -1
  82. package/dist/components/slider/index.js +1 -1
  83. package/dist/components/tabs/index.js +1 -1
  84. package/dist/components/theme-toggle/index.js +1 -1
  85. package/dist/components/warning-stack/index.js +1 -1
  86. package/dist/components/workflow/index.js +1 -1
  87. package/dist/hooks/index.d.ts +8 -0
  88. package/dist/hooks/index.js +98 -15
  89. package/dist/hooks/use-debounced-callback.d.ts +19 -0
  90. package/dist/hooks/use-debounced-value.d.ts +16 -0
  91. package/dist/hooks/use-direction.d.ts +19 -0
  92. package/dist/hooks/use-focus-trap.d.ts +32 -0
  93. package/dist/hooks/use-isomorphic-layout-effect.d.ts +13 -0
  94. package/dist/hooks/use-persistent-state.d.ts +16 -0
  95. package/dist/index.js +493 -492
  96. package/dist/patterns/leo-assistant/index.js +1 -1
  97. package/dist/patterns/patient-shell/index.js +1 -1
  98. package/dist/tokens.css +1 -1
  99. package/package.json +4 -2
  100. package/dist/_chunks/checkbox-group-Qkm3Rg1S.js +0 -208
@@ -1,14 +1,15 @@
1
- import { jsx as o, jsxs as D } from "react/jsx-runtime";
2
- import { forwardRef as Ye, useId as Ze, useState as I, useRef as c, useCallback as T, useEffect as N, useMemo as S } from "react";
3
- import { _ as m } from "./index-4xgbg-sn.js";
4
- import * as A from "@radix-ui/react-popover";
5
- import { c as F } from "./index-D2ZczOXr.js";
6
- import { useTranslation as et } from "react-i18next";
7
- import { S as me } from "./spinner-DirtWZNG.js";
8
- import { u as tt } from "./form-field-context-B3APVHKx.js";
9
- import { u as st } from "./use-debounced-callback-BisrB-Fq.js";
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-xyERuLU_.js";
1
+ import { jsx as o, jsxs as _ } from "react/jsx-runtime";
2
+ import { forwardRef as We, useId as Ye, useState as $, useRef as c, useCallback as D, useEffect as R, useMemo as L } from "react";
3
+ import { _ as f } from "./index-4xgbg-sn.js";
4
+ import * as T from "@radix-ui/react-popover";
5
+ import { c as A } from "./index-D2ZczOXr.js";
6
+ import { useTranslation as Ze } from "react-i18next";
7
+ import { S as pe } from "./spinner-DirtWZNG.js";
8
+ import { u as et } from "./form-field-context-B3APVHKx.js";
9
+ import { u as tt } from "./use-controllable-state-BiY4xTzM.js";
10
+ import { g as st } from "./group-options-BvKhQ3xb.js";
11
+ import { I as nt, a as S, b as K, c as ot } from "./input-surface-xyERuLU_.js";
12
+ import { u as at } from "./use-debounced-callback-BisrB-Fq.js";
12
13
  import { u as rt } from "./registry-C9nwlNyL.js";
13
14
  const it = {
14
15
  id: "autocomplete",
@@ -81,20 +82,20 @@ const it = {
81
82
  description: "Each suggestion emits its value as data-option-id."
82
83
  }
83
84
  }
84
- }, dt = F(
85
- ["ds:flex ds:w-full ds:items-center", at].join(" "),
85
+ }, dt = A(
86
+ ["ds:flex ds:w-full ds:items-center", ot].join(" "),
86
87
  {
87
88
  variants: {
88
89
  size: {
89
- sm: `${X.sm} ${J.sm}`,
90
- md: `${X.md} ${J.md}`,
91
- lg: `${X.lg} ${J.lg}`
90
+ sm: `${S.sm} ${K.sm}`,
91
+ md: `${S.md} ${K.md}`,
92
+ lg: `${S.lg} ${K.lg}`
92
93
  },
93
- tone: ot
94
+ tone: nt
94
95
  },
95
96
  defaultVariants: { size: "md", tone: "default" }
96
97
  }
97
- ), lt = F(
98
+ ), lt = A(
98
99
  [
99
100
  "ds:flex-1 ds:min-w-0 ds:bg-transparent ds:text-foreground",
100
101
  "ds:placeholder:text-muted-foreground",
@@ -109,7 +110,7 @@ const it = {
109
110
  },
110
111
  defaultVariants: { hasStart: !1, hasEnd: !1 }
111
112
  }
112
- ), ut = F(
113
+ ), ut = A(
113
114
  [
114
115
  "ds:z-[var(--z-dropdown)] ds:overflow-hidden",
115
116
  "ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-background",
@@ -120,7 +121,7 @@ const it = {
120
121
  "ds:data-[state=closed]:zoom-out-95",
121
122
  "ds:motion-reduce:animate-none"
122
123
  ].join(" ")
123
- ), ge = F(
124
+ ), me = A(
124
125
  [
125
126
  "ds:relative ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
126
127
  "ds:ps-3 ds:pe-3 ds:py-2 ds:text-[length:var(--font-size-sm)] ds:text-foreground",
@@ -129,111 +130,113 @@ const it = {
129
130
  "ds:data-[selected=true]:bg-primary ds:data-[selected=true]:text-primary-foreground",
130
131
  "ds:hover:bg-muted ds:data-[selected=true]:hover:bg-primary"
131
132
  ].join(" ")
132
- ), he = [
133
+ ), fe = [
133
134
  "ds:[&_[cmdk-group-heading]]:ps-3",
134
135
  "ds:[&_[cmdk-group-heading]]:pe-3",
135
136
  "ds:[&_[cmdk-group-heading]]:py-1.5",
136
137
  "ds:[&_[cmdk-group-heading]]:type-eyebrow",
137
138
  "ds:[&_[cmdk-group-heading]]:text-muted-foreground"
138
- ].join(" "), W = "ds:inline-flex ds:items-center ds:shrink-0 ds:text-muted-foreground ds:[&_svg]:size-4";
139
- function Y(s, l, B) {
140
- return `${s}-${l}-${B}`;
139
+ ].join(" "), X = "ds:inline-flex ds:items-center ds:shrink-0 ds:text-muted-foreground ds:[&_svg]:size-4";
140
+ function J(s, l, F) {
141
+ return `${s}-${l}-${F}`;
141
142
  }
142
- function ve(s, l) {
143
+ function ge(s, l) {
143
144
  return `${s}:${l}`;
144
145
  }
145
- const ct = Ye(
146
+ const ct = We(
146
147
  function({
147
148
  loadOptions: l,
148
- debounceMs: B = 250,
149
- value: Z,
150
- defaultValue: be,
151
- onChange: R,
149
+ debounceMs: F = 250,
150
+ value: he,
151
+ defaultValue: ve,
152
+ onChange: be,
152
153
  onSelect: u,
153
154
  recents: v,
154
- onRecentSelect: M,
155
+ onRecentSelect: B,
155
156
  snapOnBlur: ye = !1,
156
157
  size: we = "md",
157
- tone: ke = "default",
158
- startAdornment: P,
159
- endAdornment: z,
160
- placeholder: ee,
161
- disabled: xe,
158
+ tone: Ce = "default",
159
+ startAdornment: M,
160
+ endAdornment: P,
161
+ placeholder: W,
162
+ disabled: ke,
162
163
  readOnly: b,
163
- required: Ce,
164
+ required: xe,
164
165
  name: Ve,
165
- id: j,
166
- className: Ie,
167
- "aria-label": te
168
- }, k) {
169
- const { t: x, i18n: Ne } = et(), C = tt(), Re = Ze(), g = j ?? C.id ?? Re, se = `${g}-listbox`, Ee = `${g}-live`, h = !!(C.disabled || xe), _e = !!(C.required || Ce), ne = C.invalid, $e = ne ? "error" : ke ?? "default", De = C.describedBy || void 0, U = Z !== void 0, [Te, Ae] = I(
170
- be ?? ""
171
- ), r = U ? Z : Te, [i, d] = I(!1), [y, oe] = I([]), [V, q] = I(!1), [p, Fe] = I(""), E = c(!1), H = c(null), O = c(r), ae = c(/* @__PURE__ */ new Map()), re = c(/* @__PURE__ */ new Map()), Q = c(null), G = c(null), Be = T(
166
+ id: z,
167
+ className: Re,
168
+ "aria-label": Y
169
+ }, C) {
170
+ const { t: k, i18n: Ne } = Ze(), x = et(), Ie = Ye(), g = z ?? x.id ?? Ie, Z = `${g}-listbox`, Ee = `${g}-live`, h = !!(x.disabled || ke), _e = !!(x.required || xe), ee = x.invalid, $e = ee ? "error" : Ce ?? "default", De = x.describedBy || void 0, [Te, te] = tt({
171
+ value: he,
172
+ defaultValue: ve ?? "",
173
+ onChange: be
174
+ }), r = Te ?? "", [i, d] = $(!1), [y, se] = $([]), [V, j] = $(!1), [p, Ae] = $(""), N = c(!1), U = c(null), q = c(r), ne = c(/* @__PURE__ */ new Map()), oe = c(/* @__PURE__ */ new Map()), H = c(null), O = c(null), Fe = D(
172
175
  (e) => {
173
- Q.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
176
+ H.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
174
177
  },
175
- [k]
176
- ), ie = Ne.language;
177
- N(() => {
178
+ [C]
179
+ ), ae = Ne.language;
180
+ R(() => {
178
181
  const e = /* @__PURE__ */ new Map();
179
182
  for (const t of y) e.set(t.value, t);
180
- ae.current = e;
181
- }, [y]), N(() => {
183
+ ne.current = e;
184
+ }, [y]), R(() => {
182
185
  const e = /* @__PURE__ */ new Map();
183
186
  if (v) for (const t of v) e.set(t.value, t);
184
- re.current = e;
187
+ oe.current = e;
185
188
  }, [v]);
186
- const Me = T(
189
+ const Be = D(
187
190
  (e) => {
188
191
  var n;
189
- if (h || b || E.current) return;
190
- (n = H.current) == null || n.abort();
192
+ if (h || b || N.current) return;
193
+ (n = U.current) == null || n.abort();
191
194
  const t = new AbortController();
192
- H.current = t, O.current = e, q(!0), l(e, { signal: t.signal, locale: ie }).then((a) => {
193
- t.signal.aborted || O.current === e && (oe(a), q(!1));
195
+ U.current = t, q.current = e, j(!0), l(e, { signal: t.signal, locale: ae }).then((a) => {
196
+ t.signal.aborted || q.current === e && (se(a), j(!1));
194
197
  }).catch((a) => {
195
- t.signal.aborted || a && typeof a == "object" && "name" in a && a.name === "AbortError" || O.current === e && (oe([]), q(!1));
198
+ t.signal.aborted || a && typeof a == "object" && "name" in a && a.name === "AbortError" || q.current === e && (se([]), j(!1));
196
199
  });
197
200
  },
198
- [h, b, l, ie]
199
- ), w = st(Me, B);
200
- N(() => () => {
201
+ [h, b, l, ae]
202
+ ), w = at(Be, F);
203
+ R(() => () => {
201
204
  var e;
202
- w.cancel(), (e = H.current) == null || e.abort();
205
+ w.cancel(), (e = U.current) == null || e.abort();
203
206
  }, [w]);
204
- const f = T(
207
+ const m = D(
205
208
  (e) => {
206
- U || Ae(e), R == null || R(e);
209
+ te(e);
207
210
  },
208
- [U, R]
209
- ), de = T(
211
+ [te]
212
+ ), re = D(
210
213
  (e) => {
211
214
  const [t, n] = e.split(":");
212
215
  if (!n || t !== "recent" && t !== "option") return null;
213
- const fe = (t === "recent" ? re.current : ae.current).get(n);
214
- return fe ? { kind: t, option: fe } : null;
216
+ const ce = (t === "recent" ? oe.current : ne.current).get(n);
217
+ return ce ? { kind: t, option: ce } : null;
215
218
  },
216
219
  []
217
- ), Pe = (e) => {
218
- f(e), !(h || b) && (i || d(!0), !E.current && w(e));
220
+ ), Me = (e) => {
221
+ m(e), !(h || b) && (i || d(!0), !N.current && w(e));
222
+ }, Pe = (e) => {
223
+ N.current = !0;
219
224
  }, ze = (e) => {
220
- E.current = !0;
221
- }, je = (e) => {
222
- E.current = !1;
225
+ N.current = !1;
223
226
  const t = e.currentTarget.value;
224
227
  w(t);
225
- }, Ue = (e) => {
228
+ }, je = (e) => {
226
229
  h || b || (d(!0), r && w(r));
227
- }, qe = (e) => {
230
+ }, Ue = (e) => {
228
231
  const t = e.relatedTarget;
229
- if (!(t && G.current && G.current.contains(t))) {
232
+ if (!(t && O.current && O.current.contains(t))) {
230
233
  if (ye && p) {
231
- const n = de(p);
232
- n && (f(n.option.label), u == null || u(n.option));
234
+ const n = re(p);
235
+ n && (m(n.option.label), u == null || u(n.option));
233
236
  }
234
237
  d(!1);
235
238
  }
236
- }, He = (e) => {
239
+ }, qe = (e) => {
237
240
  if (!e.nativeEvent.isComposing) {
238
241
  if (e.key === "Escape") {
239
242
  i && (e.preventDefault(), e.stopPropagation(), d(!1));
@@ -244,48 +247,48 @@ const ct = Ye(
244
247
  return;
245
248
  }
246
249
  if (e.key === "Tab" && i && p) {
247
- const t = de(p);
248
- t && (f(t.option.label), u == null || u(t.option), d(!1));
250
+ const t = re(p);
251
+ t && (m(t.option.label), u == null || u(t.option), d(!1));
249
252
  }
250
253
  }
251
- }, le = (e, t) => {
254
+ }, ie = (e, t) => {
252
255
  var n;
253
- f(t.label), e === "recent" ? M == null || M(t) : u == null || u(t), d(!1), (n = Q.current) == null || n.focus();
254
- }, L = (e) => {
256
+ m(t.label), e === "recent" ? B == null || B(t) : u == null || u(t), d(!1), (n = H.current) == null || n.focus();
257
+ }, Q = (e) => {
255
258
  e.preventDefault();
256
- }, _ = !!(v && v.length > 0) && r.length === 0, Oe = S(
257
- () => nt(y),
259
+ }, I = !!(v && v.length > 0) && r.length === 0, He = L(
260
+ () => st(y),
258
261
  [y]
259
- ), Qe = !!P, Ge = !!z || V, Le = dt({
262
+ ), Oe = !!M, Qe = !!P || V, Ge = dt({
260
263
  size: we,
261
264
  tone: $e,
262
- className: Ie
263
- }), Ke = S(() => {
265
+ className: Re
266
+ }), Le = L(() => {
264
267
  if (!p) return;
265
268
  const [e, t] = p.split(":");
266
269
  if (!(!t || e !== "recent" && e !== "option"))
267
- return Y(g, e, t);
268
- }, [p, g]), $ = y.length > 0, ue = !_ && !$ && !V && r.length > 0, ce = V && !$, Se = _ || $ || ue || ce, K = c(r);
269
- N(() => {
270
- K.current = r;
270
+ return J(g, e, t);
271
+ }, [p, g]), E = y.length > 0, de = !I && !E && !V && r.length > 0, le = V && !E, Se = I || E || de || le, G = c(r);
272
+ R(() => {
273
+ G.current = r;
271
274
  }, [r]);
272
- const pe = c(i);
273
- N(() => {
274
- pe.current = i;
275
+ const ue = c(i);
276
+ R(() => {
277
+ ue.current = i;
275
278
  }, [i]);
276
- const Xe = S(
279
+ const Ke = L(
277
280
  () => ({
278
- getValue: () => K.current || null,
279
- getQuery: () => K.current,
280
- getIsOpen: () => pe.current,
281
+ getValue: () => G.current || null,
282
+ getQuery: () => G.current,
283
+ getIsOpen: () => ue.current,
281
284
  setValue: (e) => {
282
- f(e ?? "");
285
+ m(e ?? "");
283
286
  },
284
287
  setQuery: (e) => {
285
- f(e);
288
+ m(e);
286
289
  },
287
290
  clear: () => {
288
- f("");
291
+ m("");
289
292
  },
290
293
  open: () => {
291
294
  d(!0);
@@ -294,65 +297,65 @@ const ct = Ye(
294
297
  d(!1);
295
298
  }
296
299
  }),
297
- [f]
300
+ [m]
298
301
  );
299
- rt(it, Xe, j);
300
- const Je = y.length, We = V ? x("common.loading", "Loading…") : i && r.length > 0 ? x("inputs.autocomplete.results", {
301
- count: Je,
302
+ rt(it, Ke, z);
303
+ const Xe = y.length, Je = V ? k("common.loading", "Loading…") : i && r.length > 0 ? k("inputs.autocomplete.results", {
304
+ count: Xe,
302
305
  defaultValue: "{{count}} results"
303
306
  }) : "";
304
307
  return /* @__PURE__ */ o(
305
- m,
308
+ f,
306
309
  {
307
310
  shouldFilter: !1,
308
311
  value: p,
309
- onValueChange: Fe,
310
- label: te ?? ee,
312
+ onValueChange: Ae,
313
+ label: Y ?? W,
311
314
  className: "ds:w-full",
312
- children: /* @__PURE__ */ D(
313
- A.Root,
315
+ children: /* @__PURE__ */ _(
316
+ T.Root,
314
317
  {
315
318
  open: i && !h && !b && Se,
316
319
  children: [
317
- /* @__PURE__ */ o(A.Anchor, { asChild: !0, children: /* @__PURE__ */ D(
320
+ /* @__PURE__ */ o(T.Anchor, { asChild: !0, children: /* @__PURE__ */ _(
318
321
  "div",
319
322
  {
320
- className: Le,
323
+ className: Ge,
321
324
  "data-component": "autocomplete",
322
- "data-component-id": j,
325
+ "data-component-id": z,
323
326
  "data-disabled": h || void 0,
324
327
  children: [
325
- P ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${W} ds:ps-3`, children: P }) : null,
328
+ M ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${X} ds:ps-3`, children: M }) : null,
326
329
  /* @__PURE__ */ o(
327
- m.Input,
330
+ f.Input,
328
331
  {
329
- ref: Be,
332
+ ref: Fe,
330
333
  id: g,
331
334
  name: Ve,
332
- placeholder: ee,
335
+ placeholder: W,
333
336
  value: r,
334
- onValueChange: Pe,
335
- onFocus: Ue,
336
- onBlur: qe,
337
- onKeyDown: He,
338
- onCompositionStart: ze,
339
- onCompositionEnd: je,
337
+ onValueChange: Me,
338
+ onFocus: je,
339
+ onBlur: Ue,
340
+ onKeyDown: qe,
341
+ onCompositionStart: Pe,
342
+ onCompositionEnd: ze,
340
343
  disabled: h,
341
344
  readOnly: b,
342
345
  required: _e,
343
346
  role: "combobox",
344
347
  "aria-autocomplete": "both",
345
348
  "aria-expanded": i,
346
- "aria-controls": i ? se : void 0,
347
- "aria-activedescendant": Ke,
349
+ "aria-controls": i ? Z : void 0,
350
+ "aria-activedescendant": Le,
348
351
  "aria-describedby": De,
349
- "aria-invalid": ne || void 0,
350
- "aria-label": te,
352
+ "aria-invalid": ee || void 0,
353
+ "aria-label": Y,
351
354
  autoComplete: "off",
352
- className: lt({ hasStart: Qe, hasEnd: Ge })
355
+ className: lt({ hasStart: Oe, hasEnd: Qe })
353
356
  }
354
357
  ),
355
- V ? /* @__PURE__ */ o("span", { className: `${W} ds:pe-3`, "aria-hidden": "true", children: /* @__PURE__ */ o(me, { size: "sm" }) }) : z ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${W} ds:pe-3`, children: z }) : null,
358
+ V ? /* @__PURE__ */ o("span", { className: `${X} ds:pe-3`, "aria-hidden": "true", children: /* @__PURE__ */ o(pe, { size: "sm" }) }) : P ? /* @__PURE__ */ o("span", { "aria-hidden": "true", className: `${X} ds:pe-3`, children: P }) : null,
356
359
  /* @__PURE__ */ o(
357
360
  "span",
358
361
  {
@@ -361,16 +364,16 @@ const ct = Ye(
361
364
  "aria-live": "polite",
362
365
  "aria-atomic": "true",
363
366
  className: "ds:sr-only",
364
- children: We
367
+ children: Je
365
368
  }
366
369
  )
367
370
  ]
368
371
  }
369
372
  ) }),
370
- /* @__PURE__ */ o(A.Portal, { forceMount: !0, children: /* @__PURE__ */ o(
371
- A.Content,
373
+ /* @__PURE__ */ o(T.Portal, { forceMount: !0, children: /* @__PURE__ */ o(
374
+ T.Content,
372
375
  {
373
- ref: G,
376
+ ref: O,
374
377
  forceMount: !0,
375
378
  hidden: !i,
376
379
  side: "bottom",
@@ -381,69 +384,69 @@ const ct = Ye(
381
384
  onPointerDownOutside: (e) => {
382
385
  var n;
383
386
  const t = e.target;
384
- if (t && ((n = Q.current) != null && n.contains(t))) {
387
+ if (t && ((n = H.current) != null && n.contains(t))) {
385
388
  e.preventDefault();
386
389
  return;
387
390
  }
388
391
  d(!1);
389
392
  },
390
393
  onEscapeKeyDown: () => d(!1),
391
- onMouseDown: L,
394
+ onMouseDown: Q,
392
395
  className: ut(),
393
- children: /* @__PURE__ */ D(
394
- m.List,
396
+ children: /* @__PURE__ */ _(
397
+ f.List,
395
398
  {
396
- id: se,
399
+ id: Z,
397
400
  className: "ds:max-h-[min(24rem,var(--radix-popover-content-available-height))] ds:overflow-auto ds:p-1",
398
401
  children: [
399
- _ ? /* @__PURE__ */ o(
400
- m.Group,
402
+ I ? /* @__PURE__ */ o(
403
+ f.Group,
401
404
  {
402
- heading: x("inputs.autocomplete.recent", "Recent"),
403
- className: he,
405
+ heading: k("inputs.autocomplete.recent", "Recent"),
406
+ className: fe,
404
407
  children: (v ?? []).map((e) => /* @__PURE__ */ o(
405
- m.Item,
408
+ f.Item,
406
409
  {
407
- id: Y(g, "recent", e.value),
408
- value: ve("recent", e.value),
410
+ id: J(g, "recent", e.value),
411
+ value: ge("recent", e.value),
409
412
  disabled: e.disabled,
410
- onSelect: () => le("recent", e),
411
- onMouseDown: L,
412
- className: ge(),
413
+ onSelect: () => ie("recent", e),
414
+ onMouseDown: Q,
415
+ className: me(),
413
416
  children: e.label
414
417
  },
415
418
  `recent-${e.value}`
416
419
  ))
417
420
  }
418
421
  ) : null,
419
- ue ? /* @__PURE__ */ o("div", { className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: x("inputs.autocomplete.noResults", "No results") }) : null,
420
- ce ? /* @__PURE__ */ D("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: [
421
- /* @__PURE__ */ o(me, { size: "sm" }),
422
- /* @__PURE__ */ o("span", { children: x("common.loading", "Loading…") })
422
+ de ? /* @__PURE__ */ o("div", { className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: k("inputs.autocomplete.noResults", "No results") }) : null,
423
+ le ? /* @__PURE__ */ _("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)] ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: [
424
+ /* @__PURE__ */ o(pe, { size: "sm" }),
425
+ /* @__PURE__ */ o("span", { children: k("common.loading", "Loading…") })
423
426
  ] }) : null,
424
- !_ && $ ? Oe.map((e, t) => {
427
+ !I && E ? He.map((e, t) => {
425
428
  const n = e.items.map((a) => /* @__PURE__ */ o(
426
- m.Item,
429
+ f.Item,
427
430
  {
428
- id: Y(g, "option", a.value),
429
- value: ve("option", a.value),
431
+ id: J(g, "option", a.value),
432
+ value: ge("option", a.value),
430
433
  disabled: a.disabled,
431
- onSelect: () => le("option", a),
432
- onMouseDown: L,
433
- className: ge(),
434
+ onSelect: () => ie("option", a),
435
+ onMouseDown: Q,
436
+ className: me(),
434
437
  children: a.label
435
438
  },
436
439
  `option-${a.value}`
437
440
  ));
438
441
  return e.group ? /* @__PURE__ */ o(
439
- m.Group,
442
+ f.Group,
440
443
  {
441
444
  heading: e.group,
442
- className: he,
445
+ className: fe,
443
446
  children: n
444
447
  },
445
448
  `group-${e.group}`
446
- ) : /* @__PURE__ */ o(m.Group, { children: n }, `group-${t}`);
449
+ ) : /* @__PURE__ */ o(f.Group, { children: n }, `group-${t}`);
447
450
  }) : null
448
451
  ]
449
452
  }
@@ -463,4 +466,4 @@ export {
463
466
  it as a,
464
467
  dt as b
465
468
  };
466
- //# sourceMappingURL=autocomplete-mOg7WLOh.js.map
469
+ //# sourceMappingURL=autocomplete-BxfabhZ8.js.map
@@ -9,7 +9,7 @@ import { ModuleRegistry as qe, AllCommunityModule as We } from "ag-grid-communit
9
9
  import { B as Ue } from "./button-DD_0Xdmr.js";
10
10
  import { I as P } from "./icon-button-C4CGcYuz.js";
11
11
  import { P as E } from "./popover--derJ_wq.js";
12
- import { C as Je } from "./checkbox-D5EHnB14.js";
12
+ import { C as Je } from "./checkbox-mwbrPZDY.js";
13
13
  import { c as te } from "./createLucideIcon-CrFbzy84.js";
14
14
  import { P as Ze } from "./printer-CeVEWfQq.js";
15
15
  import { F as Xe } from "./file-text-DSNuv2B8.js";
@@ -1012,4 +1012,4 @@ export {
1012
1012
  mt as f,
1013
1013
  aa as u
1014
1014
  };
1015
- //# sourceMappingURL=balance-cell-renderer-DWWtX-VM.js.map
1015
+ //# sourceMappingURL=balance-cell-renderer-DJB6WDPe.js.map