@worldcoin/mini-apps-ui-kit-react 1.0.0-canary.21 → 1.0.0-canary.23

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 (57) hide show
  1. package/README.md +4 -35
  2. package/dist/components/Button/Button.js +6 -4
  3. package/dist/components/Checkbox/Checkbox.js +2 -1
  4. package/dist/components/Chip/Chip.d.ts +1 -1
  5. package/dist/components/CircularState/CircularState.d.ts +8 -0
  6. package/dist/components/CircularState/CircularState.js +41 -0
  7. package/dist/components/CircularState/index.d.ts +2 -0
  8. package/dist/components/ClearButton/ClearButton.js +2 -0
  9. package/dist/components/ColorPicker/ColorPicker.js +2 -1
  10. package/dist/components/CountryDrawer/CountryDrawer.js +3 -1
  11. package/dist/components/Flag/constants.d.ts +22 -0
  12. package/dist/components/Flag/constants.js +234 -1
  13. package/dist/components/Icons/Clock.d.ts +2 -0
  14. package/dist/components/Icons/Clock.js +30 -0
  15. package/dist/components/Icons/Warning.d.ts +2 -0
  16. package/dist/components/Icons/Warning.js +26 -0
  17. package/dist/components/LiveFeedback/LiveFeedback.js +18 -0
  18. package/dist/components/NumberPad/Delete.js +1 -0
  19. package/dist/components/NumberPad/NumberPad.js +5 -3
  20. package/dist/components/OTPField/OTPField.js +3 -1
  21. package/dist/components/PasteButton/PasteButton.js +2 -0
  22. package/dist/components/PhoneField/GroupedCountryList.js +2 -1
  23. package/dist/components/PhoneField/constants.d.ts +0 -2
  24. package/dist/components/PhoneField/constants.js +1 -25
  25. package/dist/components/PhoneField/utils.js +4 -4
  26. package/dist/components/Progress/Progress.js +1 -1
  27. package/dist/components/RadioGroup/RadioGroup.js +2 -1
  28. package/dist/components/Select/Select.js +3 -2
  29. package/dist/components/Switch/Switch.js +2 -1
  30. package/dist/components/Tabs/Tabs.js +3 -1
  31. package/dist/components/Toast/use-toast.d.ts +2 -10
  32. package/dist/components/Toast/use-toast.js +9 -2
  33. package/dist/components/ToggleGroup/ToggleGroup.js +10 -1
  34. package/dist/components/Token/icons/doge.d.ts +3 -0
  35. package/dist/components/Token/icons/doge.js +29 -0
  36. package/dist/components/Token/icons/index.d.ts +5 -0
  37. package/dist/components/Token/icons/index.js +11 -1
  38. package/dist/components/Token/icons/link.d.ts +3 -0
  39. package/dist/components/Token/icons/link.js +27 -0
  40. package/dist/components/Token/icons/sol.d.ts +3 -0
  41. package/dist/components/Token/icons/sol.js +93 -0
  42. package/dist/components/Token/icons/sui.d.ts +3 -0
  43. package/dist/components/Token/icons/sui.js +29 -0
  44. package/dist/components/Token/icons/xrp.d.ts +3 -0
  45. package/dist/components/Token/icons/xrp.js +34 -0
  46. package/dist/index.d.ts +1 -0
  47. package/dist/index.js +2 -0
  48. package/dist/lib/haptics.d.ts +28 -0
  49. package/dist/lib/haptics.js +45 -0
  50. package/dist/node_modules/.pnpm/@radix-ui_react-compose-refs@1.1.2_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-compose-refs/dist/index.js +35 -0
  51. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18_ecf5vqfgocrxupsewlhf3pl374/node_modules/@radix-ui/react-primitive/dist/index.js +38 -0
  52. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.2.0_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +88 -0
  53. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.1.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types_re_cidkwodbmpmiwtvvmizcw56fem/node_modules/@radix-ui/react-visually-hidden/dist/index.js +33 -0
  54. package/package.json +19 -13
  55. package/public/flags/EU.svg +49 -49
  56. package/public/globals.css +2 -2
  57. package/dist/node_modules/.pnpm/countries-list@3.1.1/node_modules/countries-list/mjs/index.js +0 -10
package/README.md CHANGED
@@ -57,21 +57,12 @@ export default tseslint.config({
57
57
  });
58
58
  ```
59
59
 
60
- ## Font Configuration
60
+ ## Font
61
61
 
62
62
  The library uses the following font **[TWK Lausanne](https://weltkern.com/typefaces/lausanne)** as the sans-serif font for all text `(--font-sans)`.
63
63
 
64
64
  > **⚠️ License Notice**: TWK Lausanne is a commercial font that requires a license. Make sure you have obtained the appropriate license from [Weltkern](https://weltkern.com/typefaces/lausanne) before using it in your project.
65
65
 
66
- By default, the library sets `--font-sans` to **TWK Lausanne**, but you can override this CSS variable to use any other font of your choice:
67
-
68
- ```css
69
- :root {
70
- --font-sans: 'Your Font Name', sans-serif;
71
- }
72
- ```
73
-
74
- You must import the font in your application before using it. The library does not include the font files - you need to handle the font loading yourself according to your license agreement.
75
66
 
76
67
  ## Importing Styles
77
68
 
@@ -81,33 +72,11 @@ To use the UI Kit components with their proper styling, you need to import the s
81
72
  import "@worldcoin/mini-apps-ui-kit-react/styles.css";
82
73
  ```
83
74
 
84
- ## Import Methods
85
-
86
- The library supports two different import methods:
87
-
88
- ### Default Import
89
-
90
- Import components from the main entry point:
91
-
92
- ```typescript
93
- import { Button } from "@worldcoin/mini-apps-ui-kit-react";
94
- ```
95
-
96
- This method is simpler but includes all components in your bundle, even if you're not using them.
97
-
98
- ### Component-Level Import
99
-
100
- Import components directly from their individual modules:
101
-
102
- ```typescript
103
- import { Button } from "@worldcoin/mini-apps-ui-kit-react/Button";
104
- ```
105
-
106
- This method enables tree-shaking and reduces your final bundle size by only including the components you actually use. Recommended for production applications where bundle size is a concern.
107
-
108
75
  ## Icons
109
76
 
110
- The library uses [Iconoir](https://iconoir.com/) for its icon system. To use icons in your project, you'll need to install the [React package](https://www.npmjs.com/package/iconoir-react):
77
+ The library uses a custom set of icons built on top of [Iconoir](https://iconoir.com/). While we provide our own custom set, we highly recommend using Iconoir directly for your miniapps as it offers a comprehensive and well-maintained icon system.
78
+
79
+ To use Iconoir in your project, you'll need to install the [React package](https://www.npmjs.com/package/iconoir-react):
111
80
 
112
81
  ```bash
113
82
  npm install iconoir-react
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
+ import haptics, { withHaptics } from "../../lib/haptics.js";
3
4
  import { cn } from "../../lib/utils.js";
4
5
  import { Slot } from "../../node_modules/.pnpm/@radix-ui_react-slot@1.1.1_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js";
5
6
  import { cva } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
@@ -10,9 +11,9 @@ const buttonVariants = cva(
10
11
  {
11
12
  variants: {
12
13
  variant: {
13
- primary: "bg-gray-900 text-gray-0 hover:bg-gray-700 disabled:bg-gray-100 disabled:text-gray-300",
14
- secondary: "bg-transparent text-gray-900 border border-gray-200 hover:bg-gray-50 disabled:text-gray-300 disabled:border-gray-100",
15
- tertiary: "bg-gray-100 text-gray-900 hover:bg-gray-200 disabled:text-gray-300 disabled:bg-gray-50"
14
+ primary: "bg-gray-900 text-gray-0 disabled:bg-gray-100 disabled:text-gray-300",
15
+ secondary: "bg-transparent text-gray-900 border border-gray-200 disabled:text-gray-300 disabled:border-gray-100",
16
+ tertiary: "bg-gray-100 text-gray-900 disabled:text-gray-300 disabled:bg-gray-50"
16
17
  },
17
18
  size: {
18
19
  sm: "h-10 min-w-10 px-4",
@@ -32,7 +33,7 @@ const buttonVariants = cva(
32
33
  }
33
34
  );
34
35
  const Button = forwardRef(
35
- ({ variant = "primary", size = "lg", fullWidth, asChild, children, ...props }, ref) => {
36
+ ({ variant = "primary", size = "lg", fullWidth, asChild, onClick, children, ...props }, ref) => {
36
37
  const Comp = asChild ? Slot : "button";
37
38
  return /* @__PURE__ */ jsx(
38
39
  Comp,
@@ -51,6 +52,7 @@ const Button = forwardRef(
51
52
  }),
52
53
  props.className
53
54
  ),
55
+ onClick: withHaptics(onClick, () => haptics.impact("light")),
54
56
  children
55
57
  }
56
58
  );
@@ -1,4 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { withHaptics } from "../../lib/haptics.js";
2
3
  import { Root, Indicator } from "../../node_modules/.pnpm/@radix-ui_react-checkbox@1.1.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18._5vtvszwgvdmnkk62ia2dob365m/node_modules/@radix-ui/react-checkbox/dist/index.js";
3
4
  import { forwardRef } from "react";
4
5
  import { Tick } from "../Icons/Tick.js";
@@ -9,7 +10,7 @@ const Checkbox = forwardRef(
9
10
  {
10
11
  ref,
11
12
  checked,
12
- onCheckedChange,
13
+ onCheckedChange: withHaptics(onCheckedChange),
13
14
  disabled,
14
15
  className: "flex size-6 items-center justify-center rounded-md border-[0.09375rem] transition-all data-[state=checked]:border-gray-900 data-[state=checked]:bg-gray-900 data-[state=unchecked]:border-gray-200 data-[state=unchecked]:bg-transparent disabled:cursor-not-allowed disabled:opacity-20",
15
16
  ...props,
@@ -20,7 +20,7 @@ interface ChipProps extends HTMLAttributes<HTMLDivElement> {
20
20
  className?: string;
21
21
  }
22
22
  declare const Chip: import('react').ForwardRefExoticComponent<ChipProps & VariantProps<(props?: ({
23
- variant?: "error" | "default" | "success" | "warning" | "important" | null | undefined;
23
+ variant?: "success" | "warning" | "error" | "default" | "important" | null | undefined;
24
24
  isIcon?: boolean | null | undefined;
25
25
  } & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('react').RefAttributes<HTMLDivElement>>;
26
26
  export { Chip };
@@ -0,0 +1,8 @@
1
+ import { CircularIconProps } from '../CircularIcon/CircularIcon';
2
+ interface CircularStateProps extends Omit<CircularIconProps, "children"> {
3
+ /** The state to display in the circular icon. */
4
+ value: "success" | "error" | "warning" | "pending" | "critical";
5
+ }
6
+ declare function CircularState({ value, size, className, ...props }: CircularStateProps): import("react/jsx-runtime").JSX.Element;
7
+ export { CircularState };
8
+ export type { CircularStateProps };
@@ -0,0 +1,41 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/utils.js";
3
+ import { CircularIcon } from "../CircularIcon/CircularIcon.js";
4
+ import { Clock } from "../Icons/Clock.js";
5
+ import { Tick } from "../Icons/Tick.js";
6
+ import { Warning } from "../Icons/Warning.js";
7
+ import { XMark } from "../Icons/XMark.js";
8
+ const icon = {
9
+ success: /* @__PURE__ */ jsx(Tick, {}),
10
+ error: /* @__PURE__ */ jsx(XMark, {}),
11
+ warning: /* @__PURE__ */ jsx(Warning, {}),
12
+ pending: /* @__PURE__ */ jsx(Clock, {}),
13
+ critical: /* @__PURE__ */ jsx(XMark, {})
14
+ };
15
+ const iconClasses = {
16
+ success: "bg-success-600",
17
+ error: "bg-gray-400",
18
+ warning: "bg-warning-600",
19
+ pending: "bg-gray-400",
20
+ critical: "bg-error-600"
21
+ };
22
+ function CircularState({ value, size, className, ...props }) {
23
+ return /* @__PURE__ */ jsx(
24
+ CircularIcon,
25
+ {
26
+ className: cn(
27
+ "text-gray-0",
28
+ size !== "xs" && "shadow-[inset_0_0_0_1px_rgba(255,255,255,0.3)]",
29
+ iconClasses[value],
30
+ "bg-[radial-gradient(111.32%_111.8%_at_22.73%_0%,_rgba(255,255,255,0.2)_0%,_rgba(255,255,255,0)_100%)]",
31
+ className
32
+ ),
33
+ size,
34
+ ...props,
35
+ children: icon[value]
36
+ }
37
+ );
38
+ }
39
+ export {
40
+ CircularState
41
+ };
@@ -0,0 +1,2 @@
1
+ export { CircularState } from './CircularState';
2
+ export type { CircularStateProps } from './CircularState';
@@ -1,4 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import haptics from "../../lib/haptics.js";
2
3
  import * as React from "react";
3
4
  import { cn } from "../../lib/utils.js";
4
5
  import { Clear } from "./Clear.js";
@@ -10,6 +11,7 @@ const ClearButton = React.forwardRef(
10
11
  if (inputRef && "current" in inputRef && inputRef.current) {
11
12
  inputRef.current.value = "";
12
13
  onClear == null ? void 0 : onClear();
14
+ haptics.impact("light");
13
15
  }
14
16
  };
15
17
  return /* @__PURE__ */ jsx(
@@ -1,4 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { withHaptics } from "../../lib/haptics.js";
2
3
  import { Item as Item2, Indicator, Root as Root2 } from "../../node_modules/.pnpm/@radix-ui_react-radio-group@1.2.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@_2u6lfd2xt65wmbxn7lgvaxqbmy/node_modules/@radix-ui/react-radio-group/dist/index.js";
3
4
  import { forwardRef } from "react";
4
5
  const ColorPickerItem = forwardRef(
@@ -25,7 +26,7 @@ const ColorPickerGroup = forwardRef(
25
26
  {
26
27
  ref,
27
28
  value,
28
- onValueChange: onChange,
29
+ onValueChange: withHaptics(onChange),
29
30
  className: "flex gap-4 items-center",
30
31
  ...props,
31
32
  children
@@ -1,11 +1,12 @@
1
1
  "use client";
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
+ import { VisuallyHidden } from "../../node_modules/.pnpm/@radix-ui_react-visually-hidden@1.1.3_@types_react-dom@18.3.5_@types_react@18.3.18__@types_re_cidkwodbmpmiwtvvmizcw56fem/node_modules/@radix-ui/react-visually-hidden/dist/index.js";
3
4
  import { useState, useRef } from "react";
4
5
  import { XMark } from "../Icons/XMark.js";
5
6
  import { GroupedCountryList } from "../PhoneField/GroupedCountryList.js";
6
7
  import { useCountryFiltering } from "./useCountryFiltering.js";
7
8
  import { useCountryGrouping } from "./useCountryGrouping.js";
8
- import { Drawer, DrawerTrigger, DrawerContent, DrawerClose } from "../Drawer/Drawer.js";
9
+ import { Drawer, DrawerTrigger, DrawerContent, DrawerTitle, DrawerClose } from "../Drawer/Drawer.js";
9
10
  import { TopBar } from "../TopBar/TopBar.js";
10
11
  import { Button } from "../Button/Button.js";
11
12
  import { SearchField } from "../SearchField/SearchField.js";
@@ -42,6 +43,7 @@ function CountryDrawer({
42
43
  return /* @__PURE__ */ jsxs(Drawer, { open, onOpenChange: setOpen, onAnimationEnd, height: "full", children: [
43
44
  /* @__PURE__ */ jsx(DrawerTrigger, { asChild: true, className: "outline-none", disabled, children }),
44
45
  /* @__PURE__ */ jsxs(DrawerContent, { children: [
46
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(DrawerTitle, { children: title }) }),
45
47
  /* @__PURE__ */ jsx(
46
48
  TopBar,
47
49
  {
@@ -1 +1,23 @@
1
+ /**
2
+ * Unsupported countries:
3
+ * - Antarctica (AQ)
4
+ * - Bouvet Island (BV)
5
+ * - Christmas Island (CX)
6
+ * - Western Sahara (EH)
7
+ * - French Guiana (GF)
8
+ * - South Georgia and the South Sandwich Islands (GS)
9
+ * - Heard Island and McDonald Islands (HM)
10
+ * - Saint Kitts and Nevis (KN)
11
+ * - Saint Martin (MF)
12
+ * - New Caledonia (NC)
13
+ * - Saint Pierre and Miquelon (PM)
14
+ * - Reunion (RE)
15
+ * - Saint Helena (SH)
16
+ * - Svalbard and Jan Mayen (SJ)
17
+ * - French Southern Territories (TF)
18
+ * - U.S. Minor Outlying Islands (UM)
19
+ * - U.S. Virgin Islands (VI)
20
+ * - Wallis and Futuna (WF)
21
+ * - Mayotte (YT)
22
+ */
1
23
  export declare const countryCodes: readonly ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ER", "ES", "ET", "EU", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VN", "VU", "WS", "XK", "YE", "ZA", "ZM", "ZW"];
@@ -1,4 +1,237 @@
1
- const countryCodes = ["AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AR", "AS", "AT", "AU", "AW", "AX", "AZ", "BA", "BB", "BD", "BE", "BF", "BG", "BH", "BI", "BJ", "BL", "BM", "BN", "BO", "BQ", "BR", "BS", "BT", "BW", "BY", "BZ", "CA", "CC", "CD", "CF", "CG", "CH", "CI", "CK", "CL", "CM", "CN", "CO", "CR", "CU", "CV", "CW", "CY", "CZ", "DE", "DJ", "DK", "DM", "DO", "DZ", "EC", "EE", "EG", "ER", "ES", "ET", "EU", "FI", "FJ", "FK", "FM", "FO", "FR", "GA", "GB", "GD", "GE", "GG", "GH", "GI", "GL", "GM", "GN", "GP", "GQ", "GR", "GT", "GU", "GW", "GY", "HK", "HN", "HR", "HT", "HU", "ID", "IE", "IL", "IM", "IN", "IO", "IQ", "IR", "IS", "IT", "JE", "JM", "JO", "JP", "KE", "KG", "KH", "KI", "KM", "KP", "KR", "KW", "KY", "KZ", "LA", "LB", "LC", "LI", "LK", "LR", "LS", "LT", "LU", "LV", "LY", "MA", "MC", "MD", "ME", "MG", "MH", "MK", "ML", "MM", "MN", "MO", "MP", "MQ", "MR", "MS", "MT", "MU", "MV", "MW", "MX", "MY", "MZ", "NA", "NE", "NF", "NG", "NI", "NL", "NO", "NP", "NR", "NU", "NZ", "OM", "PA", "PE", "PF", "PG", "PH", "PK", "PL", "PN", "PR", "PS", "PT", "PW", "PY", "QA", "RO", "RS", "RU", "RW", "SA", "SB", "SC", "SD", "SE", "SG", "SI", "SK", "SL", "SM", "SN", "SO", "SR", "SS", "ST", "SV", "SX", "SY", "SZ", "TC", "TD", "TG", "TH", "TJ", "TK", "TL", "TM", "TN", "TO", "TR", "TT", "TV", "TW", "TZ", "UA", "UG", "US", "UY", "UZ", "VA", "VC", "VE", "VG", "VN", "VU", "WS", "XK", "YE", "ZA", "ZM", "ZW"];
1
+ const countryCodes = [
2
+ "AD",
3
+ "AE",
4
+ "AF",
5
+ "AG",
6
+ "AI",
7
+ "AL",
8
+ "AM",
9
+ "AO",
10
+ "AR",
11
+ "AS",
12
+ "AT",
13
+ "AU",
14
+ "AW",
15
+ "AX",
16
+ "AZ",
17
+ "BA",
18
+ "BB",
19
+ "BD",
20
+ "BE",
21
+ "BF",
22
+ "BG",
23
+ "BH",
24
+ "BI",
25
+ "BJ",
26
+ "BL",
27
+ "BM",
28
+ "BN",
29
+ "BO",
30
+ "BQ",
31
+ "BR",
32
+ "BS",
33
+ "BT",
34
+ "BW",
35
+ "BY",
36
+ "BZ",
37
+ "CA",
38
+ "CC",
39
+ "CD",
40
+ "CF",
41
+ "CG",
42
+ "CH",
43
+ "CI",
44
+ "CK",
45
+ "CL",
46
+ "CM",
47
+ "CN",
48
+ "CO",
49
+ "CR",
50
+ "CU",
51
+ "CV",
52
+ "CW",
53
+ "CY",
54
+ "CZ",
55
+ "DE",
56
+ "DJ",
57
+ "DK",
58
+ "DM",
59
+ "DO",
60
+ "DZ",
61
+ "EC",
62
+ "EE",
63
+ "EG",
64
+ "ER",
65
+ "ES",
66
+ "ET",
67
+ "EU",
68
+ "FI",
69
+ "FJ",
70
+ "FK",
71
+ "FM",
72
+ "FO",
73
+ "FR",
74
+ "GA",
75
+ "GB",
76
+ "GD",
77
+ "GE",
78
+ "GG",
79
+ "GH",
80
+ "GI",
81
+ "GL",
82
+ "GM",
83
+ "GN",
84
+ "GP",
85
+ "GQ",
86
+ "GR",
87
+ "GT",
88
+ "GU",
89
+ "GW",
90
+ "GY",
91
+ "HK",
92
+ "HN",
93
+ "HR",
94
+ "HT",
95
+ "HU",
96
+ "ID",
97
+ "IE",
98
+ "IL",
99
+ "IM",
100
+ "IN",
101
+ "IO",
102
+ "IQ",
103
+ "IR",
104
+ "IS",
105
+ "IT",
106
+ "JE",
107
+ "JM",
108
+ "JO",
109
+ "JP",
110
+ "KE",
111
+ "KG",
112
+ "KH",
113
+ "KI",
114
+ "KM",
115
+ "KP",
116
+ "KR",
117
+ "KW",
118
+ "KY",
119
+ "KZ",
120
+ "LA",
121
+ "LB",
122
+ "LC",
123
+ "LI",
124
+ "LK",
125
+ "LR",
126
+ "LS",
127
+ "LT",
128
+ "LU",
129
+ "LV",
130
+ "LY",
131
+ "MA",
132
+ "MC",
133
+ "MD",
134
+ "ME",
135
+ "MG",
136
+ "MH",
137
+ "MK",
138
+ "ML",
139
+ "MM",
140
+ "MN",
141
+ "MO",
142
+ "MP",
143
+ "MQ",
144
+ "MR",
145
+ "MS",
146
+ "MT",
147
+ "MU",
148
+ "MV",
149
+ "MW",
150
+ "MX",
151
+ "MY",
152
+ "MZ",
153
+ "NA",
154
+ "NE",
155
+ "NF",
156
+ "NG",
157
+ "NI",
158
+ "NL",
159
+ "NO",
160
+ "NP",
161
+ "NR",
162
+ "NU",
163
+ "NZ",
164
+ "OM",
165
+ "PA",
166
+ "PE",
167
+ "PF",
168
+ "PG",
169
+ "PH",
170
+ "PK",
171
+ "PL",
172
+ "PN",
173
+ "PR",
174
+ "PS",
175
+ "PT",
176
+ "PW",
177
+ "PY",
178
+ "QA",
179
+ "RO",
180
+ "RS",
181
+ "RU",
182
+ "RW",
183
+ "SA",
184
+ "SB",
185
+ "SC",
186
+ "SD",
187
+ "SE",
188
+ "SG",
189
+ "SI",
190
+ "SK",
191
+ "SL",
192
+ "SM",
193
+ "SN",
194
+ "SO",
195
+ "SR",
196
+ "SS",
197
+ "ST",
198
+ "SV",
199
+ "SX",
200
+ "SY",
201
+ "SZ",
202
+ "TC",
203
+ "TD",
204
+ "TG",
205
+ "TH",
206
+ "TJ",
207
+ "TK",
208
+ "TL",
209
+ "TM",
210
+ "TN",
211
+ "TO",
212
+ "TR",
213
+ "TT",
214
+ "TV",
215
+ "TW",
216
+ "TZ",
217
+ "UA",
218
+ "UG",
219
+ "US",
220
+ "UY",
221
+ "UZ",
222
+ "VA",
223
+ "VC",
224
+ "VE",
225
+ "VG",
226
+ "VN",
227
+ "VU",
228
+ "WS",
229
+ "XK",
230
+ "YE",
231
+ "ZA",
232
+ "ZM",
233
+ "ZW"
234
+ ];
2
235
  export {
3
236
  countryCodes
4
237
  };
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare function Clock(props: HTMLAttributes<SVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,30 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ function Clock(props) {
3
+ return /* @__PURE__ */ jsxs(
4
+ "svg",
5
+ {
6
+ width: "48",
7
+ height: "48",
8
+ viewBox: "0 0 48 48",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ...props,
12
+ children: [
13
+ /* @__PURE__ */ jsx("path", { d: "M24 12L24 24L36 24", stroke: "white", strokeWidth: "3" }),
14
+ /* @__PURE__ */ jsx(
15
+ "path",
16
+ {
17
+ d: "M24 44C35.0457 44 44 35.0457 44 24C44 12.9543 35.0457 4 24 4C12.9543 4 4 12.9543 4 24C4 35.0457 12.9543 44 24 44Z",
18
+ stroke: "white",
19
+ strokeWidth: "3",
20
+ strokeLinecap: "round",
21
+ strokeLinejoin: "round"
22
+ }
23
+ )
24
+ ]
25
+ }
26
+ );
27
+ }
28
+ export {
29
+ Clock
30
+ };
@@ -0,0 +1,2 @@
1
+ import { HTMLAttributes } from 'react';
2
+ export declare function Warning(props: HTMLAttributes<SVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ function Warning(props) {
3
+ return /* @__PURE__ */ jsx(
4
+ "svg",
5
+ {
6
+ width: "44",
7
+ height: "44",
8
+ viewBox: "0 0 44 44",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ ...props,
12
+ children: /* @__PURE__ */ jsx(
13
+ "path",
14
+ {
15
+ fillRule: "evenodd",
16
+ clipRule: "evenodd",
17
+ d: "M22 0.835449L42.6702 38.0417H1.32983L22 0.835449ZM23.375 15.125V25.2083H20.625V15.125H23.375ZM20.6213 32.5505L23.3987 32.5499L23.3981 29.7999L20.6207 29.8005L20.6213 32.5505Z",
18
+ fill: "white"
19
+ }
20
+ )
21
+ }
22
+ );
23
+ }
24
+ export {
25
+ Warning
26
+ };
@@ -1,10 +1,28 @@
1
+ "use client";
1
2
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
3
+ import haptics from "../../lib/haptics.js";
2
4
  import { cn } from "../../lib/utils.js";
5
+ import { useRef, useEffect } from "react";
3
6
  import { Fail } from "../Icons/Fail.js";
4
7
  import { Success } from "../Icons/Success.js";
5
8
  import { Spinner } from "../Spinner/Spinner.js";
6
9
  import { Typography } from "../Typography/Typography.js";
10
+ function usePrevious(value) {
11
+ const ref = useRef();
12
+ useEffect(() => {
13
+ ref.current = value;
14
+ });
15
+ return ref.current;
16
+ }
7
17
  function LiveFeedback({ state, children, className, label }) {
18
+ const prevState = usePrevious(state);
19
+ if (state !== prevState) {
20
+ if (state === "success") {
21
+ haptics.notification("success");
22
+ } else if (state === "failed") {
23
+ haptics.notification("error");
24
+ }
25
+ }
8
26
  return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
9
27
  /* @__PURE__ */ jsx(
10
28
  "div",
@@ -8,6 +8,7 @@ function Delete(props) {
8
8
  viewBox: "0 0 24 24",
9
9
  fill: "none",
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
+ "data-testid": "delete-icon",
11
12
  ...props,
12
13
  children: /* @__PURE__ */ jsx(
13
14
  "path",
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
+ import haptics from "../../lib/haptics.js";
3
4
  import { cn } from "../../lib/utils.js";
4
5
  import { useLongPress } from "../../node_modules/.pnpm/@uidotdev_usehooks@2.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@uidotdev/usehooks/index.js";
5
6
  import { typographyVariants } from "../Typography/Typography.js";
@@ -32,6 +33,7 @@ const NumberPad = ({
32
33
  console.error("NumberPad value must be a valid number or empty string");
33
34
  }
34
35
  const handleButtonClick = (buttonValue) => {
36
+ haptics.impact("light");
35
37
  if (!onChange || disabled) return;
36
38
  if (buttonValue === "del") {
37
39
  onChange(value.slice(0, -1));
@@ -53,11 +55,11 @@ const NumberPad = ({
53
55
  disabled,
54
56
  className: cn(
55
57
  typographyVariants({ variant: "heading", level: 3 }),
56
- "h-12 min-w-28 flex items-center justify-center select-none group",
57
- "disabled:text-gray-300 disabled:cursor-not-allowed disabled:active:bg-transparent"
58
+ "h-12 min-w-28 flex items-center justify-center select-none",
59
+ "disabled:text-gray-300 disabled:cursor-not-allowed"
58
60
  ),
59
61
  ...button.value === "del" ? longPressAttributes : {},
60
- children: /* @__PURE__ */ jsx("span", { className: "duration-200 transition-colors size-12 flex items-center justify-center rounded-full group-active:bg-gray-50", children: button.label || button.value })
62
+ children: /* @__PURE__ */ jsx("span", { className: "duration-200 transition-colors size-12 flex items-center justify-center rounded-full", children: button.label || button.value })
61
63
  },
62
64
  button.value
63
65
  )) });
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { jsx, Fragment } from "react/jsx-runtime";
3
+ import { withHaptics } from "../../lib/haptics.js";
3
4
  import { cn } from "../../lib/utils.js";
4
5
  import { cva } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
5
6
  import { OTPInput as Lt, REGEXP_ONLY_DIGITS as Kt, REGEXP_ONLY_CHARS as Jt, REGEXP_ONLY_DIGITS_AND_CHARS as Qt } from "../../node_modules/.pnpm/input-otp@1.4.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/input-otp/dist/index.js";
@@ -34,7 +35,7 @@ const inputModeDictionary = {
34
35
  digitsAndChars: "text"
35
36
  };
36
37
  const OTPField = React.forwardRef(
37
- ({ maxLength = 6, error, children, mode = "digits", pattern, ...props }, ref) => {
38
+ ({ maxLength = 6, error, children, mode = "digits", pattern, onChange, ...props }, ref) => {
38
39
  return /* @__PURE__ */ jsx(
39
40
  Lt,
40
41
  {
@@ -43,6 +44,7 @@ const OTPField = React.forwardRef(
43
44
  maxLength,
44
45
  inputMode: inputModeDictionary[mode],
45
46
  pattern: pattern || patternDictionary[mode],
47
+ onChange: withHaptics(onChange),
46
48
  containerClassName: "flex items-center gap-2 has-[:disabled]:opacity-50",
47
49
  render: ({ slots }) => /* @__PURE__ */ jsx(Fragment, { children: slots.map(({ isActive, char }, idx) => /* @__PURE__ */ jsx(
48
50
  "div",