@alfadocs/ui-kit 0.23.0 → 0.25.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.
- package/dist/_chunks/{autocomplete-BxfabhZ8.js → autocomplete-C7xq06bP.js} +40 -40
- package/dist/_chunks/{card-CWzuTLYE.js → card-C353dU-H.js} +21 -13
- package/dist/_chunks/carousel.agent-DnPiqijR.js +1733 -0
- package/dist/_chunks/{contact-card-DTQUMetD.js → contact-card-CjG7c-1q.js} +2 -2
- package/dist/_chunks/description-list-Bsga4IW8.js +309 -0
- package/dist/_chunks/editable-currency-cell-renderer-DJB5MxAI.js +2349 -0
- package/dist/_chunks/locale-picker-BxEUUPW7.js +638 -0
- package/dist/_chunks/{patient-shell-DavGODt9.js → patient-shell-B164drIa.js} +40 -55
- package/dist/_chunks/settings-ca2Yi9R8.js +21 -0
- package/dist/_chunks/sun-Eweh5fvi.js +50 -0
- package/dist/_chunks/{theme-toggle-BswYl0Yp.js → theme-toggle-FrotC2VI.js} +85 -127
- package/dist/_chunks/{timeline-Czeqr3HF.js → timeline-jmd7lfDf.js} +19 -12
- package/dist/_chunks/use-locale-BkCIHujH.js +20 -0
- package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +55 -0
- package/dist/_chunks/{whatsapp-button-CtlLwM3M.js → whatsapp-button-DUjlWGKf.js} +26 -25
- package/dist/_chunks/{workflow-map-712GL-8u.js → workflow-map-BR6txfFX.js} +2 -2
- package/dist/agent-catalog.json +59 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/card/index.js +1 -1
- package/dist/components/carousel/carousel.d.ts +21 -0
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/contact-card/index.js +1 -1
- package/dist/components/data-table/filters/number-filter.d.ts +56 -0
- package/dist/components/data-table/filters/text-filter.d.ts +49 -0
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +25 -21
- package/dist/components/description-list/description-list.d.ts +40 -0
- package/dist/components/description-list/index.d.ts +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/header-settings/index.js +232 -0
- package/dist/components/locale-picker/index.js +7 -0
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/components/whatsapp-button/whatsapp-button.d.ts +14 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/fonts/Lexend-VF-latin-ext.woff2 +0 -0
- package/dist/fonts/Lexend-VF-latin.woff2 +0 -0
- package/dist/fonts/Lexend-VF-vietnamese.woff2 +0 -0
- package/dist/fonts/NotoSansArabic-VF-arabic.woff2 +0 -0
- package/dist/fonts/NotoSansDevanagari-VF-devanagari.woff2 +0 -0
- package/dist/hooks/index.js +29 -28
- package/dist/i18n/config.js +2726 -134
- package/dist/i18n/locales/ar.d.ts +147 -3
- package/dist/i18n/locales/de.d.ts +147 -3
- package/dist/i18n/locales/el.d.ts +147 -3
- package/dist/i18n/locales/es.d.ts +147 -3
- package/dist/i18n/locales/fr.d.ts +147 -3
- package/dist/i18n/locales/hi.d.ts +147 -3
- package/dist/i18n/locales/ja.d.ts +147 -3
- package/dist/i18n/locales/nl.d.ts +147 -3
- package/dist/i18n/locales/pl.d.ts +149 -5
- package/dist/i18n/locales/pt.d.ts +147 -3
- package/dist/i18n/locales/ro.d.ts +147 -3
- package/dist/i18n/locales/ru.d.ts +148 -4
- package/dist/i18n/locales/sq.d.ts +147 -3
- package/dist/i18n/locales/sv.d.ts +147 -3
- package/dist/i18n/locales/tr.d.ts +147 -3
- package/dist/i18n/locales/zh.d.ts +147 -3
- package/dist/i18n/resources.d.ts +294 -6
- package/dist/index.js +512 -507
- package/dist/locales/ar.json +149 -5
- package/dist/locales/de.json +149 -5
- package/dist/locales/el.json +149 -5
- package/dist/locales/en.json +147 -3
- package/dist/locales/es.json +149 -5
- package/dist/locales/fr.json +149 -5
- package/dist/locales/hi.json +149 -5
- package/dist/locales/it.json +147 -3
- package/dist/locales/ja.json +149 -5
- package/dist/locales/nl.json +149 -5
- package/dist/locales/pl.json +151 -7
- package/dist/locales/pt.json +149 -5
- package/dist/locales/ro.json +149 -5
- package/dist/locales/ru.json +150 -6
- package/dist/locales/sq.json +149 -5
- package/dist/locales/sv.json +149 -5
- package/dist/locales/tr.json +149 -5
- package/dist/locales/zh.json +149 -5
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +2 -2
- package/package.json +10 -1
- package/dist/_chunks/carousel.agent-CQPFfppK.js +0 -1696
- package/dist/_chunks/description-list-y7Hk51KI.js +0 -191
- package/dist/_chunks/editable-currency-cell-renderer-1t42gENX.js +0 -1972
- 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
|