@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,31 +1,40 @@
1
- import { jsxs as e, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
2
  import { cn as t } from "../../lib/utils.js";
3
- function h({ className: r }) {
3
+ function s({ className: o }) {
4
4
  return /* @__PURE__ */ e(
5
5
  "svg",
6
6
  {
7
- width: "20",
8
- height: "20",
9
- viewBox: "0 0 20 20",
7
+ width: "24",
8
+ height: "24",
9
+ viewBox: "0 0 24 24",
10
10
  fill: "none",
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
- className: t("h-4 w-4", r),
12
+ className: t("size-6", o),
13
13
  children: [
14
- /* @__PURE__ */ i("g", { clipPath: "url(#clip0_352_148)", children: /* @__PURE__ */ i(
14
+ /* @__PURE__ */ r(
15
15
  "path",
16
16
  {
17
- d: "M15.4167 15.4167L18.3334 18.3334M17.5001 9.58335C17.5001 5.2111 13.9557 1.66669 9.58342 1.66669C5.21116 1.66669 1.66675 5.2111 1.66675 9.58335C1.66675 13.9556 5.21116 17.5 9.58342 17.5C13.9557 17.5 17.5001 13.9556 17.5001 9.58335Z",
17
+ d: "M17 17L21 21",
18
+ stroke: "currentColor",
19
+ strokeWidth: "2",
20
+ strokeLinecap: "square",
21
+ strokeLinejoin: "round"
22
+ }
23
+ ),
24
+ /* @__PURE__ */ r(
25
+ "path",
26
+ {
27
+ d: "M3 11C3 15.4183 6.58172 19 11 19C13.213 19 15.2161 18.1015 16.6644 16.6493C18.1077 15.2022 19 13.2053 19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11Z",
18
28
  stroke: "currentColor",
19
29
  strokeWidth: "2",
20
30
  strokeLinecap: "round",
21
31
  strokeLinejoin: "round"
22
32
  }
23
- ) }),
24
- /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "clip0_352_148", children: /* @__PURE__ */ i("rect", { width: "20", height: "20", fill: "white" }) }) })
33
+ )
25
34
  ]
26
35
  }
27
36
  );
28
37
  }
29
38
  export {
30
- h as Magnifier
39
+ s as Magnifier
31
40
  };
@@ -0,0 +1,8 @@
1
+ interface SuccessProps {
2
+ /**
3
+ * Additional CSS classes to apply to the icon
4
+ */
5
+ className?: string;
6
+ }
7
+ export declare const Success: ({ className }: SuccessProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,82 @@
1
+ import { jsxs as e, jsx as t } from "react/jsx-runtime";
2
+ import { cn as r } from "../../lib/utils.js";
3
+ const a = ({ className: i }) => /* @__PURE__ */ e(
4
+ "svg",
5
+ {
6
+ width: "25",
7
+ height: "24",
8
+ viewBox: "0 0 25 24",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ className: r("size-6 text-success-600", i),
12
+ children: [
13
+ /* @__PURE__ */ t("rect", { x: "0.5", width: "24", height: "24", rx: "12", fill: "currentColor" }),
14
+ /* @__PURE__ */ t(
15
+ "rect",
16
+ {
17
+ opacity: "0.2",
18
+ x: "0.5",
19
+ width: "24",
20
+ height: "24",
21
+ rx: "12",
22
+ fill: "url(#paint0_radial_578_332)"
23
+ }
24
+ ),
25
+ /* @__PURE__ */ t(
26
+ "rect",
27
+ {
28
+ x: "0.636364",
29
+ y: "0.136364",
30
+ width: "23.7273",
31
+ height: "23.7273",
32
+ rx: "11.8636",
33
+ stroke: "url(#paint1_linear_578_332)",
34
+ strokeWidth: "0.272727"
35
+ }
36
+ ),
37
+ /* @__PURE__ */ t(
38
+ "path",
39
+ {
40
+ d: "M8.54541 12.4091L10.7272 14.5909L16.1818 9.13633",
41
+ stroke: "white",
42
+ strokeWidth: "1.5"
43
+ }
44
+ ),
45
+ /* @__PURE__ */ e("defs", { children: [
46
+ /* @__PURE__ */ e(
47
+ "radialGradient",
48
+ {
49
+ id: "paint0_radial_578_332",
50
+ cx: "0",
51
+ cy: "0",
52
+ r: "1",
53
+ gradientUnits: "userSpaceOnUse",
54
+ gradientTransform: "translate(5.95455) rotate(63.4349) scale(26.8328 26.7171)",
55
+ children: [
56
+ /* @__PURE__ */ t("stop", { stopColor: "white" }),
57
+ /* @__PURE__ */ t("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
58
+ ]
59
+ }
60
+ ),
61
+ /* @__PURE__ */ e(
62
+ "linearGradient",
63
+ {
64
+ id: "paint1_linear_578_332",
65
+ x1: "12.5",
66
+ y1: "0",
67
+ x2: "12.5",
68
+ y2: "24",
69
+ gradientUnits: "userSpaceOnUse",
70
+ children: [
71
+ /* @__PURE__ */ t("stop", { stopColor: "white", stopOpacity: "0.3" }),
72
+ /* @__PURE__ */ t("stop", { offset: "1", stopColor: "white", stopOpacity: "0" })
73
+ ]
74
+ }
75
+ )
76
+ ] })
77
+ ]
78
+ }
79
+ );
80
+ export {
81
+ a as Success
82
+ };
@@ -1,6 +1,6 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
- import { cn as r } from "../../lib/utils.js";
3
- function n({ className: o }) {
2
+ import { cn as o } from "../../lib/utils.js";
3
+ function n({ className: r }) {
4
4
  return /* @__PURE__ */ t(
5
5
  "svg",
6
6
  {
@@ -9,16 +9,15 @@ function n({ className: o }) {
9
9
  viewBox: "0 0 16 16",
10
10
  fill: "none",
11
11
  xmlns: "http://www.w3.org/2000/svg",
12
- className: r("h-4 w-4", o),
12
+ className: o("h-4 w-4", r),
13
13
  "data-testid": "tick-icon",
14
14
  children: /* @__PURE__ */ t(
15
15
  "path",
16
16
  {
17
- d: "M3.33301 8.6665L5.68396 10.5473C6.2355 10.9885 7.03544 10.9231 7.50794 10.3981L12.6663 4.6665",
17
+ d: "M3.33334 8.66669L6.00001 11.3334L12.6667 4.66669",
18
18
  stroke: "currentColor",
19
- strokeWidth: "2",
20
- strokeLinecap: "round",
21
- strokeLinejoin: "round"
19
+ strokeWidth: "1.5",
20
+ strokeLinecap: "square"
22
21
  }
23
22
  )
24
23
  }
@@ -0,0 +1,8 @@
1
+ interface XMarkProps {
2
+ /**
3
+ * Additional CSS classes to apply to the icon
4
+ */
5
+ className?: string;
6
+ }
7
+ export declare function XMark({ className }: XMarkProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cn as o } from "../../lib/utils.js";
3
+ function n({ className: t }) {
4
+ return /* @__PURE__ */ r(
5
+ "svg",
6
+ {
7
+ width: "24",
8
+ height: "24",
9
+ viewBox: "0 0 24 24",
10
+ fill: "none",
11
+ xmlns: "http://www.w3.org/2000/svg",
12
+ className: o("h-6 w-6", t),
13
+ children: /* @__PURE__ */ r(
14
+ "path",
15
+ {
16
+ d: "M6.75729 17.2426L11.9999 12M17.2426 6.75736L11.9999 12M11.9999 12L6.75729 6.75736M11.9999 12L17.2426 17.2426",
17
+ stroke: "currentColor",
18
+ strokeWidth: "2",
19
+ strokeLinecap: "square"
20
+ }
21
+ )
22
+ }
23
+ );
24
+ }
25
+ export {
26
+ n as XMark
27
+ };
@@ -2,14 +2,15 @@ import { VariantProps } from 'class-variance-authority';
2
2
  import * as React from "react";
3
3
  export declare const inputVariants: (props?: ({
4
4
  error?: boolean | null | undefined;
5
+ isLabel?: boolean | null | undefined;
5
6
  isFocused?: boolean | null | undefined;
7
+ variant?: "default" | "floating-label" | null | undefined;
6
8
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
7
9
  export declare const iconVariants: (props?: ({
8
10
  disabled?: boolean | null | undefined;
9
- error?: boolean | null | undefined;
10
11
  position?: "end" | "start" | null | undefined;
11
12
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
12
- export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style">, VariantProps<typeof inputVariants> {
13
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "className" | "style" | "placeholder">, VariantProps<typeof inputVariants> {
13
14
  /**
14
15
  * If true, the input will display in an error state with error styling
15
16
  */
@@ -49,6 +50,29 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
49
50
  * @default false
50
51
  */
51
52
  isFocused?: boolean;
53
+ /**
54
+ * Additional class name for the input
55
+ */
56
+ className?: string;
57
+ /**
58
+ * Label text to be displayed above the input
59
+ */
60
+ label?: string;
61
+ /**
62
+ * Variant of the input
63
+ * @default "default"
64
+ */
65
+ variant?: "default" | "floating-label";
66
+ /**
67
+ * If true, the dividers will be shown
68
+ * @default true
69
+ */
70
+ showStartDivider?: boolean;
71
+ /**
72
+ * If true, the end divider will be shown
73
+ * @default true
74
+ */
75
+ showEndDivider?: boolean;
52
76
  }
53
77
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
54
78
  export default Input;
@@ -1,98 +1,163 @@
1
- import { jsxs as b, jsx as r } from "react/jsx-runtime";
2
- import { cva as u } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
3
- import * as y from "react";
4
- import { cn as i } from "../../lib/utils.js";
5
- import { Tick as x } from "../Icons/Tick.js";
6
- const l = 1.5, h = u(
7
- "peer h-[3.125rem] font-sans w-full rounded-xl border-2 border-gray-100 bg-gray-100 px-2.5 py-4 text-base leading-none text-gray-900 outline-none transition duration-300 file:hidden placeholder:focus:border-gray-200 focus:bg-gray-0 focus:shadow-card focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { cva as c } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
3
+ import * as L from "react";
4
+ import { cn as e } from "../../lib/utils.js";
5
+ import { Tick as R } from "../Icons/Tick.js";
6
+ import { typographyVariants as y } from "../Typography/Typography.js";
7
+ const d = 1.5, F = c(
8
+ e(
9
+ "peer h-[3.5rem] w-full rounded-[0.625rem] border border-gray-100 bg-gray-100 px-4 outline-none transition duration-300",
10
+ "file:hidden",
11
+ "invalid:border-error-600 invalid:focus:border-error-600 invalid:bg-gray-0",
12
+ "placeholder:text-gray-500",
13
+ "focus:border-gray-300 focus:bg-gray-0 focus-visible:outline-none",
14
+ "disabled:cursor-not-allowed disabled:opacity-50"
15
+ ),
8
16
  {
9
17
  variants: {
10
18
  error: {
11
- true: "border-error-700 bg-error-100 focus:border-error-700 focus:bg-error-100"
19
+ true: "border-error-600 focus:border-error-600 bg-gray-0"
20
+ },
21
+ isLabel: {
22
+ true: "pt-6 pb-2 placeholder:text-transparent",
23
+ false: ""
12
24
  },
13
25
  isFocused: {
14
- true: "border-gray-200 bg-gray-0 shadow-card",
26
+ true: "focus:border-gray-300 focus:bg-gray-0 focus-visible:outline-none",
15
27
  false: ""
28
+ },
29
+ variant: {
30
+ "floating-label": "pt-6 pb-2 placeholder:text-transparent",
31
+ default: ""
16
32
  }
17
33
  },
18
34
  defaultVariants: {
19
35
  error: !1,
20
- isFocused: !1
36
+ isFocused: !1,
37
+ variant: "default"
21
38
  }
22
39
  }
23
- ), d = u(
40
+ ), v = c(
24
41
  "absolute top-1 bottom-1 flex items-center justify-center overflow-hidden text-gray-400",
25
42
  {
26
43
  variants: {
27
44
  disabled: {
28
45
  true: "text-gray-300 cursor-not-allowed"
29
46
  },
30
- error: {
31
- true: "text-error-700"
32
- },
33
47
  position: {
34
- start: "left-1",
35
- end: "right-1"
48
+ start: "left-0",
49
+ end: "right-0"
36
50
  }
51
+ }
52
+ }
53
+ ), h = c("border-r h-[1.625rem] absolute", {
54
+ variants: {
55
+ position: {
56
+ start: "left-0",
57
+ end: "right-0"
37
58
  },
38
- defaultVariants: {
39
- error: !1
59
+ error: {
60
+ true: "border-error-600",
61
+ false: "border-gray-300"
40
62
  }
63
+ },
64
+ defaultVariants: {
65
+ error: !1
41
66
  }
42
- ), w = y.forwardRef(
67
+ }), T = L.forwardRef(
43
68
  ({
44
- type: f = "text",
45
- error: e,
46
- startAdornment: t,
69
+ type: x = "text",
70
+ error: t,
71
+ startAdornment: a,
47
72
  endAdornment: o,
48
- isValid: a,
49
- startAdornmentWidth: c = l,
50
- endAdornmentWidth: n = l,
51
- isFocused: p = !1,
52
- disabled: s,
53
- ...g
54
- }, m) => /* @__PURE__ */ b("div", { className: "relative flex w-full items-center group", children: [
55
- t && /* @__PURE__ */ r(
73
+ isValid: s,
74
+ startAdornmentWidth: l = d,
75
+ endAdornmentWidth: p = d,
76
+ disabled: i,
77
+ className: N,
78
+ label: f,
79
+ id: u,
80
+ showStartDivider: b,
81
+ showEndDivider: g,
82
+ variant: m = "default",
83
+ ...w
84
+ }, $) => /* @__PURE__ */ n("div", { className: "relative flex w-full items-center group", children: [
85
+ a && /* @__PURE__ */ n(
56
86
  "div",
57
87
  {
58
- className: i(d({ error: e, disabled: s, position: "start" })),
59
- style: { width: `${c + 0.75}rem` },
60
- children: t
88
+ className: e(v({ disabled: i, position: "start" })),
89
+ style: { width: `${l + 1}rem` },
90
+ children: [
91
+ a,
92
+ b && /* @__PURE__ */ r("div", { className: h({ position: "end", error: t }) })
93
+ ]
61
94
  }
62
95
  ),
63
96
  /* @__PURE__ */ r(
64
97
  "input",
65
98
  {
66
- ref: m,
67
- type: f,
68
- disabled: s,
69
- className: i(h({ error: e, isFocused: p })),
70
- ...g,
99
+ ref: $,
100
+ id: u,
101
+ type: x,
102
+ placeholder: f,
103
+ disabled: i,
104
+ className: e(
105
+ F({ error: t, isLabel: m === "floating-label" }),
106
+ y({ variant: "body", level: 3 }),
107
+ N
108
+ ),
109
+ ...w,
71
110
  style: {
72
- ...t && {
73
- paddingLeft: `${1 + c}rem`
111
+ ...a && {
112
+ paddingLeft: `${(b ? 1.6 : 1) + l}rem`
74
113
  },
75
114
  ...o && {
76
- paddingRight: `${1 + n}rem`
115
+ paddingRight: `${(g ? 1.6 : 1) + p}rem`
77
116
  },
78
- ...a && { paddingRight: `${1 + l}rem` }
117
+ ...s && { paddingRight: `${1 + d}rem` }
79
118
  }
80
119
  }
81
120
  ),
82
- (a || o) && /* @__PURE__ */ r(
121
+ (s || o) && /* @__PURE__ */ n(
83
122
  "div",
84
123
  {
85
- className: i(d({ error: e, disabled: s, position: "end" })),
86
- style: { width: `${n + 0.75}rem` },
87
- children: a ? /* @__PURE__ */ r(x, { className: "text-success-700" }) : o
124
+ className: e(v({ disabled: i, position: "end" })),
125
+ style: { width: `${p + 1}rem` },
126
+ children: [
127
+ s ? /* @__PURE__ */ r(R, { className: "text-success-700" }) : o,
128
+ g && /* @__PURE__ */ r("div", { className: h({ position: "start", error: t }) })
129
+ ]
130
+ }
131
+ ),
132
+ m === "floating-label" && /* @__PURE__ */ r(
133
+ "label",
134
+ {
135
+ htmlFor: u,
136
+ className: e(
137
+ y({ variant: "body", level: 3 }),
138
+ e(
139
+ // Initial state
140
+ "peer-placeholder-shown:text-sm peer-placeholder-shown:translate-y-0",
141
+ "peer-focus:-translate-y-[0.6rem] peer-focus:text-xs",
142
+ // End state
143
+ "absolute text-gray-500 duration-300 transform text-xs",
144
+ "-translate-y-[0.6rem] z-10 pl-4"
145
+ )
146
+ ),
147
+ style: {
148
+ ...a && {
149
+ paddingLeft: `${1 + l}rem`
150
+ }
151
+ },
152
+ children: f
88
153
  }
89
154
  )
90
155
  ] })
91
156
  );
92
- w.displayName = "Input";
157
+ T.displayName = "Input";
93
158
  export {
94
- w as Input,
95
- w as default,
96
- d as iconVariants,
97
- h as inputVariants
159
+ T as Input,
160
+ T as default,
161
+ v as iconVariants,
162
+ F as inputVariants
98
163
  };
@@ -1,9 +1,20 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- declare const listItemStyles: (props?: ({
3
- variant?: "ghost" | "duotone" | "outline" | null | undefined;
4
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
- interface ListItemProps extends VariantProps<typeof listItemStyles>, Omit<React.HTMLAttributes<HTMLDivElement>, "className" | "style"> {
1
+ /**
2
+ * Props for the ListItem component
3
+ * @extends {Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style">}
4
+ */
5
+ interface ListItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "className" | "style"> {
6
+ /** The main text label to display */
7
+ label?: string;
8
+ /** Secondary descriptive text to show below the label */
9
+ description?: string;
10
+ /** Content to render at the start/left of the list item */
11
+ startAdornment?: React.ReactNode;
12
+ /** Content to render at the end/right of the list item */
13
+ endAdornment?: React.ReactNode;
14
+ /** Child content to render inside the list item */
6
15
  children?: React.ReactNode;
16
+ /** Whether the list item is disabled */
17
+ disabled?: boolean;
7
18
  }
8
- export declare const ListItem: import('react').ForwardRefExoticComponent<ListItemProps & import('react').RefAttributes<HTMLDivElement>>;
19
+ export declare const ListItem: import('react').ForwardRefExoticComponent<ListItemProps & import('react').RefAttributes<HTMLButtonElement>>;
9
20
  export default ListItem;
@@ -1,25 +1,32 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { cva as s } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
3
- import { forwardRef as i } from "react";
4
- const m = s(
5
- "h-16 p-4 rounded-[0.875rem] flex items-center text-gray-900 w-full",
6
- {
7
- variants: {
8
- variant: {
9
- duotone: "bg-gray-50",
10
- outline: "border border-gray-200",
11
- ghost: ""
12
- }
13
- },
14
- defaultVariants: {
15
- variant: "duotone"
16
- }
17
- }
18
- ), n = i(
19
- ({ children: t, variant: r, ...e }, a) => /* @__PURE__ */ o("div", { ref: a, className: m({ variant: r }), ...e, children: t })
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { cn as f } from "../../lib/utils.js";
3
+ import { cva as x } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
4
+ import { forwardRef as n } from "react";
5
+ import { Typography as m } from "../Typography/Typography.js";
6
+ const d = x(
7
+ "h-[4.75rem] bg-gray-50 p-4 rounded-2xl flex items-center text-gray-900 w-full disabled:text-gray-400 disabled:cursor-not-allowed"
8
+ ), g = n(
9
+ ({ children: h, label: t, description: l, startAdornment: r, endAdornment: a, disabled: s, ...c }, o) => /* @__PURE__ */ i("button", { ref: o, className: d(), ...c, disabled: s, children: [
10
+ r && /* @__PURE__ */ e("div", { className: "mr-3 flex-shrink-0", children: r }),
11
+ /* @__PURE__ */ i("div", { className: "flex flex-col flex-grow min-w-0 items-start gap-0.5", children: [
12
+ t && /* @__PURE__ */ e(m, { variant: "subtitle", level: 2, className: "truncate grow w-full text-left", children: t }),
13
+ l && /* @__PURE__ */ e(
14
+ m,
15
+ {
16
+ level: 4,
17
+ className: f(
18
+ "truncate grow w-full text-left",
19
+ s ? "text-gray-400" : "text-gray-500"
20
+ ),
21
+ children: l
22
+ }
23
+ )
24
+ ] }),
25
+ a && /* @__PURE__ */ e("div", { className: "ml-4 flex-shrink-0", children: a })
26
+ ] })
20
27
  );
21
- n.displayName = "ListItem";
28
+ g.displayName = "ListItem";
22
29
  export {
23
- n as ListItem,
24
- n as default
30
+ g as ListItem,
31
+ g as default
25
32
  };
@@ -0,0 +1,2 @@
1
+ export declare const Marble: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & import('react').RefAttributes<HTMLImageElement>>;
2
+ export default Marble;
@@ -0,0 +1,23 @@
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { cn as t } from "../../lib/utils.js";
3
+ import { forwardRef as m } from "react";
4
+ const l = m((r, e) => {
5
+ const { className: a, ...o } = r;
6
+ return /* @__PURE__ */ s(
7
+ "img",
8
+ {
9
+ ref: e,
10
+ alt: "Marble",
11
+ className: t(
12
+ "rounded-full border-2 border-gray-100 p-[3px] aspect-square w-[7.5rem] object-cover",
13
+ a
14
+ ),
15
+ ...o
16
+ }
17
+ );
18
+ });
19
+ l.displayName = "Marble";
20
+ export {
21
+ l as Marble,
22
+ l as default
23
+ };
@@ -0,0 +1 @@
1
+ export * from './Marble';
@@ -0,0 +1,4 @@
1
+ import { Marble as o } from "./Marble.js";
2
+ export {
3
+ o as Marble
4
+ };
@@ -1,8 +1 @@
1
- interface DeleteProps {
2
- /**
3
- * Additional CSS classes to apply to the Delete icon
4
- */
5
- className?: string;
6
- }
7
- export declare function Delete({ className }: DeleteProps): import("react/jsx-runtime").JSX.Element;
8
- export {};
1
+ export declare function Delete(props: React.SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- function r({ className: e }) {
3
- return /* @__PURE__ */ t(
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ function o(t) {
3
+ return /* @__PURE__ */ e(
4
4
  "svg",
5
5
  {
6
6
  width: "24",
@@ -8,20 +8,19 @@ function r({ className: e }) {
8
8
  viewBox: "0 0 24 24",
9
9
  fill: "none",
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
- className: e,
12
- "data-testid": "delete-icon",
13
- children: /* @__PURE__ */ t(
11
+ ...t,
12
+ children: /* @__PURE__ */ e(
14
13
  "path",
15
14
  {
16
- d: "M17 9L14 12M14 12L11 15M14 12L11 9M14 12L17 15M3.52405 15.4403L7.34938 18.8689C8.16293 19.5981 9.2072 20 10.2882 20H17.5371C20.0019 20 22 17.9533 22 15.4286V8.57143C22 6.0467 20.0019 4 17.5371 4H10.2882C9.2072 4 8.16293 4.40191 7.34939 5.13108L3.52406 8.55965C1.49198 10.381 1.49198 13.619 3.52405 15.4403Z",
15
+ d: "M15 6L9 12L15 18",
17
16
  stroke: "currentColor",
18
- strokeWidth: "2",
19
- strokeLinecap: "round"
17
+ strokeWidth: "2.5",
18
+ strokeLinecap: "square"
20
19
  }
21
20
  )
22
21
  }
23
22
  );
24
23
  }
25
24
  export {
26
- r as Delete
25
+ o as Delete
27
26
  };