@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,93 +1,63 @@
1
1
  "use client";
2
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import { jsxs as d, jsx as r } from "react/jsx-runtime";
3
3
  import { DROPDOWN_CONTAINER_STYLES as x } from "../../lib/constants/dropdownStyles.js";
4
- import { Root as N, Trigger as V, Value as S, Icon as I, Portal as R, Content as j, Viewport as A, Item as O, ItemText as T } 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";
5
- import { cva as D } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
6
- import { forwardRef as E, useState as C, useEffect as P } from "react";
4
+ import { Root as N, Trigger as S, Value as I, Icon as R, Portal as V, Content as j, Viewport as A, Item as T, ItemText as D } 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";
5
+ import { forwardRef as E, useState as C, useEffect as O } from "react";
7
6
  import { cn as t } from "../../lib/utils.js";
8
- import { typographyVariants as u } from "../Typography/Typography.js";
9
- import { ArrowDown as _ } from "./ArrowDown.js";
10
- const $ = D(
11
- "text-base flex h-[3.125rem] w-full min-w-[6rem] text-gray-900 cursor-pointer items-center justify-between whitespace-nowrap rounded-xl border-2 px-3 py-4 font-sans outline-none transition-all [&>span:first-of-type]:line-clamp-1 data-[placeholder]:text-gray-400",
12
- {
13
- variants: {
14
- isOpen: {
15
- true: "border-gray-200 bg-gray-0 shadow-card",
16
- false: "border-gray-100 bg-gray-100"
17
- },
18
- defaultValue: {
19
- true: "border-gray-200 bg-gray-0 text-gray-900",
20
- false: ""
21
- },
22
- error: {
23
- true: "shadow-none border-error-700 bg-error-100",
24
- false: ""
25
- },
26
- disabled: {
27
- true: "cursor-not-allowed opacity-20",
28
- false: ""
29
- }
30
- },
31
- defaultVariants: {
32
- isOpen: !1,
33
- defaultValue: !1,
34
- error: !1,
35
- disabled: !1
36
- }
37
- }
38
- ), k = E(
7
+ import { ArrowDown as P } from "../Icons/ArrowDown.js";
8
+ import { inputVariants as _ } from "../Input/Input.js";
9
+ import { typographyVariants as m } from "../Typography/Typography.js";
10
+ const $ = E(
39
11
  ({
40
12
  options: l = [],
41
- placeholder: g = "Select...",
42
- value: o,
43
- onChange: y,
13
+ placeholder: f = "Select...",
14
+ value: i,
15
+ onChange: h,
44
16
  open: a,
45
17
  onOpenChange: s,
46
18
  error: p = !1,
47
- defaultOpen: i = !1,
48
- disabled: n = !1,
49
- name: h,
50
- defaultValue: d,
19
+ defaultOpen: o = !1,
20
+ disabled: u = !1,
21
+ name: g,
22
+ defaultValue: y,
51
23
  ...b
52
- }, w) => {
53
- const [c, f] = C(a ?? i), v = (e) => {
54
- f(e), s == null || s(e);
24
+ }, v) => {
25
+ const [c, n] = C(a ?? o), w = (e) => {
26
+ n(e), s == null || s(e);
55
27
  };
56
- return P(() => {
57
- a !== void 0 && f(a);
58
- }, [a]), Array.isArray(l) || console.error("`options` must be an array of objects with `value` and `label` keys."), /* @__PURE__ */ m(
28
+ return O(() => {
29
+ a !== void 0 && n(a);
30
+ }, [a]), Array.isArray(l) || console.error("`options` must be an array of objects with `value` and `label` keys."), /* @__PURE__ */ d(
59
31
  N,
60
32
  {
61
- value: o,
33
+ value: i,
62
34
  open: c,
63
- onValueChange: y,
64
- defaultOpen: i,
65
- onOpenChange: v,
66
- name: h,
67
- disabled: n,
68
- defaultValue: d,
35
+ onValueChange: h,
36
+ defaultOpen: o,
37
+ onOpenChange: w,
38
+ name: g,
39
+ disabled: u,
40
+ defaultValue: y,
69
41
  ...b,
70
42
  children: [
71
- /* @__PURE__ */ m(
72
- V,
43
+ /* @__PURE__ */ d(
44
+ S,
73
45
  {
74
- ref: w,
46
+ ref: v,
75
47
  className: t(
76
- u({ variant: "body", level: 3 }),
77
- $({
78
- isOpen: c,
79
- error: p,
80
- disabled: n,
81
- defaultValue: !!d
82
- })
48
+ m({ variant: "body", level: 3 }),
49
+ _({ error: p, isFocused: c }),
50
+ "flex items-center justify-between whitespace-nowrap [&>span:first-of-type]:line-clamp-1",
51
+ "data-[placeholder]:text-gray-500",
52
+ "data-[state=closed]:bg-gray-100 data-[state=closed]:border-gray-100"
83
53
  ),
84
54
  children: [
85
- /* @__PURE__ */ r(S, { placeholder: g }),
86
- /* @__PURE__ */ r(I, { className: "h-5 w-5", children: /* @__PURE__ */ r(_, { className: "text-gray-500" }) })
55
+ /* @__PURE__ */ r(I, { placeholder: f }),
56
+ /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(P, { className: "text-gray-400 size-6" }) })
87
57
  ]
88
58
  }
89
59
  ),
90
- /* @__PURE__ */ r(R, { children: /* @__PURE__ */ r(j, { position: "popper", className: t(x), children: /* @__PURE__ */ r(
60
+ /* @__PURE__ */ r(V, { children: /* @__PURE__ */ r(j, { position: "popper", className: t(x), children: /* @__PURE__ */ r(
91
61
  A,
92
62
  {
93
63
  className: t(
@@ -95,15 +65,15 @@ const $ = D(
95
65
  l.length === 0 && "hidden"
96
66
  ),
97
67
  children: l.map((e) => /* @__PURE__ */ r(
98
- O,
68
+ T,
99
69
  {
100
70
  value: e.value,
101
71
  className: t(
102
- "w-full cursor-pointer select-none rounded-md p-2 font-sans outline-none hover:bg-gray-100",
103
- o === e.value && "bg-gray-200",
104
- u({ variant: "body", level: 2 })
72
+ "w-full cursor-pointer select-none rounded-md p-2 font-sans outline-none hover:bg-gray-50",
73
+ i === e.value && "bg-gray-100",
74
+ m({ variant: "body", level: 2 })
105
75
  ),
106
- children: /* @__PURE__ */ r(T, { children: e.label })
76
+ children: /* @__PURE__ */ r(D, { children: e.label })
107
77
  },
108
78
  `${e.value}/${e.label}`
109
79
  ))
@@ -114,8 +84,8 @@ const $ = D(
114
84
  );
115
85
  }
116
86
  );
117
- k.displayName = "Select";
87
+ $.displayName = "Select";
118
88
  export {
119
- k as Select,
120
- k as default
89
+ $ as Select,
90
+ $ as default
121
91
  };
@@ -4,5 +4,5 @@ interface SpinnerProps {
4
4
  */
5
5
  className?: string;
6
6
  }
7
- declare const Spinner: ({ className }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
8
- export default Spinner;
7
+ export declare const Spinner: ({ className }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,36 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import { cn as o } from "../../lib/utils.js";
3
+ const s = ({ className: t }) => /* @__PURE__ */ e(
4
+ "svg",
5
+ {
6
+ width: "24",
7
+ height: "24",
8
+ viewBox: "0 0 24 24",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ className: o("h-6 w-6 animate-spin text-gray-900", t),
12
+ children: [
13
+ /* @__PURE__ */ r(
14
+ "circle",
15
+ {
16
+ cx: "12",
17
+ cy: "12",
18
+ r: "10.75",
19
+ stroke: "currentColor",
20
+ strokeOpacity: "0.16",
21
+ strokeWidth: "2.5"
22
+ }
23
+ ),
24
+ /* @__PURE__ */ r(
25
+ "path",
26
+ {
27
+ d: "M17.8921 1.54613C16.1312 0.553676 14.1482 0.0220795 12.1271 0.000672984C10.1059 -0.0207335 8.11211 0.468744 6.33065 1.42368L7.50987 3.62356C8.92079 2.86725 10.4999 2.47958 12.1007 2.49653C13.7014 2.51349 15.2719 2.93451 16.6665 3.72054L17.8921 1.54613Z",
28
+ fill: "currentColor"
29
+ }
30
+ )
31
+ ]
32
+ }
33
+ );
34
+ export {
35
+ s as Spinner
36
+ };
@@ -0,0 +1 @@
1
+ export * from './Spinner';
@@ -0,0 +1,4 @@
1
+ import { Spinner as n } from "./Spinner.js";
2
+ export {
3
+ n as Spinner
4
+ };
@@ -10,7 +10,7 @@ const n = l(
10
10
  checked: e,
11
11
  onCheckedChange: t,
12
12
  disabled: r,
13
- className: "relative inline-flex h-auto w-10 items-center rounded-full border-2 transition-all data-[state=checked]:border-gray-900 data-[state=checked]:bg-gray-900 data-[state=unchecked]:border-gray-300 data-[state=unchecked]:bg-gray-300 disabled:cursor-not-allowed disabled:opacity-20",
13
+ className: "relative inline-flex h-6 w-10 items-center rounded-full border-2 transition-all data-[state=checked]:border-gray-900 data-[state=checked]:bg-gray-900 data-[state=unchecked]:border-gray-300 data-[state=unchecked]:bg-gray-300 disabled:cursor-not-allowed disabled:opacity-20",
14
14
  ...d,
15
15
  children: /* @__PURE__ */ a(c, { className: "bg-gray-0 block h-5 w-5 transform rounded-full transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0" })
16
16
  }
@@ -0,0 +1,11 @@
1
+ import { TabItemProps, TabsProps } from './types';
2
+ import * as React from "react";
3
+ /**
4
+ * A tab navigation component that allows users to switch between different views
5
+ */
6
+ declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
7
+ /**
8
+ * Individual tab item that can be selected
9
+ */
10
+ declare const TabItem: React.ForwardRefExoticComponent<TabItemProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export { Tabs, TabItem };
@@ -0,0 +1,58 @@
1
+ "use client";
2
+ import { jsx as t, jsxs as m } from "react/jsx-runtime";
3
+ import { Slot as s } 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
+ import { Root as c, Item as f } from "../../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";
5
+ import * as n from "react";
6
+ import { cn as o } from "../../lib/utils.js";
7
+ import { Typography as d } from "../Typography/Typography.js";
8
+ const p = n.forwardRef(
9
+ ({ children: r, ...a }, e) => /* @__PURE__ */ t(
10
+ c,
11
+ {
12
+ ref: e,
13
+ type: "single",
14
+ className: "flex w-full justify-between px-5 items-center",
15
+ ...a,
16
+ children: /* @__PURE__ */ t("div", { className: "flex w-full", children: r })
17
+ }
18
+ )
19
+ );
20
+ p.displayName = "Tabs";
21
+ const x = n.forwardRef(
22
+ ({ icon: r, label: a, activeIcon: e, ...l }, i) => /* @__PURE__ */ m(
23
+ f,
24
+ {
25
+ ref: i,
26
+ className: o(
27
+ "flex-1 flex flex-col items-center gap-1 relative min-w-0 group",
28
+ "focus:outline-none transition-colors duration-200",
29
+ "text-gray-350 hover:text-gray-500 data-[state=on]:text-gray-900"
30
+ ),
31
+ ...l,
32
+ children: [
33
+ /* @__PURE__ */ t(
34
+ s,
35
+ {
36
+ className: o("h-[1.625rem] shrink-0", e && "group-data-[state=on]:hidden"),
37
+ children: r
38
+ }
39
+ ),
40
+ e && /* @__PURE__ */ t(s, { className: "h-[1.625rem] shrink-0 hidden group-data-[state=on]:block", children: e }),
41
+ a && /* @__PURE__ */ t(
42
+ d,
43
+ {
44
+ as: "span",
45
+ variant: "subtitle",
46
+ className: "text-2xs truncate w-full text-center px-1 leading-none",
47
+ children: a
48
+ }
49
+ )
50
+ ]
51
+ }
52
+ )
53
+ );
54
+ x.displayName = "TabItem";
55
+ export {
56
+ x as TabItem,
57
+ p as Tabs
58
+ };
@@ -0,0 +1,2 @@
1
+ export * from './Tabs';
2
+ export * from './types';
@@ -0,0 +1,5 @@
1
+ import { TabItem as e, Tabs as m } from "./Tabs.js";
2
+ export {
3
+ e as TabItem,
4
+ m as Tabs
5
+ };
@@ -0,0 +1,53 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import * as ToggleGroup from "@radix-ui/react-toggle-group";
3
+ type BaseToggleGroupProps = ComponentPropsWithoutRef<typeof ToggleGroup.Root>;
4
+ type BaseToggleGroupItemProps = ComponentPropsWithoutRef<typeof ToggleGroup.Item>;
5
+ export interface TabsProps extends Omit<BaseToggleGroupProps, "type" | "size" | "orientation"> {
6
+ /**
7
+ * Whether the toggle group is disabled
8
+ */
9
+ disabled?: boolean;
10
+ /**
11
+ * Whether the toggle group should loop when navigating through items
12
+ */
13
+ loop?: boolean;
14
+ /**
15
+ * The default selected tab value
16
+ */
17
+ defaultValue?: string;
18
+ /**
19
+ * The selected tab value
20
+ */
21
+ value?: string;
22
+ /**
23
+ * Callback when tab selection changes
24
+ */
25
+ onValueChange?: (value: string) => void;
26
+ /**
27
+ * The tab items
28
+ */
29
+ children?: ReactNode;
30
+ }
31
+ export interface TabItemProps extends Omit<BaseToggleGroupItemProps, "className" | "children"> {
32
+ /**
33
+ * The icon to display
34
+ */
35
+ icon: ReactNode;
36
+ /**
37
+ * The icon to display when the tab item is active
38
+ */
39
+ activeIcon?: ReactNode;
40
+ /**
41
+ * The label text
42
+ */
43
+ label?: string;
44
+ /**
45
+ * Whether the tab item is disabled
46
+ */
47
+ disabled?: boolean;
48
+ /**
49
+ * The value of the tab item
50
+ */
51
+ value: string;
52
+ }
53
+ export {};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,25 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import { inputVariants } from '../Input/Input';
3
+ import * as React from "react";
4
+ export interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "className" | "style" | "placeholder">, VariantProps<typeof inputVariants> {
5
+ /**
6
+ * If true, the textarea will display in an error state with error styling
7
+ */
8
+ error?: boolean;
9
+ /**
10
+ * If true, the textarea will display in a focused state with focus styling
11
+ * @default false
12
+ */
13
+ isFocused?: boolean;
14
+ /**
15
+ * The label text for the textarea
16
+ */
17
+ label?: string;
18
+ /**
19
+ * Variant of the input
20
+ * @default "default"
21
+ */
22
+ variant?: "default" | "floating-label";
23
+ }
24
+ export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
25
+ export default TextArea;
@@ -0,0 +1,54 @@
1
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
2
+ import { cva as d } from "../../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js";
3
+ import * as c from "react";
4
+ import { cn as r } from "../../lib/utils.js";
5
+ import { inputVariants as x } from "../Input/Input.js";
6
+ import { typographyVariants as l } from "../Typography/Typography.js";
7
+ const u = d("min-h-[7.5rem] resize-y", {
8
+ variants: {
9
+ variant: {
10
+ "floating-label": "pt-8",
11
+ default: "pt-4"
12
+ }
13
+ }
14
+ }), b = c.forwardRef(
15
+ ({ error: s, isFocused: m = !1, disabled: p, label: t, variant: e = "default", id: a, ...i }, f) => /* @__PURE__ */ n("div", { className: "relative flex w-full items-center group", children: [
16
+ /* @__PURE__ */ o(
17
+ "textarea",
18
+ {
19
+ ref: f,
20
+ id: a,
21
+ placeholder: t,
22
+ disabled: p,
23
+ className: r(
24
+ x({ error: s, isFocused: m, variant: e }),
25
+ l({ variant: "body", level: 3 }),
26
+ u({ variant: e })
27
+ ),
28
+ ...i
29
+ }
30
+ ),
31
+ e === "floating-label" && /* @__PURE__ */ o(
32
+ "label",
33
+ {
34
+ htmlFor: a,
35
+ className: r(
36
+ l({ variant: "body", level: 3 }),
37
+ r(
38
+ // Initial state
39
+ "peer-placeholder-shown:text-sm",
40
+ "peer-focus:text-xs peer-focus:border-gray-300 peer-focus:bg-gray-0",
41
+ // End state
42
+ "absolute text-gray-500 duration-300 transform text-xs top-0 pt-4 z-10 pl-4 w-full bg-gray-100 rounded-t-[0.625rem] border-t border-x border-gray-100"
43
+ )
44
+ ),
45
+ children: t
46
+ }
47
+ )
48
+ ] })
49
+ );
50
+ b.displayName = "TextArea";
51
+ export {
52
+ b as TextArea,
53
+ b as default
54
+ };
@@ -0,0 +1 @@
1
+ export { default } from './TextArea';
@@ -0,0 +1,4 @@
1
+ import { TextArea as r } from "./TextArea.js";
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,9 @@
1
+ import * as ToastPrimitives from "@radix-ui/react-toast";
2
+ import * as React from "react";
3
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
4
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
5
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & {
6
+ variant: "success" | "error";
7
+ } & React.RefAttributes<HTMLLIElement>>;
8
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
9
+ export { type ToastProps, ToastProvider, ToastViewport, Toast };
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
3
+ import { cn as s } from "../../lib/utils.js";
4
+ import { Viewport as o, Root as i, Provider as p } from "../../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";
5
+ import * as l from "react";
6
+ import { Fail as c } from "../Icons/Fail.js";
7
+ import { Success as f } from "../Icons/Success.js";
8
+ import { Typography as u } from "../Typography/Typography.js";
9
+ const b = p, x = l.forwardRef(({ className: r, ...a }, t) => /* @__PURE__ */ e(
10
+ o,
11
+ {
12
+ ref: t,
13
+ className: s(
14
+ "fixed top-0 z-[100] flex max-h-screen w-full p-4 right-0 left-0 flex-col",
15
+ r
16
+ ),
17
+ ...a
18
+ }
19
+ ));
20
+ x.displayName = o.displayName;
21
+ const v = l.forwardRef(({ className: r, title: a, variant: t, ...d }, n) => /* @__PURE__ */ e(
22
+ i,
23
+ {
24
+ ref: n,
25
+ className: s(
26
+ "group pointer-events-auto relative flex w-full items-center justify-center",
27
+ "transition-all",
28
+ "data-[swipe=cancel]:translate-x-0",
29
+ "data-[swipe=end]:animate-out",
30
+ "data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)]",
31
+ "data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)]",
32
+ "data-[swipe=move]:transition-none",
33
+ "data-[state=closed]:animate-out",
34
+ "data-[state=closed]:slide-out-to-top-full",
35
+ "data-[state=closed]:fade-out-50",
36
+ "data-[state=open]:animate-in",
37
+ "data-[state=open]:slide-in-from-top-full"
38
+ ),
39
+ ...d,
40
+ children: /* @__PURE__ */ m("div", { className: "grid grid-cols-[auto_1fr] items-center gap-2 rounded-full bg-gray-0 h-9 pl-2 pr-3 border border-gray-200 shrink-0 text-gray-900", children: [
41
+ t === "success" ? /* @__PURE__ */ e(f, {}) : /* @__PURE__ */ e(c, {}),
42
+ /* @__PURE__ */ e("div", { className: "flex flex-1 items-center", children: /* @__PURE__ */ e(u, { variant: "subtitle", level: 3, children: a }) })
43
+ ] })
44
+ }
45
+ ));
46
+ v.displayName = i.displayName;
47
+ export {
48
+ v as Toast,
49
+ b as ToastProvider,
50
+ x as ToastViewport
51
+ };
@@ -0,0 +1,3 @@
1
+ export declare function Toaster({ duration }: {
2
+ duration?: number;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsxs as i, jsx as o } from "react/jsx-runtime";
3
+ import { ToastProvider as a, Toast as m, ToastViewport as n } from "./Toast.js";
4
+ import { useToast as p } from "./use-toast.js";
5
+ function u({ duration: t }) {
6
+ const { toasts: r } = p();
7
+ return /* @__PURE__ */ i(a, { duration: t, children: [
8
+ r.map(({ id: s, ...e }) => /* @__PURE__ */ o(m, { ...e }, s)),
9
+ /* @__PURE__ */ o(n, {})
10
+ ] });
11
+ }
12
+ export {
13
+ u as Toaster
14
+ };
@@ -0,0 +1,3 @@
1
+ export * from './Toast';
2
+ export * from './Toaster';
3
+ export * from './use-toast';
@@ -0,0 +1,12 @@
1
+ import { Toast as t, ToastProvider as e, ToastViewport as s } from "./Toast.js";
2
+ import { Toaster as T } from "./Toaster.js";
3
+ import { reducer as f, toast as m, useToast as x } from "./use-toast.js";
4
+ export {
5
+ t as Toast,
6
+ e as ToastProvider,
7
+ s as ToastViewport,
8
+ T as Toaster,
9
+ f as reducer,
10
+ m as toast,
11
+ x as useToast
12
+ };
@@ -0,0 +1,51 @@
1
+ import { ToastProps } from './Toast';
2
+ type ToasterToast = ToastProps & {
3
+ id: string;
4
+ };
5
+ declare const actionTypes: {
6
+ readonly ADD_TOAST: "ADD_TOAST";
7
+ readonly UPDATE_TOAST: "UPDATE_TOAST";
8
+ readonly DISMISS_TOAST: "DISMISS_TOAST";
9
+ readonly REMOVE_TOAST: "REMOVE_TOAST";
10
+ };
11
+ type ActionType = typeof actionTypes;
12
+ type Action = {
13
+ type: ActionType["ADD_TOAST"];
14
+ toast: ToasterToast;
15
+ } | {
16
+ type: ActionType["UPDATE_TOAST"];
17
+ toast: Partial<ToasterToast>;
18
+ } | {
19
+ type: ActionType["DISMISS_TOAST"];
20
+ toastId?: ToasterToast["id"];
21
+ } | {
22
+ type: ActionType["REMOVE_TOAST"];
23
+ toastId?: ToasterToast["id"];
24
+ };
25
+ interface State {
26
+ toasts: ToasterToast[];
27
+ }
28
+ export declare const reducer: (state: State, action: Action) => State;
29
+ type Toast = Omit<ToasterToast, "id">;
30
+ declare const toast: ({ ...props }: Toast) => {
31
+ id: string;
32
+ dismiss: () => void;
33
+ update: (props: ToasterToast) => void;
34
+ };
35
+ declare function useToast(): {
36
+ toast: {
37
+ success: (props: Omit<Toast, "variant">) => {
38
+ id: string;
39
+ dismiss: () => void;
40
+ update: (props: ToasterToast) => void;
41
+ };
42
+ error: (props: Omit<Toast, "variant">) => {
43
+ id: string;
44
+ dismiss: () => void;
45
+ update: (props: ToasterToast) => void;
46
+ };
47
+ };
48
+ dismiss: (toastId?: string) => void;
49
+ toasts: ToasterToast[];
50
+ };
51
+ export { useToast, toast };