@metamask-previews/design-system-react-native 0.6.0-preview.3dc70e1 → 0.9.0-preview.694a8ed

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 (483) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/dist/components/ActionListItem/ActionListItem.cjs +86 -0
  3. package/dist/components/ActionListItem/ActionListItem.cjs.map +1 -0
  4. package/dist/components/ActionListItem/ActionListItem.d.cts +4 -0
  5. package/dist/components/ActionListItem/ActionListItem.d.cts.map +1 -0
  6. package/dist/components/ActionListItem/ActionListItem.d.mts +4 -0
  7. package/dist/components/ActionListItem/ActionListItem.d.mts.map +1 -0
  8. package/dist/components/ActionListItem/ActionListItem.mjs +66 -0
  9. package/dist/components/ActionListItem/ActionListItem.mjs.map +1 -0
  10. package/dist/components/ActionListItem/ActionListItem.types.cjs +3 -0
  11. package/dist/components/ActionListItem/ActionListItem.types.cjs.map +1 -0
  12. package/dist/components/ActionListItem/ActionListItem.types.d.cts +73 -0
  13. package/dist/components/ActionListItem/ActionListItem.types.d.cts.map +1 -0
  14. package/dist/components/ActionListItem/ActionListItem.types.d.mts +73 -0
  15. package/dist/components/ActionListItem/ActionListItem.types.d.mts.map +1 -0
  16. package/dist/components/ActionListItem/ActionListItem.types.mjs +2 -0
  17. package/dist/components/ActionListItem/ActionListItem.types.mjs.map +1 -0
  18. package/dist/components/ActionListItem/index.cjs +6 -0
  19. package/dist/components/ActionListItem/index.cjs.map +1 -0
  20. package/dist/components/ActionListItem/index.d.cts +3 -0
  21. package/dist/components/ActionListItem/index.d.cts.map +1 -0
  22. package/dist/components/ActionListItem/index.d.mts +3 -0
  23. package/dist/components/ActionListItem/index.d.mts.map +1 -0
  24. package/dist/components/ActionListItem/index.mjs +2 -0
  25. package/dist/components/ActionListItem/index.mjs.map +1 -0
  26. package/dist/components/BadgeCount/BadgeCount.cjs +3 -3
  27. package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
  28. package/dist/components/BadgeCount/BadgeCount.constants.cjs +6 -10
  29. package/dist/components/BadgeCount/BadgeCount.constants.cjs.map +1 -1
  30. package/dist/components/BadgeCount/BadgeCount.constants.d.cts +1 -2
  31. package/dist/components/BadgeCount/BadgeCount.constants.d.cts.map +1 -1
  32. package/dist/components/BadgeCount/BadgeCount.constants.d.mts +1 -2
  33. package/dist/components/BadgeCount/BadgeCount.constants.d.mts.map +1 -1
  34. package/dist/components/BadgeCount/BadgeCount.constants.mjs +3 -7
  35. package/dist/components/BadgeCount/BadgeCount.constants.mjs.map +1 -1
  36. package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
  37. package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
  38. package/dist/components/BadgeCount/BadgeCount.mjs +3 -3
  39. package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
  40. package/dist/components/BadgeCount/BadgeCount.types.cjs.map +1 -1
  41. package/dist/components/BadgeCount/BadgeCount.types.d.cts +5 -22
  42. package/dist/components/BadgeCount/BadgeCount.types.d.cts.map +1 -1
  43. package/dist/components/BadgeCount/BadgeCount.types.d.mts +5 -22
  44. package/dist/components/BadgeCount/BadgeCount.types.d.mts.map +1 -1
  45. package/dist/components/BadgeCount/BadgeCount.types.mjs.map +1 -1
  46. package/dist/components/BadgeCount/index.cjs +2 -2
  47. package/dist/components/BadgeCount/index.cjs.map +1 -1
  48. package/dist/components/BadgeCount/index.d.cts +1 -1
  49. package/dist/components/BadgeCount/index.d.cts.map +1 -1
  50. package/dist/components/BadgeCount/index.d.mts +1 -1
  51. package/dist/components/BadgeCount/index.d.mts.map +1 -1
  52. package/dist/components/BadgeCount/index.mjs +1 -1
  53. package/dist/components/BadgeCount/index.mjs.map +1 -1
  54. package/dist/components/BadgeStatus/BadgeStatus.types.cjs.map +1 -1
  55. package/dist/components/BadgeStatus/BadgeStatus.types.d.cts +1 -1
  56. package/dist/components/BadgeStatus/BadgeStatus.types.d.cts.map +1 -1
  57. package/dist/components/BadgeStatus/BadgeStatus.types.d.mts +1 -1
  58. package/dist/components/BadgeStatus/BadgeStatus.types.d.mts.map +1 -1
  59. package/dist/components/BadgeStatus/BadgeStatus.types.mjs.map +1 -1
  60. package/dist/components/BannerBase/BannerBase.cjs +63 -0
  61. package/dist/components/BannerBase/BannerBase.cjs.map +1 -0
  62. package/dist/components/BannerBase/BannerBase.d.cts +4 -0
  63. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -0
  64. package/dist/components/BannerBase/BannerBase.d.mts +4 -0
  65. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -0
  66. package/dist/components/BannerBase/BannerBase.mjs +63 -0
  67. package/dist/components/BannerBase/BannerBase.mjs.map +1 -0
  68. package/dist/components/BannerBase/BannerBase.types.cjs +3 -0
  69. package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -0
  70. package/dist/components/BannerBase/BannerBase.types.d.cts +53 -0
  71. package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -0
  72. package/dist/components/BannerBase/BannerBase.types.d.mts +53 -0
  73. package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -0
  74. package/dist/components/BannerBase/BannerBase.types.mjs +2 -0
  75. package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -0
  76. package/dist/components/BannerBase/index.cjs +6 -0
  77. package/dist/components/BannerBase/index.cjs.map +1 -0
  78. package/dist/components/BannerBase/index.d.cts +3 -0
  79. package/dist/components/BannerBase/index.d.cts.map +1 -0
  80. package/dist/components/BannerBase/index.d.mts +3 -0
  81. package/dist/components/BannerBase/index.d.mts.map +1 -0
  82. package/dist/components/BannerBase/index.mjs +2 -0
  83. package/dist/components/BannerBase/index.mjs.map +1 -0
  84. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs +35 -0
  85. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -0
  86. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.cts +4 -0
  87. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.cts.map +1 -0
  88. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.mts +4 -0
  89. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.mts.map +1 -0
  90. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs +35 -0
  91. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -0
  92. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.cjs +12 -0
  93. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.cjs.map +1 -0
  94. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts +41 -0
  95. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts.map +1 -0
  96. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts +41 -0
  97. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts.map +1 -0
  98. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.mjs +9 -0
  99. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.mjs.map +1 -0
  100. package/dist/components/BottomSheetFooter/index.cjs +8 -0
  101. package/dist/components/BottomSheetFooter/index.cjs.map +1 -0
  102. package/dist/components/BottomSheetFooter/index.d.cts +4 -0
  103. package/dist/components/BottomSheetFooter/index.d.cts.map +1 -0
  104. package/dist/components/BottomSheetFooter/index.d.mts +4 -0
  105. package/dist/components/BottomSheetFooter/index.d.mts.map +1 -0
  106. package/dist/components/BottomSheetFooter/index.mjs +3 -0
  107. package/dist/components/BottomSheetFooter/index.mjs.map +1 -0
  108. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +27 -0
  109. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -0
  110. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs +15 -0
  111. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs.map +1 -0
  112. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts +7 -0
  113. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts.map +1 -0
  114. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts +7 -0
  115. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts.map +1 -0
  116. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs +12 -0
  117. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs.map +1 -0
  118. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts +4 -0
  119. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts.map +1 -0
  120. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts +4 -0
  121. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts.map +1 -0
  122. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +27 -0
  123. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -0
  124. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs +14 -0
  125. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs.map +1 -0
  126. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts +50 -0
  127. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts.map +1 -0
  128. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts +50 -0
  129. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts.map +1 -0
  130. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs +11 -0
  131. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs.map +1 -0
  132. package/dist/components/BottomSheetHeader/index.cjs +8 -0
  133. package/dist/components/BottomSheetHeader/index.cjs.map +1 -0
  134. package/dist/components/BottomSheetHeader/index.d.cts +4 -0
  135. package/dist/components/BottomSheetHeader/index.d.cts.map +1 -0
  136. package/dist/components/BottomSheetHeader/index.d.mts +4 -0
  137. package/dist/components/BottomSheetHeader/index.d.mts.map +1 -0
  138. package/dist/components/BottomSheetHeader/index.mjs +3 -0
  139. package/dist/components/BottomSheetHeader/index.mjs.map +1 -0
  140. package/dist/components/ButtonHero/ButtonHero.cjs +37 -0
  141. package/dist/components/ButtonHero/ButtonHero.cjs.map +1 -0
  142. package/dist/components/ButtonHero/ButtonHero.d.cts +13 -0
  143. package/dist/components/ButtonHero/ButtonHero.d.cts.map +1 -0
  144. package/dist/components/ButtonHero/ButtonHero.d.mts +13 -0
  145. package/dist/components/ButtonHero/ButtonHero.d.mts.map +1 -0
  146. package/dist/components/ButtonHero/ButtonHero.mjs +37 -0
  147. package/dist/components/ButtonHero/ButtonHero.mjs.map +1 -0
  148. package/dist/components/ButtonHero/ButtonHero.types.cjs +3 -0
  149. package/dist/components/ButtonHero/ButtonHero.types.cjs.map +1 -0
  150. package/dist/components/ButtonHero/ButtonHero.types.d.cts +3 -0
  151. package/dist/components/ButtonHero/ButtonHero.types.d.cts.map +1 -0
  152. package/dist/components/ButtonHero/ButtonHero.types.d.mts +3 -0
  153. package/dist/components/ButtonHero/ButtonHero.types.d.mts.map +1 -0
  154. package/dist/components/ButtonHero/ButtonHero.types.mjs +2 -0
  155. package/dist/components/ButtonHero/ButtonHero.types.mjs.map +1 -0
  156. package/dist/components/ButtonHero/index.cjs +8 -0
  157. package/dist/components/ButtonHero/index.cjs.map +1 -0
  158. package/dist/components/ButtonHero/index.d.cts +4 -0
  159. package/dist/components/ButtonHero/index.d.cts.map +1 -0
  160. package/dist/components/ButtonHero/index.d.mts +4 -0
  161. package/dist/components/ButtonHero/index.d.mts.map +1 -0
  162. package/dist/components/ButtonHero/index.mjs +3 -0
  163. package/dist/components/ButtonHero/index.mjs.map +1 -0
  164. package/dist/components/ButtonSemantic/ButtonSemantic.cjs +64 -0
  165. package/dist/components/ButtonSemantic/ButtonSemantic.cjs.map +1 -0
  166. package/dist/components/ButtonSemantic/ButtonSemantic.constants.cjs +17 -0
  167. package/dist/components/ButtonSemantic/ButtonSemantic.constants.cjs.map +1 -0
  168. package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.cts +5 -0
  169. package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.cts.map +1 -0
  170. package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.mts +5 -0
  171. package/dist/components/ButtonSemantic/ButtonSemantic.constants.d.mts.map +1 -0
  172. package/dist/components/ButtonSemantic/ButtonSemantic.constants.mjs +14 -0
  173. package/dist/components/ButtonSemantic/ButtonSemantic.constants.mjs.map +1 -0
  174. package/dist/components/ButtonSemantic/ButtonSemantic.d.cts +4 -0
  175. package/dist/components/ButtonSemantic/ButtonSemantic.d.cts.map +1 -0
  176. package/dist/components/ButtonSemantic/ButtonSemantic.d.mts +4 -0
  177. package/dist/components/ButtonSemantic/ButtonSemantic.d.mts.map +1 -0
  178. package/dist/components/ButtonSemantic/ButtonSemantic.mjs +44 -0
  179. package/dist/components/ButtonSemantic/ButtonSemantic.mjs.map +1 -0
  180. package/dist/components/ButtonSemantic/ButtonSemantic.types.cjs +18 -0
  181. package/dist/components/ButtonSemantic/ButtonSemantic.types.cjs.map +1 -0
  182. package/dist/components/ButtonSemantic/ButtonSemantic.types.d.cts +30 -0
  183. package/dist/components/ButtonSemantic/ButtonSemantic.types.d.cts.map +1 -0
  184. package/dist/components/ButtonSemantic/ButtonSemantic.types.d.mts +30 -0
  185. package/dist/components/ButtonSemantic/ButtonSemantic.types.d.mts.map +1 -0
  186. package/dist/components/ButtonSemantic/ButtonSemantic.types.mjs +15 -0
  187. package/dist/components/ButtonSemantic/ButtonSemantic.types.mjs.map +1 -0
  188. package/dist/components/ButtonSemantic/index.cjs +8 -0
  189. package/dist/components/ButtonSemantic/index.cjs.map +1 -0
  190. package/dist/components/ButtonSemantic/index.d.cts +4 -0
  191. package/dist/components/ButtonSemantic/index.d.cts.map +1 -0
  192. package/dist/components/ButtonSemantic/index.d.mts +4 -0
  193. package/dist/components/ButtonSemantic/index.d.mts.map +1 -0
  194. package/dist/components/ButtonSemantic/index.mjs +3 -0
  195. package/dist/components/ButtonSemantic/index.mjs.map +1 -0
  196. package/dist/components/Card/Card.cjs +26 -0
  197. package/dist/components/Card/Card.cjs.map +1 -0
  198. package/dist/components/Card/Card.d.cts +4 -0
  199. package/dist/components/Card/Card.d.cts.map +1 -0
  200. package/dist/components/Card/Card.d.mts +4 -0
  201. package/dist/components/Card/Card.d.mts.map +1 -0
  202. package/dist/components/Card/Card.mjs +26 -0
  203. package/dist/components/Card/Card.mjs.map +1 -0
  204. package/dist/components/Card/Card.types.cjs +3 -0
  205. package/dist/components/Card/Card.types.cjs.map +1 -0
  206. package/dist/components/Card/Card.types.d.cts +25 -0
  207. package/dist/components/Card/Card.types.d.cts.map +1 -0
  208. package/dist/components/Card/Card.types.d.mts +25 -0
  209. package/dist/components/Card/Card.types.d.mts.map +1 -0
  210. package/dist/components/Card/Card.types.mjs +2 -0
  211. package/dist/components/Card/Card.types.mjs.map +1 -0
  212. package/dist/components/Card/index.cjs +6 -0
  213. package/dist/components/Card/index.cjs.map +1 -0
  214. package/dist/components/Card/index.d.cts +3 -0
  215. package/dist/components/Card/index.d.cts.map +1 -0
  216. package/dist/components/Card/index.d.mts +3 -0
  217. package/dist/components/Card/index.d.mts.map +1 -0
  218. package/dist/components/Card/index.mjs +2 -0
  219. package/dist/components/Card/index.mjs.map +1 -0
  220. package/dist/components/HeaderBase/HeaderBase.cjs +132 -0
  221. package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -0
  222. package/dist/components/HeaderBase/HeaderBase.constants.cjs +15 -0
  223. package/dist/components/HeaderBase/HeaderBase.constants.cjs.map +1 -0
  224. package/dist/components/HeaderBase/HeaderBase.constants.d.cts +7 -0
  225. package/dist/components/HeaderBase/HeaderBase.constants.d.cts.map +1 -0
  226. package/dist/components/HeaderBase/HeaderBase.constants.d.mts +7 -0
  227. package/dist/components/HeaderBase/HeaderBase.constants.d.mts.map +1 -0
  228. package/dist/components/HeaderBase/HeaderBase.constants.mjs +12 -0
  229. package/dist/components/HeaderBase/HeaderBase.constants.mjs.map +1 -0
  230. package/dist/components/HeaderBase/HeaderBase.d.cts +4 -0
  231. package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -0
  232. package/dist/components/HeaderBase/HeaderBase.d.mts +4 -0
  233. package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -0
  234. package/dist/components/HeaderBase/HeaderBase.mjs +112 -0
  235. package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -0
  236. package/dist/components/HeaderBase/HeaderBase.types.cjs +15 -0
  237. package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -0
  238. package/dist/components/HeaderBase/HeaderBase.types.d.cts +87 -0
  239. package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -0
  240. package/dist/components/HeaderBase/HeaderBase.types.d.mts +87 -0
  241. package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -0
  242. package/dist/components/HeaderBase/HeaderBase.types.mjs +12 -0
  243. package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -0
  244. package/dist/components/HeaderBase/index.cjs +8 -0
  245. package/dist/components/HeaderBase/index.cjs.map +1 -0
  246. package/dist/components/HeaderBase/index.d.cts +4 -0
  247. package/dist/components/HeaderBase/index.d.cts.map +1 -0
  248. package/dist/components/HeaderBase/index.d.mts +4 -0
  249. package/dist/components/HeaderBase/index.d.mts.map +1 -0
  250. package/dist/components/HeaderBase/index.mjs +3 -0
  251. package/dist/components/HeaderBase/index.mjs.map +1 -0
  252. package/dist/components/Icon/Icon.assets.cjs +2 -0
  253. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  254. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  255. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  256. package/dist/components/Icon/Icon.assets.mjs +2 -0
  257. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  258. package/dist/components/Icon/assets/corporate-fare.svg +1 -0
  259. package/dist/components/Input/Input.cjs +53 -0
  260. package/dist/components/Input/Input.cjs.map +1 -0
  261. package/dist/components/Input/Input.d.cts +10 -0
  262. package/dist/components/Input/Input.d.cts.map +1 -0
  263. package/dist/components/Input/Input.d.mts +10 -0
  264. package/dist/components/Input/Input.d.mts.map +1 -0
  265. package/dist/components/Input/Input.mjs +50 -0
  266. package/dist/components/Input/Input.mjs.map +1 -0
  267. package/dist/components/Input/Input.types.cjs +3 -0
  268. package/dist/components/Input/Input.types.cjs.map +1 -0
  269. package/dist/components/Input/Input.types.d.cts +33 -0
  270. package/dist/components/Input/Input.types.d.cts.map +1 -0
  271. package/dist/components/Input/Input.types.d.mts +33 -0
  272. package/dist/components/Input/Input.types.d.mts.map +1 -0
  273. package/dist/components/Input/Input.types.mjs +2 -0
  274. package/dist/components/Input/Input.types.mjs.map +1 -0
  275. package/dist/components/Input/index.cjs +6 -0
  276. package/dist/components/Input/index.cjs.map +1 -0
  277. package/dist/components/Input/index.d.cts +3 -0
  278. package/dist/components/Input/index.d.cts.map +1 -0
  279. package/dist/components/Input/index.d.mts +3 -0
  280. package/dist/components/Input/index.d.mts.map +1 -0
  281. package/dist/components/Input/index.mjs +2 -0
  282. package/dist/components/Input/index.mjs.map +1 -0
  283. package/dist/components/Label/Label.cjs +11 -0
  284. package/dist/components/Label/Label.cjs.map +1 -0
  285. package/dist/components/Label/Label.d.cts +4 -0
  286. package/dist/components/Label/Label.d.cts.map +1 -0
  287. package/dist/components/Label/Label.d.mts +4 -0
  288. package/dist/components/Label/Label.d.mts.map +1 -0
  289. package/dist/components/Label/Label.mjs +11 -0
  290. package/dist/components/Label/Label.mjs.map +1 -0
  291. package/dist/components/Label/Label.types.cjs +3 -0
  292. package/dist/components/Label/Label.types.cjs.map +1 -0
  293. package/dist/components/Label/Label.types.d.cts +9 -0
  294. package/dist/components/Label/Label.types.d.cts.map +1 -0
  295. package/dist/components/Label/Label.types.d.mts +9 -0
  296. package/dist/components/Label/Label.types.d.mts.map +1 -0
  297. package/dist/components/Label/Label.types.mjs +2 -0
  298. package/dist/components/Label/Label.types.mjs.map +1 -0
  299. package/dist/components/Label/index.cjs +6 -0
  300. package/dist/components/Label/index.cjs.map +1 -0
  301. package/dist/components/Label/index.d.cts +3 -0
  302. package/dist/components/Label/index.d.cts.map +1 -0
  303. package/dist/components/Label/index.d.mts +3 -0
  304. package/dist/components/Label/index.d.mts.map +1 -0
  305. package/dist/components/Label/index.mjs +2 -0
  306. package/dist/components/Label/index.mjs.map +1 -0
  307. package/dist/components/RadioButton/RadioButton.cjs +58 -0
  308. package/dist/components/RadioButton/RadioButton.cjs.map +1 -0
  309. package/dist/components/RadioButton/RadioButton.constants.cjs +12 -0
  310. package/dist/components/RadioButton/RadioButton.constants.cjs.map +1 -0
  311. package/dist/components/RadioButton/RadioButton.constants.d.cts +3 -0
  312. package/dist/components/RadioButton/RadioButton.constants.d.cts.map +1 -0
  313. package/dist/components/RadioButton/RadioButton.constants.d.mts +3 -0
  314. package/dist/components/RadioButton/RadioButton.constants.d.mts.map +1 -0
  315. package/dist/components/RadioButton/RadioButton.constants.mjs +9 -0
  316. package/dist/components/RadioButton/RadioButton.constants.mjs.map +1 -0
  317. package/dist/components/RadioButton/RadioButton.d.cts +4 -0
  318. package/dist/components/RadioButton/RadioButton.d.cts.map +1 -0
  319. package/dist/components/RadioButton/RadioButton.d.mts +4 -0
  320. package/dist/components/RadioButton/RadioButton.d.mts.map +1 -0
  321. package/dist/components/RadioButton/RadioButton.mjs +58 -0
  322. package/dist/components/RadioButton/RadioButton.mjs.map +1 -0
  323. package/dist/components/RadioButton/RadioButton.types.cjs +3 -0
  324. package/dist/components/RadioButton/RadioButton.types.cjs.map +1 -0
  325. package/dist/components/RadioButton/RadioButton.types.d.cts +64 -0
  326. package/dist/components/RadioButton/RadioButton.types.d.cts.map +1 -0
  327. package/dist/components/RadioButton/RadioButton.types.d.mts +64 -0
  328. package/dist/components/RadioButton/RadioButton.types.d.mts.map +1 -0
  329. package/dist/components/RadioButton/RadioButton.types.mjs +2 -0
  330. package/dist/components/RadioButton/RadioButton.types.mjs.map +1 -0
  331. package/dist/components/RadioButton/index.cjs +6 -0
  332. package/dist/components/RadioButton/index.cjs.map +1 -0
  333. package/dist/components/RadioButton/index.d.cts +3 -0
  334. package/dist/components/RadioButton/index.d.cts.map +1 -0
  335. package/dist/components/RadioButton/index.d.mts +3 -0
  336. package/dist/components/RadioButton/index.d.mts.map +1 -0
  337. package/dist/components/RadioButton/index.mjs +2 -0
  338. package/dist/components/RadioButton/index.mjs.map +1 -0
  339. package/dist/components/SensitiveText/SensitiveText.cjs +47 -0
  340. package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -0
  341. package/dist/components/SensitiveText/SensitiveText.constants.cjs +14 -0
  342. package/dist/components/SensitiveText/SensitiveText.constants.cjs.map +1 -0
  343. package/dist/components/SensitiveText/SensitiveText.constants.d.cts +11 -0
  344. package/dist/components/SensitiveText/SensitiveText.constants.d.cts.map +1 -0
  345. package/dist/components/SensitiveText/SensitiveText.constants.d.mts +11 -0
  346. package/dist/components/SensitiveText/SensitiveText.constants.d.mts.map +1 -0
  347. package/dist/components/SensitiveText/SensitiveText.constants.mjs +11 -0
  348. package/dist/components/SensitiveText/SensitiveText.constants.mjs.map +1 -0
  349. package/dist/components/SensitiveText/SensitiveText.d.cts +4 -0
  350. package/dist/components/SensitiveText/SensitiveText.d.cts.map +1 -0
  351. package/dist/components/SensitiveText/SensitiveText.d.mts +4 -0
  352. package/dist/components/SensitiveText/SensitiveText.d.mts.map +1 -0
  353. package/dist/components/SensitiveText/SensitiveText.mjs +27 -0
  354. package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -0
  355. package/dist/components/SensitiveText/SensitiveText.types.cjs +3 -0
  356. package/dist/components/SensitiveText/SensitiveText.types.cjs.map +1 -0
  357. package/dist/components/SensitiveText/SensitiveText.types.d.cts +38 -0
  358. package/dist/components/SensitiveText/SensitiveText.types.d.cts.map +1 -0
  359. package/dist/components/SensitiveText/SensitiveText.types.d.mts +38 -0
  360. package/dist/components/SensitiveText/SensitiveText.types.d.mts.map +1 -0
  361. package/dist/components/SensitiveText/SensitiveText.types.mjs +2 -0
  362. package/dist/components/SensitiveText/SensitiveText.types.mjs.map +1 -0
  363. package/dist/components/SensitiveText/index.cjs +8 -0
  364. package/dist/components/SensitiveText/index.cjs.map +1 -0
  365. package/dist/components/SensitiveText/index.d.cts +4 -0
  366. package/dist/components/SensitiveText/index.d.cts.map +1 -0
  367. package/dist/components/SensitiveText/index.d.mts +4 -0
  368. package/dist/components/SensitiveText/index.d.mts.map +1 -0
  369. package/dist/components/SensitiveText/index.mjs +3 -0
  370. package/dist/components/SensitiveText/index.mjs.map +1 -0
  371. package/dist/components/Skeleton/Skeleton.cjs +86 -0
  372. package/dist/components/Skeleton/Skeleton.cjs.map +1 -0
  373. package/dist/components/Skeleton/Skeleton.d.cts +5 -0
  374. package/dist/components/Skeleton/Skeleton.d.cts.map +1 -0
  375. package/dist/components/Skeleton/Skeleton.d.mts +5 -0
  376. package/dist/components/Skeleton/Skeleton.d.mts.map +1 -0
  377. package/dist/components/Skeleton/Skeleton.mjs +68 -0
  378. package/dist/components/Skeleton/Skeleton.mjs.map +1 -0
  379. package/dist/components/Skeleton/Skeleton.types.cjs +3 -0
  380. package/dist/components/Skeleton/Skeleton.types.cjs.map +1 -0
  381. package/dist/components/Skeleton/Skeleton.types.d.cts +51 -0
  382. package/dist/components/Skeleton/Skeleton.types.d.cts.map +1 -0
  383. package/dist/components/Skeleton/Skeleton.types.d.mts +51 -0
  384. package/dist/components/Skeleton/Skeleton.types.d.mts.map +1 -0
  385. package/dist/components/Skeleton/Skeleton.types.mjs +2 -0
  386. package/dist/components/Skeleton/Skeleton.types.mjs.map +1 -0
  387. package/dist/components/Skeleton/index.cjs +9 -0
  388. package/dist/components/Skeleton/index.cjs.map +1 -0
  389. package/dist/components/Skeleton/index.d.cts +3 -0
  390. package/dist/components/Skeleton/index.d.cts.map +1 -0
  391. package/dist/components/Skeleton/index.d.mts +3 -0
  392. package/dist/components/Skeleton/index.d.mts.map +1 -0
  393. package/dist/components/Skeleton/index.mjs +2 -0
  394. package/dist/components/Skeleton/index.mjs.map +1 -0
  395. package/dist/components/TextField/TextField.cjs +42 -0
  396. package/dist/components/TextField/TextField.cjs.map +1 -0
  397. package/dist/components/TextField/TextField.constants.cjs +13 -0
  398. package/dist/components/TextField/TextField.constants.cjs.map +1 -0
  399. package/dist/components/TextField/TextField.constants.d.cts +6 -0
  400. package/dist/components/TextField/TextField.constants.d.cts.map +1 -0
  401. package/dist/components/TextField/TextField.constants.d.mts +6 -0
  402. package/dist/components/TextField/TextField.constants.d.mts.map +1 -0
  403. package/dist/components/TextField/TextField.constants.mjs +10 -0
  404. package/dist/components/TextField/TextField.constants.mjs.map +1 -0
  405. package/dist/components/TextField/TextField.d.cts +12 -0
  406. package/dist/components/TextField/TextField.d.cts.map +1 -0
  407. package/dist/components/TextField/TextField.d.mts +12 -0
  408. package/dist/components/TextField/TextField.d.mts.map +1 -0
  409. package/dist/components/TextField/TextField.mjs +39 -0
  410. package/dist/components/TextField/TextField.mjs.map +1 -0
  411. package/dist/components/TextField/TextField.types.cjs +13 -0
  412. package/dist/components/TextField/TextField.types.cjs.map +1 -0
  413. package/dist/components/TextField/TextField.types.d.cts +49 -0
  414. package/dist/components/TextField/TextField.types.d.cts.map +1 -0
  415. package/dist/components/TextField/TextField.types.d.mts +49 -0
  416. package/dist/components/TextField/TextField.types.d.mts.map +1 -0
  417. package/dist/components/TextField/TextField.types.mjs +10 -0
  418. package/dist/components/TextField/TextField.types.mjs.map +1 -0
  419. package/dist/components/TextField/index.cjs +8 -0
  420. package/dist/components/TextField/index.cjs.map +1 -0
  421. package/dist/components/TextField/index.d.cts +4 -0
  422. package/dist/components/TextField/index.d.cts.map +1 -0
  423. package/dist/components/TextField/index.d.mts +4 -0
  424. package/dist/components/TextField/index.d.mts.map +1 -0
  425. package/dist/components/TextField/index.mjs +3 -0
  426. package/dist/components/TextField/index.mjs.map +1 -0
  427. package/dist/components/Toast/Toast.cjs +174 -0
  428. package/dist/components/Toast/Toast.cjs.map +1 -0
  429. package/dist/components/Toast/Toast.constants.cjs +12 -0
  430. package/dist/components/Toast/Toast.constants.cjs.map +1 -0
  431. package/dist/components/Toast/Toast.constants.d.cts +8 -0
  432. package/dist/components/Toast/Toast.constants.d.cts.map +1 -0
  433. package/dist/components/Toast/Toast.constants.d.mts +8 -0
  434. package/dist/components/Toast/Toast.constants.d.mts.map +1 -0
  435. package/dist/components/Toast/Toast.constants.mjs +9 -0
  436. package/dist/components/Toast/Toast.constants.mjs.map +1 -0
  437. package/dist/components/Toast/Toast.context.cjs +40 -0
  438. package/dist/components/Toast/Toast.context.cjs.map +1 -0
  439. package/dist/components/Toast/Toast.context.d.cts +7 -0
  440. package/dist/components/Toast/Toast.context.d.cts.map +1 -0
  441. package/dist/components/Toast/Toast.context.d.mts +7 -0
  442. package/dist/components/Toast/Toast.context.d.mts.map +1 -0
  443. package/dist/components/Toast/Toast.context.mjs +20 -0
  444. package/dist/components/Toast/Toast.context.mjs.map +1 -0
  445. package/dist/components/Toast/Toast.d.cts +8 -0
  446. package/dist/components/Toast/Toast.d.cts.map +1 -0
  447. package/dist/components/Toast/Toast.d.mts +8 -0
  448. package/dist/components/Toast/Toast.d.mts.map +1 -0
  449. package/dist/components/Toast/Toast.mjs +156 -0
  450. package/dist/components/Toast/Toast.mjs.map +1 -0
  451. package/dist/components/Toast/Toast.types.cjs +19 -0
  452. package/dist/components/Toast/Toast.types.cjs.map +1 -0
  453. package/dist/components/Toast/Toast.types.d.cts +123 -0
  454. package/dist/components/Toast/Toast.types.d.cts.map +1 -0
  455. package/dist/components/Toast/Toast.types.d.mts +123 -0
  456. package/dist/components/Toast/Toast.types.d.mts.map +1 -0
  457. package/dist/components/Toast/Toast.types.mjs +16 -0
  458. package/dist/components/Toast/Toast.types.mjs.map +1 -0
  459. package/dist/components/Toast/index.cjs +19 -0
  460. package/dist/components/Toast/index.cjs.map +1 -0
  461. package/dist/components/Toast/index.d.cts +6 -0
  462. package/dist/components/Toast/index.d.cts.map +1 -0
  463. package/dist/components/Toast/index.d.mts +6 -0
  464. package/dist/components/Toast/index.d.mts.map +1 -0
  465. package/dist/components/Toast/index.mjs +5 -0
  466. package/dist/components/Toast/index.mjs.map +1 -0
  467. package/dist/components/index.cjs +38 -2
  468. package/dist/components/index.cjs.map +1 -1
  469. package/dist/components/index.d.cts +28 -0
  470. package/dist/components/index.d.cts.map +1 -1
  471. package/dist/components/index.d.mts +28 -0
  472. package/dist/components/index.d.mts.map +1 -1
  473. package/dist/components/index.mjs +14 -0
  474. package/dist/components/index.mjs.map +1 -1
  475. package/dist/types/index.cjs +3 -16
  476. package/dist/types/index.cjs.map +1 -1
  477. package/dist/types/index.d.cts +2 -13
  478. package/dist/types/index.d.cts.map +1 -1
  479. package/dist/types/index.d.mts +2 -13
  480. package/dist/types/index.d.mts.map +1 -1
  481. package/dist/types/index.mjs +2 -14
  482. package/dist/types/index.mjs.map +1 -1
  483. package/package.json +5 -5
@@ -0,0 +1,50 @@
1
+ import { Theme, useTailwind, useTheme } from "@metamask-previews/design-system-twrnc-preset";
2
+ import { darkTheme, lightTheme } from "@metamask-previews/design-tokens";
3
+ import { forwardRef, useCallback, useMemo, useState } from "react";
4
+ import { Platform, TextInput } from "react-native/index.js";
5
+ import { FontFamily, TextVariant } from "../../types/index.mjs";
6
+ import { MAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "../Text/Text.constants.mjs";
7
+ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
8
+ const [isFocused, setIsFocused] = useState(autoFocus);
9
+ const tw = useTailwind();
10
+ const theme = useTheme();
11
+ const placeholderTextColor = useMemo(() => theme === Theme.Light
12
+ ? lightTheme.colors.text.alternative
13
+ : darkTheme.colors.text.alternative, [theme]);
14
+ const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];
15
+ const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];
16
+ const fontClass = `font-${FontFamily.Default}${fontSuffix}`;
17
+ const inputStyle = useMemo(() => tw.style(`text-${textVariant}`, fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
18
+ !isDisabled &&
19
+ isFocused &&
20
+ 'border-primary-default', twClassName), [
21
+ textVariant,
22
+ fontClass,
23
+ isStateStylesDisabled,
24
+ isDisabled,
25
+ isFocused,
26
+ twClassName,
27
+ tw,
28
+ ]);
29
+ /* istanbul ignore next: handler body covered by focus/blur tests */
30
+ const onBlurHandler = useCallback((e) => {
31
+ if (!isDisabled) {
32
+ setIsFocused(false);
33
+ onBlur?.(e);
34
+ }
35
+ }, [isDisabled, onBlur]);
36
+ /* istanbul ignore next: handler body covered by focus/blur tests */
37
+ const onFocusHandler = useCallback((e) => {
38
+ if (!isDisabled) {
39
+ setIsFocused(true);
40
+ onFocus?.(e);
41
+ }
42
+ }, [isDisabled, onFocus]);
43
+ const resolvedStyle = [
44
+ inputStyle,
45
+ Platform.OS === 'ios' && { textAlignVertical: 'center' },
46
+ style,
47
+ ].filter(Boolean);
48
+ return (<TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
49
+ });
50
+ //# sourceMappingURL=Input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n `text-${textVariant}`,\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n textVariant,\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const resolvedStyle = [\n inputStyle,\n Platform.OS === 'ios' && { textAlignVertical: 'center' as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Input.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.types.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<TextInputProps, 'editable'> & {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
@@ -0,0 +1,33 @@
1
+ import type { TextInputProps } from "react-native/index.js";
2
+ import type { TextVariant } from "../../types/index.cjs";
3
+ export type InputProps = Omit<TextInputProps, 'editable'> & {
4
+ /**
5
+ * Optional enum to select between Typography variants.
6
+ *
7
+ * @default BodyMd
8
+ */
9
+ textVariant?: TextVariant;
10
+ /**
11
+ * Optional boolean to disable Input.
12
+ *
13
+ * @default false
14
+ */
15
+ isDisabled?: boolean;
16
+ /**
17
+ * Optional boolean to show readonly input.
18
+ *
19
+ * @default false
20
+ */
21
+ isReadonly?: boolean;
22
+ /**
23
+ * Optional boolean to disable state styles.
24
+ *
25
+ * @default false
26
+ */
27
+ isStateStylesDisabled?: boolean;
28
+ /**
29
+ * Optional prop to add twrnc overriding classNames.
30
+ */
31
+ twClassName?: string;
32
+ };
33
+ //# sourceMappingURL=Input.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { TextInputProps } from "react-native/index.js";
2
+ import type { TextVariant } from "../../types/index.mjs";
3
+ export type InputProps = Omit<TextInputProps, 'editable'> & {
4
+ /**
5
+ * Optional enum to select between Typography variants.
6
+ *
7
+ * @default BodyMd
8
+ */
9
+ textVariant?: TextVariant;
10
+ /**
11
+ * Optional boolean to disable Input.
12
+ *
13
+ * @default false
14
+ */
15
+ isDisabled?: boolean;
16
+ /**
17
+ * Optional boolean to show readonly input.
18
+ *
19
+ * @default false
20
+ */
21
+ isReadonly?: boolean;
22
+ /**
23
+ * Optional boolean to disable state styles.
24
+ *
25
+ * @default false
26
+ */
27
+ isStateStylesDisabled?: boolean;
28
+ /**
29
+ * Optional prop to add twrnc overriding classNames.
30
+ */
31
+ twClassName?: string;
32
+ };
33
+ //# sourceMappingURL=Input.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Input.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<TextInputProps, 'editable'> & {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Input = void 0;
4
+ var Input_1 = require("./Input.cjs");
5
+ Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return Input_1.Input; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA","sourcesContent":["export { Input } from './Input';\nexport type { InputProps } from './Input.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { Input } from "./Input.cjs";
2
+ export type { InputProps } from "./Input.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
@@ -0,0 +1,3 @@
1
+ export { Input } from "./Input.mjs";
2
+ export type { InputProps } from "./Input.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
@@ -0,0 +1,2 @@
1
+ export { Input } from "./Input.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB","sourcesContent":["export { Input } from './Input';\nexport type { InputProps } from './Input.types';\n"]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Label = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const Text_1 = require("../Text/index.cjs");
9
+ const Label = ({ ...props }) => (<Text_1.Text variant={Text_1.TextVariant.BodyMd} {...props}/>);
10
+ exports.Label = Label;
11
+ //# sourceMappingURL=Label.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.cjs","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,4CAA4C;AAIrC,MAAM,KAAK,GAAyB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC3D,CAAC,WAAI,CAAC,OAAO,CAAC,CAAC,kBAAW,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CACjD,CAAC;AAFW,QAAA,KAAK,SAEhB","sourcesContent":["import React from 'react';\n\nimport { Text, TextVariant } from '../Text';\n\nimport type { LabelProps } from './Label.types';\n\nexport const Label: React.FC<LabelProps> = ({ ...props }) => (\n <Text variant={TextVariant.BodyMd} {...props} />\n);\n"]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { LabelProps } from "./Label.types.cjs";
3
+ export declare const Label: React.FC<LabelProps>;
4
+ //# sourceMappingURL=Label.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.d.cts","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAEtC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { LabelProps } from "./Label.types.mjs";
3
+ export declare const Label: React.FC<LabelProps>;
4
+ //# sourceMappingURL=Label.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.d.mts","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAI1B,OAAO,KAAK,EAAE,UAAU,EAAE,0BAAsB;AAEhD,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAEtC,CAAC"}
@@ -0,0 +1,11 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import $React from "react";
8
+ const React = $importDefault($React);
9
+ import { Text, TextVariant } from "../Text/index.mjs";
10
+ export const Label = ({ ...props }) => (<Text variant={TextVariant.BodyMd} {...props}/>);
11
+ //# sourceMappingURL=Label.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.mjs","sourceRoot":"","sources":["../../../src/components/Label/Label.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,0BAAgB;AAI5C,MAAM,CAAC,MAAM,KAAK,GAAyB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CAC3D,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,CAAC,EAAG,CACjD,CAAC","sourcesContent":["import React from 'react';\n\nimport { Text, TextVariant } from '../Text';\n\nimport type { LabelProps } from './Label.types';\n\nexport const Label: React.FC<LabelProps> = ({ ...props }) => (\n <Text variant={TextVariant.BodyMd} {...props} />\n);\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Label.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.types.cjs","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Label component props.\n *\n * Extends TextProps to inherit all text styling and React Native text properties\n * such as testID and accessibilityLabel.\n */\nexport type LabelProps = TextProps;\n"]}
@@ -0,0 +1,9 @@
1
+ import type { TextProps } from "../Text/index.cjs";
2
+ /**
3
+ * Label component props.
4
+ *
5
+ * Extends TextProps to inherit all text styling and React Native text properties
6
+ * such as testID and accessibilityLabel.
7
+ */
8
+ export type LabelProps = TextProps;
9
+ //# sourceMappingURL=Label.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.types.d.cts","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { TextProps } from "../Text/index.mjs";
2
+ /**
3
+ * Label component props.
4
+ *
5
+ * Extends TextProps to inherit all text styling and React Native text properties
6
+ * such as testID and accessibilityLabel.
7
+ */
8
+ export type LabelProps = TextProps;
9
+ //# sourceMappingURL=Label.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.types.d.mts","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Label.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.types.mjs","sourceRoot":"","sources":["../../../src/components/Label/Label.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Label component props.\n *\n * Extends TextProps to inherit all text styling and React Native text properties\n * such as testID and accessibilityLabel.\n */\nexport type LabelProps = TextProps;\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Label = void 0;
4
+ var Label_1 = require("./Label.cjs");
5
+ Object.defineProperty(exports, "Label", { enumerable: true, get: function () { return Label_1.Label; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":";;;AAAA,qCAAgC;AAAvB,8FAAA,KAAK,OAAA","sourcesContent":["export { Label } from './Label';\nexport type { LabelProps } from './Label.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { Label } from "./Label.cjs";
2
+ export type { LabelProps } from "./Label.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
@@ -0,0 +1,3 @@
1
+ export { Label } from "./Label.mjs";
2
+ export type { LabelProps } from "./Label.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB;AAChC,YAAY,EAAE,UAAU,EAAE,0BAAsB"}
@@ -0,0 +1,2 @@
1
+ export { Label } from "./Label.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Label/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,oBAAgB","sourcesContent":["export { Label } from './Label';\nexport type { LabelProps } from './Label.types';\n"]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.RadioButton = void 0;
7
+ const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
8
+ const react_1 = __importDefault(require("react"));
9
+ const react_native_1 = require("react-native/index.js");
10
+ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
11
+ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
12
+ if (isReadOnly) {
13
+ return 'border-background-default';
14
+ }
15
+ if (isDanger) {
16
+ return 'border-error-default';
17
+ }
18
+ if (isChecked) {
19
+ return 'border-primary-default';
20
+ }
21
+ return 'border-default';
22
+ };
23
+ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
24
+ if (isReadOnly) {
25
+ return 'bg-icon-alternative';
26
+ }
27
+ if (isDanger) {
28
+ return 'bg-error-default';
29
+ }
30
+ return 'bg-primary-default';
31
+ };
32
+ const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
33
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
34
+ return (<react_native_1.View {...props} style={[
35
+ tw.style('flex-row items-center', isDisabled ? 'opacity-50' : 'opacity-100', twClassName),
36
+ style,
37
+ ]}>
38
+ <react_native_1.TouchableOpacity onPress={onPress} disabled={isDisabled || isReadOnly} accessible accessibilityRole="radio" accessibilityState={{
39
+ checked: isChecked,
40
+ disabled: isDisabled,
41
+ }} accessibilityLabel={typeof label === 'string' ? label : undefined} {...touchableOpacityProps} style={[
42
+ tw.style('flex-row items-center'),
43
+ touchableOpacityProps?.style,
44
+ ]}>
45
+ <react_native_1.View {...radioButtonContainerProps} style={[
46
+ tw.style('size-5 items-center justify-center rounded-full border-2 bg-default', getRadioButtonBorderClass(isReadOnly, isDanger, isChecked)),
47
+ radioButtonContainerProps?.style,
48
+ ]}>
49
+ {isChecked && (<react_native_1.View style={tw.style('size-3 rounded-full', getRadioButtonDotClass(isReadOnly, isDanger))}/>)}
50
+ </react_native_1.View>
51
+ {label ? (<TextOrChildren_1.TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>
52
+ {label}
53
+ </TextOrChildren_1.TextOrChildren>) : null}
54
+ </react_native_1.TouchableOpacity>
55
+ </react_native_1.View>);
56
+ };
57
+ exports.RadioButton = RadioButton;
58
+ //# sourceMappingURL=RadioButton.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,wDAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,2BAA2B,CAAC;KACpC;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,wBAAwB,CAAC;KACjC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,UAAmB,EACnB,QAAiB,EACT,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,qBAAqB,CAAC;KAC9B;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,kBAAkB,CAAC;KAC3B;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC;AAEK,MAAM,WAAW,GAAG,CAAC,EAC1B,OAAO,EACP,KAAK,EACL,UAAU,EACV,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,QAAQ,GAAG,KAAK,EAChB,qBAAqB,EACrB,yBAAyB,EACzB,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACS,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,mBAAI,CACH,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,uBAAuB,EACvB,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,EACzC,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CAEF;MAAA,CAAC,+BAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,QAAQ,CAAC,CAAC,UAAU,IAAI,UAAU,CAAC,CACnC,UAAU,CACV,iBAAiB,CAAC,OAAO,CACzB,kBAAkB,CAAC,CAAC;YAClB,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,UAAU;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAClE,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;YACjC,qBAAqB,EAAE,KAAK;SAC7B,CAAC,CAEF;QAAA,CAAC,mBAAI,CACH,IAAI,yBAAyB,CAAC,CAC9B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,qEAAqE,EACrE,yBAAyB,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAC3D;YACD,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAEF;UAAA,CAAC,SAAS,IAAI,CACZ,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CACb,qBAAqB,EACrB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7C,CAAC,EACF,CACH,CACH;QAAA,EAAE,mBAAI,CACN;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,+BAAgB,CACpB;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,WAAW,eAuEtB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-primary-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-primary-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SAMPLE_RADIOBUTTON_PROPS = void 0;
4
+ // Sample props for stories and tests
5
+ exports.SAMPLE_RADIOBUTTON_PROPS = {
6
+ label: 'Sample RadioButton Label',
7
+ isChecked: false,
8
+ isDisabled: false,
9
+ isReadOnly: false,
10
+ isDanger: false,
11
+ };
12
+ //# sourceMappingURL=RadioButton.constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":";;;AAEA,qCAAqC;AACxB,QAAA,wBAAwB,GAAqB;IACxD,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import type { RadioButtonProps } from './RadioButton.types';\n\n// Sample props for stories and tests\nexport const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps = {\n label: 'Sample RadioButton Label',\n isChecked: false,\n isDisabled: false,\n isReadOnly: false,\n isDanger: false,\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import type { RadioButtonProps } from "./RadioButton.types.cjs";
2
+ export declare const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps;
3
+ //# sourceMappingURL=RadioButton.constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.constants.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAG5D,eAAO,MAAM,wBAAwB,EAAE,gBAMtC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { RadioButtonProps } from "./RadioButton.types.mjs";
2
+ export declare const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps;
3
+ //# sourceMappingURL=RadioButton.constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.constants.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAG5D,eAAO,MAAM,wBAAwB,EAAE,gBAMtC,CAAC"}
@@ -0,0 +1,9 @@
1
+ // Sample props for stories and tests
2
+ export const SAMPLE_RADIOBUTTON_PROPS = {
3
+ label: 'Sample RadioButton Label',
4
+ isChecked: false,
5
+ isDisabled: false,
6
+ isReadOnly: false,
7
+ isDanger: false,
8
+ };
9
+ //# sourceMappingURL=RadioButton.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.constants.ts"],"names":[],"mappings":"AAEA,qCAAqC;AACrC,MAAM,CAAC,MAAM,wBAAwB,GAAqB;IACxD,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,KAAK;IAChB,UAAU,EAAE,KAAK;IACjB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,KAAK;CAChB,CAAC","sourcesContent":["import type { RadioButtonProps } from './RadioButton.types';\n\n// Sample props for stories and tests\nexport const SAMPLE_RADIOBUTTON_PROPS: RadioButtonProps = {\n label: 'Sample RadioButton Label',\n isChecked: false,\n isDisabled: false,\n isReadOnly: false,\n isDanger: false,\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { RadioButtonProps } from "./RadioButton.types.cjs";
3
+ export declare const RadioButton: ({ onPress, label, labelProps, isChecked, isDisabled, isReadOnly, isDanger, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }: RadioButtonProps) => React.JSX.Element;
4
+ //# sourceMappingURL=RadioButton.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,gKAarB,gBAAgB,sBA0DlB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { RadioButtonProps } from "./RadioButton.types.mjs";
3
+ export declare const RadioButton: ({ onPress, label, labelProps, isChecked, isDisabled, isReadOnly, isDanger, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }: RadioButtonProps) => React.JSX.Element;
4
+ //# sourceMappingURL=RadioButton.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,gKAarB,gBAAgB,sBA0DlB,CAAC"}
@@ -0,0 +1,58 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { View, TouchableOpacity } from "react-native/index.js";
11
+ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
12
+ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
13
+ if (isReadOnly) {
14
+ return 'border-background-default';
15
+ }
16
+ if (isDanger) {
17
+ return 'border-error-default';
18
+ }
19
+ if (isChecked) {
20
+ return 'border-primary-default';
21
+ }
22
+ return 'border-default';
23
+ };
24
+ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
25
+ if (isReadOnly) {
26
+ return 'bg-icon-alternative';
27
+ }
28
+ if (isDanger) {
29
+ return 'bg-error-default';
30
+ }
31
+ return 'bg-primary-default';
32
+ };
33
+ export const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
34
+ const tw = useTailwind();
35
+ return (<View {...props} style={[
36
+ tw.style('flex-row items-center', isDisabled ? 'opacity-50' : 'opacity-100', twClassName),
37
+ style,
38
+ ]}>
39
+ <TouchableOpacity onPress={onPress} disabled={isDisabled || isReadOnly} accessible accessibilityRole="radio" accessibilityState={{
40
+ checked: isChecked,
41
+ disabled: isDisabled,
42
+ }} accessibilityLabel={typeof label === 'string' ? label : undefined} {...touchableOpacityProps} style={[
43
+ tw.style('flex-row items-center'),
44
+ touchableOpacityProps?.style,
45
+ ]}>
46
+ <View {...radioButtonContainerProps} style={[
47
+ tw.style('size-5 items-center justify-center rounded-full border-2 bg-default', getRadioButtonBorderClass(isReadOnly, isDanger, isChecked)),
48
+ radioButtonContainerProps?.style,
49
+ ]}>
50
+ {isChecked && (<View style={tw.style('size-3 rounded-full', getRadioButtonDotClass(isReadOnly, isDanger))}/>)}
51
+ </View>
52
+ {label ? (<TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>
53
+ {label}
54
+ </TextOrChildren>) : null}
55
+ </TouchableOpacity>
56
+ </View>);
57
+ };
58
+ //# sourceMappingURL=RadioButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"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","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-primary-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-primary-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RadioButton.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.types.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TouchableOpacityProps, ViewProps } from 'react-native';\n\nimport type { TextProps } from '../Text';\n\n/**\n * RadioButton component props.\n *\n * Extends ViewProps so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type RadioButtonProps = {\n /**\n * Optional callback triggered when the radio button is pressed.\n */\n onPress?: () => void;\n\n /**\n * Optional label displayed beside the radio button.\n */\n label?: string | React.ReactNode;\n\n /**\n * Optional props passed to the label's Text component.\n */\n labelProps?: Omit<Partial<TextProps>, 'children'>;\n\n /**\n * Optional prop to configure the checked state.\n *\n * @default false\n */\n isChecked?: boolean;\n\n /**\n * Optional prop to configure the disabled state.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Optional prop to configure the read-only state.\n *\n * @default false\n */\n isReadOnly?: boolean;\n\n /**\n * Optional prop to configure the danger state.\n *\n * @default false\n */\n isDanger?: boolean;\n\n /**\n * Optional props passed to the inner TouchableOpacity.\n * Use this for TouchableOpacity-specific props such as `testID`.\n */\n touchableOpacityProps?: Omit<\n Partial<TouchableOpacityProps>,\n 'children' | 'onPress' | 'disabled'\n >;\n\n /**\n * Optional props passed to the radio button circle container.\n */\n radioButtonContainerProps?: Omit<Partial<ViewProps>, 'children'>;\n\n /**\n * Optional Tailwind CSS classes for the root container.\n */\n twClassName?: string;\n\n /**\n * Optional custom styles for the root container.\n */\n style?: ViewProps['style'];\n} & Omit<ViewProps, 'children'>;\n"]}