@metamask/design-system-react-native 0.10.0 → 0.12.0

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 (430) hide show
  1. package/CHANGELOG.md +53 -1
  2. package/dist/components/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -1
  3. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts +7 -9
  4. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -1
  5. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts +7 -9
  6. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -1
  7. package/dist/components/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -1
  8. package/dist/components/BannerAlert/BannerAlert.cjs +23 -0
  9. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -0
  10. package/dist/components/BannerAlert/BannerAlert.constants.cjs +30 -0
  11. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -0
  12. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +7 -0
  13. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -0
  14. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +7 -0
  15. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -0
  16. package/dist/components/BannerAlert/BannerAlert.constants.mjs +27 -0
  17. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -0
  18. package/dist/components/BannerAlert/BannerAlert.d.cts +4 -0
  19. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -0
  20. package/dist/components/BannerAlert/BannerAlert.d.mts +4 -0
  21. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -0
  22. package/dist/components/BannerAlert/BannerAlert.mjs +23 -0
  23. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -0
  24. package/dist/components/BannerAlert/BannerAlert.types.cjs +3 -0
  25. package/dist/components/BannerAlert/BannerAlert.types.cjs.map +1 -0
  26. package/dist/components/BannerAlert/BannerAlert.types.d.cts +10 -0
  27. package/dist/components/BannerAlert/BannerAlert.types.d.cts.map +1 -0
  28. package/dist/components/BannerAlert/BannerAlert.types.d.mts +10 -0
  29. package/dist/components/BannerAlert/BannerAlert.types.d.mts.map +1 -0
  30. package/dist/components/BannerAlert/BannerAlert.types.mjs +2 -0
  31. package/dist/components/BannerAlert/BannerAlert.types.mjs.map +1 -0
  32. package/dist/components/BannerAlert/index.cjs +8 -0
  33. package/dist/components/BannerAlert/index.cjs.map +1 -0
  34. package/dist/components/BannerAlert/index.d.cts +4 -0
  35. package/dist/components/BannerAlert/index.d.cts.map +1 -0
  36. package/dist/components/BannerAlert/index.d.mts +4 -0
  37. package/dist/components/BannerAlert/index.d.mts.map +1 -0
  38. package/dist/components/BannerAlert/index.mjs +3 -0
  39. package/dist/components/BannerAlert/index.mjs.map +1 -0
  40. package/dist/components/BannerBase/BannerBase.cjs +63 -0
  41. package/dist/components/BannerBase/BannerBase.cjs.map +1 -0
  42. package/dist/components/BannerBase/BannerBase.d.cts +4 -0
  43. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -0
  44. package/dist/components/BannerBase/BannerBase.d.mts +4 -0
  45. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -0
  46. package/dist/components/BannerBase/BannerBase.mjs +63 -0
  47. package/dist/components/BannerBase/BannerBase.mjs.map +1 -0
  48. package/dist/components/BannerBase/BannerBase.types.cjs +3 -0
  49. package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -0
  50. package/dist/components/BannerBase/BannerBase.types.d.cts +53 -0
  51. package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -0
  52. package/dist/components/BannerBase/BannerBase.types.d.mts +53 -0
  53. package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -0
  54. package/dist/components/BannerBase/BannerBase.types.mjs +2 -0
  55. package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -0
  56. package/dist/components/BannerBase/index.cjs +6 -0
  57. package/dist/components/BannerBase/index.cjs.map +1 -0
  58. package/dist/components/BannerBase/index.d.cts +3 -0
  59. package/dist/components/BannerBase/index.d.cts.map +1 -0
  60. package/dist/components/BannerBase/index.d.mts +3 -0
  61. package/dist/components/BannerBase/index.d.mts.map +1 -0
  62. package/dist/components/BannerBase/index.mjs +2 -0
  63. package/dist/components/BannerBase/index.mjs.map +1 -0
  64. package/dist/components/BottomSheet/BottomSheet.cjs +109 -0
  65. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -0
  66. package/dist/components/BottomSheet/BottomSheet.d.cts +16 -0
  67. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  68. package/dist/components/BottomSheet/BottomSheet.d.mts +16 -0
  69. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  70. package/dist/components/BottomSheet/BottomSheet.mjs +87 -0
  71. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  72. package/dist/components/BottomSheet/BottomSheet.types.cjs +3 -0
  73. package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -0
  74. package/dist/components/BottomSheet/BottomSheet.types.d.cts +28 -0
  75. package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -0
  76. package/dist/components/BottomSheet/BottomSheet.types.d.mts +28 -0
  77. package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -0
  78. package/dist/components/BottomSheet/BottomSheet.types.mjs +2 -0
  79. package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -0
  80. package/dist/components/BottomSheet/index.cjs +6 -0
  81. package/dist/components/BottomSheet/index.cjs.map +1 -0
  82. package/dist/components/BottomSheet/index.d.cts +3 -0
  83. package/dist/components/BottomSheet/index.d.cts.map +1 -0
  84. package/dist/components/BottomSheet/index.d.mts +3 -0
  85. package/dist/components/BottomSheet/index.d.mts.map +1 -0
  86. package/dist/components/BottomSheet/index.mjs +2 -0
  87. package/dist/components/BottomSheet/index.mjs.map +1 -0
  88. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +207 -0
  89. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -0
  90. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs +18 -0
  91. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs.map +1 -0
  92. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts +14 -0
  93. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts.map +1 -0
  94. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts +14 -0
  95. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts.map +1 -0
  96. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs +15 -0
  97. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs.map +1 -0
  98. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +13 -0
  99. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -0
  100. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +13 -0
  101. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -0
  102. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +190 -0
  103. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -0
  104. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs +3 -0
  105. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -0
  106. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +56 -0
  107. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -0
  108. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +56 -0
  109. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -0
  110. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs +2 -0
  111. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -0
  112. package/dist/components/BottomSheetDialog/index.cjs +9 -0
  113. package/dist/components/BottomSheetDialog/index.cjs.map +1 -0
  114. package/dist/components/BottomSheetDialog/index.d.cts +3 -0
  115. package/dist/components/BottomSheetDialog/index.d.cts.map +1 -0
  116. package/dist/components/BottomSheetDialog/index.d.mts +3 -0
  117. package/dist/components/BottomSheetDialog/index.d.mts.map +1 -0
  118. package/dist/components/BottomSheetDialog/index.mjs +2 -0
  119. package/dist/components/BottomSheetDialog/index.mjs.map +1 -0
  120. package/dist/components/ButtonBase/ButtonBase.cjs +2 -9
  121. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  122. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  123. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  124. package/dist/components/ButtonBase/ButtonBase.mjs +3 -10
  125. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  126. package/dist/components/ButtonFilter/ButtonFilter.cjs +28 -0
  127. package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
  128. package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
  129. package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
  130. package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
  131. package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
  132. package/dist/components/ButtonFilter/ButtonFilter.mjs +28 -0
  133. package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
  134. package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
  135. package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
  136. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +9 -0
  137. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
  138. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +9 -0
  139. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
  140. package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
  141. package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
  142. package/dist/components/ButtonFilter/index.cjs +6 -0
  143. package/dist/components/ButtonFilter/index.cjs.map +1 -0
  144. package/dist/components/ButtonFilter/index.d.cts +3 -0
  145. package/dist/components/ButtonFilter/index.d.cts.map +1 -0
  146. package/dist/components/ButtonFilter/index.d.mts +3 -0
  147. package/dist/components/ButtonFilter/index.d.mts.map +1 -0
  148. package/dist/components/ButtonFilter/index.mjs +2 -0
  149. package/dist/components/ButtonFilter/index.mjs.map +1 -0
  150. package/dist/components/ButtonIcon/ButtonIcon.cjs +10 -4
  151. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  152. package/dist/components/ButtonIcon/ButtonIcon.d.cts +1 -1
  153. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  154. package/dist/components/ButtonIcon/ButtonIcon.d.mts +1 -1
  155. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  156. package/dist/components/ButtonIcon/ButtonIcon.mjs +11 -5
  157. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  158. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  159. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -11
  160. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  161. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -11
  162. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  163. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  164. package/dist/components/ButtonIcon/index.cjs +2 -1
  165. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  166. package/dist/components/ButtonIcon/index.d.cts +1 -1
  167. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  168. package/dist/components/ButtonIcon/index.d.mts +1 -1
  169. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  170. package/dist/components/ButtonIcon/index.mjs +1 -1
  171. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  172. package/dist/components/Icon/assets/ai.svg +1 -1
  173. package/dist/components/Icon/assets/candlestick.svg +1 -1
  174. package/dist/components/Input/Input.cjs +16 -5
  175. package/dist/components/Input/Input.cjs.map +1 -1
  176. package/dist/components/Input/Input.constants.cjs +69 -0
  177. package/dist/components/Input/Input.constants.cjs.map +1 -0
  178. package/dist/components/Input/Input.constants.d.cts +11 -0
  179. package/dist/components/Input/Input.constants.d.cts.map +1 -0
  180. package/dist/components/Input/Input.constants.d.mts +11 -0
  181. package/dist/components/Input/Input.constants.d.mts.map +1 -0
  182. package/dist/components/Input/Input.constants.mjs +66 -0
  183. package/dist/components/Input/Input.constants.mjs.map +1 -0
  184. package/dist/components/Input/Input.d.cts +2 -1
  185. package/dist/components/Input/Input.d.cts.map +1 -1
  186. package/dist/components/Input/Input.d.mts +2 -1
  187. package/dist/components/Input/Input.d.mts.map +1 -1
  188. package/dist/components/Input/Input.mjs +16 -5
  189. package/dist/components/Input/Input.mjs.map +1 -1
  190. package/dist/components/Input/Input.types.cjs.map +1 -1
  191. package/dist/components/Input/Input.types.d.cts +5 -1
  192. package/dist/components/Input/Input.types.d.cts.map +1 -1
  193. package/dist/components/Input/Input.types.d.mts +5 -1
  194. package/dist/components/Input/Input.types.d.mts.map +1 -1
  195. package/dist/components/Input/Input.types.mjs.map +1 -1
  196. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +33 -0
  197. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
  198. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +14 -0
  199. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
  200. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +14 -0
  201. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
  202. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +35 -0
  203. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
  204. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +39 -0
  205. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
  206. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +25 -0
  207. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
  208. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +25 -0
  209. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
  210. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +41 -0
  211. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
  212. package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
  213. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
  214. package/dist/components/KeyValueRow/KeyValueRow.d.cts +25 -0
  215. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
  216. package/dist/components/KeyValueRow/KeyValueRow.d.mts +25 -0
  217. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
  218. package/dist/components/KeyValueRow/KeyValueRow.mjs +77 -0
  219. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
  220. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
  221. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
  222. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
  223. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
  224. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
  225. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
  226. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
  227. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
  228. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
  229. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
  230. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
  231. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
  232. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
  233. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
  234. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
  235. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
  236. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +29 -0
  237. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
  238. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +17 -0
  239. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
  240. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +17 -0
  241. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
  242. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +31 -0
  243. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
  244. package/dist/components/KeyValueRow/index.cjs +15 -0
  245. package/dist/components/KeyValueRow/index.cjs.map +1 -0
  246. package/dist/components/KeyValueRow/index.d.cts +3 -0
  247. package/dist/components/KeyValueRow/index.d.cts.map +1 -0
  248. package/dist/components/KeyValueRow/index.d.mts +3 -0
  249. package/dist/components/KeyValueRow/index.d.mts.map +1 -0
  250. package/dist/components/KeyValueRow/index.mjs +3 -0
  251. package/dist/components/KeyValueRow/index.mjs.map +1 -0
  252. package/dist/components/ListItem/ListItem.cjs +61 -0
  253. package/dist/components/ListItem/ListItem.cjs.map +1 -0
  254. package/dist/components/ListItem/ListItem.constants.cjs +14 -0
  255. package/dist/components/ListItem/ListItem.constants.cjs.map +1 -0
  256. package/dist/components/ListItem/ListItem.constants.d.cts +8 -0
  257. package/dist/components/ListItem/ListItem.constants.d.cts.map +1 -0
  258. package/dist/components/ListItem/ListItem.constants.d.mts +8 -0
  259. package/dist/components/ListItem/ListItem.constants.d.mts.map +1 -0
  260. package/dist/components/ListItem/ListItem.constants.mjs +11 -0
  261. package/dist/components/ListItem/ListItem.constants.mjs.map +1 -0
  262. package/dist/components/ListItem/ListItem.d.cts +4 -0
  263. package/dist/components/ListItem/ListItem.d.cts.map +1 -0
  264. package/dist/components/ListItem/ListItem.d.mts +4 -0
  265. package/dist/components/ListItem/ListItem.d.mts.map +1 -0
  266. package/dist/components/ListItem/ListItem.mjs +41 -0
  267. package/dist/components/ListItem/ListItem.mjs.map +1 -0
  268. package/dist/components/ListItem/ListItem.types.cjs +12 -0
  269. package/dist/components/ListItem/ListItem.types.cjs.map +1 -0
  270. package/dist/components/ListItem/ListItem.types.d.cts +60 -0
  271. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -0
  272. package/dist/components/ListItem/ListItem.types.d.mts +60 -0
  273. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -0
  274. package/dist/components/ListItem/ListItem.types.mjs +9 -0
  275. package/dist/components/ListItem/ListItem.types.mjs.map +1 -0
  276. package/dist/components/ListItem/index.cjs +8 -0
  277. package/dist/components/ListItem/index.cjs.map +1 -0
  278. package/dist/components/ListItem/index.d.cts +4 -0
  279. package/dist/components/ListItem/index.d.cts.map +1 -0
  280. package/dist/components/ListItem/index.d.mts +4 -0
  281. package/dist/components/ListItem/index.d.mts.map +1 -0
  282. package/dist/components/ListItem/index.mjs +3 -0
  283. package/dist/components/ListItem/index.mjs.map +1 -0
  284. package/dist/components/MainActionButton/MainActionButton.cjs +28 -0
  285. package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -0
  286. package/dist/components/MainActionButton/MainActionButton.d.cts +4 -0
  287. package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -0
  288. package/dist/components/MainActionButton/MainActionButton.d.mts +4 -0
  289. package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -0
  290. package/dist/components/MainActionButton/MainActionButton.mjs +28 -0
  291. package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -0
  292. package/dist/components/MainActionButton/MainActionButton.types.cjs +3 -0
  293. package/dist/components/MainActionButton/MainActionButton.types.cjs.map +1 -0
  294. package/dist/components/MainActionButton/MainActionButton.types.d.cts +41 -0
  295. package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -0
  296. package/dist/components/MainActionButton/MainActionButton.types.d.mts +41 -0
  297. package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -0
  298. package/dist/components/MainActionButton/MainActionButton.types.mjs +2 -0
  299. package/dist/components/MainActionButton/MainActionButton.types.mjs.map +1 -0
  300. package/dist/components/MainActionButton/index.cjs +6 -0
  301. package/dist/components/MainActionButton/index.cjs.map +1 -0
  302. package/dist/components/MainActionButton/index.d.cts +3 -0
  303. package/dist/components/MainActionButton/index.d.cts.map +1 -0
  304. package/dist/components/MainActionButton/index.d.mts +3 -0
  305. package/dist/components/MainActionButton/index.d.mts.map +1 -0
  306. package/dist/components/MainActionButton/index.mjs +2 -0
  307. package/dist/components/MainActionButton/index.mjs.map +1 -0
  308. package/dist/components/TabEmptyState/TabEmptyState.cjs +22 -0
  309. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -0
  310. package/dist/components/TabEmptyState/TabEmptyState.d.cts +4 -0
  311. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -0
  312. package/dist/components/TabEmptyState/TabEmptyState.d.mts +4 -0
  313. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -0
  314. package/dist/components/TabEmptyState/TabEmptyState.mjs +22 -0
  315. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -0
  316. package/dist/components/TabEmptyState/TabEmptyState.types.cjs +3 -0
  317. package/dist/components/TabEmptyState/TabEmptyState.types.cjs.map +1 -0
  318. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +45 -0
  319. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -0
  320. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +45 -0
  321. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -0
  322. package/dist/components/TabEmptyState/TabEmptyState.types.mjs +2 -0
  323. package/dist/components/TabEmptyState/TabEmptyState.types.mjs.map +1 -0
  324. package/dist/components/TabEmptyState/index.cjs +6 -0
  325. package/dist/components/TabEmptyState/index.cjs.map +1 -0
  326. package/dist/components/TabEmptyState/index.d.cts +3 -0
  327. package/dist/components/TabEmptyState/index.d.cts.map +1 -0
  328. package/dist/components/TabEmptyState/index.d.mts +3 -0
  329. package/dist/components/TabEmptyState/index.d.mts.map +1 -0
  330. package/dist/components/TabEmptyState/index.mjs +2 -0
  331. package/dist/components/TabEmptyState/index.mjs.map +1 -0
  332. package/dist/components/TextButton/TextButton.cjs +12 -36
  333. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  334. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  335. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  336. package/dist/components/TextButton/TextButton.mjs +14 -38
  337. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  338. package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
  339. package/dist/components/TextButton/TextButton.types.d.cts +8 -60
  340. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  341. package/dist/components/TextButton/TextButton.types.d.mts +8 -60
  342. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  343. package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
  344. package/dist/components/TextButton/index.cjs +1 -3
  345. package/dist/components/TextButton/index.cjs.map +1 -1
  346. package/dist/components/TextButton/index.d.cts +0 -1
  347. package/dist/components/TextButton/index.d.cts.map +1 -1
  348. package/dist/components/TextButton/index.d.mts +0 -1
  349. package/dist/components/TextButton/index.d.mts.map +1 -1
  350. package/dist/components/TextButton/index.mjs +0 -1
  351. package/dist/components/TextButton/index.mjs.map +1 -1
  352. package/dist/components/TextField/TextField.cjs +22 -8
  353. package/dist/components/TextField/TextField.cjs.map +1 -1
  354. package/dist/components/TextField/TextField.d.cts +0 -2
  355. package/dist/components/TextField/TextField.d.cts.map +1 -1
  356. package/dist/components/TextField/TextField.d.mts +0 -2
  357. package/dist/components/TextField/TextField.d.mts.map +1 -1
  358. package/dist/components/TextField/TextField.mjs +22 -8
  359. package/dist/components/TextField/TextField.mjs.map +1 -1
  360. package/dist/components/TextField/TextField.types.cjs +0 -10
  361. package/dist/components/TextField/TextField.types.cjs.map +1 -1
  362. package/dist/components/TextField/TextField.types.d.cts +0 -14
  363. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  364. package/dist/components/TextField/TextField.types.d.mts +0 -14
  365. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  366. package/dist/components/TextField/TextField.types.mjs +1 -9
  367. package/dist/components/TextField/TextField.types.mjs.map +1 -1
  368. package/dist/components/TextField/index.cjs +1 -3
  369. package/dist/components/TextField/index.cjs.map +1 -1
  370. package/dist/components/TextField/index.d.cts +0 -1
  371. package/dist/components/TextField/index.d.cts.map +1 -1
  372. package/dist/components/TextField/index.d.mts +0 -1
  373. package/dist/components/TextField/index.d.mts.map +1 -1
  374. package/dist/components/TextField/index.mjs +0 -1
  375. package/dist/components/TextField/index.mjs.map +1 -1
  376. package/dist/components/Toast/Toast.cjs +3 -2
  377. package/dist/components/Toast/Toast.cjs.map +1 -1
  378. package/dist/components/Toast/Toast.d.cts.map +1 -1
  379. package/dist/components/Toast/Toast.d.mts.map +1 -1
  380. package/dist/components/Toast/Toast.mjs +4 -3
  381. package/dist/components/Toast/Toast.mjs.map +1 -1
  382. package/dist/components/Toast/Toast.types.cjs +5 -5
  383. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  384. package/dist/components/Toast/Toast.types.d.cts +5 -4
  385. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  386. package/dist/components/Toast/Toast.types.d.mts +5 -4
  387. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  388. package/dist/components/Toast/Toast.types.mjs +4 -4
  389. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  390. package/dist/components/Toast/index.cjs +2 -2
  391. package/dist/components/Toast/index.cjs.map +1 -1
  392. package/dist/components/Toast/index.d.cts +1 -1
  393. package/dist/components/Toast/index.d.cts.map +1 -1
  394. package/dist/components/Toast/index.d.mts +1 -1
  395. package/dist/components/Toast/index.d.mts.map +1 -1
  396. package/dist/components/Toast/index.mjs +1 -1
  397. package/dist/components/Toast/index.mjs.map +1 -1
  398. package/dist/components/index.cjs +33 -4
  399. package/dist/components/index.cjs.map +1 -1
  400. package/dist/components/index.d.cts +28 -6
  401. package/dist/components/index.d.cts.map +1 -1
  402. package/dist/components/index.d.mts +28 -6
  403. package/dist/components/index.d.mts.map +1 -1
  404. package/dist/components/index.mjs +15 -4
  405. package/dist/components/index.mjs.map +1 -1
  406. package/dist/types/index.cjs +10 -11
  407. package/dist/types/index.cjs.map +1 -1
  408. package/dist/types/index.d.cts +8 -9
  409. package/dist/types/index.d.cts.map +1 -1
  410. package/dist/types/index.d.mts +8 -9
  411. package/dist/types/index.d.mts.map +1 -1
  412. package/dist/types/index.mjs +9 -10
  413. package/dist/types/index.mjs.map +1 -1
  414. package/package.json +2 -2
  415. package/dist/components/TextButton/TextButton.constants.cjs +0 -12
  416. package/dist/components/TextButton/TextButton.constants.cjs.map +0 -1
  417. package/dist/components/TextButton/TextButton.constants.d.cts +0 -4
  418. package/dist/components/TextButton/TextButton.constants.d.cts.map +0 -1
  419. package/dist/components/TextButton/TextButton.constants.d.mts +0 -4
  420. package/dist/components/TextButton/TextButton.constants.d.mts.map +0 -1
  421. package/dist/components/TextButton/TextButton.constants.mjs +0 -9
  422. package/dist/components/TextButton/TextButton.constants.mjs.map +0 -1
  423. package/dist/components/TextField/TextField.constants.cjs +0 -13
  424. package/dist/components/TextField/TextField.constants.cjs.map +0 -1
  425. package/dist/components/TextField/TextField.constants.d.cts +0 -6
  426. package/dist/components/TextField/TextField.constants.d.cts.map +0 -1
  427. package/dist/components/TextField/TextField.constants.d.mts +0 -6
  428. package/dist/components/TextField/TextField.constants.d.mts.map +0 -1
  429. package/dist/components/TextField/TextField.constants.mjs +0 -10
  430. package/dist/components/TextField/TextField.constants.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.constants.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gCAAgC;AAErD,OAAO,EAAE,WAAW,EAAE,8BAAoB;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAGvC;IACF,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE;QACvB,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC,QAAQ;QACxC,aAAa,EAAE,UAAU,CAAC,UAAU,CAAC,aAAa;KACnD;IACD,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE;QAC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,aAAa,EAAE,UAAU,CAAC,gBAAgB,CAAC,aAAa;KACzD;CACF,CAAC","sourcesContent":["import { typography } from '@metamask/design-tokens';\n\nimport { TextVariant } from '../../types';\n\n/**\n * Typographic metrics for Input: same tokens as `text-*` utilities but **without** `lineHeight`.\n * React Native `TextInput` aligns single-line text more predictably when line height is not set\n * from the design-system paragraph specs (matches legacy / temp Input.styles behavior).\n */\nexport const MAP_TEXT_VARIANT_INPUT_METRICS: Record<\n TextVariant,\n { fontSize: number; letterSpacing: number }\n> = {\n [TextVariant.DisplayLg]: {\n fontSize: typography.sDisplayLG.fontSize,\n letterSpacing: typography.sDisplayLG.letterSpacing,\n },\n [TextVariant.DisplayMd]: {\n fontSize: typography.sDisplayMD.fontSize,\n letterSpacing: typography.sDisplayMD.letterSpacing,\n },\n [TextVariant.HeadingLg]: {\n fontSize: typography.sHeadingLG.fontSize,\n letterSpacing: typography.sHeadingLG.letterSpacing,\n },\n [TextVariant.HeadingMd]: {\n fontSize: typography.sHeadingMD.fontSize,\n letterSpacing: typography.sHeadingMD.letterSpacing,\n },\n [TextVariant.HeadingSm]: {\n fontSize: typography.sHeadingSM.fontSize,\n letterSpacing: typography.sHeadingSM.letterSpacing,\n },\n [TextVariant.BodyLg]: {\n fontSize: typography.sBodyLGMedium.fontSize,\n letterSpacing: typography.sBodyLGMedium.letterSpacing,\n },\n [TextVariant.BodyMd]: {\n fontSize: typography.sBodyMD.fontSize,\n letterSpacing: typography.sBodyMD.letterSpacing,\n },\n [TextVariant.BodySm]: {\n fontSize: typography.sBodySM.fontSize,\n letterSpacing: typography.sBodySM.letterSpacing,\n },\n [TextVariant.BodyXs]: {\n fontSize: typography.sBodyXS.fontSize,\n letterSpacing: typography.sBodyXS.letterSpacing,\n },\n [TextVariant.PageHeading]: {\n fontSize: typography.sPageHeading.fontSize,\n letterSpacing: typography.sPageHeading.letterSpacing,\n },\n [TextVariant.SectionHeading]: {\n fontSize: typography.sSectionHeading.fontSize,\n letterSpacing: typography.sSectionHeading.letterSpacing,\n },\n [TextVariant.ButtonLabelMd]: {\n fontSize: typography.sButtonLabelMd.fontSize,\n letterSpacing: typography.sButtonLabelMd.letterSpacing,\n },\n [TextVariant.ButtonLabelLg]: {\n fontSize: typography.sButtonLabelLg.fontSize,\n letterSpacing: typography.sButtonLabelLg.letterSpacing,\n },\n [TextVariant.AmountDisplayLg]: {\n fontSize: typography.sAmountDisplayLg.fontSize,\n letterSpacing: typography.sAmountDisplayLg.letterSpacing,\n },\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  import { TextInput } from "react-native/index.js";
2
2
  import { TextVariant } from "../../types/index.cjs";
3
- export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "editable"> & {
3
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "editable" | "value" | "defaultValue"> & {
4
+ value: string;
4
5
  textVariant?: TextVariant | undefined;
5
6
  isDisabled?: boolean | undefined;
6
7
  isReadonly?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAQtD,eAAO,MAAM,KAAK;;;;;;6CAoGjB,CAAC"}
1
+ {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAStD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { TextInput } from "react-native/index.js";
2
2
  import { TextVariant } from "../../types/index.mjs";
3
- export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "editable"> & {
3
+ export declare const Input: import("react").ForwardRefExoticComponent<Omit<import("react-native").TextInputProps, "editable" | "value" | "defaultValue"> & {
4
+ value: string;
4
5
  textVariant?: TextVariant | undefined;
5
6
  isDisabled?: boolean | undefined;
6
7
  isReadonly?: boolean | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAQtD,eAAO,MAAM,KAAK;;;;;;6CAoGjB,CAAC"}
1
+ {"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAc,WAAW,EAAE,8BAAoB;AAStD,eAAO,MAAM,KAAK;;;;;;;6CAqHjB,CAAC"}
@@ -4,7 +4,8 @@ import { forwardRef, useCallback, useMemo, useState } from "react";
4
4
  import { Platform, TextInput } from "react-native/index.js";
5
5
  import { FontFamily, TextVariant } from "../../types/index.mjs";
6
6
  import { MAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "../Text/Text.constants.mjs";
7
- export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
7
+ import { MAP_TEXT_VARIANT_INPUT_METRICS } from "./Input.constants.mjs";
8
+ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
8
9
  const [isFocused, setIsFocused] = useState(autoFocus);
9
10
  const tw = useTailwind();
10
11
  const theme = useTheme();
@@ -14,11 +15,15 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
14
15
  const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];
15
16
  const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];
16
17
  const fontClass = `font-${FontFamily.Default}${fontSuffix}`;
17
- const inputStyle = useMemo(() => tw.style(`text-${textVariant}`, fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
18
+ const hasPlaceholder = placeholder !== undefined && placeholder !== null && placeholder !== '';
19
+ // Only apply placeholder-mode styling when a placeholder is present and
20
+ // the controlled value is empty. This keeps the iOS lineHeight workaround
21
+ // scoped to the placeholder-visible state without affecting typed text.
22
+ const isPlaceholderVisible = hasPlaceholder && value === '';
23
+ const inputStyle = useMemo(() => tw.style(fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
18
24
  !isDisabled &&
19
25
  isFocused &&
20
26
  'border-primary-default', twClassName), [
21
- textVariant,
22
27
  fontClass,
23
28
  isStateStylesDisabled,
24
29
  isDisabled,
@@ -26,6 +31,7 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
26
31
  twClassName,
27
32
  tw,
28
33
  ]);
34
+ const variantTextStyle = useMemo(() => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant], [textVariant]);
29
35
  /* istanbul ignore next: handler body covered by focus/blur tests */
30
36
  const onBlurHandler = useCallback((e) => {
31
37
  if (!isDisabled) {
@@ -42,9 +48,14 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
42
48
  }, [isDisabled, onFocus]);
43
49
  const resolvedStyle = [
44
50
  inputStyle,
45
- Platform.OS === 'ios' && { textAlignVertical: 'center' },
51
+ variantTextStyle,
52
+ // iOS-only workaround: when a placeholder is visible, native iOS
53
+ // TextInput can render placeholder text vertically offset.
54
+ // Keep this iOS-only because lineHeight: 0 can collapse text on Android.
55
+ Platform.OS === 'ios' &&
56
+ isPlaceholderVisible && { lineHeight: 0 },
46
57
  style,
47
58
  ].filter(Boolean);
48
- return (<TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
59
+ return (<TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} placeholder={placeholder} value={value} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
49
60
  });
50
61
  //# sourceMappingURL=Input.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACT,6CAA6C;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gCAAgC;AAChE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc;AACnE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,8BAAoB;AACtD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC3B,mCAA+B;AAIhC,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EACE,KAAK,EACL,WAAW,GAAG,WAAW,CAAC,MAAM,EAChC,qBAAqB,EACrB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,MAAM,oBAAoB,GAAG,OAAO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AC,UAAU,EAAE,OAAO,CAAC,CACtB,CAAC;IAEF,MAAM,aAAa,GAAG;QACpB,UAAU;QACV,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,iBAAiB,EAAE,QAAiB,EAAE;QACjE,KAAK;KACN,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n `text-${textVariant}`,\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n textVariant,\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const resolvedStyle = [\n inputStyle,\n Platform.OS === 'ios' && { textAlignVertical: 'center' as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
1
+ {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACT,6CAA6C;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gCAAgC;AAChE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc;AACnE,O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,CAAC;IAElB,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,IAAI,KAAK,CAAC,CACV,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n const variantTextStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n const resolvedStyle = [\n inputStyle,\n variantTextStyle,\n // iOS-only workaround: when a placeholder is visible, native iOS\n // TextInput can render placeholder text vertically offset.\n // Keep this iOS-only because lineHeight: 0 can collapse text on Android.\n Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n placeholder={placeholder}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<TextInputProps, 'editable'> & {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
1
+ {"version":3,"file":"Input.types.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<\n TextInputProps,\n 'editable' | 'value' | 'defaultValue'\n> & {\n /**\n * Controlled value for Input.\n */\n value: string;\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
@@ -1,6 +1,10 @@
1
1
  import type { TextInputProps } from "react-native/index.js";
2
2
  import type { TextVariant } from "../../types/index.cjs";
3
- export type InputProps = Omit<TextInputProps, 'editable'> & {
3
+ export type InputProps = Omit<TextInputProps, 'editable' | 'value' | 'defaultValue'> & {
4
+ /**
5
+ * Controlled value for Input.
6
+ */
7
+ value: string;
4
8
  /**
5
9
  * Optional enum to select between Typography variants.
6
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"Input.types.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,cAAc,EACd,UAAU,GAAG,OAAO,GAAG,cAAc,CACtC,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1,6 +1,10 @@
1
1
  import type { TextInputProps } from "react-native/index.js";
2
2
  import type { TextVariant } from "../../types/index.mjs";
3
- export type InputProps = Omit<TextInputProps, 'editable'> & {
3
+ export type InputProps = Omit<TextInputProps, 'editable' | 'value' | 'defaultValue'> & {
4
+ /**
5
+ * Controlled value for Input.
6
+ */
7
+ value: string;
4
8
  /**
5
9
  * Optional enum to select between Typography variants.
6
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,GAAG;IAC1D;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"Input.types.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAqB;AAEnD,OAAO,KAAK,EAAE,WAAW,EAAE,8BAAoB;AAE/C,MAAM,MAAM,UAAU,GAAG,IAAI,CAC3B,cAAc,EACd,UAAU,GAAG,OAAO,GAAG,cAAc,CACtC,GAAG;IACF;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<TextInputProps, 'editable'> & {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
1
+ {"version":3,"file":"Input.types.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextInputProps } from 'react-native';\n\nimport type { TextVariant } from '../../types';\n\nexport type InputProps = Omit<\n TextInputProps,\n 'editable' | 'value' | 'defaultValue'\n> & {\n /**\n * Controlled value for Input.\n */\n value: string;\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMd\n */\n textVariant?: TextVariant;\n /**\n * Optional boolean to disable Input.\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional boolean to show readonly input.\n *\n * @default false\n */\n isReadonly?: boolean;\n /**\n * Optional boolean to disable state styles.\n *\n * @default false\n */\n isStateStylesDisabled?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n};\n"]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_native_1 = require("react-native/index.js");
9
+ const ButtonIcon_1 = require("../../ButtonIcon/index.cjs");
10
+ const Icon_1 = require("../../Icon/index.cjs");
11
+ const Text_1 = require("../../Text/index.cjs");
12
+ const KeyValueRow_utils_1 = require("../KeyValueRow.utils.cjs");
13
+ /**
14
+ * A label and optional tooltip button component.
15
+ *
16
+ * @param props - Component props.
17
+ * @param props.label - The label content to display.
18
+ * @param props.tooltip - Optional tooltip to render to the right of the label.
19
+ *
20
+ * @returns The rendered KeyValueRowLabel component.
21
+ */
22
+ const KeyValueRowLabel = ({ label, tooltip, }) => {
23
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
24
+ const hasTooltip = Boolean(tooltip?.title && tooltip?.content);
25
+ return (<react_native_1.View style={tw.style('flex-row items-center')}>
26
+ {(0, KeyValueRow_utils_1.isPreDefinedKeyValueRowLabel)(label) ? (<Text_1.Text variant={label.variant ?? Text_1.TextVariant.BodyMd} color={label.color ?? Text_1.TextColor.TextDefault}>
27
+ {label.text}
28
+ </Text_1.Text>) : (label)}
29
+ {hasTooltip && tooltip && (<ButtonIcon_1.ButtonIcon size={tooltip.size ?? ButtonIcon_1.ButtonIconSize.Md} iconName={tooltip.iconName ?? Icon_1.IconName.Question} accessibilityLabel={`${tooltip.title} tooltip`} onPress={() => tooltip?.onPress?.()}/>)}
30
+ </react_native_1.View>);
31
+ };
32
+ exports.default = KeyValueRowLabel;
33
+ //# sourceMappingURL=KeyValueLabel.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueLabel.cjs","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx"],"names":[],"mappings":";;;;;AAAA,qFAAmE;AACnE,kDAA0B;AAC1B,wDAAoC;AAEpC,2DAA8D;AAC9D,+CAAsC;AACtC,+CAA0D;AAE1D,gEAAoE;AAEpE;;;;;;;;GAQG;AACH,MAAM,gBAAgB,GAAoC,CAAC,EACzD,KAAK,EACL,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,OAAO,CAAC,CAAC;IAE/D,OAAO,CACL,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAC7C;MAAA,CAAC,IAAA,gDAA4B,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,CAAC,WAAI,CACH,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,kBAAW,CAAC,MAAM,CAAC,CAC7C,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,gBAAS,CAAC,WAAW,CAAC,CAE5C;UAAA,CAAC,KAAK,CAAC,IAAI,CACb;QAAA,EAAE,WAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,KAAK,CACN,CACD;MAAA,CAAC,UAAU,IAAI,OAAO,IAAI,CACxB,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,2BAAc,CAAC,EAAE,CAAC,CACxC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,eAAQ,CAAC,QAAQ,CAAC,CAChD,kBAAkB,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,UAAU,CAAC,CAC/C,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,EACpC,CACH,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../../ButtonIcon';\nimport { IconName } from '../../Icon';\nimport { Text, TextColor, TextVariant } from '../../Text';\nimport type { KeyValueRowLabelProps } from '../KeyValueRow.types';\nimport { isPreDefinedKeyValueRowLabel } from '../KeyValueRow.utils';\n\n/**\n * A label and optional tooltip button component.\n *\n * @param props - Component props.\n * @param props.label - The label content to display.\n * @param props.tooltip - Optional tooltip to render to the right of the label.\n *\n * @returns The rendered KeyValueRowLabel component.\n */\nconst KeyValueRowLabel: React.FC<KeyValueRowLabelProps> = ({\n label,\n tooltip,\n}) => {\n const tw = useTailwind();\n\n const hasTooltip = Boolean(tooltip?.title && tooltip?.content);\n\n return (\n <View style={tw.style('flex-row items-center')}>\n {isPreDefinedKeyValueRowLabel(label) ? (\n <Text\n variant={label.variant ?? TextVariant.BodyMd}\n color={label.color ?? TextColor.TextDefault}\n >\n {label.text}\n </Text>\n ) : (\n label\n )}\n {hasTooltip && tooltip && (\n <ButtonIcon\n size={tooltip.size ?? ButtonIconSize.Md}\n iconName={tooltip.iconName ?? IconName.Question}\n accessibilityLabel={`${tooltip.title} tooltip`}\n onPress={() => tooltip?.onPress?.()}\n />\n )}\n </View>\n );\n};\n\nexport default KeyValueRowLabel;\n"]}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { KeyValueRowLabelProps } from "../KeyValueRow.types.cjs";
3
+ /**
4
+ * A label and optional tooltip button component.
5
+ *
6
+ * @param props - Component props.
7
+ * @param props.label - The label content to display.
8
+ * @param props.tooltip - Optional tooltip to render to the right of the label.
9
+ *
10
+ * @returns The rendered KeyValueRowLabel component.
11
+ */
12
+ declare const KeyValueRowLabel: React.FC<KeyValueRowLabelProps>;
13
+ export default KeyValueRowLabel;
14
+ //# sourceMappingURL=KeyValueLabel.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueLabel.d.cts","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,iCAA6B;AAGlE;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8BrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ import type { KeyValueRowLabelProps } from "../KeyValueRow.types.mjs";
3
+ /**
4
+ * A label and optional tooltip button component.
5
+ *
6
+ * @param props - Component props.
7
+ * @param props.label - The label content to display.
8
+ * @param props.tooltip - Optional tooltip to render to the right of the label.
9
+ *
10
+ * @returns The rendered KeyValueRowLabel component.
11
+ */
12
+ declare const KeyValueRowLabel: React.FC<KeyValueRowLabelProps>;
13
+ export default KeyValueRowLabel;
14
+ //# sourceMappingURL=KeyValueLabel.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueLabel.d.mts","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,iCAA6B;AAGlE;;;;;;;;GAQG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA8BrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,35 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { View } from "react-native/index.js";
11
+ import { ButtonIcon, ButtonIconSize } from "../../ButtonIcon/index.mjs";
12
+ import { IconName } from "../../Icon/index.mjs";
13
+ import { Text, TextColor, TextVariant } from "../../Text/index.mjs";
14
+ import { isPreDefinedKeyValueRowLabel } from "../KeyValueRow.utils.mjs";
15
+ /**
16
+ * A label and optional tooltip button component.
17
+ *
18
+ * @param props - Component props.
19
+ * @param props.label - The label content to display.
20
+ * @param props.tooltip - Optional tooltip to render to the right of the label.
21
+ *
22
+ * @returns The rendered KeyValueRowLabel component.
23
+ */
24
+ const KeyValueRowLabel = ({ label, tooltip, }) => {
25
+ const tw = useTailwind();
26
+ const hasTooltip = Boolean(tooltip?.title && tooltip?.content);
27
+ return (<View style={tw.style('flex-row items-center')}>
28
+ {isPreDefinedKeyValueRowLabel(label) ? (<Text variant={label.variant ?? TextVariant.BodyMd} color={label.color ?? TextColor.TextDefault}>
29
+ {label.text}
30
+ </Text>) : (label)}
31
+ {hasTooltip && tooltip && (<ButtonIcon size={tooltip.size ?? ButtonIconSize.Md} iconName={tooltip.iconName ?? IconName.Question} accessibilityLabel={`${tooltip.title} tooltip`} onPress={() => tooltip?.onPress?.()}/>)}
32
+ </View>);
33
+ };
34
+ export default KeyValueRowLabel;
35
+ //# sourceMappingURL=KeyValueLabel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueLabel.mjs","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueLabel/KeyValueLabel.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAEpC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,mCAAyB;AAC9D,OAAO,EAAE,QAAQ,EAAE,6BAAmB;AACtC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6BAAmB;AAE1D,OAAO,EAAE,4BAA4B,EAAE,iCAA6B;AAEpE;;;;;;;;GAQG;AACH,MAAM,gBAAgB,GAAoC,CAAC,EACzD,KAAK,EACL,OAAO,GACR,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,OAAO,CAAC,CAAC;IAE/D,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC,CAC7C;MAAA,CAAC,4BAA4B,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CACrC,CAAC,IAAI,CACH,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,CAC7C,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,WAAW,CAAC,CAE5C;UAAA,CAAC,KAAK,CAAC,IAAI,CACb;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,KAAK,CACN,CACD;MAAA,CAAC,UAAU,IAAI,OAAO,IAAI,CACxB,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,OAAO,CAAC,IAAI,IAAI,cAAc,CAAC,EAAE,CAAC,CACxC,QAAQ,CAAC,CAAC,OAAO,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAChD,kBAAkB,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,UAAU,CAAC,CAC/C,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,EACpC,CACH,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { ButtonIcon, ButtonIconSize } from '../../ButtonIcon';\nimport { IconName } from '../../Icon';\nimport { Text, TextColor, TextVariant } from '../../Text';\nimport type { KeyValueRowLabelProps } from '../KeyValueRow.types';\nimport { isPreDefinedKeyValueRowLabel } from '../KeyValueRow.utils';\n\n/**\n * A label and optional tooltip button component.\n *\n * @param props - Component props.\n * @param props.label - The label content to display.\n * @param props.tooltip - Optional tooltip to render to the right of the label.\n *\n * @returns The rendered KeyValueRowLabel component.\n */\nconst KeyValueRowLabel: React.FC<KeyValueRowLabelProps> = ({\n label,\n tooltip,\n}) => {\n const tw = useTailwind();\n\n const hasTooltip = Boolean(tooltip?.title && tooltip?.content);\n\n return (\n <View style={tw.style('flex-row items-center')}>\n {isPreDefinedKeyValueRowLabel(label) ? (\n <Text\n variant={label.variant ?? TextVariant.BodyMd}\n color={label.color ?? TextColor.TextDefault}\n >\n {label.text}\n </Text>\n ) : (\n label\n )}\n {hasTooltip && tooltip && (\n <ButtonIcon\n size={tooltip.size ?? ButtonIconSize.Md}\n iconName={tooltip.iconName ?? IconName.Question}\n accessibilityLabel={`${tooltip.title} tooltip`}\n onPress={() => tooltip?.onPress?.()}\n />\n )}\n </View>\n );\n};\n\nexport default KeyValueRowLabel;\n"]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
7
+ const react_1 = __importDefault(require("react"));
8
+ const react_native_1 = require("react-native/index.js");
9
+ /**
10
+ * The main container for the KeyValueRow component.
11
+ * When creating custom KeyValueRow components, this must be the outermost component
12
+ * wrapping the two <KeyValueSection/> components.
13
+ *
14
+ * e.g.
15
+ * ```
16
+ * <KeyValueRowRoot>
17
+ * <KeyValueSection></KeyValueSection>
18
+ * <KeyValueSection></KeyValueSection>
19
+ * </KeyValueRowRoot>
20
+ * ```
21
+ *
22
+ * @param props - Component props.
23
+ * @param props.children - The two <KeyValueSection> children.
24
+ * @param props.twClassName - Optional Tailwind class names to override root styles.
25
+ * @param props.style - Optional additional styles for the root element.
26
+ *
27
+ * @returns The rendered Root component.
28
+ */
29
+ const KeyValueRowRoot = ({ children, twClassName, style, ...props }) => {
30
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
31
+ return (<react_native_1.View style={[
32
+ tw.style('flex-row justify-between items-center overflow-hidden', twClassName),
33
+ style,
34
+ ]} {...props}>
35
+ {children}
36
+ </react_native_1.View>);
37
+ };
38
+ exports.default = KeyValueRowRoot;
39
+ //# sourceMappingURL=KeyValueRoot.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueRoot.cjs","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueRoot/KeyValueRoot.tsx"],"names":[],"mappings":";;;;;AAAA,qFAAmE;AACnE,kDAA0B;AAC1B,wDAAoC;AAIpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,eAAe,GAAmC,CAAC,EACvD,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,uDAAuD,EACvD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,eAAe,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport type { KeyValueRowRootProps } from '../KeyValueRow.types';\n\n/**\n * The main container for the KeyValueRow component.\n * When creating custom KeyValueRow components, this must be the outermost component\n * wrapping the two <KeyValueSection/> components.\n *\n * e.g.\n * ```\n * <KeyValueRowRoot>\n * <KeyValueSection></KeyValueSection>\n * <KeyValueSection></KeyValueSection>\n * </KeyValueRowRoot>\n * ```\n *\n * @param props - Component props.\n * @param props.children - The two <KeyValueSection> children.\n * @param props.twClassName - Optional Tailwind class names to override root styles.\n * @param props.style - Optional additional styles for the root element.\n *\n * @returns The rendered Root component.\n */\nconst KeyValueRowRoot: React.FC<KeyValueRowRootProps> = ({\n children,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n return (\n <View\n style={[\n tw.style(\n 'flex-row justify-between items-center overflow-hidden',\n twClassName,\n ),\n style,\n ]}\n {...props}\n >\n {children}\n </View>\n );\n};\n\nexport default KeyValueRowRoot;\n"]}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import type { KeyValueRowRootProps } from "../KeyValueRow.types.cjs";
3
+ /**
4
+ * The main container for the KeyValueRow component.
5
+ * When creating custom KeyValueRow components, this must be the outermost component
6
+ * wrapping the two <KeyValueSection/> components.
7
+ *
8
+ * e.g.
9
+ * ```
10
+ * <KeyValueRowRoot>
11
+ * <KeyValueSection></KeyValueSection>
12
+ * <KeyValueSection></KeyValueSection>
13
+ * </KeyValueRowRoot>
14
+ * ```
15
+ *
16
+ * @param props - Component props.
17
+ * @param props.children - The two <KeyValueSection> children.
18
+ * @param props.twClassName - Optional Tailwind class names to override root styles.
19
+ * @param props.style - Optional additional styles for the root element.
20
+ *
21
+ * @returns The rendered Root component.
22
+ */
23
+ declare const KeyValueRowRoot: React.FC<KeyValueRowRootProps>;
24
+ export default KeyValueRowRoot;
25
+ //# sourceMappingURL=KeyValueRoot.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueRoot.d.cts","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueRoot/KeyValueRoot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAG1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,iCAA6B;AAEjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import type { KeyValueRowRootProps } from "../KeyValueRow.types.mjs";
3
+ /**
4
+ * The main container for the KeyValueRow component.
5
+ * When creating custom KeyValueRow components, this must be the outermost component
6
+ * wrapping the two <KeyValueSection/> components.
7
+ *
8
+ * e.g.
9
+ * ```
10
+ * <KeyValueRowRoot>
11
+ * <KeyValueSection></KeyValueSection>
12
+ * <KeyValueSection></KeyValueSection>
13
+ * </KeyValueRowRoot>
14
+ * ```
15
+ *
16
+ * @param props - Component props.
17
+ * @param props.children - The two <KeyValueSection> children.
18
+ * @param props.twClassName - Optional Tailwind class names to override root styles.
19
+ * @param props.style - Optional additional styles for the root element.
20
+ *
21
+ * @returns The rendered Root component.
22
+ */
23
+ declare const KeyValueRowRoot: React.FC<KeyValueRowRootProps>;
24
+ export default KeyValueRowRoot;
25
+ //# sourceMappingURL=KeyValueRoot.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueRoot.d.mts","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueRoot/KeyValueRoot.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAG1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,iCAA6B;AAEjE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAsBnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,41 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { View } from "react-native/index.js";
11
+ /**
12
+ * The main container for the KeyValueRow component.
13
+ * When creating custom KeyValueRow components, this must be the outermost component
14
+ * wrapping the two <KeyValueSection/> components.
15
+ *
16
+ * e.g.
17
+ * ```
18
+ * <KeyValueRowRoot>
19
+ * <KeyValueSection></KeyValueSection>
20
+ * <KeyValueSection></KeyValueSection>
21
+ * </KeyValueRowRoot>
22
+ * ```
23
+ *
24
+ * @param props - Component props.
25
+ * @param props.children - The two <KeyValueSection> children.
26
+ * @param props.twClassName - Optional Tailwind class names to override root styles.
27
+ * @param props.style - Optional additional styles for the root element.
28
+ *
29
+ * @returns The rendered Root component.
30
+ */
31
+ const KeyValueRowRoot = ({ children, twClassName, style, ...props }) => {
32
+ const tw = useTailwind();
33
+ return (<View style={[
34
+ tw.style('flex-row justify-between items-center overflow-hidden', twClassName),
35
+ style,
36
+ ]} {...props}>
37
+ {children}
38
+ </View>);
39
+ };
40
+ export default KeyValueRowRoot;
41
+ //# sourceMappingURL=KeyValueRoot.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueRoot.mjs","sourceRoot":"","sources":["../../../../src/components/KeyValueRow/KeyValueRoot/KeyValueRoot.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAIpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,eAAe,GAAmC,CAAC,EACvD,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,OAAO,CACL,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,uDAAuD,EACvD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport type { KeyValueRowRootProps } from '../KeyValueRow.types';\n\n/**\n * The main container for the KeyValueRow component.\n * When creating custom KeyValueRow components, this must be the outermost component\n * wrapping the two <KeyValueSection/> components.\n *\n * e.g.\n * ```\n * <KeyValueRowRoot>\n * <KeyValueSection></KeyValueSection>\n * <KeyValueSection></KeyValueSection>\n * </KeyValueRowRoot>\n * ```\n *\n * @param props - Component props.\n * @param props.children - The two <KeyValueSection> children.\n * @param props.twClassName - Optional Tailwind class names to override root styles.\n * @param props.style - Optional additional styles for the root element.\n *\n * @returns The rendered Root component.\n */\nconst KeyValueRowRoot: React.FC<KeyValueRowRootProps> = ({\n children,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n return (\n <View\n style={[\n tw.style(\n 'flex-row justify-between items-center overflow-hidden',\n twClassName,\n ),\n style,\n ]}\n {...props}\n >\n {children}\n </View>\n );\n};\n\nexport default KeyValueRowRoot;\n"]}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.KeyValueRowStubs = void 0;
7
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
8
+ const react_1 = __importDefault(require("react"));
9
+ const react_native_1 = require("react-native/index.js");
10
+ const Icon_1 = require("../Icon/index.cjs");
11
+ const KeyValueLabel_1 = __importDefault(require("./KeyValueLabel/KeyValueLabel.cjs"));
12
+ const KeyValueRoot_1 = __importDefault(require("./KeyValueRoot/KeyValueRoot.cjs"));
13
+ const KeyValueRow_types_1 = require("./KeyValueRow.types.cjs");
14
+ const KeyValueSection_1 = __importDefault(require("./KeyValueSection/KeyValueSection.cjs"));
15
+ const renderIcon = (icon) => {
16
+ const { side: _side, ...iconProps } = icon;
17
+ return <Icon_1.Icon {...iconProps}/>;
18
+ };
19
+ /**
20
+ * Prebuilt convenience component to format and render a key/value label pair.
21
+ * The KeyValueRowLabel component has props to display a tooltip and icon.
22
+ *
23
+ * @param props - Component props
24
+ * @param props.field - Represents the left side of the key value row pair
25
+ * @param props.value - Represents the right side of the key value row pair
26
+ * @param props.twClassName - Optional Tailwind class names for the root element
27
+ * @param props.style - Optional additional styles for the root element
28
+ *
29
+ * @returns The rendered KeyValueRow component.
30
+ */
31
+ const KeyValueRow = ({ field, value, twClassName, style, ...props }) => {
32
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
33
+ const fieldIcon = field?.icon;
34
+ const valueIcon = value?.icon;
35
+ return (<KeyValueRoot_1.default twClassName={twClassName} style={style} {...props}>
36
+ <KeyValueSection_1.default>
37
+ <react_native_1.View style={tw.style('flex-row items-center gap-2')}>
38
+ {fieldIcon?.name &&
39
+ (fieldIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Left ||
40
+ fieldIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Both ||
41
+ !fieldIcon.side) &&
42
+ renderIcon(fieldIcon)}
43
+ <KeyValueLabel_1.default label={field.label} tooltip={field.tooltip}/>
44
+ {fieldIcon?.name &&
45
+ (fieldIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Right ||
46
+ fieldIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Both) &&
47
+ renderIcon(fieldIcon)}
48
+ </react_native_1.View>
49
+ </KeyValueSection_1.default>
50
+ <KeyValueSection_1.default align={KeyValueRow_types_1.KeyValueRowSectionAlignments.Right}>
51
+ <react_native_1.View style={tw.style('flex-row items-center gap-2')}>
52
+ {valueIcon?.name &&
53
+ (valueIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Left ||
54
+ valueIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Both ||
55
+ !valueIcon.side) &&
56
+ renderIcon(valueIcon)}
57
+ <KeyValueLabel_1.default label={value.label} tooltip={value.tooltip}/>
58
+ {valueIcon?.name &&
59
+ (valueIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Right ||
60
+ valueIcon.side === KeyValueRow_types_1.KeyValueRowFieldIconSides.Both) &&
61
+ renderIcon(valueIcon)}
62
+ </react_native_1.View>
63
+ </KeyValueSection_1.default>
64
+ </KeyValueRoot_1.default>);
65
+ };
66
+ KeyValueRow.displayName = 'KeyValueRow';
67
+ /**
68
+ * Exported sub-components to provide a base for new KeyValueRow variants.
69
+ */
70
+ exports.KeyValueRowStubs = {
71
+ Root: KeyValueRoot_1.default,
72
+ Section: KeyValueSection_1.default,
73
+ Label: KeyValueLabel_1.default,
74
+ };
75
+ exports.default = KeyValueRow;
76
+ //# sourceMappingURL=KeyValueRow.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueRow.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,qFAAmE;AACnE,kDAA0B;AAC1B,wDAAoC;AAEpC,4CAA+B;AAG/B,sFAA6D;AAC7D,mFAA0D;AAE1D,+DAG6B;AAC7B,4FAAgE;AAIhE,MAAM,UAAU,GAAG,CAAC,IAAkB,EAAE,EAAE;IACxC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3C,OAAO,CAAC,WAAI,CAAC,IAAI,SAAS,CAAC,EAAG,CAAC;AACjC,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,GAA+B,CAAC,EAC/C,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,SAAS,GAAG,KAAK,EAAE,IAAI,CAAC;IAC9B,MAAM,SAAS,GAAG,KAAK,EAAE,IAAI,CAAC;IAE9B,OAAO,CACL,CAAC,sBAAe,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,CACjE;MAAA,CAAC,yBAAe,CACd;QAAA,CAAC,mBAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC,CACnD;UAAA,CAAC,SAAS,EAAE,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E,mBAAI,CACR;MAAA,EAAE,yBAAe,CACnB;IAAA,EAAE,sBAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC;;GAEG;AACU,QAAA,gBAAgB,GAAG;IAC9B,IAAI,EAAE,sBAAe;IACrB,OAAO,EAAE,yBAAe;IACxB,KAAK,EAAE,uBAAgB;CACxB,CAAC;AAEF,kBAAe,WAAW,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { Icon } from '../Icon';\nimport type { IconProps } from '../Icon';\n\nimport KeyValueRowLabel from './KeyValueLabel/KeyValueLabel';\nimport KeyValueRowRoot from './KeyValueRoot/KeyValueRoot';\nimport type { KeyValueRowProps } from './KeyValueRow.types';\nimport {\n KeyValueRowFieldIconSides,\n KeyValueRowSectionAlignments,\n} from './KeyValueRow.types';\nimport KeyValueSection from './KeyValueSection/KeyValueSection';\n\ntype IconWithSide = IconProps & { side?: KeyValueRowFieldIconSides };\n\nconst renderIcon = (icon: IconWithSide) => {\n const { side: _side, ...iconProps } = icon;\n return <Icon {...iconProps} />;\n};\n\n/**\n * Prebuilt convenience component to format and render a key/value label pair.\n * The KeyValueRowLabel component has props to display a tooltip and icon.\n *\n * @param props - Component props\n * @param props.field - Represents the left side of the key value row pair\n * @param props.value - Represents the right side of the key value row pair\n * @param props.twClassName - Optional Tailwind class names for the root element\n * @param props.style - Optional additional styles for the root element\n *\n * @returns The rendered KeyValueRow component.\n */\nconst KeyValueRow: React.FC<KeyValueRowProps> = ({\n field,\n value,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n const fieldIcon = field?.icon;\n const valueIcon = value?.icon;\n\n return (\n <KeyValueRowRoot twClassName={twClassName} style={style} {...props}>\n <KeyValueSection>\n <View style={tw.style('flex-row items-center gap-2')}>\n {fieldIcon?.name &&\n (fieldIcon.side === KeyValueRowFieldIconSides.Left ||\n fieldIcon.side === KeyValueRowFieldIconSides.Both ||\n !fieldIcon.side) &&\n renderIcon(fieldIcon)}\n <KeyValueRowLabel label={field.label} tooltip={field.tooltip} />\n {fieldIcon?.name &&\n (fieldIcon.side === KeyValueRowFieldIconSides.Right ||\n fieldIcon.side === KeyValueRowFieldIconSides.Both) &&\n renderIcon(fieldIcon)}\n </View>\n </KeyValueSection>\n <KeyValueSection align={KeyValueRowSectionAlignments.Right}>\n <View style={tw.style('flex-row items-center gap-2')}>\n {valueIcon?.name &&\n (valueIcon.side === KeyValueRowFieldIconSides.Left ||\n valueIcon.side === KeyValueRowFieldIconSides.Both ||\n !valueIcon.side) &&\n renderIcon(valueIcon)}\n <KeyValueRowLabel label={value.label} tooltip={value.tooltip} />\n {valueIcon?.name &&\n (valueIcon.side === KeyValueRowFieldIconSides.Right ||\n valueIcon.side === KeyValueRowFieldIconSides.Both) &&\n renderIcon(valueIcon)}\n </View>\n </KeyValueSection>\n </KeyValueRowRoot>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n\n/**\n * Exported sub-components to provide a base for new KeyValueRow variants.\n */\nexport const KeyValueRowStubs = {\n Root: KeyValueRowRoot,\n Section: KeyValueSection,\n Label: KeyValueRowLabel,\n};\n\nexport default KeyValueRow;\n"]}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import type { KeyValueRowProps } from "./KeyValueRow.types.cjs";
3
+ /**
4
+ * Prebuilt convenience component to format and render a key/value label pair.
5
+ * The KeyValueRowLabel component has props to display a tooltip and icon.
6
+ *
7
+ * @param props - Component props
8
+ * @param props.field - Represents the left side of the key value row pair
9
+ * @param props.value - Represents the right side of the key value row pair
10
+ * @param props.twClassName - Optional Tailwind class names for the root element
11
+ * @param props.style - Optional additional styles for the root element
12
+ *
13
+ * @returns The rendered KeyValueRow component.
14
+ */
15
+ declare const KeyValueRow: React.FC<KeyValueRowProps>;
16
+ /**
17
+ * Exported sub-components to provide a base for new KeyValueRow variants.
18
+ */
19
+ export declare const KeyValueRowStubs: {
20
+ Root: React.FC<import("./KeyValueRow.types.cjs").KeyValueRowRootProps>;
21
+ Section: React.FC<import("./KeyValueRow.types.cjs").KeyValueSectionProps>;
22
+ Label: React.FC<import("./KeyValueRow.types.cjs").KeyValueRowLabelProps>;
23
+ };
24
+ export default KeyValueRow;
25
+ //# sourceMappingURL=KeyValueRow.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAc5D;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA4C3C,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAI5B,CAAC;AAEF,eAAe,WAAW,CAAC"}