@alfadocs/ui-kit 1.81.0 → 1.83.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 (85) hide show
  1. package/dist/_chunks/{anamnesis-summary-rows-BYtpwCyn.js → anamnesis-summary-rows-6gMuu0ZK.js} +2 -2
  2. package/dist/_chunks/{balance-badge-cell-NoEPeFdj.js → balance-badge-cell-BHXJS8Ga.js} +2 -2
  3. package/dist/_chunks/booking-dsgiuhKg.js +4304 -0
  4. package/dist/_chunks/{link-cell-renderer-Dwp_DCYT.js → link-cell-renderer-C0ynDik7.js} +2 -2
  5. package/dist/_chunks/login-dev-card-DYwbL5sD.js +385 -0
  6. package/dist/_chunks/{multi-select-IOVnOGlP.js → multi-select-i5MFRpXg.js} +153 -146
  7. package/dist/_chunks/{otp-input-BgEZi0py.js → otp-input-gV1446Dw.js} +70 -70
  8. package/dist/_chunks/{registration-form-e9oYscB7.js → registration-form-DmP3YUfp.js} +2 -2
  9. package/dist/agent-catalog.json +5 -5
  10. package/dist/agent-i18n/en.json +2 -2
  11. package/dist/components/booking/booking-types.d.ts +35 -2
  12. package/dist/components/booking/code-step.d.ts +4 -2
  13. package/dist/components/booking/details-form.d.ts +2 -0
  14. package/dist/components/booking/handover.d.ts +12 -0
  15. package/dist/components/booking/index.js +1 -1
  16. package/dist/components/booking/reserved.d.ts +24 -0
  17. package/dist/components/booking/use-booking-payment.d.ts +3 -1
  18. package/dist/components/data-table/index.js +1 -1
  19. package/dist/components/multi-select/index.js +1 -1
  20. package/dist/components/otp-input/index.js +1 -1
  21. package/dist/components/otp-input/otp-input.d.ts +1 -1
  22. package/dist/components/patient-table/index.js +1 -1
  23. package/dist/i18n/locales/ar.d.ts +8 -0
  24. package/dist/i18n/locales/ar.js +8 -0
  25. package/dist/i18n/locales/de.d.ts +8 -0
  26. package/dist/i18n/locales/de.js +8 -0
  27. package/dist/i18n/locales/el.d.ts +8 -0
  28. package/dist/i18n/locales/el.js +8 -0
  29. package/dist/i18n/locales/en.d.ts +8 -0
  30. package/dist/i18n/locales/en.js +8 -0
  31. package/dist/i18n/locales/es.d.ts +8 -0
  32. package/dist/i18n/locales/es.js +8 -0
  33. package/dist/i18n/locales/fr.d.ts +8 -0
  34. package/dist/i18n/locales/fr.js +8 -0
  35. package/dist/i18n/locales/hi.d.ts +8 -0
  36. package/dist/i18n/locales/hi.js +8 -0
  37. package/dist/i18n/locales/it.d.ts +8 -0
  38. package/dist/i18n/locales/it.js +8 -0
  39. package/dist/i18n/locales/ja.d.ts +8 -0
  40. package/dist/i18n/locales/ja.js +8 -0
  41. package/dist/i18n/locales/nl.d.ts +8 -0
  42. package/dist/i18n/locales/nl.js +8 -0
  43. package/dist/i18n/locales/pl.d.ts +8 -0
  44. package/dist/i18n/locales/pl.js +8 -0
  45. package/dist/i18n/locales/pt.d.ts +8 -0
  46. package/dist/i18n/locales/pt.js +8 -0
  47. package/dist/i18n/locales/ro.d.ts +8 -0
  48. package/dist/i18n/locales/ro.js +8 -0
  49. package/dist/i18n/locales/ru.d.ts +8 -0
  50. package/dist/i18n/locales/ru.js +8 -0
  51. package/dist/i18n/locales/sq.d.ts +8 -0
  52. package/dist/i18n/locales/sq.js +8 -0
  53. package/dist/i18n/locales/sv.d.ts +8 -0
  54. package/dist/i18n/locales/sv.js +8 -0
  55. package/dist/i18n/locales/tr.d.ts +8 -0
  56. package/dist/i18n/locales/tr.js +8 -0
  57. package/dist/i18n/locales/zh.d.ts +8 -0
  58. package/dist/i18n/locales/zh.js +8 -0
  59. package/dist/index.js +8 -8
  60. package/dist/locales/ar.json +8 -0
  61. package/dist/locales/de.json +8 -0
  62. package/dist/locales/el.json +8 -0
  63. package/dist/locales/en.json +8 -0
  64. package/dist/locales/es.json +8 -0
  65. package/dist/locales/fr.json +8 -0
  66. package/dist/locales/hi.json +8 -0
  67. package/dist/locales/it.json +8 -0
  68. package/dist/locales/ja.json +8 -0
  69. package/dist/locales/nl.json +8 -0
  70. package/dist/locales/pl.json +8 -0
  71. package/dist/locales/pt.json +8 -0
  72. package/dist/locales/ro.json +8 -0
  73. package/dist/locales/ru.json +8 -0
  74. package/dist/locales/sq.json +8 -0
  75. package/dist/locales/sv.json +8 -0
  76. package/dist/locales/tr.json +8 -0
  77. package/dist/locales/zh.json +8 -0
  78. package/dist/patterns/anamnesis/index.js +1 -1
  79. package/dist/patterns/login-form/index.js +1 -1
  80. package/dist/patterns/login-form/login-form.d.ts +7 -0
  81. package/dist/patterns/registration-form/index.js +1 -1
  82. package/dist/tokens.css +1 -1
  83. package/package.json +1 -1
  84. package/dist/_chunks/booking-CxrB0e6d.js +0 -4079
  85. package/dist/_chunks/login-dev-card-CvLHj-_N.js +0 -353
@@ -1,353 +0,0 @@
1
- import { jsxs as f, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as ge, useId as M, useState as l, useEffect as le, useRef as ie } from "react";
3
- import { useTranslation as Se } from "react-i18next";
4
- import { c as E } from "./index-D2ZczOXr.js";
5
- import { i as me, E as qe } from "./email-input-C7THAwh2.js";
6
- import { B as pe } from "./button-DohK_Ak_.js";
7
- import { C as Pe } from "./checkbox-BjDv-r3o.js";
8
- import { C as v } from "./card-BA4Ig_kn.js";
9
- import { E as je } from "./error-summary-mGxIyDAY.js";
10
- import { F as ce } from "./form-field-CyHfOVKF.js";
11
- import { P as ze } from "./password-input-BokZ_rnT.js";
12
- import { i as De } from "./is-development-CLUAnsU7.js";
13
- import { i as he } from "./safe-href-5dbsfbQn.js";
14
- import { u as He } from "./use-state-backed-input-DhRQo6gM.js";
15
- import { u as Oe, a as Te, A as $e, b as _e, d as O, E as Ge, c as Ue } from "./auth-form-parts-B3GWChvG.js";
16
- import { u as We, b as Je, a as Ke } from "./use-registration-submit-CLGHxwoT.js";
17
- import { M as Qe } from "./matrix-rain-sDOUUwZp.js";
18
- import { a as Xe } from "./error-page-illustration-BdJLuMdV.js";
19
- const $ = ["email", "password"], Ye = E(
20
- "ds:flex ds:w-full ds:flex-col ds:items-center ds:justify-center ds:gap-[var(--spacing-lg)] ds:text-start ds:text-[var(--foreground)] ds:lg:flex-row ds:lg:items-stretch"
21
- ), ue = E("ds:w-full ds:max-w-[400px]"), Ze = E(
22
- "ds:flex ds:flex-wrap ds:justify-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-lg)]"
23
- ), T = (r) => r && he(r) ? r : void 0, Ve = (r) => Object.values(r).some(Boolean), es = (r) => $.some((i) => !!r[i]), fe = (r) => $.find((i) => r[i]) ?? (r.form ? "password" : void 0), ss = ge(
24
- ({
25
- title: r,
26
- description: i,
27
- headingLevel: b = 1,
28
- showLogo: I = !0,
29
- logoMotion: k = "assemble",
30
- children: w,
31
- initialValues: o,
32
- errors: u,
33
- forgotPasswordHref: L,
34
- showRememberMe: d = !1,
35
- registerDoctorHref: C,
36
- registerPatientHref: ve,
37
- submitLabel: be,
38
- submitting: we = !1,
39
- onSubmit: B,
40
- fieldNames: t,
41
- action: xe,
42
- hiddenFields: Fe,
43
- devCard: _,
44
- className: ye,
45
- ...Me
46
- }, Ee) => {
47
- const { t: n } = Se("ui"), G = M(), R = M(), Ie = M(), A = (e) => `${Ie}-${e}`, m = t !== void 0, [g, N] = l(() => (o == null ? void 0 : o.email) ?? ""), [x, F] = l(""), [U, ke] = l(
48
- () => (o == null ? void 0 : o.rememberMe) === !0
49
- ), S = d || !!(t != null && t.rememberMe), W = m && S && !(t != null && t.rememberMe);
50
- le(() => {
51
- W && De() && console.warn(
52
- "LoginForm: the remember-me box is shown but `fieldNames.rememberMe` is not set, so the server will not read it."
53
- );
54
- }, [W]);
55
- const [Le, J] = l(() => ({ email: !!(o != null && o.email) })), [Ce, K] = l(!1), [Q, X] = l(
56
- () => u ?? {}
57
- ), Y = (e) => J(
58
- (a) => a[e] ? a : { ...a, [e]: !0 }
59
- ), Z = (e) => X(
60
- (a) => a[e] ? { ...a, [e]: void 0 } : a
61
- ), q = ie(null), P = ie(null), V = He(g, q), ee = () => {
62
- F(""), J((e) => ({ ...e, password: !1 }));
63
- }, se = () => {
64
- var a, h;
65
- const e = {
66
- email: ((a = q.current) == null ? void 0 : a.value) ?? g,
67
- password: ((h = P.current) == null ? void 0 : h.value) ?? x,
68
- rememberMe: S && U
69
- };
70
- return e.email !== g && N(e.email), e.password !== x && F(e.password), e;
71
- }, re = {
72
- email: !me(g),
73
- password: x === ""
74
- }, ae = (e) => Ce || Le[e] === !0, Be = {
75
- email: ae("email") && re.email ? n(g === "" ? "loginForm.emailRequired" : "inputs.email.invalid") : void 0,
76
- password: ae("password") && re.password ? n("loginForm.passwordRequired") : void 0
77
- }, y = (e) => Q[e] ?? Be[e], [oe] = l(
78
- () => es(u ?? {})
79
- ), c = We(
80
- $,
81
- y,
82
- oe
83
- ), [j, te] = l(() => {
84
- const e = oe ? void 0 : fe(u ?? {});
85
- return e ? { target: e } : null;
86
- });
87
- le(() => {
88
- var e;
89
- j && ((e = (j.target === "email" ? q : P).current) == null || e.focus());
90
- }, [j]);
91
- const ne = Je({
92
- errors: u,
93
- submitting: we,
94
- native: m,
95
- captcha: !1,
96
- firstProblem: () => {
97
- const e = se();
98
- return me(e.email) ? e.password === "" ? "password" : void 0 : "email";
99
- },
100
- onRefused: (e) => {
101
- K(!0), c.open(() => te({ target: e }));
102
- },
103
- // Only a React host gets here: a native post is the browser's own.
104
- deliver: () => B == null ? void 0 : B(se()),
105
- onAnswer: (e) => {
106
- const a = e;
107
- X(a), Ve(a) && (ee(), K(!1), c.open(() => {
108
- const h = fe(a);
109
- h && te({ target: h });
110
- }));
111
- },
112
- // The page came back from the browser's cache as it was left: the
113
- // password must not come back with it.
114
- onRestore: ee
115
- }), { busy: z } = ne, Re = Oe("LoginForm", m, xe), de = T(L), D = T(C), H = T(ve), Ae = Te(
116
- "LoginForm",
117
- m,
118
- t,
119
- Fe
120
- ), p = Q.form, Ne = Ke(
121
- p,
122
- c.listed.length > 0
123
- );
124
- return /* @__PURE__ */ f(
125
- "div",
126
- {
127
- ref: Ee,
128
- ...Me,
129
- "data-component": "login-form",
130
- className: Ye({ className: ye }),
131
- children: [
132
- /* @__PURE__ */ s("div", { className: ue(), children: /* @__PURE__ */ s(v, { variant: "elevated", className: "ds:h-full", children: /* @__PURE__ */ f(v.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
133
- /* @__PURE__ */ s(
134
- $e,
135
- {
136
- id: G,
137
- title: r ?? n("loginForm.title"),
138
- description: i,
139
- level: b,
140
- showLogo: I,
141
- logoMotion: k
142
- }
143
- ),
144
- w ? /* @__PURE__ */ s(
145
- "div",
146
- {
147
- "data-slot": "host-content",
148
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
149
- children: w
150
- }
151
- ) : null,
152
- /* @__PURE__ */ f(
153
- "form",
154
- {
155
- noValidate: !0,
156
- method: "post",
157
- action: Re,
158
- "aria-labelledby": G,
159
- "aria-busy": z || void 0,
160
- onSubmit: ne.handleSubmit,
161
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
162
- children: [
163
- /* @__PURE__ */ s(
164
- je,
165
- {
166
- ref: c.ref,
167
- headingLevel: b + 1,
168
- "aria-describedby": p ? R : void 0,
169
- errors: c.listed.map((e) => ({
170
- field: e,
171
- message: y(e) ?? "",
172
- targetId: A(e)
173
- }))
174
- }
175
- ),
176
- p && /* @__PURE__ */ s(
177
- _e,
178
- {
179
- id: R,
180
- announce: Ne,
181
- children: p
182
- }
183
- ),
184
- /* @__PURE__ */ s(
185
- ce,
186
- {
187
- id: A("email"),
188
- label: n("loginForm.email"),
189
- required: !0,
190
- error: y("email"),
191
- announceError: !c.lists("email"),
192
- "data-field": "email",
193
- children: /* @__PURE__ */ s(
194
- qe,
195
- {
196
- ref: V.ref,
197
- name: m ? t.email : "email",
198
- autoComplete: "username",
199
- disableBuiltInValidation: !0,
200
- onChange: V.quiet((e) => {
201
- N(e.target.value), Z("email");
202
- }),
203
- onBlur: (e) => {
204
- N(e.target.value), e.target.value !== "" && Y("email");
205
- }
206
- }
207
- )
208
- }
209
- ),
210
- /* @__PURE__ */ s(
211
- ce,
212
- {
213
- id: A("password"),
214
- label: n("loginForm.password"),
215
- required: !0,
216
- error: y("password"),
217
- announceError: !c.lists("password"),
218
- "data-field": "password",
219
- children: /* @__PURE__ */ s(
220
- ze,
221
- {
222
- ref: P,
223
- name: m ? t.password : "password",
224
- autoComplete: "current-password",
225
- "aria-describedby": p ? R : void 0,
226
- value: x,
227
- onChange: (e) => {
228
- F(e.target.value), Z("password");
229
- },
230
- onBlur: (e) => {
231
- F(e.target.value), e.target.value !== "" && Y("password");
232
- }
233
- }
234
- )
235
- }
236
- ),
237
- de && /* @__PURE__ */ s(
238
- O,
239
- {
240
- href: de,
241
- action: "forgot-password",
242
- align: "end",
243
- children: n("loginForm.forgot")
244
- }
245
- ),
246
- S && /* @__PURE__ */ s("div", { "data-field": "remember-me", children: /* @__PURE__ */ s(
247
- Pe,
248
- {
249
- name: m && t.rememberMe || "rememberMe",
250
- checked: U,
251
- onCheckedChange: (e) => ke(e === !0),
252
- label: n("loginForm.rememberMe")
253
- }
254
- ) }),
255
- /* @__PURE__ */ s(Ge, { fields: Ae }),
256
- /* @__PURE__ */ s(
257
- pe,
258
- {
259
- type: "submit",
260
- intent: "primary",
261
- size: "lg",
262
- loading: z,
263
- className: "ds:w-full",
264
- "data-action": "submit",
265
- children: be ?? n("loginForm.submit")
266
- }
267
- )
268
- ]
269
- }
270
- ),
271
- (D || H) && /* @__PURE__ */ f(
272
- "div",
273
- {
274
- "data-slot": "register-links",
275
- className: Ze(),
276
- children: [
277
- D && /* @__PURE__ */ s(O, { href: D, action: "register-doctor", children: n("signedOutHeader.registerDoctor") }),
278
- H && /* @__PURE__ */ s(O, { href: H, action: "register-patient", children: n("signedOutHeader.registerPatient") })
279
- ]
280
- }
281
- ),
282
- /* @__PURE__ */ s(Ue, { busy: z })
283
- ] }) }) }),
284
- _ ? /* @__PURE__ */ s("div", { className: ue(), children: _ }) : null
285
- ]
286
- }
287
- );
288
- }
289
- );
290
- ss.displayName = "LoginForm";
291
- const rs = E("ds:h-full ds:w-full"), as = ge(
292
- ({ title: r, options: i, headingLevel: b = 2, className: I, ...k }, w) => {
293
- const o = M(), u = `h${b}`, L = i.filter((d) => he(d.href));
294
- return /* @__PURE__ */ s(
295
- "div",
296
- {
297
- ref: w,
298
- ...k,
299
- "data-component": "login-dev-card",
300
- className: rs({ className: I }),
301
- children: /* @__PURE__ */ f(
302
- v,
303
- {
304
- variant: "elevated",
305
- "aria-labelledby": o,
306
- className: "ds:relative ds:isolate ds:flex ds:h-full ds:flex-col ds:overflow-hidden",
307
- children: [
308
- /* @__PURE__ */ s("div", { className: "ds:absolute ds:inset-0 ds:z-0 ds:[display:var(--accessible-off,block)]", children: /* @__PURE__ */ s(
309
- Qe,
310
- {
311
- glyphs: "hex",
312
- decay: "fast",
313
- mask: "center",
314
- maskRadius: "xl",
315
- className: "ds:size-full"
316
- }
317
- ) }),
318
- /* @__PURE__ */ s(v.Header, { className: "ds:relative ds:z-[1]", children: /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center", children: [
319
- /* @__PURE__ */ s("div", { className: "ds:[&>div]:w-24", children: /* @__PURE__ */ s(Xe, { mood: "melt" }) }),
320
- /* @__PURE__ */ s(
321
- u,
322
- {
323
- id: o,
324
- className: "type-title-card ds:text-[var(--foreground)]",
325
- children: r
326
- }
327
- )
328
- ] }) }),
329
- /* @__PURE__ */ s(v.Body, { className: "ds:relative ds:z-[1] ds:flex ds:flex-1 ds:flex-col ds:justify-center", children: /* @__PURE__ */ s("div", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: L.map((d, C) => /* @__PURE__ */ s(
330
- pe,
331
- {
332
- asChild: !0,
333
- intent: "primary",
334
- startIcon: d.icon,
335
- className: "ds:min-h-[var(--min-target-size)] ds:w-full",
336
- children: /* @__PURE__ */ s("a", { href: d.href, "data-action": "dev-login", children: d.label })
337
- },
338
- `${C}:${d.href}`
339
- )) }) })
340
- ]
341
- }
342
- )
343
- }
344
- );
345
- }
346
- );
347
- as.displayName = "LoginDevCard";
348
- export {
349
- $ as L,
350
- as as a,
351
- ss as b
352
- };
353
- //# sourceMappingURL=login-dev-card-CvLHj-_N.js.map