@metamask-previews/design-system-react-native 0.9.0-preview.694a8ed → 0.11.0-preview.23cc337

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 (371) hide show
  1. package/CHANGELOG.md +51 -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 +1 -1
  41. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  42. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  43. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  44. package/dist/components/BannerBase/BannerBase.mjs +1 -1
  45. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  46. package/dist/components/BottomSheet/BottomSheet.cjs +109 -0
  47. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -0
  48. package/dist/components/BottomSheet/BottomSheet.d.cts +16 -0
  49. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  50. package/dist/components/BottomSheet/BottomSheet.d.mts +16 -0
  51. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  52. package/dist/components/BottomSheet/BottomSheet.mjs +87 -0
  53. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  54. package/dist/components/BottomSheet/BottomSheet.types.cjs +3 -0
  55. package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -0
  56. package/dist/components/BottomSheet/BottomSheet.types.d.cts +28 -0
  57. package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -0
  58. package/dist/components/BottomSheet/BottomSheet.types.d.mts +28 -0
  59. package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -0
  60. package/dist/components/BottomSheet/BottomSheet.types.mjs +2 -0
  61. package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -0
  62. package/dist/components/BottomSheet/index.cjs +6 -0
  63. package/dist/components/BottomSheet/index.cjs.map +1 -0
  64. package/dist/components/BottomSheet/index.d.cts +3 -0
  65. package/dist/components/BottomSheet/index.d.cts.map +1 -0
  66. package/dist/components/BottomSheet/index.d.mts +3 -0
  67. package/dist/components/BottomSheet/index.d.mts.map +1 -0
  68. package/dist/components/BottomSheet/index.mjs +2 -0
  69. package/dist/components/BottomSheet/index.mjs.map +1 -0
  70. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +207 -0
  71. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -0
  72. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs +18 -0
  73. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs.map +1 -0
  74. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts +14 -0
  75. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts.map +1 -0
  76. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts +14 -0
  77. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts.map +1 -0
  78. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs +15 -0
  79. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs.map +1 -0
  80. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +13 -0
  81. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -0
  82. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +13 -0
  83. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -0
  84. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +190 -0
  85. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -0
  86. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs +3 -0
  87. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -0
  88. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +56 -0
  89. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -0
  90. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +56 -0
  91. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -0
  92. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs +2 -0
  93. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -0
  94. package/dist/components/BottomSheetDialog/index.cjs +9 -0
  95. package/dist/components/BottomSheetDialog/index.cjs.map +1 -0
  96. package/dist/components/BottomSheetDialog/index.d.cts +3 -0
  97. package/dist/components/BottomSheetDialog/index.d.cts.map +1 -0
  98. package/dist/components/BottomSheetDialog/index.d.mts +3 -0
  99. package/dist/components/BottomSheetDialog/index.d.mts.map +1 -0
  100. package/dist/components/BottomSheetDialog/index.mjs +2 -0
  101. package/dist/components/BottomSheetDialog/index.mjs.map +1 -0
  102. package/dist/components/ButtonBase/ButtonBase.cjs +4 -11
  103. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  104. package/dist/components/ButtonBase/ButtonBase.d.cts +1 -1
  105. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  106. package/dist/components/ButtonBase/ButtonBase.d.mts +1 -1
  107. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  108. package/dist/components/ButtonBase/ButtonBase.mjs +5 -12
  109. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  110. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  111. package/dist/components/ButtonBase/ButtonBase.types.d.cts +7 -0
  112. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  113. package/dist/components/ButtonBase/ButtonBase.types.d.mts +7 -0
  114. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  115. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  116. package/dist/components/ButtonFilter/ButtonFilter.cjs +28 -0
  117. package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
  118. package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
  119. package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
  120. package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
  121. package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
  122. package/dist/components/ButtonFilter/ButtonFilter.mjs +28 -0
  123. package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
  124. package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
  125. package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
  126. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +9 -0
  127. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
  128. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +9 -0
  129. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
  130. package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
  131. package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
  132. package/dist/components/ButtonFilter/index.cjs +6 -0
  133. package/dist/components/ButtonFilter/index.cjs.map +1 -0
  134. package/dist/components/ButtonFilter/index.d.cts +3 -0
  135. package/dist/components/ButtonFilter/index.d.cts.map +1 -0
  136. package/dist/components/ButtonFilter/index.d.mts +3 -0
  137. package/dist/components/ButtonFilter/index.d.mts.map +1 -0
  138. package/dist/components/ButtonFilter/index.mjs +2 -0
  139. package/dist/components/ButtonFilter/index.mjs.map +1 -0
  140. package/dist/components/ButtonIcon/ButtonIcon.cjs +10 -4
  141. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  142. package/dist/components/ButtonIcon/ButtonIcon.d.cts +1 -1
  143. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  144. package/dist/components/ButtonIcon/ButtonIcon.d.mts +1 -1
  145. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  146. package/dist/components/ButtonIcon/ButtonIcon.mjs +11 -5
  147. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  148. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  149. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -11
  150. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  151. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -11
  152. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  153. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  154. package/dist/components/ButtonIcon/index.cjs +2 -1
  155. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  156. package/dist/components/ButtonIcon/index.d.cts +1 -1
  157. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  158. package/dist/components/ButtonIcon/index.d.mts +1 -1
  159. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  160. package/dist/components/ButtonIcon/index.mjs +1 -1
  161. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  162. package/dist/components/Icon/assets/ai.svg +1 -1
  163. package/dist/components/Input/Input.cjs +12 -2
  164. package/dist/components/Input/Input.cjs.map +1 -1
  165. package/dist/components/Input/Input.d.cts +2 -1
  166. package/dist/components/Input/Input.d.cts.map +1 -1
  167. package/dist/components/Input/Input.d.mts +2 -1
  168. package/dist/components/Input/Input.d.mts.map +1 -1
  169. package/dist/components/Input/Input.mjs +12 -2
  170. package/dist/components/Input/Input.mjs.map +1 -1
  171. package/dist/components/Input/Input.types.cjs.map +1 -1
  172. package/dist/components/Input/Input.types.d.cts +5 -1
  173. package/dist/components/Input/Input.types.d.cts.map +1 -1
  174. package/dist/components/Input/Input.types.d.mts +5 -1
  175. package/dist/components/Input/Input.types.d.mts.map +1 -1
  176. package/dist/components/Input/Input.types.mjs.map +1 -1
  177. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +33 -0
  178. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
  179. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +14 -0
  180. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
  181. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +14 -0
  182. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
  183. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +35 -0
  184. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
  185. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +39 -0
  186. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
  187. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +25 -0
  188. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
  189. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +25 -0
  190. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
  191. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +41 -0
  192. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
  193. package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
  194. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
  195. package/dist/components/KeyValueRow/KeyValueRow.d.cts +25 -0
  196. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
  197. package/dist/components/KeyValueRow/KeyValueRow.d.mts +25 -0
  198. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
  199. package/dist/components/KeyValueRow/KeyValueRow.mjs +77 -0
  200. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
  201. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
  202. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
  203. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
  204. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
  205. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
  206. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
  207. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
  208. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
  209. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
  210. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
  211. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
  212. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
  213. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
  214. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
  215. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
  216. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
  217. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +29 -0
  218. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
  219. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +17 -0
  220. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
  221. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +17 -0
  222. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
  223. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +31 -0
  224. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
  225. package/dist/components/KeyValueRow/index.cjs +15 -0
  226. package/dist/components/KeyValueRow/index.cjs.map +1 -0
  227. package/dist/components/KeyValueRow/index.d.cts +3 -0
  228. package/dist/components/KeyValueRow/index.d.cts.map +1 -0
  229. package/dist/components/KeyValueRow/index.d.mts +3 -0
  230. package/dist/components/KeyValueRow/index.d.mts.map +1 -0
  231. package/dist/components/KeyValueRow/index.mjs +3 -0
  232. package/dist/components/KeyValueRow/index.mjs.map +1 -0
  233. package/dist/components/ListItem/ListItem.cjs +61 -0
  234. package/dist/components/ListItem/ListItem.cjs.map +1 -0
  235. package/dist/components/ListItem/ListItem.constants.cjs +14 -0
  236. package/dist/components/ListItem/ListItem.constants.cjs.map +1 -0
  237. package/dist/components/ListItem/ListItem.constants.d.cts +8 -0
  238. package/dist/components/ListItem/ListItem.constants.d.cts.map +1 -0
  239. package/dist/components/ListItem/ListItem.constants.d.mts +8 -0
  240. package/dist/components/ListItem/ListItem.constants.d.mts.map +1 -0
  241. package/dist/components/ListItem/ListItem.constants.mjs +11 -0
  242. package/dist/components/ListItem/ListItem.constants.mjs.map +1 -0
  243. package/dist/components/ListItem/ListItem.d.cts +4 -0
  244. package/dist/components/ListItem/ListItem.d.cts.map +1 -0
  245. package/dist/components/ListItem/ListItem.d.mts +4 -0
  246. package/dist/components/ListItem/ListItem.d.mts.map +1 -0
  247. package/dist/components/ListItem/ListItem.mjs +41 -0
  248. package/dist/components/ListItem/ListItem.mjs.map +1 -0
  249. package/dist/components/ListItem/ListItem.types.cjs +12 -0
  250. package/dist/components/ListItem/ListItem.types.cjs.map +1 -0
  251. package/dist/components/ListItem/ListItem.types.d.cts +60 -0
  252. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -0
  253. package/dist/components/ListItem/ListItem.types.d.mts +60 -0
  254. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -0
  255. package/dist/components/ListItem/ListItem.types.mjs +9 -0
  256. package/dist/components/ListItem/ListItem.types.mjs.map +1 -0
  257. package/dist/components/ListItem/index.cjs +8 -0
  258. package/dist/components/ListItem/index.cjs.map +1 -0
  259. package/dist/components/ListItem/index.d.cts +4 -0
  260. package/dist/components/ListItem/index.d.cts.map +1 -0
  261. package/dist/components/ListItem/index.d.mts +4 -0
  262. package/dist/components/ListItem/index.d.mts.map +1 -0
  263. package/dist/components/ListItem/index.mjs +3 -0
  264. package/dist/components/ListItem/index.mjs.map +1 -0
  265. package/dist/components/MainActionButton/MainActionButton.cjs +28 -0
  266. package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -0
  267. package/dist/components/MainActionButton/MainActionButton.d.cts +4 -0
  268. package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -0
  269. package/dist/components/MainActionButton/MainActionButton.d.mts +4 -0
  270. package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -0
  271. package/dist/components/MainActionButton/MainActionButton.mjs +28 -0
  272. package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -0
  273. package/dist/components/MainActionButton/MainActionButton.types.cjs +3 -0
  274. package/dist/components/MainActionButton/MainActionButton.types.cjs.map +1 -0
  275. package/dist/components/MainActionButton/MainActionButton.types.d.cts +41 -0
  276. package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -0
  277. package/dist/components/MainActionButton/MainActionButton.types.d.mts +41 -0
  278. package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -0
  279. package/dist/components/MainActionButton/MainActionButton.types.mjs +2 -0
  280. package/dist/components/MainActionButton/MainActionButton.types.mjs.map +1 -0
  281. package/dist/components/MainActionButton/index.cjs +6 -0
  282. package/dist/components/MainActionButton/index.cjs.map +1 -0
  283. package/dist/components/MainActionButton/index.d.cts +3 -0
  284. package/dist/components/MainActionButton/index.d.cts.map +1 -0
  285. package/dist/components/MainActionButton/index.d.mts +3 -0
  286. package/dist/components/MainActionButton/index.d.mts.map +1 -0
  287. package/dist/components/MainActionButton/index.mjs +2 -0
  288. package/dist/components/MainActionButton/index.mjs.map +1 -0
  289. package/dist/components/TabEmptyState/TabEmptyState.cjs +22 -0
  290. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -0
  291. package/dist/components/TabEmptyState/TabEmptyState.d.cts +4 -0
  292. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -0
  293. package/dist/components/TabEmptyState/TabEmptyState.d.mts +4 -0
  294. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -0
  295. package/dist/components/TabEmptyState/TabEmptyState.mjs +22 -0
  296. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -0
  297. package/dist/components/TabEmptyState/TabEmptyState.types.cjs +3 -0
  298. package/dist/components/TabEmptyState/TabEmptyState.types.cjs.map +1 -0
  299. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +45 -0
  300. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -0
  301. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +45 -0
  302. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -0
  303. package/dist/components/TabEmptyState/TabEmptyState.types.mjs +2 -0
  304. package/dist/components/TabEmptyState/TabEmptyState.types.mjs.map +1 -0
  305. package/dist/components/TabEmptyState/index.cjs +6 -0
  306. package/dist/components/TabEmptyState/index.cjs.map +1 -0
  307. package/dist/components/TabEmptyState/index.d.cts +3 -0
  308. package/dist/components/TabEmptyState/index.d.cts.map +1 -0
  309. package/dist/components/TabEmptyState/index.d.mts +3 -0
  310. package/dist/components/TabEmptyState/index.d.mts.map +1 -0
  311. package/dist/components/TabEmptyState/index.mjs +2 -0
  312. package/dist/components/TabEmptyState/index.mjs.map +1 -0
  313. package/dist/components/Toast/Toast.cjs +3 -2
  314. package/dist/components/Toast/Toast.cjs.map +1 -1
  315. package/dist/components/Toast/Toast.d.cts.map +1 -1
  316. package/dist/components/Toast/Toast.d.mts.map +1 -1
  317. package/dist/components/Toast/Toast.mjs +4 -3
  318. package/dist/components/Toast/Toast.mjs.map +1 -1
  319. package/dist/components/Toast/Toast.types.cjs +5 -5
  320. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  321. package/dist/components/Toast/Toast.types.d.cts +5 -4
  322. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  323. package/dist/components/Toast/Toast.types.d.mts +5 -4
  324. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  325. package/dist/components/Toast/Toast.types.mjs +4 -4
  326. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  327. package/dist/components/Toast/index.cjs +2 -2
  328. package/dist/components/Toast/index.cjs.map +1 -1
  329. package/dist/components/Toast/index.d.cts +1 -1
  330. package/dist/components/Toast/index.d.cts.map +1 -1
  331. package/dist/components/Toast/index.d.mts +1 -1
  332. package/dist/components/Toast/index.d.mts.map +1 -1
  333. package/dist/components/Toast/index.mjs +1 -1
  334. package/dist/components/Toast/index.mjs.map +1 -1
  335. package/dist/components/index.cjs +31 -2
  336. package/dist/components/index.cjs.map +1 -1
  337. package/dist/components/index.d.cts +25 -5
  338. package/dist/components/index.d.cts.map +1 -1
  339. package/dist/components/index.d.mts +25 -5
  340. package/dist/components/index.d.mts.map +1 -1
  341. package/dist/components/index.mjs +12 -2
  342. package/dist/components/index.mjs.map +1 -1
  343. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +5 -1
  344. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
  345. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts +1 -1
  346. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
  347. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts +1 -1
  348. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
  349. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +5 -1
  350. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
  351. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.cjs.map +1 -1
  352. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts +14 -1
  353. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts.map +1 -1
  354. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts +14 -1
  355. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts.map +1 -1
  356. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.mjs.map +1 -1
  357. package/dist/components/temp-components/ButtonAnimated/index.cjs.map +1 -1
  358. package/dist/components/temp-components/ButtonAnimated/index.d.cts +1 -1
  359. package/dist/components/temp-components/ButtonAnimated/index.d.cts.map +1 -1
  360. package/dist/components/temp-components/ButtonAnimated/index.d.mts +1 -1
  361. package/dist/components/temp-components/ButtonAnimated/index.d.mts.map +1 -1
  362. package/dist/components/temp-components/ButtonAnimated/index.mjs.map +1 -1
  363. package/dist/types/index.cjs +10 -1
  364. package/dist/types/index.cjs.map +1 -1
  365. package/dist/types/index.d.cts +8 -0
  366. package/dist/types/index.d.cts.map +1 -1
  367. package/dist/types/index.d.mts +8 -0
  368. package/dist/types/index.d.mts.map +1 -1
  369. package/dist/types/index.mjs +9 -0
  370. package/dist/types/index.mjs.map +1 -1
  371. package/package.json +8 -4
@@ -7,21 +7,27 @@ function $importDefault(module) {
7
7
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
8
  import $React, { useState } from "react";
9
9
  const React = $importDefault($React);
10
- import { ButtonIconSize } from "../../types/index.mjs";
10
+ import { ButtonIconSize, ButtonIconVariant } from "../../types/index.mjs";
11
11
  import { Icon } from "../Icon/index.mjs";
12
12
  import { ButtonAnimated } from "../temp-components/ButtonAnimated/index.mjs";
13
13
  import { MAP_BUTTONICON_SIZE_ICONSIZE, TWCLASSMAP_BUTTONICON_SIZE_DIMENSION } from "./ButtonIcon.constants.mjs";
14
- export const ButtonIcon = ({ size = ButtonIconSize.Md, iconName, iconProps, isDisabled = false, isInverse = false, isFloating = false, onPressIn, onPressOut, twClassName, style, ...props }) => {
14
+ export const ButtonIcon = ({ size = ButtonIconSize.Md, iconName, iconProps, isDisabled = false, variant = ButtonIconVariant.Default, onPressIn, onPressOut, twClassName, style, ...props }) => {
15
15
  const [isPressed, setIsPressed] = useState(false);
16
16
  const tw = useTailwind();
17
17
  let backgroundColor = 'bg-transparent';
18
- if (isFloating) {
18
+ if (variant === ButtonIconVariant.Floating) {
19
19
  backgroundColor = 'bg-icon-default';
20
20
  }
21
+ else if (variant === ButtonIconVariant.Filled) {
22
+ backgroundColor = isPressed ? 'bg-muted-pressed' : 'bg-muted';
23
+ }
21
24
  else if (isPressed) {
22
25
  backgroundColor = 'bg-pressed';
23
26
  }
24
- const twIconColorClassNames = isInverse || isFloating ? 'text-primary-inverse' : 'text-icon-default';
27
+ const twIconColorClassNames = variant === ButtonIconVariant.Floating
28
+ ? 'text-primary-inverse'
29
+ : 'text-icon-default';
30
+ const borderRadiusClass = variant === ButtonIconVariant.Default ? 'rounded-lg' : 'rounded-full';
25
31
  const onPressInHandler = (event) => {
26
32
  setIsPressed(true);
27
33
  onPressIn?.(event);
@@ -31,7 +37,7 @@ export const ButtonIcon = ({ size = ButtonIconSize.Md, iconName, iconProps, isDi
31
37
  onPressOut?.(event);
32
38
  };
33
39
  return (<ButtonAnimated disabled={isDisabled} onPressIn={onPressInHandler} onPressOut={onPressOutHandler} accessible testID="button-icon" {...props} style={[
34
- tw.style('items-center justify-center', TWCLASSMAP_BUTTONICON_SIZE_DIMENSION[size], isFloating ? 'rounded-full' : 'rounded-lg', backgroundColor, isDisabled ? 'opacity-50' : 'opacity-100', twClassName),
40
+ tw.style('items-center justify-center', TWCLASSMAP_BUTTONICON_SIZE_DIMENSION[size], borderRadiusClass, backgroundColor, isDisabled ? 'opacity-50' : 'opacity-100', twClassName),
35
41
  style,
36
42
  ]}>
37
43
  <Icon name={iconName} color={twIconColorClassNames} size={MAP_BUTTONICON_SIZE_ICONSIZE[size]} {...iconProps}/>
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAGxC,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAE7C,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAC/B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EACL,4BAA4B,EAC5B,oCAAoC,EACrC,mCAA+B;AAGhC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,SAAS,EACT,UAAU,EACV,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,IAAI,eAAe,GAAG,gBAAgB,CAAC;IACvC,IAAI,UAAU,EAAE;QACd,eAAe,GAAG,iBAAiB,CAAC;KACrC;SAAM,IAAI,SAAS,EAAE;QACpB,eAAe,GAAG,YAAY,CAAC;KAChC;IAED,MAAM,qBAAqB,GACzB,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,mBAAmB,CAAC;IAEzE,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;QACxD,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,KAA4B,EAAE,EAAE;QACzD,YAAY,CAAC,KAAK,CAAC,CAAC;QACpB,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,cAAc,CACb,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAC5B,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,UAAU,CACV,MAAM,CAAC,aAAa,CACpB,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,6BAA6B,EAC7B,oCAAoC,CAAC,IAAI,CAAC,EAC1C,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,EAC1C,eAAe,EACf,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,EACzC,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CAEF;MAAA,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,KAAK,CAAC,CAAC,qBAAkC,CAAC,CAC1C,IAAI,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,CACzC,IAAI,SAAS,CAAC,EAElB;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useState } from 'react';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport { ButtonIconSize } from '../../types';\nimport type { IconColor } from '../Icon';\nimport { Icon } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\n\nimport {\n MAP_BUTTONICON_SIZE_ICONSIZE,\n TWCLASSMAP_BUTTONICON_SIZE_DIMENSION,\n} from './ButtonIcon.constants';\nimport type { ButtonIconProps } from './ButtonIcon.types';\n\nexport const ButtonIcon = ({\n size = ButtonIconSize.Md,\n iconName,\n iconProps,\n isDisabled = false,\n isInverse = false,\n isFloating = false,\n onPressIn,\n onPressOut,\n twClassName,\n style,\n ...props\n}: ButtonIconProps) => {\n const [isPressed, setIsPressed] = useState(false);\n const tw = useTailwind();\n\n let backgroundColor = 'bg-transparent';\n if (isFloating) {\n backgroundColor = 'bg-icon-default';\n } else if (isPressed) {\n backgroundColor = 'bg-pressed';\n }\n\n const twIconColorClassNames =\n isInverse || isFloating ? 'text-primary-inverse' : 'text-icon-default';\n\n const onPressInHandler = (event: GestureResponderEvent) => {\n setIsPressed(true);\n onPressIn?.(event);\n };\n\n const onPressOutHandler = (event: GestureResponderEvent) => {\n setIsPressed(false);\n onPressOut?.(event);\n };\n\n return (\n <ButtonAnimated\n disabled={isDisabled}\n onPressIn={onPressInHandler}\n onPressOut={onPressOutHandler}\n accessible\n testID=\"button-icon\"\n {...props}\n style={[\n tw.style(\n 'items-center justify-center',\n TWCLASSMAP_BUTTONICON_SIZE_DIMENSION[size],\n isFloating ? 'rounded-full' : 'rounded-lg',\n backgroundColor,\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <Icon\n name={iconName}\n color={twIconColorClassNames as IconColor}\n size={MAP_BUTTONICON_SIZE_ICONSIZE[size]}\n {...iconProps}\n />\n </ButtonAnimated>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonIcon.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAGxC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAAoB;AAEhE,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAC/B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EACL,4BAA4B,EAC5B,oCAAoC,EACr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AC;IAEF,OAAO,CACL,CAAC,cAAc,CACb,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,SAAS,CAAC,CAAC,gBAAgB,CAAC,CAC5B,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,UAAU,CACV,MAAM,CAAC,aAAa,CACpB,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,6BAA6B,EAC7B,oCAAoC,CAAC,IAAI,CAAC,EAC1C,iBAAiB,EACjB,eAAe,EACf,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,EACzC,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CAEF;MAAA,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,KAAK,CAAC,CAAC,qBAAkC,CAAC,CAC1C,IAAI,CAAC,CAAC,4BAA4B,CAAC,IAAI,CAAC,CAAC,CACzC,IAAI,SAAS,CAAC,EAElB;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useState } from 'react';\nimport type { GestureResponderEvent } from 'react-native';\n\nimport { ButtonIconSize, ButtonIconVariant } from '../../types';\nimport type { IconColor } from '../Icon';\nimport { Icon } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\n\nimport {\n MAP_BUTTONICON_SIZE_ICONSIZE,\n TWCLASSMAP_BUTTONICON_SIZE_DIMENSION,\n} from './ButtonIcon.constants';\nimport type { ButtonIconProps } from './ButtonIcon.types';\n\nexport const ButtonIcon = ({\n size = ButtonIconSize.Md,\n iconName,\n iconProps,\n isDisabled = false,\n variant = ButtonIconVariant.Default,\n onPressIn,\n onPressOut,\n twClassName,\n style,\n ...props\n}: ButtonIconProps) => {\n const [isPressed, setIsPressed] = useState(false);\n const tw = useTailwind();\n\n let backgroundColor = 'bg-transparent';\n if (variant === ButtonIconVariant.Floating) {\n backgroundColor = 'bg-icon-default';\n } else if (variant === ButtonIconVariant.Filled) {\n backgroundColor = isPressed ? 'bg-muted-pressed' : 'bg-muted';\n } else if (isPressed) {\n backgroundColor = 'bg-pressed';\n }\n\n const twIconColorClassNames =\n variant === ButtonIconVariant.Floating\n ? 'text-primary-inverse'\n : 'text-icon-default';\n\n const borderRadiusClass =\n variant === ButtonIconVariant.Default ? 'rounded-lg' : 'rounded-full';\n\n const onPressInHandler = (event: GestureResponderEvent) => {\n setIsPressed(true);\n onPressIn?.(event);\n };\n\n const onPressOutHandler = (event: GestureResponderEvent) => {\n setIsPressed(false);\n onPressOut?.(event);\n };\n\n return (\n <ButtonAnimated\n disabled={isDisabled}\n onPressIn={onPressInHandler}\n onPressOut={onPressOutHandler}\n accessible\n testID=\"button-icon\"\n {...props}\n style={[\n tw.style(\n 'items-center justify-center',\n TWCLASSMAP_BUTTONICON_SIZE_DIMENSION[size],\n borderRadiusClass,\n backgroundColor,\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <Icon\n name={iconName}\n color={twIconColorClassNames as IconColor}\n size={MAP_BUTTONICON_SIZE_ICONSIZE[size]}\n {...iconProps}\n />\n </ButtonAnimated>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonIconSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { ButtonAnimatedProps } from '../temp-components/ButtonAnimated';\n\n/**\n * ButtonIcon component props.\n */\nexport type ButtonIconProps = {\n /**\n * Optional prop to control the size of the icon\n * Different sizes map to specific pixel dimensions\n *\n * @default IconSize.Md\n */\n size?: ButtonIconSize;\n /**\n * Optional prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Partial<IconProps>;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.\n *\n * @default false\n */\n isInverse?: boolean;\n /**\n * Optional prop to show the floating/contained state of the button, which is reserved for floating buttons.\n * Note: This prop provides styling only. There is no positioning logic.\n *\n * @default false\n */\n isFloating?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ButtonAnimatedProps, 'children'>;\n"]}
1
+ {"version":3,"file":"ButtonIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonIconSize, ButtonIconVariant } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { ButtonAnimatedProps } from '../temp-components/ButtonAnimated';\n\n/**\n * ButtonIcon component props.\n */\nexport type ButtonIconProps = {\n /**\n * Optional prop to control the size of the icon\n * Different sizes map to specific pixel dimensions\n *\n * @default IconSize.Md\n */\n size?: ButtonIconSize;\n /**\n * Optional prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Partial<IconProps>;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop to control the visual variant of the button.\n *\n * @default ButtonIconVariant.Default\n */\n variant?: ButtonIconVariant;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ButtonAnimatedProps, 'children'>;\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { StyleProp, ViewStyle } from "react-native/index.js";
2
- import type { ButtonIconSize } from "../../types/index.cjs";
2
+ import type { ButtonIconSize, ButtonIconVariant } from "../../types/index.cjs";
3
3
  import type { IconProps, IconName } from "../Icon/index.cjs";
4
4
  import type { ButtonAnimatedProps } from "../temp-components/ButtonAnimated/index.cjs";
5
5
  /**
@@ -28,18 +28,11 @@ export type ButtonIconProps = {
28
28
  */
29
29
  isDisabled?: boolean;
30
30
  /**
31
- * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.
31
+ * Optional prop to control the visual variant of the button.
32
32
  *
33
- * @default false
34
- */
35
- isInverse?: boolean;
36
- /**
37
- * Optional prop to show the floating/contained state of the button, which is reserved for floating buttons.
38
- * Note: This prop provides styling only. There is no positioning logic.
39
- *
40
- * @default false
33
+ * @default ButtonIconVariant.Default
41
34
  */
42
- isFloating?: boolean;
35
+ variant?: ButtonIconVariant;
43
36
  /**
44
37
  * Optional prop to add twrnc overriding classNames.
45
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.types.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAoB;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oDAA0C;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"ButtonIcon.types.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAAoB;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oDAA0C;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { StyleProp, ViewStyle } from "react-native/index.js";
2
- import type { ButtonIconSize } from "../../types/index.mjs";
2
+ import type { ButtonIconSize, ButtonIconVariant } from "../../types/index.mjs";
3
3
  import type { IconProps, IconName } from "../Icon/index.mjs";
4
4
  import type { ButtonAnimatedProps } from "../temp-components/ButtonAnimated/index.mjs";
5
5
  /**
@@ -28,18 +28,11 @@ export type ButtonIconProps = {
28
28
  */
29
29
  isDisabled?: boolean;
30
30
  /**
31
- * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.
31
+ * Optional prop to control the visual variant of the button.
32
32
  *
33
- * @default false
34
- */
35
- isInverse?: boolean;
36
- /**
37
- * Optional prop to show the floating/contained state of the button, which is reserved for floating buttons.
38
- * Note: This prop provides styling only. There is no positioning logic.
39
- *
40
- * @default false
33
+ * @default ButtonIconVariant.Default
41
34
  */
42
- isFloating?: boolean;
35
+ variant?: ButtonIconVariant;
43
36
  /**
44
37
  * Optional prop to add twrnc overriding classNames.
45
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.types.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAoB;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oDAA0C;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"ButtonIcon.types.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAAoB;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,mBAAmB,EAAE,oDAA0C;AAE7E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonIconSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { ButtonAnimatedProps } from '../temp-components/ButtonAnimated';\n\n/**\n * ButtonIcon component props.\n */\nexport type ButtonIconProps = {\n /**\n * Optional prop to control the size of the icon\n * Different sizes map to specific pixel dimensions\n *\n * @default IconSize.Md\n */\n size?: ButtonIconSize;\n /**\n * Optional prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Partial<IconProps>;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.\n *\n * @default false\n */\n isInverse?: boolean;\n /**\n * Optional prop to show the floating/contained state of the button, which is reserved for floating buttons.\n * Note: This prop provides styling only. There is no positioning logic.\n *\n * @default false\n */\n isFloating?: boolean;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ButtonAnimatedProps, 'children'>;\n"]}
1
+ {"version":3,"file":"ButtonIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { StyleProp, ViewStyle } from 'react-native';\n\nimport type { ButtonIconSize, ButtonIconVariant } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { ButtonAnimatedProps } from '../temp-components/ButtonAnimated';\n\n/**\n * ButtonIcon component props.\n */\nexport type ButtonIconProps = {\n /**\n * Optional prop to control the size of the icon\n * Different sizes map to specific pixel dimensions\n *\n * @default IconSize.Md\n */\n size?: ButtonIconSize;\n /**\n * Optional prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Partial<IconProps>;\n /**\n * Optional prop that when true, disables the button\n *\n * @default false\n */\n isDisabled?: boolean;\n /**\n * Optional prop to control the visual variant of the button.\n *\n * @default ButtonIconVariant.Default\n */\n variant?: ButtonIconVariant;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<ButtonAnimatedProps, 'children'>;\n"]}
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ButtonIcon = exports.ButtonIconSize = void 0;
3
+ exports.ButtonIcon = exports.ButtonIconVariant = exports.ButtonIconSize = void 0;
4
4
  var types_1 = require("../../types/index.cjs");
5
5
  Object.defineProperty(exports, "ButtonIconSize", { enumerable: true, get: function () { return types_1.ButtonIconSize; } });
6
+ Object.defineProperty(exports, "ButtonIconVariant", { enumerable: true, get: function () { return types_1.ButtonIconVariant; } });
6
7
  var ButtonIcon_1 = require("./ButtonIcon.cjs");
7
8
  Object.defineProperty(exports, "ButtonIcon", { enumerable: true, get: function () { return ButtonIcon_1.ButtonIcon; } });
8
9
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,uGAAA,cAAc,OAAA;AACvB,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { ButtonIconSize } from '../../types';\nexport { ButtonIcon } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":";;;AAAA,+CAAgE;AAAvD,uGAAA,cAAc,OAAA;AAAE,0GAAA,iBAAiB,OAAA;AAC1C,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { ButtonIconSize, ButtonIconVariant } from '../../types';\nexport { ButtonIcon } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon.types';\n"]}
@@ -1,4 +1,4 @@
1
- export { ButtonIconSize } from "../../types/index.cjs";
1
+ export { ButtonIconSize, ButtonIconVariant } from "../../types/index.cjs";
2
2
  export { ButtonIcon } from "./ButtonIcon.cjs";
3
3
  export type { ButtonIconProps } from "./ButtonIcon.types.cjs";
4
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAAoB;AAChE,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -1,4 +1,4 @@
1
- export { ButtonIconSize } from "../../types/index.mjs";
1
+ export { ButtonIconSize, ButtonIconVariant } from "../../types/index.mjs";
2
2
  export { ButtonIcon } from "./ButtonIcon.mjs";
3
3
  export type { ButtonIconProps } from "./ButtonIcon.types.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAAoB;AAChE,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -1,3 +1,3 @@
1
- export { ButtonIconSize } from "../../types/index.mjs";
1
+ export { ButtonIconSize, ButtonIconVariant } from "../../types/index.mjs";
2
2
  export { ButtonIcon } from "./ButtonIcon.mjs";
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { ButtonIconSize } from '../../types';\nexport { ButtonIcon } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/ButtonIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,8BAAoB;AAChE,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { ButtonIconSize, ButtonIconVariant } from '../../types';\nexport { ButtonIcon } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon.types';\n"]}
@@ -1 +1 @@
1
- <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m17.7143 3c.2505 2.26476 2.0307 4.05261 4.2857 4.30429-2.255.25167-4.0352 2.03952-4.2857 4.30431-.2506-2.26479-2.0307-4.05264-4.2857-4.30431 2.255-.25168 4.0351-2.03953 4.2857-4.30429zm-1.2556 11.9129c.1772 1.6014 1.4359 2.8656 3.0305 3.0436-1.5946.1779-2.8533 1.4421-3.0305 3.0435-.1772-1.6014-1.4359-2.8656-3.0305-3.0435 1.5946-.178 2.8533-1.4422 3.0305-3.0436z"/><path d="m9.14286 4.86963c-.10963.99098-.39498 1.92717-.82422 2.77663-.77739 1.53842-2.02676 2.79234-3.55917 3.57204-.84441.4296-1.77478.7153-2.75947.8251.98469.1099 1.91506.3955 2.75947.8252 1.53241.7797 2.78178 2.0336 3.55917 3.572.42924.8495.71459 1.7857.82422 2.7766.10963-.9909.39497-1.9271.82422-2.7766.77742-1.5384 2.02672-2.7923 3.55912-3.572.8445-.4297 1.7748-.7153 2.7595-.8252-.9847-.1098-1.915-.3955-2.7595-.8251-1.5324-.7797-2.7817-2.03362-3.55912-3.57204-.42925-.84946-.71459-1.78565-.82422-2.77663zm0 4.34847c-.73163 1.1281-1.69246 2.0918-2.81763 2.8253 1.12517.7336 2.086 1.6973 2.81763 2.8254.73163-1.1281 1.69244-2.0918 2.81764-2.8254-1.1252-.7335-2.08601-1.6972-2.81764-2.8253z"/></g></svg>
1
+ <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g clip-rule="evenodd" fill-rule="evenodd"><path d="m17.7143 3c.2505 2.26476 2.0307 4.05261 4.2857 4.30429-2.255.25167-4.0352 2.03952-4.2857 4.30431-.2506-2.26479-2.0307-4.05264-4.2857-4.30431 2.255-.25168 4.0351-2.03953 4.2857-4.30429zm-1.2556 11.9129c.1772 1.6014 1.4359 2.8656 3.0305 3.0436-1.5946.1779-2.8533 1.4421-3.0305 3.0435-.1772-1.6014-1.4359-2.8656-3.0305-3.0435 1.5946-.178 2.8533-1.4422 3.0305-3.0436z"/><path d="m9.14286 4.86963c-.10963.99098-.39498 1.92717-.82422 2.77663-.77739 1.53842-2.02676 2.79234-3.55917 3.57204-.84441.4296-1.77478.7153-2.75947.8251.98469.1099 1.91506.3955 2.75947.8252 1.53241.7797 2.78178 2.0336 3.55917 3.572.42924.8495.71459 1.7857.82422 2.7766.10963-.9909.39497-1.9271.82422-2.7766.77742-1.5384 2.02672-2.7923 3.55912-3.572.8445-.4297 1.7748-.7153 2.7595-.8252-.9847-.1098-1.915-.3955-2.7595-.8251-1.5324-.7797-2.7817-2.03362-3.55912-3.57204-.42925-.84946-.71459-1.78565-.82422-2.77663z"/></g></svg>
@@ -7,7 +7,7 @@ const react_1 = require("react");
7
7
  const react_native_1 = require("react-native/index.js");
8
8
  const types_1 = require("../../types/index.cjs");
9
9
  const Text_constants_1 = require("../Text/Text.constants.cjs");
10
- exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
10
+ exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
11
11
  const [isFocused, setIsFocused] = (0, react_1.useState)(autoFocus);
12
12
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
13
13
  const theme = (0, design_system_twrnc_preset_1.useTheme)();
@@ -17,6 +17,11 @@ exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVari
17
17
  const finalFontWeight = Text_constants_1.MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];
18
18
  const fontSuffix = Text_constants_1.TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];
19
19
  const fontClass = `font-${types_1.FontFamily.Default}${fontSuffix}`;
20
+ const hasPlaceholder = placeholder !== undefined && placeholder !== null && placeholder !== '';
21
+ // Only apply placeholder-mode styling when a placeholder is present and
22
+ // the controlled value is empty. This keeps the iOS lineHeight workaround
23
+ // scoped to the placeholder-visible state without affecting typed text.
24
+ const isPlaceholderVisible = hasPlaceholder && value === '';
20
25
  const inputStyle = (0, react_1.useMemo)(() => tw.style(`text-${textVariant}`, fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
21
26
  !isDisabled &&
22
27
  isFocused &&
@@ -45,9 +50,14 @@ exports.Input = (0, react_1.forwardRef)(({ style, textVariant = types_1.TextVari
45
50
  }, [isDisabled, onFocus]);
46
51
  const resolvedStyle = [
47
52
  inputStyle,
53
+ // iOS-only workaround: when a placeholder is visible, native iOS
54
+ // TextInput can render placeholder text vertically offset.
55
+ // Keep this iOS-only because lineHeight: 0 can collapse text on Android.
56
+ react_native_1.Platform.OS === 'ios' &&
57
+ isPlaceholderVisible && { lineHeight: 0 },
48
58
  react_native_1.Platform.OS === 'ios' && { textAlignVertical: 'center' },
49
59
  style,
50
60
  ].filter(Boolean);
51
- return (<react_native_1.TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
61
+ return (<react_native_1.TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} placeholder={placeholder} value={value} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
52
62
  });
53
63
  //# sourceMappingURL=Input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;AAAA,8FAIuD;AACvD,oEAAyE;AACzE,iCAAmE;AACnE,wDAAmD;AAEnD,iDAAsD;AACtD,+DAGgC;AAInB,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CACE,EACE,KAAK,EACL,WAAW,GAAG,mBAAW,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,IAAA,gBAAQ,EAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,KAAK,GAAG,IAAA,qCAAQ,GAAE,CAAC;IAEzB,MAAM,oBAAoB,GAAG,IAAA,eAAO,EAClC,GAAG,EAAE,CACH,KAAK,KAAK,kCAAK,CAAC,KAAK;QACnB,CAAC,CAAC,0BAAU,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW;QACpC,CAAC,CAAC,yBAAS,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EACvC,CAAC,KAAK,CAAC,CACR,CAAC;IAEF,MAAM,eAAe,GAAG,4CAA2B,CAAC,WAAW,CAAC,CAAC;IACjE,MAAM,UAAU,G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,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-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n `text-${textVariant}`,\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n textVariant,\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const resolvedStyle = [\n inputStyle,\n Platform.OS === 'ios' && { textAlignVertical: 'center' as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
1
+ {"version":3,"file":"Input.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;AAAA,8FAIuD;AACvD,oEAAyE;AACzE,iCAAmE;AACnE,wDAAmD;AAEnD,iDAAsD;AACtD,+DAGgC;AAInB,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CACE,EACE,KAAK,EACL,WAAW,GAAG,mBAAW,CAAC,MAAM,EAChC,qBAAqB,EACrB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,WAAW,EACX,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,IAAA,gBAAQ,EAAC,SAAS,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';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n 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 `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 // 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 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 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,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;AAQtD,eAAO,MAAM,KAAK;;;;;;;6CAmHjB,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;AAQtD,eAAO,MAAM,KAAK;;;;;;;6CAmHjB,CAAC"}
@@ -4,7 +4,7 @@ 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
+ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadonly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
8
8
  const [isFocused, setIsFocused] = useState(autoFocus);
9
9
  const tw = useTailwind();
10
10
  const theme = useTheme();
@@ -14,6 +14,11 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
14
14
  const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];
15
15
  const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];
16
16
  const fontClass = `font-${FontFamily.Default}${fontSuffix}`;
17
+ const hasPlaceholder = placeholder !== undefined && placeholder !== null && placeholder !== '';
18
+ // Only apply placeholder-mode styling when a placeholder is present and
19
+ // the controlled value is empty. This keeps the iOS lineHeight workaround
20
+ // scoped to the placeholder-visible state without affecting typed text.
21
+ const isPlaceholderVisible = hasPlaceholder && value === '';
17
22
  const inputStyle = useMemo(() => tw.style(`text-${textVariant}`, fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
18
23
  !isDisabled &&
19
24
  isFocused &&
@@ -42,9 +47,14 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
42
47
  }, [isDisabled, onFocus]);
43
48
  const resolvedStyle = [
44
49
  inputStyle,
50
+ // iOS-only workaround: when a placeholder is visible, native iOS
51
+ // TextInput can render placeholder text vertically offset.
52
+ // Keep this iOS-only because lineHeight: 0 can collapse text on Android.
53
+ Platform.OS === 'ios' &&
54
+ isPlaceholderVisible && { lineHeight: 0 },
45
55
  Platform.OS === 'ios' && { textAlignVertical: 'center' },
46
56
  style,
47
57
  ].filter(Boolean);
48
- return (<TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
58
+ return (<TextInput ref={ref} placeholderTextColor={placeholderTextColor} {...props} placeholder={placeholder} value={value} style={resolvedStyle} editable={!isDisabled && !isReadonly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
49
59
  });
50
60
  //# 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,sDAAsD;AACvD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yCAAyC;AACzE,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,CAClC,GAAG,EAAE,CACH,KAAK,KAAK,KAAK,CAAC,KAAK;QACnB,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW;QACpC,CAAC,CAAC,SAAS,CAAC,M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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-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = MAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n `text-${textVariant}`,\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n textVariant,\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(false);\n onBlur?.(e);\n }\n },\n [isDisabled, onBlur],\n );\n\n /* istanbul ignore next: handler body covered by focus/blur tests */\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n if (!isDisabled) {\n setIsFocused(true);\n onFocus?.(e);\n }\n },\n [isDisabled, onFocus],\n );\n\n const resolvedStyle = [\n inputStyle,\n Platform.OS === 'ios' && { textAlignVertical: 'center' as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n placeholderTextColor={placeholderTextColor}\n {...props}\n style={resolvedStyle}\n editable={!isDisabled && !isReadonly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
1
+ {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACT,sDAAsD;AACvD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yCAAyC;AACzE,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,EA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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-previews/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask-previews/design-tokens';\nimport { forwardRef, useCallback, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport { FontFamily, TextVariant } from '../../types';\nimport {\n MAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadonly = false,\n 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 `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 // 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 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 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-previews/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,8FAA4E;AAC5E,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-previews/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-previews/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,sDAAsD;AAC5E,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-previews/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"]}