@metamask-previews/design-system-react-native 0.14.0-preview.dff9dce → 0.16.0-preview.d854123

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 (346) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/dist/components/BadgeNetwork/BadgeNetwork.types.cjs.map +1 -1
  3. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts +6 -15
  4. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts.map +1 -1
  5. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts +6 -15
  6. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts.map +1 -1
  7. package/dist/components/BadgeNetwork/BadgeNetwork.types.mjs.map +1 -1
  8. package/dist/components/BannerAlert/BannerAlert.cjs +1 -2
  9. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
  10. package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -8
  11. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  12. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
  13. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  14. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
  15. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  16. package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
  17. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  18. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
  19. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
  20. package/dist/components/BannerAlert/BannerAlert.mjs +1 -2
  21. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
  22. package/dist/components/BannerBase/BannerBase.cjs +4 -4
  23. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  24. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  25. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  26. package/dist/components/BannerBase/BannerBase.mjs +2 -2
  27. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  28. package/dist/components/{BoxVertical/BoxVertical.cjs → BoxColumn/BoxColumn.cjs} +5 -5
  29. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -0
  30. package/dist/components/BoxColumn/BoxColumn.d.cts +7 -0
  31. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -0
  32. package/dist/components/BoxColumn/BoxColumn.d.mts +7 -0
  33. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -0
  34. package/dist/components/{BoxVertical/BoxVertical.mjs → BoxColumn/BoxColumn.mjs} +3 -3
  35. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -0
  36. package/dist/components/{BoxVertical/BoxVertical.types.cjs → BoxColumn/BoxColumn.types.cjs} +1 -1
  37. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -0
  38. package/dist/components/BoxColumn/BoxColumn.types.d.cts +13 -0
  39. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -0
  40. package/dist/components/BoxColumn/BoxColumn.types.d.mts +13 -0
  41. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -0
  42. package/dist/components/BoxColumn/BoxColumn.types.mjs +2 -0
  43. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -0
  44. package/dist/components/BoxColumn/index.cjs +6 -0
  45. package/dist/components/BoxColumn/index.cjs.map +1 -0
  46. package/dist/components/BoxColumn/index.d.cts +3 -0
  47. package/dist/components/BoxColumn/index.d.cts.map +1 -0
  48. package/dist/components/BoxColumn/index.d.mts +3 -0
  49. package/dist/components/BoxColumn/index.d.mts.map +1 -0
  50. package/dist/components/BoxColumn/index.mjs +2 -0
  51. package/dist/components/BoxColumn/index.mjs.map +1 -0
  52. package/dist/components/{BoxHorizontal/BoxHorizontal.cjs → BoxRow/BoxRow.cjs} +5 -5
  53. package/dist/components/BoxRow/BoxRow.cjs.map +1 -0
  54. package/dist/components/BoxRow/BoxRow.d.cts +7 -0
  55. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -0
  56. package/dist/components/BoxRow/BoxRow.d.mts +7 -0
  57. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -0
  58. package/dist/components/{BoxHorizontal/BoxHorizontal.mjs → BoxRow/BoxRow.mjs} +3 -3
  59. package/dist/components/BoxRow/BoxRow.mjs.map +1 -0
  60. package/dist/components/{BoxHorizontal/BoxHorizontal.types.cjs → BoxRow/BoxRow.types.cjs} +1 -1
  61. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -0
  62. package/dist/components/BoxRow/BoxRow.types.d.cts +13 -0
  63. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -0
  64. package/dist/components/BoxRow/BoxRow.types.d.mts +13 -0
  65. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -0
  66. package/dist/components/BoxRow/BoxRow.types.mjs +2 -0
  67. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -0
  68. package/dist/components/BoxRow/index.cjs +6 -0
  69. package/dist/components/BoxRow/index.cjs.map +1 -0
  70. package/dist/components/BoxRow/index.d.cts +3 -0
  71. package/dist/components/BoxRow/index.d.cts.map +1 -0
  72. package/dist/components/BoxRow/index.d.mts +3 -0
  73. package/dist/components/BoxRow/index.d.mts.map +1 -0
  74. package/dist/components/BoxRow/index.mjs +2 -0
  75. package/dist/components/BoxRow/index.mjs.map +1 -0
  76. package/dist/components/HeaderRoot/HeaderRoot.cjs +3 -3
  77. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  78. package/dist/components/HeaderRoot/HeaderRoot.mjs +3 -3
  79. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  80. package/dist/components/HeaderSearch/HeaderSearch.cjs +80 -0
  81. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -0
  82. package/dist/components/HeaderSearch/HeaderSearch.d.cts +37 -0
  83. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -0
  84. package/dist/components/HeaderSearch/HeaderSearch.d.mts +37 -0
  85. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -0
  86. package/dist/components/HeaderSearch/HeaderSearch.mjs +80 -0
  87. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -0
  88. package/dist/components/HeaderSearch/HeaderSearch.types.cjs +3 -0
  89. package/dist/components/HeaderSearch/HeaderSearch.types.cjs.map +1 -0
  90. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts +33 -0
  91. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts.map +1 -0
  92. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts +33 -0
  93. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts.map +1 -0
  94. package/dist/components/HeaderSearch/HeaderSearch.types.mjs +2 -0
  95. package/dist/components/HeaderSearch/HeaderSearch.types.mjs.map +1 -0
  96. package/dist/components/HeaderSearch/index.cjs +8 -0
  97. package/dist/components/HeaderSearch/index.cjs.map +1 -0
  98. package/dist/components/HeaderSearch/index.d.cts +4 -0
  99. package/dist/components/HeaderSearch/index.d.cts.map +1 -0
  100. package/dist/components/HeaderSearch/index.d.mts +4 -0
  101. package/dist/components/HeaderSearch/index.d.mts.map +1 -0
  102. package/dist/components/HeaderSearch/index.mjs +3 -0
  103. package/dist/components/HeaderSearch/index.mjs.map +1 -0
  104. package/dist/components/HeaderStandard/HeaderStandard.cjs +3 -3
  105. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  106. package/dist/components/HeaderStandard/HeaderStandard.mjs +3 -3
  107. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  108. package/dist/components/Icon/Icon.assets.cjs +286 -280
  109. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  110. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  111. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  112. package/dist/components/Icon/Icon.assets.mjs +8 -2
  113. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  114. package/dist/components/Icon/Icon.cjs +2 -2
  115. package/dist/components/Icon/Icon.cjs.map +1 -1
  116. package/dist/components/Icon/Icon.constants.cjs +6 -6
  117. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  118. package/dist/components/Icon/Icon.constants.d.cts +1 -1
  119. package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
  120. package/dist/components/Icon/Icon.constants.d.mts +1 -1
  121. package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
  122. package/dist/components/Icon/Icon.constants.mjs +1 -1
  123. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  124. package/dist/components/Icon/Icon.d.cts.map +1 -1
  125. package/dist/components/Icon/Icon.d.mts.map +1 -1
  126. package/dist/components/Icon/Icon.mjs +1 -1
  127. package/dist/components/Icon/Icon.mjs.map +1 -1
  128. package/dist/components/Icon/Icon.types.cjs.map +1 -1
  129. package/dist/components/Icon/Icon.types.d.cts +2 -2
  130. package/dist/components/Icon/Icon.types.d.cts.map +1 -1
  131. package/dist/components/Icon/Icon.types.d.mts +2 -2
  132. package/dist/components/Icon/Icon.types.d.mts.map +1 -1
  133. package/dist/components/Icon/Icon.types.mjs.map +1 -1
  134. package/dist/components/Icon/assets/after-hours.svg +1 -1
  135. package/dist/components/Icon/assets/no-photography.svg +1 -0
  136. package/dist/components/Icon/assets/pop-up.svg +1 -0
  137. package/dist/components/Icon/assets/side-panel.svg +1 -0
  138. package/dist/components/Icon/index.cjs +4 -4
  139. package/dist/components/Icon/index.cjs.map +1 -1
  140. package/dist/components/Icon/index.d.cts +1 -1
  141. package/dist/components/Icon/index.d.cts.map +1 -1
  142. package/dist/components/Icon/index.d.mts +1 -1
  143. package/dist/components/Icon/index.d.mts.map +1 -1
  144. package/dist/components/Icon/index.mjs +1 -1
  145. package/dist/components/Icon/index.mjs.map +1 -1
  146. package/dist/components/Input/Input.cjs +3 -3
  147. package/dist/components/Input/Input.cjs.map +1 -1
  148. package/dist/components/Input/Input.constants.cjs +15 -15
  149. package/dist/components/Input/Input.constants.cjs.map +1 -1
  150. package/dist/components/Input/Input.constants.d.cts +1 -1
  151. package/dist/components/Input/Input.constants.d.cts.map +1 -1
  152. package/dist/components/Input/Input.constants.d.mts +1 -1
  153. package/dist/components/Input/Input.constants.d.mts.map +1 -1
  154. package/dist/components/Input/Input.constants.mjs +1 -1
  155. package/dist/components/Input/Input.constants.mjs.map +1 -1
  156. package/dist/components/Input/Input.d.cts +1 -1
  157. package/dist/components/Input/Input.d.cts.map +1 -1
  158. package/dist/components/Input/Input.d.mts +1 -1
  159. package/dist/components/Input/Input.d.mts.map +1 -1
  160. package/dist/components/Input/Input.mjs +1 -1
  161. package/dist/components/Input/Input.mjs.map +1 -1
  162. package/dist/components/Input/Input.types.cjs.map +1 -1
  163. package/dist/components/Input/Input.types.d.cts +1 -1
  164. package/dist/components/Input/Input.types.d.cts.map +1 -1
  165. package/dist/components/Input/Input.types.d.mts +1 -1
  166. package/dist/components/Input/Input.types.d.mts.map +1 -1
  167. package/dist/components/Input/Input.types.mjs.map +1 -1
  168. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +43 -0
  169. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -0
  170. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts +7 -0
  171. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -0
  172. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts +7 -0
  173. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -0
  174. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +43 -0
  175. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -0
  176. package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs +3 -0
  177. package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs.map +1 -0
  178. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts +17 -0
  179. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts.map +1 -0
  180. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts +17 -0
  181. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts.map +1 -0
  182. package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs +2 -0
  183. package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs.map +1 -0
  184. package/dist/components/KeyValueColumn/index.cjs +6 -0
  185. package/dist/components/KeyValueColumn/index.cjs.map +1 -0
  186. package/dist/components/KeyValueColumn/index.d.cts +3 -0
  187. package/dist/components/KeyValueColumn/index.d.cts.map +1 -0
  188. package/dist/components/KeyValueColumn/index.d.mts +3 -0
  189. package/dist/components/KeyValueColumn/index.d.mts.map +1 -0
  190. package/dist/components/KeyValueColumn/index.mjs +2 -0
  191. package/dist/components/KeyValueColumn/index.mjs.map +1 -0
  192. package/dist/components/KeyValueRow/KeyValueRow.cjs +43 -64
  193. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  194. package/dist/components/KeyValueRow/KeyValueRow.d.cts +3 -20
  195. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  196. package/dist/components/KeyValueRow/KeyValueRow.d.mts +3 -20
  197. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  198. package/dist/components/KeyValueRow/KeyValueRow.mjs +42 -63
  199. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  200. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +0 -26
  201. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -1
  202. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +14 -174
  203. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  204. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +14 -174
  205. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  206. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +1 -25
  207. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -1
  208. package/dist/components/KeyValueRow/index.cjs +3 -7
  209. package/dist/components/KeyValueRow/index.cjs.map +1 -1
  210. package/dist/components/KeyValueRow/index.d.cts +3 -2
  211. package/dist/components/KeyValueRow/index.d.cts.map +1 -1
  212. package/dist/components/KeyValueRow/index.d.mts +3 -2
  213. package/dist/components/KeyValueRow/index.d.mts.map +1 -1
  214. package/dist/components/KeyValueRow/index.mjs +2 -2
  215. package/dist/components/KeyValueRow/index.mjs.map +1 -1
  216. package/dist/components/Text/Text.cjs +4 -4
  217. package/dist/components/Text/Text.cjs.map +1 -1
  218. package/dist/components/Text/Text.constants.cjs +23 -18
  219. package/dist/components/Text/Text.constants.cjs.map +1 -1
  220. package/dist/components/Text/Text.constants.d.cts +1 -1
  221. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  222. package/dist/components/Text/Text.constants.d.mts +1 -1
  223. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  224. package/dist/components/Text/Text.constants.mjs +20 -15
  225. package/dist/components/Text/Text.constants.mjs.map +1 -1
  226. package/dist/components/Text/Text.d.cts.map +1 -1
  227. package/dist/components/Text/Text.d.mts.map +1 -1
  228. package/dist/components/Text/Text.mjs +1 -1
  229. package/dist/components/Text/Text.mjs.map +1 -1
  230. package/dist/components/Text/Text.types.cjs.map +1 -1
  231. package/dist/components/Text/Text.types.d.cts +17 -3
  232. package/dist/components/Text/Text.types.d.cts.map +1 -1
  233. package/dist/components/Text/Text.types.d.mts +17 -3
  234. package/dist/components/Text/Text.types.d.mts.map +1 -1
  235. package/dist/components/Text/Text.types.mjs.map +1 -1
  236. package/dist/components/Text/index.cjs +7 -7
  237. package/dist/components/Text/index.cjs.map +1 -1
  238. package/dist/components/Text/index.d.cts +1 -1
  239. package/dist/components/Text/index.d.cts.map +1 -1
  240. package/dist/components/Text/index.d.mts +1 -1
  241. package/dist/components/Text/index.d.mts.map +1 -1
  242. package/dist/components/Text/index.mjs +1 -1
  243. package/dist/components/Text/index.mjs.map +1 -1
  244. package/dist/components/TextButton/TextButton.cjs +3 -3
  245. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  246. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  247. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  248. package/dist/components/TextButton/TextButton.mjs +1 -1
  249. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  250. package/dist/components/TextField/TextField.cjs +2 -2
  251. package/dist/components/TextField/TextField.cjs.map +1 -1
  252. package/dist/components/TextField/TextField.d.cts.map +1 -1
  253. package/dist/components/TextField/TextField.d.mts.map +1 -1
  254. package/dist/components/TextField/TextField.mjs +1 -1
  255. package/dist/components/TextField/TextField.mjs.map +1 -1
  256. package/dist/components/index.cjs +15 -7
  257. package/dist/components/index.cjs.map +1 -1
  258. package/dist/components/index.d.cts +10 -4
  259. package/dist/components/index.d.cts.map +1 -1
  260. package/dist/components/index.d.mts +10 -4
  261. package/dist/components/index.d.mts.map +1 -1
  262. package/dist/components/index.mjs +5 -2
  263. package/dist/components/index.mjs.map +1 -1
  264. package/dist/types/index.cjs +106 -347
  265. package/dist/types/index.cjs.map +1 -1
  266. package/dist/types/index.d.cts +74 -318
  267. package/dist/types/index.d.cts.map +1 -1
  268. package/dist/types/index.d.mts +74 -318
  269. package/dist/types/index.d.mts.map +1 -1
  270. package/dist/types/index.mjs +102 -346
  271. package/dist/types/index.mjs.map +1 -1
  272. package/package.json +5 -6
  273. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +0 -1
  274. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +0 -7
  275. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +0 -1
  276. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +0 -7
  277. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +0 -1
  278. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +0 -1
  279. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +0 -1
  280. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +0 -13
  281. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +0 -1
  282. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +0 -13
  283. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +0 -1
  284. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +0 -2
  285. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +0 -1
  286. package/dist/components/BoxHorizontal/index.cjs +0 -6
  287. package/dist/components/BoxHorizontal/index.cjs.map +0 -1
  288. package/dist/components/BoxHorizontal/index.d.cts +0 -3
  289. package/dist/components/BoxHorizontal/index.d.cts.map +0 -1
  290. package/dist/components/BoxHorizontal/index.d.mts +0 -3
  291. package/dist/components/BoxHorizontal/index.d.mts.map +0 -1
  292. package/dist/components/BoxHorizontal/index.mjs +0 -2
  293. package/dist/components/BoxHorizontal/index.mjs.map +0 -1
  294. package/dist/components/BoxVertical/BoxVertical.cjs.map +0 -1
  295. package/dist/components/BoxVertical/BoxVertical.d.cts +0 -7
  296. package/dist/components/BoxVertical/BoxVertical.d.cts.map +0 -1
  297. package/dist/components/BoxVertical/BoxVertical.d.mts +0 -7
  298. package/dist/components/BoxVertical/BoxVertical.d.mts.map +0 -1
  299. package/dist/components/BoxVertical/BoxVertical.mjs.map +0 -1
  300. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +0 -1
  301. package/dist/components/BoxVertical/BoxVertical.types.d.cts +0 -13
  302. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +0 -1
  303. package/dist/components/BoxVertical/BoxVertical.types.d.mts +0 -13
  304. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +0 -1
  305. package/dist/components/BoxVertical/BoxVertical.types.mjs +0 -2
  306. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +0 -1
  307. package/dist/components/BoxVertical/index.cjs +0 -6
  308. package/dist/components/BoxVertical/index.cjs.map +0 -1
  309. package/dist/components/BoxVertical/index.d.cts +0 -3
  310. package/dist/components/BoxVertical/index.d.cts.map +0 -1
  311. package/dist/components/BoxVertical/index.d.mts +0 -3
  312. package/dist/components/BoxVertical/index.d.mts.map +0 -1
  313. package/dist/components/BoxVertical/index.mjs +0 -2
  314. package/dist/components/BoxVertical/index.mjs.map +0 -1
  315. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +0 -34
  316. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +0 -1
  317. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +0 -13
  318. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +0 -1
  319. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +0 -13
  320. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +0 -1
  321. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +0 -34
  322. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +0 -1
  323. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +0 -40
  324. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +0 -1
  325. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +0 -24
  326. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +0 -1
  327. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +0 -24
  328. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +0 -1
  329. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +0 -40
  330. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +0 -1
  331. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +0 -6
  332. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +0 -1
  333. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +0 -3
  334. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +0 -1
  335. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +0 -3
  336. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +0 -1
  337. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +0 -2
  338. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +0 -1
  339. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +0 -30
  340. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +0 -1
  341. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +0 -16
  342. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +0 -1
  343. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +0 -16
  344. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +0 -1
  345. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +0 -30
  346. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +0 -1
@@ -24,17 +24,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.Text = void 0;
27
- const design_system_shared_1 = require("@metamask-previews/design-system-shared");
28
27
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
29
28
  const react_1 = __importStar(require("react"));
30
29
  const react_native_1 = require("react-native/index.js");
30
+ const types_1 = require("../../types/index.cjs");
31
31
  const Text_constants_1 = require("./Text.constants.cjs");
32
- const Text = ({ variant = design_system_shared_1.TextVariant.BodyMd, color = design_system_shared_1.TextColor.TextDefault, style, children, fontWeight, fontFamily = design_system_shared_1.FontFamily.Default, fontStyle = design_system_shared_1.FontStyle.Normal, twClassName, ...props }) => {
32
+ const Text = ({ variant = types_1.TextVariant.BodyMd, color = types_1.TextColor.TextDefault, style, children, fontWeight, fontFamily = types_1.FontFamily.Default, fontStyle = types_1.FontStyle.Normal, twClassName, ...props }) => {
33
33
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
34
34
  const finalFontWeight = fontWeight ?? Text_constants_1.MAP_TEXT_VARIANT_FONTWEIGHT[variant];
35
35
  const textStyle = (0, react_1.useMemo)(() => {
36
- const isItalic = fontStyle === design_system_shared_1.FontStyle.Italic;
37
- const fontSuffix = `${Text_constants_1.TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${isItalic && fontFamily === design_system_shared_1.FontFamily.Default ? '-italic' : ''}`;
36
+ const isItalic = fontStyle === types_1.FontStyle.Italic;
37
+ const fontSuffix = `${Text_constants_1.TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${isItalic && fontFamily === types_1.FontFamily.Default ? '-italic' : ''}`;
38
38
  const fontClass = `font-${fontFamily}${fontSuffix}`;
39
39
  return tw.style(`text-${variant}`, fontClass, color, twClassName);
40
40
  }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);
@@ -1 +1 @@
1
- {"version":3,"file":"Text.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAKiD;AACjD,8FAA4E;AAC5E,+CAAuC;AACvC,wDAA8C;AAE9C,yDAG0B;AAGnB,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,kCAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,gCAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,iCAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,gCAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,4CAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,gCAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,2CAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,iCAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9D,EAAE,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,UAAU,GAAG,UAAU,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,CAAC,mBAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,IAAI,QA4Bf","sourcesContent":["import {\n FontFamily,\n FontStyle,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
1
+ {"version":3,"file":"Text.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAuC;AACvC,wDAA8C;AAE9C,iDAA4E;AAE5E,yDAG0B;AAGnB,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,mBAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,iBAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,kBAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,iBAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,4CAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,iBAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,2CAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,kBAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9D,EAAE,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,UAAU,GAAG,UAAU,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,CAAC,mBAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,IAAI,QA4Bf","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport { FontFamily, FontStyle, TextVariant, TextColor } from '../../types';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
@@ -1,27 +1,32 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAP_TEXT_VARIANT_FONTWEIGHT = exports.TWCLASSMAP_TEXT_FONTWEIGHT = void 0;
4
- const design_system_shared_1 = require("@metamask-previews/design-system-shared");
4
+ const design_tokens_1 = require("@metamask-previews/design-tokens");
5
+ const types_1 = require("../../types/index.cjs");
5
6
  // Mappings
6
7
  exports.TWCLASSMAP_TEXT_FONTWEIGHT = {
7
- [design_system_shared_1.FontWeight.Regular]: '-regular',
8
- [design_system_shared_1.FontWeight.Medium]: '-medium',
9
- [design_system_shared_1.FontWeight.Bold]: '-bold',
8
+ [types_1.FontWeight.Regular]: '-regular',
9
+ [types_1.FontWeight.Medium]: '-medium',
10
+ [types_1.FontWeight.Bold]: '-bold',
10
11
  };
11
12
  exports.MAP_TEXT_VARIANT_FONTWEIGHT = {
12
- [design_system_shared_1.TextVariant.DisplayLg]: design_system_shared_1.FontWeight.Bold,
13
- [design_system_shared_1.TextVariant.DisplayMd]: design_system_shared_1.FontWeight.Bold,
14
- [design_system_shared_1.TextVariant.HeadingLg]: design_system_shared_1.FontWeight.Bold,
15
- [design_system_shared_1.TextVariant.HeadingMd]: design_system_shared_1.FontWeight.Bold,
16
- [design_system_shared_1.TextVariant.HeadingSm]: design_system_shared_1.FontWeight.Bold,
17
- [design_system_shared_1.TextVariant.BodyLg]: design_system_shared_1.FontWeight.Medium,
18
- [design_system_shared_1.TextVariant.BodyMd]: design_system_shared_1.FontWeight.Regular,
19
- [design_system_shared_1.TextVariant.BodySm]: design_system_shared_1.FontWeight.Regular,
20
- [design_system_shared_1.TextVariant.BodyXs]: design_system_shared_1.FontWeight.Regular,
21
- [design_system_shared_1.TextVariant.PageHeading]: design_system_shared_1.FontWeight.Bold,
22
- [design_system_shared_1.TextVariant.SectionHeading]: design_system_shared_1.FontWeight.Bold,
23
- [design_system_shared_1.TextVariant.ButtonLabelMd]: design_system_shared_1.FontWeight.Medium,
24
- [design_system_shared_1.TextVariant.ButtonLabelLg]: design_system_shared_1.FontWeight.Medium,
25
- [design_system_shared_1.TextVariant.AmountDisplayLg]: design_system_shared_1.FontWeight.Bold,
13
+ [types_1.TextVariant.DisplayLg]: design_tokens_1.typography.sDisplayLG.fontWeight,
14
+ [types_1.TextVariant.DisplayMd]: design_tokens_1.typography.sDisplayMD.fontWeight,
15
+ [types_1.TextVariant.HeadingLg]: design_tokens_1.typography.sHeadingLG.fontWeight,
16
+ [types_1.TextVariant.HeadingMd]: design_tokens_1.typography.sHeadingMD.fontWeight,
17
+ [types_1.TextVariant.HeadingSm]: design_tokens_1.typography.sHeadingSM.fontWeight,
18
+ [types_1.TextVariant.BodyLg]: design_tokens_1.typography.sBodyLGMedium.fontWeight,
19
+ [types_1.TextVariant.BodyMd]: design_tokens_1.typography.sBodyMD.fontWeight,
20
+ [types_1.TextVariant.BodySm]: design_tokens_1.typography.sBodySM.fontWeight,
21
+ [types_1.TextVariant.BodyXs]: design_tokens_1.typography.sBodyXS.fontWeight,
22
+ [types_1.TextVariant.PageHeading]: design_tokens_1.typography.sPageHeading.fontWeight,
23
+ [types_1.TextVariant.SectionHeading]: design_tokens_1.typography.sSectionHeading
24
+ .fontWeight,
25
+ [types_1.TextVariant.ButtonLabelMd]: design_tokens_1.typography.sButtonLabelMd
26
+ .fontWeight,
27
+ [types_1.TextVariant.ButtonLabelLg]: design_tokens_1.typography.sButtonLabelLg
28
+ .fontWeight,
29
+ [types_1.TextVariant.AmountDisplayLg]: design_tokens_1.typography.sAmountDisplayLg
30
+ .fontWeight,
26
31
  };
27
32
  //# sourceMappingURL=Text.constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";;;AAAA,kFAAkF;AAElF,WAAW;AACE,QAAA,0BAA0B,GAEnC;IACF,CAAC,iCAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,iCAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,iCAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEW,QAAA,2BAA2B,GAEpC;IACF,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,SAAS,CAAC,EAAE,iCAAU,CAAC,IAAI;IACxC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,MAAM;IACvC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,OAAO;IACxC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,OAAO;IACxC,CAAC,kCAAW,CAAC,MAAM,CAAC,EAAE,iCAAU,CAAC,OAAO;IACxC,CAAC,kCAAW,CAAC,WAAW,CAAC,EAAE,iCAAU,CAAC,IAAI;IAC1C,CAAC,kCAAW,CAAC,cAAc,CAAC,EAAE,iCAAU,CAAC,IAAI;IAC7C,CAAC,kCAAW,CAAC,aAAa,CAAC,EAAE,iCAAU,CAAC,MAAM;IAC9C,CAAC,kCAAW,CAAC,aAAa,CAAC,EAAE,iCAAU,CAAC,MAAM;IAC9C,CAAC,kCAAW,CAAC,eAAe,CAAC,EAAE,iCAAU,CAAC,IAAI;CAC/C,CAAC","sourcesContent":["import { FontWeight, TextVariant } from '@metamask-previews/design-system-shared';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: FontWeight.Bold,\n [TextVariant.DisplayMd]: FontWeight.Bold,\n [TextVariant.HeadingLg]: FontWeight.Bold,\n [TextVariant.HeadingMd]: FontWeight.Bold,\n [TextVariant.HeadingSm]: FontWeight.Bold,\n [TextVariant.BodyLg]: FontWeight.Medium,\n [TextVariant.BodyMd]: FontWeight.Regular,\n [TextVariant.BodySm]: FontWeight.Regular,\n [TextVariant.BodyXs]: FontWeight.Regular,\n [TextVariant.PageHeading]: FontWeight.Bold,\n [TextVariant.SectionHeading]: FontWeight.Bold,\n [TextVariant.ButtonLabelMd]: FontWeight.Medium,\n [TextVariant.ButtonLabelLg]: FontWeight.Medium,\n [TextVariant.AmountDisplayLg]: FontWeight.Bold,\n};\n"]}
1
+ {"version":3,"file":"Text.constants.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":";;;AAAA,oEAA8D;AAE9D,iDAAsD;AAEtD,WAAW;AACE,QAAA,0BAA0B,GAEnC;IACF,CAAC,kBAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,kBAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,kBAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEW,QAAA,2BAA2B,GAEpC;IACF,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,SAAS,CAAC,EAAE,0BAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,aAAa,CAAC,UAAwB;IACvE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,mBAAW,CAAC,MAAM,CAAC,EAAE,0BAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,mBAAW,CAAC,WAAW,CAAC,EAAE,0BAAU,CAAC,YAAY,CAAC,UAAwB;IAC3E,CAAC,mBAAW,CAAC,cAAc,CAAC,EAAE,0BAAU,CAAC,eAAe;SACrD,UAAwB;IAC3B,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE,0BAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,mBAAW,CAAC,aAAa,CAAC,EAAE,0BAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,mBAAW,CAAC,eAAe,CAAC,EAAE,0BAAU,CAAC,gBAAgB;SACvD,UAAwB;CAC5B,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { FontWeight, TextVariant } from '../../types';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: typography.sDisplayLG.fontWeight as FontWeight,\n [TextVariant.DisplayMd]: typography.sDisplayMD.fontWeight as FontWeight,\n [TextVariant.HeadingLg]: typography.sHeadingLG.fontWeight as FontWeight,\n [TextVariant.HeadingMd]: typography.sHeadingMD.fontWeight as FontWeight,\n [TextVariant.HeadingSm]: typography.sHeadingSM.fontWeight as FontWeight,\n [TextVariant.BodyLg]: typography.sBodyLGMedium.fontWeight as FontWeight,\n [TextVariant.BodyMd]: typography.sBodyMD.fontWeight as FontWeight,\n [TextVariant.BodySm]: typography.sBodySM.fontWeight as FontWeight,\n [TextVariant.BodyXs]: typography.sBodyXS.fontWeight as FontWeight,\n [TextVariant.PageHeading]: typography.sPageHeading.fontWeight as FontWeight,\n [TextVariant.SectionHeading]: typography.sSectionHeading\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelMd]: typography.sButtonLabelMd\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelLg]: typography.sButtonLabelLg\n .fontWeight as FontWeight,\n [TextVariant.AmountDisplayLg]: typography.sAmountDisplayLg\n .fontWeight as FontWeight,\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { FontWeight, TextVariant } from "@metamask-previews/design-system-shared";
1
+ import { FontWeight, TextVariant } from "../../types/index.cjs";
2
2
  export declare const TWCLASSMAP_TEXT_FONTWEIGHT: {
3
3
  [key in FontWeight]: string;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAGlF,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAgBjC,CAAC"}
1
+ {"version":3,"file":"Text.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AAGtD,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAoBjC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FontWeight, TextVariant } from "@metamask-previews/design-system-shared";
1
+ import { FontWeight, TextVariant } from "../../types/index.mjs";
2
2
  export declare const TWCLASSMAP_TEXT_FONTWEIGHT: {
3
3
  [key in FontWeight]: string;
4
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAGlF,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAgBjC,CAAC"}
1
+ {"version":3,"file":"Text.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AAGtD,eAAO,MAAM,0BAA0B,EAAE;KACtC,GAAG,IAAI,UAAU,GAAG,MAAM;CAK5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE;KACvC,GAAG,IAAI,WAAW,GAAG,UAAU;CAoBjC,CAAC"}
@@ -1,4 +1,5 @@
1
- import { FontWeight, TextVariant } from "@metamask-previews/design-system-shared";
1
+ import { typography } from "@metamask-previews/design-tokens";
2
+ import { FontWeight, TextVariant } from "../../types/index.mjs";
2
3
  // Mappings
3
4
  export const TWCLASSMAP_TEXT_FONTWEIGHT = {
4
5
  [FontWeight.Regular]: '-regular',
@@ -6,19 +7,23 @@ export const TWCLASSMAP_TEXT_FONTWEIGHT = {
6
7
  [FontWeight.Bold]: '-bold',
7
8
  };
8
9
  export const MAP_TEXT_VARIANT_FONTWEIGHT = {
9
- [TextVariant.DisplayLg]: FontWeight.Bold,
10
- [TextVariant.DisplayMd]: FontWeight.Bold,
11
- [TextVariant.HeadingLg]: FontWeight.Bold,
12
- [TextVariant.HeadingMd]: FontWeight.Bold,
13
- [TextVariant.HeadingSm]: FontWeight.Bold,
14
- [TextVariant.BodyLg]: FontWeight.Medium,
15
- [TextVariant.BodyMd]: FontWeight.Regular,
16
- [TextVariant.BodySm]: FontWeight.Regular,
17
- [TextVariant.BodyXs]: FontWeight.Regular,
18
- [TextVariant.PageHeading]: FontWeight.Bold,
19
- [TextVariant.SectionHeading]: FontWeight.Bold,
20
- [TextVariant.ButtonLabelMd]: FontWeight.Medium,
21
- [TextVariant.ButtonLabelLg]: FontWeight.Medium,
22
- [TextVariant.AmountDisplayLg]: FontWeight.Bold,
10
+ [TextVariant.DisplayLg]: typography.sDisplayLG.fontWeight,
11
+ [TextVariant.DisplayMd]: typography.sDisplayMD.fontWeight,
12
+ [TextVariant.HeadingLg]: typography.sHeadingLG.fontWeight,
13
+ [TextVariant.HeadingMd]: typography.sHeadingMD.fontWeight,
14
+ [TextVariant.HeadingSm]: typography.sHeadingSM.fontWeight,
15
+ [TextVariant.BodyLg]: typography.sBodyLGMedium.fontWeight,
16
+ [TextVariant.BodyMd]: typography.sBodyMD.fontWeight,
17
+ [TextVariant.BodySm]: typography.sBodySM.fontWeight,
18
+ [TextVariant.BodyXs]: typography.sBodyXS.fontWeight,
19
+ [TextVariant.PageHeading]: typography.sPageHeading.fontWeight,
20
+ [TextVariant.SectionHeading]: typography.sSectionHeading
21
+ .fontWeight,
22
+ [TextVariant.ButtonLabelMd]: typography.sButtonLabelMd
23
+ .fontWeight,
24
+ [TextVariant.ButtonLabelLg]: typography.sButtonLabelLg
25
+ .fontWeight,
26
+ [TextVariant.AmountDisplayLg]: typography.sAmountDisplayLg
27
+ .fontWeight,
23
28
  };
24
29
  //# sourceMappingURL=Text.constants.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,gDAAgD;AAElF,WAAW;AACX,MAAM,CAAC,MAAM,0BAA0B,GAEnC;IACF,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAEpC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,IAAI;IACxC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,MAAM;IACvC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO;IACxC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO;IACxC,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO;IACxC,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,IAAI;IAC1C,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,IAAI;IAC7C,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,MAAM;IAC9C,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,MAAM;IAC9C,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,IAAI;CAC/C,CAAC","sourcesContent":["import { FontWeight, TextVariant } from '@metamask-previews/design-system-shared';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: FontWeight.Bold,\n [TextVariant.DisplayMd]: FontWeight.Bold,\n [TextVariant.HeadingLg]: FontWeight.Bold,\n [TextVariant.HeadingMd]: FontWeight.Bold,\n [TextVariant.HeadingSm]: FontWeight.Bold,\n [TextVariant.BodyLg]: FontWeight.Medium,\n [TextVariant.BodyMd]: FontWeight.Regular,\n [TextVariant.BodySm]: FontWeight.Regular,\n [TextVariant.BodyXs]: FontWeight.Regular,\n [TextVariant.PageHeading]: FontWeight.Bold,\n [TextVariant.SectionHeading]: FontWeight.Bold,\n [TextVariant.ButtonLabelMd]: FontWeight.Medium,\n [TextVariant.ButtonLabelLg]: FontWeight.Medium,\n [TextVariant.AmountDisplayLg]: FontWeight.Bold,\n};\n"]}
1
+ {"version":3,"file":"Text.constants.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yCAAyC;AAE9D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AAEtD,WAAW;AACX,MAAM,CAAC,MAAM,0BAA0B,GAEnC;IACF,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU;IAChC,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,SAAS;IAC9B,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAEpC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,aAAa,CAAC,UAAwB;IACvE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,UAAwB;IACjE,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,YAAY,CAAC,UAAwB;IAC3E,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,eAAe;SACrD,UAAwB;IAC3B,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,UAAU,CAAC,cAAc;SACnD,UAAwB;IAC3B,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,gBAAgB;SACvD,UAAwB;CAC5B,CAAC","sourcesContent":["import { typography } from '@metamask-previews/design-tokens';\n\nimport { FontWeight, TextVariant } from '../../types';\n\n// Mappings\nexport const TWCLASSMAP_TEXT_FONTWEIGHT: {\n [key in FontWeight]: string;\n} = {\n [FontWeight.Regular]: '-regular',\n [FontWeight.Medium]: '-medium',\n [FontWeight.Bold]: '-bold',\n};\n\nexport const MAP_TEXT_VARIANT_FONTWEIGHT: {\n [key in TextVariant]: FontWeight;\n} = {\n [TextVariant.DisplayLg]: typography.sDisplayLG.fontWeight as FontWeight,\n [TextVariant.DisplayMd]: typography.sDisplayMD.fontWeight as FontWeight,\n [TextVariant.HeadingLg]: typography.sHeadingLG.fontWeight as FontWeight,\n [TextVariant.HeadingMd]: typography.sHeadingMD.fontWeight as FontWeight,\n [TextVariant.HeadingSm]: typography.sHeadingSM.fontWeight as FontWeight,\n [TextVariant.BodyLg]: typography.sBodyLGMedium.fontWeight as FontWeight,\n [TextVariant.BodyMd]: typography.sBodyMD.fontWeight as FontWeight,\n [TextVariant.BodySm]: typography.sBodySM.fontWeight as FontWeight,\n [TextVariant.BodyXs]: typography.sBodyXS.fontWeight as FontWeight,\n [TextVariant.PageHeading]: typography.sPageHeading.fontWeight as FontWeight,\n [TextVariant.SectionHeading]: typography.sSectionHeading\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelMd]: typography.sButtonLabelMd\n .fontWeight as FontWeight,\n [TextVariant.ButtonLabelLg]: typography.sButtonLabelLg\n .fontWeight as FontWeight,\n [TextVariant.AmountDisplayLg]: typography.sAmountDisplayLg\n .fontWeight as FontWeight,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,cAAc;AAOvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
1
+ {"version":3,"file":"Text.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,cAAc;AAOvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
1
+ {"version":3,"file":"Text.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,SAAS,EAAE,yBAAqB;AAE9C,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA4BpC,CAAC"}
@@ -4,11 +4,11 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { FontFamily, FontStyle, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
7
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
9
8
  import $React, { useMemo } from "react";
10
9
  const React = $importDefault($React);
11
10
  import { Text as RNText } from "react-native/index.js";
11
+ import { FontFamily, FontStyle, TextVariant, TextColor } from "../../types/index.mjs";
12
12
  import { MAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "./Text.constants.mjs";
13
13
  export const Text = ({ variant = TextVariant.BodyMd, color = TextColor.TextDefault, style, children, fontWeight, fontFamily = FontFamily.Default, fontStyle = FontStyle.Normal, twClassName, ...props }) => {
14
14
  const tw = useTailwind();
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,8BAAqB;AAE9C,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,6BAAyB;AAG1B,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,UAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,SAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,SAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,0BAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9D,EAAE,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,UAAU,GAAG,UAAU,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n FontFamily,\n FontStyle,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
1
+ {"version":3,"file":"Text.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI,IAAI,MAAM,EAAE,8BAAqB;AAE9C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAoB;AAE5E,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,6BAAyB;AAG1B,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EACxC,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,KAAK,EACL,QAAQ,EACR,UAAU,EACV,UAAU,GAAG,UAAU,CAAC,OAAO,EAC/B,SAAS,GAAG,SAAS,CAAC,MAAM,EAC5B,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,eAAe,GAAG,UAAU,IAAI,2BAA2B,CAAC,OAAO,CAAC,CAAC;IAE3E,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE;QAC7B,MAAM,QAAQ,GAAG,SAAS,KAAK,SAAS,CAAC,MAAM,CAAC;QAChD,MAAM,UAAU,GAAG,GAAG,0BAA0B,CAAC,eAAe,CAAC,GAC/D,QAAQ,IAAI,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC9D,EAAE,CAAC;QACH,MAAM,SAAS,GAAG,QAAQ,UAAU,GAAG,UAAU,EAAE,CAAC;QACpD,OAAO,EAAE,CAAC,KAAK,CAAC,QAAQ,OAAO,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACpE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { Text as RNText } from 'react-native';\n\nimport { FontFamily, FontStyle, TextVariant, TextColor } from '../../types';\n\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from './Text.constants';\nimport type { TextProps } from './Text.types';\n\nexport const Text: React.FC<TextProps> = ({\n variant = TextVariant.BodyMd,\n color = TextColor.TextDefault,\n style,\n children,\n fontWeight,\n fontFamily = FontFamily.Default,\n fontStyle = FontStyle.Normal,\n twClassName,\n ...props\n}) => {\n const tw = useTailwind();\n const finalFontWeight = fontWeight ?? MAP_TEXT_VARIANT_FONTWEIGHT[variant];\n\n const textStyle = useMemo(() => {\n const isItalic = fontStyle === FontStyle.Italic;\n const fontSuffix = `${TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight]}${\n isItalic && fontFamily === FontFamily.Default ? '-italic' : ''\n }`;\n const fontClass = `font-${fontFamily}${fontSuffix}`;\n return tw.style(`text-${variant}`, fontClass, color, twClassName);\n }, [variant, color, finalFontWeight, fontFamily, fontStyle, twClassName, tw]);\n\n return (\n <RNText accessibilityRole=\"text\" {...props} style={[textStyle, style]}>\n {children}\n </RNText>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FontFamily,\n FontStyle,\n FontWeight,\n TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nimport type { TextProps as RNTextProps } from 'react-native';\n\n/**\n * Text component props.\n */\nexport type TextProps = TextPropsShared &\n RNTextProps & {\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
1
+ {"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
@@ -1,9 +1,23 @@
1
- import type { FontFamily, FontStyle, FontWeight, TextPropsShared } from "@metamask-previews/design-system-shared";
2
1
  import type { TextProps as RNTextProps } from "react-native/index.js";
2
+ import type { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.cjs";
3
3
  /**
4
4
  * Text component props.
5
5
  */
6
- export type TextProps = TextPropsShared & RNTextProps & {
6
+ export type TextProps = {
7
+ /**
8
+ * Optional enum to select between Typography variants.
9
+ *
10
+ * @default BodyMD
11
+ */
12
+ variant?: TextVariant;
13
+ /**
14
+ * Text to be displayed.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Optional prop to add color to text.
19
+ */
20
+ color?: TextColor;
7
21
  /**
8
22
  * Optional prop to control the font weight of the text.
9
23
  * Normal: 400
@@ -26,5 +40,5 @@ export type TextProps = TextPropsShared & RNTextProps & {
26
40
  * Optional prop to add twrnc overriding classNames.
27
41
  */
28
42
  twClassName?: string;
29
- };
43
+ } & RNTextProps;
30
44
  //# sourceMappingURL=Text.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EAChB,gDAAgD;AACjD,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GACrC,WAAW,GAAG;IACZ;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"Text.types.d.cts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,8BAAoB;AAErB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,WAAW,CAAC"}
@@ -1,9 +1,23 @@
1
- import type { FontFamily, FontStyle, FontWeight, TextPropsShared } from "@metamask-previews/design-system-shared";
2
1
  import type { TextProps as RNTextProps } from "react-native/index.js";
2
+ import type { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.mjs";
3
3
  /**
4
4
  * Text component props.
5
5
  */
6
- export type TextProps = TextPropsShared & RNTextProps & {
6
+ export type TextProps = {
7
+ /**
8
+ * Optional enum to select between Typography variants.
9
+ *
10
+ * @default BodyMD
11
+ */
12
+ variant?: TextVariant;
13
+ /**
14
+ * Text to be displayed.
15
+ */
16
+ children: React.ReactNode;
17
+ /**
18
+ * Optional prop to add color to text.
19
+ */
20
+ color?: TextColor;
7
21
  /**
8
22
  * Optional prop to control the font weight of the text.
9
23
  * Normal: 400
@@ -26,5 +40,5 @@ export type TextProps = TextPropsShared & RNTextProps & {
26
40
  * Optional prop to add twrnc overriding classNames.
27
41
  */
28
42
  twClassName?: string;
29
- };
43
+ } & RNTextProps;
30
44
  //# sourceMappingURL=Text.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EAChB,gDAAgD;AACjD,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,eAAe,GACrC,WAAW,GAAG;IACZ;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"Text.types.d.mts","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,IAAI,WAAW,EAAE,8BAAqB;AAE7D,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,8BAAoB;AAErB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG;IACtB;;;;OAIG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n FontFamily,\n FontStyle,\n FontWeight,\n TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nimport type { TextProps as RNTextProps } from 'react-native';\n\n/**\n * Text component props.\n */\nexport type TextProps = TextPropsShared &\n RNTextProps & {\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
1
+ {"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Text = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextVariant = exports.TextColor = void 0;
4
- var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
- Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return design_system_shared_1.TextColor; } });
6
- Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return design_system_shared_1.TextVariant; } });
7
- Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return design_system_shared_1.FontWeight; } });
8
- Object.defineProperty(exports, "FontFamily", { enumerable: true, get: function () { return design_system_shared_1.FontFamily; } });
9
- Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return design_system_shared_1.FontStyle; } });
3
+ exports.Text = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextColor = exports.TextVariant = void 0;
4
+ var types_1 = require("../../types/index.cjs");
5
+ Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function () { return types_1.TextVariant; } });
6
+ Object.defineProperty(exports, "TextColor", { enumerable: true, get: function () { return types_1.TextColor; } });
7
+ Object.defineProperty(exports, "FontWeight", { enumerable: true, get: function () { return types_1.FontWeight; } });
8
+ Object.defineProperty(exports, "FontFamily", { enumerable: true, get: function () { return types_1.FontFamily; } });
9
+ Object.defineProperty(exports, "FontStyle", { enumerable: true, get: function () { return types_1.FontStyle; } });
10
10
  var Text_1 = require("./Text.cjs");
11
11
  Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return Text_1.Text; } });
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;AAAA,gFAOiD;AAN/C,iHAAA,SAAS,OAAA;AACT,mHAAA,WAAW,OAAA;AACX,kHAAA,UAAU,OAAA;AACV,kHAAA,UAAU,OAAA;AACV,iHAAA,SAAS,OAAA;AAGX,mCAA8B;AAArB,4FAAA,IAAI,OAAA","sourcesContent":["export {\n TextColor,\n TextVariant,\n FontWeight,\n FontFamily,\n FontStyle,\n type TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":";;;AAAA,+CAMqB;AALnB,oGAAA,WAAW,OAAA;AACX,kGAAA,SAAS,OAAA;AACT,mGAAA,UAAU,OAAA;AACV,mGAAA,UAAU,OAAA;AACV,kGAAA,SAAS,OAAA;AAEX,mCAA8B;AAArB,4FAAA,IAAI,OAAA","sourcesContent":["export {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
@@ -1,4 +1,4 @@
1
- export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle, type TextPropsShared, } from "@metamask-previews/design-system-shared";
1
+ export { TextVariant, TextColor, FontWeight, FontFamily, FontStyle, } from "../../types/index.cjs";
2
2
  export { Text } from "./Text.cjs";
3
3
  export type { TextProps } from "./Text.types.cjs";
4
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,eAAe,GACrB,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,GACV,8BAAoB;AACrB,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
@@ -1,4 +1,4 @@
1
- export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle, type TextPropsShared, } from "@metamask-previews/design-system-shared";
1
+ export { TextVariant, TextColor, FontWeight, FontFamily, FontStyle, } from "../../types/index.mjs";
2
2
  export { Text } from "./Text.mjs";
3
3
  export type { TextProps } from "./Text.types.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EACT,KAAK,eAAe,GACrB,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,GACV,8BAAoB;AACrB,OAAO,EAAE,IAAI,EAAE,mBAAe;AAC9B,YAAY,EAAE,SAAS,EAAE,yBAAqB"}
@@ -1,3 +1,3 @@
1
- export { TextColor, TextVariant, FontWeight, FontFamily, FontStyle } from "@metamask-previews/design-system-shared";
1
+ export { TextVariant, TextColor, FontWeight, FontFamily, FontStyle } from "../../types/index.mjs";
2
2
  export { Text } from "./Text.mjs";
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,SAAS,EAEV,gDAAgD;AACjD,OAAO,EAAE,IAAI,EAAE,mBAAe","sourcesContent":["export {\n TextColor,\n TextVariant,\n FontWeight,\n FontFamily,\n FontStyle,\n type TextPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACV,8BAAoB;AACrB,OAAO,EAAE,IAAI,EAAE,mBAAe","sourcesContent":["export {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\nexport { Text } from './Text';\nexport type { TextProps } from './Text.types';\n"]}
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.TextButton = void 0;
27
- const design_system_shared_1 = require("@metamask-previews/design-system-shared");
28
27
  const react_1 = __importStar(require("react"));
28
+ const types_1 = require("../../types/index.cjs");
29
29
  const Text_1 = require("../Text/index.cjs");
30
- const TextButton = ({ children, variant = design_system_shared_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
30
+ const TextButton = ({ children, variant = types_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
31
31
  const [pressed, setPressed] = (0, react_1.useState)(false);
32
32
  const handlePressIn = (e) => {
33
33
  setPressed(true);
@@ -37,7 +37,7 @@ const TextButton = ({ children, variant = design_system_shared_1.TextVariant.Bod
37
37
  setPressed(false);
38
38
  onPressOut?.(e);
39
39
  };
40
- return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? design_system_shared_1.TextColor.PrimaryDefaultPressed : design_system_shared_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
40
+ return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? types_1.TextColor.PrimaryDefaultPressed : types_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
41
41
  {children}
42
42
  </Text_1.Text>);
43
43
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAiF;AACjF,+CAAwC;AAExC,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,kCAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,gCAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,gCAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import { TextColor, TextVariant } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\n\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
1
+ {"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAExC,iDAAqD;AACrD,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,mBAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,iBAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,iBAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAIxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
1
+ {"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAIxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
1
+ {"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
@@ -4,9 +4,9 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
7
  import $React, { useState } from "react";
9
8
  const React = $importDefault($React);
9
+ import { TextVariant, TextColor } from "../../types/index.mjs";
10
10
  import { Text, FontWeight } from "../Text/index.mjs";
11
11
  export const TextButton = ({ children, variant = TextVariant.BodyMd, fontWeight = FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
12
12
  const [pressed, setPressed] = useState(false);
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,gDAAgD;AACjF,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { TextColor, TextVariant } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\n\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
1
+ {"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAoB;AACrD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TextField = void 0;
4
- const design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
4
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
6
5
  const react_1 = require("react");
7
6
  const react_native_1 = require("react-native/index.js");
7
+ const types_1 = require("../../types/index.cjs");
8
8
  const Input_1 = require("../Input/index.cjs");
9
9
  function getContainerBorderColorClass(isDisabled, isFocused, isError) {
10
10
  if (isDisabled) {
@@ -45,7 +45,7 @@ exports.TextField = (0, react_1.forwardRef)(({ style, startAccessory, endAccesso
45
45
  return (<react_native_1.Pressable testID={testID} style={[containerStyle, style]} onPress={onPressHandler} accessible={false}>
46
46
  {startAccessory}
47
47
  <react_native_1.View style={tw.style('min-h-0 flex-1 justify-center')}>
48
- {inputElement ?? (<Input_1.Input {...props} ref={inputRef} textVariant={design_system_shared_1.TextVariant.BodyMd} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled
48
+ {inputElement ?? (<Input_1.Input {...props} ref={inputRef} textVariant={types_1.TextVariant.BodyMd} isDisabled={isDisabled} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler} isStateStylesDisabled
49
49
  // Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput
50
50
  // uses 46px height so the field matches a 48px-tall control without vertical overflow.
51
51
  twClassName="h-[46px] bg-transparent border-0" numberOfLines={1} multiline={false}/>)}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,kFAAsE;AACtE,8FAA4E;AAC5E,iCAOe;AACf,wDAA0D;AAE1D,8CAAiC;AAIjC,SAAS,4BAA4B,CACnC,UAAmB,EACnB,SAAkB,EAClB,OAAgB;IAEhB,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IACD,IAAI,OAAO,EAAE;QACX,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,gBAAgB,CAAC;KACzB;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAEY,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CACE,EACE,KAAK,EACL,cAAc,EACd,YAAY,EACZ,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAY,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,IAAA,2BAAmB,EACjB,GAAG,EACH,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EACtB,EAAE,CACH,CAAC;IAEF,MAAM,gBAAgB,GAAG,4BAA4B,CACnD,UAAU,EACV,SAAS,EACT,OAAO,CACR,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,eAAO,EAC5B,GAAG,EAAE,CACH,EAAE,CAAC,KAAK,CACN,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,UAAU,IAAI,YAAY,EAC1B,WAAW,CACZ,EACH,CAAC,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC,CAChD,CAAC;IAEF,MAAM,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,CAAuD,EAAE,EAAE;QAC1D,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,CAAwD,EAAE,EAAE;QAC3D,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SACd;IACH,CAAC,EACD,CAAC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACtC,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,OAAO,EAAE;YACnC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SAC1B;IACH,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,wBAAS,CACR,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAC/B,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,UAAU,CAAC,CAAC,KAAK,CAAC,CAElB;QAAA,CAAC,cAAc,CACf;QAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CACrD;UAAA,CAAC,YAAY,IAAI,CACf,CAAC,aAAK,CACJ,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,QAAQ,CAAC,CACd,WAAW,CAAC,CAAC,kCAAW,CAAC,MAAM,CAAC,CAChC,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB;QACrB,0FAA0F;QAC1F,uFAAuF;QACvF,WAAW,CAAC,kCAAkC,CAC9C,aAAa,CAAC,CAAC,CAAC,CAAC,CACjB,SAAS,CAAC,CAAC,KAAK,CAAC,EACjB,CACH,CACH;QAAA,EAAE,mBAAI,CACN;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { TextVariant } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Pressable, TextInput, View } from 'react-native';\n\nimport { Input } from '../Input';\n\nimport type { TextFieldProps } from './TextField.types';\n\nfunction getContainerBorderColorClass(\n isDisabled: boolean,\n isFocused: boolean,\n isError: boolean,\n): string {\n if (isDisabled) {\n return 'border-muted';\n }\n if (isError) {\n return 'border-error-default';\n }\n if (isFocused) {\n return 'border-default';\n }\n return 'border-muted';\n}\n\nexport const TextField = forwardRef<TextInput, TextFieldProps>(\n (\n {\n style,\n startAccessory,\n endAccessory,\n isError = false,\n inputElement,\n isDisabled = false,\n autoFocus = false,\n twClassName,\n onBlur,\n onFocus,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const inputRef = useRef<TextInput>(null);\n const tw = useTailwind();\n\n useImperativeHandle<TextInput | null, TextInput | null>(\n ref,\n () => inputRef.current,\n [],\n );\n\n const borderColorClass = getContainerBorderColorClass(\n isDisabled,\n isFocused,\n isError,\n );\n\n const containerStyle = useMemo(\n () =>\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n borderColorClass,\n 'px-4',\n 'bg-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n [borderColorClass, isDisabled, twClassName, tw],\n );\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const onPressHandler = useCallback(() => {\n if (!isDisabled && inputRef.current) {\n inputRef.current.focus();\n }\n }, [isDisabled]);\n\n return (\n <Pressable\n testID={testID}\n style={[containerStyle, style]}\n onPress={onPressHandler}\n accessible={false}\n >\n {startAccessory}\n <View style={tw.style('min-h-0 flex-1 justify-center')}>\n {inputElement ?? (\n <Input\n {...props}\n ref={inputRef}\n textVariant={TextVariant.BodyMd}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n // Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput\n // uses 46px height so the field matches a 48px-tall control without vertical overflow.\n twClassName=\"h-[46px] bg-transparent border-0\"\n numberOfLines={1}\n multiline={false}\n />\n )}\n </View>\n {endAccessory}\n </Pressable>\n );\n },\n);\n"]}
1
+ {"version":3,"file":"TextField.cjs","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":";;;AAAA,8FAA4E;AAC5E,iCAOe;AACf,wDAA0D;AAE1D,iDAA0C;AAC1C,8CAAiC;AAIjC,SAAS,4BAA4B,CACnC,UAAmB,EACnB,SAAkB,EAClB,OAAgB;IAEhB,IAAI,UAAU,EAAE;QACd,OAAO,cAAc,CAAC;KACvB;IACD,IAAI,OAAO,EAAE;QACX,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,gBAAgB,CAAC;KACzB;IACD,OAAO,cAAc,CAAC;AACxB,CAAC;AAEY,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CACE,EACE,KAAK,EACL,cAAc,EACd,YAAY,EACZ,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,WAAW,EACX,MAAM,EACN,OAAO,EACP,MAAM,EACN,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAY,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,IAAA,2BAAmB,EACjB,GAAG,EACH,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EACtB,EAAE,CACH,CAAC;IAEF,MAAM,gBAAgB,GAAG,4BAA4B,CACnD,UAAU,EACV,SAAS,EACT,OAAO,CACR,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,eAAO,EAC5B,GAAG,EAAE,CACH,EAAE,CAAC,KAAK,CACN,UAAU,EACV,cAAc,EACd,OAAO,EACP,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,gBAAgB,EAChB,MAAM,EACN,UAAU,EACV,UAAU,IAAI,YAAY,EAC1B,WAAW,CACZ,EACH,CAAC,gBAAgB,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC,CAChD,CAAC;IAEF,MAAM,aAAa,GAAG,IAAA,mBAAW,EAC/B,CAAC,CAAuD,EAAE,EAAE;QAC1D,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,KAAK,CAAC,CAAC;YACpB,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;SACb;IACH,CAAC,EACD,CAAC,UAAU,EAAE,MAAM,CAAC,CACrB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAChC,CAAC,CAAwD,EAAE,EAAE;QAC3D,IAAI,CAAC,UAAU,EAAE;YACf,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;SACd;IACH,CAAC,EACD,CAAC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAA,mBAAW,EAAC,GAAG,EAAE;QACtC,IAAI,CAAC,UAAU,IAAI,QAAQ,CAAC,OAAO,EAAE;YACnC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;SAC1B;IACH,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,wBAAS,CACR,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAC/B,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,UAAU,CAAC,CAAC,KAAK,CAAC,CAElB;QAAA,CAAC,cAAc,CACf;QAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,CACrD;UAAA,CAAC,YAAY,IAAI,CACf,CAAC,aAAK,CACJ,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,QAAQ,CAAC,CACd,WAAW,CAAC,CAAC,mBAAW,CAAC,MAAM,CAAC,CAChC,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,CACxB,qBAAqB;QACrB,0FAA0F;QAC1F,uFAAuF;QACvF,WAAW,CAAC,kCAAkC,CAC9C,aAAa,CAAC,CAAC,CAAC,CAAC,CACjB,SAAS,CAAC,CAAC,KAAK,CAAC,EACjB,CACH,CACH;QAAA,EAAE,mBAAI,CACN;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport {\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Pressable, TextInput, View } from 'react-native';\n\nimport { TextVariant } from '../../types';\nimport { Input } from '../Input';\n\nimport type { TextFieldProps } from './TextField.types';\n\nfunction getContainerBorderColorClass(\n isDisabled: boolean,\n isFocused: boolean,\n isError: boolean,\n): string {\n if (isDisabled) {\n return 'border-muted';\n }\n if (isError) {\n return 'border-error-default';\n }\n if (isFocused) {\n return 'border-default';\n }\n return 'border-muted';\n}\n\nexport const TextField = forwardRef<TextInput, TextFieldProps>(\n (\n {\n style,\n startAccessory,\n endAccessory,\n isError = false,\n inputElement,\n isDisabled = false,\n autoFocus = false,\n twClassName,\n onBlur,\n onFocus,\n testID,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const inputRef = useRef<TextInput>(null);\n const tw = useTailwind();\n\n useImperativeHandle<TextInput | null, TextInput | null>(\n ref,\n () => inputRef.current,\n [],\n );\n\n const borderColorClass = getContainerBorderColorClass(\n isDisabled,\n isFocused,\n isError,\n );\n\n const containerStyle = useMemo(\n () =>\n tw.style(\n 'flex-row',\n 'items-center',\n 'gap-3',\n 'rounded-lg',\n 'h-12',\n 'border',\n borderColorClass,\n 'px-4',\n 'bg-muted',\n isDisabled && 'opacity-50',\n twClassName,\n ),\n [borderColorClass, isDisabled, twClassName, tw],\n );\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<TextFieldProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const onPressHandler = useCallback(() => {\n if (!isDisabled && inputRef.current) {\n inputRef.current.focus();\n }\n }, [isDisabled]);\n\n return (\n <Pressable\n testID={testID}\n style={[containerStyle, style]}\n onPress={onPressHandler}\n accessible={false}\n >\n {startAccessory}\n <View style={tw.style('min-h-0 flex-1 justify-center')}>\n {inputElement ?? (\n <Input\n {...props}\n ref={inputRef}\n textVariant={TextVariant.BodyMd}\n isDisabled={isDisabled}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n isStateStylesDisabled\n // Row is `h-12` (48px) with `border` on the Pressable (1px top + bottom). Inner TextInput\n // uses 46px height so the field matches a 48px-tall control without vertical overflow.\n twClassName=\"h-[46px] bg-transparent border-0\"\n numberOfLines={1}\n multiline={false}\n />\n )}\n </View>\n {endAccessory}\n </Pressable>\n );\n },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAa,SAAS,EAAQ,8BAAqB;AAuB1D,eAAO,MAAM,SAAS;;;;;;;6CA6GrB,CAAC"}
1
+ {"version":3,"file":"TextField.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AASA,OAAO,EAAa,SAAS,EAAQ,8BAAqB;AAwB1D,eAAO,MAAM,SAAS;;;;;;;6CA6GrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAa,SAAS,EAAQ,8BAAqB;AAuB1D,eAAO,MAAM,SAAS;;;;;;;6CA6GrB,CAAC"}
1
+ {"version":3,"file":"TextField.d.mts","sourceRoot":"","sources":["../../../src/components/TextField/TextField.tsx"],"names":[],"mappings":"AASA,OAAO,EAAa,SAAS,EAAQ,8BAAqB;AAwB1D,eAAO,MAAM,SAAS;;;;;;;6CA6GrB,CAAC"}
@@ -1,7 +1,7 @@
1
- import { TextVariant } from "@metamask-previews/design-system-shared";
2
1
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
3
2
  import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState } from "react";
4
3
  import { Pressable, TextInput, View } from "react-native/index.js";
4
+ import { TextVariant } from "../../types/index.mjs";
5
5
  import { Input } from "../Input/index.mjs";
6
6
  function getContainerBorderColorClass(isDisabled, isFocused, isError) {
7
7
  if (isDisabled) {