@alfadocs/ui-kit 0.23.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 (69) 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.js +2726 -134
  29. package/dist/i18n/locales/ar.d.ts +147 -3
  30. package/dist/i18n/locales/de.d.ts +147 -3
  31. package/dist/i18n/locales/el.d.ts +147 -3
  32. package/dist/i18n/locales/es.d.ts +147 -3
  33. package/dist/i18n/locales/fr.d.ts +147 -3
  34. package/dist/i18n/locales/hi.d.ts +147 -3
  35. package/dist/i18n/locales/ja.d.ts +147 -3
  36. package/dist/i18n/locales/nl.d.ts +147 -3
  37. package/dist/i18n/locales/pl.d.ts +149 -5
  38. package/dist/i18n/locales/pt.d.ts +147 -3
  39. package/dist/i18n/locales/ro.d.ts +147 -3
  40. package/dist/i18n/locales/ru.d.ts +148 -4
  41. package/dist/i18n/locales/sq.d.ts +147 -3
  42. package/dist/i18n/locales/sv.d.ts +147 -3
  43. package/dist/i18n/locales/tr.d.ts +147 -3
  44. package/dist/i18n/locales/zh.d.ts +147 -3
  45. package/dist/i18n/resources.d.ts +294 -6
  46. package/dist/index.js +512 -507
  47. package/dist/locales/ar.json +149 -5
  48. package/dist/locales/de.json +149 -5
  49. package/dist/locales/el.json +149 -5
  50. package/dist/locales/en.json +147 -3
  51. package/dist/locales/es.json +149 -5
  52. package/dist/locales/fr.json +149 -5
  53. package/dist/locales/hi.json +149 -5
  54. package/dist/locales/it.json +147 -3
  55. package/dist/locales/ja.json +149 -5
  56. package/dist/locales/nl.json +149 -5
  57. package/dist/locales/pl.json +151 -7
  58. package/dist/locales/pt.json +149 -5
  59. package/dist/locales/ro.json +149 -5
  60. package/dist/locales/ru.json +150 -6
  61. package/dist/locales/sq.json +149 -5
  62. package/dist/locales/sv.json +149 -5
  63. package/dist/locales/tr.json +149 -5
  64. package/dist/locales/zh.json +149 -5
  65. package/dist/patterns/patient-shell/index.js +1 -1
  66. package/dist/tokens.css +2 -2
  67. package/package.json +10 -1
  68. package/dist/_chunks/editable-currency-cell-renderer-1t42gENX.js +0 -1972
  69. package/dist/_chunks/use-locale-C5rS3Xon.js +0 -71
@@ -1,71 +0,0 @@
1
- import { useState as w, useEffect as d, useRef as h, useCallback as p } from "react";
2
- import "../i18n/config.js";
3
- import i from "i18next";
4
- function E(e) {
5
- const [o, r] = w(() => typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(e).matches);
6
- return d(() => {
7
- if (typeof window > "u" || typeof window.matchMedia != "function")
8
- return;
9
- const t = window.matchMedia(e);
10
- r(t.matches);
11
- const n = (a) => r(a.matches);
12
- return typeof t.addEventListener == "function" ? (t.addEventListener("change", n), () => t.removeEventListener("change", n)) : (t.addListener(n), () => t.removeListener(n));
13
- }, [e]), o;
14
- }
15
- function S(e) {
16
- return e != null && e.current ? e.current : typeof document > "u" ? null : document;
17
- }
18
- function y(e, o) {
19
- const r = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : (
20
- // SSR / jsdom fallback — drop every character that's
21
- // significant in a CSS attribute selector. Conservative but
22
- // robust enough for the test environment.
23
- e.replace(/["'\\[\]]/g, "")
24
- ), t = `[data-error-anchor="${r}"], [name="${r}"], [name$="[${r}]"]`, n = Array.from(o.querySelectorAll(t));
25
- return n.length === 0 ? null : n.find((s) => s.offsetParent !== null) ?? n[0];
26
- }
27
- function M(e, o, r = {}) {
28
- const {
29
- scope: t,
30
- scrollOptions: n = { behavior: "smooth", block: "center" },
31
- focus: a = !0,
32
- skipInitialMount: s = !0
33
- } = r, m = h(!0), c = h(null), u = o.find((l) => !!e[l]) ?? null;
34
- d(() => {
35
- if (m.current && (m.current = !1, s)) {
36
- c.current = u;
37
- return;
38
- }
39
- if (!u) {
40
- c.current = null;
41
- return;
42
- }
43
- if (u === c.current || typeof window > "u") return;
44
- const l = window.requestAnimationFrame(() => {
45
- const g = S(t);
46
- if (!g) return;
47
- const f = y(u, g);
48
- f && (f.scrollIntoView(n), a && f.focus({ preventScroll: !0 }), c.current = u);
49
- });
50
- return () => window.cancelAnimationFrame(l);
51
- }, [u]);
52
- }
53
- function b() {
54
- const [e, o] = w(() => i.language);
55
- d(() => {
56
- const n = (a) => o(a);
57
- return i.on("languageChanged", n), i.language !== e && o(i.language), () => {
58
- i.off("languageChanged", n);
59
- };
60
- }, [e]);
61
- const r = p(async (n) => {
62
- await i.changeLanguage(n);
63
- }, []), t = i.dir(e) === "rtl" ? "rtl" : "ltr";
64
- return { locale: e, dir: t, setLocale: r };
65
- }
66
- export {
67
- E as a,
68
- M as b,
69
- b as u
70
- };
71
- //# sourceMappingURL=use-locale-C5rS3Xon.js.map