@alfadocs/ui-kit 1.54.1 → 1.54.3
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/{address-fields-1pD-8hML.js → address-fields-BaClzQLM.js} +5 -5
- package/dist/_chunks/{anamnesis-summary-rows-BMjSBqhS.js → anamnesis-summary-rows-Brru7JrH.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-BDX1Krdv.js → balance-badge-cell-C5hmahoB.js} +2 -2
- package/dist/_chunks/{bishop-score-CGAVpIWL.js → bishop-score-BzvVol-u.js} +2 -2
- package/dist/_chunks/{bmi-calculator-g_wjo4nq.js → bmi-calculator-CDmQk0b5.js} +2 -2
- package/dist/_chunks/{booking-BN7TXe27.js → booking-BGY3LUi8.js} +5 -5
- package/dist/_chunks/{calendar-workspace-BbZIx2PT.js → calendar-workspace-BJPhMb2c.js} +8 -8
- package/dist/_chunks/{city-input-DyxVWSRQ.js → city-input-BL5WsGJ3.js} +2 -2
- package/dist/_chunks/{cycle-calculator-CwDEdmda.js → cycle-calculator-LjsQd9Gl.js} +2 -2
- package/dist/_chunks/{data-table-DeUoJzNn.js → data-table-BErtJzaT.js} +2 -2
- package/dist/_chunks/{data-table-tabs-BfEmXvUk.js → data-table-tabs-D5nFZKxg.js} +2 -2
- package/dist/_chunks/{due-date-calculator-_0Dz_d7n.js → due-date-calculator-mDvGKmRV.js} +2 -2
- package/dist/_chunks/{email-input-Cmeo4zdT.js → email-input-DQixfopu.js} +2 -2
- package/dist/_chunks/error-page-C15GfNEj.js +312 -0
- package/dist/_chunks/{error-page-illustration-QGJAvuFB.js → error-page-illustration-bFti0VEc.js} +73 -56
- package/dist/_chunks/{face-scheme-pZgT26gB.js → face-scheme-Doodi6A6.js} +2 -2
- package/dist/_chunks/{fetal-weight-CbE61Uyk.js → fetal-weight-DBgEaMoJ.js} +2 -2
- package/dist/_chunks/{file-manager-DdsAd4TQ.js → file-manager-BDNSnr7f.js} +3 -3
- package/dist/_chunks/{forgot-password-form-DVVOBEGj.js → forgot-password-form-Duu3pZDU.js} +3 -3
- package/dist/_chunks/{form-field-D9WfDpYB.js → form-field-Db0liyI8.js} +72 -63
- package/dist/_chunks/{gestational-age-calculator-BMkoLJGR.js → gestational-age-calculator-BVBz_5dm.js} +2 -2
- package/dist/_chunks/{hcg-doubling-BtW2pBJX.js → hcg-doubling-BECrAUu3.js} +2 -2
- package/dist/_chunks/{help-me-write-templates-Cy-iO5AU.js → help-me-write-templates-B4Y8dBv1.js} +3 -3
- package/dist/_chunks/{icon-picker-CSViTQL9.js → icon-picker-JZzs1ol_.js} +2 -2
- package/dist/_chunks/{kit-extensions-Kca1tkfP.js → kit-extensions-GQHKTLWI.js} +6 -6
- package/dist/_chunks/{login-dev-card-C7wo-Hv1.js → login-dev-card-DletSsX3.js} +5 -5
- package/dist/_chunks/{notes-panel-BPb-2ZnJ.js → notes-panel-DWJY3WV8.js} +2 -2
- package/dist/_chunks/{password-input-B7pQTk7l.js → password-input-6Yl6x1IO.js} +2 -2
- package/dist/_chunks/{patient-details-BP9r_lNS.js → patient-details-D7QlsGK1.js} +2 -2
- package/dist/_chunks/{patient-field-row-BK9JjbzA.js → patient-field-row-Dr-ndtG8.js} +5 -5
- package/dist/_chunks/{patient-summary-card-DGbRLzF1.js → patient-summary-card-A3WhxFwp.js} +2 -2
- package/dist/_chunks/{postal-code-input-BmbqjkfD.js → postal-code-input-lCk8me6K.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-DV3o2PPl.js → pregnancy-dating-BEmsMys4.js} +2 -2
- package/dist/_chunks/{pregnancy-weight-gain-BLjWgtS9.js → pregnancy-weight-gain-DMVPvM3a.js} +2 -2
- package/dist/_chunks/{radiograph-panel.agent-C4j6eoQn.js → radiograph-panel.agent-rS3Tegx6.js} +2 -2
- package/dist/_chunks/{registration-form-CBDeXzlk.js → registration-form-Lz9iKrKo.js} +246 -235
- package/dist/_chunks/{rich-text-editor-CCCSEPlG.js → rich-text-editor-DmnWavgl.js} +2 -2
- package/dist/_chunks/{search-bar-D695TCDH.js → search-bar-ORcfuK9A.js} +2 -2
- package/dist/_chunks/{search-input-Tl-RkS5x.js → search-input-6SoR2Rf4.js} +2 -2
- package/dist/_chunks/{task-editor-Dl27rI3J.js → task-editor-i-juLk76.js} +3 -3
- package/dist/_chunks/{text-input-lZ2-t-p2.js → text-input-rzLEKhRU.js} +145 -97
- package/dist/_chunks/{transcript-panel-CLgtyVbR.js → transcript-panel-jOCW4Ycl.js} +2 -2
- package/dist/_chunks/{unit-converter-CXNr5P4J.js → unit-converter-Bvhj9r3m.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-BEbLseXW.js → use-appointment-details-read-B6dBBgDa.js} +3 -3
- package/dist/_chunks/{widget-picker-BCbwD5Z1.js → widget-picker-Ck8HTsil.js} +2 -2
- package/dist/agent-catalog.json +5 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/data-table-tabs/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +1 -1
- package/dist/components/email-input/index.js +1 -1
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/form-field/form-field-context.d.ts +5 -0
- package/dist/components/form-field/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/icon-picker/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/password-input/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/postal-code-input/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +2 -2
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/text-input/index.js +1 -1
- package/dist/components/text-input/text-input.d.ts +13 -0
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/widget-picker/index.js +1 -1
- package/dist/hooks/use-field-match.d.ts +3 -2
- 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 +167 -165
- 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/patterns/calendar/index.js +1 -1
- package/dist/patterns/error-page/error-page-illustration.d.ts +3 -1
- package/dist/patterns/error-page/error-page.d.ts +34 -2
- package/dist/patterns/error-page/index.d.ts +2 -1
- package/dist/patterns/error-page/index.js +7 -5
- package/dist/patterns/forgot-password-form/index.js +1 -1
- package/dist/patterns/help-me-write-templates/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/registration-form/index.d.ts +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/registration-form/registration-form.d.ts +16 -0
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/error-page-CKFJlekz.js +0 -275
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { jsx as s, jsxs as F, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as s, jsxs as F, Fragment as zr } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as he, useId as nr, useState as N, useRef as D, useMemo as ge, useEffect as y } from "react";
|
|
3
|
+
import { useTranslation as Hr, Trans as Sr } from "react-i18next";
|
|
4
4
|
import { c as R } from "./index-D2ZczOXr.js";
|
|
5
|
-
import { parsePhoneNumberFromString as
|
|
6
|
-
import { i as
|
|
7
|
-
import { A as
|
|
8
|
-
import { B as
|
|
9
|
-
import { C as
|
|
10
|
-
import { C as
|
|
11
|
-
import { D as
|
|
12
|
-
import { F as x } from "./form-field-
|
|
13
|
-
import { P as
|
|
14
|
-
import { u as
|
|
15
|
-
import { P as
|
|
16
|
-
import { R as
|
|
17
|
-
import { S as
|
|
18
|
-
import { T as
|
|
19
|
-
import { i as
|
|
20
|
-
import { a as
|
|
21
|
-
import { u as
|
|
22
|
-
import { u as
|
|
23
|
-
import { C as
|
|
24
|
-
const
|
|
5
|
+
import { parsePhoneNumberFromString as ve } from "libphonenumber-js/min";
|
|
6
|
+
import { i as we, E as yr } from "./email-input-DQixfopu.js";
|
|
7
|
+
import { A as Ar } from "./alert-BhCstf2h.js";
|
|
8
|
+
import { B as be } from "./button-CYPx2xFq.js";
|
|
9
|
+
import { C as Br } from "./card-DPmk26CL.js";
|
|
10
|
+
import { C as Ce } from "./checkbox--ndmyokr.js";
|
|
11
|
+
import { D as Ne } from "./dev-bypass-button-Y1s7gPSD.js";
|
|
12
|
+
import { F as x } from "./form-field-Db0liyI8.js";
|
|
13
|
+
import { P as Mr } from "./password-input-6Yl6x1IO.js";
|
|
14
|
+
import { u as xe } from "./use-password-requirements-C8DdwPEy.js";
|
|
15
|
+
import { P as Fe } from "./phone-input-BzeUr49H.js";
|
|
16
|
+
import { R as Re } from "./recaptcha-widget-CsvwlYTE.js";
|
|
17
|
+
import { S as Ie } from "./select-DHPmASkG.js";
|
|
18
|
+
import { T as Dr } from "./text-input-rzLEKhRU.js";
|
|
19
|
+
import { i as qe } from "./is-development-CLUAnsU7.js";
|
|
20
|
+
import { a as Ee, i as Pe } from "./safe-href-5dbsfbQn.js";
|
|
21
|
+
import { u as Tr } from "./use-field-match-pdbEnKvO.js";
|
|
22
|
+
import { u as ke, B as Se } from "./use-registration-submit-DxCWic5_.js";
|
|
23
|
+
import { C as ye } from "./circle-alert-rGDZ73Wh.js";
|
|
24
|
+
const jr = [
|
|
25
25
|
"firstName",
|
|
26
26
|
"lastName",
|
|
27
27
|
"email",
|
|
@@ -31,9 +31,9 @@ const Mr = [
|
|
|
31
31
|
"phone",
|
|
32
32
|
"branch",
|
|
33
33
|
"terms"
|
|
34
|
-
],
|
|
34
|
+
], Ae = R(
|
|
35
35
|
"ds:@container/registration ds:w-full ds:text-start ds:text-[var(--foreground)]"
|
|
36
|
-
),
|
|
36
|
+
), Be = R(
|
|
37
37
|
"ds:grid ds:grid-cols-1 ds:items-start ds:gap-[var(--spacing-md)]",
|
|
38
38
|
{
|
|
39
39
|
variants: {
|
|
@@ -46,7 +46,7 @@ const Mr = [
|
|
|
46
46
|
},
|
|
47
47
|
defaultVariants: { columns: "two" }
|
|
48
48
|
}
|
|
49
|
-
),
|
|
49
|
+
), Me = R("ds:relative ds:flex ds:gap-[var(--spacing-sm)]", {
|
|
50
50
|
variants: {
|
|
51
51
|
logo: {
|
|
52
52
|
/** A centred column under the mark. */
|
|
@@ -56,7 +56,7 @@ const Mr = [
|
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
defaultVariants: { logo: !0 }
|
|
59
|
-
}),
|
|
59
|
+
}), De = R(
|
|
60
60
|
"ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
61
61
|
{
|
|
62
62
|
variants: {
|
|
@@ -64,12 +64,12 @@ const Mr = [
|
|
|
64
64
|
},
|
|
65
65
|
defaultVariants: { centred: !0 }
|
|
66
66
|
}
|
|
67
|
-
),
|
|
67
|
+
), Te = R("ds:shrink-0", {
|
|
68
68
|
variants: {
|
|
69
69
|
corner: { true: "ds:absolute ds:top-0 ds:end-0", false: "" }
|
|
70
70
|
},
|
|
71
71
|
defaultVariants: { corner: !0 }
|
|
72
|
-
}),
|
|
72
|
+
}), je = R(
|
|
73
73
|
"ds:rounded-[var(--radius-sm)] ds:underline ds:underline-offset-4 ds:text-[var(--foreground)] 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)]",
|
|
74
74
|
{
|
|
75
75
|
variants: {
|
|
@@ -77,28 +77,28 @@ const Mr = [
|
|
|
77
77
|
},
|
|
78
78
|
defaultVariants: { weight: "normal" }
|
|
79
79
|
}
|
|
80
|
-
),
|
|
80
|
+
), Le = R(
|
|
81
81
|
"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)]"
|
|
82
|
-
),
|
|
82
|
+
), Oe = R(
|
|
83
83
|
"ds:text-destructive ds:ms-[var(--spacing-xs)]"
|
|
84
|
-
),
|
|
84
|
+
), _e = {
|
|
85
85
|
minLength: 12,
|
|
86
86
|
uppercase: !0,
|
|
87
87
|
lowercase: !0,
|
|
88
88
|
digit: !0,
|
|
89
89
|
charset: "ascii"
|
|
90
|
-
},
|
|
90
|
+
}, ze = "Alfadocs", ir = (d) => d && Pe(d) ? d : void 0, Lr = (d) => Object.values(d).some(Boolean), Or = (d) => {
|
|
91
91
|
var c;
|
|
92
|
-
return ((c =
|
|
92
|
+
return ((c = ve(d)) == null ? void 0 : c.isPossible()) ?? !1;
|
|
93
93
|
};
|
|
94
|
-
function
|
|
94
|
+
function mr({
|
|
95
95
|
href: d,
|
|
96
96
|
newTab: c = !1,
|
|
97
|
-
weight:
|
|
97
|
+
weight: k,
|
|
98
98
|
action: f,
|
|
99
99
|
children: v
|
|
100
100
|
}) {
|
|
101
|
-
const { t:
|
|
101
|
+
const { t: A } = Hr("ui");
|
|
102
102
|
return /* @__PURE__ */ F(
|
|
103
103
|
"a",
|
|
104
104
|
{
|
|
@@ -106,65 +106,67 @@ function ar({
|
|
|
106
106
|
target: c ? "_blank" : void 0,
|
|
107
107
|
rel: c ? "noopener noreferrer" : void 0,
|
|
108
108
|
"data-action": f,
|
|
109
|
-
className:
|
|
109
|
+
className: je({ weight: k }),
|
|
110
110
|
children: [
|
|
111
111
|
v,
|
|
112
|
-
c && /* @__PURE__ */ s("span", { className: "ds:sr-only", children:
|
|
112
|
+
c && /* @__PURE__ */ s("span", { className: "ds:sr-only", children: A("link.opensInNewTab") })
|
|
113
113
|
]
|
|
114
114
|
}
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
return /* @__PURE__ */ s(
|
|
117
|
+
function _r({ children: d }) {
|
|
118
|
+
return /* @__PURE__ */ s(zr, { children: d });
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const He = [
|
|
121
121
|
["firstName", "lastName"],
|
|
122
122
|
["email", "emailConfirm"],
|
|
123
123
|
["password", "passwordConfirm"],
|
|
124
124
|
["phone", "branch"]
|
|
125
125
|
];
|
|
126
|
-
function
|
|
126
|
+
function We(d) {
|
|
127
127
|
const c = [];
|
|
128
|
-
for (const
|
|
129
|
-
const f =
|
|
128
|
+
for (const k of He) {
|
|
129
|
+
const f = k.filter(d);
|
|
130
130
|
if (f.length === 0) continue;
|
|
131
131
|
const v = c[c.length - 1];
|
|
132
132
|
f.length === 1 && (v == null ? void 0 : v.length) === 1 ? v.push(f[0]) : c.push(f);
|
|
133
133
|
}
|
|
134
134
|
return c;
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const $e = he(
|
|
137
137
|
({
|
|
138
138
|
title: d,
|
|
139
139
|
description: c,
|
|
140
|
-
headingLevel:
|
|
140
|
+
headingLevel: k = 2,
|
|
141
141
|
showLogo: f = !0,
|
|
142
142
|
logoMotion: v = "assemble",
|
|
143
|
-
children:
|
|
144
|
-
fields:
|
|
143
|
+
children: A,
|
|
144
|
+
fields: dr,
|
|
145
145
|
initialValues: t,
|
|
146
|
-
errors:
|
|
147
|
-
emailReadOnly:
|
|
148
|
-
emailDescription:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
146
|
+
errors: T,
|
|
147
|
+
emailReadOnly: Wr = !1,
|
|
148
|
+
emailDescription: $r,
|
|
149
|
+
blockPaste: j,
|
|
150
|
+
blockCopy: L,
|
|
151
|
+
branches: O,
|
|
152
|
+
passwordPolicy: Gr = _e,
|
|
153
|
+
termsHref: Kr,
|
|
154
|
+
privacyHref: Ur,
|
|
155
|
+
termsLabel: Yr,
|
|
156
|
+
termsDescription: _,
|
|
157
|
+
loginHref: Jr,
|
|
158
|
+
recaptchaSiteKey: z,
|
|
159
|
+
submitLabel: Qr,
|
|
160
|
+
submitting: Xr = !1,
|
|
159
161
|
devBypass: l,
|
|
160
|
-
onSubmit:
|
|
161
|
-
fieldNames:
|
|
162
|
-
action:
|
|
163
|
-
hiddenFields:
|
|
164
|
-
className:
|
|
165
|
-
...
|
|
166
|
-
},
|
|
167
|
-
const { t: i, i18n:
|
|
162
|
+
onSubmit: H,
|
|
163
|
+
fieldNames: I,
|
|
164
|
+
action: W,
|
|
165
|
+
hiddenFields: Zr,
|
|
166
|
+
className: Vr,
|
|
167
|
+
...re
|
|
168
|
+
}, ee) => {
|
|
169
|
+
const { t: i, i18n: cr } = Hr("ui"), lr = nr(), fr = nr(), ur = nr(), w = I !== void 0, se = !!(O && O.length > 0), [oe] = N(() => !!(t != null && t.email)), q = Wr && oe, n = (r) => r === "email" || r === "password" ? !0 : dr && !dr.includes(r) ? !1 : r === "branch" ? se : r === "emailConfirm" ? !q : !0, pr = jr.filter(n), [o, $] = N(() => ({
|
|
168
170
|
firstName: (t == null ? void 0 : t.firstName) ?? "",
|
|
169
171
|
lastName: (t == null ? void 0 : t.lastName) ?? "",
|
|
170
172
|
email: (t == null ? void 0 : t.email) ?? "",
|
|
@@ -174,71 +176,74 @@ const ze = fe(
|
|
|
174
176
|
phone: (t == null ? void 0 : t.phone) ?? "",
|
|
175
177
|
branch: (t == null ? void 0 : t.branch) ?? "",
|
|
176
178
|
terms: (t == null ? void 0 : t.terms) ?? !1
|
|
177
|
-
})), [
|
|
178
|
-
() =>
|
|
179
|
-
), [
|
|
179
|
+
})), [te, hr] = N(
|
|
180
|
+
() => Or((t == null ? void 0 : t.phone) ?? "")
|
|
181
|
+
), [ae, G] = N(() => ({
|
|
180
182
|
email: !!(t != null && t.email)
|
|
181
|
-
})), [
|
|
182
|
-
() =>
|
|
183
|
+
})), [K, gr] = N(!1), [U, Y] = N(
|
|
184
|
+
() => T ?? {}
|
|
183
185
|
), u = (r, e) => {
|
|
184
|
-
|
|
186
|
+
$((a) => ({ ...a, [r]: e })), Y(
|
|
185
187
|
(a) => a[r] ? { ...a, [r]: void 0 } : a
|
|
186
188
|
);
|
|
187
|
-
},
|
|
189
|
+
}, E = (r) => G(
|
|
188
190
|
(e) => e[r] ? e : { ...e, [r]: !0 }
|
|
189
|
-
),
|
|
190
|
-
|
|
191
|
+
), vr = () => {
|
|
192
|
+
$((r) => ({
|
|
191
193
|
...r,
|
|
192
194
|
password: "",
|
|
193
195
|
passwordConfirm: ""
|
|
194
|
-
})),
|
|
196
|
+
})), G((r) => ({
|
|
195
197
|
...r,
|
|
196
198
|
password: !1,
|
|
197
199
|
passwordConfirm: !1
|
|
198
200
|
}));
|
|
199
|
-
},
|
|
201
|
+
}, P = (r) => ({
|
|
202
|
+
blockPaste: (j == null ? void 0 : j.includes(r)) ?? !1,
|
|
203
|
+
blockCopy: (L == null ? void 0 : L.includes(r)) ?? !1
|
|
204
|
+
}), wr = xe(Gr), J = Tr({
|
|
200
205
|
value: o.email,
|
|
201
206
|
confirmValue: o.emailConfirm,
|
|
202
207
|
kind: "email",
|
|
203
|
-
submitted:
|
|
204
|
-
}),
|
|
208
|
+
submitted: K
|
|
209
|
+
}), Q = Tr({
|
|
205
210
|
value: o.password,
|
|
206
211
|
confirmValue: o.passwordConfirm,
|
|
207
212
|
kind: "password",
|
|
208
|
-
submitted:
|
|
209
|
-
}),
|
|
213
|
+
submitted: K
|
|
214
|
+
}), br = {
|
|
210
215
|
firstName: n("firstName") && o.firstName.trim() === "",
|
|
211
216
|
lastName: n("lastName") && o.lastName.trim() === "",
|
|
212
217
|
// The user cannot fix a locked address, so the server judges it.
|
|
213
|
-
email: !
|
|
214
|
-
emailConfirm: n("emailConfirm") && (o.emailConfirm === "" || !
|
|
215
|
-
password: o.password === "" || !
|
|
216
|
-
passwordConfirm: n("passwordConfirm") && (o.passwordConfirm === "" || !
|
|
217
|
-
phone: n("phone") && (o.phone === "" || !
|
|
218
|
+
email: !q && !we(o.email),
|
|
219
|
+
emailConfirm: n("emailConfirm") && (o.emailConfirm === "" || !J.matches),
|
|
220
|
+
password: o.password === "" || !wr.every((r) => r.test(o.password)),
|
|
221
|
+
passwordConfirm: n("passwordConfirm") && (o.passwordConfirm === "" || !Q.matches),
|
|
222
|
+
phone: n("phone") && (o.phone === "" || !te),
|
|
218
223
|
branch: n("branch") && o.branch === "",
|
|
219
224
|
terms: n("terms") && !o.terms
|
|
220
|
-
},
|
|
225
|
+
}, ne = (r) => K || r !== "terms" && ae[r] === !0, b = i("registrationForm.required"), p = (r, e) => ne(r) && br[r] ? e : void 0, ie = {
|
|
221
226
|
firstName: p("firstName", b),
|
|
222
227
|
lastName: p("lastName", b),
|
|
223
228
|
email: p(
|
|
224
229
|
"email",
|
|
225
230
|
o.email === "" ? b : i("inputs.email.invalid")
|
|
226
231
|
),
|
|
227
|
-
emailConfirm: o.emailConfirm === "" ? p("emailConfirm", b) :
|
|
232
|
+
emailConfirm: o.emailConfirm === "" ? p("emailConfirm", b) : J.error,
|
|
228
233
|
password: p(
|
|
229
234
|
"password",
|
|
230
235
|
o.password === "" ? b : i("registrationForm.passwordInvalid")
|
|
231
236
|
),
|
|
232
|
-
passwordConfirm: o.passwordConfirm === "" ? p("passwordConfirm", b) :
|
|
237
|
+
passwordConfirm: o.passwordConfirm === "" ? p("passwordConfirm", b) : Q.error,
|
|
233
238
|
phone: p(
|
|
234
239
|
"phone",
|
|
235
240
|
o.phone === "" ? b : i("registrationForm.phoneInvalid")
|
|
236
241
|
),
|
|
237
242
|
branch: p("branch", b),
|
|
238
243
|
terms: p("terms", i("registrationForm.termsRequired"))
|
|
239
|
-
}, h = (r) =>
|
|
244
|
+
}, h = (r) => U[r] ?? ie[r], X = D({}), g = ge(() => {
|
|
240
245
|
const r = (e) => (a) => {
|
|
241
|
-
|
|
246
|
+
X.current[e] = a;
|
|
242
247
|
};
|
|
243
248
|
return {
|
|
244
249
|
firstName: r("firstName"),
|
|
@@ -251,58 +256,58 @@ const ze = fe(
|
|
|
251
256
|
branch: r("branch"),
|
|
252
257
|
terms: r("terms")
|
|
253
258
|
};
|
|
254
|
-
}, []),
|
|
255
|
-
const r =
|
|
259
|
+
}, []), Cr = D(null), Nr = (r) => pr.find((e) => r[e]) ?? (Lr(r) ? "form" : void 0), [B, Z] = N(() => {
|
|
260
|
+
const r = Nr(T ?? {});
|
|
256
261
|
return r ? { target: r } : null;
|
|
257
262
|
});
|
|
258
263
|
y(() => {
|
|
259
264
|
var r, e;
|
|
260
|
-
|
|
261
|
-
}, [
|
|
262
|
-
const
|
|
265
|
+
B && (B.target === "form" ? (r = Cr.current) == null || r.focus() : (e = X.current[B.target]) == null || e.focus());
|
|
266
|
+
}, [B]);
|
|
267
|
+
const V = n("phone");
|
|
263
268
|
y(() => {
|
|
264
|
-
const r =
|
|
265
|
-
if (!
|
|
266
|
-
const e = () =>
|
|
269
|
+
const r = X.current.phone;
|
|
270
|
+
if (!V || !r) return;
|
|
271
|
+
const e = () => G(
|
|
267
272
|
(a) => a.phone ? a : { ...a, phone: !0 }
|
|
268
273
|
);
|
|
269
274
|
return r.addEventListener("blur", e), () => r.removeEventListener("blur", e);
|
|
270
|
-
}, [
|
|
271
|
-
const
|
|
275
|
+
}, [V]);
|
|
276
|
+
const rr = D(null), er = D(null), [xr, me] = N(null);
|
|
272
277
|
y(() => {
|
|
273
278
|
var r;
|
|
274
|
-
|
|
275
|
-
}, [
|
|
276
|
-
const
|
|
279
|
+
xr && ((r = rr.current) == null || r.requestSubmit());
|
|
280
|
+
}, [xr]);
|
|
281
|
+
const de = () => {
|
|
277
282
|
var e;
|
|
278
283
|
const r = l == null ? void 0 : l.values;
|
|
279
284
|
if (r) {
|
|
280
|
-
const a =
|
|
281
|
-
n("firstName") && r.firstName !== void 0 && (m.firstName = r.firstName), n("lastName") && r.lastName !== void 0 && (m.lastName = r.lastName), a !== void 0 && (m.email = a), n("emailConfirm") && a !== void 0 && (m.emailConfirm = a), r.password !== void 0 && (m.password = r.password), n("passwordConfirm") && r.password !== void 0 && (m.passwordConfirm = r.password), n("phone") && r.phone !== void 0 && (m.phone = r.phone), n("branch") && r.branch !== void 0 && (m.branch = r.branch), n("terms") && r.terms !== void 0 && (m.terms = r.terms),
|
|
282
|
-
const
|
|
283
|
-
for (const
|
|
284
|
-
|
|
285
|
-
return
|
|
286
|
-
}), l.submit &&
|
|
285
|
+
const a = q ? void 0 : r.email, m = {};
|
|
286
|
+
n("firstName") && r.firstName !== void 0 && (m.firstName = r.firstName), n("lastName") && r.lastName !== void 0 && (m.lastName = r.lastName), a !== void 0 && (m.email = a), n("emailConfirm") && a !== void 0 && (m.emailConfirm = a), r.password !== void 0 && (m.password = r.password), n("passwordConfirm") && r.password !== void 0 && (m.passwordConfirm = r.password), n("phone") && r.phone !== void 0 && (m.phone = r.phone), n("branch") && r.branch !== void 0 && (m.branch = r.branch), n("terms") && r.terms !== void 0 && (m.terms = r.terms), $((ar) => ({ ...ar, ...m })), m.phone !== void 0 && hr(Or(m.phone)), Y((ar) => {
|
|
287
|
+
const kr = { ...ar };
|
|
288
|
+
for (const pe of Object.keys(m))
|
|
289
|
+
kr[pe] = void 0;
|
|
290
|
+
return kr;
|
|
291
|
+
}), l.submit && me({});
|
|
287
292
|
}
|
|
288
293
|
(e = l == null ? void 0 : l.onClick) == null || e.call(l);
|
|
289
|
-
},
|
|
290
|
-
errors:
|
|
291
|
-
submitting:
|
|
294
|
+
}, S = ke({
|
|
295
|
+
errors: T,
|
|
296
|
+
submitting: Xr,
|
|
292
297
|
native: w,
|
|
293
|
-
captcha: !!
|
|
294
|
-
firstProblem: () =>
|
|
298
|
+
captcha: !!z,
|
|
299
|
+
firstProblem: () => pr.find((r) => br[r]),
|
|
295
300
|
onRefused: (r) => {
|
|
296
|
-
|
|
301
|
+
gr(!0), Z({ target: r });
|
|
297
302
|
},
|
|
298
303
|
deliver: (r) => {
|
|
299
304
|
var a;
|
|
300
305
|
if (w) {
|
|
301
|
-
|
|
306
|
+
er.current && r && (er.current.value = r), (a = rr.current) == null || a.submit();
|
|
302
307
|
return;
|
|
303
308
|
}
|
|
304
309
|
const e = (m) => n(m) ? o[m] : "";
|
|
305
|
-
|
|
310
|
+
H == null || H({
|
|
306
311
|
firstName: e("firstName"),
|
|
307
312
|
lastName: e("lastName"),
|
|
308
313
|
email: o.email,
|
|
@@ -317,34 +322,34 @@ const ze = fe(
|
|
|
317
322
|
},
|
|
318
323
|
onAnswer: (r) => {
|
|
319
324
|
const e = r;
|
|
320
|
-
if (
|
|
321
|
-
|
|
322
|
-
const a =
|
|
323
|
-
a &&
|
|
325
|
+
if (Y(e), !Lr(e)) return;
|
|
326
|
+
vr(), gr(!1);
|
|
327
|
+
const a = Nr(e);
|
|
328
|
+
a && Z({ target: a });
|
|
324
329
|
},
|
|
325
330
|
// The page came back from the browser's cache as it was left:
|
|
326
331
|
// the passwords must not come back with it.
|
|
327
|
-
onRestore:
|
|
328
|
-
}), { busy:
|
|
332
|
+
onRestore: vr
|
|
333
|
+
}), { busy: sr, captchaFailed: or } = S;
|
|
329
334
|
y(() => {
|
|
330
|
-
|
|
331
|
-
}, [
|
|
332
|
-
const C = (r) => w ?
|
|
333
|
-
|
|
334
|
-
...
|
|
335
|
-
(r) =>
|
|
335
|
+
or && Z({ target: "form" });
|
|
336
|
+
}, [or]);
|
|
337
|
+
const C = (r) => w ? I[r] : r, ce = `h${k}`, Fr = ir(Kr), Rr = ir(Ur), Ir = ir(Jr), le = w && W && Ee(W) ? W : void 0, qr = [
|
|
338
|
+
U.form,
|
|
339
|
+
...jr.filter((r) => !n(r)).map(
|
|
340
|
+
(r) => U[r]
|
|
336
341
|
),
|
|
337
|
-
|
|
338
|
-
].filter(Boolean).join(" ") || void 0,
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
].filter(Boolean).join(" ") || void 0,
|
|
342
|
+
or ? i("inputs.recaptcha.error") : void 0
|
|
343
|
+
].filter(Boolean).join(" ") || void 0, M = h("terms"), fe = [
|
|
344
|
+
_ ? ur : void 0,
|
|
345
|
+
M ? fr : void 0
|
|
346
|
+
].filter(Boolean).join(" ") || void 0, Er = new Set(Object.values(I ?? {})), Pr = w ? Object.entries(Zr ?? {}) : [], tr = Pr.filter(([r]) => Er.has(r)).map(([r]) => r).join(", ");
|
|
342
347
|
y(() => {
|
|
343
|
-
|
|
344
|
-
`RegistrationForm: hiddenFields "${
|
|
348
|
+
tr && qe() && console.warn(
|
|
349
|
+
`RegistrationForm: hiddenFields "${tr}" is also named in fieldNames and was left out. The form's own field wins.`
|
|
345
350
|
);
|
|
346
|
-
}, [
|
|
347
|
-
const
|
|
351
|
+
}, [tr]);
|
|
352
|
+
const ue = (r) => {
|
|
348
353
|
switch (r) {
|
|
349
354
|
case "firstName":
|
|
350
355
|
return /* @__PURE__ */ s(
|
|
@@ -355,14 +360,15 @@ const ze = fe(
|
|
|
355
360
|
error: h("firstName"),
|
|
356
361
|
"data-field": "firstName",
|
|
357
362
|
children: /* @__PURE__ */ s(
|
|
358
|
-
|
|
363
|
+
Dr,
|
|
359
364
|
{
|
|
360
365
|
ref: g.firstName,
|
|
361
366
|
name: C("firstName"),
|
|
362
367
|
autoComplete: "given-name",
|
|
363
368
|
value: o.firstName,
|
|
364
369
|
onChange: (e) => u("firstName", e.target.value),
|
|
365
|
-
onBlur: () =>
|
|
370
|
+
onBlur: () => E("firstName"),
|
|
371
|
+
...P("firstName")
|
|
366
372
|
}
|
|
367
373
|
)
|
|
368
374
|
},
|
|
@@ -377,14 +383,15 @@ const ze = fe(
|
|
|
377
383
|
error: h("lastName"),
|
|
378
384
|
"data-field": "lastName",
|
|
379
385
|
children: /* @__PURE__ */ s(
|
|
380
|
-
|
|
386
|
+
Dr,
|
|
381
387
|
{
|
|
382
388
|
ref: g.lastName,
|
|
383
389
|
name: C("lastName"),
|
|
384
390
|
autoComplete: "family-name",
|
|
385
391
|
value: o.lastName,
|
|
386
392
|
onChange: (e) => u("lastName", e.target.value),
|
|
387
|
-
onBlur: () =>
|
|
393
|
+
onBlur: () => E("lastName"),
|
|
394
|
+
...P("lastName")
|
|
388
395
|
}
|
|
389
396
|
)
|
|
390
397
|
},
|
|
@@ -395,21 +402,22 @@ const ze = fe(
|
|
|
395
402
|
x,
|
|
396
403
|
{
|
|
397
404
|
label: i("registrationForm.email"),
|
|
398
|
-
required: !
|
|
399
|
-
description:
|
|
405
|
+
required: !q,
|
|
406
|
+
description: $r,
|
|
400
407
|
error: h("email"),
|
|
401
408
|
"data-field": "email",
|
|
402
409
|
children: /* @__PURE__ */ s(
|
|
403
|
-
|
|
410
|
+
yr,
|
|
404
411
|
{
|
|
405
412
|
ref: g.email,
|
|
406
413
|
name: C("email"),
|
|
407
414
|
errorMessage: null,
|
|
408
|
-
disableBuiltInValidation:
|
|
409
|
-
readOnly:
|
|
415
|
+
disableBuiltInValidation: q,
|
|
416
|
+
readOnly: q,
|
|
410
417
|
value: o.email,
|
|
411
418
|
onChange: (e) => u("email", e.target.value),
|
|
412
|
-
onBlur: () =>
|
|
419
|
+
onBlur: () => E("email"),
|
|
420
|
+
...P("email")
|
|
413
421
|
}
|
|
414
422
|
)
|
|
415
423
|
},
|
|
@@ -424,7 +432,7 @@ const ze = fe(
|
|
|
424
432
|
error: h("emailConfirm"),
|
|
425
433
|
"data-field": "emailConfirm",
|
|
426
434
|
children: /* @__PURE__ */ s(
|
|
427
|
-
|
|
435
|
+
yr,
|
|
428
436
|
{
|
|
429
437
|
ref: g.emailConfirm,
|
|
430
438
|
name: C("emailConfirm"),
|
|
@@ -432,8 +440,9 @@ const ze = fe(
|
|
|
432
440
|
value: o.emailConfirm,
|
|
433
441
|
onChange: (e) => u("emailConfirm", e.target.value),
|
|
434
442
|
onBlur: () => {
|
|
435
|
-
|
|
436
|
-
}
|
|
443
|
+
E("emailConfirm"), J.confirmProps.onBlur();
|
|
444
|
+
},
|
|
445
|
+
...P("emailConfirm")
|
|
437
446
|
}
|
|
438
447
|
)
|
|
439
448
|
},
|
|
@@ -448,15 +457,16 @@ const ze = fe(
|
|
|
448
457
|
error: h("password"),
|
|
449
458
|
"data-field": "password",
|
|
450
459
|
children: /* @__PURE__ */ s(
|
|
451
|
-
|
|
460
|
+
Mr,
|
|
452
461
|
{
|
|
453
462
|
ref: g.password,
|
|
454
463
|
name: C("password") ?? "",
|
|
455
464
|
autoComplete: "new-password",
|
|
456
|
-
requirements:
|
|
465
|
+
requirements: wr,
|
|
457
466
|
value: o.password,
|
|
458
467
|
onChange: (e) => u("password", e.target.value),
|
|
459
|
-
onBlur: () =>
|
|
468
|
+
onBlur: () => E("password"),
|
|
469
|
+
...P("password")
|
|
460
470
|
}
|
|
461
471
|
)
|
|
462
472
|
},
|
|
@@ -471,7 +481,7 @@ const ze = fe(
|
|
|
471
481
|
error: h("passwordConfirm"),
|
|
472
482
|
"data-field": "passwordConfirm",
|
|
473
483
|
children: /* @__PURE__ */ s(
|
|
474
|
-
|
|
484
|
+
Mr,
|
|
475
485
|
{
|
|
476
486
|
ref: g.passwordConfirm,
|
|
477
487
|
name: C("passwordConfirm") ?? "",
|
|
@@ -479,8 +489,9 @@ const ze = fe(
|
|
|
479
489
|
value: o.passwordConfirm,
|
|
480
490
|
onChange: (e) => u("passwordConfirm", e.target.value),
|
|
481
491
|
onBlur: () => {
|
|
482
|
-
|
|
483
|
-
}
|
|
492
|
+
E("passwordConfirm"), Q.confirmProps.onBlur();
|
|
493
|
+
},
|
|
494
|
+
...P("passwordConfirm")
|
|
484
495
|
}
|
|
485
496
|
)
|
|
486
497
|
},
|
|
@@ -495,13 +506,13 @@ const ze = fe(
|
|
|
495
506
|
error: h("phone"),
|
|
496
507
|
"data-field": "phone",
|
|
497
508
|
children: /* @__PURE__ */ s(
|
|
498
|
-
|
|
509
|
+
Fe,
|
|
499
510
|
{
|
|
500
511
|
ref: g.phone,
|
|
501
512
|
name: w ? void 0 : "phone",
|
|
502
513
|
value: o.phone,
|
|
503
514
|
onChange: (e, a) => {
|
|
504
|
-
u("phone", e),
|
|
515
|
+
u("phone", e), hr(a.isPossible);
|
|
505
516
|
}
|
|
506
517
|
}
|
|
507
518
|
)
|
|
@@ -517,11 +528,11 @@ const ze = fe(
|
|
|
517
528
|
error: h("branch"),
|
|
518
529
|
"data-field": "branch",
|
|
519
530
|
children: /* @__PURE__ */ s(
|
|
520
|
-
|
|
531
|
+
Ie,
|
|
521
532
|
{
|
|
522
533
|
ref: g.branch,
|
|
523
534
|
name: C("branch"),
|
|
524
|
-
options:
|
|
535
|
+
options: O ?? [],
|
|
525
536
|
value: o.branch,
|
|
526
537
|
onValueChange: (e) => u("branch", e)
|
|
527
538
|
}
|
|
@@ -534,84 +545,84 @@ const ze = fe(
|
|
|
534
545
|
return /* @__PURE__ */ s(
|
|
535
546
|
"div",
|
|
536
547
|
{
|
|
537
|
-
ref:
|
|
538
|
-
...
|
|
548
|
+
ref: ee,
|
|
549
|
+
...re,
|
|
539
550
|
"data-component": "registration-form",
|
|
540
|
-
className:
|
|
541
|
-
children: /* @__PURE__ */ s(
|
|
542
|
-
/* @__PURE__ */ F("div", { className:
|
|
543
|
-
/* @__PURE__ */ F("div", { className:
|
|
544
|
-
f && /* @__PURE__ */ s(
|
|
545
|
-
/* @__PURE__ */ s(
|
|
551
|
+
className: Ae({ className: Vr }),
|
|
552
|
+
children: /* @__PURE__ */ s(Br, { variant: "elevated", children: /* @__PURE__ */ F(Br.Body, { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
|
|
553
|
+
/* @__PURE__ */ F("div", { className: Me({ logo: f }), children: [
|
|
554
|
+
/* @__PURE__ */ F("div", { className: De({ centred: f }), children: [
|
|
555
|
+
f && /* @__PURE__ */ s(Se, { motion: v, label: ze }),
|
|
556
|
+
/* @__PURE__ */ s(ce, { id: lr, className: "type-title-card", children: d ?? i("registrationForm.title") }),
|
|
546
557
|
c && /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: c })
|
|
547
558
|
] }),
|
|
548
|
-
l && (l.values || l.onClick) && /* @__PURE__ */ s("div", { className:
|
|
549
|
-
|
|
559
|
+
l && (l.values || l.onClick) && /* @__PURE__ */ s("div", { className: Te({ corner: f }), children: /* @__PURE__ */ s(
|
|
560
|
+
Ne,
|
|
550
561
|
{
|
|
551
562
|
label: l.label,
|
|
552
|
-
onClick:
|
|
563
|
+
onClick: de
|
|
553
564
|
}
|
|
554
565
|
) })
|
|
555
566
|
] }),
|
|
556
|
-
|
|
567
|
+
A ? /* @__PURE__ */ s(
|
|
557
568
|
"div",
|
|
558
569
|
{
|
|
559
570
|
"data-slot": "host-content",
|
|
560
571
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
561
|
-
children:
|
|
572
|
+
children: A
|
|
562
573
|
}
|
|
563
574
|
) : null,
|
|
564
575
|
/* @__PURE__ */ F(
|
|
565
576
|
"form",
|
|
566
577
|
{
|
|
567
|
-
ref:
|
|
578
|
+
ref: rr,
|
|
568
579
|
noValidate: !0,
|
|
569
580
|
method: "post",
|
|
570
|
-
action:
|
|
571
|
-
"aria-labelledby":
|
|
572
|
-
"aria-busy":
|
|
573
|
-
onSubmit:
|
|
581
|
+
action: le,
|
|
582
|
+
"aria-labelledby": lr,
|
|
583
|
+
"aria-busy": sr || void 0,
|
|
584
|
+
onSubmit: S.handleSubmit,
|
|
574
585
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
575
586
|
children: [
|
|
576
|
-
|
|
577
|
-
|
|
587
|
+
qr && /* @__PURE__ */ s(
|
|
588
|
+
Ar,
|
|
578
589
|
{
|
|
579
|
-
ref:
|
|
590
|
+
ref: Cr,
|
|
580
591
|
variant: "error",
|
|
581
592
|
tabIndex: -1,
|
|
582
593
|
"data-field": "form",
|
|
583
|
-
className:
|
|
584
|
-
children: /* @__PURE__ */ s(
|
|
594
|
+
className: Le(),
|
|
595
|
+
children: /* @__PURE__ */ s(Ar.Description, { children: qr })
|
|
585
596
|
}
|
|
586
597
|
),
|
|
587
|
-
|
|
598
|
+
We(n).map((r) => /* @__PURE__ */ s(
|
|
588
599
|
"div",
|
|
589
600
|
{
|
|
590
|
-
className:
|
|
601
|
+
className: Be({
|
|
591
602
|
columns: r.length === 2 ? "two" : "one"
|
|
592
603
|
}),
|
|
593
|
-
children: r.map(
|
|
604
|
+
children: r.map(ue)
|
|
594
605
|
},
|
|
595
606
|
r[0]
|
|
596
607
|
)),
|
|
597
|
-
w &&
|
|
608
|
+
w && V && I.phone && /* @__PURE__ */ s(
|
|
598
609
|
"input",
|
|
599
610
|
{
|
|
600
611
|
type: "hidden",
|
|
601
|
-
name:
|
|
612
|
+
name: I.phone,
|
|
602
613
|
value: o.phone
|
|
603
614
|
}
|
|
604
615
|
),
|
|
605
|
-
w &&
|
|
616
|
+
w && I.captcha && /* @__PURE__ */ s(
|
|
606
617
|
"input",
|
|
607
618
|
{
|
|
608
|
-
ref:
|
|
619
|
+
ref: er,
|
|
609
620
|
type: "hidden",
|
|
610
|
-
name:
|
|
621
|
+
name: I.captcha,
|
|
611
622
|
defaultValue: ""
|
|
612
623
|
}
|
|
613
624
|
),
|
|
614
|
-
|
|
625
|
+
Pr.filter(([r]) => !Er.has(r)).map(([r, e]) => /* @__PURE__ */ s(
|
|
615
626
|
"input",
|
|
616
627
|
{
|
|
617
628
|
type: "hidden",
|
|
@@ -626,16 +637,16 @@ const ze = fe(
|
|
|
626
637
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
627
638
|
"data-field": "terms",
|
|
628
639
|
children: [
|
|
629
|
-
|
|
640
|
+
_ && /* @__PURE__ */ s(
|
|
630
641
|
"p",
|
|
631
642
|
{
|
|
632
|
-
id:
|
|
643
|
+
id: ur,
|
|
633
644
|
className: "type-body-sm ds:text-[var(--muted-foreground)]",
|
|
634
|
-
children:
|
|
645
|
+
children: _
|
|
635
646
|
}
|
|
636
647
|
),
|
|
637
648
|
/* @__PURE__ */ s(
|
|
638
|
-
|
|
649
|
+
Ce,
|
|
639
650
|
{
|
|
640
651
|
ref: g.terms,
|
|
641
652
|
name: C("terms"),
|
|
@@ -643,18 +654,18 @@ const ze = fe(
|
|
|
643
654
|
checked: o.terms,
|
|
644
655
|
onCheckedChange: (r) => u("terms", r === !0),
|
|
645
656
|
"aria-required": "true",
|
|
646
|
-
"aria-invalid":
|
|
647
|
-
"aria-describedby":
|
|
648
|
-
label: /* @__PURE__ */ F(
|
|
649
|
-
|
|
650
|
-
|
|
657
|
+
"aria-invalid": M ? !0 : void 0,
|
|
658
|
+
"aria-describedby": fe,
|
|
659
|
+
label: /* @__PURE__ */ F(zr, { children: [
|
|
660
|
+
Yr ?? /* @__PURE__ */ s(
|
|
661
|
+
Sr,
|
|
651
662
|
{
|
|
652
|
-
i18n:
|
|
663
|
+
i18n: cr,
|
|
653
664
|
ns: "ui",
|
|
654
665
|
i18nKey: "registrationForm.terms",
|
|
655
666
|
components: {
|
|
656
|
-
terms:
|
|
657
|
-
privacy:
|
|
667
|
+
terms: Fr ? /* @__PURE__ */ s(mr, { href: Fr, newTab: !0 }) : /* @__PURE__ */ s(_r, {}),
|
|
668
|
+
privacy: Rr ? /* @__PURE__ */ s(mr, { href: Rr, newTab: !0 }) : /* @__PURE__ */ s(_r, {})
|
|
658
669
|
}
|
|
659
670
|
}
|
|
660
671
|
),
|
|
@@ -662,28 +673,28 @@ const ze = fe(
|
|
|
662
673
|
"span",
|
|
663
674
|
{
|
|
664
675
|
"aria-hidden": "true",
|
|
665
|
-
className:
|
|
676
|
+
className: Oe(),
|
|
666
677
|
children: "*"
|
|
667
678
|
}
|
|
668
679
|
)
|
|
669
680
|
] })
|
|
670
681
|
}
|
|
671
682
|
),
|
|
672
|
-
|
|
683
|
+
M && /* @__PURE__ */ F(
|
|
673
684
|
"p",
|
|
674
685
|
{
|
|
675
|
-
id:
|
|
686
|
+
id: fr,
|
|
676
687
|
role: "alert",
|
|
677
688
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-body-sm ds:text-destructive",
|
|
678
689
|
children: [
|
|
679
690
|
/* @__PURE__ */ s(
|
|
680
|
-
|
|
691
|
+
ye,
|
|
681
692
|
{
|
|
682
693
|
"aria-hidden": "true",
|
|
683
694
|
className: "ds:size-4 ds:shrink-0"
|
|
684
695
|
}
|
|
685
696
|
),
|
|
686
|
-
/* @__PURE__ */ s("span", { children:
|
|
697
|
+
/* @__PURE__ */ s("span", { children: M })
|
|
687
698
|
]
|
|
688
699
|
}
|
|
689
700
|
)
|
|
@@ -691,29 +702,29 @@ const ze = fe(
|
|
|
691
702
|
}
|
|
692
703
|
),
|
|
693
704
|
/* @__PURE__ */ s(
|
|
694
|
-
|
|
705
|
+
be,
|
|
695
706
|
{
|
|
696
707
|
type: "submit",
|
|
697
708
|
intent: "primary",
|
|
698
709
|
size: "lg",
|
|
699
|
-
loading:
|
|
710
|
+
loading: sr,
|
|
700
711
|
className: "ds:w-full",
|
|
701
712
|
"data-action": "submit",
|
|
702
|
-
children:
|
|
713
|
+
children: Qr ?? i("registrationForm.submit")
|
|
703
714
|
}
|
|
704
715
|
),
|
|
705
|
-
/* @__PURE__ */ s("p", { role: "status", className: "ds:sr-only", children:
|
|
706
|
-
|
|
707
|
-
|
|
716
|
+
/* @__PURE__ */ s("p", { role: "status", className: "ds:sr-only", children: sr ? i("chat.message.status.sending") : "" }),
|
|
717
|
+
Ir && /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-center ds:text-[var(--muted-foreground)]", children: /* @__PURE__ */ s(
|
|
718
|
+
Sr,
|
|
708
719
|
{
|
|
709
|
-
i18n:
|
|
720
|
+
i18n: cr,
|
|
710
721
|
ns: "ui",
|
|
711
722
|
i18nKey: "registrationForm.login",
|
|
712
723
|
components: {
|
|
713
724
|
login: /* @__PURE__ */ s(
|
|
714
|
-
|
|
725
|
+
mr,
|
|
715
726
|
{
|
|
716
|
-
href:
|
|
727
|
+
href: Ir,
|
|
717
728
|
weight: "strong",
|
|
718
729
|
action: "login"
|
|
719
730
|
}
|
|
@@ -721,15 +732,15 @@ const ze = fe(
|
|
|
721
732
|
}
|
|
722
733
|
}
|
|
723
734
|
) }),
|
|
724
|
-
|
|
725
|
-
|
|
735
|
+
z && /* @__PURE__ */ s("div", { className: "ds:absolute", children: /* @__PURE__ */ s(
|
|
736
|
+
Re,
|
|
726
737
|
{
|
|
727
|
-
ref:
|
|
728
|
-
siteKey:
|
|
738
|
+
ref: S.captcha.ref,
|
|
739
|
+
siteKey: z,
|
|
729
740
|
size: "invisible",
|
|
730
741
|
announceStatus: !1,
|
|
731
|
-
onChange:
|
|
732
|
-
onError:
|
|
742
|
+
onChange: S.captcha.onChange,
|
|
743
|
+
onError: S.captcha.onError
|
|
733
744
|
}
|
|
734
745
|
) })
|
|
735
746
|
]
|
|
@@ -740,9 +751,9 @@ const ze = fe(
|
|
|
740
751
|
);
|
|
741
752
|
}
|
|
742
753
|
);
|
|
743
|
-
|
|
754
|
+
$e.displayName = "RegistrationForm";
|
|
744
755
|
export {
|
|
745
|
-
|
|
746
|
-
|
|
756
|
+
jr as R,
|
|
757
|
+
$e as a
|
|
747
758
|
};
|
|
748
|
-
//# sourceMappingURL=registration-form-
|
|
759
|
+
//# sourceMappingURL=registration-form-Lz9iKrKo.js.map
|