@alfadocs/ui-kit 0.21.0 → 0.24.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 (70) hide show
  1. package/dist/_chunks/{autocomplete-BxfabhZ8.js → autocomplete-C7xq06bP.js} +40 -40
  2. package/dist/_chunks/editable-currency-cell-renderer-DJB5MxAI.js +2349 -0
  3. package/dist/_chunks/locale-picker-CYBhgSHR.js +575 -0
  4. package/dist/_chunks/{patient-shell-DavGODt9.js → patient-shell-B164drIa.js} +40 -55
  5. package/dist/_chunks/settings-ca2Yi9R8.js +21 -0
  6. package/dist/_chunks/sun-Eweh5fvi.js +50 -0
  7. package/dist/_chunks/{theme-toggle-BswYl0Yp.js → theme-toggle-FrotC2VI.js} +85 -127
  8. package/dist/_chunks/use-locale-BkCIHujH.js +20 -0
  9. package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +55 -0
  10. package/dist/_chunks/{whatsapp-button-CtlLwM3M.js → whatsapp-button-DUjlWGKf.js} +26 -25
  11. package/dist/agent-catalog.json +59 -1
  12. package/dist/components/autocomplete/index.js +1 -1
  13. package/dist/components/data-table/filters/number-filter.d.ts +56 -0
  14. package/dist/components/data-table/filters/text-filter.d.ts +49 -0
  15. package/dist/components/data-table/index.d.ts +4 -0
  16. package/dist/components/data-table/index.js +25 -21
  17. package/dist/components/header-settings/index.js +205 -0
  18. package/dist/components/locale-picker/index.js +7 -0
  19. package/dist/components/theme-toggle/index.js +1 -1
  20. package/dist/components/whatsapp-button/index.js +1 -1
  21. package/dist/components/whatsapp-button/whatsapp-button.d.ts +14 -1
  22. package/dist/fonts/Lexend-VF-latin-ext.woff2 +0 -0
  23. package/dist/fonts/Lexend-VF-latin.woff2 +0 -0
  24. package/dist/fonts/Lexend-VF-vietnamese.woff2 +0 -0
  25. package/dist/fonts/NotoSansArabic-VF-arabic.woff2 +0 -0
  26. package/dist/fonts/NotoSansDevanagari-VF-devanagari.woff2 +0 -0
  27. package/dist/hooks/index.js +29 -28
  28. package/dist/i18n/config.d.ts +1 -1
  29. package/dist/i18n/config.js +20944 -2110
  30. package/dist/i18n/locales/ar.d.ts +1225 -0
  31. package/dist/i18n/locales/de.d.ts +1225 -0
  32. package/dist/i18n/locales/el.d.ts +1222 -0
  33. package/dist/i18n/locales/es.d.ts +1222 -0
  34. package/dist/i18n/locales/fr.d.ts +1222 -0
  35. package/dist/i18n/locales/hi.d.ts +1222 -0
  36. package/dist/i18n/locales/ja.d.ts +1222 -0
  37. package/dist/i18n/locales/nl.d.ts +1222 -0
  38. package/dist/i18n/locales/pl.d.ts +1222 -0
  39. package/dist/i18n/locales/pt.d.ts +1223 -0
  40. package/dist/i18n/locales/ro.d.ts +1222 -0
  41. package/dist/i18n/locales/ru.d.ts +1222 -0
  42. package/dist/i18n/locales/sq.d.ts +1222 -0
  43. package/dist/i18n/locales/sv.d.ts +1222 -0
  44. package/dist/i18n/locales/tr.d.ts +1222 -0
  45. package/dist/i18n/locales/zh.d.ts +1222 -0
  46. package/dist/i18n/resources.d.ts +342 -1040
  47. package/dist/index.js +512 -507
  48. package/dist/locales/ar.json +1217 -1
  49. package/dist/locales/de.json +207 -13
  50. package/dist/locales/el.json +1217 -0
  51. package/dist/locales/en.json +147 -3
  52. package/dist/locales/es.json +1217 -0
  53. package/dist/locales/fr.json +1217 -0
  54. package/dist/locales/hi.json +1217 -0
  55. package/dist/locales/it.json +178 -3
  56. package/dist/locales/ja.json +1217 -0
  57. package/dist/locales/nl.json +1217 -0
  58. package/dist/locales/pl.json +1217 -0
  59. package/dist/locales/pt.json +1217 -0
  60. package/dist/locales/ro.json +1217 -0
  61. package/dist/locales/ru.json +1217 -0
  62. package/dist/locales/sq.json +1217 -0
  63. package/dist/locales/sv.json +1217 -0
  64. package/dist/locales/tr.json +1217 -0
  65. package/dist/locales/zh.json +1217 -0
  66. package/dist/patterns/patient-shell/index.js +1 -1
  67. package/dist/tokens.css +2 -2
  68. package/package.json +13 -1
  69. package/dist/_chunks/editable-currency-cell-renderer-1t42gENX.js +0 -1972
  70. package/dist/_chunks/use-locale-C5rS3Xon.js +0 -71
@@ -1,5 +1,5 @@
1
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";
2
+ import { forwardRef as We, useId as Ye, useState as $, useRef as c, useCallback as D, useEffect as R, useMemo as G } from "react";
3
3
  import { _ as f } from "./index-4xgbg-sn.js";
4
4
  import * as T from "@radix-ui/react-popover";
5
5
  import { c as A } from "./index-D2ZczOXr.js";
@@ -166,22 +166,22 @@ const ct = We(
166
166
  id: z,
167
167
  className: Re,
168
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({
169
+ }, k) {
170
+ const { t: y, 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
171
  value: he,
172
172
  defaultValue: ve ?? "",
173
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(
174
+ }), r = Te ?? "", [i, d] = $(!1), [w, 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), L = c(null), Fe = D(
175
175
  (e) => {
176
- H.current = e, typeof C == "function" ? C(e) : C && (C.current = e);
176
+ H.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
177
177
  },
178
- [C]
178
+ [k]
179
179
  ), ae = Ne.language;
180
180
  R(() => {
181
181
  const e = /* @__PURE__ */ new Map();
182
- for (const t of y) e.set(t.value, t);
182
+ for (const t of w) e.set(t.value, t);
183
183
  ne.current = e;
184
- }, [y]), R(() => {
184
+ }, [w]), R(() => {
185
185
  const e = /* @__PURE__ */ new Map();
186
186
  if (v) for (const t of v) e.set(t.value, t);
187
187
  oe.current = e;
@@ -199,11 +199,11 @@ const ct = We(
199
199
  });
200
200
  },
201
201
  [h, b, l, ae]
202
- ), w = at(Be, F);
202
+ ), C = at(Be, F);
203
203
  R(() => () => {
204
204
  var e;
205
- w.cancel(), (e = U.current) == null || e.abort();
206
- }, [w]);
205
+ C.cancel(), (e = U.current) == null || e.abort();
206
+ }, [C]);
207
207
  const m = D(
208
208
  (e) => {
209
209
  te(e);
@@ -218,18 +218,18 @@ const ct = We(
218
218
  },
219
219
  []
220
220
  ), Me = (e) => {
221
- m(e), !(h || b) && (i || d(!0), !N.current && w(e));
221
+ m(e), !(h || b) && (i || d(!0), !N.current && C(e));
222
222
  }, Pe = (e) => {
223
223
  N.current = !0;
224
224
  }, ze = (e) => {
225
225
  N.current = !1;
226
226
  const t = e.currentTarget.value;
227
- w(t);
227
+ C(t);
228
228
  }, je = (e) => {
229
- h || b || (d(!0), r && w(r));
229
+ h || b || (d(!0), r && C(r));
230
230
  }, Ue = (e) => {
231
231
  const t = e.relatedTarget;
232
- if (!(t && O.current && O.current.contains(t))) {
232
+ if (!(t && L.current && L.current.contains(t))) {
233
233
  if (ye && p) {
234
234
  const n = re(p);
235
235
  n && (m(n.option.label), u == null || u(n.option));
@@ -243,7 +243,7 @@ const ct = We(
243
243
  return;
244
244
  }
245
245
  if (e.key === "ArrowDown" && !i) {
246
- e.preventDefault(), d(!0), r && w(r);
246
+ e.preventDefault(), d(!0), r && C(r);
247
247
  return;
248
248
  }
249
249
  if (e.key === "Tab" && i && p) {
@@ -254,32 +254,32 @@ const ct = We(
254
254
  }, ie = (e, t) => {
255
255
  var n;
256
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) => {
257
+ }, O = (e) => {
258
258
  e.preventDefault();
259
- }, I = !!(v && v.length > 0) && r.length === 0, He = L(
260
- () => st(y),
261
- [y]
262
- ), Oe = !!M, Qe = !!P || V, Ge = dt({
259
+ }, I = !!(v && v.length > 0) && r.length === 0, He = G(
260
+ () => st(w),
261
+ [w]
262
+ ), Le = !!M, Oe = !!P || V, Qe = dt({
263
263
  size: we,
264
264
  tone: $e,
265
265
  className: Re
266
- }), Le = L(() => {
266
+ }), Ge = G(() => {
267
267
  if (!p) return;
268
268
  const [e, t] = p.split(":");
269
269
  if (!(!t || e !== "recent" && e !== "option"))
270
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);
271
+ }, [p, g]), E = w.length > 0, de = !I && !E && !V && r.length > 0, le = V && !E, Se = I || E || de || le, Q = c(r);
272
272
  R(() => {
273
- G.current = r;
273
+ Q.current = r;
274
274
  }, [r]);
275
275
  const ue = c(i);
276
276
  R(() => {
277
277
  ue.current = i;
278
278
  }, [i]);
279
- const Ke = L(
279
+ const Ke = G(
280
280
  () => ({
281
- getValue: () => G.current || null,
282
- getQuery: () => G.current,
281
+ getValue: () => Q.current || null,
282
+ getQuery: () => Q.current,
283
283
  getIsOpen: () => ue.current,
284
284
  setValue: (e) => {
285
285
  m(e ?? "");
@@ -300,7 +300,7 @@ const ct = We(
300
300
  [m]
301
301
  );
302
302
  rt(it, Ke, z);
303
- const Xe = y.length, Je = V ? k("common.loading", "Loading…") : i && r.length > 0 ? k("inputs.autocomplete.results", {
303
+ const Xe = w.length, Je = V ? y("common.loading", "Loading…") : i && r.length > 0 ? y("inputs.autocomplete.results", {
304
304
  count: Xe,
305
305
  defaultValue: "{{count}} results"
306
306
  }) : "";
@@ -320,7 +320,7 @@ const ct = We(
320
320
  /* @__PURE__ */ o(T.Anchor, { asChild: !0, children: /* @__PURE__ */ _(
321
321
  "div",
322
322
  {
323
- className: Ge,
323
+ className: Qe,
324
324
  "data-component": "autocomplete",
325
325
  "data-component-id": z,
326
326
  "data-disabled": h || void 0,
@@ -347,12 +347,12 @@ const ct = We(
347
347
  "aria-autocomplete": "both",
348
348
  "aria-expanded": i,
349
349
  "aria-controls": i ? Z : void 0,
350
- "aria-activedescendant": Le,
350
+ "aria-activedescendant": Ge,
351
351
  "aria-describedby": De,
352
352
  "aria-invalid": ee || void 0,
353
- "aria-label": Y,
353
+ "aria-label": Y ?? y("inputs.autocomplete.ariaLabel"),
354
354
  autoComplete: "off",
355
- className: lt({ hasStart: Oe, hasEnd: Qe })
355
+ className: lt({ hasStart: Le, hasEnd: Oe })
356
356
  }
357
357
  ),
358
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,
@@ -373,7 +373,7 @@ const ct = We(
373
373
  /* @__PURE__ */ o(T.Portal, { forceMount: !0, children: /* @__PURE__ */ o(
374
374
  T.Content,
375
375
  {
376
- ref: O,
376
+ ref: L,
377
377
  forceMount: !0,
378
378
  hidden: !i,
379
379
  side: "bottom",
@@ -391,7 +391,7 @@ const ct = We(
391
391
  d(!1);
392
392
  },
393
393
  onEscapeKeyDown: () => d(!1),
394
- onMouseDown: Q,
394
+ onMouseDown: O,
395
395
  className: ut(),
396
396
  children: /* @__PURE__ */ _(
397
397
  f.List,
@@ -402,7 +402,7 @@ const ct = We(
402
402
  I ? /* @__PURE__ */ o(
403
403
  f.Group,
404
404
  {
405
- heading: k("inputs.autocomplete.recent", "Recent"),
405
+ heading: y("inputs.autocomplete.recent", "Recent"),
406
406
  className: fe,
407
407
  children: (v ?? []).map((e) => /* @__PURE__ */ o(
408
408
  f.Item,
@@ -411,7 +411,7 @@ const ct = We(
411
411
  value: ge("recent", e.value),
412
412
  disabled: e.disabled,
413
413
  onSelect: () => ie("recent", e),
414
- onMouseDown: Q,
414
+ onMouseDown: O,
415
415
  className: me(),
416
416
  children: e.label
417
417
  },
@@ -419,10 +419,10 @@ const ct = We(
419
419
  ))
420
420
  }
421
421
  ) : null,
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,
422
+ de ? /* @__PURE__ */ o("div", { className: "ds:ps-3 ds:pe-3 ds:py-2 type-body-sm ds:text-muted-foreground", children: y("inputs.autocomplete.noResults", "No results") }) : null,
423
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
424
  /* @__PURE__ */ o(pe, { size: "sm" }),
425
- /* @__PURE__ */ o("span", { children: k("common.loading", "Loading…") })
425
+ /* @__PURE__ */ o("span", { children: y("common.loading", "Loading…") })
426
426
  ] }) : null,
427
427
  !I && E ? He.map((e, t) => {
428
428
  const n = e.items.map((a) => /* @__PURE__ */ o(
@@ -432,7 +432,7 @@ const ct = We(
432
432
  value: ge("option", a.value),
433
433
  disabled: a.disabled,
434
434
  onSelect: () => ie("option", a),
435
- onMouseDown: Q,
435
+ onMouseDown: O,
436
436
  className: me(),
437
437
  children: a.label
438
438
  },
@@ -466,4 +466,4 @@ export {
466
466
  it as a,
467
467
  dt as b
468
468
  };
469
- //# sourceMappingURL=autocomplete-BxfabhZ8.js.map
469
+ //# sourceMappingURL=autocomplete-C7xq06bP.js.map