@sikka/hawa 0.27.19-next → 0.27.21-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/index.js CHANGED
@@ -9585,7 +9585,7 @@ var RegisterForm = ({
9585
9585
  showNewsletterOption = false,
9586
9586
  ...props
9587
9587
  }) => {
9588
- var _a, _b, _c, _d, _e, _f;
9588
+ var _a, _b, _c, _d, _e, _f, _g, _h;
9589
9589
  const [passwordVisible, setPasswordVisible] = (0, import_react47.useState)(false);
9590
9590
  const thirdPartyAuthTexts = {
9591
9591
  continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
@@ -9651,281 +9651,290 @@ var RegisterForm = ({
9651
9651
  const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
9652
9652
  resolver: (0, import_zod2.zodResolver)(formSchema)
9653
9653
  });
9654
- return /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, /* @__PURE__ */ import_react47.default.createElement(Card, { dir: props.direction }, /* @__PURE__ */ import_react47.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react47.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react47.default.createElement(
9655
- Alert,
9656
- {
9657
- title: props.errorTitle,
9658
- text: props.errorText,
9659
- severity: "error"
9660
- }
9661
- ), /* @__PURE__ */ import_react47.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react47.default.createElement(
9662
- "form",
9654
+ return /* @__PURE__ */ import_react47.default.createElement(
9655
+ "div",
9663
9656
  {
9664
- noValidate: true,
9665
- onSubmit: handleSubmit((e) => {
9666
- if (props.onRegister) {
9667
- return props.onRegister(e);
9668
- } else {
9669
- console.log(
9670
- "Form is submitted but onRegister prop is missing"
9671
- );
9672
- }
9673
- }),
9674
- className: "hawa-flex hawa-flex-col hawa-gap-4"
9657
+ className: cn(
9658
+ "hawa-flex hawa-flex-col hawa-gap-4",
9659
+ (_g = props.classNames) == null ? void 0 : _g.root
9660
+ )
9675
9661
  },
9676
- /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, registerFields.map((fld, i) => {
9677
- if (fld === "fullname") {
9678
- return /* @__PURE__ */ import_react47.default.createElement(
9679
- import_react_hook_form2.Controller,
9680
- {
9681
- key: i,
9682
- control,
9683
- name: "fullName",
9684
- render: ({ field }) => {
9685
- var _a2, _b2, _c2;
9686
- return /* @__PURE__ */ import_react47.default.createElement(
9687
- Input,
9688
- {
9689
- width: "full",
9690
- label: ((_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label) || "Full Name",
9691
- placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
9692
- helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
9693
- ...field
9694
- }
9695
- );
9696
- }
9697
- }
9698
- );
9699
- }
9700
- if (fld === "email") {
9701
- return /* @__PURE__ */ import_react47.default.createElement(
9702
- import_react_hook_form2.Controller,
9703
- {
9704
- key: i,
9705
- control,
9706
- name: "email",
9707
- render: ({ field }) => {
9708
- var _a2, _b2, _c2;
9709
- return /* @__PURE__ */ import_react47.default.createElement(
9710
- Input,
9711
- {
9712
- dir: "ltr",
9713
- inputProps: {
9714
- className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
9715
- },
9716
- width: "full",
9717
- autoComplete: "email",
9718
- label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
9719
- helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
9720
- placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
9721
- ...field
9722
- }
9723
- );
9724
- }
9725
- }
9726
- );
9727
- }
9728
- if (fld === "username") {
9729
- return /* @__PURE__ */ import_react47.default.createElement(
9730
- import_react_hook_form2.Controller,
9731
- {
9732
- key: i,
9733
- control,
9734
- name: "username",
9735
- render: ({ field }) => {
9736
- var _a2, _b2, _c2, _d2;
9737
- return /* @__PURE__ */ import_react47.default.createElement(
9738
- Input,
9739
- {
9740
- width: "full",
9741
- autoComplete: "username",
9742
- label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
9743
- labelProps: {
9744
- ...(_b2 = props.usernameOptions) == null ? void 0 : _b2.label
9745
- },
9746
- helperText: (_c2 = formState.errors.username) == null ? void 0 : _c2.message,
9747
- placeholder: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.placeholder,
9748
- ...field
9749
- }
9750
- );
9751
- }
9752
- }
9753
- );
9754
- }
9755
- })),
9756
- /* @__PURE__ */ import_react47.default.createElement(
9757
- import_react_hook_form2.Controller,
9662
+ /* @__PURE__ */ import_react47.default.createElement(Card, { dir: props.direction, className: cn((_h = props.classNames) == null ? void 0 : _h.card) }, /* @__PURE__ */ import_react47.default.createElement(CardContent, { headless: true }, /* @__PURE__ */ import_react47.default.createElement("div", null, props.showError && /* @__PURE__ */ import_react47.default.createElement(
9663
+ Alert,
9758
9664
  {
9759
- control,
9760
- name: "password",
9761
- render: ({ field }) => {
9762
- var _a2, _b2, _c2;
9763
- return /* @__PURE__ */ import_react47.default.createElement(
9764
- Input,
9765
- {
9766
- width: "full",
9767
- type: passwordVisible ? "text" : "password",
9768
- endIcon: /* @__PURE__ */ import_react47.default.createElement(
9769
- "div",
9770
- {
9771
- className: "hawa-cursor-pointer",
9772
- onClick: () => setPasswordVisible(!passwordVisible)
9773
- },
9774
- passwordVisible ? /* @__PURE__ */ import_react47.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react47.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
9775
- " "
9776
- ),
9777
- autoComplete: "new-password",
9778
- label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
9779
- placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
9780
- helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
9781
- ...field
9782
- }
9783
- );
9784
- }
9665
+ title: props.errorTitle,
9666
+ text: props.errorText,
9667
+ severity: "error"
9785
9668
  }
9786
- ),
9787
- /* @__PURE__ */ import_react47.default.createElement(
9788
- import_react_hook_form2.Controller,
9669
+ ), /* @__PURE__ */ import_react47.default.createElement(import_react_hook_form2.FormProvider, { ...methods }, /* @__PURE__ */ import_react47.default.createElement(
9670
+ "form",
9789
9671
  {
9790
- control,
9791
- name: "confirm_password",
9792
- render: ({ field }) => {
9793
- var _a2, _b2, _c2;
9672
+ noValidate: true,
9673
+ onSubmit: handleSubmit((e) => {
9674
+ if (props.onRegister) {
9675
+ return props.onRegister(e);
9676
+ } else {
9677
+ console.log(
9678
+ "Form is submitted but onRegister prop is missing"
9679
+ );
9680
+ }
9681
+ }),
9682
+ className: "hawa-flex hawa-flex-col hawa-gap-4"
9683
+ },
9684
+ /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, registerFields.map((fld, i) => {
9685
+ if (fld === "fullname") {
9794
9686
  return /* @__PURE__ */ import_react47.default.createElement(
9795
- Input,
9687
+ import_react_hook_form2.Controller,
9796
9688
  {
9797
- width: "full",
9798
- type: "password",
9799
- autoComplete: "new-password",
9800
- label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
9801
- placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
9802
- helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
9803
- ...field
9689
+ key: i,
9690
+ control,
9691
+ name: "fullName",
9692
+ render: ({ field }) => {
9693
+ var _a2, _b2, _c2;
9694
+ return /* @__PURE__ */ import_react47.default.createElement(
9695
+ Input,
9696
+ {
9697
+ width: "full",
9698
+ label: ((_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label) || "Full Name",
9699
+ placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
9700
+ helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
9701
+ ...field
9702
+ }
9703
+ );
9704
+ }
9804
9705
  }
9805
9706
  );
9806
9707
  }
9807
- }
9808
- ),
9809
- props.additionalInputs,
9810
- props.showRefCode && /* @__PURE__ */ import_react47.default.createElement(
9811
- import_react_hook_form2.Controller,
9812
- {
9813
- control,
9814
- name: "refCode",
9815
- render: ({ field }) => {
9816
- var _a2;
9708
+ if (fld === "email") {
9817
9709
  return /* @__PURE__ */ import_react47.default.createElement(
9818
- Input,
9710
+ import_react_hook_form2.Controller,
9819
9711
  {
9820
- width: "full",
9821
- label: texts == null ? void 0 : texts.refCode,
9822
- placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
9823
- helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
9824
- ...field
9712
+ key: i,
9713
+ control,
9714
+ name: "email",
9715
+ render: ({ field }) => {
9716
+ var _a2, _b2, _c2;
9717
+ return /* @__PURE__ */ import_react47.default.createElement(
9718
+ Input,
9719
+ {
9720
+ dir: "ltr",
9721
+ inputProps: {
9722
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
9723
+ },
9724
+ width: "full",
9725
+ autoComplete: "email",
9726
+ label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
9727
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
9728
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
9729
+ ...field
9730
+ }
9731
+ );
9732
+ }
9825
9733
  }
9826
9734
  );
9827
9735
  }
9828
- }
9829
- ),
9830
- props.showUserSource && /* @__PURE__ */ import_react47.default.createElement(
9831
- import_react_hook_form2.Controller,
9832
- {
9833
- control,
9834
- name: "reference",
9835
- render: ({ field }) => {
9836
- var _a2, _b2;
9736
+ if (fld === "username") {
9837
9737
  return /* @__PURE__ */ import_react47.default.createElement(
9838
- Select,
9738
+ import_react_hook_form2.Controller,
9839
9739
  {
9840
- label: ((_a2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _a2.label) || "How did you learn about us?",
9841
- placeholder: (_b2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _b2.placeholder,
9842
- isCreatable: false,
9843
- isMulti: false,
9844
- isSearchable: false,
9845
- isClearable: false,
9846
- options: props.userReferenceOptions,
9847
- onChange: (e) => {
9848
- field.onChange(e.value);
9740
+ key: i,
9741
+ control,
9742
+ name: "username",
9743
+ render: ({ field }) => {
9744
+ var _a2, _b2, _c2, _d2;
9745
+ return /* @__PURE__ */ import_react47.default.createElement(
9746
+ Input,
9747
+ {
9748
+ width: "full",
9749
+ autoComplete: "username",
9750
+ label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
9751
+ labelProps: {
9752
+ ...(_b2 = props.usernameOptions) == null ? void 0 : _b2.label
9753
+ },
9754
+ helperText: (_c2 = formState.errors.username) == null ? void 0 : _c2.message,
9755
+ placeholder: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.placeholder,
9756
+ ...field
9757
+ }
9758
+ );
9849
9759
  }
9850
9760
  }
9851
9761
  );
9852
9762
  }
9853
- }
9854
- ),
9855
- showTermsOption || showNewsletterOption ? /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ import_react47.default.createElement(
9856
- import_react_hook_form2.Controller,
9857
- {
9858
- control,
9859
- name: "terms_accepted",
9860
- render: ({ field }) => {
9861
- var _a2, _b2;
9862
- return /* @__PURE__ */ import_react47.default.createElement(
9763
+ })),
9764
+ /* @__PURE__ */ import_react47.default.createElement(
9765
+ import_react_hook_form2.Controller,
9766
+ {
9767
+ control,
9768
+ name: "password",
9769
+ render: ({ field }) => {
9770
+ var _a2, _b2, _c2;
9771
+ return /* @__PURE__ */ import_react47.default.createElement(
9772
+ Input,
9773
+ {
9774
+ width: "full",
9775
+ type: passwordVisible ? "text" : "password",
9776
+ endIcon: /* @__PURE__ */ import_react47.default.createElement(
9777
+ "div",
9778
+ {
9779
+ className: "hawa-cursor-pointer",
9780
+ onClick: () => setPasswordVisible(!passwordVisible)
9781
+ },
9782
+ passwordVisible ? /* @__PURE__ */ import_react47.default.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ import_react47.default.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
9783
+ " "
9784
+ ),
9785
+ autoComplete: "new-password",
9786
+ label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
9787
+ placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
9788
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
9789
+ ...field
9790
+ }
9791
+ );
9792
+ }
9793
+ }
9794
+ ),
9795
+ /* @__PURE__ */ import_react47.default.createElement(
9796
+ import_react_hook_form2.Controller,
9797
+ {
9798
+ control,
9799
+ name: "confirm_password",
9800
+ render: ({ field }) => {
9801
+ var _a2, _b2, _c2;
9802
+ return /* @__PURE__ */ import_react47.default.createElement(
9803
+ Input,
9804
+ {
9805
+ width: "full",
9806
+ type: "password",
9807
+ autoComplete: "new-password",
9808
+ label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
9809
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
9810
+ helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
9811
+ ...field
9812
+ }
9813
+ );
9814
+ }
9815
+ }
9816
+ ),
9817
+ props.additionalInputs,
9818
+ props.showRefCode && /* @__PURE__ */ import_react47.default.createElement(
9819
+ import_react_hook_form2.Controller,
9820
+ {
9821
+ control,
9822
+ name: "refCode",
9823
+ render: ({ field }) => {
9824
+ var _a2;
9825
+ return /* @__PURE__ */ import_react47.default.createElement(
9826
+ Input,
9827
+ {
9828
+ width: "full",
9829
+ label: texts == null ? void 0 : texts.refCode,
9830
+ placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
9831
+ helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
9832
+ ...field
9833
+ }
9834
+ );
9835
+ }
9836
+ }
9837
+ ),
9838
+ props.showUserSource && /* @__PURE__ */ import_react47.default.createElement(
9839
+ import_react_hook_form2.Controller,
9840
+ {
9841
+ control,
9842
+ name: "reference",
9843
+ render: ({ field }) => {
9844
+ var _a2, _b2;
9845
+ return /* @__PURE__ */ import_react47.default.createElement(
9846
+ Select,
9847
+ {
9848
+ label: ((_a2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _a2.label) || "How did you learn about us?",
9849
+ placeholder: (_b2 = texts == null ? void 0 : texts.userReference) == null ? void 0 : _b2.placeholder,
9850
+ isCreatable: false,
9851
+ isMulti: false,
9852
+ isSearchable: false,
9853
+ isClearable: false,
9854
+ options: props.userReferenceOptions,
9855
+ onChange: (e) => {
9856
+ field.onChange(e.value);
9857
+ }
9858
+ }
9859
+ );
9860
+ }
9861
+ }
9862
+ ),
9863
+ showTermsOption || showNewsletterOption ? /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ import_react47.default.createElement(
9864
+ import_react_hook_form2.Controller,
9865
+ {
9866
+ control,
9867
+ name: "terms_accepted",
9868
+ render: ({ field }) => {
9869
+ var _a2, _b2;
9870
+ return /* @__PURE__ */ import_react47.default.createElement(
9871
+ Checkbox,
9872
+ {
9873
+ id: "terms_accepted",
9874
+ helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
9875
+ onCheckedChange: (e) => field.onChange(e),
9876
+ label: /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ import_react47.default.createElement("span", null, (texts == null ? void 0 : texts.iAcceptText) || "I accept the "), " ", /* @__PURE__ */ import_react47.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react47.default.createElement(
9877
+ "a",
9878
+ {
9879
+ onClick: props.onRouteToTOS,
9880
+ className: "clickable-link"
9881
+ },
9882
+ (texts == null ? void 0 : texts.termsText) || "Terms of Service"
9883
+ )))
9884
+ }
9885
+ );
9886
+ }
9887
+ }
9888
+ ), showNewsletterOption && /* @__PURE__ */ import_react47.default.createElement(
9889
+ import_react_hook_form2.Controller,
9890
+ {
9891
+ control,
9892
+ name: "newsletter_accepted",
9893
+ render: ({ field }) => /* @__PURE__ */ import_react47.default.createElement(
9863
9894
  Checkbox,
9864
9895
  {
9865
- id: "terms_accepted",
9866
- helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
9867
- onCheckedChange: (e) => field.onChange(e),
9868
- label: /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ import_react47.default.createElement("span", null, (texts == null ? void 0 : texts.iAcceptText) || "I accept the "), " ", /* @__PURE__ */ import_react47.default.createElement(StopPropagationWrapper, null, /* @__PURE__ */ import_react47.default.createElement(
9869
- "a",
9870
- {
9871
- onClick: props.onRouteToTOS,
9872
- className: "clickable-link"
9873
- },
9874
- (texts == null ? void 0 : texts.termsText) || "Terms of Service"
9875
- )))
9896
+ id: "newsletter_accepted",
9897
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
9898
+ onCheckedChange: field.onChange
9876
9899
  }
9877
- );
9900
+ )
9878
9901
  }
9879
- }
9880
- ), showNewsletterOption && /* @__PURE__ */ import_react47.default.createElement(
9881
- import_react_hook_form2.Controller,
9902
+ )) : null,
9903
+ /* @__PURE__ */ import_react47.default.createElement(
9904
+ Button,
9905
+ {
9906
+ className: " hawa-w-full",
9907
+ type: "submit",
9908
+ isLoading: props.isLoading,
9909
+ disabled: props.isLoading
9910
+ },
9911
+ (texts == null ? void 0 : texts.registerText) || "Register"
9912
+ ),
9913
+ props.additionalButtons
9914
+ )), /* @__PURE__ */ import_react47.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_react47.default.createElement("span", null, (texts == null ? void 0 : texts.existingUserText) || "Already have an account?"), /* @__PURE__ */ import_react47.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react47.default.createElement(
9915
+ CardFooter,
9882
9916
  {
9883
- control,
9884
- name: "newsletter_accepted",
9885
- render: ({ field }) => /* @__PURE__ */ import_react47.default.createElement(
9886
- Checkbox,
9887
- {
9888
- id: "newsletter_accepted",
9889
- label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
9890
- onCheckedChange: field.onChange
9891
- }
9917
+ className: cn(
9918
+ props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
9892
9919
  )
9893
- }
9894
- )) : null,
9895
- /* @__PURE__ */ import_react47.default.createElement(
9896
- Button,
9897
- {
9898
- className: " hawa-w-full",
9899
- type: "submit",
9900
- isLoading: props.isLoading,
9901
- disabled: props.isLoading
9902
9920
  },
9903
- (texts == null ? void 0 : texts.registerText) || "Register"
9904
- ),
9905
- props.additionalButtons
9906
- )), /* @__PURE__ */ import_react47.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_react47.default.createElement("span", null, (texts == null ? void 0 : texts.existingUserText) || "Already have an account?"), /* @__PURE__ */ import_react47.default.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react47.default.createElement(
9907
- CardFooter,
9908
- {
9909
- className: cn(
9910
- props.logosOnly ? "hawa-flex hawa-flex-row hawa-justify-center hawa-gap-2" : "hawa-grid hawa-grid-cols-1 hawa-gap-2"
9921
+ /* @__PURE__ */ import_react47.default.createElement(
9922
+ AuthButtons,
9923
+ {
9924
+ texts: thirdPartyAuthTexts,
9925
+ viaGoogle: props.viaGoogle,
9926
+ viaGithub: props.viaGithub,
9927
+ viaTwitter: props.viaTwitter,
9928
+ isGoogleLoading: props.isGoogleLoading,
9929
+ isGithubLoading: props.isGithubLoading,
9930
+ isTwitterLoading: props.isTwitterLoading,
9931
+ handleGoogle: props.onGoogleRegister,
9932
+ handleGithub: props.onGithubRegister,
9933
+ handleTwitter: props.onTwitterRegister
9934
+ }
9911
9935
  )
9912
- },
9913
- /* @__PURE__ */ import_react47.default.createElement(
9914
- AuthButtons,
9915
- {
9916
- texts: thirdPartyAuthTexts,
9917
- viaGoogle: props.viaGoogle,
9918
- viaGithub: props.viaGithub,
9919
- viaTwitter: props.viaTwitter,
9920
- isGoogleLoading: props.isGoogleLoading,
9921
- isGithubLoading: props.isGithubLoading,
9922
- isTwitterLoading: props.isTwitterLoading,
9923
- handleGoogle: props.onGoogleRegister,
9924
- handleGithub: props.onGithubRegister,
9925
- handleTwitter: props.onTwitterRegister
9926
- }
9927
- )
9928
- ) : null));
9936
+ ) : null)
9937
+ );
9929
9938
  };
9930
9939
 
9931
9940
  // blocks/auth/AppLanding.tsx
@@ -10881,7 +10890,7 @@ var ContactForm = ({
10881
10890
  size = "default",
10882
10891
  texts,
10883
10892
  formId,
10884
- formAutoComplete,
10893
+ formAutoComplete = "off",
10885
10894
  onSubmit,
10886
10895
  customFields
10887
10896
  }) => {
@@ -10908,9 +10917,11 @@ var ContactForm = ({
10908
10917
  )
10909
10918
  });
10910
10919
  const contactFormSchema = z8.object({
10911
- name: z8.string({ required_error: texts == null ? void 0 : texts.name.required }).min(1, texts == null ? void 0 : texts.name.required).default(""),
10912
- email: z8.string({ required_error: (_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required }).email({ message: (_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid }).default(""),
10913
- message: z8.string({ required_error: texts == null ? void 0 : texts.message.required }).min(10, texts == null ? void 0 : texts.message.invalid).default("")
10920
+ name: z8.string({ required_error: (texts == null ? void 0 : texts.name.required) || "Name is required" }).min(1, (texts == null ? void 0 : texts.name.required) || "Name is required").default(""),
10921
+ email: z8.string({ required_error: ((_a = texts == null ? void 0 : texts.email) == null ? void 0 : _a.required) || "Email is required" }).min(1, { message: ((_b = texts == null ? void 0 : texts.email) == null ? void 0 : _b.required) || "Email is required" }).email({ message: ((_c = texts == null ? void 0 : texts.email) == null ? void 0 : _c.invalid) || "Invalid email" }).default(""),
10922
+ message: z8.string({
10923
+ required_error: (texts == null ? void 0 : texts.message.required) || "Message is required"
10924
+ }).min(10, (texts == null ? void 0 : texts.message.invalid) || "Message is too short").default("")
10914
10925
  });
10915
10926
  const customFieldsDefaultValues = customFields == null ? void 0 : customFields.reduce(
10916
10927
  (acc, curr) => {
@@ -10981,7 +10992,7 @@ var ContactForm = ({
10981
10992
  return /* @__PURE__ */ import_react64.default.createElement(
10982
10993
  Input,
10983
10994
  {
10984
- label: texts == null ? void 0 : texts.name.label,
10995
+ label: (texts == null ? void 0 : texts.name.label) || "Name",
10985
10996
  id: texts == null ? void 0 : texts.name.label,
10986
10997
  ...field,
10987
10998
  placeholder: texts == null ? void 0 : texts.name.placeholder,
@@ -11001,7 +11012,7 @@ var ContactForm = ({
11001
11012
  return /* @__PURE__ */ import_react64.default.createElement(
11002
11013
  Input,
11003
11014
  {
11004
- label: texts == null ? void 0 : texts.email.label,
11015
+ label: (texts == null ? void 0 : texts.email.label) || "Email",
11005
11016
  id: texts == null ? void 0 : texts.email.label,
11006
11017
  ...field,
11007
11018
  placeholder: texts == null ? void 0 : texts.email.placeholder,
@@ -11061,7 +11072,7 @@ var ContactForm = ({
11061
11072
  return /* @__PURE__ */ import_react64.default.createElement(
11062
11073
  Textarea,
11063
11074
  {
11064
- label: texts == null ? void 0 : texts.message.label,
11075
+ label: (texts == null ? void 0 : texts.message.label) || "Message",
11065
11076
  id: texts == null ? void 0 : texts.message.label,
11066
11077
  textareaProps: {
11067
11078
  placeholder: texts == null ? void 0 : texts.message.placeholder,