@sikka/hawa 0.27.14-next → 0.27.15-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.
@@ -3597,10 +3597,12 @@ var RegisterForm = ({
3597
3597
  }),
3598
3598
  refCode: z2.string().optional(),
3599
3599
  reference: z2.string().optional(),
3600
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
3600
+ terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
3601
+ message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
3602
+ }),
3601
3603
  newsletter_accepted: z2.boolean().optional()
3602
3604
  }).refine((data) => data.password === data.confirm_password, {
3603
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
3605
+ message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
3604
3606
  path: ["confirm_password"]
3605
3607
  });
3606
3608
  const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
@@ -3753,7 +3755,7 @@ var RegisterForm = ({
3753
3755
  type: "password",
3754
3756
  autoComplete: "new-password",
3755
3757
  label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
3756
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
3758
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
3757
3759
  helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
3758
3760
  ...field
3759
3761
  }
@@ -3807,7 +3809,7 @@ var RegisterForm = ({
3807
3809
  }
3808
3810
  }
3809
3811
  ),
3810
- /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, showTermsOption && /* @__PURE__ */ import_react15.default.createElement(
3812
+ 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(
3811
3813
  import_react_hook_form2.Controller,
3812
3814
  {
3813
3815
  control,
@@ -3841,16 +3843,16 @@ var RegisterForm = ({
3841
3843
  Checkbox,
3842
3844
  {
3843
3845
  id: "newsletter_accepted",
3844
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
3846
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
3845
3847
  onCheckedChange: field.onChange
3846
3848
  }
3847
3849
  )
3848
3850
  }
3849
- )),
3851
+ )) : null,
3850
3852
  /* @__PURE__ */ import_react15.default.createElement(
3851
3853
  Button,
3852
3854
  {
3853
- className: "hawa-mt-4 hawa-w-full",
3855
+ className: " hawa-w-full",
3854
3856
  type: "submit",
3855
3857
  isLoading: props.isLoading,
3856
3858
  disabled: props.isLoading
@@ -2723,10 +2723,12 @@ var RegisterForm = ({
2723
2723
  }),
2724
2724
  refCode: z2.string().optional(),
2725
2725
  reference: z2.string().optional(),
2726
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
2726
+ terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
2727
+ message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
2728
+ }),
2727
2729
  newsletter_accepted: z2.boolean().optional()
2728
2730
  }).refine((data) => data.password === data.confirm_password, {
2729
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
2731
+ message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
2730
2732
  path: ["confirm_password"]
2731
2733
  });
2732
2734
  const { handleSubmit, control, formState } = useForm2({
@@ -2879,7 +2881,7 @@ var RegisterForm = ({
2879
2881
  type: "password",
2880
2882
  autoComplete: "new-password",
2881
2883
  label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
2882
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
2884
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
2883
2885
  helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
2884
2886
  ...field
2885
2887
  }
@@ -2933,7 +2935,7 @@ var RegisterForm = ({
2933
2935
  }
2934
2936
  }
2935
2937
  ),
2936
- /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, showTermsOption && /* @__PURE__ */ React7.createElement(
2938
+ showTermsOption || showNewsletterOption ? /* @__PURE__ */ React7.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ React7.createElement(
2937
2939
  Controller2,
2938
2940
  {
2939
2941
  control,
@@ -2967,16 +2969,16 @@ var RegisterForm = ({
2967
2969
  Checkbox,
2968
2970
  {
2969
2971
  id: "newsletter_accepted",
2970
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
2972
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
2971
2973
  onCheckedChange: field.onChange
2972
2974
  }
2973
2975
  )
2974
2976
  }
2975
- )),
2977
+ )) : null,
2976
2978
  /* @__PURE__ */ React7.createElement(
2977
2979
  Button,
2978
2980
  {
2979
- className: "hawa-mt-4 hawa-w-full",
2981
+ className: " hawa-w-full",
2980
2982
  type: "submit",
2981
2983
  isLoading: props.isLoading,
2982
2984
  disabled: props.isLoading
@@ -3754,10 +3754,12 @@ var RegisterForm = ({
3754
3754
  }),
3755
3755
  refCode: z2.string().optional(),
3756
3756
  reference: z2.string().optional(),
3757
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
3757
+ terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
3758
+ message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
3759
+ }),
3758
3760
  newsletter_accepted: z2.boolean().optional()
3759
3761
  }).refine((data) => data.password === data.confirm_password, {
3760
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
3762
+ message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
3761
3763
  path: ["confirm_password"]
3762
3764
  });
3763
3765
  const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
@@ -3910,7 +3912,7 @@ var RegisterForm = ({
3910
3912
  type: "password",
3911
3913
  autoComplete: "new-password",
3912
3914
  label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
3913
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
3915
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
3914
3916
  helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
3915
3917
  ...field
3916
3918
  }
@@ -3964,7 +3966,7 @@ var RegisterForm = ({
3964
3966
  }
3965
3967
  }
3966
3968
  ),
3967
- /* @__PURE__ */ import_react15.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, showTermsOption && /* @__PURE__ */ import_react15.default.createElement(
3969
+ 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(
3968
3970
  import_react_hook_form2.Controller,
3969
3971
  {
3970
3972
  control,
@@ -3998,16 +4000,16 @@ var RegisterForm = ({
3998
4000
  Checkbox,
3999
4001
  {
4000
4002
  id: "newsletter_accepted",
4001
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
4003
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
4002
4004
  onCheckedChange: field.onChange
4003
4005
  }
4004
4006
  )
4005
4007
  }
4006
- )),
4008
+ )) : null,
4007
4009
  /* @__PURE__ */ import_react15.default.createElement(
4008
4010
  Button,
4009
4011
  {
4010
- className: "hawa-mt-4 hawa-w-full",
4012
+ className: " hawa-w-full",
4011
4013
  type: "submit",
4012
4014
  isLoading: props.isLoading,
4013
4015
  disabled: props.isLoading
@@ -497,10 +497,12 @@ var RegisterForm = ({
497
497
  }),
498
498
  refCode: z2.string().optional(),
499
499
  reference: z2.string().optional(),
500
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
500
+ terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
501
+ message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
502
+ }),
501
503
  newsletter_accepted: z2.boolean().optional()
502
504
  }).refine((data) => data.password === data.confirm_password, {
503
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
505
+ message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
504
506
  path: ["confirm_password"]
505
507
  });
506
508
  const { handleSubmit, control, formState } = useForm2({
@@ -653,7 +655,7 @@ var RegisterForm = ({
653
655
  type: "password",
654
656
  autoComplete: "new-password",
655
657
  label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
656
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
658
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
657
659
  helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
658
660
  ...field
659
661
  }
@@ -707,7 +709,7 @@ var RegisterForm = ({
707
709
  }
708
710
  }
709
711
  ),
710
- /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, showTermsOption && /* @__PURE__ */ React3.createElement(
712
+ showTermsOption || showNewsletterOption ? /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ React3.createElement(
711
713
  Controller2,
712
714
  {
713
715
  control,
@@ -741,16 +743,16 @@ var RegisterForm = ({
741
743
  Checkbox,
742
744
  {
743
745
  id: "newsletter_accepted",
744
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
746
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
745
747
  onCheckedChange: field.onChange
746
748
  }
747
749
  )
748
750
  }
749
- )),
751
+ )) : null,
750
752
  /* @__PURE__ */ React3.createElement(
751
753
  Button,
752
754
  {
753
- className: "hawa-mt-4 hawa-w-full",
755
+ className: " hawa-w-full",
754
756
  type: "submit",
755
757
  isLoading: props.isLoading,
756
758
  disabled: props.isLoading
package/dist/index.js CHANGED
@@ -9633,10 +9633,12 @@ var RegisterForm = ({
9633
9633
  }),
9634
9634
  refCode: z2.string().optional(),
9635
9635
  reference: z2.string().optional(),
9636
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
9636
+ terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
9637
+ message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
9638
+ }),
9637
9639
  newsletter_accepted: z2.boolean().optional()
9638
9640
  }).refine((data) => data.password === data.confirm_password, {
9639
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
9641
+ message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
9640
9642
  path: ["confirm_password"]
9641
9643
  });
9642
9644
  const { handleSubmit, control, formState } = (0, import_react_hook_form2.useForm)({
@@ -9789,7 +9791,7 @@ var RegisterForm = ({
9789
9791
  type: "password",
9790
9792
  autoComplete: "new-password",
9791
9793
  label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
9792
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
9794
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
9793
9795
  helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
9794
9796
  ...field
9795
9797
  }
@@ -9843,7 +9845,7 @@ var RegisterForm = ({
9843
9845
  }
9844
9846
  }
9845
9847
  ),
9846
- /* @__PURE__ */ import_react47.default.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, showTermsOption && /* @__PURE__ */ import_react47.default.createElement(
9848
+ 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(
9847
9849
  import_react_hook_form2.Controller,
9848
9850
  {
9849
9851
  control,
@@ -9877,16 +9879,16 @@ var RegisterForm = ({
9877
9879
  Checkbox,
9878
9880
  {
9879
9881
  id: "newsletter_accepted",
9880
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
9882
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
9881
9883
  onCheckedChange: field.onChange
9882
9884
  }
9883
9885
  )
9884
9886
  }
9885
- )),
9887
+ )) : null,
9886
9888
  /* @__PURE__ */ import_react47.default.createElement(
9887
9889
  Button,
9888
9890
  {
9889
- className: "hawa-mt-4 hawa-w-full",
9891
+ className: " hawa-w-full",
9890
9892
  type: "submit",
9891
9893
  isLoading: props.isLoading,
9892
9894
  disabled: props.isLoading
package/dist/index.mjs CHANGED
@@ -9415,10 +9415,12 @@ var RegisterForm = ({
9415
9415
  }),
9416
9416
  refCode: z2.string().optional(),
9417
9417
  reference: z2.string().optional(),
9418
- terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
9418
+ terms_accepted: z2.boolean({ required_error: (texts == null ? void 0 : texts.termsRequired) || "Terms required" }).refine((value) => value, {
9419
+ message: (texts == null ? void 0 : texts.termsRequired) || "Terms required"
9420
+ }),
9419
9421
  newsletter_accepted: z2.boolean().optional()
9420
9422
  }).refine((data) => data.password === data.confirm_password, {
9421
- message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
9423
+ message: ((_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch) || "Passwords don't match",
9422
9424
  path: ["confirm_password"]
9423
9425
  });
9424
9426
  const { handleSubmit, control, formState } = useForm2({
@@ -9571,7 +9573,7 @@ var RegisterForm = ({
9571
9573
  type: "password",
9572
9574
  autoComplete: "new-password",
9573
9575
  label: ((_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label) || "Confirm Password",
9574
- placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
9576
+ placeholder: ((_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder) || "Confirm your Password",
9575
9577
  helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
9576
9578
  ...field
9577
9579
  }
@@ -9625,7 +9627,7 @@ var RegisterForm = ({
9625
9627
  }
9626
9628
  }
9627
9629
  ),
9628
- /* @__PURE__ */ React74.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3" }, showTermsOption && /* @__PURE__ */ React74.createElement(
9630
+ showTermsOption || showNewsletterOption ? /* @__PURE__ */ React74.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-3 hawa-mb-2" }, showTermsOption && /* @__PURE__ */ React74.createElement(
9629
9631
  Controller2,
9630
9632
  {
9631
9633
  control,
@@ -9659,16 +9661,16 @@ var RegisterForm = ({
9659
9661
  Checkbox,
9660
9662
  {
9661
9663
  id: "newsletter_accepted",
9662
- label: texts == null ? void 0 : texts.subscribeToNewsletter,
9664
+ label: (texts == null ? void 0 : texts.subscribeToNewsletter) || "Subscribe to our newsletter",
9663
9665
  onCheckedChange: field.onChange
9664
9666
  }
9665
9667
  )
9666
9668
  }
9667
- )),
9669
+ )) : null,
9668
9670
  /* @__PURE__ */ React74.createElement(
9669
9671
  Button,
9670
9672
  {
9671
- className: "hawa-mt-4 hawa-w-full",
9673
+ className: " hawa-w-full",
9672
9674
  type: "submit",
9673
9675
  isLoading: props.isLoading,
9674
9676
  disabled: props.isLoading
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.27.14-next",
3
+ "version": "0.27.15-next",
4
4
  "description": "Modern UI Kit made with Tailwind",
5
5
  "author": {
6
6
  "name": "Sikka Software",
@@ -93,6 +93,8 @@
93
93
  "@types/react": "^18.2.51",
94
94
  "@types/react-dom": "^18.2.18",
95
95
  "autoprefixer": "^10.4.17",
96
+ "boxen": "^7.1.1",
97
+ "chalk": "^5.3.0",
96
98
  "embla-carousel": "8.0.0-rc22",
97
99
  "jest": "^29.7.0",
98
100
  "jest-environment-jsdom": "^29.7.0",
@@ -109,7 +111,7 @@
109
111
  "check": "tsc --noEmit",
110
112
  "test": "jest",
111
113
  "prebuild": "node ./util/pre-build.js",
112
- "build:lib": "npm run prebuild && node ./util/build-library.js",
114
+ "build:lib": "npm run prebuild && node ./util/build-library.mjs",
113
115
  "build:css": "postcss styles.css -o dist/index.css",
114
116
  "build": "npm run build:lib && npm run build:css",
115
117
  "pub:next": "npm publish --tag next",