@alfadocs/ui-kit 1.28.3 → 1.30.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/{anamnesis-summary-rows-DwjqZgR5.js → anamnesis-summary-rows-DMO3MWSt.js} +2 -2
- package/dist/_chunks/{booking-BtSOKjQu.js → booking-AabCk7CI.js} +1205 -1148
- package/dist/_chunks/{sparkline-BmGcEyZO.js → sparkline-Dx_sxK3J.js} +228 -198
- package/dist/_chunks/use-zoom-drilldown-qCX34w9I.js +210 -0
- package/dist/agent-catalog.json +5 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/booking/booking-types.d.ts +15 -0
- package/dist/components/booking/details-form.d.ts +7 -0
- package/dist/components/booking/index.js +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/sparkline/index.js +1 -1
- package/dist/components/sparkline/sparkline.d.ts +6 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +56 -54
- package/dist/hooks/use-zoom-drilldown.d.ts +23 -0
- package/dist/host-compat.css +4 -1
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.js +4 -0
- package/dist/i18n/locales/de.d.ts +4 -0
- package/dist/i18n/locales/de.js +4 -0
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.js +4 -0
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.js +4 -0
- package/dist/i18n/locales/es.d.ts +4 -0
- package/dist/i18n/locales/es.js +4 -0
- package/dist/i18n/locales/fr.d.ts +4 -0
- package/dist/i18n/locales/fr.js +4 -0
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.js +4 -0
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.js +4 -0
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.js +4 -0
- package/dist/i18n/locales/nl.d.ts +4 -0
- package/dist/i18n/locales/nl.js +4 -0
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.js +4 -0
- package/dist/i18n/locales/pt.d.ts +4 -0
- package/dist/i18n/locales/pt.js +4 -0
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.js +4 -0
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.js +4 -0
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.js +4 -0
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.js +4 -0
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.js +4 -0
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.js +4 -0
- package/dist/index.js +1072 -1070
- package/dist/locales/ar.json +4 -0
- package/dist/locales/de.json +4 -0
- package/dist/locales/el.json +4 -0
- package/dist/locales/en.json +4 -0
- package/dist/locales/es.json +4 -0
- package/dist/locales/fr.json +4 -0
- package/dist/locales/hi.json +4 -0
- package/dist/locales/it.json +4 -0
- package/dist/locales/ja.json +4 -0
- package/dist/locales/nl.json +4 -0
- package/dist/locales/pl.json +4 -0
- package/dist/locales/pt.json +4 -0
- package/dist/locales/ro.json +4 -0
- package/dist/locales/ru.json +4 -0
- package/dist/locales/sq.json +4 -0
- package/dist/locales/sv.json +4 -0
- package/dist/locales/tr.json +4 -0
- package/dist/locales/zh.json +4 -0
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/use-signing-session-CyOZWinp.js +0 -147
package/package.json
CHANGED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
import { useRef as E, useEffect as B, useState as h, useMemo as I, useCallback as g } from "react";
|
|
2
|
-
function R(o) {
|
|
3
|
-
return o != null && o.current ? o.current : typeof document > "u" ? null : document;
|
|
4
|
-
}
|
|
5
|
-
function T(o, s) {
|
|
6
|
-
const r = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(o) : (
|
|
7
|
-
// SSR / jsdom fallback — drop every character that's
|
|
8
|
-
// significant in a CSS attribute selector. Conservative but
|
|
9
|
-
// robust enough for the test environment.
|
|
10
|
-
o.replace(/["'\\[\]]/g, "")
|
|
11
|
-
), c = `[data-error-anchor="${r}"], [name="${r}"], [name$="[${r}]"]`, l = Array.from(s.querySelectorAll(c));
|
|
12
|
-
return l.length === 0 ? null : l.find((f) => f.offsetParent !== null) ?? l[0];
|
|
13
|
-
}
|
|
14
|
-
function q(o, s, r = {}) {
|
|
15
|
-
const {
|
|
16
|
-
scope: c,
|
|
17
|
-
scrollOptions: l = { behavior: "smooth", block: "center" },
|
|
18
|
-
focus: p = !0,
|
|
19
|
-
skipInitialMount: f = !0
|
|
20
|
-
} = r, t = E(!1), a = E(null), i = s.find((m) => !!o[m]) ?? null;
|
|
21
|
-
B(() => {
|
|
22
|
-
if (f && !t.current) {
|
|
23
|
-
t.current = !0, a.current = i;
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
if (!i) {
|
|
27
|
-
a.current = null;
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
if (i === a.current || typeof window > "u") return;
|
|
31
|
-
const m = window.requestAnimationFrame(() => {
|
|
32
|
-
const F = R(c);
|
|
33
|
-
if (!F) return;
|
|
34
|
-
const S = T(i, F);
|
|
35
|
-
S && (S.scrollIntoView(l), p && S.focus({ preventScroll: !0 }), a.current = i);
|
|
36
|
-
});
|
|
37
|
-
return () => window.cancelAnimationFrame(m);
|
|
38
|
-
}, [i]);
|
|
39
|
-
}
|
|
40
|
-
function k(o, s = !1) {
|
|
41
|
-
const r = {};
|
|
42
|
-
for (const c of o)
|
|
43
|
-
r[c.id] = { signed: s ? !1 : !!c.signed };
|
|
44
|
-
return r;
|
|
45
|
-
}
|
|
46
|
-
function M(o) {
|
|
47
|
-
const [s, r] = h(
|
|
48
|
-
() => k(o)
|
|
49
|
-
), [c, l] = h(null), [p, f] = h(
|
|
50
|
-
() => {
|
|
51
|
-
var n;
|
|
52
|
-
return ((n = o[0]) == null ? void 0 : n.id) ?? null;
|
|
53
|
-
}
|
|
54
|
-
), t = I(
|
|
55
|
-
() => o.map((n) => {
|
|
56
|
-
const e = s[n.id];
|
|
57
|
-
return {
|
|
58
|
-
...n,
|
|
59
|
-
signed: e ? e.signed : !!n.signed,
|
|
60
|
-
payload: e == null ? void 0 : e.payload
|
|
61
|
-
};
|
|
62
|
-
}),
|
|
63
|
-
[o, s]
|
|
64
|
-
), a = I(
|
|
65
|
-
() => t.reduce((n, e) => e.signed ? n + 1 : n, 0),
|
|
66
|
-
[t]
|
|
67
|
-
), i = t.length, m = i > 0 && a === i, F = g((n) => {
|
|
68
|
-
l(n);
|
|
69
|
-
}, []), S = g(() => {
|
|
70
|
-
l(null);
|
|
71
|
-
}, []), v = g((n, e) => {
|
|
72
|
-
r((u) => ({ ...u, [n]: { signed: !0, payload: e } })), l((u) => u === n ? null : u);
|
|
73
|
-
}, []), w = g(
|
|
74
|
-
(n) => {
|
|
75
|
-
var e;
|
|
76
|
-
return !!((e = s[n]) != null && e.signed);
|
|
77
|
-
},
|
|
78
|
-
[s]
|
|
79
|
-
), y = g(() => {
|
|
80
|
-
var n;
|
|
81
|
-
r(k(o, !0)), l(null), f(((n = o[0]) == null ? void 0 : n.id) ?? null);
|
|
82
|
-
}, [o]), C = g(() => {
|
|
83
|
-
f((n) => {
|
|
84
|
-
const e = t.length;
|
|
85
|
-
if (e === 0) return null;
|
|
86
|
-
const u = n ? t.findIndex((d) => d.id === n) : -1;
|
|
87
|
-
return t[(u + 1 + e) % e].id;
|
|
88
|
-
});
|
|
89
|
-
}, [t]), x = g(() => {
|
|
90
|
-
f((n) => {
|
|
91
|
-
const e = t.length;
|
|
92
|
-
if (e === 0) return null;
|
|
93
|
-
const u = n ? t.findIndex((d) => d.id === n) : 0;
|
|
94
|
-
return t[(u - 1 + e) % e].id;
|
|
95
|
-
});
|
|
96
|
-
}, [t]), b = g(() => {
|
|
97
|
-
f((n) => {
|
|
98
|
-
const e = t.length;
|
|
99
|
-
if (e === 0) return n;
|
|
100
|
-
const u = n ? t.findIndex((d) => d.id === n) : -1;
|
|
101
|
-
for (let d = 1; d <= e; d += 1) {
|
|
102
|
-
const A = t[(u + d) % e];
|
|
103
|
-
if (!A.signed) return A.id;
|
|
104
|
-
}
|
|
105
|
-
return n;
|
|
106
|
-
});
|
|
107
|
-
}, [t]);
|
|
108
|
-
return I(
|
|
109
|
-
() => ({
|
|
110
|
-
fields: t,
|
|
111
|
-
signedCount: a,
|
|
112
|
-
total: i,
|
|
113
|
-
isComplete: m,
|
|
114
|
-
activeFieldId: c,
|
|
115
|
-
openField: F,
|
|
116
|
-
closeField: S,
|
|
117
|
-
markSigned: v,
|
|
118
|
-
isFieldSigned: w,
|
|
119
|
-
reset: y,
|
|
120
|
-
cursorFieldId: p,
|
|
121
|
-
goToNextField: C,
|
|
122
|
-
goToPreviousField: x,
|
|
123
|
-
goToNextUnsigned: b
|
|
124
|
-
}),
|
|
125
|
-
[
|
|
126
|
-
t,
|
|
127
|
-
a,
|
|
128
|
-
i,
|
|
129
|
-
m,
|
|
130
|
-
c,
|
|
131
|
-
F,
|
|
132
|
-
S,
|
|
133
|
-
v,
|
|
134
|
-
w,
|
|
135
|
-
y,
|
|
136
|
-
p,
|
|
137
|
-
C,
|
|
138
|
-
x,
|
|
139
|
-
b
|
|
140
|
-
]
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
export {
|
|
144
|
-
M as a,
|
|
145
|
-
q as u
|
|
146
|
-
};
|
|
147
|
-
//# sourceMappingURL=use-signing-session-CyOZWinp.js.map
|