@sikka/hawa 0.46.3-next → 0.47.0-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.
Files changed (89) hide show
  1. package/dist/{Radio-Dyvlywnk.d.mts → Radio-BPHTeDMz.d.mts} +8 -7
  2. package/dist/{Radio-DlPwVCG4.d.ts → Radio-cRcIH8_L.d.ts} +8 -7
  3. package/dist/blocks/auth/index.d.mts +8 -8
  4. package/dist/blocks/auth/index.d.ts +8 -8
  5. package/dist/blocks/auth/index.js +87 -133
  6. package/dist/blocks/auth/index.mjs +21 -53
  7. package/dist/blocks/feedback/index.js +69 -80
  8. package/dist/blocks/feedback/index.mjs +5 -5
  9. package/dist/blocks/index.d.mts +3 -3
  10. package/dist/blocks/index.d.ts +3 -3
  11. package/dist/blocks/index.js +87 -133
  12. package/dist/blocks/index.mjs +6 -25
  13. package/dist/blocks/misc/index.js +70 -84
  14. package/dist/blocks/misc/index.mjs +5 -5
  15. package/dist/blocks/pricing/index.js +1 -1
  16. package/dist/blocks/pricing/index.mjs +4 -4
  17. package/dist/{chunk-QLUJEUIB.mjs → chunk-342KIV4R.mjs} +83 -110
  18. package/dist/{chunk-EHJXQQDP.mjs → chunk-5S5DR7KF.mjs} +1 -1
  19. package/dist/{chunk-HJVL6X7I.mjs → chunk-6SJUUJOV.mjs} +1 -1
  20. package/dist/{chunk-7O555VJR.mjs → chunk-AWJSHOYU.mjs} +69 -80
  21. package/dist/{chunk-U72MOMEK.mjs → chunk-C2UOOH4X.mjs} +1 -1
  22. package/dist/{chunk-7L5VUKZ7.mjs → chunk-EOH6A3GR.mjs} +2 -5
  23. package/dist/{chunk-6UOJKVIA.mjs → chunk-IFWYR5W2.mjs} +1 -1
  24. package/dist/{chunk-YXUHXKKK.mjs → chunk-JP2N5WKD.mjs} +1 -1
  25. package/dist/{chunk-R37QEYSB.mjs → chunk-NMW4GM4G.mjs} +1 -1
  26. package/dist/{chunk-CIMTNOLA.mjs → chunk-WUMDFBEK.mjs} +1 -1
  27. package/dist/colorPicker/index.js +1 -1
  28. package/dist/colorPicker/index.js.map +1 -1
  29. package/dist/colorPicker/index.mjs +1 -1
  30. package/dist/colorPicker/index.mjs.map +1 -1
  31. package/dist/combobox/index.js +1 -1
  32. package/dist/combobox/index.js.map +1 -1
  33. package/dist/combobox/index.mjs +1 -1
  34. package/dist/combobox/index.mjs.map +1 -1
  35. package/dist/dataTable/index.js +2 -5
  36. package/dist/dataTable/index.js.map +1 -1
  37. package/dist/dataTable/index.mjs +2 -5
  38. package/dist/dataTable/index.mjs.map +1 -1
  39. package/dist/elements/index.d.mts +2 -2
  40. package/dist/elements/index.d.ts +2 -2
  41. package/dist/elements/index.js +83 -110
  42. package/dist/elements/index.mjs +3 -3
  43. package/dist/index.d.mts +10 -9
  44. package/dist/index.d.ts +10 -9
  45. package/dist/index.js +87 -133
  46. package/dist/index.mjs +87 -133
  47. package/dist/input/index.js +2 -5
  48. package/dist/input/index.js.map +1 -1
  49. package/dist/input/index.mjs +2 -5
  50. package/dist/input/index.mjs.map +1 -1
  51. package/dist/layout/index.js +1 -1
  52. package/dist/layout/index.mjs +2 -2
  53. package/dist/passwordInput/index.js +2 -5
  54. package/dist/passwordInput/index.js.map +1 -1
  55. package/dist/passwordInput/index.mjs +2 -5
  56. package/dist/passwordInput/index.mjs.map +1 -1
  57. package/dist/phoneInput/index.d.mts +7 -7
  58. package/dist/phoneInput/index.d.ts +7 -7
  59. package/dist/phoneInput/index.js +79 -86
  60. package/dist/phoneInput/index.js.map +1 -1
  61. package/dist/phoneInput/index.mjs +79 -86
  62. package/dist/phoneInput/index.mjs.map +1 -1
  63. package/dist/pinInput/index.js +3 -20
  64. package/dist/pinInput/index.js.map +1 -1
  65. package/dist/pinInput/index.mjs +3 -20
  66. package/dist/pinInput/index.mjs.map +1 -1
  67. package/dist/select/index.d.mts +1 -0
  68. package/dist/select/index.d.ts +1 -0
  69. package/dist/select/index.js +69 -80
  70. package/dist/select/index.js.map +1 -1
  71. package/dist/select/index.mjs +69 -80
  72. package/dist/select/index.mjs.map +1 -1
  73. package/dist/simpleTable/index.js +1 -1
  74. package/dist/simpleTable/index.js.map +1 -1
  75. package/dist/simpleTable/index.mjs +1 -1
  76. package/dist/simpleTable/index.mjs.map +1 -1
  77. package/dist/skeleton/index.js +1 -1
  78. package/dist/skeleton/index.js.map +1 -1
  79. package/dist/skeleton/index.mjs +1 -1
  80. package/dist/skeleton/index.mjs.map +1 -1
  81. package/dist/stats/index.js +1 -1
  82. package/dist/stats/index.js.map +1 -1
  83. package/dist/stats/index.mjs +1 -1
  84. package/dist/stats/index.mjs.map +1 -1
  85. package/dist/textarea/index.js +1 -1
  86. package/dist/textarea/index.js.map +1 -1
  87. package/dist/textarea/index.mjs +1 -1
  88. package/dist/textarea/index.mjs.map +1 -1
  89. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -691,7 +691,7 @@ function Skeleton({
691
691
  };
692
692
  const styledAs = {
693
693
  div: "",
694
- input: "!h-[38px] !w-full"
694
+ input: "hawa-h-[40px] hawa-w-full"
695
695
  };
696
696
  return /* @__PURE__ */ import_react3.default.createElement(
697
697
  "div",
@@ -3095,14 +3095,11 @@ var Input = (0, import_react11.forwardRef)(
3095
3095
  }
3096
3096
  if (props.onChange) {
3097
3097
  if (props.type === "number" && props.maxLength) {
3098
- console.log("type is ", props.type);
3099
- console.log("max length is ", props.maxLength);
3100
3098
  let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
3101
3099
  const newEvent = { ...e, target: { ...e.target, value: v } };
3102
3100
  setValue(v);
3103
3101
  props.onChange(newEvent);
3104
3102
  } else {
3105
- console.log("NETIHERRRER");
3106
3103
  const newEvent = { ...e, target: { ...e.target, value: newValue } };
3107
3104
  setValue(newValue);
3108
3105
  props.onChange(newEvent);
@@ -3127,7 +3124,7 @@ var Input = (0, import_react11.forwardRef)(
3127
3124
  )
3128
3125
  },
3129
3126
  props.label && /* @__PURE__ */ import_react11.default.createElement(Label2, { ...labelProps }, props.label),
3130
- /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react11.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react11.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react11.default.createElement(
3127
+ /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react11.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react11.default.createElement(Skeleton, { as: "input" })) : props.isLoadingError ? /* @__PURE__ */ import_react11.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react11.default.createElement(
3131
3128
  Skeleton,
3132
3129
  {
3133
3130
  animation: "none",
@@ -5793,6 +5790,7 @@ var import_clsx3 = __toESM(require("clsx"));
5793
5790
  var Select = ({
5794
5791
  labelProps,
5795
5792
  labelKey = "label",
5793
+ valueKey = "value",
5796
5794
  ...props
5797
5795
  }) => {
5798
5796
  const NoOption = () => {
@@ -5812,13 +5810,7 @@ var Select = ({
5812
5810
  children
5813
5811
  );
5814
5812
  };
5815
- const Option = ({
5816
- children,
5817
- innerProps,
5818
- innerRef,
5819
- isFocused,
5820
- isSelected
5821
- }) => {
5813
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
5822
5814
  return /* @__PURE__ */ import_react35.default.createElement(
5823
5815
  "div",
5824
5816
  {
@@ -5833,14 +5825,7 @@ var Select = ({
5833
5825
  children
5834
5826
  );
5835
5827
  };
5836
- const Menu2 = ({
5837
- cx,
5838
- children,
5839
- getStyles,
5840
- innerProps,
5841
- innerRef,
5842
- ...menuProps
5843
- }) => {
5828
+ const Menu2 = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
5844
5829
  const menuOpen = menuProps.selectProps.menuIsOpen;
5845
5830
  return /* @__PURE__ */ import_react35.default.createElement(
5846
5831
  "div",
@@ -5869,71 +5854,72 @@ var Select = ({
5869
5854
  )
5870
5855
  },
5871
5856
  props.label && /* @__PURE__ */ import_react35.default.createElement(Label2, { ...labelProps }, props.label),
5872
- props.isLoading ? /* @__PURE__ */ import_react35.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
5873
- // TODO: enable keyboard to go to the next item in the list
5874
- /* @__PURE__ */ import_react35.default.createElement(
5875
- import_react_select.default,
5876
- {
5877
- noOptionsMessage: NoOption,
5878
- classNames: {
5879
- control: () => cn(
5880
- props.phoneCode && "hawa-rounded-r-none",
5881
- props.controlClassNames
5882
- ),
5883
- container: () => cn(
5884
- selectContainerStyles,
5885
- props.phoneCode && phoneCodeStyles,
5886
- props.isMulti && "hawa-ps-0 "
5887
- ),
5888
- placeholder: () => cn(
5889
- selectPlaceholderStyles,
5890
- props.disabled && "hawa-text-muted-foreground"
5891
- ),
5892
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
5893
- singleValue: () => cn(
5894
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
5895
- ),
5896
- indicatorsContainer: () => cn(
5897
- selectIndicatorContainerStyles,
5898
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
5899
- props.disabled && "hawa-opacity-30"
5900
- )
5901
- },
5902
- unstyled: true,
5903
- autoFocus: false,
5904
- components: props.hideIndicator ? { Option, Menu: Menu2, IndicatorsContainer: () => null } : {
5857
+ props.isLoading ? /* @__PURE__ */ import_react35.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ import_react35.default.createElement(
5858
+ import_react_select.default,
5859
+ {
5860
+ noOptionsMessage: NoOption,
5861
+ classNames: {
5862
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
5863
+ container: () => cn(
5864
+ selectContainerStyles,
5865
+ props.phoneCode && phoneCodeStyles,
5866
+ props.isMulti && "hawa-ps-0 "
5867
+ ),
5868
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
5869
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
5870
+ singleValue: () => cn(
5871
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
5872
+ ),
5873
+ indicatorsContainer: () => cn(
5874
+ selectIndicatorContainerStyles,
5875
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
5876
+ props.disabled && "hawa-opacity-30"
5877
+ )
5878
+ },
5879
+ unstyled: true,
5880
+ autoFocus: false,
5881
+ components: props.hideIndicator ? {
5882
+ Option: (optionProps) => /* @__PURE__ */ import_react35.default.createElement(
5905
5883
  Option,
5906
- Menu: Menu2,
5907
- ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5908
- "div",
5909
- {
5910
- className: cn(
5911
- e.className,
5912
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
5913
- ),
5914
- ...e
5915
- }
5916
- ),
5917
- MultiValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5918
- "div",
5919
- {
5920
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
5921
- ...e
5922
- }
5923
- )
5924
- },
5925
- onChange: (newValue, action) => props.onChange(newValue, action),
5926
- options: props.options,
5927
- getOptionLabel: props.getOptionLabel,
5928
- defaultValue: props.defaultValue,
5929
- value: props.value,
5930
- placeholder: props.placeholder,
5931
- isDisabled: props.disabled,
5932
- isClearable: props.isClearable,
5933
- isMulti: props.isMulti,
5934
- isSearchable: props.isSearchable
5935
- }
5936
- )
5884
+ {
5885
+ ...optionProps,
5886
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
5887
+ }
5888
+ ),
5889
+ Menu: Menu2,
5890
+ IndicatorsContainer: () => null
5891
+ } : {
5892
+ Option,
5893
+ Menu: Menu2,
5894
+ ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5895
+ "div",
5896
+ {
5897
+ className: cn(
5898
+ e.className,
5899
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
5900
+ ),
5901
+ ...e
5902
+ }
5903
+ ),
5904
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5905
+ "div",
5906
+ {
5907
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
5908
+ ...e
5909
+ }
5910
+ )
5911
+ },
5912
+ onChange: (newValue, action) => props.onChange(newValue, action),
5913
+ options: props.options,
5914
+ getOptionLabel: props.getOptionLabel,
5915
+ defaultValue: props.defaultValue,
5916
+ value: props.value,
5917
+ placeholder: props.placeholder,
5918
+ isDisabled: props.disabled,
5919
+ isClearable: props.isClearable,
5920
+ isMulti: props.isMulti,
5921
+ isSearchable: props.isSearchable
5922
+ }
5937
5923
  ) : /* @__PURE__ */ import_react35.default.createElement(
5938
5924
  import_creatable.default,
5939
5925
  {
@@ -7923,11 +7909,13 @@ var PhoneInput = ({
7923
7909
  countryCodes,
7924
7910
  ...props
7925
7911
  }) => {
7912
+ var _a;
7926
7913
  const [phoneNumber, setPhoneNumber] = (0, import_react39.useState)("");
7927
- const [countryCode, setCountryCode] = (0, import_react39.useState)(props.preferredCountry);
7914
+ const [countryCode, setCountryCode] = (0, import_react39.useState)(
7915
+ props.preferredCountry || { label: "+966" }
7916
+ );
7928
7917
  const inputRef = (0, import_react39.useRef)(null);
7929
7918
  const handleInputChange = (e) => {
7930
- console.log("test e ", e.target.value);
7931
7919
  const validChars = /^[0-9-()]+$/;
7932
7920
  const input = e.target.value;
7933
7921
  if (input === "" || validChars.test(input)) {
@@ -7949,11 +7937,13 @@ var PhoneInput = ({
7949
7937
  isMulti: false,
7950
7938
  isSearchable: true,
7951
7939
  isClearable: false,
7952
- placeholder: "Code",
7940
+ placeholder: (_a = props.preferredCountry) == null ? void 0 : _a.label,
7953
7941
  options: countryCodes || countries_default,
7954
- onChange: setCountryCode,
7955
- value: countryCode == null ? void 0 : countryCode.label,
7956
- defaultValue: props.preferredCountry
7942
+ onChange: (e) => setCountryCode({ label: e.label, value: e.label }),
7943
+ valueKey: "label",
7944
+ labelKey: "label",
7945
+ value: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label },
7946
+ defaultValue: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label }
7957
7947
  }
7958
7948
  ), /* @__PURE__ */ import_react39.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react39.default.createElement(
7959
7949
  "input",
@@ -8066,14 +8056,7 @@ var PinInputRoot = React50.forwardRef(({ className, containerClassName, ...props
8066
8056
  }
8067
8057
  ));
8068
8058
  PinInputRoot.displayName = "PinInputRoot";
8069
- var PinInputGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React50.createElement(
8070
- "div",
8071
- {
8072
- ref,
8073
- className: cn("hawa-flex hawa-items-center", className),
8074
- ...props
8075
- }
8076
- ));
8059
+ var PinInputGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React50.createElement("div", { ref, className: cn("hawa-flex hawa-items-center", className), ...props }));
8077
8060
  PinInputGroup.displayName = "PinInputGroup";
8078
8061
  var PinInputSlot = React50.forwardRef(({ index, className, ...props }, ref) => {
8079
8062
  const pinInputContext = React50.useContext(import_input_otp.OTPInputContext);
@@ -8096,22 +8079,12 @@ var PinInputSlot = React50.forwardRef(({ index, className, ...props }, ref) => {
8096
8079
  PinInputSlot.displayName = "PinInputSlot";
8097
8080
  var PinInputSeperator = React50.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React50.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React50.createElement(Dot, null)));
8098
8081
  PinInputSeperator.displayName = "PinInputSeperator";
8099
- var PinInput = ({
8100
- separatorPosition = 0,
8101
- ...props
8102
- }) => {
8082
+ var PinInput = ({ separatorPosition = 0, ...props }) => {
8103
8083
  const maxLength = props.maxLength || 6;
8104
8084
  const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
8105
8085
  const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
8106
8086
  const secondGroupLength = maxLength - firstGroupLength;
8107
- return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
8108
- PinInputSlot,
8109
- {
8110
- key: index,
8111
- index,
8112
- className: "hawa-w-full hawa-border"
8113
- }
8114
- ))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React50.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
8087
+ return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2", dir: "ltr" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(PinInputSlot, { key: index, index, className: "hawa-w-full hawa-border" }))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React50.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
8115
8088
  PinInputSlot,
8116
8089
  {
8117
8090
  key: index + firstGroupLength,
@@ -11323,14 +11296,7 @@ var LoginForm = ({
11323
11296
  (texts == null ? void 0 : texts.loginText) || "Login"
11324
11297
  ),
11325
11298
  props.additionalButtons && props.additionalButtons,
11326
- props.allowRegister && /* @__PURE__ */ import_react67.default.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react67.default.createElement(
11327
- "span",
11328
- {
11329
- onClick: props.onRouteToRegister,
11330
- className: "clickable-link"
11331
- },
11332
- (texts == null ? void 0 : texts.createAccount) || "Create Account"
11333
- ))
11299
+ props.allowRegister && /* @__PURE__ */ import_react67.default.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react67.default.createElement("span", { onClick: props.onRouteToRegister, className: "clickable-link" }, (texts == null ? void 0 : texts.createAccount) || "Create Account"))
11334
11300
  )),
11335
11301
  props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react67.default.createElement(
11336
11302
  CardFooter,
@@ -12000,10 +11966,7 @@ var import_react74 = __toESM(require("react"));
12000
11966
  var import_react_hook_form5 = require("react-hook-form");
12001
11967
  var import_zod5 = require("@hookform/resolvers/zod");
12002
11968
  var z5 = __toESM(require("zod"));
12003
- var CodeConfirmation = ({
12004
- codeLength = 6,
12005
- ...props
12006
- }) => {
11969
+ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
12007
11970
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
12008
11971
  const formSchema = z5.object({
12009
11972
  otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(codeLength, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
@@ -12042,14 +12005,7 @@ var CodeConfirmation = ({
12042
12005
  }
12043
12006
  };
12044
12007
  }, []);
12045
- return /* @__PURE__ */ import_react74.default.createElement(Card, null, /* @__PURE__ */ import_react74.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react74.default.createElement(
12046
- Alert,
12047
- {
12048
- title: props.errorTitle,
12049
- text: props.errorText,
12050
- severity: "error"
12051
- }
12052
- ), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react74.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react74.default.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ import_react74.default.createElement(
12008
+ return /* @__PURE__ */ import_react74.default.createElement(Card, null, /* @__PURE__ */ import_react74.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react74.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react74.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react74.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react74.default.createElement("span", null, props.identifier))), /* @__PURE__ */ import_react74.default.createElement(
12053
12009
  "form",
12054
12010
  {
12055
12011
  noValidate: true,
@@ -12098,9 +12054,7 @@ var CodeConfirmation = ({
12098
12054
  if (props.onCancel) {
12099
12055
  return props.onCancel();
12100
12056
  } else {
12101
- console.log(
12102
- "Cancel button clicked but onCancel prop is missing"
12103
- );
12057
+ console.log("Cancel button clicked but onCancel prop is missing");
12104
12058
  }
12105
12059
  },
12106
12060
  variant: "outline"