@sikka/hawa 0.1.54 → 0.1.55
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/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -2
- package/dist/index.mjs +10 -2
- package/package.json +1 -1
- package/src/blocks/AuthForms/SignUpForm.tsx +251 -239
package/dist/index.d.mts
CHANGED
|
@@ -1211,6 +1211,10 @@ type SignInFormTypes = {
|
|
|
1211
1211
|
declare function SignInBlock(): React$1.JSX.Element;
|
|
1212
1212
|
|
|
1213
1213
|
type SignUpFormTypes = {
|
|
1214
|
+
handleLanguage?: () => void;
|
|
1215
|
+
currentLanguage?: any;
|
|
1216
|
+
handleColorMode?: () => void;
|
|
1217
|
+
currentColorMode?: any;
|
|
1214
1218
|
direction?: "rtl" | "ltr";
|
|
1215
1219
|
texts: {
|
|
1216
1220
|
fullNameLabel: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1211,6 +1211,10 @@ type SignInFormTypes = {
|
|
|
1211
1211
|
declare function SignInBlock(): React$1.JSX.Element;
|
|
1212
1212
|
|
|
1213
1213
|
type SignUpFormTypes = {
|
|
1214
|
+
handleLanguage?: () => void;
|
|
1215
|
+
currentLanguage?: any;
|
|
1216
|
+
handleColorMode?: () => void;
|
|
1217
|
+
currentColorMode?: any;
|
|
1214
1218
|
direction?: "rtl" | "ltr";
|
|
1215
1219
|
texts: {
|
|
1216
1220
|
fullNameLabel: string;
|
package/dist/index.js
CHANGED
|
@@ -9019,7 +9019,9 @@ var SignUpForm = function(props) {
|
|
|
9019
9019
|
var methods = (0, import_react_hook_form4.useForm)();
|
|
9020
9020
|
var errors = methods.formState.errors, handleSubmit = methods.handleSubmit, control = methods.control;
|
|
9021
9021
|
var _field_value, _field_value1, _field_value2, _field_value3;
|
|
9022
|
-
return /* @__PURE__ */ import_react76.default.createElement(
|
|
9022
|
+
return /* @__PURE__ */ import_react76.default.createElement("div", {
|
|
9023
|
+
className: "flex flex-col gap-4"
|
|
9024
|
+
}, /* @__PURE__ */ import_react76.default.createElement(Card, {
|
|
9023
9025
|
dir: props.direction
|
|
9024
9026
|
}, /* @__PURE__ */ import_react76.default.createElement(CardContent, {
|
|
9025
9027
|
headless: true
|
|
@@ -9252,7 +9254,12 @@ var SignUpForm = function(props) {
|
|
|
9252
9254
|
onClick: props.handleTwitterSignUp
|
|
9253
9255
|
}, /* @__PURE__ */ import_react76.default.createElement(Icons.twitter, {
|
|
9254
9256
|
className: (0, import_clsx36.default)("h-4 w-4", props.direction === "rtl" ? "ml-2" : "mr-2")
|
|
9255
|
-
}), props.texts.signUpViaTwitterLabel)) : null)
|
|
9257
|
+
}), props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ import_react76.default.createElement(InterfaceSettings, {
|
|
9258
|
+
currentColorMode: props.currentColorMode,
|
|
9259
|
+
currentLanguage: props.currentLanguage,
|
|
9260
|
+
handleColorMode: props.handleColorMode,
|
|
9261
|
+
handleLanguage: props.handleLanguage
|
|
9262
|
+
}));
|
|
9256
9263
|
};
|
|
9257
9264
|
// src/blocks/AuthForms/NewPasswordForm.tsx
|
|
9258
9265
|
var import_react77 = __toESM(require("react"));
|
package/dist/index.mjs
CHANGED
|
@@ -9346,7 +9346,7 @@ var SignUpForm = (props) => {
|
|
|
9346
9346
|
handleSubmit,
|
|
9347
9347
|
control
|
|
9348
9348
|
} = methods;
|
|
9349
|
-
return /* @__PURE__ */ React88.createElement(Card, { dir: props.direction }, /* @__PURE__ */ React88.createElement(CardContent, { headless: true }, /* @__PURE__ */ React88.createElement("div", null, props.showError && /* @__PURE__ */ React88.createElement(
|
|
9349
|
+
return /* @__PURE__ */ React88.createElement("div", { className: "flex flex-col gap-4" }, /* @__PURE__ */ React88.createElement(Card, { dir: props.direction }, /* @__PURE__ */ React88.createElement(CardContent, { headless: true }, /* @__PURE__ */ React88.createElement("div", null, props.showError && /* @__PURE__ */ React88.createElement(
|
|
9350
9350
|
HawaAlert,
|
|
9351
9351
|
{
|
|
9352
9352
|
title: props.errorTitle,
|
|
@@ -9584,7 +9584,15 @@ var SignUpForm = (props) => {
|
|
|
9584
9584
|
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
9585
9585
|
)
|
|
9586
9586
|
}
|
|
9587
|
-
), props.texts.signUpViaTwitterLabel)) : null)
|
|
9587
|
+
), props.texts.signUpViaTwitterLabel)) : null), /* @__PURE__ */ React88.createElement(
|
|
9588
|
+
InterfaceSettings,
|
|
9589
|
+
{
|
|
9590
|
+
currentColorMode: props.currentColorMode,
|
|
9591
|
+
currentLanguage: props.currentLanguage,
|
|
9592
|
+
handleColorMode: props.handleColorMode,
|
|
9593
|
+
handleLanguage: props.handleLanguage
|
|
9594
|
+
}
|
|
9595
|
+
));
|
|
9588
9596
|
};
|
|
9589
9597
|
|
|
9590
9598
|
// src/blocks/AuthForms/NewPasswordForm.tsx
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FC } from "react"
|
|
2
2
|
import {
|
|
3
3
|
HawaTextField,
|
|
4
|
-
|
|
4
|
+
InterfaceSettings,
|
|
5
5
|
HawaAlert,
|
|
6
6
|
HawaCheckbox,
|
|
7
7
|
HawaSelect,
|
|
@@ -13,6 +13,10 @@ import { Icons } from "../../elements/Icons"
|
|
|
13
13
|
import clsx from "clsx"
|
|
14
14
|
|
|
15
15
|
type SignUpFormTypes = {
|
|
16
|
+
handleLanguage?: () => void
|
|
17
|
+
currentLanguage?: any
|
|
18
|
+
handleColorMode?: () => void
|
|
19
|
+
currentColorMode?: any
|
|
16
20
|
direction?: "rtl" | "ltr"
|
|
17
21
|
texts: {
|
|
18
22
|
fullNameLabel: string
|
|
@@ -74,268 +78,276 @@ export const SignUpForm: FC<SignUpFormTypes> = (props) => {
|
|
|
74
78
|
} = methods
|
|
75
79
|
|
|
76
80
|
return (
|
|
77
|
-
<
|
|
78
|
-
<
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
)}
|
|
87
|
-
<FormProvider {...methods}>
|
|
88
|
-
<form onSubmit={handleSubmit((e) => props.handleSignUp(e))}>
|
|
89
|
-
<div>
|
|
90
|
-
{props.signUpFields.map((fld, i) => {
|
|
91
|
-
if (fld === "fullname") {
|
|
92
|
-
return (
|
|
93
|
-
<Controller
|
|
94
|
-
key={i}
|
|
95
|
-
control={control}
|
|
96
|
-
name="fullName"
|
|
97
|
-
render={({ field }) => (
|
|
98
|
-
<HawaTextField
|
|
99
|
-
width="full"
|
|
100
|
-
type="text"
|
|
101
|
-
label={props.texts.fullNameLabel}
|
|
102
|
-
placeholder={props.texts.fullNamePlaceholder}
|
|
103
|
-
helpertext={errors.fullName?.message}
|
|
104
|
-
onChange={field.onChange}
|
|
105
|
-
value={field.value ?? ""}
|
|
106
|
-
/>
|
|
107
|
-
)}
|
|
108
|
-
rules={{
|
|
109
|
-
required: props.texts.fullNameRequiredText,
|
|
110
|
-
}}
|
|
111
|
-
/>
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
if (fld === "email") {
|
|
115
|
-
return (
|
|
116
|
-
<Controller
|
|
117
|
-
control={control}
|
|
118
|
-
name="email"
|
|
119
|
-
render={({ field }) => (
|
|
120
|
-
<HawaTextField
|
|
121
|
-
width="full"
|
|
122
|
-
type="text"
|
|
123
|
-
autoComplete="email"
|
|
124
|
-
label={props.texts.emailLabel}
|
|
125
|
-
helpertext={errors.email?.message}
|
|
126
|
-
placeholder={props.texts.emailPlaceholder}
|
|
127
|
-
onChange={field.onChange}
|
|
128
|
-
value={field.value ?? ""}
|
|
129
|
-
/>
|
|
130
|
-
)}
|
|
131
|
-
rules={{
|
|
132
|
-
required: props.texts.emailRequiredText,
|
|
133
|
-
pattern: {
|
|
134
|
-
value:
|
|
135
|
-
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
136
|
-
message: props.texts.emailInvalidText,
|
|
137
|
-
},
|
|
138
|
-
}}
|
|
139
|
-
/>
|
|
140
|
-
)
|
|
141
|
-
}
|
|
142
|
-
if (fld === "username") {
|
|
143
|
-
return (
|
|
144
|
-
<Controller
|
|
145
|
-
control={control}
|
|
146
|
-
name="username"
|
|
147
|
-
render={({ field }) => (
|
|
148
|
-
<HawaTextField
|
|
149
|
-
width="full"
|
|
150
|
-
type="text"
|
|
151
|
-
autoComplete="username"
|
|
152
|
-
label={props.texts.usernameLabel}
|
|
153
|
-
helpertext={errors.username?.message}
|
|
154
|
-
placeholder={props.texts.usernamePlaceholder}
|
|
155
|
-
onChange={field.onChange}
|
|
156
|
-
value={field.value ?? ""}
|
|
157
|
-
/>
|
|
158
|
-
)}
|
|
159
|
-
rules={{
|
|
160
|
-
required: props.texts.usernameRequired,
|
|
161
|
-
}}
|
|
162
|
-
/>
|
|
163
|
-
)
|
|
164
|
-
}
|
|
165
|
-
})}
|
|
166
|
-
</div>
|
|
167
|
-
<Controller
|
|
168
|
-
control={control}
|
|
169
|
-
name="password"
|
|
170
|
-
render={({ field }) => (
|
|
171
|
-
<HawaTextField
|
|
172
|
-
width="full"
|
|
173
|
-
type="password"
|
|
174
|
-
autoComplete="new-password"
|
|
175
|
-
// defaultValue={field.value ?? ""}
|
|
176
|
-
label={props.texts.passwordLabel}
|
|
177
|
-
placeholder={props.texts.passwordPlaceholder}
|
|
178
|
-
helpertext={errors.password?.message}
|
|
179
|
-
onChange={field.onChange}
|
|
180
|
-
value={field.value ?? ""}
|
|
181
|
-
/>
|
|
182
|
-
)}
|
|
183
|
-
rules={{ required: props.texts.passwordRequiredText }}
|
|
184
|
-
/>
|
|
185
|
-
<Controller
|
|
186
|
-
control={control}
|
|
187
|
-
name="confirm_password"
|
|
188
|
-
render={({ field }) => (
|
|
189
|
-
<HawaTextField
|
|
190
|
-
width="full"
|
|
191
|
-
type="password"
|
|
192
|
-
autoComplete="new-password"
|
|
193
|
-
// defaultValue={field.value ?? ""}
|
|
194
|
-
label={props.texts.confirmPasswordLabel}
|
|
195
|
-
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
196
|
-
helpertext={errors.confirm_password?.message}
|
|
197
|
-
onChange={field.onChange}
|
|
198
|
-
value={field.value ?? ""}
|
|
199
|
-
/>
|
|
200
|
-
)}
|
|
201
|
-
rules={{ required: props.texts.passwordRequiredText }}
|
|
81
|
+
<div className="flex flex-col gap-4">
|
|
82
|
+
<Card dir={props.direction}>
|
|
83
|
+
<CardContent headless>
|
|
84
|
+
<div>
|
|
85
|
+
{props.showError && (
|
|
86
|
+
<HawaAlert
|
|
87
|
+
title={props.errorTitle}
|
|
88
|
+
text={props.errorText}
|
|
89
|
+
severity="error"
|
|
202
90
|
/>
|
|
203
|
-
|
|
91
|
+
)}
|
|
92
|
+
<FormProvider {...methods}>
|
|
93
|
+
<form onSubmit={handleSubmit((e) => props.handleSignUp(e))}>
|
|
94
|
+
<div>
|
|
95
|
+
{props.signUpFields.map((fld, i) => {
|
|
96
|
+
if (fld === "fullname") {
|
|
97
|
+
return (
|
|
98
|
+
<Controller
|
|
99
|
+
key={i}
|
|
100
|
+
control={control}
|
|
101
|
+
name="fullName"
|
|
102
|
+
render={({ field }) => (
|
|
103
|
+
<HawaTextField
|
|
104
|
+
width="full"
|
|
105
|
+
type="text"
|
|
106
|
+
label={props.texts.fullNameLabel}
|
|
107
|
+
placeholder={props.texts.fullNamePlaceholder}
|
|
108
|
+
helpertext={errors.fullName?.message}
|
|
109
|
+
onChange={field.onChange}
|
|
110
|
+
value={field.value ?? ""}
|
|
111
|
+
/>
|
|
112
|
+
)}
|
|
113
|
+
rules={{
|
|
114
|
+
required: props.texts.fullNameRequiredText,
|
|
115
|
+
}}
|
|
116
|
+
/>
|
|
117
|
+
)
|
|
118
|
+
}
|
|
119
|
+
if (fld === "email") {
|
|
120
|
+
return (
|
|
121
|
+
<Controller
|
|
122
|
+
control={control}
|
|
123
|
+
name="email"
|
|
124
|
+
render={({ field }) => (
|
|
125
|
+
<HawaTextField
|
|
126
|
+
width="full"
|
|
127
|
+
type="text"
|
|
128
|
+
autoComplete="email"
|
|
129
|
+
label={props.texts.emailLabel}
|
|
130
|
+
helpertext={errors.email?.message}
|
|
131
|
+
placeholder={props.texts.emailPlaceholder}
|
|
132
|
+
onChange={field.onChange}
|
|
133
|
+
value={field.value ?? ""}
|
|
134
|
+
/>
|
|
135
|
+
)}
|
|
136
|
+
rules={{
|
|
137
|
+
required: props.texts.emailRequiredText,
|
|
138
|
+
pattern: {
|
|
139
|
+
value:
|
|
140
|
+
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
141
|
+
message: props.texts.emailInvalidText,
|
|
142
|
+
},
|
|
143
|
+
}}
|
|
144
|
+
/>
|
|
145
|
+
)
|
|
146
|
+
}
|
|
147
|
+
if (fld === "username") {
|
|
148
|
+
return (
|
|
149
|
+
<Controller
|
|
150
|
+
control={control}
|
|
151
|
+
name="username"
|
|
152
|
+
render={({ field }) => (
|
|
153
|
+
<HawaTextField
|
|
154
|
+
width="full"
|
|
155
|
+
type="text"
|
|
156
|
+
autoComplete="username"
|
|
157
|
+
label={props.texts.usernameLabel}
|
|
158
|
+
helpertext={errors.username?.message}
|
|
159
|
+
placeholder={props.texts.usernamePlaceholder}
|
|
160
|
+
onChange={field.onChange}
|
|
161
|
+
value={field.value ?? ""}
|
|
162
|
+
/>
|
|
163
|
+
)}
|
|
164
|
+
rules={{
|
|
165
|
+
required: props.texts.usernameRequired,
|
|
166
|
+
}}
|
|
167
|
+
/>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
})}
|
|
171
|
+
</div>
|
|
204
172
|
<Controller
|
|
205
173
|
control={control}
|
|
206
|
-
name="
|
|
174
|
+
name="password"
|
|
207
175
|
render={({ field }) => (
|
|
208
176
|
<HawaTextField
|
|
209
177
|
width="full"
|
|
210
|
-
type="
|
|
211
|
-
|
|
212
|
-
|
|
178
|
+
type="password"
|
|
179
|
+
autoComplete="new-password"
|
|
180
|
+
// defaultValue={field.value ?? ""}
|
|
181
|
+
label={props.texts.passwordLabel}
|
|
213
182
|
placeholder={props.texts.passwordPlaceholder}
|
|
214
183
|
helpertext={errors.password?.message}
|
|
184
|
+
onChange={field.onChange}
|
|
215
185
|
value={field.value ?? ""}
|
|
186
|
+
/>
|
|
187
|
+
)}
|
|
188
|
+
rules={{ required: props.texts.passwordRequiredText }}
|
|
189
|
+
/>
|
|
190
|
+
<Controller
|
|
191
|
+
control={control}
|
|
192
|
+
name="confirm_password"
|
|
193
|
+
render={({ field }) => (
|
|
194
|
+
<HawaTextField
|
|
195
|
+
width="full"
|
|
196
|
+
type="password"
|
|
197
|
+
autoComplete="new-password"
|
|
198
|
+
// defaultValue={field.value ?? ""}
|
|
199
|
+
label={props.texts.confirmPasswordLabel}
|
|
200
|
+
placeholder={props.texts.confirmPasswordPlaceholder}
|
|
201
|
+
helpertext={errors.confirm_password?.message}
|
|
216
202
|
onChange={field.onChange}
|
|
203
|
+
value={field.value ?? ""}
|
|
217
204
|
/>
|
|
218
205
|
)}
|
|
206
|
+
rules={{ required: props.texts.passwordRequiredText }}
|
|
219
207
|
/>
|
|
220
|
-
|
|
221
|
-
{props.showUserSource && (
|
|
222
|
-
<div>
|
|
208
|
+
{props.showRefCode && (
|
|
223
209
|
<Controller
|
|
224
210
|
control={control}
|
|
225
|
-
name="
|
|
211
|
+
name="refCode"
|
|
226
212
|
render={({ field }) => (
|
|
227
|
-
<
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
{ value: "other", label: "Other" },
|
|
237
|
-
]}
|
|
238
|
-
onChange={(e: any) => {
|
|
239
|
-
field.onChange(e.value)
|
|
240
|
-
}}
|
|
213
|
+
<HawaTextField
|
|
214
|
+
width="full"
|
|
215
|
+
type="text"
|
|
216
|
+
defaultValue={field.value ?? ""}
|
|
217
|
+
label={props.texts.refCode}
|
|
218
|
+
placeholder={props.texts.passwordPlaceholder}
|
|
219
|
+
helpertext={errors.password?.message}
|
|
220
|
+
value={field.value ?? ""}
|
|
221
|
+
onChange={field.onChange}
|
|
241
222
|
/>
|
|
242
223
|
)}
|
|
243
224
|
/>
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
{
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
225
|
+
)}
|
|
226
|
+
{props.showUserSource && (
|
|
227
|
+
<div>
|
|
228
|
+
<Controller
|
|
229
|
+
control={control}
|
|
230
|
+
name="reference"
|
|
231
|
+
render={({ field }) => (
|
|
232
|
+
<HawaSelect
|
|
233
|
+
label="How did you learn about us?"
|
|
234
|
+
isCreatable={false}
|
|
235
|
+
isMulti={false ?? false}
|
|
236
|
+
isSearchable={false}
|
|
237
|
+
isClearable={false ?? false}
|
|
238
|
+
options={[
|
|
239
|
+
{ value: "friend", label: "From a friend" },
|
|
240
|
+
{ value: "ad", label: "Advertisement" },
|
|
241
|
+
{ value: "other", label: "Other" },
|
|
242
|
+
]}
|
|
243
|
+
onChange={(e: any) => {
|
|
244
|
+
field.onChange(e.value)
|
|
245
|
+
}}
|
|
246
|
+
/>
|
|
247
|
+
)}
|
|
266
248
|
/>
|
|
249
|
+
</div>
|
|
250
|
+
)}
|
|
251
|
+
{props.showTermsOption && (
|
|
252
|
+
<Controller
|
|
253
|
+
control={control}
|
|
254
|
+
name="terms_accepted"
|
|
255
|
+
render={({ field }) => (
|
|
256
|
+
<HawaCheckbox
|
|
257
|
+
id="terms_accepted"
|
|
258
|
+
helperText={errors.terms_accepted?.message}
|
|
259
|
+
onChange={(e) => field.onChange(e)}
|
|
260
|
+
label={
|
|
261
|
+
<span>
|
|
262
|
+
{props.texts.iAcceptText}{" "}
|
|
263
|
+
<a
|
|
264
|
+
onClick={props.handleRouteToTOS}
|
|
265
|
+
className="clickable-link"
|
|
266
|
+
>
|
|
267
|
+
{props.texts.termsText}
|
|
268
|
+
</a>
|
|
269
|
+
</span>
|
|
270
|
+
}
|
|
271
|
+
/>
|
|
272
|
+
)}
|
|
273
|
+
rules={{ required: props.texts.termsRequiredText }}
|
|
274
|
+
/>
|
|
275
|
+
)}
|
|
276
|
+
{props.showNewsletterOption && (
|
|
277
|
+
<Controller
|
|
278
|
+
control={control}
|
|
279
|
+
name="newsletter_accepted"
|
|
280
|
+
render={({ field }) => (
|
|
281
|
+
<HawaCheckbox
|
|
282
|
+
id="newsletter_accepted"
|
|
283
|
+
label={props.texts.subscribeToNewsletter}
|
|
284
|
+
onChange={field.onChange}
|
|
285
|
+
/>
|
|
286
|
+
)}
|
|
287
|
+
/>
|
|
288
|
+
)}
|
|
289
|
+
|
|
290
|
+
<Button className="w-full" isLoading={props.isLoading}>
|
|
291
|
+
{props.texts.signUpText}
|
|
292
|
+
</Button>
|
|
293
|
+
</form>
|
|
294
|
+
</FormProvider>
|
|
295
|
+
<div className="flex flex-row items-center justify-center gap-1 p-3 text-center text-sm font-semibold dark:text-white">
|
|
296
|
+
<span>{props.texts.existingUserText}</span>
|
|
297
|
+
<span
|
|
298
|
+
onClick={props.handleRouteToSignIn}
|
|
299
|
+
className="clickable-link"
|
|
300
|
+
>
|
|
301
|
+
{props.texts.signInText}
|
|
302
|
+
</span>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</CardContent>
|
|
306
|
+
|
|
307
|
+
{props.viaGithub || props.viaGoogle || props.viaTwitter ? (
|
|
308
|
+
<CardFooter className="grid grid-cols-1 gap-2 ">
|
|
309
|
+
{props.viaGoogle && (
|
|
310
|
+
<Button variant="outline" onClick={props.handleGoogleSignUp}>
|
|
311
|
+
<Icons.google
|
|
312
|
+
className={clsx(
|
|
313
|
+
"h-4 w-4",
|
|
314
|
+
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
267
315
|
)}
|
|
268
|
-
rules={{ required: props.texts.termsRequiredText }}
|
|
269
316
|
/>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
onChange={field.onChange}
|
|
280
|
-
/>
|
|
317
|
+
{props.texts.signUpViaGoogleLabel}
|
|
318
|
+
</Button>
|
|
319
|
+
)}
|
|
320
|
+
{props.viaGithub && (
|
|
321
|
+
<Button variant="outline" onClick={props.handleGithubSignUp}>
|
|
322
|
+
<Icons.gitHub
|
|
323
|
+
className={clsx(
|
|
324
|
+
"h-4 w-4",
|
|
325
|
+
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
281
326
|
)}
|
|
282
327
|
/>
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
<Button className="w-full" isLoading={props.isLoading}>
|
|
286
|
-
{props.texts.signUpText}
|
|
328
|
+
{props.texts.signUpViaGithubLabel}
|
|
287
329
|
</Button>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
)}
|
|
311
|
-
/>
|
|
312
|
-
{props.texts.signUpViaGoogleLabel}
|
|
313
|
-
</Button>
|
|
314
|
-
)}
|
|
315
|
-
{props.viaGithub && (
|
|
316
|
-
<Button variant="outline" onClick={props.handleGithubSignUp}>
|
|
317
|
-
<Icons.gitHub
|
|
318
|
-
className={clsx(
|
|
319
|
-
"h-4 w-4",
|
|
320
|
-
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
321
|
-
)}
|
|
322
|
-
/>
|
|
323
|
-
{props.texts.signUpViaGithubLabel}
|
|
324
|
-
</Button>
|
|
325
|
-
)}
|
|
326
|
-
{props.viaTwitter && (
|
|
327
|
-
<Button variant="outline" onClick={props.handleTwitterSignUp}>
|
|
328
|
-
<Icons.twitter
|
|
329
|
-
className={clsx(
|
|
330
|
-
"h-4 w-4",
|
|
331
|
-
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
332
|
-
)}
|
|
333
|
-
/>
|
|
334
|
-
{props.texts.signUpViaTwitterLabel}
|
|
335
|
-
</Button>
|
|
336
|
-
)}
|
|
337
|
-
</CardFooter>
|
|
338
|
-
) : null}
|
|
339
|
-
</Card>
|
|
330
|
+
)}
|
|
331
|
+
{props.viaTwitter && (
|
|
332
|
+
<Button variant="outline" onClick={props.handleTwitterSignUp}>
|
|
333
|
+
<Icons.twitter
|
|
334
|
+
className={clsx(
|
|
335
|
+
"h-4 w-4",
|
|
336
|
+
props.direction === "rtl" ? "ml-2" : "mr-2"
|
|
337
|
+
)}
|
|
338
|
+
/>
|
|
339
|
+
{props.texts.signUpViaTwitterLabel}
|
|
340
|
+
</Button>
|
|
341
|
+
)}
|
|
342
|
+
</CardFooter>
|
|
343
|
+
) : null}
|
|
344
|
+
</Card>
|
|
345
|
+
<InterfaceSettings
|
|
346
|
+
currentColorMode={props.currentColorMode}
|
|
347
|
+
currentLanguage={props.currentLanguage}
|
|
348
|
+
handleColorMode={props.handleColorMode}
|
|
349
|
+
handleLanguage={props.handleLanguage}
|
|
350
|
+
/>
|
|
351
|
+
</div>
|
|
340
352
|
)
|
|
341
353
|
}
|