@sikka/hawa 0.46.4-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 (41) 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 +85 -128
  6. package/dist/blocks/auth/index.mjs +18 -50
  7. package/dist/blocks/feedback/index.js +68 -79
  8. package/dist/blocks/feedback/index.mjs +1 -1
  9. package/dist/blocks/index.d.mts +3 -3
  10. package/dist/blocks/index.d.ts +3 -3
  11. package/dist/blocks/index.js +85 -128
  12. package/dist/blocks/index.mjs +5 -24
  13. package/dist/blocks/misc/index.js +68 -79
  14. package/dist/blocks/misc/index.mjs +1 -1
  15. package/dist/{chunk-5CTMGPEF.mjs → chunk-342KIV4R.mjs} +81 -105
  16. package/dist/{chunk-6TG2PHZK.mjs → chunk-AWJSHOYU.mjs} +68 -79
  17. package/dist/elements/index.d.mts +2 -2
  18. package/dist/elements/index.d.ts +2 -2
  19. package/dist/elements/index.js +81 -105
  20. package/dist/elements/index.mjs +1 -1
  21. package/dist/index.d.mts +10 -9
  22. package/dist/index.d.ts +10 -9
  23. package/dist/index.js +85 -128
  24. package/dist/index.mjs +85 -128
  25. package/dist/phoneInput/index.d.mts +7 -7
  26. package/dist/phoneInput/index.d.ts +7 -7
  27. package/dist/phoneInput/index.js +78 -85
  28. package/dist/phoneInput/index.js.map +1 -1
  29. package/dist/phoneInput/index.mjs +78 -85
  30. package/dist/phoneInput/index.mjs.map +1 -1
  31. package/dist/pinInput/index.js +3 -20
  32. package/dist/pinInput/index.js.map +1 -1
  33. package/dist/pinInput/index.mjs +3 -20
  34. package/dist/pinInput/index.mjs.map +1 -1
  35. package/dist/select/index.d.mts +1 -0
  36. package/dist/select/index.d.ts +1 -0
  37. package/dist/select/index.js +68 -79
  38. package/dist/select/index.js.map +1 -1
  39. package/dist/select/index.mjs +68 -79
  40. package/dist/select/index.mjs.map +1 -1
  41. package/package.json +1 -1
@@ -1528,6 +1528,7 @@ var import_clsx2 = __toESM(require("clsx"));
1528
1528
  var Select = ({
1529
1529
  labelProps,
1530
1530
  labelKey = "label",
1531
+ valueKey = "value",
1531
1532
  ...props
1532
1533
  }) => {
1533
1534
  const NoOption = () => {
@@ -1547,13 +1548,7 @@ var Select = ({
1547
1548
  children
1548
1549
  );
1549
1550
  };
1550
- const Option = ({
1551
- children,
1552
- innerProps,
1553
- innerRef,
1554
- isFocused,
1555
- isSelected
1556
- }) => {
1551
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
1557
1552
  return /* @__PURE__ */ import_react12.default.createElement(
1558
1553
  "div",
1559
1554
  {
@@ -1568,14 +1563,7 @@ var Select = ({
1568
1563
  children
1569
1564
  );
1570
1565
  };
1571
- const Menu = ({
1572
- cx,
1573
- children,
1574
- getStyles,
1575
- innerProps,
1576
- innerRef,
1577
- ...menuProps
1578
- }) => {
1566
+ const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
1579
1567
  const menuOpen = menuProps.selectProps.menuIsOpen;
1580
1568
  return /* @__PURE__ */ import_react12.default.createElement(
1581
1569
  "div",
@@ -1604,71 +1592,72 @@ var Select = ({
1604
1592
  )
1605
1593
  },
1606
1594
  props.label && /* @__PURE__ */ import_react12.default.createElement(Label, { ...labelProps }, props.label),
1607
- props.isLoading ? /* @__PURE__ */ import_react12.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
1608
- // TODO: enable keyboard to go to the next item in the list
1609
- /* @__PURE__ */ import_react12.default.createElement(
1610
- import_react_select.default,
1611
- {
1612
- noOptionsMessage: NoOption,
1613
- classNames: {
1614
- control: () => cn(
1615
- props.phoneCode && "hawa-rounded-r-none",
1616
- props.controlClassNames
1617
- ),
1618
- container: () => cn(
1619
- selectContainerStyles,
1620
- props.phoneCode && phoneCodeStyles,
1621
- props.isMulti && "hawa-ps-0 "
1622
- ),
1623
- placeholder: () => cn(
1624
- selectPlaceholderStyles,
1625
- props.disabled && "hawa-text-muted-foreground"
1626
- ),
1627
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
1628
- singleValue: () => cn(
1629
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
1630
- ),
1631
- indicatorsContainer: () => cn(
1632
- selectIndicatorContainerStyles,
1633
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
1634
- props.disabled && "hawa-opacity-30"
1635
- )
1636
- },
1637
- unstyled: true,
1638
- autoFocus: false,
1639
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
1595
+ props.isLoading ? /* @__PURE__ */ import_react12.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ import_react12.default.createElement(
1596
+ import_react_select.default,
1597
+ {
1598
+ noOptionsMessage: NoOption,
1599
+ classNames: {
1600
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
1601
+ container: () => cn(
1602
+ selectContainerStyles,
1603
+ props.phoneCode && phoneCodeStyles,
1604
+ props.isMulti && "hawa-ps-0 "
1605
+ ),
1606
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
1607
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
1608
+ singleValue: () => cn(
1609
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
1610
+ ),
1611
+ indicatorsContainer: () => cn(
1612
+ selectIndicatorContainerStyles,
1613
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
1614
+ props.disabled && "hawa-opacity-30"
1615
+ )
1616
+ },
1617
+ unstyled: true,
1618
+ autoFocus: false,
1619
+ components: props.hideIndicator ? {
1620
+ Option: (optionProps) => /* @__PURE__ */ import_react12.default.createElement(
1640
1621
  Option,
1641
- Menu,
1642
- ValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
1643
- "div",
1644
- {
1645
- className: cn(
1646
- e.className,
1647
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
1648
- ),
1649
- ...e
1650
- }
1651
- ),
1652
- MultiValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
1653
- "div",
1654
- {
1655
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
1656
- ...e
1657
- }
1658
- )
1659
- },
1660
- onChange: (newValue, action) => props.onChange(newValue, action),
1661
- options: props.options,
1662
- getOptionLabel: props.getOptionLabel,
1663
- defaultValue: props.defaultValue,
1664
- value: props.value,
1665
- placeholder: props.placeholder,
1666
- isDisabled: props.disabled,
1667
- isClearable: props.isClearable,
1668
- isMulti: props.isMulti,
1669
- isSearchable: props.isSearchable
1670
- }
1671
- )
1622
+ {
1623
+ ...optionProps,
1624
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
1625
+ }
1626
+ ),
1627
+ Menu,
1628
+ IndicatorsContainer: () => null
1629
+ } : {
1630
+ Option,
1631
+ Menu,
1632
+ ValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
1633
+ "div",
1634
+ {
1635
+ className: cn(
1636
+ e.className,
1637
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
1638
+ ),
1639
+ ...e
1640
+ }
1641
+ ),
1642
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react12.default.createElement(
1643
+ "div",
1644
+ {
1645
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
1646
+ ...e
1647
+ }
1648
+ )
1649
+ },
1650
+ onChange: (newValue, action) => props.onChange(newValue, action),
1651
+ options: props.options,
1652
+ getOptionLabel: props.getOptionLabel,
1653
+ defaultValue: props.defaultValue,
1654
+ value: props.value,
1655
+ placeholder: props.placeholder,
1656
+ isDisabled: props.disabled,
1657
+ isClearable: props.isClearable,
1658
+ isMulti: props.isMulti,
1659
+ isSearchable: props.isSearchable
1660
+ }
1672
1661
  ) : /* @__PURE__ */ import_react12.default.createElement(
1673
1662
  import_creatable.default,
1674
1663
  {
@@ -4,7 +4,7 @@ import {
4
4
  } from "../../chunk-5S5DR7KF.mjs";
5
5
  import {
6
6
  Select
7
- } from "../../chunk-6TG2PHZK.mjs";
7
+ } from "../../chunk-AWJSHOYU.mjs";
8
8
  import {
9
9
  Popover,
10
10
  Radio
@@ -1,6 +1,6 @@
1
1
  import React__default, { FC, InputHTMLAttributes } from 'react';
2
2
  import { ThirdPartyAuthTextsTypes, LoginFormTextsTypes, RegisterFormTextsTypes, NewPasswordTextsTypes, ResetPasswordTextsTypes, BaseInputType, TextInputType, PricingCardProps, PlanFeature, PricingPlanTexts } from '../types/index.mjs';
3
- import { P as PhoneInputProps, S as SelectOptionProps, L as LabelProps, R as RadioOptionsTypes } from '../Radio-Dyvlywnk.mjs';
3
+ import { P as PhoneInputProps, S as SelectOptionProps, L as LabelProps, R as RadioOptionsTypes } from '../Radio-BPHTeDMz.mjs';
4
4
  import { D as DirectionType, a as RadioOptionType, O as OrientationType } from '../commonTypes-C-g8nFFC.mjs';
5
5
  import { M as MenuItemType } from '../DropdownMenu-mK9EvfKp.mjs';
6
6
  import '@radix-ui/react-popover';
@@ -243,7 +243,7 @@ declare const ResetPasswordForm: FC<ResetPasswordType>;
243
243
 
244
244
  type TConfirmation = {
245
245
  texts?: {
246
- checkYourPhone?: string;
246
+ checkYourIdentifier?: string;
247
247
  weSentCode?: string;
248
248
  didntGetCode?: string;
249
249
  resendCode?: string;
@@ -257,7 +257,7 @@ type TConfirmation = {
257
257
  showError?: any;
258
258
  errorTitle?: any;
259
259
  errorText?: any;
260
- phoneNumber?: string;
260
+ identifier?: string;
261
261
  confirmLoading?: boolean;
262
262
  onConfirm?: any;
263
263
  onResend?: any;
@@ -1,6 +1,6 @@
1
1
  import React__default, { FC, InputHTMLAttributes } from 'react';
2
2
  import { ThirdPartyAuthTextsTypes, LoginFormTextsTypes, RegisterFormTextsTypes, NewPasswordTextsTypes, ResetPasswordTextsTypes, BaseInputType, TextInputType, PricingCardProps, PlanFeature, PricingPlanTexts } from '../types/index.js';
3
- import { P as PhoneInputProps, S as SelectOptionProps, L as LabelProps, R as RadioOptionsTypes } from '../Radio-DlPwVCG4.js';
3
+ import { P as PhoneInputProps, S as SelectOptionProps, L as LabelProps, R as RadioOptionsTypes } from '../Radio-cRcIH8_L.js';
4
4
  import { D as DirectionType, a as RadioOptionType, O as OrientationType } from '../commonTypes-C-g8nFFC.js';
5
5
  import { M as MenuItemType } from '../DropdownMenu-CDnFCzfc.js';
6
6
  import '@radix-ui/react-popover';
@@ -243,7 +243,7 @@ declare const ResetPasswordForm: FC<ResetPasswordType>;
243
243
 
244
244
  type TConfirmation = {
245
245
  texts?: {
246
- checkYourPhone?: string;
246
+ checkYourIdentifier?: string;
247
247
  weSentCode?: string;
248
248
  didntGetCode?: string;
249
249
  resendCode?: string;
@@ -257,7 +257,7 @@ type TConfirmation = {
257
257
  showError?: any;
258
258
  errorTitle?: any;
259
259
  errorText?: any;
260
- phoneNumber?: string;
260
+ identifier?: string;
261
261
  confirmLoading?: boolean;
262
262
  onConfirm?: any;
263
263
  onResend?: any;
@@ -3316,6 +3316,7 @@ var import_clsx2 = __toESM(require("clsx"));
3316
3316
  var Select = ({
3317
3317
  labelProps,
3318
3318
  labelKey = "label",
3319
+ valueKey = "value",
3319
3320
  ...props
3320
3321
  }) => {
3321
3322
  const NoOption = () => {
@@ -3335,13 +3336,7 @@ var Select = ({
3335
3336
  children
3336
3337
  );
3337
3338
  };
3338
- const Option = ({
3339
- children,
3340
- innerProps,
3341
- innerRef,
3342
- isFocused,
3343
- isSelected
3344
- }) => {
3339
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
3345
3340
  return /* @__PURE__ */ import_react9.default.createElement(
3346
3341
  "div",
3347
3342
  {
@@ -3356,14 +3351,7 @@ var Select = ({
3356
3351
  children
3357
3352
  );
3358
3353
  };
3359
- const Menu = ({
3360
- cx,
3361
- children,
3362
- getStyles,
3363
- innerProps,
3364
- innerRef,
3365
- ...menuProps
3366
- }) => {
3354
+ const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
3367
3355
  const menuOpen = menuProps.selectProps.menuIsOpen;
3368
3356
  return /* @__PURE__ */ import_react9.default.createElement(
3369
3357
  "div",
@@ -3392,71 +3380,72 @@ var Select = ({
3392
3380
  )
3393
3381
  },
3394
3382
  props.label && /* @__PURE__ */ import_react9.default.createElement(Label, { ...labelProps }, props.label),
3395
- props.isLoading ? /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
3396
- // TODO: enable keyboard to go to the next item in the list
3397
- /* @__PURE__ */ import_react9.default.createElement(
3398
- import_react_select.default,
3399
- {
3400
- noOptionsMessage: NoOption,
3401
- classNames: {
3402
- control: () => cn(
3403
- props.phoneCode && "hawa-rounded-r-none",
3404
- props.controlClassNames
3405
- ),
3406
- container: () => cn(
3407
- selectContainerStyles,
3408
- props.phoneCode && phoneCodeStyles,
3409
- props.isMulti && "hawa-ps-0 "
3410
- ),
3411
- placeholder: () => cn(
3412
- selectPlaceholderStyles,
3413
- props.disabled && "hawa-text-muted-foreground"
3414
- ),
3415
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
3416
- singleValue: () => cn(
3417
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
3418
- ),
3419
- indicatorsContainer: () => cn(
3420
- selectIndicatorContainerStyles,
3421
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
3422
- props.disabled && "hawa-opacity-30"
3423
- )
3424
- },
3425
- unstyled: true,
3426
- autoFocus: false,
3427
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
3383
+ props.isLoading ? /* @__PURE__ */ import_react9.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ import_react9.default.createElement(
3384
+ import_react_select.default,
3385
+ {
3386
+ noOptionsMessage: NoOption,
3387
+ classNames: {
3388
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
3389
+ container: () => cn(
3390
+ selectContainerStyles,
3391
+ props.phoneCode && phoneCodeStyles,
3392
+ props.isMulti && "hawa-ps-0 "
3393
+ ),
3394
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
3395
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
3396
+ singleValue: () => cn(
3397
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
3398
+ ),
3399
+ indicatorsContainer: () => cn(
3400
+ selectIndicatorContainerStyles,
3401
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
3402
+ props.disabled && "hawa-opacity-30"
3403
+ )
3404
+ },
3405
+ unstyled: true,
3406
+ autoFocus: false,
3407
+ components: props.hideIndicator ? {
3408
+ Option: (optionProps) => /* @__PURE__ */ import_react9.default.createElement(
3428
3409
  Option,
3429
- Menu,
3430
- ValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3431
- "div",
3432
- {
3433
- className: cn(
3434
- e.className,
3435
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
3436
- ),
3437
- ...e
3438
- }
3439
- ),
3440
- MultiValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3441
- "div",
3442
- {
3443
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
3444
- ...e
3445
- }
3446
- )
3447
- },
3448
- onChange: (newValue, action) => props.onChange(newValue, action),
3449
- options: props.options,
3450
- getOptionLabel: props.getOptionLabel,
3451
- defaultValue: props.defaultValue,
3452
- value: props.value,
3453
- placeholder: props.placeholder,
3454
- isDisabled: props.disabled,
3455
- isClearable: props.isClearable,
3456
- isMulti: props.isMulti,
3457
- isSearchable: props.isSearchable
3458
- }
3459
- )
3410
+ {
3411
+ ...optionProps,
3412
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
3413
+ }
3414
+ ),
3415
+ Menu,
3416
+ IndicatorsContainer: () => null
3417
+ } : {
3418
+ Option,
3419
+ Menu,
3420
+ ValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3421
+ "div",
3422
+ {
3423
+ className: cn(
3424
+ e.className,
3425
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
3426
+ ),
3427
+ ...e
3428
+ }
3429
+ ),
3430
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react9.default.createElement(
3431
+ "div",
3432
+ {
3433
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
3434
+ ...e
3435
+ }
3436
+ )
3437
+ },
3438
+ onChange: (newValue, action) => props.onChange(newValue, action),
3439
+ options: props.options,
3440
+ getOptionLabel: props.getOptionLabel,
3441
+ defaultValue: props.defaultValue,
3442
+ value: props.value,
3443
+ placeholder: props.placeholder,
3444
+ isDisabled: props.disabled,
3445
+ isClearable: props.isClearable,
3446
+ isMulti: props.isMulti,
3447
+ isSearchable: props.isSearchable
3448
+ }
3460
3449
  ) : /* @__PURE__ */ import_react9.default.createElement(
3461
3450
  import_creatable.default,
3462
3451
  {
@@ -3498,11 +3487,13 @@ var PhoneInput = ({
3498
3487
  countryCodes,
3499
3488
  ...props
3500
3489
  }) => {
3490
+ var _a;
3501
3491
  const [phoneNumber, setPhoneNumber] = (0, import_react10.useState)("");
3502
- const [countryCode, setCountryCode] = (0, import_react10.useState)(props.preferredCountry);
3492
+ const [countryCode, setCountryCode] = (0, import_react10.useState)(
3493
+ props.preferredCountry || { label: "+966" }
3494
+ );
3503
3495
  const inputRef = (0, import_react10.useRef)(null);
3504
3496
  const handleInputChange = (e) => {
3505
- console.log("test e ", e.target.value);
3506
3497
  const validChars = /^[0-9-()]+$/;
3507
3498
  const input = e.target.value;
3508
3499
  if (input === "" || validChars.test(input)) {
@@ -3524,11 +3515,13 @@ var PhoneInput = ({
3524
3515
  isMulti: false,
3525
3516
  isSearchable: true,
3526
3517
  isClearable: false,
3527
- placeholder: "Code",
3518
+ placeholder: (_a = props.preferredCountry) == null ? void 0 : _a.label,
3528
3519
  options: countryCodes || countries_default,
3529
- onChange: setCountryCode,
3530
- value: countryCode == null ? void 0 : countryCode.label,
3531
- defaultValue: props.preferredCountry
3520
+ onChange: (e) => setCountryCode({ label: e.label, value: e.label }),
3521
+ valueKey: "label",
3522
+ labelKey: "label",
3523
+ value: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label },
3524
+ defaultValue: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label }
3532
3525
  }
3533
3526
  ), /* @__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(
3534
3527
  "input",
@@ -4017,14 +4010,7 @@ var LoginForm = ({
4017
4010
  (texts == null ? void 0 : texts.loginText) || "Login"
4018
4011
  ),
4019
4012
  props.additionalButtons && props.additionalButtons,
4020
- 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(
4021
- "span",
4022
- {
4023
- onClick: props.onRouteToRegister,
4024
- className: "clickable-link"
4025
- },
4026
- (texts == null ? void 0 : texts.createAccount) || "Create Account"
4027
- ))
4013
+ 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"))
4028
4014
  )),
4029
4015
  props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ import_react14.default.createElement(
4030
4016
  CardFooter,
@@ -4936,14 +4922,7 @@ var PinInputRoot = React25.forwardRef(({ className, containerClassName, ...props
4936
4922
  }
4937
4923
  ));
4938
4924
  PinInputRoot.displayName = "PinInputRoot";
4939
- var PinInputGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement(
4940
- "div",
4941
- {
4942
- ref,
4943
- className: cn("hawa-flex hawa-items-center", className),
4944
- ...props
4945
- }
4946
- ));
4925
+ var PinInputGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React25.createElement("div", { ref, className: cn("hawa-flex hawa-items-center", className), ...props }));
4947
4926
  PinInputGroup.displayName = "PinInputGroup";
4948
4927
  var PinInputSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4949
4928
  const pinInputContext = React25.useContext(import_input_otp.OTPInputContext);
@@ -4966,22 +4945,12 @@ var PinInputSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
4966
4945
  PinInputSlot.displayName = "PinInputSlot";
4967
4946
  var PinInputSeperator = React25.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React25.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React25.createElement(Dot, null)));
4968
4947
  PinInputSeperator.displayName = "PinInputSeperator";
4969
- var PinInput = ({
4970
- separatorPosition = 0,
4971
- ...props
4972
- }) => {
4948
+ var PinInput = ({ separatorPosition = 0, ...props }) => {
4973
4949
  const maxLength = props.maxLength || 6;
4974
4950
  const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
4975
4951
  const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
4976
4952
  const secondGroupLength = maxLength - firstGroupLength;
4977
- 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(
4978
- PinInputSlot,
4979
- {
4980
- key: index,
4981
- index,
4982
- className: "hawa-w-full hawa-border"
4983
- }
4984
- ))), 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(
4953
+ 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(
4985
4954
  PinInputSlot,
4986
4955
  {
4987
4956
  key: index + firstGroupLength,
@@ -4992,10 +4961,7 @@ var PinInput = ({
4992
4961
  };
4993
4962
 
4994
4963
  // blocks/auth/CodeConfirmation.tsx
4995
- var CodeConfirmation = ({
4996
- codeLength = 6,
4997
- ...props
4998
- }) => {
4964
+ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
4999
4965
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
5000
4966
  const formSchema = z5.object({
5001
4967
  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 })
@@ -5034,14 +5000,7 @@ var CodeConfirmation = ({
5034
5000
  }
5035
5001
  };
5036
5002
  }, []);
5037
- return /* @__PURE__ */ import_react24.default.createElement(Card, null, /* @__PURE__ */ import_react24.default.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ import_react24.default.createElement(
5038
- Alert,
5039
- {
5040
- title: props.errorTitle,
5041
- text: props.errorText,
5042
- severity: "error"
5043
- }
5044
- ), /* @__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(
5003
+ 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(
5045
5004
  "form",
5046
5005
  {
5047
5006
  noValidate: true,
@@ -5090,9 +5049,7 @@ var CodeConfirmation = ({
5090
5049
  if (props.onCancel) {
5091
5050
  return props.onCancel();
5092
5051
  } else {
5093
- console.log(
5094
- "Cancel button clicked but onCancel prop is missing"
5095
- );
5052
+ console.log("Cancel button clicked but onCancel prop is missing");
5096
5053
  }
5097
5054
  },
5098
5055
  variant: "outline"
@@ -17,7 +17,7 @@ import {
17
17
  TabsList,
18
18
  TabsTrigger,
19
19
  Textarea
20
- } from "../chunk-5CTMGPEF.mjs";
20
+ } from "../chunk-342KIV4R.mjs";
21
21
  import {
22
22
  getHotkeyHandler
23
23
  } from "../chunk-WL7C2A5D.mjs";
@@ -450,14 +450,7 @@ var LoginForm = ({
450
450
  (texts == null ? void 0 : texts.loginText) || "Login"
451
451
  ),
452
452
  props.additionalButtons && props.additionalButtons,
453
- props.allowRegister && /* @__PURE__ */ React2.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__ */ React2.createElement(
454
- "span",
455
- {
456
- onClick: props.onRouteToRegister,
457
- className: "clickable-link"
458
- },
459
- (texts == null ? void 0 : texts.createAccount) || "Create Account"
460
- ))
453
+ props.allowRegister && /* @__PURE__ */ React2.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__ */ React2.createElement("span", { onClick: props.onRouteToRegister, className: "clickable-link" }, (texts == null ? void 0 : texts.createAccount) || "Create Account"))
461
454
  )),
462
455
  props.viaGithub || props.viaGoogle || props.viaTwitter ? /* @__PURE__ */ React2.createElement(
463
456
  CardFooter,
@@ -1127,10 +1120,7 @@ import React8, { useEffect, useState as useState3 } from "react";
1127
1120
  import { Controller as Controller5, useForm as useForm5 } from "react-hook-form";
1128
1121
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
1129
1122
  import * as z5 from "zod";
1130
- var CodeConfirmation = ({
1131
- codeLength = 6,
1132
- ...props
1133
- }) => {
1123
+ var CodeConfirmation = ({ codeLength = 6, ...props }) => {
1134
1124
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1135
1125
  const formSchema = z5.object({
1136
1126
  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 })
@@ -1169,14 +1159,7 @@ var CodeConfirmation = ({
1169
1159
  }
1170
1160
  };
1171
1161
  }, []);
1172
- return /* @__PURE__ */ React8.createElement(Card, null, /* @__PURE__ */ React8.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React8.createElement(
1173
- Alert,
1174
- {
1175
- title: props.errorTitle,
1176
- text: props.errorText,
1177
- severity: "error"
1178
- }
1179
- ), /* @__PURE__ */ React8.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourPhone) || "Please check your phone"), /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ React8.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ React8.createElement("span", null, props.phoneNumber))), /* @__PURE__ */ React8.createElement(
1162
+ return /* @__PURE__ */ React8.createElement(Card, null, /* @__PURE__ */ React8.createElement(CardContent, { headless: true }, props.showError && /* @__PURE__ */ React8.createElement(Alert, { title: props.errorTitle, text: props.errorText, severity: "error" }), /* @__PURE__ */ React8.createElement("div", { className: "hawa-mb-4 dark:hawa-text-white" }, /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-lg hawa-font-bold" }, ((_c = props.texts) == null ? void 0 : _c.checkYourIdentifier) || "Please check your phone"), /* @__PURE__ */ React8.createElement("div", { className: "hawa-text-muted-foreground" }, /* @__PURE__ */ React8.createElement("span", null, ((_d = props.texts) == null ? void 0 : _d.weSentCode) || "We've sent a code to "), /* @__PURE__ */ React8.createElement("span", null, props.identifier))), /* @__PURE__ */ React8.createElement(
1180
1163
  "form",
1181
1164
  {
1182
1165
  noValidate: true,
@@ -1225,9 +1208,7 @@ var CodeConfirmation = ({
1225
1208
  if (props.onCancel) {
1226
1209
  return props.onCancel();
1227
1210
  } else {
1228
- console.log(
1229
- "Cancel button clicked but onCancel prop is missing"
1230
- );
1211
+ console.log("Cancel button clicked but onCancel prop is missing");
1231
1212
  }
1232
1213
  },
1233
1214
  variant: "outline"