@sikka/hawa 0.46.3-next → 0.47.0-next

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/{Radio-Dyvlywnk.d.mts → Radio-BPHTeDMz.d.mts} +8 -7
  2. package/dist/{Radio-DlPwVCG4.d.ts → Radio-cRcIH8_L.d.ts} +8 -7
  3. package/dist/blocks/auth/index.d.mts +8 -8
  4. package/dist/blocks/auth/index.d.ts +8 -8
  5. package/dist/blocks/auth/index.js +87 -133
  6. package/dist/blocks/auth/index.mjs +21 -53
  7. package/dist/blocks/feedback/index.js +69 -80
  8. package/dist/blocks/feedback/index.mjs +5 -5
  9. package/dist/blocks/index.d.mts +3 -3
  10. package/dist/blocks/index.d.ts +3 -3
  11. package/dist/blocks/index.js +87 -133
  12. package/dist/blocks/index.mjs +6 -25
  13. package/dist/blocks/misc/index.js +70 -84
  14. package/dist/blocks/misc/index.mjs +5 -5
  15. package/dist/blocks/pricing/index.js +1 -1
  16. package/dist/blocks/pricing/index.mjs +4 -4
  17. package/dist/{chunk-QLUJEUIB.mjs → chunk-342KIV4R.mjs} +83 -110
  18. package/dist/{chunk-EHJXQQDP.mjs → chunk-5S5DR7KF.mjs} +1 -1
  19. package/dist/{chunk-HJVL6X7I.mjs → chunk-6SJUUJOV.mjs} +1 -1
  20. package/dist/{chunk-7O555VJR.mjs → chunk-AWJSHOYU.mjs} +69 -80
  21. package/dist/{chunk-U72MOMEK.mjs → chunk-C2UOOH4X.mjs} +1 -1
  22. package/dist/{chunk-7L5VUKZ7.mjs → chunk-EOH6A3GR.mjs} +2 -5
  23. package/dist/{chunk-6UOJKVIA.mjs → chunk-IFWYR5W2.mjs} +1 -1
  24. package/dist/{chunk-YXUHXKKK.mjs → chunk-JP2N5WKD.mjs} +1 -1
  25. package/dist/{chunk-R37QEYSB.mjs → chunk-NMW4GM4G.mjs} +1 -1
  26. package/dist/{chunk-CIMTNOLA.mjs → chunk-WUMDFBEK.mjs} +1 -1
  27. package/dist/colorPicker/index.js +1 -1
  28. package/dist/colorPicker/index.js.map +1 -1
  29. package/dist/colorPicker/index.mjs +1 -1
  30. package/dist/colorPicker/index.mjs.map +1 -1
  31. package/dist/combobox/index.js +1 -1
  32. package/dist/combobox/index.js.map +1 -1
  33. package/dist/combobox/index.mjs +1 -1
  34. package/dist/combobox/index.mjs.map +1 -1
  35. package/dist/dataTable/index.js +2 -5
  36. package/dist/dataTable/index.js.map +1 -1
  37. package/dist/dataTable/index.mjs +2 -5
  38. package/dist/dataTable/index.mjs.map +1 -1
  39. package/dist/elements/index.d.mts +2 -2
  40. package/dist/elements/index.d.ts +2 -2
  41. package/dist/elements/index.js +83 -110
  42. package/dist/elements/index.mjs +3 -3
  43. package/dist/index.d.mts +10 -9
  44. package/dist/index.d.ts +10 -9
  45. package/dist/index.js +87 -133
  46. package/dist/index.mjs +87 -133
  47. package/dist/input/index.js +2 -5
  48. package/dist/input/index.js.map +1 -1
  49. package/dist/input/index.mjs +2 -5
  50. package/dist/input/index.mjs.map +1 -1
  51. package/dist/layout/index.js +1 -1
  52. package/dist/layout/index.mjs +2 -2
  53. package/dist/passwordInput/index.js +2 -5
  54. package/dist/passwordInput/index.js.map +1 -1
  55. package/dist/passwordInput/index.mjs +2 -5
  56. package/dist/passwordInput/index.mjs.map +1 -1
  57. package/dist/phoneInput/index.d.mts +7 -7
  58. package/dist/phoneInput/index.d.ts +7 -7
  59. package/dist/phoneInput/index.js +79 -86
  60. package/dist/phoneInput/index.js.map +1 -1
  61. package/dist/phoneInput/index.mjs +79 -86
  62. package/dist/phoneInput/index.mjs.map +1 -1
  63. package/dist/pinInput/index.js +3 -20
  64. package/dist/pinInput/index.js.map +1 -1
  65. package/dist/pinInput/index.mjs +3 -20
  66. package/dist/pinInput/index.mjs.map +1 -1
  67. package/dist/select/index.d.mts +1 -0
  68. package/dist/select/index.d.ts +1 -0
  69. package/dist/select/index.js +69 -80
  70. package/dist/select/index.js.map +1 -1
  71. package/dist/select/index.mjs +69 -80
  72. package/dist/select/index.mjs.map +1 -1
  73. package/dist/simpleTable/index.js +1 -1
  74. package/dist/simpleTable/index.js.map +1 -1
  75. package/dist/simpleTable/index.mjs +1 -1
  76. package/dist/simpleTable/index.mjs.map +1 -1
  77. package/dist/skeleton/index.js +1 -1
  78. package/dist/skeleton/index.js.map +1 -1
  79. package/dist/skeleton/index.mjs +1 -1
  80. package/dist/skeleton/index.mjs.map +1 -1
  81. package/dist/stats/index.js +1 -1
  82. package/dist/stats/index.js.map +1 -1
  83. package/dist/stats/index.mjs +1 -1
  84. package/dist/stats/index.mjs.map +1 -1
  85. package/dist/textarea/index.js +1 -1
  86. package/dist/textarea/index.js.map +1 -1
  87. package/dist/textarea/index.mjs +1 -1
  88. package/dist/textarea/index.mjs.map +1 -1
  89. package/package.json +1 -1
@@ -11,19 +11,19 @@ type LabelProps = {
11
11
  };
12
12
  declare const Label: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps & React.RefAttributes<HTMLLabelElement>>;
13
13
 
14
+ type PhoneCodeValue = {
15
+ label: string;
16
+ value?: string;
17
+ };
14
18
  type PhoneInputProps = {
15
- preferredCountry?: {
16
- label: string;
17
- };
19
+ preferredCountry?: PhoneCodeValue;
18
20
  helperText?: any;
19
21
  label?: string;
20
22
  labelProps?: LabelProps;
21
23
  placeholder?: string;
22
24
  handleChange?: (value: string) => void;
23
25
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
24
- countryCodes?: {
25
- label: string;
26
- }[];
26
+ countryCodes?: PhoneCodeValue[];
27
27
  };
28
28
  declare const PhoneInput: FC<PhoneInputProps>;
29
29
 
@@ -36,6 +36,7 @@ type SelectTypes = {
36
36
  hideHelperText?: boolean;
37
37
  options: SelectOptionProps[];
38
38
  labelKey?: string;
39
+ valueKey?: string;
39
40
  isCreatable?: boolean;
40
41
  isClearable?: boolean;
41
42
  isMulti?: boolean;
@@ -101,4 +102,4 @@ type RadioTypes = {
101
102
  };
102
103
  declare const Radio: React__default.ForwardRefExoticComponent<RadioTypes & React__default.RefAttributes<HTMLInputElement>>;
103
104
 
104
- export { type LabelProps as L, type PhoneInputProps as P, type RadioOptionsTypes as R, type SelectOptionProps as S, Radio as a, Label as b, Select as c, PhoneInput as d };
105
+ export { type LabelProps as L, type PhoneInputProps as P, type RadioOptionsTypes as R, type SelectOptionProps as S, Radio as a, Label as b, Select as c, type PhoneCodeValue as d, PhoneInput as e };
@@ -11,19 +11,19 @@ type LabelProps = {
11
11
  };
12
12
  declare const Label: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLLabelElement> & LabelProps & React.RefAttributes<HTMLLabelElement>>;
13
13
 
14
+ type PhoneCodeValue = {
15
+ label: string;
16
+ value?: string;
17
+ };
14
18
  type PhoneInputProps = {
15
- preferredCountry?: {
16
- label: string;
17
- };
19
+ preferredCountry?: PhoneCodeValue;
18
20
  helperText?: any;
19
21
  label?: string;
20
22
  labelProps?: LabelProps;
21
23
  placeholder?: string;
22
24
  handleChange?: (value: string) => void;
23
25
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
24
- countryCodes?: {
25
- label: string;
26
- }[];
26
+ countryCodes?: PhoneCodeValue[];
27
27
  };
28
28
  declare const PhoneInput: FC<PhoneInputProps>;
29
29
 
@@ -36,6 +36,7 @@ type SelectTypes = {
36
36
  hideHelperText?: boolean;
37
37
  options: SelectOptionProps[];
38
38
  labelKey?: string;
39
+ valueKey?: string;
39
40
  isCreatable?: boolean;
40
41
  isClearable?: boolean;
41
42
  isMulti?: boolean;
@@ -101,4 +102,4 @@ type RadioTypes = {
101
102
  };
102
103
  declare const Radio: React__default.ForwardRefExoticComponent<RadioTypes & React__default.RefAttributes<HTMLInputElement>>;
103
104
 
104
- export { type LabelProps as L, type PhoneInputProps as P, type RadioOptionsTypes as R, type SelectOptionProps as S, Radio as a, Label as b, Select as c, PhoneInput as d };
105
+ export { type LabelProps as L, type PhoneInputProps as P, type RadioOptionsTypes as R, type SelectOptionProps as S, Radio as a, Label as b, Select as c, type PhoneCodeValue as d, PhoneInput as e };
@@ -41,19 +41,19 @@ type LabelProps = {
41
41
  required?: boolean;
42
42
  };
43
43
 
44
+ type PhoneCodeValue = {
45
+ label: string;
46
+ value?: string;
47
+ };
44
48
  type PhoneInputProps = {
45
- preferredCountry?: {
46
- label: string;
47
- };
49
+ preferredCountry?: PhoneCodeValue;
48
50
  helperText?: any;
49
51
  label?: string;
50
52
  labelProps?: LabelProps;
51
53
  placeholder?: string;
52
54
  handleChange?: (value: string) => void;
53
55
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
54
- countryCodes?: {
55
- label: string;
56
- }[];
56
+ countryCodes?: PhoneCodeValue[];
57
57
  };
58
58
 
59
59
  type LoginFormTypes = {
@@ -266,7 +266,7 @@ declare const ResetPasswordForm: FC<ResetPasswordType>;
266
266
 
267
267
  type TConfirmation = {
268
268
  texts?: {
269
- checkYourPhone?: string;
269
+ checkYourIdentifier?: string;
270
270
  weSentCode?: string;
271
271
  didntGetCode?: string;
272
272
  resendCode?: string;
@@ -280,7 +280,7 @@ type TConfirmation = {
280
280
  showError?: any;
281
281
  errorTitle?: any;
282
282
  errorText?: any;
283
- phoneNumber?: string;
283
+ identifier?: string;
284
284
  confirmLoading?: boolean;
285
285
  onConfirm?: any;
286
286
  onResend?: any;
@@ -41,19 +41,19 @@ type LabelProps = {
41
41
  required?: boolean;
42
42
  };
43
43
 
44
+ type PhoneCodeValue = {
45
+ label: string;
46
+ value?: string;
47
+ };
44
48
  type PhoneInputProps = {
45
- preferredCountry?: {
46
- label: string;
47
- };
49
+ preferredCountry?: PhoneCodeValue;
48
50
  helperText?: any;
49
51
  label?: string;
50
52
  labelProps?: LabelProps;
51
53
  placeholder?: string;
52
54
  handleChange?: (value: string) => void;
53
55
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
54
- countryCodes?: {
55
- label: string;
56
- }[];
56
+ countryCodes?: PhoneCodeValue[];
57
57
  };
58
58
 
59
59
  type LoginFormTypes = {
@@ -266,7 +266,7 @@ declare const ResetPasswordForm: FC<ResetPasswordType>;
266
266
 
267
267
  type TConfirmation = {
268
268
  texts?: {
269
- checkYourPhone?: string;
269
+ checkYourIdentifier?: string;
270
270
  weSentCode?: string;
271
271
  didntGetCode?: string;
272
272
  resendCode?: string;
@@ -280,7 +280,7 @@ type TConfirmation = {
280
280
  showError?: any;
281
281
  errorTitle?: any;
282
282
  errorText?: any;
283
- phoneNumber?: string;
283
+ identifier?: string;
284
284
  confirmLoading?: boolean;
285
285
  onConfirm?: any;
286
286
  onResend?: any;
@@ -1402,7 +1402,7 @@ function Skeleton({
1402
1402
  };
1403
1403
  const styledAs = {
1404
1404
  div: "",
1405
- input: "!h-[38px] !w-full"
1405
+ input: "hawa-h-[40px] hawa-w-full"
1406
1406
  };
1407
1407
  return /* @__PURE__ */ import_react7.default.createElement(
1408
1408
  "div",
@@ -1464,14 +1464,11 @@ var Input = (0, import_react8.forwardRef)(
1464
1464
  }
1465
1465
  if (props.onChange) {
1466
1466
  if (props.type === "number" && props.maxLength) {
1467
- console.log("type is ", props.type);
1468
- console.log("max length is ", props.maxLength);
1469
1467
  let v = newValue.replace(/[^0-9]/g, "").slice(0, props.maxLength);
1470
1468
  const newEvent = { ...e, target: { ...e.target, value: v } };
1471
1469
  setValue(v);
1472
1470
  props.onChange(newEvent);
1473
1471
  } else {
1474
- console.log("NETIHERRRER");
1475
1472
  const newEvent = { ...e, target: { ...e.target, value: newValue } };
1476
1473
  setValue(newValue);
1477
1474
  props.onChange(newEvent);
@@ -1496,7 +1493,7 @@ var Input = (0, import_react8.forwardRef)(
1496
1493
  )
1497
1494
  },
1498
1495
  props.label && /* @__PURE__ */ import_react8.default.createElement(Label, { ...labelProps }, props.label),
1499
- /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react8.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : props.isLoadingError ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(
1496
+ /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-w-full hawa-items-center" }, props.outsidePrefix && /* @__PURE__ */ import_react8.default.createElement("span", { className: cn("hawa-me-2 hawa-opacity-90", !forceHideHelperText && "hawa-mb-2") }, props.outsidePrefix), props.isLoading ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(Skeleton, { as: "input" })) : props.isLoadingError ? /* @__PURE__ */ import_react8.default.createElement("div", { className: "hawa-pb-2 hawa-w-full" }, /* @__PURE__ */ import_react8.default.createElement(
1500
1497
  Skeleton,
1501
1498
  {
1502
1499
  animation: "none",
@@ -3298,6 +3295,7 @@ var import_clsx2 = __toESM(require("clsx"));
3298
3295
  var Select = ({
3299
3296
  labelProps,
3300
3297
  labelKey = "label",
3298
+ valueKey = "value",
3301
3299
  ...props
3302
3300
  }) => {
3303
3301
  const NoOption = () => {
@@ -3317,13 +3315,7 @@ var Select = ({
3317
3315
  children
3318
3316
  );
3319
3317
  };
3320
- const Option = ({
3321
- children,
3322
- innerProps,
3323
- innerRef,
3324
- isFocused,
3325
- isSelected
3326
- }) => {
3318
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
3327
3319
  return /* @__PURE__ */ import_react9.default.createElement(
3328
3320
  "div",
3329
3321
  {
@@ -3338,14 +3330,7 @@ var Select = ({
3338
3330
  children
3339
3331
  );
3340
3332
  };
3341
- const Menu = ({
3342
- cx,
3343
- children,
3344
- getStyles,
3345
- innerProps,
3346
- innerRef,
3347
- ...menuProps
3348
- }) => {
3333
+ const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
3349
3334
  const menuOpen = menuProps.selectProps.menuIsOpen;
3350
3335
  return /* @__PURE__ */ import_react9.default.createElement(
3351
3336
  "div",
@@ -3374,71 +3359,72 @@ var Select = ({
3374
3359
  )
3375
3360
  },
3376
3361
  props.label && /* @__PURE__ */ import_react9.default.createElement(Label, { ...labelProps }, props.label),
3377
- props.isLoading ? /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
3378
- // TODO: enable keyboard to go to the next item in the list
3379
- /* @__PURE__ */ import_react9.default.createElement(
3380
- import_react_select.default,
3381
- {
3382
- noOptionsMessage: NoOption,
3383
- classNames: {
3384
- control: () => cn(
3385
- props.phoneCode && "hawa-rounded-r-none",
3386
- props.controlClassNames
3387
- ),
3388
- container: () => cn(
3389
- selectContainerStyles,
3390
- props.phoneCode && phoneCodeStyles,
3391
- props.isMulti && "hawa-ps-0 "
3392
- ),
3393
- placeholder: () => cn(
3394
- selectPlaceholderStyles,
3395
- props.disabled && "hawa-text-muted-foreground"
3396
- ),
3397
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
3398
- singleValue: () => cn(
3399
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
3400
- ),
3401
- indicatorsContainer: () => cn(
3402
- selectIndicatorContainerStyles,
3403
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
3404
- props.disabled && "hawa-opacity-30"
3405
- )
3406
- },
3407
- unstyled: true,
3408
- autoFocus: false,
3409
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
3362
+ props.isLoading ? /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ import_react9.default.createElement(
3363
+ import_react_select.default,
3364
+ {
3365
+ noOptionsMessage: NoOption,
3366
+ classNames: {
3367
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
3368
+ container: () => cn(
3369
+ selectContainerStyles,
3370
+ props.phoneCode && phoneCodeStyles,
3371
+ props.isMulti && "hawa-ps-0 "
3372
+ ),
3373
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
3374
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
3375
+ singleValue: () => cn(
3376
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
3377
+ ),
3378
+ indicatorsContainer: () => cn(
3379
+ selectIndicatorContainerStyles,
3380
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
3381
+ props.disabled && "hawa-opacity-30"
3382
+ )
3383
+ },
3384
+ unstyled: true,
3385
+ autoFocus: false,
3386
+ components: props.hideIndicator ? {
3387
+ Option: (optionProps) => /* @__PURE__ */ import_react9.default.createElement(
3410
3388
  Option,
3411
- Menu,
3412
- ValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3413
- "div",
3414
- {
3415
- className: cn(
3416
- e.className,
3417
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
3418
- ),
3419
- ...e
3420
- }
3421
- ),
3422
- MultiValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3423
- "div",
3424
- {
3425
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
3426
- ...e
3427
- }
3428
- )
3429
- },
3430
- onChange: (newValue, action) => props.onChange(newValue, action),
3431
- options: props.options,
3432
- getOptionLabel: props.getOptionLabel,
3433
- defaultValue: props.defaultValue,
3434
- value: props.value,
3435
- placeholder: props.placeholder,
3436
- isDisabled: props.disabled,
3437
- isClearable: props.isClearable,
3438
- isMulti: props.isMulti,
3439
- isSearchable: props.isSearchable
3440
- }
3441
- )
3389
+ {
3390
+ ...optionProps,
3391
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
3392
+ }
3393
+ ),
3394
+ Menu,
3395
+ IndicatorsContainer: () => null
3396
+ } : {
3397
+ Option,
3398
+ Menu,
3399
+ ValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3400
+ "div",
3401
+ {
3402
+ className: cn(
3403
+ e.className,
3404
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
3405
+ ),
3406
+ ...e
3407
+ }
3408
+ ),
3409
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3410
+ "div",
3411
+ {
3412
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
3413
+ ...e
3414
+ }
3415
+ )
3416
+ },
3417
+ onChange: (newValue, action) => props.onChange(newValue, action),
3418
+ options: props.options,
3419
+ getOptionLabel: props.getOptionLabel,
3420
+ defaultValue: props.defaultValue,
3421
+ value: props.value,
3422
+ placeholder: props.placeholder,
3423
+ isDisabled: props.disabled,
3424
+ isClearable: props.isClearable,
3425
+ isMulti: props.isMulti,
3426
+ isSearchable: props.isSearchable
3427
+ }
3442
3428
  ) : /* @__PURE__ */ import_react9.default.createElement(
3443
3429
  import_creatable.default,
3444
3430
  {
@@ -3480,11 +3466,13 @@ var PhoneInput = ({
3480
3466
  countryCodes,
3481
3467
  ...props
3482
3468
  }) => {
3469
+ var _a;
3483
3470
  const [phoneNumber, setPhoneNumber] = (0, import_react10.useState)("");
3484
- const [countryCode, setCountryCode] = (0, import_react10.useState)(props.preferredCountry);
3471
+ const [countryCode, setCountryCode] = (0, import_react10.useState)(
3472
+ props.preferredCountry || { label: "+966" }
3473
+ );
3485
3474
  const inputRef = (0, import_react10.useRef)(null);
3486
3475
  const handleInputChange = (e) => {
3487
- console.log("test e ", e.target.value);
3488
3476
  const validChars = /^[0-9-()]+$/;
3489
3477
  const input = e.target.value;
3490
3478
  if (input === "" || validChars.test(input)) {
@@ -3506,11 +3494,13 @@ var PhoneInput = ({
3506
3494
  isMulti: false,
3507
3495
  isSearchable: true,
3508
3496
  isClearable: false,
3509
- placeholder: "Code",
3497
+ placeholder: (_a = props.preferredCountry) == null ? void 0 : _a.label,
3510
3498
  options: countryCodes || countries_default,
3511
- onChange: setCountryCode,
3512
- value: countryCode == null ? void 0 : countryCode.label,
3513
- defaultValue: props.preferredCountry
3499
+ onChange: (e) => setCountryCode({ label: e.label, value: e.label }),
3500
+ valueKey: "label",
3501
+ labelKey: "label",
3502
+ value: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label },
3503
+ defaultValue: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label }
3514
3504
  }
3515
3505
  ), /* @__PURE__ */ import_react10.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react10.default.createElement(
3516
3506
  "input",
@@ -3863,14 +3853,7 @@ var LoginForm = ({
3863
3853
  (texts == null ? void 0 : texts.loginText) || "Login"
3864
3854
  ),
3865
3855
  props.additionalButtons && props.additionalButtons,
3866
- props.allowRegister && /* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react14.default.createElement(
3867
- "span",
3868
- {
3869
- onClick: props.onRouteToRegister,
3870
- className: "clickable-link"
3871
- },
3872
- (texts == null ? void 0 : texts.createAccount) || "Create Account"
3873
- ))
3856
+ props.allowRegister && /* @__PURE__ */ import_react14.default.createElement("div", { className: "hawa-select-none hawa-p-3 hawa-text-center hawa-text-sm hawa-font-normal dark:hawa-text-gray-300" }, (texts == null ? void 0 : texts.newUserText) || "New user?", " ", /* @__PURE__ */ import_react14.default.createElement("span", { onClick: props.onRouteToRegister, className: "clickable-link" }, (texts == null ? void 0 : texts.createAccount) || "Create Account"))
3874
3857
  )),
3875
3858
  props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react14.default.createElement(
3876
3859
  CardFooter,
@@ -4782,14 +4765,7 @@ var PinInputRoot = React25.forwardRef(({ className, containerClassName, ...props
4782
4765
  }
4783
4766
  ));
4784
4767
  PinInputRoot.displayName = "PinInputRoot";
4785
- var PinInputGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
4786
- "div",
4787
- {
4788
- ref,
4789
- className: cn("hawa-flex hawa-items-center", className),
4790
- ...props
4791
- }
4792
- ));
4768
+ var PinInputGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement("div", { ref, className: cn("hawa-flex hawa-items-center", className), ...props }));
4793
4769
  PinInputGroup.displayName = "PinInputGroup";
4794
4770
  var PinInputSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4795
4771
  const pinInputContext = React25.useContext(import_input_otp.OTPInputContext);
@@ -4812,22 +4788,12 @@ var PinInputSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4812
4788
  PinInputSlot.displayName = "PinInputSlot";
4813
4789
  var PinInputSeperator = React25.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React25.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React25.createElement(Dot, null)));
4814
4790
  PinInputSeperator.displayName = "PinInputSeperator";
4815
- var PinInput = ({
4816
- separatorPosition = 0,
4817
- ...props
4818
- }) => {
4791
+ var PinInput = ({ separatorPosition = 0, ...props }) => {
4819
4792
  const maxLength = props.maxLength || 6;
4820
4793
  const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
4821
4794
  const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
4822
4795
  const secondGroupLength = maxLength - firstGroupLength;
4823
- return /* @__PURE__ */ React25.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React25.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(
4824
- PinInputSlot,
4825
- {
4826
- key: index,
4827
- index,
4828
- className: "hawa-w-full hawa-border"
4829
- }
4830
- ))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React25.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(
4796
+ return /* @__PURE__ */ React25.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2", dir: "ltr" }, /* @__PURE__ */ React25.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(PinInputSlot, { key: index, index, className: "hawa-w-full hawa-border" }))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React25.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React25.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React25.createElement(
4831
4797
  PinInputSlot,
4832
4798
  {
4833
4799
  key: index + firstGroupLength,
@@ -4838,10 +4804,7 @@ var PinInput = ({
4838
4804
  };
4839
4805
 
4840
4806
  // blocks/auth/CodeConfirmation.tsx
4841
- var CodeConfirmation = ({
4842
- codeLength = 6,
4843
- ...props
4844
- }) => {
4807
+ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
4845
4808
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
4846
4809
  const formSchema = z5.object({
4847
4810
  otp_code: z5.string({ required_error: (_a = props.texts) == null ? void 0 : _a.codeRequiredText }).min(codeLength, { message: (_b = props.texts) == null ? void 0 : _b.codeTooShort })
@@ -4880,14 +4843,7 @@ var CodeConfirmation = ({
4880
4843
  }
4881
4844
  };
4882
4845
  }, []);
4883
- return /* @__PURE__ */ import_react24.default.createElement(Card, null, /* @__PURE__ */ import_react24.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react24.default.createElement(
4884
- Alert,
4885
- {
4886
- title: props.errorTitle,
4887
- text: props.errorText,
4888
- severity: "error"
4889
- }
4890
- ), /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react24.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react24.default.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ import_react24.default.createElement(
4846
+ return /* @__PURE__ */ import_react24.default.createElement(Card, null, /* @__PURE__ */ import_react24.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react24.default.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ import_react24.default.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ import_react24.default.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ import_react24.default.createElement("span", null, props.identifier))), /* @__PURE__ */ import_react24.default.createElement(
4891
4847
  "form",
4892
4848
  {
4893
4849
  noValidate: true,
@@ -4936,9 +4892,7 @@ var CodeConfirmation = ({
4936
4892
  if (props.onCancel) {
4937
4893
  return props.onCancel();
4938
4894
  } else {
4939
- console.log(
4940
- "Cancel button clicked but onCancel prop is missing"
4941
- );
4895
+ console.log("Cancel button clicked but onCancel prop is missing");
4942
4896
  }
4943
4897
  },
4944
4898
  variant: "outline"