@alfadocs/ui-kit 1.78.0 → 1.80.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 (129) hide show
  1. package/dist/_chunks/{address-fields-BUPRs3n-.js → address-fields-GnoSkvh6.js} +2 -2
  2. package/dist/_chunks/{anamnesis-summary-rows-vNDyE5HW.js → anamnesis-summary-rows-lONg-zja.js} +2 -2
  3. package/dist/_chunks/{bishop-score-CdbU9Nl4.js → bishop-score-C5di6oAV.js} +2 -2
  4. package/dist/_chunks/{bmi-calculator-DnfiDh4Q.js → bmi-calculator-BIExHBZV.js} +2 -2
  5. package/dist/_chunks/{booking-Cz_QjIJe.js → booking-By4I_1A-.js} +1766 -1749
  6. package/dist/_chunks/{calendar-appointment-editor-dialog-cvUpUjj-.js → calendar-appointment-editor-dialog-DhTTWgXw.js} +3 -3
  7. package/dist/_chunks/{cycle-calculator-HO3s5InI.js → cycle-calculator-CQkjVSD2.js} +2 -2
  8. package/dist/_chunks/{due-date-calculator-CDWTSblh.js → due-date-calculator-NjTlmoFK.js} +2 -2
  9. package/dist/_chunks/{fetal-weight-CrtBFJl-.js → fetal-weight-Brl3n4LN.js} +2 -2
  10. package/dist/_chunks/{forgot-password-form-BSOZVrZG.js → forgot-password-form-BQPvDS7i.js} +2 -2
  11. package/dist/_chunks/form-field-CyHfOVKF.js +185 -0
  12. package/dist/_chunks/{gestational-age-calculator-CTHeJJdb.js → gestational-age-calculator-Dr9hdDta.js} +2 -2
  13. package/dist/_chunks/{hcg-doubling-BBk-a33g.js → hcg-doubling-K41Wy7LB.js} +2 -2
  14. package/dist/_chunks/{help-me-write-templates-Ds1FY-WY.js → help-me-write-templates-BJSf24xS.js} +2 -2
  15. package/dist/_chunks/key-round-DIgsnJSg.js +21 -0
  16. package/dist/_chunks/{kit-extensions-sNTZWkoo.js → kit-extensions-a0G4COFH.js} +6 -6
  17. package/dist/_chunks/login-dev-card-CvLHj-_N.js +353 -0
  18. package/dist/_chunks/{practice-results-BnY2EkzI.js → practice-results-CtOanuzZ.js} +659 -615
  19. package/dist/_chunks/{pregnancy-dating-JBAUbM40.js → pregnancy-dating-BHvfDxz4.js} +2 -2
  20. package/dist/_chunks/{pregnancy-weight-gain--Bqv6AWu.js → pregnancy-weight-gain-BeQRxwdP.js} +2 -2
  21. package/dist/_chunks/{radiograph-panel.agent-DQh2SX8G.js → radiograph-panel.agent-BQ95uFCd.js} +2 -2
  22. package/dist/_chunks/registration-form-CNBfUduG.js +1337 -0
  23. package/dist/_chunks/reset-password-form-Cf9QPEJu.js +367 -0
  24. package/dist/_chunks/{send-registration-link-form-__DWY62q.js → send-registration-link-form-vTn1HxjA.js} +2 -2
  25. package/dist/_chunks/{task-editor-CRhfwP9T.js → task-editor-Cpw-NmND.js} +2 -2
  26. package/dist/_chunks/{unit-converter-D59L-gkf.js → unit-converter-BH5ueIhT.js} +2 -2
  27. package/dist/_chunks/{voice-control-panel-DQJwe6_Q.js → voice-control-panel-BziKE-KK.js} +2 -2
  28. package/dist/_chunks/{workflow-webhook-action-BvVPZVpG.js → workflow-webhook-action-DulCpCRz.js} +96 -111
  29. package/dist/agent-catalog.json +91 -5
  30. package/dist/agent-i18n/en.json +11 -2
  31. package/dist/components/address-fields/index.js +1 -1
  32. package/dist/components/bishop-score/index.js +1 -1
  33. package/dist/components/bmi-calculator/index.js +1 -1
  34. package/dist/components/booking/booking-types.d.ts +16 -1
  35. package/dist/components/booking/cascade.d.ts +3 -0
  36. package/dist/components/booking/details-form.d.ts +2 -0
  37. package/dist/components/booking/index.js +1 -1
  38. package/dist/components/cycle-calculator/index.js +1 -1
  39. package/dist/components/due-date-calculator/index.js +1 -1
  40. package/dist/components/fetal-weight/index.js +1 -1
  41. package/dist/components/form-field/form-field.d.ts +6 -0
  42. package/dist/components/form-field/index.js +1 -1
  43. package/dist/components/gestational-age-calculator/index.js +1 -1
  44. package/dist/components/hcg-doubling/index.js +1 -1
  45. package/dist/components/index.d.ts +1 -0
  46. package/dist/components/practice-results/index.js +1 -1
  47. package/dist/components/practice-results/practice-results.d.ts +19 -2
  48. package/dist/components/pregnancy-dating/index.js +1 -1
  49. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  50. package/dist/components/radiograph-panel/index.js +1 -1
  51. package/dist/components/rich-text-editor/index.js +1 -1
  52. package/dist/components/task-editor/index.js +1 -1
  53. package/dist/components/unit-converter/index.js +1 -1
  54. package/dist/components/voice-control-panel/index.js +1 -1
  55. package/dist/i18n/locales/ar.d.ts +28 -0
  56. package/dist/i18n/locales/ar.js +30 -2
  57. package/dist/i18n/locales/de.d.ts +28 -0
  58. package/dist/i18n/locales/de.js +30 -2
  59. package/dist/i18n/locales/el.d.ts +28 -0
  60. package/dist/i18n/locales/el.js +30 -2
  61. package/dist/i18n/locales/en.d.ts +28 -0
  62. package/dist/i18n/locales/en.js +29 -1
  63. package/dist/i18n/locales/es.d.ts +28 -0
  64. package/dist/i18n/locales/es.js +30 -2
  65. package/dist/i18n/locales/fr.d.ts +28 -0
  66. package/dist/i18n/locales/fr.js +30 -2
  67. package/dist/i18n/locales/hi.d.ts +28 -0
  68. package/dist/i18n/locales/hi.js +30 -2
  69. package/dist/i18n/locales/it.d.ts +28 -0
  70. package/dist/i18n/locales/it.js +30 -2
  71. package/dist/i18n/locales/ja.d.ts +28 -0
  72. package/dist/i18n/locales/ja.js +30 -2
  73. package/dist/i18n/locales/nl.d.ts +28 -0
  74. package/dist/i18n/locales/nl.js +30 -2
  75. package/dist/i18n/locales/pl.d.ts +28 -0
  76. package/dist/i18n/locales/pl.js +30 -2
  77. package/dist/i18n/locales/pt.d.ts +28 -0
  78. package/dist/i18n/locales/pt.js +30 -2
  79. package/dist/i18n/locales/ro.d.ts +28 -0
  80. package/dist/i18n/locales/ro.js +30 -2
  81. package/dist/i18n/locales/ru.d.ts +28 -0
  82. package/dist/i18n/locales/ru.js +30 -2
  83. package/dist/i18n/locales/sq.d.ts +28 -0
  84. package/dist/i18n/locales/sq.js +30 -2
  85. package/dist/i18n/locales/sv.d.ts +28 -0
  86. package/dist/i18n/locales/sv.js +30 -2
  87. package/dist/i18n/locales/tr.d.ts +28 -0
  88. package/dist/i18n/locales/tr.js +30 -2
  89. package/dist/i18n/locales/zh.d.ts +28 -0
  90. package/dist/i18n/locales/zh.js +30 -2
  91. package/dist/index.js +90 -87
  92. package/dist/locales/ar.json +30 -2
  93. package/dist/locales/de.json +30 -2
  94. package/dist/locales/el.json +30 -2
  95. package/dist/locales/en.json +29 -1
  96. package/dist/locales/es.json +30 -2
  97. package/dist/locales/fr.json +30 -2
  98. package/dist/locales/hi.json +30 -2
  99. package/dist/locales/it.json +30 -2
  100. package/dist/locales/ja.json +30 -2
  101. package/dist/locales/nl.json +30 -2
  102. package/dist/locales/pl.json +30 -2
  103. package/dist/locales/pt.json +30 -2
  104. package/dist/locales/ro.json +30 -2
  105. package/dist/locales/ru.json +30 -2
  106. package/dist/locales/sq.json +30 -2
  107. package/dist/locales/sv.json +30 -2
  108. package/dist/locales/tr.json +30 -2
  109. package/dist/locales/zh.json +30 -2
  110. package/dist/patterns/_shared/password-policy.d.ts +3 -0
  111. package/dist/patterns/anamnesis/index.js +1 -1
  112. package/dist/patterns/calendar/index.js +1 -1
  113. package/dist/patterns/forgot-password-form/index.js +1 -1
  114. package/dist/patterns/help-me-write-templates/index.js +1 -1
  115. package/dist/patterns/login-form/index.js +1 -1
  116. package/dist/patterns/login-form/login-form.d.ts +24 -7
  117. package/dist/patterns/registration-form/index.d.ts +1 -1
  118. package/dist/patterns/registration-form/index.js +1 -1
  119. package/dist/patterns/registration-form/registration-form.d.ts +27 -0
  120. package/dist/patterns/reset-password-form/index.d.ts +3 -0
  121. package/dist/patterns/reset-password-form/index.js +6 -0
  122. package/dist/patterns/reset-password-form/reset-password-form.d.ts +108 -0
  123. package/dist/patterns/send-registration-link-form/index.js +1 -1
  124. package/dist/patterns/workflow-webhook-action/index.js +1 -1
  125. package/dist/tokens.css +1 -1
  126. package/package.json +5 -1
  127. package/dist/_chunks/form-field-Ani72sVY.js +0 -176
  128. package/dist/_chunks/login-dev-card-DRxTPkE9.js +0 -332
  129. package/dist/_chunks/registration-form-xORq2s4p.js +0 -1310
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfadocs/ui-kit",
3
- "version": "1.78.0",
3
+ "version": "1.80.0",
4
4
  "type": "module",
5
5
  "description": "AlfaDocs shared design system — tokens, components, patterns, and translations for platform, booking, and alfascribe.",
6
6
  "license": "BUSL-1.1",
@@ -891,6 +891,10 @@
891
891
  "types": "./dist/patterns/registration-form/index.d.ts",
892
892
  "import": "./dist/patterns/registration-form/index.js"
893
893
  },
894
+ "./patterns/reset-password-form": {
895
+ "types": "./dist/patterns/reset-password-form/index.d.ts",
896
+ "import": "./dist/patterns/reset-password-form/index.js"
897
+ },
894
898
  "./patterns/send-registration-link-form": {
895
899
  "types": "./dist/patterns/send-registration-link-form/index.d.ts",
896
900
  "import": "./dist/patterns/send-registration-link-form/index.js"
@@ -1,176 +0,0 @@
1
- import { jsxs as n, Fragment as Q, jsx as s } from "react/jsx-runtime";
2
- import { forwardRef as X, useId as Y, useState as z, useMemo as D, useRef as E, useCallback as Z } from "react";
3
- import { c as T } from "./index-D2ZczOXr.js";
4
- import { useTranslation as ee } from "react-i18next";
5
- import { F as se } from "./form-field-context-DtiROUJV.js";
6
- import { C as te } from "./circle-alert-rGDZ73Wh.js";
7
- const ne = T("ds:text-start", {
8
- variants: {
9
- orientation: {
10
- vertical: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
11
- horizontal: "ds:grid ds:grid-cols-[minmax(0,var(--form-label-inline-size))_minmax(0,1fr)] ds:items-start ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)]"
12
- },
13
- disabled: {
14
- true: "ds:opacity-50 ds:cursor-not-allowed",
15
- false: ""
16
- }
17
- },
18
- defaultVariants: {
19
- orientation: "vertical",
20
- disabled: !1
21
- }
22
- }), re = T("ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", {
23
- variants: {
24
- orientation: {
25
- vertical: "",
26
- horizontal: "ds:min-w-0"
27
- }
28
- },
29
- defaultVariants: {
30
- orientation: "vertical"
31
- }
32
- }), oe = X(
33
- (V, $) => {
34
- const {
35
- label: m,
36
- labelStart: i,
37
- labelEnd: d,
38
- description: c,
39
- error: r,
40
- announceError: j = !0,
41
- required: u = !1,
42
- optional: L = !1,
43
- orientation: v = "vertical",
44
- disabled: f = !1,
45
- className: P,
46
- children: _,
47
- ...M
48
- } = V, { t: q } = ee("ui"), e = Y(), o = `${e}-help`, a = `${e}-error`, A = `${e}-notice`, b = !!r, [N, G] = z(void 0), y = D(
49
- () => [c ? o : null, r ? a : null].filter(Boolean).join(" "),
50
- [c, r, o, a]
51
- ), F = E(null), U = E([]), [W, I] = z(null), C = Z(
52
- (B) => {
53
- const l = U.current, k = () => {
54
- var w;
55
- const t = (w = F.current) == null ? void 0 : w.getRootNode(), p = (x) => t instanceof Document || t instanceof ShadowRoot ? t.getElementById(x) : null;
56
- if (l.includes(e) || p(e)) {
57
- I(null);
58
- return;
59
- }
60
- const J = [...l].sort((x, K) => {
61
- const h = p(x), g = p(K);
62
- return !h || !g || h === g ? 0 : h.compareDocumentPosition(g) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
63
- });
64
- I(J[0] ?? null);
65
- };
66
- return l.push(B), k(), () => {
67
- const t = l.indexOf(B);
68
- t !== -1 && l.splice(t, 1), k();
69
- };
70
- },
71
- [e]
72
- ), O = typeof m == "string" ? m : void 0, H = D(
73
- () => ({
74
- id: e,
75
- helpId: o,
76
- errorId: a,
77
- describedBy: y,
78
- invalid: b,
79
- required: u,
80
- disabled: f,
81
- label: O,
82
- registerControlId: C,
83
- setNotice: G
84
- }),
85
- [
86
- e,
87
- o,
88
- a,
89
- y,
90
- b,
91
- u,
92
- f,
93
- O,
94
- C
95
- ]
96
- ), R = /* @__PURE__ */ n(Q, { children: [
97
- m,
98
- u && /* @__PURE__ */ s(
99
- "span",
100
- {
101
- "aria-hidden": "true",
102
- className: "ds:text-destructive ds:ms-[var(--spacing-xs)]",
103
- children: "*"
104
- }
105
- ),
106
- L && /* @__PURE__ */ n("span", { className: "ds:text-muted-foreground ds:ms-[var(--spacing-xs)] ds:font-normal", children: [
107
- "(",
108
- q("common.optional", "optional"),
109
- ")"
110
- ] })
111
- ] }), S = !!(i || d);
112
- return /* @__PURE__ */ s(se.Provider, { value: H, children: /* @__PURE__ */ n(
113
- "div",
114
- {
115
- ref: $,
116
- className: ne({ orientation: v, disabled: f, className: P }),
117
- "data-component": "form-field",
118
- ...M,
119
- children: [
120
- /* @__PURE__ */ n(
121
- "label",
122
- {
123
- ref: F,
124
- id: `${e}-label`,
125
- htmlFor: W ?? e,
126
- className: S ? "type-label ds:text-foreground ds:flex ds:items-start ds:gap-[var(--spacing-xs)]" : "type-label ds:text-foreground",
127
- children: [
128
- i ? /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:shrink-0 ds:items-center", children: i }) : null,
129
- i ? " " : null,
130
- S ? /* @__PURE__ */ s("span", { children: R }) : R,
131
- d ? " " : null,
132
- d ? /* @__PURE__ */ s("span", { className: "ds:ms-auto ds:inline-flex ds:shrink-0 ds:items-center", children: d }) : null
133
- ]
134
- }
135
- ),
136
- /* @__PURE__ */ n("div", { className: re({ orientation: v }), children: [
137
- _,
138
- c && /* @__PURE__ */ s("p", { id: o, className: "type-body-sm ds:text-muted-foreground", children: c }),
139
- N && /* @__PURE__ */ s(
140
- "p",
141
- {
142
- id: A,
143
- className: "type-body-sm ds:text-muted-foreground",
144
- children: N
145
- }
146
- ),
147
- r && /* @__PURE__ */ n(
148
- "p",
149
- {
150
- id: a,
151
- role: j ? "alert" : void 0,
152
- "data-slot": "error",
153
- className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
154
- children: [
155
- /* @__PURE__ */ s(
156
- te,
157
- {
158
- "aria-hidden": "true",
159
- className: "ds:size-4 ds:shrink-0"
160
- }
161
- ),
162
- /* @__PURE__ */ s("span", { children: r })
163
- ]
164
- }
165
- )
166
- ] })
167
- ]
168
- }
169
- ) });
170
- }
171
- );
172
- oe.displayName = "FormField";
173
- export {
174
- oe as F
175
- };
176
- //# sourceMappingURL=form-field-Ani72sVY.js.map
@@ -1,332 +0,0 @@
1
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import { forwardRef as cs, useId as N, useState as n, useRef as os, useEffect as ks } from "react";
3
- import { useTranslation as Bs } from "react-i18next";
4
- import { c as E } from "./index-D2ZczOXr.js";
5
- import { i as ds, E as Rs } from "./email-input-C7THAwh2.js";
6
- import { B as ms } from "./button-DohK_Ak_.js";
7
- import { C as v } from "./card-BA4Ig_kn.js";
8
- import { E as As } from "./error-summary-mGxIyDAY.js";
9
- import { F as ls } from "./form-field-Ani72sVY.js";
10
- import { P as Cs } from "./password-input-BokZ_rnT.js";
11
- import { i as us } from "./safe-href-5dbsfbQn.js";
12
- import { u as Ms } from "./use-state-backed-input-DhRQo6gM.js";
13
- import { u as Ss, a as qs, A as Ps, b as js, d as D, E as zs, c as Hs } from "./auth-form-parts-B3GWChvG.js";
14
- import { u as Ds, b as Os, a as Ts } from "./use-registration-submit-CLGHxwoT.js";
15
- import { M as $s } from "./matrix-rain-sDOUUwZp.js";
16
- import { a as _s } from "./error-page-illustration-BdJLuMdV.js";
17
- const T = ["email", "password"], Gs = E(
18
- "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"
19
- ), is = E("ds:w-full ds:max-w-[400px]"), Ws = E(
20
- "ds:flex ds:flex-wrap ds:justify-center ds:gap-x-[var(--spacing-lg)] ds:gap-y-[var(--spacing-lg)]"
21
- ), O = (a) => a && us(a) ? a : void 0, Js = (a) => Object.values(a).some(Boolean), Ks = (a) => T.some((l) => !!a[l]), ns = (a) => T.find((l) => a[l]) ?? (a.form ? "password" : void 0), Qs = cs(
22
- ({
23
- title: a,
24
- description: l,
25
- headingLevel: h = 1,
26
- showLogo: I = !0,
27
- logoMotion: L = "assemble",
28
- children: w,
29
- initialValues: o,
30
- errors: c,
31
- forgotPasswordHref: k,
32
- registerDoctorHref: d,
33
- registerPatientHref: B,
34
- submitLabel: fs,
35
- submitting: gs = !1,
36
- onSubmit: R,
37
- fieldNames: x,
38
- action: ps,
39
- hiddenFields: vs,
40
- devCard: $,
41
- className: hs,
42
- ...ws
43
- }, xs) => {
44
- const { t } = Bs("ui"), _ = N(), A = N(), Fs = N(), C = (s) => `${Fs}-${s}`, u = x !== void 0, [f, M] = n(() => (o == null ? void 0 : o.email) ?? ""), [F, b] = n(""), [bs, G] = n(() => ({ email: !!(o != null && o.email) })), [ys, W] = n(!1), [J, K] = n(
45
- () => c ?? {}
46
- ), Q = (s) => G(
47
- (r) => r[s] ? r : { ...r, [s]: !0 }
48
- ), U = (s) => K(
49
- (r) => r[s] ? { ...r, [s]: void 0 } : r
50
- ), S = os(null), q = os(null), X = Ms(f, S), Y = () => {
51
- b(""), G((s) => ({ ...s, password: !1 }));
52
- }, Z = () => {
53
- var r, p;
54
- const s = {
55
- email: ((r = S.current) == null ? void 0 : r.value) ?? f,
56
- password: ((p = q.current) == null ? void 0 : p.value) ?? F
57
- };
58
- return s.email !== f && M(s.email), s.password !== F && b(s.password), s;
59
- }, V = {
60
- email: !ds(f),
61
- password: F === ""
62
- }, ss = (s) => ys || bs[s] === !0, Ns = {
63
- email: ss("email") && V.email ? t(f === "" ? "loginForm.emailRequired" : "inputs.email.invalid") : void 0,
64
- password: ss("password") && V.password ? t("loginForm.passwordRequired") : void 0
65
- }, y = (s) => J[s] ?? Ns[s], [es] = n(
66
- () => Ks(c ?? {})
67
- ), i = Ds(
68
- T,
69
- y,
70
- es
71
- ), [P, as] = n(() => {
72
- const s = es ? void 0 : ns(c ?? {});
73
- return s ? { target: s } : null;
74
- });
75
- ks(() => {
76
- var s;
77
- P && ((s = (P.target === "email" ? S : q).current) == null || s.focus());
78
- }, [P]);
79
- const rs = Os({
80
- errors: c,
81
- submitting: gs,
82
- native: u,
83
- captcha: !1,
84
- firstProblem: () => {
85
- const s = Z();
86
- return ds(s.email) ? s.password === "" ? "password" : void 0 : "email";
87
- },
88
- onRefused: (s) => {
89
- W(!0), i.open(() => as({ target: s }));
90
- },
91
- // Only a React host gets here: a native post is the browser's own.
92
- deliver: () => R == null ? void 0 : R(Z()),
93
- onAnswer: (s) => {
94
- const r = s;
95
- K(r), Js(r) && (Y(), W(!1), i.open(() => {
96
- const p = ns(r);
97
- p && as({ target: p });
98
- }));
99
- },
100
- // The page came back from the browser's cache as it was left: the
101
- // password must not come back with it.
102
- onRestore: Y
103
- }), { busy: j } = rs, Es = Ss("LoginForm", u, ps), ts = O(k), z = O(d), H = O(B), Is = qs(
104
- "LoginForm",
105
- u,
106
- x,
107
- vs
108
- ), g = J.form, Ls = Ts(
109
- g,
110
- i.listed.length > 0
111
- );
112
- return /* @__PURE__ */ m(
113
- "div",
114
- {
115
- ref: xs,
116
- ...ws,
117
- "data-component": "login-form",
118
- className: Gs({ className: hs }),
119
- children: [
120
- /* @__PURE__ */ e("div", { className: is(), children: /* @__PURE__ */ e(v, { variant: "elevated", className: "ds:h-full", children: /* @__PURE__ */ m(v.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
121
- /* @__PURE__ */ e(
122
- Ps,
123
- {
124
- id: _,
125
- title: a ?? t("loginForm.title"),
126
- description: l,
127
- level: h,
128
- showLogo: I,
129
- logoMotion: L
130
- }
131
- ),
132
- w ? /* @__PURE__ */ e(
133
- "div",
134
- {
135
- "data-slot": "host-content",
136
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
137
- children: w
138
- }
139
- ) : null,
140
- /* @__PURE__ */ m(
141
- "form",
142
- {
143
- noValidate: !0,
144
- method: "post",
145
- action: Es,
146
- "aria-labelledby": _,
147
- "aria-busy": j || void 0,
148
- onSubmit: rs.handleSubmit,
149
- className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
150
- children: [
151
- /* @__PURE__ */ e(
152
- As,
153
- {
154
- ref: i.ref,
155
- headingLevel: h + 1,
156
- "aria-describedby": g ? A : void 0,
157
- errors: i.listed.map((s) => ({
158
- field: s,
159
- message: y(s) ?? "",
160
- targetId: C(s)
161
- }))
162
- }
163
- ),
164
- g && /* @__PURE__ */ e(
165
- js,
166
- {
167
- id: A,
168
- announce: Ls,
169
- children: g
170
- }
171
- ),
172
- /* @__PURE__ */ e(
173
- ls,
174
- {
175
- id: C("email"),
176
- label: t("loginForm.email"),
177
- required: !0,
178
- error: y("email"),
179
- announceError: !i.lists("email"),
180
- "data-field": "email",
181
- children: /* @__PURE__ */ e(
182
- Rs,
183
- {
184
- ref: X.ref,
185
- name: u ? x.email : "email",
186
- autoComplete: "username",
187
- disableBuiltInValidation: !0,
188
- onChange: X.quiet((s) => {
189
- M(s.target.value), U("email");
190
- }),
191
- onBlur: (s) => {
192
- M(s.target.value), s.target.value !== "" && Q("email");
193
- }
194
- }
195
- )
196
- }
197
- ),
198
- /* @__PURE__ */ e(
199
- ls,
200
- {
201
- id: C("password"),
202
- label: t("loginForm.password"),
203
- required: !0,
204
- error: y("password"),
205
- announceError: !i.lists("password"),
206
- "data-field": "password",
207
- children: /* @__PURE__ */ e(
208
- Cs,
209
- {
210
- ref: q,
211
- name: u ? x.password : "password",
212
- autoComplete: "current-password",
213
- "aria-describedby": g ? A : void 0,
214
- value: F,
215
- onChange: (s) => {
216
- b(s.target.value), U("password");
217
- },
218
- onBlur: (s) => {
219
- b(s.target.value), s.target.value !== "" && Q("password");
220
- }
221
- }
222
- )
223
- }
224
- ),
225
- ts && /* @__PURE__ */ e(
226
- D,
227
- {
228
- href: ts,
229
- action: "forgot-password",
230
- align: "end",
231
- children: t("loginForm.forgot")
232
- }
233
- ),
234
- /* @__PURE__ */ e(zs, { fields: Is }),
235
- /* @__PURE__ */ e(
236
- ms,
237
- {
238
- type: "submit",
239
- intent: "primary",
240
- size: "lg",
241
- loading: j,
242
- className: "ds:w-full",
243
- "data-action": "submit",
244
- children: fs ?? t("loginForm.submit")
245
- }
246
- )
247
- ]
248
- }
249
- ),
250
- (z || H) && /* @__PURE__ */ m(
251
- "div",
252
- {
253
- "data-slot": "register-links",
254
- className: Ws(),
255
- children: [
256
- z && /* @__PURE__ */ e(D, { href: z, action: "register-doctor", children: t("signedOutHeader.registerDoctor") }),
257
- H && /* @__PURE__ */ e(D, { href: H, action: "register-patient", children: t("signedOutHeader.registerPatient") })
258
- ]
259
- }
260
- ),
261
- /* @__PURE__ */ e(Hs, { busy: j })
262
- ] }) }) }),
263
- $ ? /* @__PURE__ */ e("div", { className: is(), children: $ }) : null
264
- ]
265
- }
266
- );
267
- }
268
- );
269
- Qs.displayName = "LoginForm";
270
- const Us = E("ds:h-full ds:w-full"), Xs = cs(
271
- ({ title: a, options: l, headingLevel: h = 2, className: I, ...L }, w) => {
272
- const o = N(), c = `h${h}`, k = l.filter((d) => us(d.href));
273
- return /* @__PURE__ */ e(
274
- "div",
275
- {
276
- ref: w,
277
- ...L,
278
- "data-component": "login-dev-card",
279
- className: Us({ className: I }),
280
- children: /* @__PURE__ */ m(
281
- v,
282
- {
283
- variant: "elevated",
284
- "aria-labelledby": o,
285
- className: "ds:relative ds:isolate ds:flex ds:h-full ds:flex-col ds:overflow-hidden",
286
- children: [
287
- /* @__PURE__ */ e("div", { className: "ds:absolute ds:inset-0 ds:z-0 ds:[display:var(--accessible-off,block)]", children: /* @__PURE__ */ e(
288
- $s,
289
- {
290
- glyphs: "hex",
291
- decay: "fast",
292
- mask: "center",
293
- maskRadius: "xl",
294
- className: "ds:size-full"
295
- }
296
- ) }),
297
- /* @__PURE__ */ e(v.Header, { className: "ds:relative ds:z-[1]", children: /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)] ds:text-center", children: [
298
- /* @__PURE__ */ e("div", { className: "ds:[&>div]:w-24", children: /* @__PURE__ */ e(_s, { mood: "melt" }) }),
299
- /* @__PURE__ */ e(
300
- c,
301
- {
302
- id: o,
303
- className: "type-title-card ds:text-[var(--foreground)]",
304
- children: a
305
- }
306
- )
307
- ] }) }),
308
- /* @__PURE__ */ e(v.Body, { className: "ds:relative ds:z-[1] ds:flex ds:flex-1 ds:flex-col ds:justify-center", children: /* @__PURE__ */ e("div", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: k.map((d, B) => /* @__PURE__ */ e(
309
- ms,
310
- {
311
- asChild: !0,
312
- intent: "primary",
313
- startIcon: d.icon,
314
- className: "ds:min-h-[var(--min-target-size)] ds:w-full",
315
- children: /* @__PURE__ */ e("a", { href: d.href, "data-action": "dev-login", children: d.label })
316
- },
317
- `${B}:${d.href}`
318
- )) }) })
319
- ]
320
- }
321
- )
322
- }
323
- );
324
- }
325
- );
326
- Xs.displayName = "LoginDevCard";
327
- export {
328
- T as L,
329
- Xs as a,
330
- Qs as b
331
- };
332
- //# sourceMappingURL=login-dev-card-DRxTPkE9.js.map