@sikka/hawa 0.27.19-next → 0.27.20-next
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/blocks/auth/index.d.mts +5 -0
- package/dist/blocks/auth/index.d.ts +5 -0
- package/dist/blocks/auth/index.js +256 -247
- package/dist/blocks/auth/index.mjs +256 -247
- package/dist/blocks/index.d.mts +5 -0
- package/dist/blocks/index.d.ts +5 -0
- package/dist/blocks/index.js +256 -247
- package/dist/blocks/index.mjs +256 -247
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +256 -247
- package/dist/index.mjs +256 -247
- package/package.json +1 -1
@@ -3547,7 +3547,7 @@ var RegisterForm = ({
|
|
3547
3547
|
showNewsletterOption = false,
|
3548
3548
|
...props
|
3549
3549
|
}) => {
|
3550
|
-
var _a, _b, _c, _d, _e, _f;
|
3550
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
3551
3551
|
const [passwordVisible, setPasswordVisible] = (0, import_react15.useState)(false);
|
3552
3552
|
const thirdPartyAuthTexts = {
|
3553
3553
|
continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
|
@@ -3613,281 +3613,290 @@ var RegisterForm = ({
|
|
3613
3613
|
const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
|
3614
3614
|
resolver: (0, import_zod2.zodResolver)(formSchema)
|
3615
3615
|
});
|
3616
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3617
|
-
|
3618
|
-
{
|
3619
|
-
title: props.errorTitle,
|
3620
|
-
text: props.errorText,
|
3621
|
-
severity: "error"
|
3622
|
-
}
|
3623
|
-
), /* @__PURE__ */ import_react15.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react15.default.createElement(
|
3624
|
-
"form",
|
3616
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3617
|
+
"div",
|
3625
3618
|
{
|
3626
|
-
|
3627
|
-
|
3628
|
-
|
3629
|
-
|
3630
|
-
} else {
|
3631
|
-
console.log(
|
3632
|
-
"Form is submitted but onRegister prop is missing"
|
3633
|
-
);
|
3634
|
-
}
|
3635
|
-
}),
|
3636
|
-
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
3619
|
+
className: cn(
|
3620
|
+
"hawa-flex hawa-flex-col hawa-gap-4",
|
3621
|
+
(_g = props.classNames) == null ? void 0 : _g.root
|
3622
|
+
)
|
3637
3623
|
},
|
3638
|
-
/* @__PURE__ */ import_react15.default.createElement(
|
3639
|
-
|
3640
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3641
|
-
import_react_hook_form2.Controller,
|
3642
|
-
{
|
3643
|
-
key: i,
|
3644
|
-
control,
|
3645
|
-
name: "fullName",
|
3646
|
-
render: ({ field }) => {
|
3647
|
-
var _a2, _b2, _c2;
|
3648
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3649
|
-
Input,
|
3650
|
-
{
|
3651
|
-
width: "full",
|
3652
|
-
label: ((_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label) || "Full Name",
|
3653
|
-
placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
|
3654
|
-
helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
|
3655
|
-
...field
|
3656
|
-
}
|
3657
|
-
);
|
3658
|
-
}
|
3659
|
-
}
|
3660
|
-
);
|
3661
|
-
}
|
3662
|
-
if (fld === "email") {
|
3663
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3664
|
-
import_react_hook_form2.Controller,
|
3665
|
-
{
|
3666
|
-
key: i,
|
3667
|
-
control,
|
3668
|
-
name: "email",
|
3669
|
-
render: ({ field }) => {
|
3670
|
-
var _a2, _b2, _c2;
|
3671
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3672
|
-
Input,
|
3673
|
-
{
|
3674
|
-
dir: "ltr",
|
3675
|
-
inputProps: {
|
3676
|
-
className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
|
3677
|
-
},
|
3678
|
-
width: "full",
|
3679
|
-
autoComplete: "email",
|
3680
|
-
label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
|
3681
|
-
helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
|
3682
|
-
placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
|
3683
|
-
...field
|
3684
|
-
}
|
3685
|
-
);
|
3686
|
-
}
|
3687
|
-
}
|
3688
|
-
);
|
3689
|
-
}
|
3690
|
-
if (fld === "username") {
|
3691
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3692
|
-
import_react_hook_form2.Controller,
|
3693
|
-
{
|
3694
|
-
key: i,
|
3695
|
-
control,
|
3696
|
-
name: "username",
|
3697
|
-
render: ({ field }) => {
|
3698
|
-
var _a2, _b2, _c2, _d2;
|
3699
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3700
|
-
Input,
|
3701
|
-
{
|
3702
|
-
width: "full",
|
3703
|
-
autoComplete: "username",
|
3704
|
-
label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
|
3705
|
-
labelProps: {
|
3706
|
-
...(_b2 = props.usernameOptions) == null ? void 0 : _b2.label
|
3707
|
-
},
|
3708
|
-
helperText: (_c2 = formState.errors.username) == null ? void 0 : _c2.message,
|
3709
|
-
placeholder: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.placeholder,
|
3710
|
-
...field
|
3711
|
-
}
|
3712
|
-
);
|
3713
|
-
}
|
3714
|
-
}
|
3715
|
-
);
|
3716
|
-
}
|
3717
|
-
})),
|
3718
|
-
/* @__PURE__ */ import_react15.default.createElement(
|
3719
|
-
import_react_hook_form2.Controller,
|
3624
|
+
/* @__PURE__ */ import_react15.default.createElement(Card, { dir: props.direction, className: cn((_h = props.classNames) == null ? void 0 : _h.card) }, /* @__PURE__ */ import_react15.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react15.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react15.default.createElement(
|
3625
|
+
Alert,
|
3720
3626
|
{
|
3721
|
-
|
3722
|
-
|
3723
|
-
|
3724
|
-
var _a2, _b2, _c2;
|
3725
|
-
return /* @__PURE__ */ import_react15.default.createElement(
|
3726
|
-
Input,
|
3727
|
-
{
|
3728
|
-
width: "full",
|
3729
|
-
type: passwordVisible ? "text" : "password",
|
3730
|
-
endIcon: /* @__PURE__ */ import_react15.default.createElement(
|
3731
|
-
"div",
|
3732
|
-
{
|
3733
|
-
className: "hawa-cursor-pointer",
|
3734
|
-
onClick: () => setPasswordVisible(!passwordVisible)
|
3735
|
-
},
|
3736
|
-
passwordVisible ? /* @__PURE__ */ import_react15.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react15.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
|
3737
|
-
" "
|
3738
|
-
),
|
3739
|
-
autoComplete: "new-password",
|
3740
|
-
label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
|
3741
|
-
placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
|
3742
|
-
helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
|
3743
|
-
...field
|
3744
|
-
}
|
3745
|
-
);
|
3746
|
-
}
|
3627
|
+
title: props.errorTitle,
|
3628
|
+
text: props.errorText,
|
3629
|
+
severity: "error"
|
3747
3630
|
}
|
3748
|
-
),
|
3749
|
-
|
3750
|
-
import_react_hook_form2.Controller,
|
3631
|
+
), /* @__PURE__ */ import_react15.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react15.default.createElement(
|
3632
|
+
"form",
|
3751
3633
|
{
|
3752
|
-
|
3753
|
-
|
3754
|
-
|
3755
|
-
|
3634
|
+
noValidate: true,
|
3635
|
+
onSubmit: handleSubmit((e) => {
|
3636
|
+
if (props.onRegister) {
|
3637
|
+
return props.onRegister(e);
|
3638
|
+
} else {
|
3639
|
+
console.log(
|
3640
|
+
"Form is submitted but onRegister prop is missing"
|
3641
|
+
);
|
3642
|
+
}
|
3643
|
+
}),
|
3644
|
+
className: "hawa-flex hawa-flex-col hawa-gap-4"
|
3645
|
+
},
|
3646
|
+
/* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, registerFields.map((fld, i) => {
|
3647
|
+
if (fld === "fullname") {
|
3756
3648
|
return /* @__PURE__ */ import_react15.default.createElement(
|
3757
|
-
|
3649
|
+
import_react_hook_form2.Controller,
|
3758
3650
|
{
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3762
|
-
|
3763
|
-
|
3764
|
-
|
3765
|
-
|
3651
|
+
key: i,
|
3652
|
+
control,
|
3653
|
+
name: "fullName",
|
3654
|
+
render: ({ field }) => {
|
3655
|
+
var _a2, _b2, _c2;
|
3656
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3657
|
+
Input,
|
3658
|
+
{
|
3659
|
+
width: "full",
|
3660
|
+
label: ((_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label) || "Full Name",
|
3661
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
|
3662
|
+
helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
|
3663
|
+
...field
|
3664
|
+
}
|
3665
|
+
);
|
3666
|
+
}
|
3766
3667
|
}
|
3767
3668
|
);
|
3768
3669
|
}
|
3769
|
-
|
3770
|
-
),
|
3771
|
-
props.additionalInputs,
|
3772
|
-
props.showRefCode && /* @__PURE__ */ import_react15.default.createElement(
|
3773
|
-
import_react_hook_form2.Controller,
|
3774
|
-
{
|
3775
|
-
control,
|
3776
|
-
name: "refCode",
|
3777
|
-
render: ({ field }) => {
|
3778
|
-
var _a2;
|
3670
|
+
if (fld === "email") {
|
3779
3671
|
return /* @__PURE__ */ import_react15.default.createElement(
|
3780
|
-
|
3672
|
+
import_react_hook_form2.Controller,
|
3781
3673
|
{
|
3782
|
-
|
3783
|
-
|
3784
|
-
|
3785
|
-
|
3786
|
-
|
3674
|
+
key: i,
|
3675
|
+
control,
|
3676
|
+
name: "email",
|
3677
|
+
render: ({ field }) => {
|
3678
|
+
var _a2, _b2, _c2;
|
3679
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3680
|
+
Input,
|
3681
|
+
{
|
3682
|
+
dir: "ltr",
|
3683
|
+
inputProps: {
|
3684
|
+
className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
|
3685
|
+
},
|
3686
|
+
width: "full",
|
3687
|
+
autoComplete: "email",
|
3688
|
+
label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
|
3689
|
+
helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
|
3690
|
+
placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
|
3691
|
+
...field
|
3692
|
+
}
|
3693
|
+
);
|
3694
|
+
}
|
3787
3695
|
}
|
3788
3696
|
);
|
3789
3697
|
}
|
3790
|
-
|
3791
|
-
),
|
3792
|
-
props.showUserSource && /* @__PURE__ */ import_react15.default.createElement(
|
3793
|
-
import_react_hook_form2.Controller,
|
3794
|
-
{
|
3795
|
-
control,
|
3796
|
-
name: "reference",
|
3797
|
-
render: ({ field }) => {
|
3798
|
-
var _a2, _b2;
|
3698
|
+
if (fld === "username") {
|
3799
3699
|
return /* @__PURE__ */ import_react15.default.createElement(
|
3800
|
-
|
3700
|
+
import_react_hook_form2.Controller,
|
3801
3701
|
{
|
3802
|
-
|
3803
|
-
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3702
|
+
key: i,
|
3703
|
+
control,
|
3704
|
+
name: "username",
|
3705
|
+
render: ({ field }) => {
|
3706
|
+
var _a2, _b2, _c2, _d2;
|
3707
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3708
|
+
Input,
|
3709
|
+
{
|
3710
|
+
width: "full",
|
3711
|
+
autoComplete: "username",
|
3712
|
+
label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
|
3713
|
+
labelProps: {
|
3714
|
+
...(_b2 = props.usernameOptions) == null ? void 0 : _b2.label
|
3715
|
+
},
|
3716
|
+
helperText: (_c2 = formState.errors.username) == null ? void 0 : _c2.message,
|
3717
|
+
placeholder: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.placeholder,
|
3718
|
+
...field
|
3719
|
+
}
|
3720
|
+
);
|
3811
3721
|
}
|
3812
3722
|
}
|
3813
3723
|
);
|
3814
3724
|
}
|
3815
|
-
}
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3725
|
+
})),
|
3726
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
3727
|
+
import_react_hook_form2.Controller,
|
3728
|
+
{
|
3729
|
+
control,
|
3730
|
+
name: "password",
|
3731
|
+
render: ({ field }) => {
|
3732
|
+
var _a2, _b2, _c2;
|
3733
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3734
|
+
Input,
|
3735
|
+
{
|
3736
|
+
width: "full",
|
3737
|
+
type: passwordVisible ? "text" : "password",
|
3738
|
+
endIcon: /* @__PURE__ */ import_react15.default.createElement(
|
3739
|
+
"div",
|
3740
|
+
{
|
3741
|
+
className: "hawa-cursor-pointer",
|
3742
|
+
onClick: () => setPasswordVisible(!passwordVisible)
|
3743
|
+
},
|
3744
|
+
passwordVisible ? /* @__PURE__ */ import_react15.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react15.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
|
3745
|
+
" "
|
3746
|
+
),
|
3747
|
+
autoComplete: "new-password",
|
3748
|
+
label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
|
3749
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
|
3750
|
+
helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
|
3751
|
+
...field
|
3752
|
+
}
|
3753
|
+
);
|
3754
|
+
}
|
3755
|
+
}
|
3756
|
+
),
|
3757
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
3758
|
+
import_react_hook_form2.Controller,
|
3759
|
+
{
|
3760
|
+
control,
|
3761
|
+
name: "confirm_password",
|
3762
|
+
render: ({ field }) => {
|
3763
|
+
var _a2, _b2, _c2;
|
3764
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3765
|
+
Input,
|
3766
|
+
{
|
3767
|
+
width: "full",
|
3768
|
+
type: "password",
|
3769
|
+
autoComplete: "new-password",
|
3770
|
+
label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
|
3771
|
+
placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
|
3772
|
+
helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
|
3773
|
+
...field
|
3774
|
+
}
|
3775
|
+
);
|
3776
|
+
}
|
3777
|
+
}
|
3778
|
+
),
|
3779
|
+
props.additionalInputs,
|
3780
|
+
props.showRefCode && /* @__PURE__ */ import_react15.default.createElement(
|
3781
|
+
import_react_hook_form2.Controller,
|
3782
|
+
{
|
3783
|
+
control,
|
3784
|
+
name: "refCode",
|
3785
|
+
render: ({ field }) => {
|
3786
|
+
var _a2;
|
3787
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3788
|
+
Input,
|
3789
|
+
{
|
3790
|
+
width: "full",
|
3791
|
+
label: texts == null ? void 0 : texts.refCode,
|
3792
|
+
placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
|
3793
|
+
helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
|
3794
|
+
...field
|
3795
|
+
}
|
3796
|
+
);
|
3797
|
+
}
|
3798
|
+
}
|
3799
|
+
),
|
3800
|
+
props.showUserSource && /* @__PURE__ */ import_react15.default.createElement(
|
3801
|
+
import_react_hook_form2.Controller,
|
3802
|
+
{
|
3803
|
+
control,
|
3804
|
+
name: "reference",
|
3805
|
+
render: ({ field }) => {
|
3806
|
+
var _a2, _b2;
|
3807
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3808
|
+
Select,
|
3809
|
+
{
|
3810
|
+
label: ((_a2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _a2.label) || "How did you learn about us?",
|
3811
|
+
placeholder: (_b2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _b2.placeholder,
|
3812
|
+
isCreatable: false,
|
3813
|
+
isMulti: false,
|
3814
|
+
isSearchable: false,
|
3815
|
+
isClearable: false,
|
3816
|
+
options: props.userReferenceOptions,
|
3817
|
+
onChange: (e) => {
|
3818
|
+
field.onChange(e.value);
|
3819
|
+
}
|
3820
|
+
}
|
3821
|
+
);
|
3822
|
+
}
|
3823
|
+
}
|
3824
|
+
),
|
3825
|
+
showTermsOption || showNewsletterOption ? /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ import_react15.default.createElement(
|
3826
|
+
import_react_hook_form2.Controller,
|
3827
|
+
{
|
3828
|
+
control,
|
3829
|
+
name: "terms_accepted",
|
3830
|
+
render: ({ field }) => {
|
3831
|
+
var _a2, _b2;
|
3832
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
3833
|
+
Checkbox,
|
3834
|
+
{
|
3835
|
+
id: "terms_accepted",
|
3836
|
+
helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
|
3837
|
+
onCheckedChange: (e) => field.onChange(e),
|
3838
|
+
label: /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ import_react15.default.createElement("span", null, (texts == null ? void 0 : texts.iAcceptText) || "I accept the "), " ", /* @__PURE__ */ import_react15.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react15.default.createElement(
|
3839
|
+
"a",
|
3840
|
+
{
|
3841
|
+
onClick: props.onRouteToTOS,
|
3842
|
+
className: "clickable-link"
|
3843
|
+
},
|
3844
|
+
(texts == null ? void 0 : texts.termsText) || "Terms of Service"
|
3845
|
+
)))
|
3846
|
+
}
|
3847
|
+
);
|
3848
|
+
}
|
3849
|
+
}
|
3850
|
+
), showNewsletterOption && /* @__PURE__ */ import_react15.default.createElement(
|
3851
|
+
import_react_hook_form2.Controller,
|
3852
|
+
{
|
3853
|
+
control,
|
3854
|
+
name: "newsletter_accepted",
|
3855
|
+
render: ({ field }) => /* @__PURE__ */ import_react15.default.createElement(
|
3825
3856
|
Checkbox,
|
3826
3857
|
{
|
3827
|
-
id: "
|
3828
|
-
|
3829
|
-
onCheckedChange:
|
3830
|
-
label: /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ import_react15.default.createElement("span", null, (texts == null ? void 0 : texts.iAcceptText) || "I accept the "), " ", /* @__PURE__ */ import_react15.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react15.default.createElement(
|
3831
|
-
"a",
|
3832
|
-
{
|
3833
|
-
onClick: props.onRouteToTOS,
|
3834
|
-
className: "clickable-link"
|
3835
|
-
},
|
3836
|
-
(texts == null ? void 0 : texts.termsText) || "Terms of Service"
|
3837
|
-
)))
|
3858
|
+
id: "newsletter_accepted",
|
3859
|
+
label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
|
3860
|
+
onCheckedChange: field.onChange
|
3838
3861
|
}
|
3839
|
-
)
|
3862
|
+
)
|
3840
3863
|
}
|
3841
|
-
|
3842
|
-
|
3843
|
-
|
3864
|
+
)) : null,
|
3865
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
3866
|
+
Button,
|
3867
|
+
{
|
3868
|
+
className: " hawa-w-full",
|
3869
|
+
type: "submit",
|
3870
|
+
isLoading: props.isLoading,
|
3871
|
+
disabled: props.isLoading
|
3872
|
+
},
|
3873
|
+
(texts == null ? void 0 : texts.registerText) || "Register"
|
3874
|
+
),
|
3875
|
+
props.additionalButtons
|
3876
|
+
)), /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-justify-center hawa-gap-1 hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-white" }, /* @__PURE__ */ import_react15.default.createElement("span", null, (texts == null ? void 0 : texts.existingUserText) || "Already have an account?"), /* @__PURE__ */ import_react15.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react15.default.createElement(
|
3877
|
+
CardFooter,
|
3844
3878
|
{
|
3845
|
-
|
3846
|
-
|
3847
|
-
render: ({ field }) => /* @__PURE__ */ import_react15.default.createElement(
|
3848
|
-
Checkbox,
|
3849
|
-
{
|
3850
|
-
id: "newsletter_accepted",
|
3851
|
-
label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
|
3852
|
-
onCheckedChange: field.onChange
|
3853
|
-
}
|
3879
|
+
className: cn(
|
3880
|
+
props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
|
3854
3881
|
)
|
3855
|
-
}
|
3856
|
-
)) : null,
|
3857
|
-
/* @__PURE__ */ import_react15.default.createElement(
|
3858
|
-
Button,
|
3859
|
-
{
|
3860
|
-
className: " hawa-w-full",
|
3861
|
-
type: "submit",
|
3862
|
-
isLoading: props.isLoading,
|
3863
|
-
disabled: props.isLoading
|
3864
3882
|
},
|
3865
|
-
|
3866
|
-
|
3867
|
-
|
3868
|
-
|
3869
|
-
|
3870
|
-
|
3871
|
-
|
3872
|
-
|
3883
|
+
/* @__PURE__ */ import_react15.default.createElement(
|
3884
|
+
AuthButtons,
|
3885
|
+
{
|
3886
|
+
texts: thirdPartyAuthTexts,
|
3887
|
+
viaGoogle: props.viaGoogle,
|
3888
|
+
viaGithub: props.viaGithub,
|
3889
|
+
viaTwitter: props.viaTwitter,
|
3890
|
+
isGoogleLoading: props.isGoogleLoading,
|
3891
|
+
isGithubLoading: props.isGithubLoading,
|
3892
|
+
isTwitterLoading: props.isTwitterLoading,
|
3893
|
+
handleGoogle: props.onGoogleRegister,
|
3894
|
+
handleGithub: props.onGithubRegister,
|
3895
|
+
handleTwitter: props.onTwitterRegister
|
3896
|
+
}
|
3873
3897
|
)
|
3874
|
-
|
3875
|
-
|
3876
|
-
AuthButtons,
|
3877
|
-
{
|
3878
|
-
texts: thirdPartyAuthTexts,
|
3879
|
-
viaGoogle: props.viaGoogle,
|
3880
|
-
viaGithub: props.viaGithub,
|
3881
|
-
viaTwitter: props.viaTwitter,
|
3882
|
-
isGoogleLoading: props.isGoogleLoading,
|
3883
|
-
isGithubLoading: props.isGithubLoading,
|
3884
|
-
isTwitterLoading: props.isTwitterLoading,
|
3885
|
-
handleGoogle: props.onGoogleRegister,
|
3886
|
-
handleGithub: props.onGithubRegister,
|
3887
|
-
handleTwitter: props.onTwitterRegister
|
3888
|
-
}
|
3889
|
-
)
|
3890
|
-
) : null));
|
3898
|
+
) : null)
|
3899
|
+
);
|
3891
3900
|
};
|
3892
3901
|
|
3893
3902
|
// blocks/auth/AppLanding.tsx
|