@sikka/hawa 0.16.12-next → 0.16.14-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 (3) hide show
  1. package/dist/index.js +10083 -9764
  2. package/dist/index.mjs +543 -439
  3. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -356,6 +356,7 @@ var PricingCard = ({
356
356
  currentPlan = false,
357
357
  ...props
358
358
  }) => {
359
+ var _a;
359
360
  let cardSizes = {
360
361
  small: "hawa-mx-1 hawa-w-full hawa-max-w-sm hawa-rounded hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
361
362
  medium: "hawa-mx-1 hawa-w-full hawa-rounded hawa-min-w-fit hawa-border dark:hawa-border-gray-700 hawa-bg-background ",
@@ -376,7 +377,7 @@ var PricingCard = ({
376
377
  /* @__PURE__ */ React7.createElement("h5", { className: "hawa-text-md 0 hawa-font-bold hawa-text-primary/70" }, props.texts.title),
377
378
  /* @__PURE__ */ React7.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ React7.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ React7.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText)),
378
379
  /* @__PURE__ */ React7.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
379
- props.features && /* @__PURE__ */ React7.createElement("ul", { role: "list", className: "hawa-space-y-0 " }, props.features?.map((feature, o) => {
380
+ props.features && /* @__PURE__ */ React7.createElement("ul", { role: "list", className: "hawa-space-y-0 " }, (_a = props.features) == null ? void 0 : _a.map((feature, o) => {
380
381
  return /* @__PURE__ */ React7.createElement(
381
382
  "li",
382
383
  {
@@ -894,7 +895,7 @@ var PinInput = ({
894
895
  if (e.key === "Backspace") {
895
896
  e.target.value.length === 0 ? backTo = index - 1 : backTo = index;
896
897
  const previousInput = document.getElementById(`input-${backTo}`);
897
- previousInput?.focus();
898
+ previousInput == null ? void 0 : previousInput.focus();
898
899
  }
899
900
  };
900
901
  useEffect3(() => {
@@ -915,10 +916,10 @@ var PinInput = ({
915
916
  setPin(newPin);
916
917
  if (e.target.value.length === 1) {
917
918
  const nextInput = document.getElementById(`input-${index + 1}`);
918
- nextInput?.focus();
919
+ nextInput == null ? void 0 : nextInput.focus();
919
920
  } else if (e.target.value.length === 0) {
920
921
  const previousInput = document.getElementById(`input-${index - 1}`);
921
- previousInput?.focus();
922
+ previousInput == null ? void 0 : previousInput.focus();
922
923
  }
923
924
  }
924
925
  };
@@ -2731,8 +2732,8 @@ var Label2 = React14.forwardRef(
2731
2732
  strokeLinejoin: "round"
2732
2733
  },
2733
2734
  /* @__PURE__ */ React14.createElement("circle", { cx: "12", cy: "12", r: "10" }),
2734
- /* @__PURE__ */ React14.createElement("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
2735
- /* @__PURE__ */ React14.createElement("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
2735
+ /* @__PURE__ */ React14.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
2736
+ /* @__PURE__ */ React14.createElement("path", { d: "M12 17h.01" })
2736
2737
  )))
2737
2738
  );
2738
2739
  Label2.displayName = "Label";
@@ -2767,7 +2768,8 @@ function Skeleton({
2767
2768
  // components/elements/Select.tsx
2768
2769
  var Select = ({ labelKey = "label", ...props }) => {
2769
2770
  const NoOption = () => {
2770
- return /* @__PURE__ */ React16.createElement("div", null, props.texts?.noOptions ?? "No Items Found");
2771
+ var _a, _b;
2772
+ return /* @__PURE__ */ React16.createElement("div", null, (_b = (_a = props.texts) == null ? void 0 : _a.noOptions) != null ? _b : "No Items Found");
2771
2773
  };
2772
2774
  const Control = ({ children, innerProps, innerRef }) => {
2773
2775
  return /* @__PURE__ */ React16.createElement(
@@ -2869,7 +2871,10 @@ var Select = ({ labelKey = "label", ...props }) => {
2869
2871
  ) : /* @__PURE__ */ React16.createElement(
2870
2872
  CreatableSelect,
2871
2873
  {
2872
- formatCreateLabel: (inputValue) => `${props.texts?.createLabel ?? "Create"} "${inputValue}"`,
2874
+ formatCreateLabel: (inputValue) => {
2875
+ var _a, _b;
2876
+ return `${(_b = (_a = props.texts) == null ? void 0 : _a.createLabel) != null ? _b : "Create"} "${inputValue}"`;
2877
+ },
2873
2878
  classNames: {
2874
2879
  container: () => cn(
2875
2880
  "hawa-rounded",
@@ -2912,8 +2917,9 @@ var PhoneInput = (props) => {
2912
2917
  const [countryCode, setCountryCode] = useState5(props.preferredCountry);
2913
2918
  const inputRef = useRef2(null);
2914
2919
  useEffect4(() => {
2920
+ var _a;
2915
2921
  if (inputRef.current) {
2916
- inputRef.current?.focus();
2922
+ (_a = inputRef.current) == null ? void 0 : _a.focus();
2917
2923
  }
2918
2924
  }, []);
2919
2925
  const handleInputChange = (e) => {
@@ -2923,7 +2929,7 @@ var PhoneInput = (props) => {
2923
2929
  setPhoneNumber(input);
2924
2930
  }
2925
2931
  if (props.handleChange) {
2926
- props.handleChange(`${countryCode?.label}-${e.target.value}`);
2932
+ props.handleChange(`${countryCode == null ? void 0 : countryCode.label}-${e.target.value}`);
2927
2933
  } else {
2928
2934
  console.log("handleChange prop was not provided in <PhoneInput/>");
2929
2935
  }
@@ -2941,7 +2947,7 @@ var PhoneInput = (props) => {
2941
2947
  isSearchable: true,
2942
2948
  isClearable: false,
2943
2949
  defaultValue: props.preferredCountry,
2944
- value: countryCode?.label,
2950
+ value: countryCode == null ? void 0 : countryCode.label,
2945
2951
  onChange: setCountryCode
2946
2952
  }
2947
2953
  ), /* @__PURE__ */ React17.createElement("div", { className: "hawa-flex hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-w-full hawa-gap-0" }, /* @__PURE__ */ React17.createElement(
@@ -3056,6 +3062,7 @@ var Radio = ({
3056
3062
  labelProps,
3057
3063
  ...props
3058
3064
  }) => {
3065
+ var _a, _b, _c;
3059
3066
  const [selectedOption, setSelectedOption] = useState6(props.defaultValue);
3060
3067
  let activeTabStyle = "hawa-inline-block hawa-py-2 hawa-px-4 hawa-w-full hawa-text-primary-foreground hawa-bg-primary hawa-active dark:hawa-bg-primary ";
3061
3068
  let inactiveTabStyle = "hawa-inline-block hawa-py-2 hawa-px-4 hawa-w-full hawa-transition-all hover:hawa-bg-primary/10 dark:hawa-bg-background hawa-bg-primary/5 hover:hawa-text-gray-900 dark:hover:hawa-bg-primary/10 dark:hover:hawa-text-white dark:hawa-bg-primary/5";
@@ -3072,7 +3079,8 @@ var Radio = ({
3072
3079
  );
3073
3080
  const parentRef = useRef3(null);
3074
3081
  useEffect5(() => {
3075
- const parentNode = parentRef.current?.parentNode;
3082
+ var _a2;
3083
+ const parentNode = (_a2 = parentRef.current) == null ? void 0 : _a2.parentNode;
3076
3084
  if (parentNode) {
3077
3085
  const dir = window.getComputedStyle(parentNode).direction;
3078
3086
  setParentDirection(dir);
@@ -3085,13 +3093,13 @@ var Radio = ({
3085
3093
  {
3086
3094
  ref: parentRef,
3087
3095
  className: cn(
3088
- props.options && props.options?.length > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
3096
+ props.options && ((_a = props.options) == null ? void 0 : _a.length) > 2 ? "hawa-flex-wrap xs:hawa-max-w-full xs:hawa-flex-nowrap" : "",
3089
3097
  "hawa-select-none hawa-whitespace-nowrap hawa-rounded hawa-border hawa-text-center hawa-text-sm hawa-font-medium",
3090
3098
  widthStyle[width],
3091
3099
  orientationStyle[orientation]
3092
3100
  )
3093
3101
  },
3094
- props.options?.map((opt, o) => /* @__PURE__ */ React19.createElement(
3102
+ (_b = props.options) == null ? void 0 : _b.map((opt, o) => /* @__PURE__ */ React19.createElement(
3095
3103
  "li",
3096
3104
  {
3097
3105
  "aria-current": "page",
@@ -3157,7 +3165,7 @@ var Radio = ({
3157
3165
  )
3158
3166
  )));
3159
3167
  case "cards":
3160
- return /* @__PURE__ */ React19.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, props.options?.map((opt, o) => /* @__PURE__ */ React19.createElement("li", { key: o }, /* @__PURE__ */ React19.createElement(
3168
+ return /* @__PURE__ */ React19.createElement("ul", { className: cn(orientationStyle[orientation], "hawa-gap-4") }, (_c = props.options) == null ? void 0 : _c.map((opt, o) => /* @__PURE__ */ React19.createElement("li", { key: o }, /* @__PURE__ */ React19.createElement(
3161
3169
  "input",
3162
3170
  {
3163
3171
  type: "radio",
@@ -3251,7 +3259,8 @@ var Switch = React20.forwardRef(
3251
3259
  );
3252
3260
  const parentRef = React20.useRef(null);
3253
3261
  React20.useEffect(() => {
3254
- const parentNode = parentRef.current?.parentNode;
3262
+ var _a;
3263
+ const parentNode = (_a = parentRef.current) == null ? void 0 : _a.parentNode;
3255
3264
  if (parentNode) {
3256
3265
  const dir = window.getComputedStyle(parentNode).direction;
3257
3266
  setParentDirection(dir);
@@ -3451,6 +3460,7 @@ var Input = forwardRef9(
3451
3460
  forceHideHelperText = false,
3452
3461
  ...props
3453
3462
  }, ref) => {
3463
+ var _a;
3454
3464
  let marginStyles = {
3455
3465
  none: "hawa-mb-0",
3456
3466
  normal: "hawa-mb-3",
@@ -3512,7 +3522,7 @@ var Input = forwardRef9(
3512
3522
  props.endIcon && "hawa-pe-9",
3513
3523
  props.startIcon && "hawa-ps-9",
3514
3524
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
3515
- props.inputProps?.className
3525
+ (_a = props.inputProps) == null ? void 0 : _a.className
3516
3526
  )
3517
3527
  }
3518
3528
  )), !forceHideHelperText && /* @__PURE__ */ React24.createElement(
@@ -3915,6 +3925,7 @@ var Combobox = ({
3915
3925
  data,
3916
3926
  ...props
3917
3927
  }) => {
3928
+ var _a, _b, _c;
3918
3929
  const [open, setOpen] = React28.useState(false);
3919
3930
  const [value, setValue] = React28.useState(defaultValue);
3920
3931
  function getProperty(obj, key) {
@@ -3965,7 +3976,7 @@ var Combobox = ({
3965
3976
  value ? getProperty(
3966
3977
  data.find((item) => item[valueKey] === value) || {},
3967
3978
  labelKey
3968
- ) : props.texts?.placeholder || "...",
3979
+ ) : ((_a = props.texts) == null ? void 0 : _a.placeholder) || "...",
3969
3980
  /* @__PURE__ */ React28.createElement(
3970
3981
  "svg",
3971
3982
  {
@@ -3998,7 +4009,7 @@ var Combobox = ({
3998
4009
  {
3999
4010
  className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
4000
4011
  },
4001
- /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, { placeholder: props.texts?.searchPlaceholder }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, props.texts?.noItems || "No items found."), /* @__PURE__ */ React28.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item) => /* @__PURE__ */ React28.createElement(
4012
+ /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, { placeholder: (_b = props.texts) == null ? void 0 : _b.searchPlaceholder }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, ((_c = props.texts) == null ? void 0 : _c.noItems) || "No items found."), /* @__PURE__ */ React28.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item) => /* @__PURE__ */ React28.createElement(
4002
4013
  CommandItem,
4003
4014
  {
4004
4015
  key: getProperty(item, valueKey),
@@ -4047,7 +4058,8 @@ import React29, { useRef as useRef5 } from "react";
4047
4058
  var FileUploader = ({ handleFile, className }) => {
4048
4059
  const hiddenFileInput = useRef5(null);
4049
4060
  const handleClick = () => {
4050
- hiddenFileInput.current?.click();
4061
+ var _a;
4062
+ (_a = hiddenFileInput.current) == null ? void 0 : _a.click();
4051
4063
  };
4052
4064
  const handleChange = (event) => {
4053
4065
  const fileUploaded = event.target.files[0];
@@ -4717,8 +4729,8 @@ var Alert = ({
4717
4729
  }, duration);
4718
4730
  const timeoutDestroy = setTimeout(() => {
4719
4731
  setClosed(true);
4720
- if (alertRef?.current) {
4721
- alertRef?.current.removeChild(alertRef?.current.children[0]);
4732
+ if (alertRef == null ? void 0 : alertRef.current) {
4733
+ alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
4722
4734
  }
4723
4735
  }, duration + 1e3);
4724
4736
  return () => {
@@ -4809,8 +4821,8 @@ var Alert = ({
4809
4821
  }
4810
4822
  setClosed(true);
4811
4823
  setTimeout(() => {
4812
- if (alertRef?.current) {
4813
- alertRef?.current.removeChild(alertRef?.current.children[0]);
4824
+ if (alertRef == null ? void 0 : alertRef.current) {
4825
+ alertRef == null ? void 0 : alertRef.current.removeChild(alertRef == null ? void 0 : alertRef.current.children[0]);
4814
4826
  }
4815
4827
  }, 200);
4816
4828
  }
@@ -4883,8 +4895,8 @@ var DestroyableCard = ({
4883
4895
  onClick: () => {
4884
4896
  setClosed(true);
4885
4897
  setTimeout(() => {
4886
- if (popUpRef?.current) {
4887
- popUpRef?.current.removeChild(popUpRef?.current.children[0]);
4898
+ if (popUpRef == null ? void 0 : popUpRef.current) {
4899
+ popUpRef == null ? void 0 : popUpRef.current.removeChild(popUpRef == null ? void 0 : popUpRef.current.children[0]);
4888
4900
  }
4889
4901
  }, 200);
4890
4902
  }
@@ -4934,6 +4946,7 @@ var FileDropzone = ({
4934
4946
  termsLink,
4935
4947
  privacyLink
4936
4948
  }) => {
4949
+ var _a, _b, _c, _d, _e, _f;
4937
4950
  const [cmp, setCmp] = useState16(0);
4938
4951
  const [max, setMax] = useState16(0);
4939
4952
  const {
@@ -4959,7 +4972,7 @@ var FileDropzone = ({
4959
4972
  });
4960
4973
  useEffect12(
4961
4974
  () => () => {
4962
- files?.forEach((file) => {
4975
+ files == null ? void 0 : files.forEach((file) => {
4963
4976
  URL.revokeObjectURL(file.preview);
4964
4977
  });
4965
4978
  },
@@ -5031,7 +5044,7 @@ var FileDropzone = ({
5031
5044
  );
5032
5045
  }
5033
5046
  });
5034
- const thumbs = files?.map((file, index) => /* @__PURE__ */ React40.createElement("div", { className: "hawa-relative hawa-rounded", key: index }, /* @__PURE__ */ React40.createElement(
5047
+ const thumbs = files == null ? void 0 : files.map((file, index) => /* @__PURE__ */ React40.createElement("div", { className: "hawa-relative hawa-rounded", key: index }, /* @__PURE__ */ React40.createElement(
5035
5048
  "button",
5036
5049
  {
5037
5050
  onClick: (e) => {
@@ -5114,21 +5127,21 @@ var FileDropzone = ({
5114
5127
  ), typeof texts.clickHereToUpload === "function" ? texts.clickHereToUpload() : texts.clickHereToUpload), /* @__PURE__ */ React40.createElement("div", { className: "hawa-pt-2 hawa-text-center hawa-text-xs hawa-select-none" }, texts.acceptedFileTypes, " ", accept.split(",")), /* @__PURE__ */ React40.createElement("div", { className: "hawa-pb-2 hawa-pt-1 hawa-text-center hawa-text-xs hawa-select-none" }, texts.maxFileSize, " ", max)),
5115
5128
  acceptedFiles.length > 0 && /* @__PURE__ */ React40.createElement("div", { className: "hawa-flex hawa-justify-center hawa-rounded-lg hawa-p-2 " }, /* @__PURE__ */ React40.createElement(Button, { onClick: clearAllFiles }, "Clear All")),
5116
5129
  acceptedFiles.length > 0 && thumbs && showPreview ? /* @__PURE__ */ React40.createElement("aside", { className: "hawa-flex hawa-flex-row hawa-flex-wrap hawa-justify-center hawa-gap-2 hawa-rounded-lg hawa-p-2" }, thumbs) : null,
5117
- /* @__PURE__ */ React40.createElement("div", { className: "px-4" }, fileRejections[0]?.errors[0]?.code && errs)
5118
- ), disclaimer && /* @__PURE__ */ React40.createElement("div", { className: "hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50" }, texts.disclaimer ?? "By uploading a file you agree to our", " ", /* @__PURE__ */ React40.createElement(
5130
+ /* @__PURE__ */ React40.createElement("div", { className: "px-4" }, ((_b = (_a = fileRejections[0]) == null ? void 0 : _a.errors[0]) == null ? void 0 : _b.code) && errs)
5131
+ ), disclaimer && /* @__PURE__ */ React40.createElement("div", { className: "hawa-mt-2 hawa-text-sm hawa-text-muted-foreground/50" }, (_c = texts.disclaimer) != null ? _c : "By uploading a file you agree to our", " ", /* @__PURE__ */ React40.createElement(
5119
5132
  "a",
5120
5133
  {
5121
5134
  href: termsLink,
5122
5135
  className: "clickable-link hawa-text-muted-foreground/50"
5123
5136
  },
5124
- texts.terms ?? "Terms"
5125
- ), " ", texts.and ?? "and", " ", /* @__PURE__ */ React40.createElement(
5137
+ (_d = texts.terms) != null ? _d : "Terms"
5138
+ ), " ", (_e = texts.and) != null ? _e : "and", " ", /* @__PURE__ */ React40.createElement(
5126
5139
  "a",
5127
5140
  {
5128
5141
  href: privacyLink,
5129
5142
  className: "clickable-link hawa-text-muted-foreground/50"
5130
5143
  },
5131
- texts.privacyPolicy ?? "Privacy Policy"
5144
+ (_f = texts.privacyPolicy) != null ? _f : "Privacy Policy"
5132
5145
  )));
5133
5146
  };
5134
5147
 
@@ -5150,12 +5163,12 @@ var Carousel = (props) => {
5150
5163
  const [selectedIndex, setSelectedIndex] = useState17(0);
5151
5164
  useEffect13(() => {
5152
5165
  function selectHandler() {
5153
- const index = emblaApi?.selectedScrollSnap();
5166
+ const index = emblaApi == null ? void 0 : emblaApi.selectedScrollSnap();
5154
5167
  setSelectedIndex(index || 0);
5155
5168
  }
5156
- emblaApi?.on("select", selectHandler);
5169
+ emblaApi == null ? void 0 : emblaApi.on("select", selectHandler);
5157
5170
  return () => {
5158
- emblaApi?.off("select", selectHandler);
5171
+ emblaApi == null ? void 0 : emblaApi.off("select", selectHandler);
5159
5172
  };
5160
5173
  }, [emblaApi]);
5161
5174
  useEffect13(() => {
@@ -5171,22 +5184,22 @@ var Carousel = (props) => {
5171
5184
  };
5172
5185
  }, [emblaApi, autoplay, autoplayInterval]);
5173
5186
  const length = React41.Children.count(items);
5174
- const canScrollNext = !!emblaApi?.canScrollNext();
5175
- const canScrollPrev = !!emblaApi?.canScrollPrev();
5176
- return /* @__PURE__ */ React41.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-flex" }, items?.map((item) => /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-justify-center hawa-flex hawa-items-center hawa-min-w-0 hawa-flex-[0_0_100%]" }, item))))), /* @__PURE__ */ React41.createElement(
5187
+ const canScrollNext = !!(emblaApi == null ? void 0 : emblaApi.canScrollNext());
5188
+ const canScrollPrev = !!(emblaApi == null ? void 0 : emblaApi.canScrollPrev());
5189
+ return /* @__PURE__ */ React41.createElement("div", { className: " hawa-relative hawa-h-full" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-overflow-hidden" }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full", ref: emblaRef }, /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-flex" }, items == null ? void 0 : items.map((item) => /* @__PURE__ */ React41.createElement("div", { className: "hawa-h-full hawa-justify-center hawa-flex hawa-items-center hawa-min-w-0 hawa-flex-[0_0_100%]" }, item))))), /* @__PURE__ */ React41.createElement(
5177
5190
  Dots,
5178
5191
  {
5179
5192
  itemsLength: length,
5180
5193
  selectedIndex,
5181
- onDotClick: (index) => emblaApi?.scrollTo(index)
5194
+ onDotClick: (index) => emblaApi == null ? void 0 : emblaApi.scrollTo(index)
5182
5195
  }
5183
5196
  ), showArrows && /* @__PURE__ */ React41.createElement(
5184
5197
  CarouselControls,
5185
5198
  {
5186
5199
  canScrollNext,
5187
5200
  canScrollPrev,
5188
- onNext: () => emblaApi?.scrollNext(),
5189
- onPrev: () => emblaApi?.scrollPrev()
5201
+ onNext: () => emblaApi == null ? void 0 : emblaApi.scrollNext(),
5202
+ onPrev: () => emblaApi == null ? void 0 : emblaApi.scrollPrev()
5190
5203
  }
5191
5204
  ));
5192
5205
  };
@@ -5467,6 +5480,7 @@ var DataTable = ({
5467
5480
  enableGoTo,
5468
5481
  ...props
5469
5482
  }) => {
5483
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
5470
5484
  const [sorting, setSorting] = React45.useState(
5471
5485
  props.defaultSort ? [{ id: props.defaultSort, desc: false }] : []
5472
5486
  );
@@ -5500,8 +5514,8 @@ var DataTable = ({
5500
5514
  expanded
5501
5515
  }
5502
5516
  });
5503
- const pageText = props.texts?.page || "page";
5504
- const itemsPerPageOptions = props.itemsPerPage?.map((item) => ({
5517
+ const pageText = ((_a = props.texts) == null ? void 0 : _a.page) || "page";
5518
+ const itemsPerPageOptions = (_b = props.itemsPerPage) == null ? void 0 : _b.map((item) => ({
5505
5519
  label: `${item} / ${pageText}`,
5506
5520
  value: item
5507
5521
  }));
@@ -5509,8 +5523,8 @@ var DataTable = ({
5509
5523
  Input,
5510
5524
  {
5511
5525
  forceHideHelperText: true,
5512
- placeholder: props.texts?.searchPlaceholder,
5513
- value: globalFilter ?? "",
5526
+ placeholder: (_c = props.texts) == null ? void 0 : _c.searchPlaceholder,
5527
+ value: globalFilter != null ? globalFilter : "",
5514
5528
  onChange: (event) => setGlobalFilter(event.target.value),
5515
5529
  margin: "none",
5516
5530
  className: "hawa-w-full md:hawa-max-w-sm"
@@ -5521,7 +5535,7 @@ var DataTable = ({
5521
5535
  variant: "outline",
5522
5536
  className: "hawa-flex hawa-flex-row hawa-gap-2"
5523
5537
  },
5524
- props.texts?.columns || "Columns",
5538
+ ((_d = props.texts) == null ? void 0 : _d.columns) || "Columns",
5525
5539
  /* @__PURE__ */ React45.createElement(
5526
5540
  "svg",
5527
5541
  {
@@ -5564,7 +5578,8 @@ var DataTable = ({
5564
5578
  )
5565
5579
  },
5566
5580
  /* @__PURE__ */ React45.createElement("div", { className: "hawa-rounded-md" }, /* @__PURE__ */ React45.createElement(Table, null, table.getAllColumns().length > 0 && /* @__PURE__ */ React45.createElement(TableHeader, null, table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ React45.createElement(TableRow, { key: headerGroup.id }, headerGroup.headers.map((header) => {
5567
- let isSortable = header.column.columnDef.meta?.sortable;
5581
+ var _a2;
5582
+ let isSortable = (_a2 = header.column.columnDef.meta) == null ? void 0 : _a2.sortable;
5568
5583
  return /* @__PURE__ */ React45.createElement(
5569
5584
  TableHead,
5570
5585
  {
@@ -5578,31 +5593,34 @@ var DataTable = ({
5578
5593
  header.getContext()
5579
5594
  )
5580
5595
  );
5581
- })))), /* @__PURE__ */ React45.createElement(TableBody, null, table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React45.createElement(
5596
+ })))), /* @__PURE__ */ React45.createElement(TableBody, null, ((_e = table.getRowModel().rows) == null ? void 0 : _e.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React45.createElement(
5582
5597
  TableRow,
5583
5598
  {
5584
5599
  key: row.id,
5585
5600
  "data-state": row.getIsSelected() && "selected"
5586
5601
  },
5587
- row.getVisibleCells().map((cell) => /* @__PURE__ */ React45.createElement(
5588
- TableCell,
5589
- {
5590
- dir: props.direction,
5591
- padding: props.condensed ? "condensed" : cell.column.columnDef.meta?.padding,
5592
- key: cell.id
5593
- },
5594
- flexRender(
5595
- cell.column.columnDef.cell,
5596
- cell.getContext()
5597
- )
5598
- ))
5602
+ row.getVisibleCells().map((cell) => {
5603
+ var _a2;
5604
+ return /* @__PURE__ */ React45.createElement(
5605
+ TableCell,
5606
+ {
5607
+ dir: props.direction,
5608
+ padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
5609
+ key: cell.id
5610
+ },
5611
+ flexRender(
5612
+ cell.column.columnDef.cell,
5613
+ cell.getContext()
5614
+ )
5615
+ );
5616
+ })
5599
5617
  )) : /* @__PURE__ */ React45.createElement(TableRow, null, /* @__PURE__ */ React45.createElement(
5600
5618
  TableCell,
5601
5619
  {
5602
5620
  colSpan: columns.length,
5603
5621
  className: "hawa-h-24 hawa-text-center"
5604
5622
  },
5605
- props.texts?.noData
5623
+ (_f = props.texts) == null ? void 0 : _f.noData
5606
5624
  ))))),
5607
5625
  /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-items-center hawa-justify-between" }, !props.showCount && /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm hawa-text-muted-foreground" }), props.showCount && /* @__PURE__ */ React45.createElement(
5608
5626
  "div",
@@ -5610,10 +5628,10 @@ var DataTable = ({
5610
5628
  className: "text-sm text-muted-foreground",
5611
5629
  dir: props.direction
5612
5630
  },
5613
- /* @__PURE__ */ React45.createElement("span", null, props.texts?.total),
5631
+ /* @__PURE__ */ React45.createElement("span", null, (_g = props.texts) == null ? void 0 : _g.total),
5614
5632
  " ",
5615
5633
  /* @__PURE__ */ React45.createElement("span", null, table.getFilteredRowModel().rows.length.toLocaleString())
5616
- ), table.getPageCount() > 1 && /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 " }, enableGoTo && /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-center hawa-items-center hawa-gap-2" }, /* @__PURE__ */ React45.createElement("span", { className: "hawa-text-sm" }, props.texts?.goTo), /* @__PURE__ */ React45.createElement(
5634
+ ), table.getPageCount() > 1 && /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 " }, enableGoTo && /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-flex-row hawa-justify-center hawa-items-center hawa-gap-2" }, /* @__PURE__ */ React45.createElement("span", { className: "hawa-text-sm" }, (_h = props.texts) == null ? void 0 : _h.goTo), /* @__PURE__ */ React45.createElement(
5617
5635
  "input",
5618
5636
  {
5619
5637
  max: table.getPageCount(),
@@ -5650,11 +5668,11 @@ var DataTable = ({
5650
5668
  size: "icon",
5651
5669
  className: "hawa-h-fit hawa-w-fit hawa-p-0 hawa-px-2 hawa-py-1 "
5652
5670
  },
5653
- `${table.getState().pagination.pageSize} / ${props.texts?.page}`
5671
+ `${table.getState().pagination.pageSize} / ${(_i = props.texts) == null ? void 0 : _i.page}`
5654
5672
  ),
5655
5673
  onItemSelect: (e) => table.setPageSize(Number(e))
5656
5674
  }
5657
- ), /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm " }, /* @__PURE__ */ React45.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React45.createElement("div", null, props.texts?.page), /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React45.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React45.createElement("span", null, props.texts?.of), /* @__PURE__ */ React45.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React45.createElement(
5675
+ ), /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-w-fit hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-sm " }, /* @__PURE__ */ React45.createElement("span", { className: "hawa-flex hawa-items-center hawa-gap-1" }, /* @__PURE__ */ React45.createElement("div", null, (_j = props.texts) == null ? void 0 : _j.page), /* @__PURE__ */ React45.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-1" }, /* @__PURE__ */ React45.createElement("span", { className: "hawa-font-bold" }, table.getState().pagination.pageIndex + 1), /* @__PURE__ */ React45.createElement("span", null, (_k = props.texts) == null ? void 0 : _k.of), /* @__PURE__ */ React45.createElement("span", { className: "hawa-font-bold" }, table.getPageCount())))), /* @__PURE__ */ React45.createElement(
5658
5676
  Button,
5659
5677
  {
5660
5678
  "aria-label": "Previous Table Page",
@@ -5729,6 +5747,7 @@ var SimpleTable = ({
5729
5747
  classNames,
5730
5748
  ...props
5731
5749
  }) => {
5750
+ var _a, _b;
5732
5751
  const table = useReactTable2({
5733
5752
  data,
5734
5753
  columns,
@@ -5755,31 +5774,34 @@ var SimpleTable = ({
5755
5774
  header.getContext()
5756
5775
  )
5757
5776
  );
5758
- })))), /* @__PURE__ */ React46.createElement(TableBody, null, table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React46.createElement(
5777
+ })))), /* @__PURE__ */ React46.createElement(TableBody, null, ((_a = table.getRowModel().rows) == null ? void 0 : _a.length) ? table.getRowModel().rows.map((row) => /* @__PURE__ */ React46.createElement(
5759
5778
  TableRow,
5760
5779
  {
5761
5780
  key: row.id,
5762
5781
  "data-state": row.getIsSelected() && "selected"
5763
5782
  },
5764
- row.getVisibleCells().map((cell) => /* @__PURE__ */ React46.createElement(
5765
- TableCell,
5766
- {
5767
- dir: props.direction,
5768
- padding: props.condensed ? "condensed" : cell.column.columnDef.meta?.padding,
5769
- key: cell.id
5770
- },
5771
- flexRender2(
5772
- cell.column.columnDef.cell,
5773
- cell.getContext()
5774
- )
5775
- ))
5783
+ row.getVisibleCells().map((cell) => {
5784
+ var _a2;
5785
+ return /* @__PURE__ */ React46.createElement(
5786
+ TableCell,
5787
+ {
5788
+ dir: props.direction,
5789
+ padding: props.condensed ? "condensed" : (_a2 = cell.column.columnDef.meta) == null ? void 0 : _a2.padding,
5790
+ key: cell.id
5791
+ },
5792
+ flexRender2(
5793
+ cell.column.columnDef.cell,
5794
+ cell.getContext()
5795
+ )
5796
+ );
5797
+ })
5776
5798
  )) : /* @__PURE__ */ React46.createElement(TableRow, null, /* @__PURE__ */ React46.createElement(
5777
5799
  TableCell,
5778
5800
  {
5779
5801
  colSpan: columns.length,
5780
5802
  className: "hawa-h-24 hawa-text-center"
5781
5803
  },
5782
- props.texts?.noData
5804
+ (_b = props.texts) == null ? void 0 : _b.noData
5783
5805
  )))))
5784
5806
  );
5785
5807
  };
@@ -5913,8 +5935,9 @@ var BackToTop = ({ ...props }) => {
5913
5935
  return [0, 0];
5914
5936
  };
5915
5937
  const onScroll = () => {
5938
+ var _a;
5916
5939
  let [scrollTop, scrollLeft] = getCoords();
5917
- let rect2 = props.anchor.current?.getBoundingClientRect();
5940
+ let rect2 = (_a = props.anchor.current) == null ? void 0 : _a.getBoundingClientRect();
5918
5941
  if (rect2) {
5919
5942
  setVisible(scrollTop >= rect2.height + (props.paddingThreshold || 100));
5920
5943
  }
@@ -5939,17 +5962,19 @@ var BackToTop = ({ ...props }) => {
5939
5962
  }
5940
5963
  }, 1);
5941
5964
  return () => {
5942
- props.anchor.current?.removeEventListener("scroll", onScroll);
5965
+ var _a;
5966
+ (_a = props.anchor.current) == null ? void 0 : _a.removeEventListener("scroll", onScroll);
5943
5967
  clearInterval(interval);
5944
5968
  };
5945
5969
  }, [onScroll, props.anchor]);
5946
5970
  const getStyles = () => {
5971
+ var _a;
5947
5972
  if (!props.anchor.current || !self.current)
5948
5973
  return {};
5949
5974
  let corner = props.corner || "bottom-right";
5950
5975
  let [vertical, horizontal] = corner.split("-");
5951
5976
  let anchorRect = props.anchor.current.getBoundingClientRect();
5952
- let selfRect = self.current?.getBoundingClientRect();
5977
+ let selfRect = (_a = self.current) == null ? void 0 : _a.getBoundingClientRect();
5953
5978
  let width = horizontal == "right" ? anchorRect.width - selfRect.width : 0;
5954
5979
  let height = vertical == "bottom" ? anchorRect.height - selfRect.height : 0;
5955
5980
  let style = {
@@ -6010,7 +6035,8 @@ var ScrollIndicator = ({
6010
6035
  return;
6011
6036
  anchor.current.addEventListener("scroll", onScroll);
6012
6037
  return () => {
6013
- anchor.current?.removeEventListener("scroll", onScroll);
6038
+ var _a;
6039
+ (_a = anchor.current) == null ? void 0 : _a.removeEventListener("scroll", onScroll);
6014
6040
  };
6015
6041
  }, [anchor]);
6016
6042
  return /* @__PURE__ */ React51.createElement(
@@ -6046,9 +6072,10 @@ var Badge = ({
6046
6072
  };
6047
6073
  useEffect16(() => {
6048
6074
  const handlePositioning = () => {
6075
+ var _a;
6049
6076
  if (anchor.current && indicatorRef.current) {
6050
6077
  const rect = anchor.current.getBoundingClientRect();
6051
- const parentRect = indicatorRef.current.parentElement?.getBoundingClientRect();
6078
+ const parentRect = (_a = indicatorRef.current.parentElement) == null ? void 0 : _a.getBoundingClientRect();
6052
6079
  const style = window.getComputedStyle(anchor.current);
6053
6080
  const marginTop = parseFloat(style.marginTop.replace("px", ""));
6054
6081
  const marginRight = parseFloat(style.marginRight.replace("px", ""));
@@ -6071,8 +6098,8 @@ var Badge = ({
6071
6098
  {
6072
6099
  style: {
6073
6100
  position: "absolute",
6074
- top: badgePosition?.top,
6075
- left: badgePosition?.left
6101
+ top: badgePosition == null ? void 0 : badgePosition.top,
6102
+ left: badgePosition == null ? void 0 : badgePosition.left
6076
6103
  },
6077
6104
  className: cn(
6078
6105
  "hawa-bg-red-500 hawa-origin-center hawa-rounded-full ",
@@ -6666,8 +6693,8 @@ var ProgressCircle = React59.forwardRef((props, ref) => {
6666
6693
  ...other
6667
6694
  } = props;
6668
6695
  const value = getLimitedValue(inputValue);
6669
- const radius = inputRadius ?? size2config[size].radius;
6670
- const strokeWidth = inputStrokeWidth ?? size2config[size].strokeWidth;
6696
+ const radius = inputRadius != null ? inputRadius : size2config[size].radius;
6697
+ const strokeWidth = inputStrokeWidth != null ? inputStrokeWidth : size2config[size].strokeWidth;
6671
6698
  const normalizedRadius = radius - strokeWidth / 2;
6672
6699
  const circumference = normalizedRadius * 2 * Math.PI;
6673
6700
  const strokeDashoffset = value / 100 * circumference;
@@ -7132,6 +7159,7 @@ var Navbar = ({
7132
7159
  handleLogoClick,
7133
7160
  ...props
7134
7161
  }) => {
7162
+ var _a, _b;
7135
7163
  const [isOpen, setIsOpen] = useState23(false);
7136
7164
  return /* @__PURE__ */ React64.createElement("nav", { className: " hawa-transition-all hawa-sticky hawa-top-2" }, /* @__PURE__ */ React64.createElement(
7137
7165
  Collapsible,
@@ -7150,7 +7178,7 @@ var Navbar = ({
7150
7178
  }
7151
7179
  },
7152
7180
  logo
7153
- )), /* @__PURE__ */ React64.createElement("div", { className: "hawa-hidden md:hawa-flex " }, props.menuItems?.map((item) => /* @__PURE__ */ React64.createElement(
7181
+ )), /* @__PURE__ */ React64.createElement("div", { className: "hawa-hidden md:hawa-flex " }, (_a = props.menuItems) == null ? void 0 : _a.map((item) => /* @__PURE__ */ React64.createElement(
7154
7182
  "div",
7155
7183
  {
7156
7184
  onClick: item.action,
@@ -7221,7 +7249,7 @@ var Navbar = ({
7221
7249
  zIndex: -100
7222
7250
  }
7223
7251
  },
7224
- props.menuItems?.map((item) => /* @__PURE__ */ React64.createElement(
7252
+ (_b = props.menuItems) == null ? void 0 : _b.map((item) => /* @__PURE__ */ React64.createElement(
7225
7253
  "div",
7226
7254
  {
7227
7255
  onClick: item.action,
@@ -7246,6 +7274,7 @@ var AppLayout = ({
7246
7274
  design = "default",
7247
7275
  ...props
7248
7276
  }) => {
7277
+ var _a, _b;
7249
7278
  let closeDrawerWidth = 56;
7250
7279
  let openDrawerWidth = 200;
7251
7280
  let drawerSizeStyle = {
@@ -7507,7 +7536,7 @@ var AppLayout = ({
7507
7536
  {
7508
7537
  side: "left",
7509
7538
  delayDuration: 500,
7510
- content: keepOpen ? props.texts?.collapseSidebar || "Collapse Sidebar" : props.texts?.expandSidebar || "Expand Sidebar"
7539
+ content: keepOpen ? ((_a = props.texts) == null ? void 0 : _a.collapseSidebar) || "Collapse Sidebar" : ((_b = props.texts) == null ? void 0 : _b.expandSidebar) || "Expand Sidebar"
7511
7540
  },
7512
7541
  /* @__PURE__ */ React65.createElement(
7513
7542
  Button,
@@ -7962,13 +7991,13 @@ var DocsSidebar = ({
7962
7991
  setActivePage(page);
7963
7992
  }, 50);
7964
7993
  const element = document.getElementById(page);
7965
- element?.scrollIntoView({ behavior: "smooth", block: "start" });
7994
+ element == null ? void 0 : element.scrollIntoView({ behavior: "smooth", block: "start" });
7966
7995
  };
7967
7996
  const getCurrentSection = () => {
7968
7997
  for (let i = pages.length - 1; i >= 0; i--) {
7969
7998
  const page = pages[i];
7970
7999
  const element = document.getElementById(page);
7971
- const rect = element?.getBoundingClientRect();
8000
+ const rect = element == null ? void 0 : element.getBoundingClientRect();
7972
8001
  if (rect) {
7973
8002
  if (rect.top < window.innerHeight && rect.bottom >= 0) {
7974
8003
  return page;
@@ -8225,6 +8254,7 @@ import * as z from "zod";
8225
8254
  // components/blocks/auth/AuthButtons.tsx
8226
8255
  import React72 from "react";
8227
8256
  var AuthButtons = (props) => {
8257
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
8228
8258
  return /* @__PURE__ */ React72.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-4" }, props.viaGoogle && /* @__PURE__ */ React72.createElement(
8229
8259
  Button,
8230
8260
  {
@@ -8234,7 +8264,7 @@ var AuthButtons = (props) => {
8234
8264
  onClick: props.handleGoogle
8235
8265
  },
8236
8266
  props.isGoogleLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.google, { className: "hawa-icon" }),
8237
- props.texts?.continueWithGoogle ?? "Continue With Google"
8267
+ (_b = (_a = props.texts) == null ? void 0 : _a.continueWithGoogle) != null ? _b : "Continue With Google"
8238
8268
  ), props.viaGithub && /* @__PURE__ */ React72.createElement(
8239
8269
  Button,
8240
8270
  {
@@ -8244,7 +8274,7 @@ var AuthButtons = (props) => {
8244
8274
  onClick: props.handleGithub
8245
8275
  },
8246
8276
  props.isGithubLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.github, { className: "hawa-icon" }),
8247
- props.texts?.continueWithGithub ?? "Continue With Github"
8277
+ (_d = (_c = props.texts) == null ? void 0 : _c.continueWithGithub) != null ? _d : "Continue With Github"
8248
8278
  ), props.viaTwitter && /* @__PURE__ */ React72.createElement(
8249
8279
  Button,
8250
8280
  {
@@ -8254,7 +8284,7 @@ var AuthButtons = (props) => {
8254
8284
  onClick: props.handleTwitter
8255
8285
  },
8256
8286
  props.isTwitterLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.twitter, { className: "hawa-icon" }),
8257
- props.texts?.continueWithTwitter ?? "Continue With Twitter"
8287
+ (_f = (_e = props.texts) == null ? void 0 : _e.continueWithTwitter) != null ? _f : "Continue With Twitter"
8258
8288
  ), props.viaApple && /* @__PURE__ */ React72.createElement(
8259
8289
  Button,
8260
8290
  {
@@ -8264,7 +8294,7 @@ var AuthButtons = (props) => {
8264
8294
  onClick: props.handleApple
8265
8295
  },
8266
8296
  props.isAppleLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.apple, { className: "hawa-icon" }),
8267
- props.texts?.continueWithApple ?? "Continue With Apple"
8297
+ (_h = (_g = props.texts) == null ? void 0 : _g.continueWithApple) != null ? _h : "Continue With Apple"
8268
8298
  ), props.viaMicrosoft && /* @__PURE__ */ React72.createElement(
8269
8299
  Button,
8270
8300
  {
@@ -8274,7 +8304,7 @@ var AuthButtons = (props) => {
8274
8304
  onClick: props.handleMicrosoft
8275
8305
  },
8276
8306
  props.isMicrosoftLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.microsoft, { className: "hawa-icon" }),
8277
- props.texts?.continueWithMicrosoft ?? "Continue With Microsoft"
8307
+ (_j = (_i = props.texts) == null ? void 0 : _i.continueWithMicrosoft) != null ? _j : "Continue With Microsoft"
8278
8308
  ), props.viaEmail && /* @__PURE__ */ React72.createElement(
8279
8309
  Button,
8280
8310
  {
@@ -8284,7 +8314,7 @@ var AuthButtons = (props) => {
8284
8314
  onClick: props.handleEmail
8285
8315
  },
8286
8316
  props.isEmailLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.mail, { className: "hawa-icon" }),
8287
- props.texts?.continueWithEmail ?? "Continue With Email"
8317
+ (_l = (_k = props.texts) == null ? void 0 : _k.continueWithEmail) != null ? _l : "Continue With Email"
8288
8318
  ), props.viaPhone && /* @__PURE__ */ React72.createElement(
8289
8319
  Button,
8290
8320
  {
@@ -8294,7 +8324,7 @@ var AuthButtons = (props) => {
8294
8324
  onClick: props.handlePhone
8295
8325
  },
8296
8326
  props.isPhoneLoading ? /* @__PURE__ */ React72.createElement(Loading, { size: "button" }) : /* @__PURE__ */ React72.createElement(Logos.phone, { className: "hawa-icon" }),
8297
- props.texts?.continueWithPhone ?? "Continue With Phone"
8327
+ (_n = (_m = props.texts) == null ? void 0 : _m.continueWithPhone) != null ? _n : "Continue With Phone"
8298
8328
  ));
8299
8329
  };
8300
8330
 
@@ -8466,46 +8496,47 @@ var LoginForm = ({
8466
8496
  passwordLength = 8,
8467
8497
  ...props
8468
8498
  }) => {
8499
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
8469
8500
  const [passwordVisible, setPasswordVisible] = useState28(false);
8470
8501
  const thirdPartyAuthTexts = {
8471
- continueWithGoogle: texts?.continueWithGoogle,
8472
- continueWithTwitter: texts?.continueWithTwitter,
8473
- continueWithApple: texts?.continueWithApple,
8474
- continueWithMicrosoft: texts?.continueWithMicrosoft,
8475
- continueWithGithub: texts?.continueWithGithub,
8476
- continueWithEmail: texts?.continueWithEmail,
8477
- continueWithPhone: texts?.continueWithPhone
8502
+ continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
8503
+ continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
8504
+ continueWithApple: texts == null ? void 0 : texts.continueWithApple,
8505
+ continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
8506
+ continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
8507
+ continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
8508
+ continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
8478
8509
  };
8479
8510
  let formSchema;
8480
8511
  if (loginType === "email") {
8481
8512
  formSchema = z.object({
8482
- email: z.string({ required_error: texts?.email?.required }).min(1, { message: texts?.email?.required }).email({ message: texts?.email?.invalid }),
8483
- password: z.string({ required_error: texts?.password?.required }).min(1, { message: texts?.password?.required }).min(passwordLength, { message: texts?.password?.tooShort })
8513
+ email: z.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 }),
8514
+ password: z.string({ required_error: (_d = texts == null ? void 0 : texts.password) == null ? void 0 : _d.required }).min(1, { message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required }).min(passwordLength, { message: (_f = texts == null ? void 0 : texts.password) == null ? void 0 : _f.tooShort })
8484
8515
  });
8485
8516
  } else if (loginType === "username") {
8486
8517
  formSchema = z.object({
8487
- username: z.string({ required_error: texts?.username?.required }).min(2, { message: texts?.username?.tooShort }).refine(
8518
+ username: z.string({ required_error: (_g = texts == null ? void 0 : texts.username) == null ? void 0 : _g.required }).min(2, { message: (_h = texts == null ? void 0 : texts.username) == null ? void 0 : _h.tooShort }).refine(
8488
8519
  (value) => {
8489
8520
  const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
8490
8521
  return isValid;
8491
8522
  },
8492
- { message: texts?.username?.invalid }
8523
+ { message: (_i = texts == null ? void 0 : texts.username) == null ? void 0 : _i.invalid }
8493
8524
  ),
8494
- password: z.string({ required_error: texts?.password?.required }).min(1, { message: texts?.password?.required }).min(passwordLength, { message: texts?.password?.tooShort })
8525
+ password: z.string({ required_error: (_j = texts == null ? void 0 : texts.password) == null ? void 0 : _j.required }).min(1, { message: (_k = texts == null ? void 0 : texts.password) == null ? void 0 : _k.required }).min(passwordLength, { message: (_l = texts == null ? void 0 : texts.password) == null ? void 0 : _l.tooShort })
8495
8526
  });
8496
8527
  } else if (loginType === "phone") {
8497
8528
  formSchema = z.object({
8498
- phone: z.string({ required_error: texts?.phone?.required }).refine(
8529
+ phone: z.string({ required_error: (_m = texts == null ? void 0 : texts.phone) == null ? void 0 : _m.required }).refine(
8499
8530
  (value) => {
8500
8531
  let phoneNumber = parsePhoneNumber(value);
8501
8532
  return phoneNumber.isValid();
8502
8533
  },
8503
- { message: texts?.phone?.invalid }
8534
+ { message: (_n = texts == null ? void 0 : texts.phone) == null ? void 0 : _n.invalid }
8504
8535
  )
8505
8536
  });
8506
8537
  } else if (loginType === "link") {
8507
8538
  formSchema = z.object({
8508
- email: z.string({ required_error: texts?.email?.required }).min(1, { message: texts?.email?.required }).email({ message: texts?.email?.invalid })
8539
+ email: z.string({ required_error: (_o = texts == null ? void 0 : texts.email) == null ? void 0 : _o.required }).min(1, { message: (_p = texts == null ? void 0 : texts.email) == null ? void 0 : _p.required }).email({ message: (_q = texts == null ? void 0 : texts.email) == null ? void 0 : _q.invalid })
8509
8540
  });
8510
8541
  } else {
8511
8542
  formSchema = z.object({});
@@ -8521,47 +8552,53 @@ var LoginForm = ({
8521
8552
  {
8522
8553
  control,
8523
8554
  name: "email",
8524
- render: ({ field }) => /* @__PURE__ */ React74.createElement(
8525
- Input,
8526
- {
8527
- inputProps: {
8528
- className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8529
- },
8530
- dir: "ltr",
8531
- width: "full",
8532
- autoComplete: "email",
8533
- label: texts?.email?.label,
8534
- helperText: formState.errors.email?.message,
8535
- placeholder: texts?.email?.placeholder || "contact@sikka.io",
8536
- ...field
8537
- }
8538
- )
8555
+ render: ({ field }) => {
8556
+ var _a2, _b2, _c2;
8557
+ return /* @__PURE__ */ React74.createElement(
8558
+ Input,
8559
+ {
8560
+ inputProps: {
8561
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8562
+ },
8563
+ dir: "ltr",
8564
+ width: "full",
8565
+ autoComplete: "email",
8566
+ label: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label,
8567
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
8568
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "contact@sikka.io",
8569
+ ...field
8570
+ }
8571
+ );
8572
+ }
8539
8573
  }
8540
8574
  ), /* @__PURE__ */ React74.createElement("div", null, /* @__PURE__ */ React74.createElement(
8541
8575
  Controller,
8542
8576
  {
8543
8577
  control,
8544
8578
  name: "password",
8545
- render: ({ field }) => /* @__PURE__ */ React74.createElement(
8546
- Input,
8547
- {
8548
- width: "full",
8549
- autoComplete: "current-password",
8550
- type: passwordVisible ? "text" : "password",
8551
- label: texts?.password?.label || "Password",
8552
- endIcon: /* @__PURE__ */ React74.createElement(
8553
- "div",
8554
- {
8555
- className: "hawa-cursor-pointer",
8556
- onClick: () => setPasswordVisible(!passwordVisible)
8557
- },
8558
- passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
8559
- ),
8560
- placeholder: texts?.password?.placeholder || "Enter your password",
8561
- helperText: formState.errors.password?.message,
8562
- ...field
8563
- }
8564
- )
8579
+ render: ({ field }) => {
8580
+ var _a2, _b2, _c2;
8581
+ return /* @__PURE__ */ React74.createElement(
8582
+ Input,
8583
+ {
8584
+ width: "full",
8585
+ autoComplete: "current-password",
8586
+ type: passwordVisible ? "text" : "password",
8587
+ label: ((_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label) || "Password",
8588
+ endIcon: /* @__PURE__ */ React74.createElement(
8589
+ "div",
8590
+ {
8591
+ className: "hawa-cursor-pointer",
8592
+ onClick: () => setPasswordVisible(!passwordVisible)
8593
+ },
8594
+ passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
8595
+ ),
8596
+ placeholder: ((_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder) || "Enter your password",
8597
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
8598
+ ...field
8599
+ }
8600
+ );
8601
+ }
8565
8602
  }
8566
8603
  ), !props.withoutResetPassword && /* @__PURE__ */ React74.createElement(
8567
8604
  "div",
@@ -8569,7 +8606,7 @@ var LoginForm = ({
8569
8606
  onClick: props.onForgotPassword,
8570
8607
  className: "hawa-mb-3 hawa-select-none hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-text-xs dark:hawa-text-gray-300"
8571
8608
  },
8572
- texts?.forgotPassword || "Forgot Password?"
8609
+ (texts == null ? void 0 : texts.forgotPassword) || "Forgot Password?"
8573
8610
  )));
8574
8611
  case "username":
8575
8612
  return /* @__PURE__ */ React74.createElement(React74.Fragment, null, /* @__PURE__ */ React74.createElement(
@@ -8578,14 +8615,15 @@ var LoginForm = ({
8578
8615
  control,
8579
8616
  name: "username",
8580
8617
  render: ({ field }) => {
8618
+ var _a2, _b2, _c2;
8581
8619
  return /* @__PURE__ */ React74.createElement(
8582
8620
  Input,
8583
8621
  {
8584
8622
  width: "full",
8585
8623
  autoComplete: "username",
8586
- label: texts?.username?.label || "Username",
8587
- helperText: formState.errors.username?.message,
8588
- placeholder: texts?.username?.placeholder || "sikka_sa",
8624
+ label: ((_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label) || "Username",
8625
+ helperText: (_b2 = formState.errors.username) == null ? void 0 : _b2.message,
8626
+ placeholder: ((_c2 = texts == null ? void 0 : texts.username) == null ? void 0 : _c2.placeholder) || "sikka_sa",
8589
8627
  ...field
8590
8628
  }
8591
8629
  );
@@ -8596,26 +8634,29 @@ var LoginForm = ({
8596
8634
  {
8597
8635
  control,
8598
8636
  name: "password",
8599
- render: ({ field }) => /* @__PURE__ */ React74.createElement(
8600
- Input,
8601
- {
8602
- width: "full",
8603
- autoComplete: "current-password",
8604
- type: passwordVisible ? "text" : "password",
8605
- label: texts?.password?.label,
8606
- endIcon: /* @__PURE__ */ React74.createElement(
8607
- "div",
8608
- {
8609
- className: "hawa-cursor-pointer",
8610
- onClick: () => setPasswordVisible(!passwordVisible)
8611
- },
8612
- passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
8613
- ),
8614
- placeholder: texts?.password?.placeholder || "Enter your password",
8615
- helperText: formState.errors.password?.message,
8616
- ...field
8617
- }
8618
- )
8637
+ render: ({ field }) => {
8638
+ var _a2, _b2, _c2;
8639
+ return /* @__PURE__ */ React74.createElement(
8640
+ Input,
8641
+ {
8642
+ width: "full",
8643
+ autoComplete: "current-password",
8644
+ type: passwordVisible ? "text" : "password",
8645
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
8646
+ endIcon: /* @__PURE__ */ React74.createElement(
8647
+ "div",
8648
+ {
8649
+ className: "hawa-cursor-pointer",
8650
+ onClick: () => setPasswordVisible(!passwordVisible)
8651
+ },
8652
+ passwordVisible ? /* @__PURE__ */ React74.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React74.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" })
8653
+ ),
8654
+ placeholder: ((_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder) || "Enter your password",
8655
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
8656
+ ...field
8657
+ }
8658
+ );
8659
+ }
8619
8660
  }
8620
8661
  ), !props.withoutResetPassword && /* @__PURE__ */ React74.createElement(
8621
8662
  "div",
@@ -8623,7 +8664,7 @@ var LoginForm = ({
8623
8664
  onClick: props.onForgotPassword,
8624
8665
  className: "hawa-mb-3 hawa-select-none hawa-mt-2 hawa-w-fit hawa-cursor-pointer hawa-text-xs dark:hawa-text-gray-300"
8625
8666
  },
8626
- texts?.forgotPassword || "Forgot Password?"
8667
+ (texts == null ? void 0 : texts.forgotPassword) || "Forgot Password?"
8627
8668
  )));
8628
8669
  case "phone":
8629
8670
  return /* @__PURE__ */ React74.createElement(React74.Fragment, null, /* @__PURE__ */ React74.createElement(
@@ -8631,15 +8672,18 @@ var LoginForm = ({
8631
8672
  {
8632
8673
  control,
8633
8674
  name: "phone",
8634
- render: ({ field }) => /* @__PURE__ */ React74.createElement(
8635
- PhoneInput,
8636
- {
8637
- label: texts?.phone?.label,
8638
- helperText: formState.errors.phone?.message,
8639
- preferredCountry: { label: "+966" },
8640
- handleChange: (e) => field.onChange(parsePhoneNumber(e).number)
8641
- }
8642
- )
8675
+ render: ({ field }) => {
8676
+ var _a2, _b2;
8677
+ return /* @__PURE__ */ React74.createElement(
8678
+ PhoneInput,
8679
+ {
8680
+ label: (_a2 = texts == null ? void 0 : texts.phone) == null ? void 0 : _a2.label,
8681
+ helperText: (_b2 = formState.errors.phone) == null ? void 0 : _b2.message,
8682
+ preferredCountry: { label: "+966" },
8683
+ handleChange: (e) => field.onChange(parsePhoneNumber(e).number)
8684
+ }
8685
+ );
8686
+ }
8643
8687
  }
8644
8688
  ));
8645
8689
  case "link":
@@ -8648,17 +8692,20 @@ var LoginForm = ({
8648
8692
  {
8649
8693
  control,
8650
8694
  name: "email",
8651
- render: ({ field }) => /* @__PURE__ */ React74.createElement(
8652
- Input,
8653
- {
8654
- width: "full",
8655
- autoComplete: "email",
8656
- label: texts?.email?.label || "Email",
8657
- helperText: formState.errors.email?.message,
8658
- placeholder: texts?.email?.placeholder || "contact@sikka.io",
8659
- ...field
8660
- }
8661
- )
8695
+ render: ({ field }) => {
8696
+ var _a2, _b2, _c2;
8697
+ return /* @__PURE__ */ React74.createElement(
8698
+ Input,
8699
+ {
8700
+ width: "full",
8701
+ autoComplete: "email",
8702
+ label: ((_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label) || "Email",
8703
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
8704
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "contact@sikka.io",
8705
+ ...field
8706
+ }
8707
+ );
8708
+ }
8662
8709
  }
8663
8710
  ));
8664
8711
  default:
@@ -8695,16 +8742,16 @@ var LoginForm = ({
8695
8742
  isLoading: props.isLoading,
8696
8743
  disabled: props.isLoading
8697
8744
  },
8698
- texts?.loginText || "Login"
8745
+ (texts == null ? void 0 : texts.loginText) || "Login"
8699
8746
  ),
8700
8747
  props.additionalButtons,
8701
- props.allowRegister && /* @__PURE__ */ React74.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal hawa-select-none dark:hawa-text-gray-300" }, texts?.newUserText || "New user?", " ", /* @__PURE__ */ React74.createElement(
8748
+ props.allowRegister && /* @__PURE__ */ React74.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal hawa-select-none dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ React74.createElement(
8702
8749
  "span",
8703
8750
  {
8704
8751
  onClick: props.onRouteToRegister,
8705
8752
  className: "clickable-link"
8706
8753
  },
8707
- texts?.createAccount || "Create Account"
8754
+ (texts == null ? void 0 : texts.createAccount) || "Create Account"
8708
8755
  ))
8709
8756
  )), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React74.createElement(
8710
8757
  CardFooter,
@@ -8745,51 +8792,53 @@ import { Controller as Controller2, FormProvider, useForm as useForm2 } from "re
8745
8792
  import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
8746
8793
  import * as z2 from "zod";
8747
8794
  var RegisterForm = ({ texts, ...props }) => {
8795
+ var _a, _b, _c, _d, _e, _f;
8748
8796
  const [passwordVisible, setPasswordVisible] = useState29(false);
8749
8797
  const thirdPartyAuthTexts = {
8750
- continueWithGoogle: texts?.continueWithGoogle,
8751
- continueWithTwitter: texts?.continueWithTwitter,
8752
- continueWithApple: texts?.continueWithApple,
8753
- continueWithMicrosoft: texts?.continueWithMicrosoft,
8754
- continueWithGithub: texts?.continueWithGithub,
8755
- continueWithEmail: texts?.continueWithEmail,
8756
- continueWithPhone: texts?.continueWithPhone
8798
+ continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
8799
+ continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
8800
+ continueWithApple: texts == null ? void 0 : texts.continueWithApple,
8801
+ continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
8802
+ continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
8803
+ continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
8804
+ continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
8757
8805
  };
8758
8806
  const methods = useForm2();
8759
8807
  let fieldSchemas = {};
8760
8808
  props.registerFields.forEach((field) => {
8809
+ var _a2, _b2, _c2, _d2, _e2, _f2;
8761
8810
  switch (field) {
8762
8811
  case "fullname":
8763
8812
  fieldSchemas["fullName"] = z2.string().optional();
8764
8813
  break;
8765
8814
  case "email":
8766
- fieldSchemas["email"] = z2.string({ required_error: texts?.email?.required }).email({ message: texts?.email?.invalid }).min(1, { message: texts?.email?.required });
8815
+ fieldSchemas["email"] = z2.string({ required_error: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.required }).email({ message: (_b2 = texts == null ? void 0 : texts.email) == null ? void 0 : _b2.invalid }).min(1, { message: (_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.required });
8767
8816
  break;
8768
8817
  case "username":
8769
- fieldSchemas["username"] = z2.string({ required_error: texts?.username?.required }).min(1, { message: texts?.username?.required }).refine(
8818
+ fieldSchemas["username"] = z2.string({ required_error: (_d2 = texts == null ? void 0 : texts.username) == null ? void 0 : _d2.required }).min(1, { message: (_e2 = texts == null ? void 0 : texts.username) == null ? void 0 : _e2.required }).refine(
8770
8819
  (value) => {
8771
8820
  const isValid = /^[a-zA-Z][a-zA-Z0-9_-]{2,14}$/.test(value);
8772
8821
  return isValid;
8773
8822
  },
8774
- { message: texts?.username?.invalid }
8823
+ { message: (_f2 = texts == null ? void 0 : texts.username) == null ? void 0 : _f2.invalid }
8775
8824
  );
8776
8825
  break;
8777
8826
  }
8778
8827
  });
8779
8828
  const formSchema = z2.object({
8780
8829
  ...fieldSchemas,
8781
- password: z2.string({ required_error: texts?.password?.required }).min(5, { message: texts?.password?.tooShort }).refine((value) => value !== "", {
8782
- message: texts?.password?.required
8830
+ password: z2.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(5, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.tooShort }).refine((value) => value !== "", {
8831
+ message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.required
8783
8832
  }),
8784
- confirm_password: z2.string({ required_error: texts?.confirm?.required }).refine((value) => value !== "", {
8785
- message: texts?.password?.required
8833
+ confirm_password: z2.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
8834
+ message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required
8786
8835
  }),
8787
8836
  refCode: z2.string().optional(),
8788
8837
  reference: z2.string().optional(),
8789
- terms_accepted: z2.boolean({ required_error: texts?.termsRequired }).refine((value) => value, { message: texts?.termsRequired }),
8838
+ terms_accepted: z2.boolean({ required_error: texts == null ? void 0 : texts.termsRequired }).refine((value) => value, { message: texts == null ? void 0 : texts.termsRequired }),
8790
8839
  newsletter_accepted: z2.boolean().optional()
8791
8840
  }).refine((data) => data.password === data.confirm_password, {
8792
- message: texts?.confirm?.dontMatch,
8841
+ message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
8793
8842
  path: ["confirm_password"]
8794
8843
  });
8795
8844
  const { handleSubmit, control, formState } = useForm2({
@@ -8825,16 +8874,19 @@ var RegisterForm = ({ texts, ...props }) => {
8825
8874
  key: i,
8826
8875
  control,
8827
8876
  name: "fullName",
8828
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8829
- Input,
8830
- {
8831
- width: "full",
8832
- label: texts?.fullName?.label,
8833
- placeholder: texts?.fullName?.placeholder,
8834
- helperText: formState.errors.fullName?.message,
8835
- ...field
8836
- }
8837
- )
8877
+ render: ({ field }) => {
8878
+ var _a2, _b2, _c2;
8879
+ return /* @__PURE__ */ React75.createElement(
8880
+ Input,
8881
+ {
8882
+ width: "full",
8883
+ label: (_a2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _a2.label,
8884
+ placeholder: (_b2 = texts == null ? void 0 : texts.fullName) == null ? void 0 : _b2.placeholder,
8885
+ helperText: (_c2 = formState.errors.fullName) == null ? void 0 : _c2.message,
8886
+ ...field
8887
+ }
8888
+ );
8889
+ }
8838
8890
  }
8839
8891
  );
8840
8892
  }
@@ -8845,21 +8897,24 @@ var RegisterForm = ({ texts, ...props }) => {
8845
8897
  key: i,
8846
8898
  control,
8847
8899
  name: "email",
8848
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8849
- Input,
8850
- {
8851
- dir: "ltr",
8852
- inputProps: {
8853
- className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8854
- },
8855
- width: "full",
8856
- autoComplete: "email",
8857
- label: texts?.email?.label,
8858
- helperText: formState.errors.email?.message,
8859
- placeholder: texts?.email?.placeholder || "Enter your email",
8860
- ...field
8861
- }
8862
- )
8900
+ render: ({ field }) => {
8901
+ var _a2, _b2, _c2;
8902
+ return /* @__PURE__ */ React75.createElement(
8903
+ Input,
8904
+ {
8905
+ dir: "ltr",
8906
+ inputProps: {
8907
+ className: props.direction === "rtl" ? "hawa-text-right" : "hawa-text-left"
8908
+ },
8909
+ width: "full",
8910
+ autoComplete: "email",
8911
+ label: (_a2 = texts == null ? void 0 : texts.email) == null ? void 0 : _a2.label,
8912
+ helperText: (_b2 = formState.errors.email) == null ? void 0 : _b2.message,
8913
+ placeholder: ((_c2 = texts == null ? void 0 : texts.email) == null ? void 0 : _c2.placeholder) || "Enter your email",
8914
+ ...field
8915
+ }
8916
+ );
8917
+ }
8863
8918
  }
8864
8919
  );
8865
8920
  }
@@ -8870,17 +8925,20 @@ var RegisterForm = ({ texts, ...props }) => {
8870
8925
  key: i,
8871
8926
  control,
8872
8927
  name: "username",
8873
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8874
- Input,
8875
- {
8876
- width: "full",
8877
- autoComplete: "username",
8878
- label: texts?.username?.label,
8879
- helperText: formState.errors.username?.message,
8880
- placeholder: texts?.username?.placeholder,
8881
- ...field
8882
- }
8883
- )
8928
+ render: ({ field }) => {
8929
+ var _a2, _b2, _c2;
8930
+ return /* @__PURE__ */ React75.createElement(
8931
+ Input,
8932
+ {
8933
+ width: "full",
8934
+ autoComplete: "username",
8935
+ label: (_a2 = texts == null ? void 0 : texts.username) == null ? void 0 : _a2.label,
8936
+ helperText: (_b2 = formState.errors.username) == null ? void 0 : _b2.message,
8937
+ placeholder: (_c2 = texts == null ? void 0 : texts.username) == null ? void 0 : _c2.placeholder,
8938
+ ...field
8939
+ }
8940
+ );
8941
+ }
8884
8942
  }
8885
8943
  );
8886
8944
  }
@@ -8890,27 +8948,30 @@ var RegisterForm = ({ texts, ...props }) => {
8890
8948
  {
8891
8949
  control,
8892
8950
  name: "password",
8893
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8894
- Input,
8895
- {
8896
- width: "full",
8897
- type: passwordVisible ? "text" : "password",
8898
- endIcon: /* @__PURE__ */ React75.createElement(
8899
- "div",
8900
- {
8901
- className: "hawa-cursor-pointer",
8902
- onClick: () => setPasswordVisible(!passwordVisible)
8903
- },
8904
- passwordVisible ? /* @__PURE__ */ React75.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React75.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
8905
- " "
8906
- ),
8907
- autoComplete: "new-password",
8908
- label: texts?.password?.label,
8909
- placeholder: texts?.password?.placeholder,
8910
- helperText: formState.errors.password?.message,
8911
- ...field
8912
- }
8913
- )
8951
+ render: ({ field }) => {
8952
+ var _a2, _b2, _c2;
8953
+ return /* @__PURE__ */ React75.createElement(
8954
+ Input,
8955
+ {
8956
+ width: "full",
8957
+ type: passwordVisible ? "text" : "password",
8958
+ endIcon: /* @__PURE__ */ React75.createElement(
8959
+ "div",
8960
+ {
8961
+ className: "hawa-cursor-pointer",
8962
+ onClick: () => setPasswordVisible(!passwordVisible)
8963
+ },
8964
+ passwordVisible ? /* @__PURE__ */ React75.createElement(EyeIcon, { className: "hawa-text-gray-500" }) : /* @__PURE__ */ React75.createElement(HiddenEyeIcon, { className: "hawa-text-gray-500" }),
8965
+ " "
8966
+ ),
8967
+ autoComplete: "new-password",
8968
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
8969
+ placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
8970
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
8971
+ ...field
8972
+ }
8973
+ );
8974
+ }
8914
8975
  }
8915
8976
  ),
8916
8977
  /* @__PURE__ */ React75.createElement(
@@ -8918,18 +8979,21 @@ var RegisterForm = ({ texts, ...props }) => {
8918
8979
  {
8919
8980
  control,
8920
8981
  name: "confirm_password",
8921
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8922
- Input,
8923
- {
8924
- width: "full",
8925
- type: "password",
8926
- autoComplete: "new-password",
8927
- label: texts?.confirm?.label,
8928
- placeholder: texts?.confirm?.placeholder,
8929
- helperText: formState.errors.confirm_password?.message,
8930
- ...field
8931
- }
8932
- )
8982
+ render: ({ field }) => {
8983
+ var _a2, _b2, _c2;
8984
+ return /* @__PURE__ */ React75.createElement(
8985
+ Input,
8986
+ {
8987
+ width: "full",
8988
+ type: "password",
8989
+ autoComplete: "new-password",
8990
+ label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
8991
+ placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
8992
+ helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
8993
+ ...field
8994
+ }
8995
+ );
8996
+ }
8933
8997
  }
8934
8998
  ),
8935
8999
  props.additionalInputs,
@@ -8938,16 +9002,19 @@ var RegisterForm = ({ texts, ...props }) => {
8938
9002
  {
8939
9003
  control,
8940
9004
  name: "refCode",
8941
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8942
- Input,
8943
- {
8944
- width: "full",
8945
- label: texts?.refCode,
8946
- placeholder: texts?.refCodePlaceholder || "Enter the referral code",
8947
- helperText: formState.errors.refCode?.message,
8948
- ...field
8949
- }
8950
- )
9005
+ render: ({ field }) => {
9006
+ var _a2;
9007
+ return /* @__PURE__ */ React75.createElement(
9008
+ Input,
9009
+ {
9010
+ width: "full",
9011
+ label: texts == null ? void 0 : texts.refCode,
9012
+ placeholder: (texts == null ? void 0 : texts.refCodePlaceholder) || "Enter the referral code",
9013
+ helperText: (_a2 = formState.errors.refCode) == null ? void 0 : _a2.message,
9014
+ ...field
9015
+ }
9016
+ );
9017
+ }
8951
9018
  }
8952
9019
  ),
8953
9020
  props.showUserSource && /* @__PURE__ */ React75.createElement(
@@ -8958,8 +9025,8 @@ var RegisterForm = ({ texts, ...props }) => {
8958
9025
  render: ({ field }) => /* @__PURE__ */ React75.createElement(
8959
9026
  Select,
8960
9027
  {
8961
- label: texts?.userReference.label || "How did you learn about us?",
8962
- placeholder: texts?.userReference.placeholder,
9028
+ label: (texts == null ? void 0 : texts.userReference.label) || "How did you learn about us?",
9029
+ placeholder: texts == null ? void 0 : texts.userReference.placeholder,
8963
9030
  isCreatable: false,
8964
9031
  isMulti: false,
8965
9032
  isSearchable: false,
@@ -8977,22 +9044,25 @@ var RegisterForm = ({ texts, ...props }) => {
8977
9044
  {
8978
9045
  control,
8979
9046
  name: "terms_accepted",
8980
- render: ({ field }) => /* @__PURE__ */ React75.createElement(
8981
- Checkbox,
8982
- {
8983
- id: "terms_accepted",
8984
- helperText: formState.errors.terms_accepted?.message?.toString(),
8985
- onCheckedChange: (e) => field.onChange(e),
8986
- label: /* @__PURE__ */ React75.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ React75.createElement("span", null, texts?.iAcceptText), " ", /* @__PURE__ */ React75.createElement(StopPropagationWrapper, null, /* @__PURE__ */ React75.createElement(
8987
- "a",
8988
- {
8989
- onClick: props.onRouteToTOS,
8990
- className: "clickable-link"
8991
- },
8992
- texts?.termsText
8993
- )))
8994
- }
8995
- )
9047
+ render: ({ field }) => {
9048
+ var _a2, _b2;
9049
+ return /* @__PURE__ */ React75.createElement(
9050
+ Checkbox,
9051
+ {
9052
+ id: "terms_accepted",
9053
+ helperText: (_b2 = (_a2 = formState.errors.terms_accepted) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString(),
9054
+ onCheckedChange: (e) => field.onChange(e),
9055
+ label: /* @__PURE__ */ React75.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-0.5" }, /* @__PURE__ */ React75.createElement("span", null, texts == null ? void 0 : texts.iAcceptText), " ", /* @__PURE__ */ React75.createElement(StopPropagationWrapper, null, /* @__PURE__ */ React75.createElement(
9056
+ "a",
9057
+ {
9058
+ onClick: props.onRouteToTOS,
9059
+ className: "clickable-link"
9060
+ },
9061
+ texts == null ? void 0 : texts.termsText
9062
+ )))
9063
+ }
9064
+ );
9065
+ }
8996
9066
  }
8997
9067
  ), props.showNewsletterOption && /* @__PURE__ */ React75.createElement(
8998
9068
  Controller2,
@@ -9003,7 +9073,7 @@ var RegisterForm = ({ texts, ...props }) => {
9003
9073
  Checkbox,
9004
9074
  {
9005
9075
  id: "newsletter_accepted",
9006
- label: texts?.subscribeToNewsletter,
9076
+ label: texts == null ? void 0 : texts.subscribeToNewsletter,
9007
9077
  onCheckedChange: field.onChange
9008
9078
  }
9009
9079
  )
@@ -9015,10 +9085,10 @@ var RegisterForm = ({ texts, ...props }) => {
9015
9085
  isLoading: props.isLoading,
9016
9086
  className: "hawa-w-full hawa-mt-4"
9017
9087
  },
9018
- texts?.registerText
9088
+ texts == null ? void 0 : texts.registerText
9019
9089
  ),
9020
9090
  props.additionalButtons
9021
- )), /* @__PURE__ */ React75.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__ */ React75.createElement("span", null, texts?.existingUserText), /* @__PURE__ */ React75.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, texts?.loginText || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React75.createElement(
9091
+ )), /* @__PURE__ */ React75.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__ */ React75.createElement("span", null, texts == null ? void 0 : texts.existingUserText), /* @__PURE__ */ React75.createElement("span", { onClick: props.onRouteToLogin, className: "clickable-link" }, (texts == null ? void 0 : texts.loginText) || "Login")))), props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React75.createElement(
9022
9092
  CardFooter,
9023
9093
  {
9024
9094
  className: cn(
@@ -9055,13 +9125,13 @@ var RegisterForm = ({ texts, ...props }) => {
9055
9125
  import React76 from "react";
9056
9126
  var AppLanding = ({ texts, ...props }) => {
9057
9127
  const thirdPartyAuthTexts = {
9058
- continueWithGoogle: texts?.continueWithGoogle,
9059
- continueWithTwitter: texts?.continueWithTwitter,
9060
- continueWithApple: texts?.continueWithApple,
9061
- continueWithMicrosoft: texts?.continueWithMicrosoft,
9062
- continueWithGithub: texts?.continueWithGithub,
9063
- continueWithEmail: texts?.continueWithEmail,
9064
- continueWithPhone: texts?.continueWithPhone
9128
+ continueWithGoogle: texts == null ? void 0 : texts.continueWithGoogle,
9129
+ continueWithTwitter: texts == null ? void 0 : texts.continueWithTwitter,
9130
+ continueWithApple: texts == null ? void 0 : texts.continueWithApple,
9131
+ continueWithMicrosoft: texts == null ? void 0 : texts.continueWithMicrosoft,
9132
+ continueWithGithub: texts == null ? void 0 : texts.continueWithGithub,
9133
+ continueWithEmail: texts == null ? void 0 : texts.continueWithEmail,
9134
+ continueWithPhone: texts == null ? void 0 : texts.continueWithPhone
9065
9135
  };
9066
9136
  return /* @__PURE__ */ React76.createElement("div", { dir: props.direction }, /* @__PURE__ */ React76.createElement(Card, null, /* @__PURE__ */ React76.createElement(CardContent, { headless: true, className: "hawa-flex hawa-flex-col hawa-gap-6" }, /* @__PURE__ */ React76.createElement(
9067
9137
  AuthButtons,
@@ -9082,13 +9152,13 @@ var AppLanding = ({ texts, ...props }) => {
9082
9152
  handleEmail: props.handleEmail,
9083
9153
  handlePhone: props.handlePhone
9084
9154
  }
9085
- ), props.allowRegister && /* @__PURE__ */ React76.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, texts?.newUserText, " ", /* @__PURE__ */ React76.createElement(
9155
+ ), props.allowRegister && /* @__PURE__ */ React76.createElement("div", { className: "hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, texts == null ? void 0 : texts.newUserText, " ", /* @__PURE__ */ React76.createElement(
9086
9156
  "span",
9087
9157
  {
9088
9158
  onClick: props.handleRouteToRegister,
9089
9159
  className: "clickable-link"
9090
9160
  },
9091
- texts?.createAccount
9161
+ texts == null ? void 0 : texts.createAccount
9092
9162
  )))));
9093
9163
  };
9094
9164
 
@@ -9110,7 +9180,7 @@ var CheckEmail = ({ texts, handleResend }) => {
9110
9180
  },
9111
9181
  /* @__PURE__ */ React77.createElement("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
9112
9182
  /* @__PURE__ */ React77.createElement("polyline", { points: "22,6 12,13 2,6" })
9113
- )), /* @__PURE__ */ React77.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, texts?.checkEmail || "Check your Email"), /* @__PURE__ */ React77.createElement("div", { className: "hawa-text-sm" }, texts?.pleaseVerify || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */ React77.createElement(CardFooter, { className: "hawa-flex hawa-flex-col hawa-justify-center " }, /* @__PURE__ */ React77.createElement("span", { className: "clickable-link hawa-text-sm", onClick: handleResend }, texts?.resendEmail || "Resend Email")));
9183
+ )), /* @__PURE__ */ React77.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.checkEmail) || "Check your Email"), /* @__PURE__ */ React77.createElement("div", { className: "hawa-text-sm" }, (texts == null ? void 0 : texts.pleaseVerify) || "Thank you for signing up! To complete your registration, we've sent a verification email to the address you provided. Please check your inbox and follow the instructions in the email to activate your account."))), /* @__PURE__ */ React77.createElement(CardFooter, { className: "hawa-flex hawa-flex-col hawa-justify-center " }, /* @__PURE__ */ React77.createElement("span", { className: "clickable-link hawa-text-sm", onClick: handleResend }, (texts == null ? void 0 : texts.resendEmail) || "Resend Email")));
9114
9184
  };
9115
9185
 
9116
9186
  // components/blocks/auth/NewPassword.tsx
@@ -9119,20 +9189,21 @@ import { Controller as Controller3, useForm as useForm3 } from "react-hook-form"
9119
9189
  import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
9120
9190
  import * as z3 from "zod";
9121
9191
  var NewPasswordForm = ({ texts, ...props }) => {
9192
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i;
9122
9193
  const formSchema = z3.object({
9123
- password: z3.string({ required_error: texts?.password?.required }).min(1, { message: texts?.password?.required }).min(8, { message: texts?.password?.tooShort }),
9124
- confirm_password: z3.string({ required_error: texts?.confirm?.required }).refine((value) => value !== "", {
9125
- message: texts?.password?.required
9194
+ password: z3.string({ required_error: (_a = texts == null ? void 0 : texts.password) == null ? void 0 : _a.required }).min(1, { message: (_b = texts == null ? void 0 : texts.password) == null ? void 0 : _b.required }).min(8, { message: (_c = texts == null ? void 0 : texts.password) == null ? void 0 : _c.tooShort }),
9195
+ confirm_password: z3.string({ required_error: (_d = texts == null ? void 0 : texts.confirm) == null ? void 0 : _d.required }).refine((value) => value !== "", {
9196
+ message: (_e = texts == null ? void 0 : texts.password) == null ? void 0 : _e.required
9126
9197
  })
9127
9198
  }).refine((data) => data.password === data.confirm_password, {
9128
- message: texts?.confirm?.dontMatch,
9199
+ message: (_f = texts == null ? void 0 : texts.confirm) == null ? void 0 : _f.dontMatch,
9129
9200
  path: ["confirm_password"]
9130
9201
  });
9131
9202
  const { handleSubmit, control, formState } = useForm3({
9132
9203
  resolver: zodResolver3(formSchema)
9133
9204
  });
9134
9205
  const [matchError, setMatchError] = useState30(false);
9135
- return /* @__PURE__ */ React78.createElement(Card, { dir: props.direction }, matchError && /* @__PURE__ */ React78.createElement(Alert, { text: texts?.confirm?.dontMatch, severity: "error" }), props.passwordChanged ? /* @__PURE__ */ React78.createElement(CardContent, { headless: true }, /* @__PURE__ */ React78.createElement("div", { className: "hawa-text-center" }, texts?.passwordChanged)) : /* @__PURE__ */ React78.createElement(
9206
+ return /* @__PURE__ */ React78.createElement(Card, { dir: props.direction }, matchError && /* @__PURE__ */ React78.createElement(Alert, { text: (_g = texts == null ? void 0 : texts.confirm) == null ? void 0 : _g.dontMatch, severity: "error" }), props.passwordChanged ? /* @__PURE__ */ React78.createElement(CardContent, { headless: true }, /* @__PURE__ */ React78.createElement("div", { className: "hawa-text-center" }, texts == null ? void 0 : texts.passwordChanged)) : /* @__PURE__ */ React78.createElement(
9136
9207
  "form",
9137
9208
  {
9138
9209
  noValidate: true,
@@ -9158,18 +9229,21 @@ var NewPasswordForm = ({ texts, ...props }) => {
9158
9229
  {
9159
9230
  control,
9160
9231
  name: "password",
9161
- render: ({ field }) => /* @__PURE__ */ React78.createElement(
9162
- Input,
9163
- {
9164
- width: "full",
9165
- type: "password",
9166
- autoComplete: "new-password",
9167
- label: texts?.password?.label,
9168
- placeholder: texts?.password?.placeholder,
9169
- helperText: formState.errors.password?.message,
9170
- ...field
9171
- }
9172
- )
9232
+ render: ({ field }) => {
9233
+ var _a2, _b2, _c2;
9234
+ return /* @__PURE__ */ React78.createElement(
9235
+ Input,
9236
+ {
9237
+ width: "full",
9238
+ type: "password",
9239
+ autoComplete: "new-password",
9240
+ label: (_a2 = texts == null ? void 0 : texts.password) == null ? void 0 : _a2.label,
9241
+ placeholder: (_b2 = texts == null ? void 0 : texts.password) == null ? void 0 : _b2.placeholder,
9242
+ helperText: (_c2 = formState.errors.password) == null ? void 0 : _c2.message,
9243
+ ...field
9244
+ }
9245
+ );
9246
+ }
9173
9247
  }
9174
9248
  ),
9175
9249
  /* @__PURE__ */ React78.createElement(
@@ -9177,28 +9251,31 @@ var NewPasswordForm = ({ texts, ...props }) => {
9177
9251
  {
9178
9252
  control,
9179
9253
  name: "confirm_password",
9180
- render: ({ field }) => /* @__PURE__ */ React78.createElement(
9181
- Input,
9182
- {
9183
- width: "full",
9184
- type: "password",
9185
- autoComplete: "new-password",
9186
- label: texts?.confirm?.label,
9187
- placeholder: texts?.confirm?.placeholder,
9188
- helperText: formState.errors.confirm_password?.message,
9189
- ...field
9190
- }
9191
- )
9254
+ render: ({ field }) => {
9255
+ var _a2, _b2, _c2;
9256
+ return /* @__PURE__ */ React78.createElement(
9257
+ Input,
9258
+ {
9259
+ width: "full",
9260
+ type: "password",
9261
+ autoComplete: "new-password",
9262
+ label: (_a2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _a2.label,
9263
+ placeholder: (_b2 = texts == null ? void 0 : texts.confirm) == null ? void 0 : _b2.placeholder,
9264
+ helperText: (_c2 = formState.errors.confirm_password) == null ? void 0 : _c2.message,
9265
+ ...field
9266
+ }
9267
+ );
9268
+ }
9192
9269
  }
9193
9270
  )
9194
9271
  ),
9195
- /* @__PURE__ */ React78.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React78.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts?.updatePassword), props.allowRegister && /* @__PURE__ */ React78.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, texts?.dontHaveAccount ?? "Don't have an account? ", /* @__PURE__ */ React78.createElement(
9272
+ /* @__PURE__ */ React78.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React78.createElement(Button, { className: "hawa-w-full", type: "submit" }, texts == null ? void 0 : texts.updatePassword), props.allowRegister && /* @__PURE__ */ React78.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_h = texts == null ? void 0 : texts.dontHaveAccount) != null ? _h : "Don't have an account? ", /* @__PURE__ */ React78.createElement(
9196
9273
  "span",
9197
9274
  {
9198
9275
  className: "clickable-link",
9199
9276
  onClick: props.handleRouteToRegister
9200
9277
  },
9201
- texts?.registerText ?? "Register"
9278
+ (_i = texts == null ? void 0 : texts.registerText) != null ? _i : "Register"
9202
9279
  )))
9203
9280
  ));
9204
9281
  };
@@ -9209,13 +9286,14 @@ import { Controller as Controller4, useForm as useForm4 } from "react-hook-form"
9209
9286
  import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
9210
9287
  import * as z4 from "zod";
9211
9288
  var ResetPasswordForm = (props) => {
9289
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
9212
9290
  const formSchema = z4.object({
9213
- email: z4.string({ required_error: props.texts?.email?.required }).email({ message: props.texts?.email?.invalid }).min(1, { message: props.texts?.email?.required })
9291
+ email: z4.string({ required_error: (_b = (_a = props.texts) == null ? void 0 : _a.email) == null ? void 0 : _b.required }).email({ message: (_d = (_c = props.texts) == null ? void 0 : _c.email) == null ? void 0 : _d.invalid }).min(1, { message: (_f = (_e = props.texts) == null ? void 0 : _e.email) == null ? void 0 : _f.required })
9214
9292
  });
9215
9293
  const { handleSubmit, control, formState } = useForm4({
9216
9294
  resolver: zodResolver4(formSchema)
9217
9295
  });
9218
- return /* @__PURE__ */ React79.createElement(Card, { dir: props.direction }, !props.sent ? /* @__PURE__ */ React79.createElement(React79.Fragment, null, !props.headless && /* @__PURE__ */ React79.createElement(CardHeader, null, /* @__PURE__ */ React79.createElement(CardTitle, null, " ", props.texts?.headTitle || "Reset Password"), /* @__PURE__ */ React79.createElement(CardDescription, null, props.texts?.headDescription || "Enter your email to reset your account password")), /* @__PURE__ */ React79.createElement(
9296
+ return /* @__PURE__ */ React79.createElement(Card, { dir: props.direction }, !props.sent ? /* @__PURE__ */ React79.createElement(React79.Fragment, null, !props.headless && /* @__PURE__ */ React79.createElement(CardHeader, null, /* @__PURE__ */ React79.createElement(CardTitle, null, " ", ((_g = props.texts) == null ? void 0 : _g.headTitle) || "Reset Password"), /* @__PURE__ */ React79.createElement(CardDescription, null, ((_h = props.texts) == null ? void 0 : _h.headDescription) || "Enter your email to reset your account password")), /* @__PURE__ */ React79.createElement(
9219
9297
  "form",
9220
9298
  {
9221
9299
  noValidate: true,
@@ -9232,27 +9310,30 @@ var ResetPasswordForm = (props) => {
9232
9310
  {
9233
9311
  control,
9234
9312
  name: "email",
9235
- render: ({ field }) => /* @__PURE__ */ React79.createElement(
9236
- Input,
9237
- {
9238
- width: "full",
9239
- label: props.texts?.email?.label,
9240
- helperText: formState.errors.email?.message,
9241
- placeholder: props.texts?.email?.placeholder,
9242
- ...field
9243
- }
9244
- )
9313
+ render: ({ field }) => {
9314
+ var _a2, _b2, _c2, _d2, _e2;
9315
+ return /* @__PURE__ */ React79.createElement(
9316
+ Input,
9317
+ {
9318
+ width: "full",
9319
+ label: (_b2 = (_a2 = props.texts) == null ? void 0 : _a2.email) == null ? void 0 : _b2.label,
9320
+ helperText: (_c2 = formState.errors.email) == null ? void 0 : _c2.message,
9321
+ placeholder: (_e2 = (_d2 = props.texts) == null ? void 0 : _d2.email) == null ? void 0 : _e2.placeholder,
9322
+ ...field
9323
+ }
9324
+ );
9325
+ }
9245
9326
  }
9246
9327
  )),
9247
- /* @__PURE__ */ React79.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React79.createElement(Button, { type: "submit", className: "hawa-w-full" }, props.texts?.resetPassword), props.allowRegister && /* @__PURE__ */ React79.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, props.texts?.dontHaveAccount ?? "Don't have an account? ", /* @__PURE__ */ React79.createElement(
9328
+ /* @__PURE__ */ React79.createElement(CardFooter, { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React79.createElement(Button, { type: "submit", className: "hawa-w-full" }, (_i = props.texts) == null ? void 0 : _i.resetPassword), props.allowRegister && /* @__PURE__ */ React79.createElement("div", { className: "hawa-mt-4 hawa-pb-0 hawa-text-center hawa-text-sm dark:hawa-text-gray-300" }, (_k = (_j = props.texts) == null ? void 0 : _j.dontHaveAccount) != null ? _k : "Don't have an account? ", /* @__PURE__ */ React79.createElement(
9248
9329
  "span",
9249
9330
  {
9250
9331
  className: "clickable-link",
9251
9332
  onClick: props.handleRouteToRegister
9252
9333
  },
9253
- props.texts?.registerText ?? "Register"
9334
+ (_m = (_l = props.texts) == null ? void 0 : _l.registerText) != null ? _m : "Register"
9254
9335
  )))
9255
- )) : /* @__PURE__ */ React79.createElement(CardContent, { headless: true }, /* @__PURE__ */ React79.createElement("div", { className: "hawa-text-center" }, props.texts?.emailSentText)));
9336
+ )) : /* @__PURE__ */ React79.createElement(CardContent, { headless: true }, /* @__PURE__ */ React79.createElement("div", { className: "hawa-text-center" }, (_n = props.texts) == null ? void 0 : _n.emailSentText)));
9256
9337
  };
9257
9338
 
9258
9339
  // components/blocks/auth/CodeConfirmation.tsx
@@ -9261,8 +9342,9 @@ import { Controller as Controller5, useForm as useForm5 } from "react-hook-form"
9261
9342
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
9262
9343
  import * as z5 from "zod";
9263
9344
  var CodeConfirmation = (props) => {
9345
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
9264
9346
  const formSchema = z5.object({
9265
- otp_code: z5.string({ required_error: props.texts?.codeRequiredText }).min(6, { message: props.texts?.codeTooShort })
9347
+ otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(6, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
9266
9348
  });
9267
9349
  const { handleSubmit, control, formState, setValue } = useForm5({
9268
9350
  resolver: zodResolver5(formSchema)
@@ -9305,7 +9387,7 @@ var CodeConfirmation = (props) => {
9305
9387
  text: props.errorText,
9306
9388
  severity: "error"
9307
9389
  }
9308
- ), /* @__PURE__ */ React80.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React80.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, props.texts?.checkYourPhone || "Please check your phone"), /* @__PURE__ */ React80.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ React80.createElement("span", null, props.texts?.weSentCode || "We've sent a code to "), /* @__PURE__ */ React80.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ React80.createElement(
9390
+ ), /* @__PURE__ */ React80.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React80.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ React80.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ React80.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ React80.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ React80.createElement(
9309
9391
  "form",
9310
9392
  {
9311
9393
  noValidate: true,
@@ -9324,18 +9406,21 @@ var CodeConfirmation = (props) => {
9324
9406
  {
9325
9407
  control,
9326
9408
  name: "otp_code",
9327
- render: ({ field }) => /* @__PURE__ */ React80.createElement(
9328
- PinInput,
9329
- {
9330
- width: "full",
9331
- digits: 6,
9332
- getPins: (e) => setValue("otp_code", e.join("")),
9333
- helperText: formState.errors.otp_code?.message
9334
- }
9335
- )
9409
+ render: ({ field }) => {
9410
+ var _a2;
9411
+ return /* @__PURE__ */ React80.createElement(
9412
+ PinInput,
9413
+ {
9414
+ width: "full",
9415
+ digits: 6,
9416
+ getPins: (e) => setValue("otp_code", e.join("")),
9417
+ helperText: (_a2 = formState.errors.otp_code) == null ? void 0 : _a2.message
9418
+ }
9419
+ );
9420
+ }
9336
9421
  }
9337
9422
  ),
9338
- showResendTimer ? /* @__PURE__ */ React80.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, props.texts?.resendCodeTimer, " ", /* @__PURE__ */ React80.createElement("strong", null, remainingTime), " ", props.texts?.seconds) : /* @__PURE__ */ React80.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React80.createElement("span", null, props.texts?.didntGetCode ?? "Didn't get the code?"), " ", /* @__PURE__ */ React80.createElement(
9423
+ showResendTimer ? /* @__PURE__ */ React80.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, (_e = props.texts) == null ? void 0 : _e.resendCodeTimer, " ", /* @__PURE__ */ React80.createElement("strong", null, remainingTime), " ", (_f = props.texts) == null ? void 0 : _f.seconds) : /* @__PURE__ */ React80.createElement("div", { className: " hawa-py-2 hawa-text-center hawa-text-xs hawa-text-muted-foreground" }, /* @__PURE__ */ React80.createElement("span", null, (_h = (_g = props.texts) == null ? void 0 : _g.didntGetCode) != null ? _h : "Didn't get the code?"), " ", /* @__PURE__ */ React80.createElement(
9339
9424
  "span",
9340
9425
  {
9341
9426
  className: "clickable-link",
@@ -9344,9 +9429,9 @@ var CodeConfirmation = (props) => {
9344
9429
  props.handleResend();
9345
9430
  }
9346
9431
  },
9347
- props.texts?.resendCode || "Click to resend"
9432
+ ((_i = props.texts) == null ? void 0 : _i.resendCode) || "Click to resend"
9348
9433
  )),
9349
- /* @__PURE__ */ React80.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React80.createElement(Button, { variant: "secondary" }, props.texts?.cancel || "Cancel"), /* @__PURE__ */ React80.createElement(Button, { isLoading: props.confirmLoading }, props.texts?.confirm || "Confirm"))
9434
+ /* @__PURE__ */ React80.createElement("div", { className: "hawa-mt-4 hawa-grid hawa-grid-cols-2 hawa-gap-2" }, /* @__PURE__ */ React80.createElement(Button, { variant: "secondary" }, ((_j = props.texts) == null ? void 0 : _j.cancel) || "Cancel"), /* @__PURE__ */ React80.createElement(Button, { isLoading: props.confirmLoading }, ((_k = props.texts) == null ? void 0 : _k.confirm) || "Confirm"))
9350
9435
  )));
9351
9436
  };
9352
9437
 
@@ -9360,10 +9445,11 @@ var UserReferralSource = ({
9360
9445
  options = [],
9361
9446
  ...props
9362
9447
  }) => {
9448
+ var _a, _b;
9363
9449
  const [closed, setClosed] = useState32(false);
9364
9450
  const popUpRef = useRef12(null);
9365
9451
  const formSchema = z6.object({
9366
- source: z6.string({ required_error: props.texts?.pleaseSelectOption }),
9452
+ source: z6.string({ required_error: (_a = props.texts) == null ? void 0 : _a.pleaseSelectOption }),
9367
9453
  feedback: z6.string().optional()
9368
9454
  });
9369
9455
  const { handleSubmit, control, formState } = useForm6({
@@ -9404,8 +9490,8 @@ var UserReferralSource = ({
9404
9490
  onClick: () => {
9405
9491
  setClosed(true);
9406
9492
  setTimeout(() => {
9407
- if (popUpRef?.current) {
9408
- popUpRef?.current.removeChild(popUpRef?.current.children[0]);
9493
+ if (popUpRef == null ? void 0 : popUpRef.current) {
9494
+ popUpRef == null ? void 0 : popUpRef.current.removeChild(popUpRef == null ? void 0 : popUpRef.current.children[0]);
9409
9495
  }
9410
9496
  }, 200);
9411
9497
  }
@@ -9453,17 +9539,20 @@ var UserReferralSource = ({
9453
9539
  {
9454
9540
  control,
9455
9541
  name: "source",
9456
- render: ({ field }) => /* @__PURE__ */ React81.createElement(
9457
- Radio,
9458
- {
9459
- direction: props.direction,
9460
- orientation: "vertical",
9461
- options,
9462
- defaultValue: field.value,
9463
- onChangeTab: (e) => field.onChange(e),
9464
- helperText: formState.errors.source?.message?.toString()
9465
- }
9466
- )
9542
+ render: ({ field }) => {
9543
+ var _a2, _b2;
9544
+ return /* @__PURE__ */ React81.createElement(
9545
+ Radio,
9546
+ {
9547
+ direction: props.direction,
9548
+ orientation: "vertical",
9549
+ options,
9550
+ defaultValue: field.value,
9551
+ onChangeTab: (e) => field.onChange(e),
9552
+ helperText: (_b2 = (_a2 = formState.errors.source) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
9553
+ }
9554
+ );
9555
+ }
9467
9556
  }
9468
9557
  )),
9469
9558
  /* @__PURE__ */ React81.createElement("div", null, /* @__PURE__ */ React81.createElement(
@@ -9471,17 +9560,20 @@ var UserReferralSource = ({
9471
9560
  {
9472
9561
  control,
9473
9562
  name: "feedback",
9474
- render: ({ field }) => /* @__PURE__ */ React81.createElement(
9475
- Textarea,
9476
- {
9477
- ...field,
9478
- helperText: formState.errors.feedback?.message?.toString()
9479
- }
9480
- )
9563
+ render: ({ field }) => {
9564
+ var _a2, _b2;
9565
+ return /* @__PURE__ */ React81.createElement(
9566
+ Textarea,
9567
+ {
9568
+ ...field,
9569
+ helperText: (_b2 = (_a2 = formState.errors.feedback) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
9570
+ }
9571
+ );
9572
+ }
9481
9573
  }
9482
9574
  ))
9483
9575
  ),
9484
- /* @__PURE__ */ React81.createElement(Button, { type: "submit", className: "hawa-mt-4 hawa-w-full" }, props.texts?.submit || "Submit")
9576
+ /* @__PURE__ */ React81.createElement(Button, { type: "submit", className: "hawa-mt-4 hawa-w-full" }, ((_b = props.texts) == null ? void 0 : _b.submit) || "Submit")
9485
9577
  ))
9486
9578
  )
9487
9579
  );
@@ -9581,8 +9673,9 @@ var FeedbackRating = ({
9581
9673
  setClosed(true);
9582
9674
  }, 4800);
9583
9675
  setTimeout(() => {
9584
- popUpRef.current?.removeChild(
9585
- popUpRef.current?.children[0]
9676
+ var _a, _b;
9677
+ (_b = popUpRef.current) == null ? void 0 : _b.removeChild(
9678
+ (_a = popUpRef.current) == null ? void 0 : _a.children[0]
9586
9679
  );
9587
9680
  clearTimeout(timeoutDestroy);
9588
9681
  }, 5300);
@@ -9717,6 +9810,7 @@ import { useForm as useForm7, Controller as Controller7 } from "react-hook-form"
9717
9810
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
9718
9811
  import * as z7 from "zod";
9719
9812
  var FeedbackForm = (props) => {
9813
+ var _a, _b;
9720
9814
  const formSchema = z7.object({
9721
9815
  requestType: z7.string({ required_error: props.texts.requestTypeRequired }).min(1, { message: props.texts.requestTypeRequired }),
9722
9816
  description: z7.string({ required_error: props.texts.descriptionRequired }).min(10, { message: props.texts.descriptionTooShort })
@@ -9737,21 +9831,24 @@ var FeedbackForm = (props) => {
9737
9831
  }),
9738
9832
  className: "hawa-flex hawa-flex-col hawa-gap-4"
9739
9833
  },
9740
- /* @__PURE__ */ React84.createElement(Label2, null, props.texts?.requestType),
9834
+ /* @__PURE__ */ React84.createElement(Label2, null, (_a = props.texts) == null ? void 0 : _a.requestType),
9741
9835
  /* @__PURE__ */ React84.createElement(
9742
9836
  Controller7,
9743
9837
  {
9744
9838
  name: "requestType",
9745
9839
  control,
9746
- render: ({ field }) => /* @__PURE__ */ React84.createElement(
9747
- Select,
9748
- {
9749
- ...field,
9750
- onChange: (option) => field.onChange(option.value),
9751
- options: props.requestTypes,
9752
- helperText: formState.errors.requestType?.message?.toString()
9753
- }
9754
- )
9840
+ render: ({ field }) => {
9841
+ var _a2, _b2;
9842
+ return /* @__PURE__ */ React84.createElement(
9843
+ Select,
9844
+ {
9845
+ ...field,
9846
+ onChange: (option) => field.onChange(option.value),
9847
+ options: props.requestTypes,
9848
+ helperText: (_b2 = (_a2 = formState.errors.requestType) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString()
9849
+ }
9850
+ );
9851
+ }
9755
9852
  }
9756
9853
  ),
9757
9854
  /* @__PURE__ */ React84.createElement(Label2, null, props.texts.description),
@@ -9760,16 +9857,19 @@ var FeedbackForm = (props) => {
9760
9857
  {
9761
9858
  name: "description",
9762
9859
  control,
9763
- render: ({ field }) => /* @__PURE__ */ React84.createElement(
9764
- Textarea,
9765
- {
9766
- ...field,
9767
- helperText: formState.errors.description && formState.errors.description?.message?.toString()
9768
- }
9769
- )
9860
+ render: ({ field }) => {
9861
+ var _a2, _b2;
9862
+ return /* @__PURE__ */ React84.createElement(
9863
+ Textarea,
9864
+ {
9865
+ ...field,
9866
+ helperText: formState.errors.description && ((_b2 = (_a2 = formState.errors.description) == null ? void 0 : _a2.message) == null ? void 0 : _b2.toString())
9867
+ }
9868
+ );
9869
+ }
9770
9870
  }
9771
9871
  ),
9772
- /* @__PURE__ */ React84.createElement(Button, { type: "submit" }, props.texts?.submit)
9872
+ /* @__PURE__ */ React84.createElement(Button, { type: "submit" }, (_b = props.texts) == null ? void 0 : _b.submit)
9773
9873
  )));
9774
9874
  };
9775
9875
 
@@ -9812,7 +9912,7 @@ var EmptyState = ({ texts, onActionClick }) => {
9812
9912
  width: "0.35em"
9813
9913
  },
9814
9914
  /* @__PURE__ */ React86.createElement("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" })
9815
- )), /* @__PURE__ */ React86.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, texts?.youreCaughtUp || "You're all caught up"))), /* @__PURE__ */ React86.createElement(CardFooter, null, /* @__PURE__ */ React86.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, texts?.actionText || "Go Home")));
9915
+ )), /* @__PURE__ */ React86.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.youreCaughtUp) || "You're all caught up"))), /* @__PURE__ */ React86.createElement(CardFooter, null, /* @__PURE__ */ React86.createElement(Button, { className: "hawa-w-full", onClick: () => onActionClick() }, (texts == null ? void 0 : texts.actionText) || "Go Home")));
9816
9916
  };
9817
9917
 
9818
9918
  // components/blocks/misc/Testimonial.tsx
@@ -9837,6 +9937,7 @@ var Testimonial = () => {
9837
9937
  import React88 from "react";
9838
9938
  import { useForm as useForm8, Controller as Controller8 } from "react-hook-form";
9839
9939
  var LeadGenerator = ({ texts, submitHandler }) => {
9940
+ var _a;
9840
9941
  const { handleSubmit, control, formState } = useForm8();
9841
9942
  const onSubmit = (data) => {
9842
9943
  if (submitHandler) {
@@ -9845,7 +9946,7 @@ var LeadGenerator = ({ texts, submitHandler }) => {
9845
9946
  console.log("handleNewsletterSub props was not provided");
9846
9947
  }
9847
9948
  };
9848
- return /* @__PURE__ */ React88.createElement(Card, null, /* @__PURE__ */ React88.createElement(CardHeader, null, /* @__PURE__ */ React88.createElement(CardTitle, null, texts?.title), /* @__PURE__ */ React88.createElement(CardDescription, null, texts?.subtitle)), /* @__PURE__ */ React88.createElement(CardContent, null, /* @__PURE__ */ React88.createElement(
9949
+ return /* @__PURE__ */ React88.createElement(Card, null, /* @__PURE__ */ React88.createElement(CardHeader, null, /* @__PURE__ */ React88.createElement(CardTitle, null, texts == null ? void 0 : texts.title), /* @__PURE__ */ React88.createElement(CardDescription, null, texts == null ? void 0 : texts.subtitle)), /* @__PURE__ */ React88.createElement(CardContent, null, /* @__PURE__ */ React88.createElement(
9849
9950
  "form",
9850
9951
  {
9851
9952
  noValidate: true,
@@ -9861,14 +9962,14 @@ var LeadGenerator = ({ texts, submitHandler }) => {
9861
9962
  required: true,
9862
9963
  pattern: {
9863
9964
  value: /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,
9864
- message: texts?.invalidEmail || "Invalid email address"
9965
+ message: (texts == null ? void 0 : texts.invalidEmail) || "Invalid email address"
9865
9966
  }
9866
9967
  },
9867
9968
  defaultValue: "",
9868
9969
  render: ({ field }) => /* @__PURE__ */ React88.createElement(Input, { ...field, type: "email", placeholder: "example@sikka.io" })
9869
9970
  }
9870
9971
  ),
9871
- /* @__PURE__ */ React88.createElement(Button, { type: "submit", disabled: !formState.isValid }, texts?.submit ?? "Submit")
9972
+ /* @__PURE__ */ React88.createElement(Button, { type: "submit", disabled: !formState.isValid }, (_a = texts == null ? void 0 : texts.submit) != null ? _a : "Submit")
9872
9973
  )));
9873
9974
  };
9874
9975
 
@@ -9899,7 +10000,7 @@ var Announcement = ({
9899
10000
  // components/blocks/misc/NotFound.tsx
9900
10001
  import React90 from "react";
9901
10002
  var NotFound = ({ texts }) => {
9902
- return /* @__PURE__ */ React90.createElement(Card, null, /* @__PURE__ */ React90.createElement(CardContent, { headless: true }, /* @__PURE__ */ React90.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React90.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React90.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, texts?.pageNotFound || "Page Not Found"), /* @__PURE__ */ React90.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, texts?.ifLost || /* @__PURE__ */ React90.createElement(React90.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React90.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React90.createElement(Button, { className: "hawa-w-full" }, texts?.home || "Home"))));
10003
+ return /* @__PURE__ */ React90.createElement(Card, null, /* @__PURE__ */ React90.createElement(CardContent, { headless: true }, /* @__PURE__ */ React90.createElement("div", { className: "hawa-flex hawa-flex-col hawa-items-center dark:hawa-text-white" }, /* @__PURE__ */ React90.createElement("div", { className: "hawa-text-center hawa-text-6xl hawa-font-bold " }, "404"), /* @__PURE__ */ React90.createElement("div", { className: "hawa-m-2 hawa-text-center hawa-text-xl hawa-font-bold " }, (texts == null ? void 0 : texts.pageNotFound) || "Page Not Found"), /* @__PURE__ */ React90.createElement("div", { className: "hawa-mb-4 hawa-text-center" }, (texts == null ? void 0 : texts.ifLost) || /* @__PURE__ */ React90.createElement(React90.Fragment, null, "If you're lost please contact us ", /* @__PURE__ */ React90.createElement("span", { className: "clickable-link" }, "help@sikka.io"))), /* @__PURE__ */ React90.createElement(Button, { className: "hawa-w-full" }, (texts == null ? void 0 : texts.home) || "Home"))));
9903
10004
  };
9904
10005
 
9905
10006
  // components/blocks/misc/NoPermission.tsx
@@ -9916,7 +10017,7 @@ var NoPermission = ({ texts }) => {
9916
10017
  width: "0.35em"
9917
10018
  },
9918
10019
  /* @__PURE__ */ React91.createElement("path", { d: "M400 224h-24v-72C376 68.2 307.8 0 224 0S72 68.2 72 152v72H48c-26.5 0-48 21.5-48 48v192c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V272c0-26.5-21.5-48-48-48zm-104 0H152v-72c0-39.7 32.3-72 72-72s72 32.3 72 72v72z" })
9919
- )), /* @__PURE__ */ React91.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, texts?.title || "You don't have permission"), /* @__PURE__ */ React91.createElement("div", null, texts?.subtitle || "If you think this is a problem please contact your administrator or our customer support"))));
10020
+ )), /* @__PURE__ */ React91.createElement("div", { className: "hawa-m-2 hawa-text-xl hawa-font-bold" }, (texts == null ? void 0 : texts.title) || "You don't have permission"), /* @__PURE__ */ React91.createElement("div", null, (texts == null ? void 0 : texts.subtitle) || "If you think this is a problem please contact your administrator or our customer support"))));
9920
10021
  };
9921
10022
 
9922
10023
  // components/blocks/pricing/PricingPlans.tsx
@@ -9975,6 +10076,7 @@ var PricingPlans = (props) => {
9975
10076
  // components/blocks/pricing/ComparingPlans.tsx
9976
10077
  import React93, { useState as useState35 } from "react";
9977
10078
  var ComparingPlans = (props) => {
10079
+ var _a;
9978
10080
  const [currentCurrency, setCurrentCurrency] = useState35("sar");
9979
10081
  const [currentCycle, setCurrentCycle] = useState35("month");
9980
10082
  return /* @__PURE__ */ React93.createElement("div", { id: "detailed-pricing", className: "hawa-w-full hawa-overflow-x-auto" }, /* @__PURE__ */ React93.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ React93.createElement(
@@ -10005,7 +10107,7 @@ var ComparingPlans = (props) => {
10005
10107
  }
10006
10108
  }
10007
10109
  }
10008
- )), /* @__PURE__ */ React93.createElement("div", { className: " hawa-overflow-hidden hawa-rounded" }, /* @__PURE__ */ React93.createElement("div", { className: "hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border-b hawa-border-t hawa-border-gray-200 hawa-bg-gray-100 hawa-p-4 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-white" }, /* @__PURE__ */ React93.createElement("div", { className: "hawa-flex hawa-items-center" }), props.plans.map((plan, i) => /* @__PURE__ */ React93.createElement("div", { key: i }, /* @__PURE__ */ React93.createElement("h5", { className: "hawa-text-md hawa-font-bold hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.title), /* @__PURE__ */ React93.createElement("div", { className: " hawa-flex hawa-items-baseline hawa-text-gray-900 dark:hawa-text-white" }, /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, plan.price), /* @__PURE__ */ React93.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, plan.texts.currencyText)), /* @__PURE__ */ React93.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, "/ ", plan.texts.cycleText)), /* @__PURE__ */ React93.createElement("h5", { className: "hawa-text-md hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.subtitle)))), props.plans?.map((plan) => {
10110
+ )), /* @__PURE__ */ React93.createElement("div", { className: " hawa-overflow-hidden hawa-rounded" }, /* @__PURE__ */ React93.createElement("div", { className: "hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border-b hawa-border-t hawa-border-gray-200 hawa-bg-gray-100 hawa-p-4 hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-white" }, /* @__PURE__ */ React93.createElement("div", { className: "hawa-flex hawa-items-center" }), props.plans.map((plan, i) => /* @__PURE__ */ React93.createElement("div", { key: i }, /* @__PURE__ */ React93.createElement("h5", { className: "hawa-text-md hawa-font-bold hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.title), /* @__PURE__ */ React93.createElement("div", { className: " hawa-flex hawa-items-baseline hawa-text-gray-900 dark:hawa-text-white" }, /* @__PURE__ */ React93.createElement(React93.Fragment, null, /* @__PURE__ */ React93.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, plan.price), /* @__PURE__ */ React93.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, plan.texts.currencyText)), /* @__PURE__ */ React93.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, "/ ", plan.texts.cycleText)), /* @__PURE__ */ React93.createElement("h5", { className: "hawa-text-md hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.subtitle)))), (_a = props.plans) == null ? void 0 : _a.map((plan) => {
10009
10111
  return plan.features.map((feature, j) => {
10010
10112
  return /* @__PURE__ */ React93.createElement(
10011
10113
  "div",
@@ -10131,6 +10233,7 @@ var CardPrice = (props) => /* @__PURE__ */ React94.createElement("h2", { classNa
10131
10233
  // components/blocks/Usage.tsx
10132
10234
  import React95 from "react";
10133
10235
  var Usage = (props) => {
10236
+ var _a;
10134
10237
  return /* @__PURE__ */ React95.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-1 hawa-rounded hawa-border hawa-bg-card hawa-p-4" }, /* @__PURE__ */ React95.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2" }, /* @__PURE__ */ React95.createElement("span", { className: "hawa-bg-white-200" }, props.title), props.tooltip && /* @__PURE__ */ React95.createElement(Tooltip, { content: props.tooltip }, /* @__PURE__ */ React95.createElement(
10135
10238
  "svg",
10136
10239
  {
@@ -10143,7 +10246,7 @@ var Usage = (props) => {
10143
10246
  width: "1em"
10144
10247
  },
10145
10248
  /* @__PURE__ */ React95.createElement("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" })
10146
- ))), /* @__PURE__ */ React95.createElement("div", { className: "hawa-bg-white-100 hawa-flex hawa-flex-row" }, /* @__PURE__ */ React95.createElement("div", null, props.currentUsage), /* @__PURE__ */ React95.createElement("div", null, " (", props.percent, "%)")), /* @__PURE__ */ React95.createElement(Progress, { value: props.percent ?? 0 }));
10249
+ ))), /* @__PURE__ */ React95.createElement("div", { className: "hawa-bg-white-100 hawa-flex hawa-flex-row" }, /* @__PURE__ */ React95.createElement("div", null, props.currentUsage), /* @__PURE__ */ React95.createElement("div", null, " (", props.percent, "%)")), /* @__PURE__ */ React95.createElement(Progress, { value: (_a = props.percent) != null ? _a : 0 }));
10147
10250
  };
10148
10251
 
10149
10252
  // components/hooks/useIsomorphicEffect.ts
@@ -10267,13 +10370,13 @@ function useFocusWithin({
10267
10370
  const handleFocusIn = (event) => {
10268
10371
  if (!focusedRef.current) {
10269
10372
  setFocused(true);
10270
- onFocus?.(event);
10373
+ onFocus == null ? void 0 : onFocus(event);
10271
10374
  }
10272
10375
  };
10273
10376
  const handleFocusOut = (event) => {
10274
10377
  if (focusedRef.current && !containsRelatedTarget(event)) {
10275
10378
  setFocused(false);
10276
- onBlur?.(event);
10379
+ onBlur == null ? void 0 : onBlur(event);
10277
10380
  }
10278
10381
  };
10279
10382
  useEffect27(() => {
@@ -10281,8 +10384,9 @@ function useFocusWithin({
10281
10384
  ref.current.addEventListener("focusin", handleFocusIn);
10282
10385
  ref.current.addEventListener("focusout", handleFocusOut);
10283
10386
  return () => {
10284
- ref.current?.removeEventListener("focusin", handleFocusIn);
10285
- ref.current?.removeEventListener("focusout", handleFocusOut);
10387
+ var _a, _b;
10388
+ (_a = ref.current) == null ? void 0 : _a.removeEventListener("focusin", handleFocusIn);
10389
+ (_b = ref.current) == null ? void 0 : _b.removeEventListener("focusout", handleFocusOut);
10286
10390
  };
10287
10391
  }
10288
10392
  return void 0;