@alfadocs/ui-kit 1.69.0 → 1.71.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/auth-form-parts-DHv6LVV2.js +98 -0
- package/dist/_chunks/{forgot-password-form-Dqi7R-NL.js → forgot-password-form-BGPc8TGr.js} +2 -2
- package/dist/_chunks/login-dev-card-CWpoTuVY.js +332 -0
- package/dist/_chunks/workflow-webhook-action-D6K7Jgc2.js +832 -0
- package/dist/agent-catalog.json +20 -2
- package/dist/agent-i18n/en.json +3 -1
- package/dist/i18n/locales/ar.d.ts +13 -1
- package/dist/i18n/locales/ar.js +13 -1
- package/dist/i18n/locales/de.d.ts +13 -1
- package/dist/i18n/locales/de.js +13 -1
- package/dist/i18n/locales/el.d.ts +13 -1
- package/dist/i18n/locales/el.js +13 -1
- package/dist/i18n/locales/en.d.ts +13 -1
- package/dist/i18n/locales/en.js +13 -1
- package/dist/i18n/locales/es.d.ts +13 -1
- package/dist/i18n/locales/es.js +13 -1
- package/dist/i18n/locales/fr.d.ts +13 -1
- package/dist/i18n/locales/fr.js +13 -1
- package/dist/i18n/locales/hi.d.ts +13 -1
- package/dist/i18n/locales/hi.js +13 -1
- package/dist/i18n/locales/it.d.ts +13 -1
- package/dist/i18n/locales/it.js +13 -1
- package/dist/i18n/locales/ja.d.ts +13 -1
- package/dist/i18n/locales/ja.js +13 -1
- package/dist/i18n/locales/nl.d.ts +13 -1
- package/dist/i18n/locales/nl.js +13 -1
- package/dist/i18n/locales/pl.d.ts +13 -1
- package/dist/i18n/locales/pl.js +13 -1
- package/dist/i18n/locales/pt.d.ts +13 -1
- package/dist/i18n/locales/pt.js +13 -1
- package/dist/i18n/locales/ro.d.ts +13 -1
- package/dist/i18n/locales/ro.js +13 -1
- package/dist/i18n/locales/ru.d.ts +13 -1
- package/dist/i18n/locales/ru.js +13 -1
- package/dist/i18n/locales/sq.d.ts +13 -1
- package/dist/i18n/locales/sq.js +13 -1
- package/dist/i18n/locales/sv.d.ts +13 -1
- package/dist/i18n/locales/sv.js +13 -1
- package/dist/i18n/locales/tr.d.ts +13 -1
- package/dist/i18n/locales/tr.js +13 -1
- package/dist/i18n/locales/zh.d.ts +13 -1
- package/dist/i18n/locales/zh.js +13 -1
- package/dist/index.js +3 -3
- package/dist/locales/ar.json +13 -1
- package/dist/locales/de.json +13 -1
- package/dist/locales/el.json +13 -1
- package/dist/locales/en.json +13 -1
- package/dist/locales/es.json +13 -1
- package/dist/locales/fr.json +13 -1
- package/dist/locales/hi.json +13 -1
- package/dist/locales/it.json +13 -1
- package/dist/locales/ja.json +13 -1
- package/dist/locales/nl.json +13 -1
- package/dist/locales/pl.json +13 -1
- package/dist/locales/pt.json +13 -1
- package/dist/locales/ro.json +13 -1
- package/dist/locales/ru.json +13 -1
- package/dist/locales/sq.json +13 -1
- package/dist/locales/sv.json +13 -1
- package/dist/locales/tr.json +13 -1
- package/dist/locales/zh.json +13 -1
- package/dist/patterns/_shared/auth-form-parts.d.ts +4 -3
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/login-form/login-form.d.ts +6 -2
- package/dist/patterns/workflow-webhook-action/index.d.ts +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/workflow-webhook-action.d.ts +29 -3
- package/package.json +1 -1
- package/dist/_chunks/auth-form-parts-B40zvD-a.js +0 -86
- package/dist/_chunks/login-dev-card-vEL-o5wq.js +0 -309
- package/dist/_chunks/workflow-webhook-action-Ct8tFYi7.js +0 -691
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsxs as m, jsx as r, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as f, forwardRef as h } from "react";
|
|
3
|
+
import { c as l } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as g } from "react-i18next";
|
|
5
|
+
import { A as c } from "./alert-9kEwDza3.js";
|
|
6
|
+
import { i as u } from "./is-development-CLUAnsU7.js";
|
|
7
|
+
import { a as p } from "./safe-href-5dbsfbQn.js";
|
|
8
|
+
import { B as b } from "./use-registration-submit-eWAECgUC.js";
|
|
9
|
+
const x = "Alfadocs", w = l(
|
|
10
|
+
"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
centred: { true: "ds:items-center ds:text-center", false: "" }
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: { centred: !0 }
|
|
16
|
+
}
|
|
17
|
+
), A = l(
|
|
18
|
+
"ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
19
|
+
), N = l(
|
|
20
|
+
'type-body-sm ds:relative ds:rounded-[var(--radius-sm)] ds:underline ds:underline-offset-4 ds:text-[var(--foreground)] ds:before:absolute ds:before:inset-x-0 ds:before:inset-y-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)] ds:forced-colors:focus-visible:outline-[CanvasText]',
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
/** Centred under a button, or at the end edge under a field. */
|
|
24
|
+
align: { center: "ds:self-center", end: "ds:self-end" }
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: { align: "center" }
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
function B({
|
|
30
|
+
href: e,
|
|
31
|
+
action: s,
|
|
32
|
+
align: t,
|
|
33
|
+
children: a
|
|
34
|
+
}) {
|
|
35
|
+
return /* @__PURE__ */ r("a", { href: e, "data-action": s, className: N({ align: t }), children: a });
|
|
36
|
+
}
|
|
37
|
+
function S({
|
|
38
|
+
id: e,
|
|
39
|
+
title: s,
|
|
40
|
+
description: t,
|
|
41
|
+
level: a,
|
|
42
|
+
showLogo: n,
|
|
43
|
+
logoMotion: d
|
|
44
|
+
}) {
|
|
45
|
+
const i = `h${a}`;
|
|
46
|
+
return /* @__PURE__ */ m("div", { className: w({ centred: n }), children: [
|
|
47
|
+
n && /* @__PURE__ */ r(b, { motion: d, label: x }),
|
|
48
|
+
/* @__PURE__ */ r(i, { id: e, className: "type-title-card", children: s }),
|
|
49
|
+
t && /* @__PURE__ */ r("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: t })
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
const y = h(
|
|
53
|
+
({ id: e, announce: s, children: t }, a) => /* @__PURE__ */ r(
|
|
54
|
+
c,
|
|
55
|
+
{
|
|
56
|
+
ref: a,
|
|
57
|
+
id: e,
|
|
58
|
+
variant: "error",
|
|
59
|
+
announce: s,
|
|
60
|
+
tabIndex: -1,
|
|
61
|
+
"data-field": "form",
|
|
62
|
+
className: A(),
|
|
63
|
+
children: /* @__PURE__ */ r(c.Description, { children: t })
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
);
|
|
67
|
+
y.displayName = "AuthFormMessage";
|
|
68
|
+
function C(e, s, t, a) {
|
|
69
|
+
const n = new Set(Object.values(t ?? {})), d = s ? Object.entries(a ?? {}) : [], i = d.filter(([o]) => n.has(o)).map(([o]) => o).join(", ");
|
|
70
|
+
return f(() => {
|
|
71
|
+
i && u() && console.warn(
|
|
72
|
+
`${e}: hiddenFields "${i}" is also named in fieldNames and was left out. The form's own field wins.`
|
|
73
|
+
);
|
|
74
|
+
}, [i, e]), d.filter(([o]) => !n.has(o));
|
|
75
|
+
}
|
|
76
|
+
function D(e, s, t) {
|
|
77
|
+
const a = s && t && p(t) ? t : void 0, n = t ? s ? a ? void 0 : "`action` is not a path or an address on this origin and was left out. The form posts to the current address." : "`action` does nothing without `fieldNames`: only a native form post has an address." : void 0;
|
|
78
|
+
return f(() => {
|
|
79
|
+
n && u() && console.warn(`${e}: ${n}`);
|
|
80
|
+
}, [e, n]), a;
|
|
81
|
+
}
|
|
82
|
+
function H({ fields: e }) {
|
|
83
|
+
return /* @__PURE__ */ r(v, { children: e.map(([s, t]) => /* @__PURE__ */ r("input", { type: "hidden", name: s, value: t }, s)) });
|
|
84
|
+
}
|
|
85
|
+
function O({ busy: e }) {
|
|
86
|
+
const { t: s } = g("ui");
|
|
87
|
+
return /* @__PURE__ */ r("p", { role: "status", className: "ds:sr-only", children: e ? s("chat.message.status.sending") : "" });
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
S as A,
|
|
91
|
+
H as E,
|
|
92
|
+
C as a,
|
|
93
|
+
y as b,
|
|
94
|
+
O as c,
|
|
95
|
+
B as d,
|
|
96
|
+
D as u
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=auth-form-parts-DHv6LVV2.js.map
|
|
@@ -10,7 +10,7 @@ import { E as bo } from "./error-summary-mGxIyDAY.js";
|
|
|
10
10
|
import { F as wo } from "./form-field-Ani72sVY.js";
|
|
11
11
|
import { i as xo } from "./safe-href-5dbsfbQn.js";
|
|
12
12
|
import { u as Eo } from "./use-state-backed-input-DhRQo6gM.js";
|
|
13
|
-
import { u as Io, a as Ao, A as Po, b as yo, E as So, c as Ro, d as To } from "./auth-form-parts-
|
|
13
|
+
import { u as Io, a as Ao, A as Po, b as yo, E as So, c as Ro, d as To } from "./auth-form-parts-DHv6LVV2.js";
|
|
14
14
|
import { u as Bo, a as Mo, b as No } from "./use-registration-submit-eWAECgUC.js";
|
|
15
15
|
const Vo = ["email"], Do = U(
|
|
16
16
|
"ds:mx-auto ds:w-full ds:max-w-[400px] ds:text-start ds:text-[var(--foreground)]"
|
|
@@ -231,4 +231,4 @@ export {
|
|
|
231
231
|
Vo as F,
|
|
232
232
|
_o as a
|
|
233
233
|
};
|
|
234
|
-
//# sourceMappingURL=forgot-password-form-
|
|
234
|
+
//# sourceMappingURL=forgot-password-form-BGPc8TGr.js.map
|
|
@@ -0,0 +1,332 @@
|
|
|
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-D-MQxsA_.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-DHv6LVV2.js";
|
|
14
|
+
import { u as Ds, b as Os, a as Ts } from "./use-registration-submit-eWAECgUC.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-CWpoTuVY.js.map
|