@worldcoin/mini-apps-ui-kit-react 0.0.8 → 1.0.0-canary.1

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 (198) hide show
  1. package/README.md +8 -17
  2. package/dist/components/AlertDialog/AlertDialog.js +94 -0
  3. package/dist/components/AlertDialog/index.d.ts +1 -0
  4. package/dist/components/AlertDialog/index.js +13 -0
  5. package/dist/components/AlertDialog/types.d.ts +172 -0
  6. package/dist/components/AlertDialog/types.js +1 -0
  7. package/dist/components/AlertDialog/use-alert-dialog.d.ts +6 -0
  8. package/dist/components/AlertDialog/use-alert-dialog.js +11 -0
  9. package/dist/components/BottomBar/BottomBar.d.ts +13 -0
  10. package/dist/components/BottomBar/BottomBar.js +21 -0
  11. package/dist/components/BottomBar/index.d.ts +1 -0
  12. package/dist/components/BottomBar/index.js +4 -0
  13. package/dist/components/BulletList/BulletList.d.ts +10 -0
  14. package/dist/components/BulletList/BulletList.js +11 -0
  15. package/dist/components/BulletList/index.d.ts +1 -0
  16. package/dist/components/BulletList/index.js +4 -0
  17. package/dist/components/BulletListItem/BulletListItem.d.ts +7 -0
  18. package/dist/components/BulletListItem/BulletListItem.js +23 -0
  19. package/dist/components/BulletListItem/index.d.ts +1 -0
  20. package/dist/components/BulletListItem/index.js +4 -0
  21. package/dist/components/BulletPoint/BulletPoint.d.ts +6 -0
  22. package/dist/components/BulletPoint/BulletPoint.js +22 -0
  23. package/dist/components/BulletPoint/index.d.ts +1 -0
  24. package/dist/components/BulletPoint/index.js +1 -0
  25. package/dist/components/Button/Button.d.ts +10 -22
  26. package/dist/components/Button/Button.js +41 -73
  27. package/dist/components/Checkbox/Checkbox.d.ts +24 -4
  28. package/dist/components/Checkbox/Checkbox.js +5 -5
  29. package/dist/components/Chip/Chip.d.ts +2 -1
  30. package/dist/components/Chip/Chip.js +14 -8
  31. package/dist/components/ClearButton/Clear.js +14 -14
  32. package/dist/components/ClearButton/ClearButton.js +11 -11
  33. package/dist/components/ColorPicker/ColorPicker.js +14 -14
  34. package/dist/components/CountryDrawer/CountryDrawer.d.ts +12 -0
  35. package/dist/components/CountryDrawer/CountryDrawer.js +63 -0
  36. package/dist/components/CountryDrawer/index.d.ts +1 -0
  37. package/dist/components/CountryDrawer/index.js +4 -0
  38. package/dist/components/CountryDrawer/useCountryFiltering.d.ts +7 -0
  39. package/dist/components/CountryDrawer/useCountryFiltering.js +9 -0
  40. package/dist/components/CountryDrawer/useCountryGrouping.d.ts +13 -0
  41. package/dist/components/CountryDrawer/useCountryGrouping.js +17 -0
  42. package/dist/components/Drawer/Drawer.d.ts +28 -6
  43. package/dist/components/Drawer/Drawer.js +67 -28
  44. package/dist/components/Drawer/index.js +6 -4
  45. package/dist/components/Drawer/types.d.ts +167 -0
  46. package/dist/components/Drawer/types.js +1 -0
  47. package/dist/components/Drawer/use-drawer.d.ts +8 -0
  48. package/dist/components/Drawer/use-drawer.js +11 -0
  49. package/dist/components/Flag/LazyFlag.js +1 -1
  50. package/dist/components/Flag/flag-components/eu.d.ts +3 -0
  51. package/dist/components/Flag/flag-components/eu.js +83 -0
  52. package/dist/components/Flag/flag-components/index.d.ts +1 -0
  53. package/dist/components/Flag/flag-components/index.js +56 -54
  54. package/dist/components/Form/Form.js +2 -2
  55. package/dist/components/Icons/ArrowDown.js +26 -0
  56. package/dist/components/Icons/Eye.d.ts +8 -0
  57. package/dist/components/Icons/Eye.js +40 -0
  58. package/dist/components/Icons/EyeClosed.d.ts +8 -0
  59. package/dist/components/Icons/EyeClosed.js +60 -0
  60. package/dist/components/Icons/Fail.d.ts +8 -0
  61. package/dist/components/Icons/Fail.js +82 -0
  62. package/dist/components/Icons/MagicWand.d.ts +8 -0
  63. package/dist/components/Icons/MagicWand.js +60 -0
  64. package/dist/components/Icons/Magnifier.d.ts +1 -1
  65. package/dist/components/Icons/Magnifier.js +20 -11
  66. package/dist/components/Icons/Success.d.ts +8 -0
  67. package/dist/components/Icons/Success.js +82 -0
  68. package/dist/components/Icons/Tick.js +6 -7
  69. package/dist/components/Icons/XMark.d.ts +8 -0
  70. package/dist/components/Icons/XMark.js +27 -0
  71. package/dist/components/Input/Input.d.ts +26 -2
  72. package/dist/components/Input/Input.js +116 -51
  73. package/dist/components/ListItem/ListItem.d.ts +17 -6
  74. package/dist/components/ListItem/ListItem.js +29 -22
  75. package/dist/components/Marble/Marble.d.ts +2 -0
  76. package/dist/components/Marble/Marble.js +23 -0
  77. package/dist/components/Marble/index.d.ts +1 -0
  78. package/dist/components/Marble/index.js +4 -0
  79. package/dist/components/NumberPad/Delete.d.ts +1 -8
  80. package/dist/components/NumberPad/Delete.js +9 -10
  81. package/dist/components/NumberPad/NumberPad.js +30 -24
  82. package/dist/components/OTPField/OTPField.js +8 -8
  83. package/dist/components/PasswordField/PasswordField.d.ts +13 -0
  84. package/dist/components/PasswordField/PasswordField.js +45 -0
  85. package/dist/components/PasswordField/index.d.ts +1 -0
  86. package/dist/components/PasswordField/index.js +4 -0
  87. package/dist/components/PasteButton/PasteButton.d.ts +1 -1
  88. package/dist/components/PasteButton/PasteButton.js +21 -17
  89. package/dist/components/PhoneField/CountryListItem.d.ts +3 -4
  90. package/dist/components/PhoneField/CountryListItem.js +21 -25
  91. package/dist/components/PhoneField/CountrySelectorButton.d.ts +3 -4
  92. package/dist/components/PhoneField/CountrySelectorButton.js +17 -17
  93. package/dist/components/PhoneField/GroupedCountryList.d.ts +14 -0
  94. package/dist/components/PhoneField/GroupedCountryList.js +30 -0
  95. package/dist/components/PhoneField/PhoneField.d.ts +3 -14
  96. package/dist/components/PhoneField/PhoneField.js +71 -197
  97. package/dist/components/PhoneField/constants.js +4 -4
  98. package/dist/components/Pill/Pill.js +7 -7
  99. package/dist/components/Progress/Progress.d.ts +14 -0
  100. package/dist/components/Progress/Progress.js +31 -0
  101. package/dist/components/Progress/index.d.ts +1 -0
  102. package/dist/components/Progress/index.js +4 -0
  103. package/dist/components/RadioGroup/RadioGroupItem.js +1 -1
  104. package/dist/components/SearchField/SearchField.d.ts +6 -1
  105. package/dist/components/SearchField/SearchField.js +39 -35
  106. package/dist/components/Select/Select.js +46 -76
  107. package/dist/components/{Button → Spinner}/Spinner.d.ts +2 -2
  108. package/dist/components/Spinner/Spinner.js +36 -0
  109. package/dist/components/Spinner/index.d.ts +1 -0
  110. package/dist/components/Spinner/index.js +4 -0
  111. package/dist/components/Switch/Switch.js +1 -1
  112. package/dist/components/Tabs/Tabs.d.ts +11 -0
  113. package/dist/components/Tabs/Tabs.js +58 -0
  114. package/dist/components/Tabs/index.d.ts +2 -0
  115. package/dist/components/Tabs/index.js +5 -0
  116. package/dist/components/Tabs/types.d.ts +53 -0
  117. package/dist/components/Tabs/types.js +1 -0
  118. package/dist/components/TextArea/TextArea.d.ts +25 -0
  119. package/dist/components/TextArea/TextArea.js +54 -0
  120. package/dist/components/TextArea/index.d.ts +1 -0
  121. package/dist/components/TextArea/index.js +4 -0
  122. package/dist/components/Toast/Toast.d.ts +9 -0
  123. package/dist/components/Toast/Toast.js +51 -0
  124. package/dist/components/Toast/Toaster.d.ts +3 -0
  125. package/dist/components/Toast/Toaster.js +14 -0
  126. package/dist/components/Toast/index.d.ts +3 -0
  127. package/dist/components/Toast/index.js +12 -0
  128. package/dist/components/Toast/use-toast.d.ts +51 -0
  129. package/dist/components/Toast/use-toast.js +101 -0
  130. package/dist/components/ToggleGroup/ToggleGroup.d.ts +5 -0
  131. package/dist/components/ToggleGroup/ToggleGroup.js +28 -0
  132. package/dist/components/ToggleGroup/index.d.ts +1 -0
  133. package/dist/components/ToggleGroup/index.js +5 -0
  134. package/dist/components/ToggleGroup/types.d.ts +101 -0
  135. package/dist/components/ToggleGroup/types.js +1 -0
  136. package/dist/components/Token/Token.d.ts +4 -0
  137. package/dist/components/Token/Token.js +12 -7
  138. package/dist/components/Token/icons/btc.d.ts +2 -2
  139. package/dist/components/Token/icons/btc.js +13 -58
  140. package/dist/components/Token/icons/dai.d.ts +3 -0
  141. package/dist/components/Token/icons/dai.js +27 -0
  142. package/dist/components/Token/icons/eth.d.ts +2 -2
  143. package/dist/components/Token/icons/eth.js +11 -58
  144. package/dist/components/Token/icons/index.d.ts +2 -0
  145. package/dist/components/Token/icons/index.js +8 -4
  146. package/dist/components/Token/icons/types.d.ts +7 -0
  147. package/dist/components/Token/icons/types.js +1 -0
  148. package/dist/components/Token/icons/usdc.d.ts +2 -2
  149. package/dist/components/Token/icons/usdc.js +16 -56
  150. package/dist/components/Token/icons/usdt.d.ts +3 -0
  151. package/dist/components/Token/icons/usdt.js +27 -0
  152. package/dist/components/Token/icons/utils.d.ts +9 -0
  153. package/dist/components/Token/icons/utils.js +11 -0
  154. package/dist/components/Token/icons/wld.d.ts +2 -2
  155. package/dist/components/Token/icons/wld.js +10 -41
  156. package/dist/components/TopBar/TopBar.d.ts +11 -0
  157. package/dist/components/TopBar/TopBar.js +23 -0
  158. package/dist/components/TopBar/index.d.ts +1 -0
  159. package/dist/components/TopBar/index.js +4 -0
  160. package/dist/components/Typography/Typography.d.ts +12 -8
  161. package/dist/components/Typography/Typography.js +69 -57
  162. package/dist/components/WalletAddressField/WalletAddressField.d.ts +23 -0
  163. package/dist/components/WalletAddressField/WalletAddressField.js +81 -0
  164. package/dist/components/WalletAddressField/index.d.ts +1 -0
  165. package/dist/components/WalletAddressField/index.js +4 -0
  166. package/dist/index.d.ts +15 -0
  167. package/dist/index.js +91 -45
  168. package/dist/lib/constants/dropdownStyles.d.ts +1 -1
  169. package/dist/lib/constants/dropdownStyles.js +2 -2
  170. package/dist/node_modules/.pnpm/@radix-ui_react-collection@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@1_tagbd57u5fsqga6qdjecsll7fm/node_modules/@radix-ui/react-collection/dist/index.js +49 -0
  171. package/dist/node_modules/.pnpm/@radix-ui_react-dismissable-layer@1.1.5_@types_react-dom@18.3.5_@types_react@18.3.18__@types__nitdfoqpcbroetgllwgz3is5ai/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +131 -0
  172. package/dist/node_modules/.pnpm/@radix-ui_react-portal@1.1.4_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._ulc3jfxcmrz2rfz7bui53djdtu/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
  173. package/dist/node_modules/.pnpm/@radix-ui_react-primitive@2.0.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18_sejcxqoscaweil2bvgwwavaoha/node_modules/@radix-ui/react-primitive/dist/index.js +35 -0
  174. package/dist/node_modules/.pnpm/@radix-ui_react-progress@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18._wpsg2ubedou6txnsnvgmus4txq/node_modules/@radix-ui/react-progress/dist/index.js +86 -0
  175. package/dist/node_modules/.pnpm/@radix-ui_react-roving-focus@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react_ki7uy4u3diz5446cqygvbjwuge/node_modules/@radix-ui/react-roving-focus/dist/index.js +181 -0
  176. package/dist/node_modules/.pnpm/@radix-ui_react-slot@1.1.2_@types_react@18.3.18_react@18.3.1/node_modules/@radix-ui/react-slot/dist/index.js +44 -0
  177. package/dist/node_modules/.pnpm/@radix-ui_react-toast@1.2.6_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3.1_mux33mveszkw5z6iia6acnivvy/node_modules/@radix-ui/react-toast/dist/index.js +448 -0
  178. package/dist/node_modules/.pnpm/@radix-ui_react-toggle-group@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react_3smwloudr6a3igss4kifyxcwju/node_modules/@radix-ui/react-toggle-group/dist/index.js +137 -0
  179. package/dist/node_modules/.pnpm/@radix-ui_react-toggle@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._yiv2ptaqcv244n5f7zfldmgupm/node_modules/@radix-ui/react-toggle/dist/index.js +31 -0
  180. package/dist/node_modules/.pnpm/@radix-ui_react-visually-hidden@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_re_omyrydx3gc2oidaiqb4gsovieq/node_modules/@radix-ui/react-visually-hidden/dist/index.js +30 -0
  181. package/dist/tailwind/index.d.ts +41 -25
  182. package/dist/tailwind/index.js +128 -85
  183. package/package.json +73 -1
  184. package/public/fonts/TWKLausanne-350.woff +0 -0
  185. package/public/fonts/TWKLausanne-350Italic.woff +0 -0
  186. package/public/fonts/TWKLausanne-500.woff +0 -0
  187. package/public/fonts/TWKLausanne-500Italic.woff +0 -0
  188. package/public/fonts/TWKLausanne-600.woff +0 -0
  189. package/public/fonts/TWKLausanne-600Italic.woff +0 -0
  190. package/public/globals.css +1 -1
  191. package/public/images/marbles/marble1.png +0 -0
  192. package/public/images/marbles/marble2.png +0 -0
  193. package/public/images/marbles/marble3.svg +36 -0
  194. package/dist/components/Button/Spinner.js +0 -36
  195. package/dist/components/PhoneField/ArrowDown.js +0 -27
  196. package/dist/components/Select/ArrowDown.d.ts +0 -2
  197. package/dist/components/Select/ArrowDown.js +0 -27
  198. /package/dist/components/{PhoneField → Icons}/ArrowDown.d.ts +0 -0
@@ -1,218 +1,92 @@
1
1
  "use client";
2
- import { jsx as t, jsxs as c } from "react/jsx-runtime";
3
- import { DROPDOWN_CONTAINER_STYLES as te } from "../../lib/constants/dropdownStyles.js";
4
- import { cn as oe } from "../../lib/utils.js";
5
- import { Root as re, Trigger as ne, Portal as ae, Content as le, Viewport as se, Item as ie } from "../../node_modules/.pnpm/@radix-ui_react-select@2.1.4_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18.3._atdh45n5c7sked5b6tbwgdz7re/node_modules/@radix-ui/react-select/dist/index.js";
6
- import { forwardRef as ce, useRef as ue, useState as w, useMemo as F, useImperativeHandle as de } from "react";
7
- import { usePhoneInput as me, parseCountry as O } from "../../node_modules/.pnpm/react-international-phone@4.4.0_react@18.3.1/node_modules/react-international-phone/dist/index.js";
8
- import { Drawer as he, DrawerTrigger as fe, DrawerContent as pe, DrawerClose as Ce } from "../Drawer/Drawer.js";
9
- import { Input as ye } from "../Input/Input.js";
10
- import { SearchField as we } from "../SearchField/SearchField.js";
11
- import { Typography as P } from "../Typography/Typography.js";
12
- import L from "./CountryListItem.js";
13
- import R from "./CountrySelectorButton.js";
14
- import { DIAL_CODE_PREFIX as g, startAdornmentWidthByDialCodeLength as ge } from "./constants.js";
15
- import { getCountryDataListByCodes as xe, getValidatedCountryCode as u, filterCountries as Ne } from "./utils.js";
16
- const Se = ce(
2
+ import { jsx as i } from "react/jsx-runtime";
3
+ import { forwardRef as B, useMemo as R, useImperativeHandle as W } from "react";
4
+ import { usePhoneInput as _ } from "../../node_modules/.pnpm/react-international-phone@4.4.0_react@18.3.1/node_modules/react-international-phone/dist/index.js";
5
+ import { CountryDrawer as $ } from "../CountryDrawer/CountryDrawer.js";
6
+ import { Input as b } from "../Input/Input.js";
7
+ import j from "./CountrySelectorButton.js";
8
+ import { DIAL_CODE_PREFIX as q, startAdornmentWidthByDialCodeLength as H } from "./constants.js";
9
+ import { getCountryDataListByCodes as M, getValidatedCountryCode as d } from "./utils.js";
10
+ const N = B(
17
11
  ({
18
- value: T,
19
- onChange: d,
20
- countries: x,
21
- placeholder: $ = "Enter phone number",
22
- defaultCountryCode: n = "US",
23
- hideDialCode: m = !1,
24
- disableDialCodePrefill: E = !0,
25
- disabled: s = !1,
26
- error: b = !1,
27
- isValid: V,
28
- endAdornment: W,
29
- endAdornmentWidth: B,
30
- countrySelectorMode: _ = "dropdown",
31
- type: j = "tel",
32
- inputMode: k = "tel",
33
- autoComplete: M = "tel",
34
- autoCapitalize: q = "off",
35
- autoCorrect: H = "off",
36
- ...U
37
- }, X) => {
38
- const N = ue(null), [h, f] = w(!1), [Y, p] = w(!1), [C, S] = w(""), i = F(() => xe(x), [x]), { inputValue: z, country: y, inputRef: a, handlePhoneValueChange: G, setCountry: J } = me(
12
+ value: m,
13
+ onChange: o,
14
+ countries: r,
15
+ label: f = "Phone",
16
+ defaultCountryCode: t = "US",
17
+ disableDialCodePrefill: c = !0,
18
+ disabled: l = !1,
19
+ error: h = !1,
20
+ isValid: p,
21
+ endAdornment: C,
22
+ endAdornmentWidth: y,
23
+ type: D = "tel",
24
+ inputMode: A = "tel",
25
+ autoComplete: w = "tel",
26
+ autoCapitalize: P = "off",
27
+ autoCorrect: L = "off",
28
+ ...v
29
+ }, E) => {
30
+ const I = R(() => M(r), [r]), { inputValue: S, country: n, inputRef: a, handlePhoneValueChange: g, setCountry: F } = _(
39
31
  {
40
- defaultCountry: n.toLowerCase(),
41
- disableDialCodePrefill: E,
42
- value: T,
43
- countries: i,
32
+ defaultCountry: t.toLowerCase(),
33
+ disableDialCodePrefill: c,
34
+ disableDialCodeAndPrefix: !0,
35
+ value: m,
36
+ countries: I,
44
37
  onChange: (e) => {
45
- d == null || d(
38
+ o == null || o(
46
39
  e.phone,
47
- u(e.country.iso2, n)
40
+ d(e.country.iso2, t)
48
41
  );
49
42
  }
50
43
  }
51
- ), l = u(y.iso2, n), K = 2.8, D = `${g}${y.dialCode}`, Q = m ? K : ge[y.dialCode.length];
52
- de(X, () => a.current);
53
- const v = (e) => {
54
- e == null || e.preventDefault(), Y && requestAnimationFrame(() => {
55
- var o;
56
- (o = a.current) == null || o.focus();
57
- }), p(!1);
58
- }, Z = (e) => {
59
- var r;
60
- const o = (r = N.current) == null ? void 0 : r.contains(e.target);
61
- p(!!o);
62
- }, A = (e) => {
63
- J(e.toLowerCase()), f(!1);
64
- }, ee = (e) => {
65
- S(e.target.value);
66
- }, I = F(
67
- () => Ne(i, C),
68
- [i, C]
69
- );
70
- return /* @__PURE__ */ t(
71
- ye,
44
+ ), s = d(n.iso2, t), V = `${q}${n.dialCode}`, x = H[n.dialCode.length];
45
+ return W(E, () => a.current), /* @__PURE__ */ i(
46
+ b,
72
47
  {
73
- ...U,
48
+ ...v,
74
49
  ref: a,
75
- type: j,
76
- inputMode: k,
77
- autoComplete: M,
78
- autoCapitalize: q,
79
- autoCorrect: H,
80
- value: z,
81
- onChange: G,
82
- placeholder: $,
83
- disabled: s,
84
- error: b,
85
- isValid: V,
86
- endAdornment: W,
87
- endAdornmentWidth: B,
88
- startAdornmentWidth: Q,
89
- isFocused: h,
90
- startAdornment: _ === "drawer" ? /* @__PURE__ */ c(
91
- he,
50
+ type: D,
51
+ inputMode: A,
52
+ autoComplete: w,
53
+ autoCapitalize: P,
54
+ autoCorrect: L,
55
+ value: S,
56
+ onChange: g,
57
+ label: f,
58
+ disabled: l,
59
+ error: h,
60
+ isValid: p,
61
+ endAdornment: C,
62
+ endAdornmentWidth: y,
63
+ startAdornmentWidth: x,
64
+ showStartDivider: !0,
65
+ startAdornment: /* @__PURE__ */ i(
66
+ $,
92
67
  {
93
- open: h,
94
- onOpenChange: f,
95
- onClose: v,
68
+ value: s,
69
+ defaultValue: t,
70
+ countries: r,
96
71
  onAnimationEnd: (e) => {
97
- e && p(!0);
72
+ e || requestAnimationFrame(() => {
73
+ var u;
74
+ (u = a.current) == null || u.focus();
75
+ });
98
76
  },
99
- children: [
100
- /* @__PURE__ */ t(fe, { asChild: !0, className: "outline-none", children: /* @__PURE__ */ t(
101
- R,
102
- {
103
- disabled: s,
104
- countryCode: l,
105
- hideDialCode: m,
106
- dialCode: D
107
- }
108
- ) }),
109
- /* @__PURE__ */ t(pe, { className: "h-[96%]", children: /* @__PURE__ */ c("div", { className: "max-w-md w-full mx-auto flex flex-col flex-grow", children: [
110
- /* @__PURE__ */ t(P, { variant: "subtitle", level: 2, className: "px-4 py-2", children: "Select country" }),
111
- /* @__PURE__ */ t("div", { className: "px-4 pt-2 pb-4", children: /* @__PURE__ */ t(
112
- we,
113
- {
114
- placeholder: "Search name or number",
115
- value: C,
116
- onChange: ee
117
- }
118
- ) }),
119
- /* @__PURE__ */ c(
120
- "div",
121
- {
122
- className: "no-scrollbar mx-auto w-full flex flex-col flex-grow flex-basis-0 overflow-auto p-2",
123
- style: {
124
- // Explicitly setting flex-basis ensures that the remaining space in the flex container is used,
125
- // height issues are fixed, and proper scrolling is enabled.
126
- flexBasis: 0
127
- },
128
- children: [
129
- I.map((e) => {
130
- const o = O(e), r = u(
131
- o.iso2,
132
- n
133
- );
134
- return /* @__PURE__ */ t(Ce, { className: "block w-full", children: /* @__PURE__ */ t(
135
- L,
136
- {
137
- countryCode: r,
138
- countryName: o.name,
139
- dialCode: `${g}${o.dialCode}`,
140
- onClick: () => {
141
- A(r), S("");
142
- },
143
- isSelected: l === r
144
- }
145
- ) }, r);
146
- }),
147
- I.length === 0 && /* @__PURE__ */ t(P, { variant: "body", level: 2, className: "text-center", children: "No countries found" })
148
- ]
149
- }
150
- )
151
- ] }) })
152
- ]
153
- }
154
- ) : /* @__PURE__ */ c(
155
- re,
156
- {
157
- value: l,
158
- open: h,
159
- onOpenChange: f,
160
- onValueChange: A,
161
- disabled: s,
162
- children: [
163
- /* @__PURE__ */ t(ne, { children: /* @__PURE__ */ t(
164
- R,
165
- {
166
- disabled: s,
167
- countryCode: l,
168
- hideDialCode: m,
169
- dialCode: D
170
- }
171
- ) }),
172
- /* @__PURE__ */ t(ae, { children: /* @__PURE__ */ t(
173
- le,
174
- {
175
- ref: (e) => {
176
- N.current = e, e && a.current && (e.style.width = `${a.current.offsetWidth}px`);
177
- },
178
- position: "popper",
179
- className: oe(te, "-ml-3 mt-5 w-auto"),
180
- onCloseAutoFocus: v,
181
- onPointerDown: Z,
182
- children: /* @__PURE__ */ t(se, { className: "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] p-2", children: i.map((e) => {
183
- const o = O(e), r = u(
184
- o.iso2,
185
- n
186
- );
187
- return /* @__PURE__ */ t(
188
- ie,
189
- {
190
- value: r,
191
- className: "outline-none",
192
- children: /* @__PURE__ */ t(
193
- L,
194
- {
195
- countryCode: r,
196
- countryName: o.name,
197
- dialCode: `${g}${o.dialCode}`,
198
- isSelected: l === r
199
- }
200
- )
201
- },
202
- r
203
- );
204
- }) })
205
- }
206
- ) })
207
- ]
77
+ onChange: (e) => {
78
+ F(e.toLowerCase());
79
+ },
80
+ disabled: l,
81
+ children: /* @__PURE__ */ i(j, { value: s, label: V })
208
82
  }
209
83
  )
210
84
  }
211
85
  );
212
86
  }
213
87
  );
214
- Se.displayName = "PhoneField";
88
+ N.displayName = "PhoneField";
215
89
  export {
216
- Se as PhoneField,
217
- Se as default
90
+ N as PhoneField,
91
+ N as default
218
92
  };
@@ -14,10 +14,10 @@ const r = new Set(
14
14
  ...c,
15
15
  ...l
16
16
  ].sort((o, t) => o[0].localeCompare(t[0])), h = "+", D = {
17
- 1: 4.4,
18
- 2: 5.2,
19
- 3: 5.8,
20
- 4: 6.2
17
+ 1: 5.5,
18
+ 2: 6,
19
+ 3: 6.5,
20
+ 4: 7
21
21
  };
22
22
  export {
23
23
  h as DIAL_CODE_PREFIX,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { jsx as i } from "react/jsx-runtime";
3
- import { Slot as l } 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";
2
+ import { jsx as l } from "react/jsx-runtime";
3
+ import { Slot as i } 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";
4
4
  import { cva as n } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
5
5
  import { forwardRef as s } from "react";
6
6
  import { cn as m } from "../../lib/utils.js";
@@ -19,16 +19,16 @@ const f = n(
19
19
  }
20
20
  }
21
21
  ), c = s(
22
- ({ checked: t, children: r, asChild: a, ...o }, e) => /* @__PURE__ */ i(
23
- a ? l : "button",
22
+ ({ checked: r, children: t, asChild: a, ...o }, e) => /* @__PURE__ */ l(
23
+ a ? i : "button",
24
24
  {
25
25
  ref: e,
26
26
  className: m(
27
- f({ checked: t }),
28
- p({ variant: "subtitle", level: 3 })
27
+ f({ checked: r }),
28
+ p({ variant: "label", level: 2 })
29
29
  ),
30
30
  ...o,
31
- children: r
31
+ children: t
32
32
  }
33
33
  )
34
34
  );
@@ -0,0 +1,14 @@
1
+ interface ProgressProps {
2
+ /** Value between 0 and 100 representing the progress percentage */
3
+ value: number;
4
+ /** Whether to use the child element as the progress indicator */
5
+ asChild?: boolean;
6
+ /** Maximum value of the progress bar */
7
+ max?: number;
8
+ /** A function to get the accessible label text representing the current value in a human-readable format. If not provided, the value label will be read as the numeric value as a percentage of the max value. */
9
+ getValueLabel?: (value: number) => string;
10
+ /** The class name of the progress bar. To customize the background color of the progress bar, use background utility classes. To customize the indicator color, use text color utility classes. */
11
+ className?: string;
12
+ }
13
+ export declare const Progress: ({ value, asChild, max, getValueLabel, className }: ProgressProps) => import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,31 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { cn as n } from "../../lib/utils.js";
3
+ import { Root as i, Indicator as l } from "../../node_modules/.pnpm/@radix-ui_react-progress@1.1.2_@types_react-dom@18.3.5_@types_react@18.3.18__@types_react@18._wpsg2ubedou6txnsnvgmus4txq/node_modules/@radix-ui/react-progress/dist/index.js";
4
+ const d = ({ value: r, asChild: e, max: o, getValueLabel: s, className: a }) => /* @__PURE__ */ t(
5
+ i,
6
+ {
7
+ className: n(
8
+ "relative h-1.5 w-full overflow-hidden rounded-full bg-gray-100",
9
+ a
10
+ ),
11
+ style: {
12
+ // Fix overflow clipping in Safari
13
+ // https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0
14
+ transform: "translateZ(0)"
15
+ },
16
+ value: r,
17
+ max: o,
18
+ asChild: e,
19
+ getValueLabel: s,
20
+ children: /* @__PURE__ */ t(
21
+ l,
22
+ {
23
+ className: "ease-[cubic-bezier(0.65, 0, 0.35, 1)] size-full bg-current transition-transform duration-[660ms]",
24
+ style: { transform: `translateX(-${100 - Math.min(r, 100)}%)` }
25
+ }
26
+ )
27
+ }
28
+ );
29
+ export {
30
+ d as Progress
31
+ };
@@ -0,0 +1 @@
1
+ export * from './Progress';
@@ -0,0 +1,4 @@
1
+ import { Progress as e } from "./Progress.js";
2
+ export {
3
+ e as Progress
4
+ };
@@ -8,7 +8,7 @@ const m = c(
8
8
  {
9
9
  ref: d,
10
10
  value: a,
11
- className: "h-6 w-6 rounded-full border-[0.09375rem] transition-all data-[state=checked]:border-gray-900 data-[state=unchecked]:border-gray-400 data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-transparent disabled:cursor-not-allowed disabled:opacity-20",
11
+ className: "size-6 rounded-full border-[0.09375rem] transition-all data-[state=checked]:border-gray-900 data-[state=unchecked]:border-gray-200 data-[state=checked]:bg-gray-900 data-[state=unchecked]:bg-transparent disabled:cursor-not-allowed disabled:opacity-50",
12
12
  disabled: r,
13
13
  ...t,
14
14
  children: /* @__PURE__ */ e(s, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(i, { className: "text-gray-0" }) })
@@ -1,5 +1,5 @@
1
1
  import { InputProps } from '../Input';
2
- export interface SearchFieldProps extends Omit<InputProps, "startAdornment" | "startAdornmentWidth"> {
2
+ export interface SearchFieldProps extends Omit<InputProps, "startAdornment" | "startAdornmentWidth" | "placeholder"> {
3
3
  /**
4
4
  * If true, the input will display in an error state with error styling
5
5
  */
@@ -18,6 +18,11 @@ export interface SearchFieldProps extends Omit<InputProps, "startAdornment" | "s
18
18
  * @default "Paste"
19
19
  */
20
20
  pasteButtonLabel?: string;
21
+ /**
22
+ * Label for the input
23
+ * @default "Search"
24
+ */
25
+ label?: string;
21
26
  }
22
27
  export declare const SearchField: import('react').ForwardRefExoticComponent<SearchFieldProps & import('react').RefAttributes<HTMLInputElement>>;
23
28
  export default SearchField;
@@ -1,62 +1,64 @@
1
1
  "use client";
2
2
  import { jsx as a } from "react/jsx-runtime";
3
- import { createChangeEvent as i } from "../../lib/utils.js";
4
- import { forwardRef as v, useRef as I, useState as S, useImperativeHandle as T } from "react";
5
- import P from "../ClearButton/ClearButton.js";
6
- import { Magnifier as R } from "../Icons/Magnifier.js";
7
- import { Input as W } from "../Input/Input.js";
8
- import x, { PASTE_BUTTON_WIDTH as E } from "../PasteButton/PasteButton.js";
9
- const H = v(
3
+ import { createChangeEvent as c } from "../../lib/utils.js";
4
+ import { forwardRef as T, useRef as W, useState as i, useImperativeHandle as N } from "react";
5
+ import R from "../ClearButton/ClearButton.js";
6
+ import { Magnifier as x } from "../Icons/Magnifier.js";
7
+ import { Input as E } from "../Input/Input.js";
8
+ import H, { PASTE_BUTTON_WIDTH as _ } from "../PasteButton/PasteButton.js";
9
+ const j = T(
10
10
  ({
11
- showPasteButton: c,
12
- pasteButtonLabel: l,
13
- isValid: d,
14
- disabled: f,
11
+ showPasteButton: l,
12
+ pasteButtonLabel: d,
13
+ isValid: s,
14
+ disabled: u,
15
15
  type: h = "search",
16
16
  autoComplete: A = "off",
17
17
  spellCheck: F = "false",
18
- endAdornment: s,
19
- endAdornmentWidth: B,
18
+ endAdornment: B,
19
+ endAdornmentWidth: C,
20
+ label: I = "Search",
20
21
  ...e
21
- }, C) => {
22
- const r = I(null), [g, o] = S(!1);
23
- T(C, () => r.current);
24
- let u = s, m = B;
25
- return c && !f ? (u = /* @__PURE__ */ a(
26
- x,
22
+ }, P) => {
23
+ const r = W(null), [S, o] = i(!1), [g, v] = i(!1);
24
+ N(P, () => r.current);
25
+ let f = B, m = C;
26
+ return l && !u && !g ? (f = /* @__PURE__ */ a(
27
+ H,
27
28
  {
28
29
  inputRef: r,
29
- label: l,
30
+ label: d,
30
31
  onPaste: () => {
31
32
  var t;
32
33
  if (r.current) {
33
- const n = i(r.current);
34
- (t = e.onChange) == null || t.call(e, n);
34
+ const n = c(r.current);
35
+ (t = e.onChange) == null || t.call(e, n), v(!0);
35
36
  }
36
37
  }
37
38
  }
38
- ), m = E) : g && !f && (u = /* @__PURE__ */ a(
39
- P,
39
+ ), m = _) : S && !u && (f = /* @__PURE__ */ a(
40
+ R,
40
41
  {
41
42
  inputRef: r,
42
43
  onClear: () => {
43
44
  var t;
44
45
  if (r.current) {
45
- const n = i(r.current);
46
+ const n = c(r.current);
46
47
  (t = e.onChange) == null || t.call(e, n);
47
48
  }
48
49
  }
49
50
  }
50
- ), m = 1.25), /* @__PURE__ */ a(
51
- W,
51
+ ), m = 2.3), /* @__PURE__ */ a(
52
+ E,
52
53
  {
53
54
  ...e,
54
55
  ref: r,
55
- startAdornment: /* @__PURE__ */ a(R, {}),
56
- isValid: d,
57
- disabled: f,
56
+ startAdornment: /* @__PURE__ */ a(x, {}),
57
+ isValid: s,
58
+ disabled: u,
59
+ startAdornmentWidth: 2.3,
58
60
  endAdornmentWidth: m,
59
- endAdornment: u,
61
+ endAdornment: f,
60
62
  type: h,
61
63
  autoComplete: A,
62
64
  spellCheck: F,
@@ -64,16 +66,18 @@ const H = v(
64
66
  var n;
65
67
  o(!0), (n = e.onFocus) == null || n.call(e, t);
66
68
  },
69
+ label: I,
67
70
  onBlur: (t) => {
68
71
  var n;
69
72
  o(!1), (n = e.onBlur) == null || n.call(e, t);
70
- }
73
+ },
74
+ className: "rounded-full h-[3.125rem]"
71
75
  }
72
76
  );
73
77
  }
74
78
  );
75
- H.displayName = "SearchField";
79
+ j.displayName = "SearchField";
76
80
  export {
77
- H as SearchField,
78
- H as default
81
+ j as SearchField,
82
+ j as default
79
83
  };