@sikka/hawa 0.46.4-next → 0.48.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 (55) 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 +34 -17
  4. package/dist/blocks/auth/index.d.ts +34 -17
  5. package/dist/blocks/auth/index.js +1008 -430
  6. package/dist/blocks/auth/index.mjs +427 -297
  7. package/dist/blocks/feedback/index.d.mts +1 -1
  8. package/dist/blocks/feedback/index.d.ts +1 -1
  9. package/dist/blocks/feedback/index.js +68 -79
  10. package/dist/blocks/feedback/index.mjs +1 -1
  11. package/dist/blocks/index.d.mts +28 -11
  12. package/dist/blocks/index.d.ts +28 -11
  13. package/dist/blocks/index.js +2340 -2233
  14. package/dist/blocks/index.mjs +407 -269
  15. package/dist/blocks/misc/index.d.mts +1 -1
  16. package/dist/blocks/misc/index.d.ts +1 -1
  17. package/dist/blocks/misc/index.js +68 -79
  18. package/dist/blocks/misc/index.mjs +50 -367
  19. package/dist/blocks/pricing/index.d.mts +1 -1
  20. package/dist/blocks/pricing/index.d.ts +1 -1
  21. package/dist/blocks/pricing/index.mjs +1 -1
  22. package/dist/{chunk-6TG2PHZK.mjs → chunk-AWJSHOYU.mjs} +68 -79
  23. package/dist/{chunk-5CTMGPEF.mjs → chunk-GBLWUEYN.mjs} +650 -674
  24. package/dist/chunk-JFWD2ICY.mjs +511 -0
  25. package/dist/elements/index.d.mts +2 -2
  26. package/dist/elements/index.d.ts +2 -2
  27. package/dist/elements/index.js +81 -105
  28. package/dist/elements/index.mjs +1 -1
  29. package/dist/index.css +7 -0
  30. package/dist/index.d.mts +36 -17
  31. package/dist/index.d.ts +36 -17
  32. package/dist/index.js +482 -373
  33. package/dist/index.mjs +487 -373
  34. package/dist/phoneInput/index.d.mts +7 -7
  35. package/dist/phoneInput/index.d.ts +7 -7
  36. package/dist/phoneInput/index.js +78 -85
  37. package/dist/phoneInput/index.js.map +1 -1
  38. package/dist/phoneInput/index.mjs +78 -85
  39. package/dist/phoneInput/index.mjs.map +1 -1
  40. package/dist/pinInput/index.js +3 -20
  41. package/dist/pinInput/index.js.map +1 -1
  42. package/dist/pinInput/index.mjs +3 -20
  43. package/dist/pinInput/index.mjs.map +1 -1
  44. package/dist/select/index.d.mts +1 -0
  45. package/dist/select/index.d.ts +1 -0
  46. package/dist/select/index.js +68 -79
  47. package/dist/select/index.js.map +1 -1
  48. package/dist/select/index.mjs +68 -79
  49. package/dist/select/index.mjs.map +1 -1
  50. package/dist/{textTypes-DXLtO2fL.d.mts → textTypes-CYQYIsFt.d.mts} +1 -0
  51. package/dist/{textTypes-DXLtO2fL.d.ts → textTypes-CYQYIsFt.d.ts} +1 -0
  52. package/dist/types/index.d.mts +1 -0
  53. package/dist/types/index.d.ts +1 -0
  54. package/package.json +1 -1
  55. package/dist/chunk-EOH6A3GR.mjs +0 -183
@@ -5263,6 +5263,7 @@ var import_clsx3 = __toESM(require("clsx"));
5263
5263
  var Select = ({
5264
5264
  labelProps,
5265
5265
  labelKey = "label",
5266
+ valueKey = "value",
5266
5267
  ...props
5267
5268
  }) => {
5268
5269
  const NoOption = () => {
@@ -5282,13 +5283,7 @@ var Select = ({
5282
5283
  children
5283
5284
  );
5284
5285
  };
5285
- const Option = ({
5286
- children,
5287
- innerProps,
5288
- innerRef,
5289
- isFocused,
5290
- isSelected
5291
- }) => {
5286
+ const Option = ({ children, innerProps, innerRef, isFocused, isSelected }) => {
5292
5287
  return /* @__PURE__ */ import_react35.default.createElement(
5293
5288
  "div",
5294
5289
  {
@@ -5303,14 +5298,7 @@ var Select = ({
5303
5298
  children
5304
5299
  );
5305
5300
  };
5306
- const Menu = ({
5307
- cx,
5308
- children,
5309
- getStyles,
5310
- innerProps,
5311
- innerRef,
5312
- ...menuProps
5313
- }) => {
5301
+ const Menu = ({ cx, children, getStyles, innerProps, innerRef, ...menuProps }) => {
5314
5302
  const menuOpen = menuProps.selectProps.menuIsOpen;
5315
5303
  return /* @__PURE__ */ import_react35.default.createElement(
5316
5304
  "div",
@@ -5339,71 +5327,72 @@ var Select = ({
5339
5327
  )
5340
5328
  },
5341
5329
  props.label && /* @__PURE__ */ import_react35.default.createElement(Label2, { ...labelProps }, props.label),
5342
- props.isLoading ? /* @__PURE__ */ import_react35.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? (
5343
- // TODO: enable keyboard to go to the next item in the list
5344
- /* @__PURE__ */ import_react35.default.createElement(
5345
- import_react_select.default,
5346
- {
5347
- noOptionsMessage: NoOption,
5348
- classNames: {
5349
- control: () => cn(
5350
- props.phoneCode && "hawa-rounded-r-none",
5351
- props.controlClassNames
5352
- ),
5353
- container: () => cn(
5354
- selectContainerStyles,
5355
- props.phoneCode && phoneCodeStyles,
5356
- props.isMulti && "hawa-ps-0 "
5357
- ),
5358
- placeholder: () => cn(
5359
- selectPlaceholderStyles,
5360
- props.disabled && "hawa-text-muted-foreground"
5361
- ),
5362
- valueContainer: () => "hawa-text-foreground hawa-px-1 ",
5363
- singleValue: () => cn(
5364
- props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
5365
- ),
5366
- indicatorsContainer: () => cn(
5367
- selectIndicatorContainerStyles,
5368
- props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
5369
- props.disabled && "hawa-opacity-30"
5370
- )
5371
- },
5372
- unstyled: true,
5373
- autoFocus: false,
5374
- components: props.hideIndicator ? { Option, Menu, IndicatorsContainer: () => null } : {
5330
+ props.isLoading ? /* @__PURE__ */ import_react35.default.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : !props.isCreatable ? /* @__PURE__ */ import_react35.default.createElement(
5331
+ import_react_select.default,
5332
+ {
5333
+ noOptionsMessage: NoOption,
5334
+ classNames: {
5335
+ control: () => cn(props.phoneCode && "hawa-rounded-r-none", props.controlClassNames),
5336
+ container: () => cn(
5337
+ selectContainerStyles,
5338
+ props.phoneCode && phoneCodeStyles,
5339
+ props.isMulti && "hawa-ps-0 "
5340
+ ),
5341
+ placeholder: () => cn(selectPlaceholderStyles, props.disabled && "hawa-text-muted-foreground"),
5342
+ valueContainer: () => "hawa-text-foreground hawa-px-1",
5343
+ singleValue: () => cn(
5344
+ props.disabled ? "hawa-text-muted-foreground hawa-opacity-30" : "hawa-text-foreground"
5345
+ ),
5346
+ indicatorsContainer: () => cn(
5347
+ selectIndicatorContainerStyles,
5348
+ props.hideIndicator ? "hawa-invisible" : "hawa-px-1",
5349
+ props.disabled && "hawa-opacity-30"
5350
+ )
5351
+ },
5352
+ unstyled: true,
5353
+ autoFocus: false,
5354
+ components: props.hideIndicator ? {
5355
+ Option: (optionProps) => /* @__PURE__ */ import_react35.default.createElement(
5375
5356
  Option,
5376
- Menu,
5377
- ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5378
- "div",
5379
- {
5380
- className: cn(
5381
- e.className,
5382
- "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-1"
5383
- ),
5384
- ...e
5385
- }
5386
- ),
5387
- MultiValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5388
- "div",
5389
- {
5390
- className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
5391
- ...e
5392
- }
5393
- )
5394
- },
5395
- onChange: (newValue, action) => props.onChange(newValue, action),
5396
- options: props.options,
5397
- getOptionLabel: props.getOptionLabel,
5398
- defaultValue: props.defaultValue,
5399
- value: props.value,
5400
- placeholder: props.placeholder,
5401
- isDisabled: props.disabled,
5402
- isClearable: props.isClearable,
5403
- isMulti: props.isMulti,
5404
- isSearchable: props.isSearchable
5405
- }
5406
- )
5357
+ {
5358
+ ...optionProps,
5359
+ isSelected: optionProps.data[valueKey] === props.value[valueKey]
5360
+ }
5361
+ ),
5362
+ Menu,
5363
+ IndicatorsContainer: () => null
5364
+ } : {
5365
+ Option,
5366
+ Menu,
5367
+ ValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5368
+ "div",
5369
+ {
5370
+ className: cn(
5371
+ e.className,
5372
+ "hawa-gap-1 hawa-flex hawa-flex-row hawa-flex-wrap hawa-p-2 hawa-w-full hawa-cursor-pointer"
5373
+ ),
5374
+ ...e
5375
+ }
5376
+ ),
5377
+ MultiValueContainer: (e) => /* @__PURE__ */ import_react35.default.createElement(
5378
+ "div",
5379
+ {
5380
+ className: "hawa-rounded hawa-border hawa-p-1 hawa-px-2 hawa-flex hawa-flex-row",
5381
+ ...e
5382
+ }
5383
+ )
5384
+ },
5385
+ onChange: (newValue, action) => props.onChange(newValue, action),
5386
+ options: props.options,
5387
+ getOptionLabel: props.getOptionLabel,
5388
+ defaultValue: props.defaultValue,
5389
+ value: props.value,
5390
+ placeholder: props.placeholder,
5391
+ isDisabled: props.disabled,
5392
+ isClearable: props.isClearable,
5393
+ isMulti: props.isMulti,
5394
+ isSearchable: props.isSearchable
5395
+ }
5407
5396
  ) : /* @__PURE__ */ import_react35.default.createElement(
5408
5397
  import_creatable.default,
5409
5398
  {
@@ -7393,11 +7382,13 @@ var PhoneInput = ({
7393
7382
  countryCodes,
7394
7383
  ...props
7395
7384
  }) => {
7385
+ var _a;
7396
7386
  const [phoneNumber, setPhoneNumber] = (0, import_react39.useState)("");
7397
- const [countryCode, setCountryCode] = (0, import_react39.useState)(props.preferredCountry);
7387
+ const [countryCode, setCountryCode] = (0, import_react39.useState)(
7388
+ props.preferredCountry || { label: "+966" }
7389
+ );
7398
7390
  const inputRef = (0, import_react39.useRef)(null);
7399
7391
  const handleInputChange = (e) => {
7400
- console.log("test e ", e.target.value);
7401
7392
  const validChars = /^[0-9-()]+$/;
7402
7393
  const input = e.target.value;
7403
7394
  if (input === "" || validChars.test(input)) {
@@ -7419,11 +7410,13 @@ var PhoneInput = ({
7419
7410
  isMulti: false,
7420
7411
  isSearchable: true,
7421
7412
  isClearable: false,
7422
- placeholder: "Code",
7413
+ placeholder: (_a = props.preferredCountry) == null ? void 0 : _a.label,
7423
7414
  options: countryCodes || countries_default,
7424
- onChange: setCountryCode,
7425
- value: countryCode == null ? void 0 : countryCode.label,
7426
- defaultValue: props.preferredCountry
7415
+ onChange: (e) => setCountryCode({ label: e.label, value: e.label }),
7416
+ valueKey: "label",
7417
+ labelKey: "label",
7418
+ value: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label },
7419
+ defaultValue: { label: countryCode == null ? void 0 : countryCode.label, value: countryCode == null ? void 0 : countryCode.label }
7427
7420
  }
7428
7421
  ), /* @__PURE__ */ import_react39.default.createElement("div", { className: "hawa-relative hawa-flex hawa-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ import_react39.default.createElement(
7429
7422
  "input",
@@ -7536,14 +7529,7 @@ var PinInputRoot = React50.forwardRef(({ className, containerClassName, ...props
7536
7529
  }
7537
7530
  ));
7538
7531
  PinInputRoot.displayName = "PinInputRoot";
7539
- var PinInputGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React50.createElement(
7540
- "div",
7541
- {
7542
- ref,
7543
- className: cn("hawa-flex hawa-items-center", className),
7544
- ...props
7545
- }
7546
- ));
7532
+ var PinInputGroup = React50.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React50.createElement("div", { ref, className: cn("hawa-flex hawa-items-center", className), ...props }));
7547
7533
  PinInputGroup.displayName = "PinInputGroup";
7548
7534
  var PinInputSlot = React50.forwardRef(({ index, className, ...props }, ref) => {
7549
7535
  const pinInputContext = React50.useContext(import_input_otp.OTPInputContext);
@@ -7566,22 +7552,12 @@ var PinInputSlot = React50.forwardRef(({ index, className, ...props }, ref) => {
7566
7552
  PinInputSlot.displayName = "PinInputSlot";
7567
7553
  var PinInputSeperator = React50.forwardRef(({ ...props }, ref) => /* @__PURE__ */ React50.createElement("div", { ref, role: "separator", ...props }, /* @__PURE__ */ React50.createElement(Dot, null)));
7568
7554
  PinInputSeperator.displayName = "PinInputSeperator";
7569
- var PinInput = ({
7570
- separatorPosition = 0,
7571
- ...props
7572
- }) => {
7555
+ var PinInput = ({ separatorPosition = 0, ...props }) => {
7573
7556
  const maxLength = props.maxLength || 6;
7574
7557
  const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);
7575
7558
  const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;
7576
7559
  const secondGroupLength = maxLength - firstGroupLength;
7577
- return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
7578
- PinInputSlot,
7579
- {
7580
- key: index,
7581
- index,
7582
- className: "hawa-w-full hawa-border"
7583
- }
7584
- ))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React50.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
7560
+ return /* @__PURE__ */ React50.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2", dir: "ltr" }, /* @__PURE__ */ React50.createElement(PinInputRoot, { ...props }, firstGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(firstGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(PinInputSlot, { key: index, index, className: "hawa-w-full hawa-border" }))), separatorPosition > 0 && separatorPosition < props.maxLength && /* @__PURE__ */ React50.createElement(PinInputSeperator, null), secondGroupLength > 0 && /* @__PURE__ */ React50.createElement(PinInputGroup, { className: "hawa-w-full hawa-gap-2" }, [...Array(secondGroupLength)].map((_, index) => /* @__PURE__ */ React50.createElement(
7585
7561
  PinInputSlot,
7586
7562
  {
7587
7563
  key: index + firstGroupLength,
@@ -26,7 +26,7 @@ import {
26
26
  TabsList,
27
27
  TabsTrigger,
28
28
  Textarea
29
- } from "../chunk-5CTMGPEF.mjs";
29
+ } from "../chunk-GBLWUEYN.mjs";
30
30
  import {
31
31
  useClipboard
32
32
  } from "../chunk-WL7C2A5D.mjs";
package/dist/index.css CHANGED
@@ -1224,6 +1224,10 @@ input[type="number"]::-webkit-inner-spin-button,
1224
1224
  margin-top: 0.5rem;
1225
1225
  margin-bottom: 0.5rem;
1226
1226
  }
1227
+ .hawa-my-4 {
1228
+ margin-top: 1rem;
1229
+ margin-bottom: 1rem;
1230
+ }
1227
1231
  .-hawa-mt-4 {
1228
1232
  margin-top: -1rem;
1229
1233
  }
@@ -1329,6 +1333,9 @@ input[type="number"]::-webkit-inner-spin-button,
1329
1333
  .hawa-mt-4 {
1330
1334
  margin-top: 1rem;
1331
1335
  }
1336
+ .hawa-mt-6 {
1337
+ margin-top: 1.5rem;
1338
+ }
1332
1339
  .hawa-mt-8 {
1333
1340
  margin-top: 2rem;
1334
1341
  }
package/dist/index.d.mts CHANGED
@@ -884,6 +884,7 @@ type SelectTypes = {
884
884
  hideHelperText?: boolean;
885
885
  options: SelectOptionProps[];
886
886
  labelKey?: string;
887
+ valueKey?: string;
887
888
  isCreatable?: boolean;
888
889
  isClearable?: boolean;
889
890
  isMulti?: boolean;
@@ -968,19 +969,19 @@ type BadgeTypes = {
968
969
  declare const Badge: FC<BadgeTypes>;
969
970
  declare const BadgedComponent: ({ children, className, hideBadge, position, size, text, }: any) => React__default.JSX.Element;
970
971
 
972
+ type PhoneCodeValue = {
973
+ label: string;
974
+ value?: string;
975
+ };
971
976
  type PhoneInputProps = {
972
- preferredCountry?: {
973
- label: string;
974
- };
977
+ preferredCountry?: PhoneCodeValue;
975
978
  helperText?: any;
976
979
  label?: string;
977
980
  labelProps?: LabelProps;
978
981
  placeholder?: string;
979
982
  handleChange?: (value: string) => void;
980
983
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
981
- countryCodes?: {
982
- label: string;
983
- }[];
984
+ countryCodes?: PhoneCodeValue[];
984
985
  };
985
986
  declare const PhoneInput: FC<PhoneInputProps>;
986
987
 
@@ -1569,6 +1570,7 @@ type RegisterFormTextsTypes = ThirdPartyAuthTextsTypes & {
1569
1570
  fullName?: BaseInputType;
1570
1571
  email?: TextInputType;
1571
1572
  username?: UsernameInputType;
1573
+ phone?: TextInputType;
1572
1574
  password?: PasswordInputType;
1573
1575
  confirm?: ConfirmInputType;
1574
1576
  userReference?: BaseInputType;
@@ -1722,11 +1724,17 @@ type RegisterFormTypes = {
1722
1724
  direction?: DirectionType;
1723
1725
  /** Determines whether to display logos only or with text in the social media registration section. */
1724
1726
  logosOnly?: boolean;
1725
- /** Enables registration via Google when set to true. */
1727
+ /** Enables registration via Google when set to true.
1728
+ * @default false
1729
+ */
1726
1730
  viaGoogle?: boolean;
1727
- /** Enables registration via Github when set to true. */
1731
+ /** Enables registration via Github when set to true.
1732
+ * @default false
1733
+ */
1728
1734
  viaGithub?: boolean;
1729
- /** Enables registration via Twitter when set to true. */
1735
+ /** Enables registration via Twitter when set to true.
1736
+ * @default false
1737
+ */
1730
1738
  viaTwitter?: boolean;
1731
1739
  /** Determines whether to show the referral code field. */
1732
1740
  showRefCode?: boolean;
@@ -1748,16 +1756,14 @@ type RegisterFormTypes = {
1748
1756
  onTwitterRegister?: () => void;
1749
1757
  /** Callback function triggered to route to the Terms of Service page. */
1750
1758
  onRouteToTOS?: () => void;
1751
- /** Determines whether to show an error alert. */
1752
- showError?: boolean;
1753
1759
  /** Callback function triggered when the error alert is dismissed. */
1754
1760
  onErrorDismissed?: () => void;
1761
+ /** Determines whether to show an error alert. */
1762
+ showError?: boolean;
1755
1763
  /** Title for the error alert. */
1756
1764
  errorTitle?: any;
1757
1765
  /** Text for the error alert. */
1758
1766
  errorText?: any;
1759
- /** Array containing the fields to be included in the form. */
1760
- registerFields?: string[];
1761
1767
  /** Indicates whether the form submission is in progress. */
1762
1768
  isLoading?: boolean;
1763
1769
  /** If true, a loading spinner is displayed within the Google login button. */
@@ -1783,8 +1789,21 @@ type RegisterFormTypes = {
1783
1789
  };
1784
1790
  /** The minimum length of the password input field */
1785
1791
  minPasswordLength?: number;
1786
- /** If true, the form is displayed without a card container styling.*/
1792
+ /** If true, the form is displayed without a card container styling.
1793
+ * @default false
1794
+ */
1787
1795
  cardless?: boolean;
1796
+ /** Array containing the fields to be included in the form. */
1797
+ registerFields?: ("fullname" | "email" | "username" | "phone")[];
1798
+ /** To show the register form in a different type, either "email" or "phone"
1799
+ * @default "email"
1800
+ */
1801
+ registerTypes?: {
1802
+ label: string;
1803
+ value: string;
1804
+ }[];
1805
+ /** Props to pass to the PhoneInput component */
1806
+ phoneInputProps?: PhoneInputProps;
1788
1807
  };
1789
1808
  declare const RegisterForm: FC<RegisterFormTypes>;
1790
1809
 
@@ -1862,7 +1881,7 @@ declare const ResetPasswordForm: FC<ResetPasswordType>;
1862
1881
 
1863
1882
  type TConfirmation = {
1864
1883
  texts?: {
1865
- checkYourPhone?: string;
1884
+ checkYourIdentifier?: string;
1866
1885
  weSentCode?: string;
1867
1886
  didntGetCode?: string;
1868
1887
  resendCode?: string;
@@ -1876,7 +1895,7 @@ type TConfirmation = {
1876
1895
  showError?: any;
1877
1896
  errorTitle?: any;
1878
1897
  errorText?: any;
1879
- phoneNumber?: string;
1898
+ identifier?: string;
1880
1899
  confirmLoading?: boolean;
1881
1900
  onConfirm?: any;
1882
1901
  onResend?: any;
@@ -2324,4 +2343,4 @@ declare function useViewportSize(): {
2324
2343
  height: number;
2325
2344
  };
2326
2345
 
2327
- export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppCommand, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, AuthButtons, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, type BreadcrumbItemProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, type CommandInputProps, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, ContactForm, type ContentRect, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, FullCommand, type FullCommandItem, HorizontalPricing, type Hotkey, type HotkeyItem, type HotkeyItemOptions, Input, type InputFieldProps, InterfaceSettings, ItemCard, type KeyboardModifiers, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem$1 as NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuViewport, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, type PhoneInputProps, PhoneMockup, PinInput, PinInputGroup, PinInputRoot, PinInputSeperator, PinInputSlot, Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, StandardNavigationMenuItem, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, type ToasterToastProps, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, getHotkeyHandler, getHotkeyMatcher, navigationMenuTriggerStyle, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useViewportSize, useWindowEvent, useWindowSize };
2346
+ export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppCommand, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, AuthButtons, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, type BreadcrumbItemProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, type CommandInputProps, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, ContactForm, type ContentRect, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, FullCommand, type FullCommandItem, HorizontalPricing, type Hotkey, type HotkeyItem, type HotkeyItemOptions, Input, type InputFieldProps, InterfaceSettings, ItemCard, type KeyboardModifiers, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem$1 as NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuViewport, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, type PhoneCodeValue, PhoneInput, type PhoneInputProps, PhoneMockup, PinInput, PinInputGroup, PinInputRoot, PinInputSeperator, PinInputSlot, Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, StandardNavigationMenuItem, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, type ToasterToastProps, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, getHotkeyHandler, getHotkeyMatcher, navigationMenuTriggerStyle, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useViewportSize, useWindowEvent, useWindowSize };
package/dist/index.d.ts CHANGED
@@ -884,6 +884,7 @@ type SelectTypes = {
884
884
  hideHelperText?: boolean;
885
885
  options: SelectOptionProps[];
886
886
  labelKey?: string;
887
+ valueKey?: string;
887
888
  isCreatable?: boolean;
888
889
  isClearable?: boolean;
889
890
  isMulti?: boolean;
@@ -968,19 +969,19 @@ type BadgeTypes = {
968
969
  declare const Badge: FC<BadgeTypes>;
969
970
  declare const BadgedComponent: ({ children, className, hideBadge, position, size, text, }: any) => React__default.JSX.Element;
970
971
 
972
+ type PhoneCodeValue = {
973
+ label: string;
974
+ value?: string;
975
+ };
971
976
  type PhoneInputProps = {
972
- preferredCountry?: {
973
- label: string;
974
- };
977
+ preferredCountry?: PhoneCodeValue;
975
978
  helperText?: any;
976
979
  label?: string;
977
980
  labelProps?: LabelProps;
978
981
  placeholder?: string;
979
982
  handleChange?: (value: string) => void;
980
983
  inputProps?: React__default.InputHTMLAttributes<HTMLInputElement>;
981
- countryCodes?: {
982
- label: string;
983
- }[];
984
+ countryCodes?: PhoneCodeValue[];
984
985
  };
985
986
  declare const PhoneInput: FC<PhoneInputProps>;
986
987
 
@@ -1569,6 +1570,7 @@ type RegisterFormTextsTypes = ThirdPartyAuthTextsTypes & {
1569
1570
  fullName?: BaseInputType;
1570
1571
  email?: TextInputType;
1571
1572
  username?: UsernameInputType;
1573
+ phone?: TextInputType;
1572
1574
  password?: PasswordInputType;
1573
1575
  confirm?: ConfirmInputType;
1574
1576
  userReference?: BaseInputType;
@@ -1722,11 +1724,17 @@ type RegisterFormTypes = {
1722
1724
  direction?: DirectionType;
1723
1725
  /** Determines whether to display logos only or with text in the social media registration section. */
1724
1726
  logosOnly?: boolean;
1725
- /** Enables registration via Google when set to true. */
1727
+ /** Enables registration via Google when set to true.
1728
+ * @default false
1729
+ */
1726
1730
  viaGoogle?: boolean;
1727
- /** Enables registration via Github when set to true. */
1731
+ /** Enables registration via Github when set to true.
1732
+ * @default false
1733
+ */
1728
1734
  viaGithub?: boolean;
1729
- /** Enables registration via Twitter when set to true. */
1735
+ /** Enables registration via Twitter when set to true.
1736
+ * @default false
1737
+ */
1730
1738
  viaTwitter?: boolean;
1731
1739
  /** Determines whether to show the referral code field. */
1732
1740
  showRefCode?: boolean;
@@ -1748,16 +1756,14 @@ type RegisterFormTypes = {
1748
1756
  onTwitterRegister?: () => void;
1749
1757
  /** Callback function triggered to route to the Terms of Service page. */
1750
1758
  onRouteToTOS?: () => void;
1751
- /** Determines whether to show an error alert. */
1752
- showError?: boolean;
1753
1759
  /** Callback function triggered when the error alert is dismissed. */
1754
1760
  onErrorDismissed?: () => void;
1761
+ /** Determines whether to show an error alert. */
1762
+ showError?: boolean;
1755
1763
  /** Title for the error alert. */
1756
1764
  errorTitle?: any;
1757
1765
  /** Text for the error alert. */
1758
1766
  errorText?: any;
1759
- /** Array containing the fields to be included in the form. */
1760
- registerFields?: string[];
1761
1767
  /** Indicates whether the form submission is in progress. */
1762
1768
  isLoading?: boolean;
1763
1769
  /** If true, a loading spinner is displayed within the Google login button. */
@@ -1783,8 +1789,21 @@ type RegisterFormTypes = {
1783
1789
  };
1784
1790
  /** The minimum length of the password input field */
1785
1791
  minPasswordLength?: number;
1786
- /** If true, the form is displayed without a card container styling.*/
1792
+ /** If true, the form is displayed without a card container styling.
1793
+ * @default false
1794
+ */
1787
1795
  cardless?: boolean;
1796
+ /** Array containing the fields to be included in the form. */
1797
+ registerFields?: ("fullname" | "email" | "username" | "phone")[];
1798
+ /** To show the register form in a different type, either "email" or "phone"
1799
+ * @default "email"
1800
+ */
1801
+ registerTypes?: {
1802
+ label: string;
1803
+ value: string;
1804
+ }[];
1805
+ /** Props to pass to the PhoneInput component */
1806
+ phoneInputProps?: PhoneInputProps;
1788
1807
  };
1789
1808
  declare const RegisterForm: FC<RegisterFormTypes>;
1790
1809
 
@@ -1862,7 +1881,7 @@ declare const ResetPasswordForm: FC<ResetPasswordType>;
1862
1881
 
1863
1882
  type TConfirmation = {
1864
1883
  texts?: {
1865
- checkYourPhone?: string;
1884
+ checkYourIdentifier?: string;
1866
1885
  weSentCode?: string;
1867
1886
  didntGetCode?: string;
1868
1887
  resendCode?: string;
@@ -1876,7 +1895,7 @@ type TConfirmation = {
1876
1895
  showError?: any;
1877
1896
  errorTitle?: any;
1878
1897
  errorText?: any;
1879
- phoneNumber?: string;
1898
+ identifier?: string;
1880
1899
  confirmLoading?: boolean;
1881
1900
  onConfirm?: any;
1882
1901
  onResend?: any;
@@ -2324,4 +2343,4 @@ declare function useViewportSize(): {
2324
2343
  height: number;
2325
2344
  };
2326
2345
 
2327
- export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppCommand, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, AuthButtons, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, type BreadcrumbItemProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, type CommandInputProps, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, ContactForm, type ContentRect, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, FullCommand, type FullCommandItem, HorizontalPricing, type Hotkey, type HotkeyItem, type HotkeyItemOptions, Input, type InputFieldProps, InterfaceSettings, ItemCard, type KeyboardModifiers, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem$1 as NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuViewport, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, PhoneInput, type PhoneInputProps, PhoneMockup, PinInput, PinInputGroup, PinInputRoot, PinInputSeperator, PinInputSlot, Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, StandardNavigationMenuItem, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, type ToasterToastProps, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, getHotkeyHandler, getHotkeyMatcher, navigationMenuTriggerStyle, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useViewportSize, useWindowEvent, useWindowSize };
2346
+ export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionRoot, AccordionTrigger, ActionCard, AdCard, Alert, Announcement, AppCommand, AppLanding, AppLayout, type AppSidebarItemProps, AppStores, AppTabs, AppTopbar, AuthButtons, Avatar, BackToTop, Badge, BadgedComponent, Breadcrumb, type BreadcrumbItemProps, Button, type ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CheckEmail, Checkbox, Chip, type ChipColors, type ChipTypes, CodeBlock, CodeConfirmation, ColorPicker, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, type CommandInputProps, CommandItem, CommandList, CommandSeparator, CommandShortcut, ComparingPlans, ContactForm, type ContentRect, Copyrights, Count, DataTable, DestroyableCard, Dialog, DialogBody, DialogCarousel, DialogCarouselContent, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogStep, DialogSteps, DialogTitle, DialogTrigger, DocsLayout, DocsSidebar, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadio, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FeedbackEmoji, FeedbackForm, FeedbackRating, FileDropzone, FileUploader, FullCommand, type FullCommandItem, HorizontalPricing, type Hotkey, type HotkeyItem, type HotkeyItemOptions, Input, type InputFieldProps, InterfaceSettings, ItemCard, type KeyboardModifiers, Label, type LabelProps, LandingCard, LeadGenerator, LegalTexts, Loading, LoginForm, Logos, type MenuItemType, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Navbar, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem$1 as NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuRoot, NavigationMenuTrigger, NavigationMenuViewport, NewPasswordForm, NoPermission, NotFound, Pagination, PasswordInput, PasswordStrengthIndicator, type PhoneCodeValue, PhoneInput, type PhoneInputProps, PhoneMockup, PinInput, PinInputGroup, PinInputRoot, PinInputSeperator, PinInputSlot, Popover, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, PricingCard, PricingPlans, Progress, ProgressCircle, Radio, type RadioOptionsTypes, RegisterForm, ResetPasswordForm, ScrollArea, ScrollBar, ScrollIndicator, Select, type SelectOptionProps, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarGroup, SidebarItem, SimpleTable, Skeleton, Slider, SortButton, StandardNavigationMenuItem, Stats, StopPropagationWrapper, type SubItem$1 as SubItem, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Testimonial, Textarea, type TextareaProps, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport, Toaster, type ToasterToastProps, Tooltip, Usage, type UseFocusWithinOptions, type UseMediaQueryOptions, UserReferralSource, buttonVariants, getHotkeyHandler, getHotkeyMatcher, navigationMenuTriggerStyle, parseHotkey, reducer, toast, useBreakpoint, useClickOutside, useClipboard, useDialogCarousel, useFocusWithin, useIsomorphicEffect, useMeasureDirty, useMediaQuery, useMultiStepDialog, useShortcuts, useTabs, useToast, useViewportSize, useWindowEvent, useWindowSize };