@metamask-previews/design-system-react-native 0.11.0-preview.fa05289 → 0.13.0-preview.8028c20

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 (419) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/dist/components/AvatarAccount/AvatarAccount.cjs +4 -3
  3. package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
  4. package/dist/components/AvatarAccount/AvatarAccount.constants.cjs +9 -1
  5. package/dist/components/AvatarAccount/AvatarAccount.constants.cjs.map +1 -1
  6. package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts +2 -0
  7. package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts.map +1 -1
  8. package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts +2 -0
  9. package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts.map +1 -1
  10. package/dist/components/AvatarAccount/AvatarAccount.constants.mjs +8 -0
  11. package/dist/components/AvatarAccount/AvatarAccount.constants.mjs.map +1 -1
  12. package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
  13. package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
  14. package/dist/components/AvatarAccount/AvatarAccount.mjs +4 -3
  15. package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
  16. package/dist/components/AvatarBase/AvatarBase.cjs +3 -3
  17. package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
  18. package/dist/components/AvatarBase/AvatarBase.constants.cjs +21 -21
  19. package/dist/components/AvatarBase/AvatarBase.constants.cjs.map +1 -1
  20. package/dist/components/AvatarBase/AvatarBase.constants.d.cts +1 -1
  21. package/dist/components/AvatarBase/AvatarBase.constants.d.cts.map +1 -1
  22. package/dist/components/AvatarBase/AvatarBase.constants.d.mts +1 -1
  23. package/dist/components/AvatarBase/AvatarBase.constants.d.mts.map +1 -1
  24. package/dist/components/AvatarBase/AvatarBase.constants.mjs +1 -1
  25. package/dist/components/AvatarBase/AvatarBase.constants.mjs.map +1 -1
  26. package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
  27. package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
  28. package/dist/components/AvatarBase/AvatarBase.mjs +1 -1
  29. package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
  30. package/dist/components/AvatarBase/AvatarBase.types.cjs.map +1 -1
  31. package/dist/components/AvatarBase/AvatarBase.types.d.cts +3 -39
  32. package/dist/components/AvatarBase/AvatarBase.types.d.cts.map +1 -1
  33. package/dist/components/AvatarBase/AvatarBase.types.d.mts +3 -39
  34. package/dist/components/AvatarBase/AvatarBase.types.d.mts.map +1 -1
  35. package/dist/components/AvatarBase/AvatarBase.types.mjs.map +1 -1
  36. package/dist/components/AvatarBase/index.cjs +3 -3
  37. package/dist/components/AvatarBase/index.cjs.map +1 -1
  38. package/dist/components/AvatarBase/index.d.cts +1 -1
  39. package/dist/components/AvatarBase/index.d.cts.map +1 -1
  40. package/dist/components/AvatarBase/index.d.mts +1 -1
  41. package/dist/components/AvatarBase/index.d.mts.map +1 -1
  42. package/dist/components/AvatarBase/index.mjs +1 -1
  43. package/dist/components/AvatarBase/index.mjs.map +1 -1
  44. package/dist/components/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -1
  45. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts +7 -9
  46. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -1
  47. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts +7 -9
  48. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -1
  49. package/dist/components/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -1
  50. package/dist/components/BadgeWrapper/BadgeWrapper.cjs +8 -8
  51. package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
  52. package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
  53. package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
  54. package/dist/components/BadgeWrapper/BadgeWrapper.mjs +1 -1
  55. package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
  56. package/dist/components/BadgeWrapper/BadgeWrapper.types.cjs.map +1 -1
  57. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts +4 -51
  58. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts.map +1 -1
  59. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts +4 -51
  60. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts.map +1 -1
  61. package/dist/components/BadgeWrapper/BadgeWrapper.types.mjs.map +1 -1
  62. package/dist/components/BadgeWrapper/index.cjs +3 -3
  63. package/dist/components/BadgeWrapper/index.cjs.map +1 -1
  64. package/dist/components/BadgeWrapper/index.d.cts +1 -2
  65. package/dist/components/BadgeWrapper/index.d.cts.map +1 -1
  66. package/dist/components/BadgeWrapper/index.d.mts +1 -2
  67. package/dist/components/BadgeWrapper/index.d.mts.map +1 -1
  68. package/dist/components/BadgeWrapper/index.mjs +1 -1
  69. package/dist/components/BadgeWrapper/index.mjs.map +1 -1
  70. package/dist/components/BottomSheet/BottomSheet.cjs +7 -10
  71. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  72. package/dist/components/BottomSheet/BottomSheet.d.cts +31 -2
  73. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
  74. package/dist/components/BottomSheet/BottomSheet.d.mts +31 -2
  75. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
  76. package/dist/components/BottomSheet/BottomSheet.mjs +6 -6
  77. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
  78. package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -1
  79. package/dist/components/BottomSheet/BottomSheet.types.d.cts +3 -8
  80. package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -1
  81. package/dist/components/BottomSheet/BottomSheet.types.d.mts +3 -8
  82. package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -1
  83. package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -1
  84. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +3 -3
  85. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  86. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +31 -2
  87. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
  88. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +31 -2
  89. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
  90. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +2 -3
  91. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  92. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -1
  93. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +7 -0
  94. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -1
  95. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +7 -0
  96. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -1
  97. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -1
  98. package/dist/components/BottomSheetDialog/index.cjs +2 -5
  99. package/dist/components/BottomSheetDialog/index.cjs.map +1 -1
  100. package/dist/components/BottomSheetDialog/index.d.cts +1 -1
  101. package/dist/components/BottomSheetDialog/index.d.cts.map +1 -1
  102. package/dist/components/BottomSheetDialog/index.d.mts +1 -1
  103. package/dist/components/BottomSheetDialog/index.d.mts.map +1 -1
  104. package/dist/components/BottomSheetDialog/index.mjs +1 -1
  105. package/dist/components/BottomSheetDialog/index.mjs.map +1 -1
  106. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +2 -2
  107. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
  108. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +2 -2
  109. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
  110. package/dist/components/BoxHorizontal/BoxHorizontal.cjs +18 -0
  111. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +1 -0
  112. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +7 -0
  113. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +1 -0
  114. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +7 -0
  115. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +1 -0
  116. package/dist/components/BoxHorizontal/BoxHorizontal.mjs +18 -0
  117. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +1 -0
  118. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs +3 -0
  119. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +1 -0
  120. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +13 -0
  121. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +1 -0
  122. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +13 -0
  123. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +1 -0
  124. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +2 -0
  125. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +1 -0
  126. package/dist/components/BoxHorizontal/index.cjs +6 -0
  127. package/dist/components/BoxHorizontal/index.cjs.map +1 -0
  128. package/dist/components/BoxHorizontal/index.d.cts +3 -0
  129. package/dist/components/BoxHorizontal/index.d.cts.map +1 -0
  130. package/dist/components/BoxHorizontal/index.d.mts +3 -0
  131. package/dist/components/BoxHorizontal/index.d.mts.map +1 -0
  132. package/dist/components/BoxHorizontal/index.mjs +2 -0
  133. package/dist/components/BoxHorizontal/index.mjs.map +1 -0
  134. package/dist/components/BoxVertical/BoxVertical.cjs +18 -0
  135. package/dist/components/BoxVertical/BoxVertical.cjs.map +1 -0
  136. package/dist/components/BoxVertical/BoxVertical.d.cts +7 -0
  137. package/dist/components/BoxVertical/BoxVertical.d.cts.map +1 -0
  138. package/dist/components/BoxVertical/BoxVertical.d.mts +7 -0
  139. package/dist/components/BoxVertical/BoxVertical.d.mts.map +1 -0
  140. package/dist/components/BoxVertical/BoxVertical.mjs +18 -0
  141. package/dist/components/BoxVertical/BoxVertical.mjs.map +1 -0
  142. package/dist/components/BoxVertical/BoxVertical.types.cjs +3 -0
  143. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +1 -0
  144. package/dist/components/BoxVertical/BoxVertical.types.d.cts +13 -0
  145. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +1 -0
  146. package/dist/components/BoxVertical/BoxVertical.types.d.mts +13 -0
  147. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +1 -0
  148. package/dist/components/BoxVertical/BoxVertical.types.mjs +2 -0
  149. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +1 -0
  150. package/dist/components/BoxVertical/index.cjs +6 -0
  151. package/dist/components/BoxVertical/index.cjs.map +1 -0
  152. package/dist/components/BoxVertical/index.d.cts +3 -0
  153. package/dist/components/BoxVertical/index.d.cts.map +1 -0
  154. package/dist/components/BoxVertical/index.d.mts +3 -0
  155. package/dist/components/BoxVertical/index.d.mts.map +1 -0
  156. package/dist/components/BoxVertical/index.mjs +2 -0
  157. package/dist/components/BoxVertical/index.mjs.map +1 -0
  158. package/dist/components/HeaderRoot/HeaderRoot.cjs +61 -0
  159. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -0
  160. package/dist/components/HeaderRoot/HeaderRoot.d.cts +7 -0
  161. package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -0
  162. package/dist/components/HeaderRoot/HeaderRoot.d.mts +7 -0
  163. package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -0
  164. package/dist/components/HeaderRoot/HeaderRoot.mjs +61 -0
  165. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -0
  166. package/dist/components/HeaderRoot/HeaderRoot.types.cjs +3 -0
  167. package/dist/components/HeaderRoot/HeaderRoot.types.cjs.map +1 -0
  168. package/dist/components/HeaderRoot/HeaderRoot.types.d.cts +60 -0
  169. package/dist/components/HeaderRoot/HeaderRoot.types.d.cts.map +1 -0
  170. package/dist/components/HeaderRoot/HeaderRoot.types.d.mts +60 -0
  171. package/dist/components/HeaderRoot/HeaderRoot.types.d.mts.map +1 -0
  172. package/dist/components/HeaderRoot/HeaderRoot.types.mjs +2 -0
  173. package/dist/components/HeaderRoot/HeaderRoot.types.mjs.map +1 -0
  174. package/dist/components/HeaderRoot/index.cjs +6 -0
  175. package/dist/components/HeaderRoot/index.cjs.map +1 -0
  176. package/dist/components/HeaderRoot/index.d.cts +3 -0
  177. package/dist/components/HeaderRoot/index.d.cts.map +1 -0
  178. package/dist/components/HeaderRoot/index.d.mts +3 -0
  179. package/dist/components/HeaderRoot/index.d.mts.map +1 -0
  180. package/dist/components/HeaderRoot/index.mjs +2 -0
  181. package/dist/components/HeaderRoot/index.mjs.map +1 -0
  182. package/dist/components/HeaderStandard/HeaderStandard.cjs +101 -0
  183. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -0
  184. package/dist/components/HeaderStandard/HeaderStandard.d.cts +4 -0
  185. package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -0
  186. package/dist/components/HeaderStandard/HeaderStandard.d.mts +4 -0
  187. package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -0
  188. package/dist/components/HeaderStandard/HeaderStandard.mjs +81 -0
  189. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -0
  190. package/dist/components/HeaderStandard/HeaderStandard.types.cjs +8 -0
  191. package/dist/components/HeaderStandard/HeaderStandard.types.cjs.map +1 -0
  192. package/dist/components/HeaderStandard/HeaderStandard.types.d.cts +55 -0
  193. package/dist/components/HeaderStandard/HeaderStandard.types.d.cts.map +1 -0
  194. package/dist/components/HeaderStandard/HeaderStandard.types.d.mts +55 -0
  195. package/dist/components/HeaderStandard/HeaderStandard.types.d.mts.map +1 -0
  196. package/dist/components/HeaderStandard/HeaderStandard.types.mjs +10 -0
  197. package/dist/components/HeaderStandard/HeaderStandard.types.mjs.map +1 -0
  198. package/dist/components/HeaderStandard/index.cjs +6 -0
  199. package/dist/components/HeaderStandard/index.cjs.map +1 -0
  200. package/dist/components/HeaderStandard/index.d.cts +3 -0
  201. package/dist/components/HeaderStandard/index.d.cts.map +1 -0
  202. package/dist/components/HeaderStandard/index.d.mts +3 -0
  203. package/dist/components/HeaderStandard/index.d.mts.map +1 -0
  204. package/dist/components/HeaderStandard/index.mjs +2 -0
  205. package/dist/components/HeaderStandard/index.mjs.map +1 -0
  206. package/dist/components/Icon/assets/candlestick.svg +1 -1
  207. package/dist/components/Input/Input.cjs +4 -3
  208. package/dist/components/Input/Input.cjs.map +1 -1
  209. package/dist/components/Input/Input.constants.cjs +69 -0
  210. package/dist/components/Input/Input.constants.cjs.map +1 -0
  211. package/dist/components/Input/Input.constants.d.cts +11 -0
  212. package/dist/components/Input/Input.constants.d.cts.map +1 -0
  213. package/dist/components/Input/Input.constants.d.mts +11 -0
  214. package/dist/components/Input/Input.constants.d.mts.map +1 -0
  215. package/dist/components/Input/Input.constants.mjs +66 -0
  216. package/dist/components/Input/Input.constants.mjs.map +1 -0
  217. package/dist/components/Input/Input.d.cts.map +1 -1
  218. package/dist/components/Input/Input.d.mts.map +1 -1
  219. package/dist/components/Input/Input.mjs +4 -3
  220. package/dist/components/Input/Input.mjs.map +1 -1
  221. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +34 -0
  222. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
  223. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +13 -0
  224. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
  225. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +13 -0
  226. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
  227. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +34 -0
  228. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
  229. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +40 -0
  230. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
  231. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +24 -0
  232. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
  233. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +24 -0
  234. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
  235. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +40 -0
  236. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
  237. package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
  238. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
  239. package/dist/components/KeyValueRow/KeyValueRow.d.cts +24 -0
  240. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
  241. package/dist/components/KeyValueRow/KeyValueRow.d.mts +24 -0
  242. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
  243. package/dist/components/KeyValueRow/KeyValueRow.mjs +76 -0
  244. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
  245. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
  246. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
  247. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
  248. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
  249. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
  250. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
  251. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
  252. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
  253. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
  254. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
  255. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
  256. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
  257. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
  258. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
  259. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
  260. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
  261. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +30 -0
  262. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
  263. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +16 -0
  264. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
  265. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +16 -0
  266. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
  267. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +30 -0
  268. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
  269. package/dist/components/KeyValueRow/index.cjs +12 -0
  270. package/dist/components/KeyValueRow/index.cjs.map +1 -0
  271. package/dist/components/KeyValueRow/index.d.cts +3 -0
  272. package/dist/components/KeyValueRow/index.d.cts.map +1 -0
  273. package/dist/components/KeyValueRow/index.d.mts +3 -0
  274. package/dist/components/KeyValueRow/index.d.mts.map +1 -0
  275. package/dist/components/KeyValueRow/index.mjs +3 -0
  276. package/dist/components/KeyValueRow/index.mjs.map +1 -0
  277. package/dist/components/Skeleton/Skeleton.cjs +2 -1
  278. package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
  279. package/dist/components/Skeleton/Skeleton.d.cts +1 -2
  280. package/dist/components/Skeleton/Skeleton.d.cts.map +1 -1
  281. package/dist/components/Skeleton/Skeleton.d.mts +1 -2
  282. package/dist/components/Skeleton/Skeleton.d.mts.map +1 -1
  283. package/dist/components/Skeleton/Skeleton.mjs +1 -2
  284. package/dist/components/Skeleton/Skeleton.mjs.map +1 -1
  285. package/dist/components/Skeleton/index.cjs +1 -4
  286. package/dist/components/Skeleton/index.cjs.map +1 -1
  287. package/dist/components/Skeleton/index.d.cts +1 -1
  288. package/dist/components/Skeleton/index.d.cts.map +1 -1
  289. package/dist/components/Skeleton/index.d.mts +1 -1
  290. package/dist/components/Skeleton/index.d.mts.map +1 -1
  291. package/dist/components/Skeleton/index.mjs +1 -1
  292. package/dist/components/Skeleton/index.mjs.map +1 -1
  293. package/dist/components/Text/Text.types.cjs.map +1 -1
  294. package/dist/components/Text/Text.types.d.cts +1 -1
  295. package/dist/components/Text/Text.types.d.mts +1 -1
  296. package/dist/components/Text/Text.types.mjs.map +1 -1
  297. package/dist/components/TextButton/TextButton.cjs +12 -36
  298. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  299. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  300. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  301. package/dist/components/TextButton/TextButton.mjs +14 -38
  302. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  303. package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
  304. package/dist/components/TextButton/TextButton.types.d.cts +8 -60
  305. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  306. package/dist/components/TextButton/TextButton.types.d.mts +8 -60
  307. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  308. package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
  309. package/dist/components/TextButton/index.cjs +1 -3
  310. package/dist/components/TextButton/index.cjs.map +1 -1
  311. package/dist/components/TextButton/index.d.cts +0 -1
  312. package/dist/components/TextButton/index.d.cts.map +1 -1
  313. package/dist/components/TextButton/index.d.mts +0 -1
  314. package/dist/components/TextButton/index.d.mts.map +1 -1
  315. package/dist/components/TextButton/index.mjs +0 -1
  316. package/dist/components/TextButton/index.mjs.map +1 -1
  317. package/dist/components/TextField/TextField.cjs +22 -8
  318. package/dist/components/TextField/TextField.cjs.map +1 -1
  319. package/dist/components/TextField/TextField.d.cts +0 -2
  320. package/dist/components/TextField/TextField.d.cts.map +1 -1
  321. package/dist/components/TextField/TextField.d.mts +0 -2
  322. package/dist/components/TextField/TextField.d.mts.map +1 -1
  323. package/dist/components/TextField/TextField.mjs +22 -8
  324. package/dist/components/TextField/TextField.mjs.map +1 -1
  325. package/dist/components/TextField/TextField.types.cjs +0 -10
  326. package/dist/components/TextField/TextField.types.cjs.map +1 -1
  327. package/dist/components/TextField/TextField.types.d.cts +0 -14
  328. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  329. package/dist/components/TextField/TextField.types.d.mts +0 -14
  330. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  331. package/dist/components/TextField/TextField.types.mjs +1 -9
  332. package/dist/components/TextField/TextField.types.mjs.map +1 -1
  333. package/dist/components/TextField/index.cjs +1 -3
  334. package/dist/components/TextField/index.cjs.map +1 -1
  335. package/dist/components/TextField/index.d.cts +0 -1
  336. package/dist/components/TextField/index.d.cts.map +1 -1
  337. package/dist/components/TextField/index.d.mts +0 -1
  338. package/dist/components/TextField/index.d.mts.map +1 -1
  339. package/dist/components/TextField/index.mjs +0 -1
  340. package/dist/components/TextField/index.mjs.map +1 -1
  341. package/dist/components/TextFieldSearch/TextFieldSearch.cjs +45 -0
  342. package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -0
  343. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +14 -0
  344. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -0
  345. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +14 -0
  346. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -0
  347. package/dist/components/TextFieldSearch/TextFieldSearch.mjs +26 -0
  348. package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -0
  349. package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs +3 -0
  350. package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -0
  351. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +17 -0
  352. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -0
  353. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +17 -0
  354. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -0
  355. package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs +2 -0
  356. package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -0
  357. package/dist/components/TextFieldSearch/index.cjs +6 -0
  358. package/dist/components/TextFieldSearch/index.cjs.map +1 -0
  359. package/dist/components/TextFieldSearch/index.d.cts +3 -0
  360. package/dist/components/TextFieldSearch/index.d.cts.map +1 -0
  361. package/dist/components/TextFieldSearch/index.d.mts +3 -0
  362. package/dist/components/TextFieldSearch/index.d.mts.map +1 -0
  363. package/dist/components/TextFieldSearch/index.mjs +2 -0
  364. package/dist/components/TextFieldSearch/index.mjs.map +1 -0
  365. package/dist/components/Toast/Toast.cjs +2 -2
  366. package/dist/components/Toast/Toast.cjs.map +1 -1
  367. package/dist/components/Toast/Toast.d.cts +1 -2
  368. package/dist/components/Toast/Toast.d.cts.map +1 -1
  369. package/dist/components/Toast/Toast.d.mts +1 -2
  370. package/dist/components/Toast/Toast.d.mts.map +1 -1
  371. package/dist/components/Toast/Toast.mjs +1 -2
  372. package/dist/components/Toast/Toast.mjs.map +1 -1
  373. package/dist/components/Toast/index.cjs +1 -4
  374. package/dist/components/Toast/index.cjs.map +1 -1
  375. package/dist/components/Toast/index.d.cts +1 -1
  376. package/dist/components/Toast/index.d.cts.map +1 -1
  377. package/dist/components/Toast/index.d.mts +1 -1
  378. package/dist/components/Toast/index.d.mts.map +1 -1
  379. package/dist/components/Toast/index.mjs +1 -1
  380. package/dist/components/Toast/index.mjs.map +1 -1
  381. package/dist/components/index.cjs +14 -8
  382. package/dist/components/index.cjs.map +1 -1
  383. package/dist/components/index.d.cts +13 -3
  384. package/dist/components/index.d.cts.map +1 -1
  385. package/dist/components/index.d.mts +13 -3
  386. package/dist/components/index.d.mts.map +1 -1
  387. package/dist/components/index.mjs +8 -3
  388. package/dist/components/index.mjs.map +1 -1
  389. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
  390. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +2 -5
  391. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts.map +1 -1
  392. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +2 -5
  393. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts.map +1 -1
  394. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
  395. package/dist/types/index.cjs +20 -71
  396. package/dist/types/index.cjs.map +1 -1
  397. package/dist/types/index.d.cts +10 -82
  398. package/dist/types/index.d.cts.map +1 -1
  399. package/dist/types/index.d.mts +10 -82
  400. package/dist/types/index.d.mts.map +1 -1
  401. package/dist/types/index.mjs +10 -78
  402. package/dist/types/index.mjs.map +1 -1
  403. package/package.json +7 -8
  404. package/dist/components/TextButton/TextButton.constants.cjs +0 -12
  405. package/dist/components/TextButton/TextButton.constants.cjs.map +0 -1
  406. package/dist/components/TextButton/TextButton.constants.d.cts +0 -4
  407. package/dist/components/TextButton/TextButton.constants.d.cts.map +0 -1
  408. package/dist/components/TextButton/TextButton.constants.d.mts +0 -4
  409. package/dist/components/TextButton/TextButton.constants.d.mts.map +0 -1
  410. package/dist/components/TextButton/TextButton.constants.mjs +0 -9
  411. package/dist/components/TextButton/TextButton.constants.mjs.map +0 -1
  412. package/dist/components/TextField/TextField.constants.cjs +0 -13
  413. package/dist/components/TextField/TextField.constants.cjs.map +0 -1
  414. package/dist/components/TextField/TextField.constants.d.cts +0 -6
  415. package/dist/components/TextField/TextField.constants.d.cts.map +0 -1
  416. package/dist/components/TextField/TextField.constants.d.mts +0 -6
  417. package/dist/components/TextField/TextField.constants.d.mts.map +0 -1
  418. package/dist/components/TextField/TextField.constants.mjs +0 -10
  419. package/dist/components/TextField/TextField.constants.mjs.map +0 -1
@@ -0,0 +1,3 @@
1
+ export { KeyValueRow, KeyValueRowStubs } from "./KeyValueRow.mjs";
2
+ export { KeyValueRowSectionAlignments, KeyValueRowFieldIconSides, TooltipSizes, IconSizes } from "./KeyValueRow.types.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,0BAAsB;AAC9D,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,YAAY,EACZ,SAAS,EAQV,gCAA4B","sourcesContent":["export { KeyValueRow, KeyValueRowStubs } from './KeyValueRow';\nexport {\n KeyValueRowSectionAlignments,\n KeyValueRowFieldIconSides,\n TooltipSizes,\n IconSizes,\n type KeyValueRowTooltip,\n type KeyValueRowField,\n type PreDefinedKeyValueRowLabel,\n type KeyValueRowLabelProps,\n type KeyValueRowRootProps,\n type KeyValueSectionProps,\n type KeyValueRowProps,\n} from './KeyValueRow.types';\n"]}
@@ -23,6 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Skeleton = void 0;
26
27
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
27
28
  const react_1 = __importStar(require("react"));
28
29
  const react_native_1 = require("react-native/index.js");
@@ -82,5 +83,5 @@ const Skeleton = ({ height, width, children, hideChildren = false, style, childr
82
83
  </react_native_1.View>)}
83
84
  </react_native_1.View>);
84
85
  };
85
- exports.default = Skeleton;
86
+ exports.Skeleton = Skeleton;
86
87
  //# sourceMappingURL=Skeleton.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAiD;AACjD,wDAA8C;AAI9C,MAAM,QAAQ,GAA4B,CAAC,EACzC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,CAAC;IAEhE,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,uBAAQ,CAAC,QAAQ,CAAC;YAChB,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;YACF,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;SACH,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,2EAA2E;YAC3E,IAAI,QAAQ,EAAE;gBACZ,cA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,CACR,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>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ent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nexport const Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n"]}
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
2
  import type { SkeletonProps } from "./Skeleton.types.cjs";
3
- declare const Skeleton: React.FC<SkeletonProps>;
4
- export default Skeleton;
3
+ export declare const Skeleton: React.FC<SkeletonProps>;
5
4
  //# sourceMappingURL=Skeleton.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Skeleton.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwF5C,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import React from "react";
2
2
  import type { SkeletonProps } from "./Skeleton.types.mjs";
3
- declare const Skeleton: React.FC<SkeletonProps>;
4
- export default Skeleton;
3
+ export declare const Skeleton: React.FC<SkeletonProps>;
5
4
  //# sourceMappingURL=Skeleton.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"Skeleton.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwF5C,CAAC"}
@@ -8,7 +8,7 @@ import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
8
  import $React, { useEffect, useRef } from "react";
9
9
  const React = $importDefault($React);
10
10
  import { Animated, View } from "react-native/index.js";
11
- const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
11
+ export const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
12
12
  const tw = useTailwind();
13
13
  const opacityAnim = useRef(new Animated.Value(0.2)).current;
14
14
  const hasChildren = children !== null && children !== undefined;
@@ -64,5 +64,4 @@ const Skeleton = ({ height, width, children, hideChildren = false, style, childr
64
64
  </View>)}
65
65
  </View>);
66
66
  };
67
- export default Skeleton;
68
67
  //# sourceMappingURL=Skeleton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Skeleton.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,8BAAqB;AAI9C,MAAM,QAAQ,GAA4B,CAAC,EACzC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,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KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CAAC,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,IAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n\nexport default Skeleton;\n"]}
1
+ {"version":3,"file":"Skeleton.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AACjD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,8BAAqB;AAI9C,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAA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,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,IAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nexport const Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n"]}
@@ -1,9 +1,6 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.Skeleton = void 0;
7
4
  var Skeleton_1 = require("./Skeleton.cjs");
8
- Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return __importDefault(Skeleton_1).default; } });
5
+ Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return Skeleton_1.Skeleton; } });
9
6
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAiD;AAAxC,qHAAA,OAAO,OAAY","sourcesContent":["export { default as Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":";;;AAAA,2CAAsC;AAA7B,oGAAA,QAAQ,OAAA","sourcesContent":["export { Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
@@ -1,3 +1,3 @@
1
- export { default as Skeleton } from "./Skeleton.cjs";
1
+ export { Skeleton } from "./Skeleton.cjs";
2
2
  export type { SkeletonProps } from "./Skeleton.types.cjs";
3
3
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB;AACjD,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
@@ -1,3 +1,3 @@
1
- export { default as Skeleton } from "./Skeleton.mjs";
1
+ export { Skeleton } from "./Skeleton.mjs";
2
2
  export type { SkeletonProps } from "./Skeleton.types.mjs";
3
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB;AACjD,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB;AACtC,YAAY,EAAE,aAAa,EAAE,6BAAyB"}
@@ -1,2 +1,2 @@
1
- export { default as Skeleton } from "./Skeleton.mjs";
1
+ export { Skeleton } from "./Skeleton.mjs";
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB","sourcesContent":["export { default as Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,uBAAmB","sourcesContent":["export { Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
1
+ {"version":3,"file":"Text.types.cjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
@@ -22,7 +22,7 @@ export type TextProps = {
22
22
  * Optional prop to control the font weight of the text.
23
23
  * Normal: 400
24
24
  * Medium: 500
25
- * Bold: 700
25
+ * Bold: 600
26
26
  */
27
27
  fontWeight?: FontWeight;
28
28
  /**
@@ -22,7 +22,7 @@ export type TextProps = {
22
22
  * Optional prop to control the font weight of the text.
23
23
  * Normal: 400
24
24
  * Medium: 500
25
- * Bold: 700
25
+ * Bold: 600
26
26
  */
27
27
  fontWeight?: FontWeight;
28
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 700\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
1
+ {"version":3,"file":"Text.types.mjs","sourceRoot":"","sources":["../../../src/components/Text/Text.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TextProps as RNTextProps } from 'react-native';\n\nimport type {\n TextVariant,\n TextColor,\n FontWeight,\n FontFamily,\n FontStyle,\n} from '../../types';\n\n/**\n * Text component props.\n */\nexport type TextProps = {\n /**\n * Optional enum to select between Typography variants.\n *\n * @default BodyMD\n */\n variant?: TextVariant;\n /**\n * Text to be displayed.\n */\n children: React.ReactNode;\n /**\n * Optional prop to add color to text.\n */\n color?: TextColor;\n /**\n * Optional prop to control the font weight of the text.\n * Normal: 400\n * Medium: 500\n * Bold: 600\n */\n fontWeight?: FontWeight;\n /**\n * Optional prop to adjust the font family.\n * Default: Geist\n * Accent: MM Sans\n * Hero: MM Poly\n */\n fontFamily?: FontFamily;\n /**\n * Optional prop to adjust the style of the font.\n */\n fontStyle?: FontStyle;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n} & RNTextProps;\n"]}
@@ -24,45 +24,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.TextButton = void 0;
27
- const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
28
27
  const react_1 = __importStar(require("react"));
29
- const react_native_1 = require("react-native/index.js");
30
28
  const types_1 = require("../../types/index.cjs");
31
- const Icon_1 = require("../Icon/index.cjs");
32
29
  const Text_1 = require("../Text/index.cjs");
33
- const TextButton_constants_1 = require("./TextButton.constants.cjs");
34
- const TextButton = ({ children, size = types_1.TextButtonSize.BodyMd, textProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled = false, isInverse = false, twClassName = '', accessibilityRole, accessibilityLabel, style, ...props }) => {
35
- const tw = (0, design_system_twrnc_preset_1.useTailwind)();
36
- /**
37
- * Calculating the baselineOffset. This baselineOffset is needed to make sure
38
- * the TextButton aligns perfectly when placed within Text elements
39
- */
40
- // eslint-disable-next-line tailwindcss/no-custom-classname
41
- const { fontSize, lineHeight } = tw `text-${TextButton_constants_1.MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]}`;
42
- const baselineOffset = (lineHeight - fontSize) / 2;
43
- const getTextColor = (0, react_1.useCallback)((pressed) => {
44
- if (isInverse) {
45
- return 'text-primary-inverse';
46
- }
47
- return pressed ? 'text-primary-default-pressed' : 'text-primary-default';
48
- }, [isInverse]);
49
- const getTextDecoration = (0, react_1.useCallback)((pressed) => isInverse || pressed ? 'underline' : 'no-underline', [isInverse]);
50
- return (<Text_1.Text>
51
- <react_native_1.Pressable accessibilityRole={accessibilityRole ?? 'button'} accessibilityLabel={accessibilityLabel} disabled={isDisabled} style={({ pressed }) => [
52
- { transform: [{ translateY: baselineOffset }] },
53
- tw `flex-row items-center ${pressed ? 'bg-pressed' : 'bg-transparent'} ${isDisabled ? 'opacity-50' : 'opacity-100'} ${twClassName}`,
54
- style,
55
- ]} {...props}>
56
- {({ pressed }) => (<>
57
- {startIconName ? (<Icon_1.Icon name={startIconName} size={Icon_1.IconSize.Sm} testID="start-icon" twClassName={`${getTextColor(pressed)} mr-1`} {...startIconProps}/>) : (startAccessory)}
58
-
59
- <Text_1.Text variant={TextButton_constants_1.MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]} fontWeight={Text_1.FontWeight.Medium} {...textProps} twClassName={` ${getTextColor(pressed)} ${getTextDecoration(pressed)} ${textProps?.twClassName ?? ''} `}>
60
- {children}
61
- </Text_1.Text>
62
-
63
- {endIconName ? (<Icon_1.Icon name={endIconName} size={Icon_1.IconSize.Sm} testID="end-icon" twClassName={`${getTextColor(pressed)} ml-1`} {...endIconProps}/>) : (endAccessory)}
64
- </>)}
65
- </react_native_1.Pressable>
30
+ const TextButton = ({ children, variant = types_1.TextVariant.BodyMd, fontWeight = Text_1.FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
31
+ const [pressed, setPressed] = (0, react_1.useState)(false);
32
+ const handlePressIn = (e) => {
33
+ setPressed(true);
34
+ onPressIn?.(e);
35
+ };
36
+ const handlePressOut = (e) => {
37
+ setPressed(false);
38
+ onPressOut?.(e);
39
+ };
40
+ return (<Text_1.Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? types_1.TextColor.PrimaryDefaultPressed : types_1.TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
41
+ {children}
66
42
  </Text_1.Text>);
67
43
  };
68
44
  exports.TextButton = TextButton;
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAA2C;AAC3C,wDAAyC;AAEzC,iDAA6C;AAC7C,4CAAyC;AACzC,4CAA2C;AAE3C,qEAAyE;AAGlE,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,IAAI,GAAG,sBAAc,CAAC,MAAM,EAC5B,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB;;;OAGG;IACH,2DAA2D;IAC3D,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAA,QACjC,sDAA+B,CAAC,IAAI,CACtC,EAGC,CAAC;IACF,MAA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AC,CAClB,MAAM,CAAC,YAAY,CACnB,WAAW,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAC7C,IAAI,cAAc,CAAC,EACnB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CAED;;YAAA,CAAC,WAAI,CACH,OAAO,CAAC,CAAC,sDAA+B,CAAC,IAAI,CAAC,CAAC,CAC/C,UAAU,CAAC,CAAC,iBAAU,CAAC,MAAM,CAAC,CAC9B,IAAI,SAAS,CAAC,CACd,WAAW,CAAC,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,SAAS,EAAE,WAAW,IAAI,EAAE,GAAG,CAAC,CAExG;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,WAAI,CAEN;;YAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,WAAW,CAAC,CAClB,IAAI,CAAC,CAAC,eAAQ,CAAC,EAAE,CAAC,CAClB,MAAM,CAAC,UAAU,CACjB,WAAW,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAC7C,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACH;UAAA,GAAG,CACJ,CACH;MAAA,EAAE,wBAAS,CACb;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AApGW,QAAA,UAAU,cAoGrB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useCallback } from 'react';\nimport { Pressable } from 'react-native';\n\nimport { TextButtonSize } from '../../types';\nimport { Icon, IconSize } from '../Icon';\nimport { Text, FontWeight } from '../Text';\n\nimport { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from './TextButton.constants';\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n size = TextButtonSize.BodyMd,\n textProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled = false,\n isInverse = false,\n twClassName = '',\n accessibilityRole,\n accessibilityLabel,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n /**\n * Calculating the baselineOffset. This baselineOffset is needed to make sure\n * the TextButton aligns perfectly when placed within Text elements\n */\n // eslint-disable-next-line tailwindcss/no-custom-classname\n const { fontSize, lineHeight } = tw`text-${\n MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size] as string\n }` as {\n fontSize: number;\n lineHeight: number;\n };\n const baselineOffset = (lineHeight - fontSize) / 2;\n\n const getTextColor = useCallback(\n (pressed: boolean): string => {\n if (isInverse) {\n return 'text-primary-inverse';\n }\n return pressed ? 'text-primary-default-pressed' : 'text-primary-default';\n },\n [isInverse],\n );\n\n const getTextDecoration = useCallback(\n (pressed: boolean): string =>\n isInverse || pressed ? 'underline' : 'no-underline',\n [isInverse],\n );\n\n return (\n <Text>\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n accessibilityLabel={accessibilityLabel}\n disabled={isDisabled}\n style={({ pressed }) => [\n { transform: [{ translateY: baselineOffset }] },\n tw`flex-row items-center ${pressed ? 'bg-pressed' : 'bg-transparent'} ${isDisabled ? 'opacity-50' : 'opacity-100'} ${twClassName}`,\n style,\n ]}\n {...props}\n >\n {({ pressed }) => (\n <>\n {startIconName ? (\n <Icon\n name={startIconName}\n size={IconSize.Sm}\n testID=\"start-icon\"\n twClassName={`${getTextColor(pressed)} mr-1`}\n {...startIconProps}\n />\n ) : (\n startAccessory\n )}\n\n <Text\n variant={MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]}\n fontWeight={FontWeight.Medium}\n {...textProps}\n twClassName={` ${getTextColor(pressed)} ${getTextDecoration(pressed)} ${textProps?.twClassName ?? ''} `}\n >\n {children}\n </Text>\n\n {endIconName ? (\n <Icon\n name={endIconName}\n size={IconSize.Sm}\n testID=\"end-icon\"\n twClassName={`${getTextColor(pressed)} ml-1`}\n {...endIconProps}\n />\n ) : (\n endAccessory\n )}\n </>\n )}\n </Pressable>\n </Text>\n );\n};\n"]}
1
+ {"version":3,"file":"TextButton.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAExC,iDAAqD;AACrD,4CAA2C;AAIpC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,mBAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,iBAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,WAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,iBAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,iBAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,WAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,UAAU,cA0CrB","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,cAAc;AAQ3C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoGhD,CAAC"}
1
+ {"version":3,"file":"TextButton.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsB,cAAc;AAQ3C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoGhD,CAAC"}
1
+ {"version":3,"file":"TextButton.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAKxC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA0ChD,CAAC"}
@@ -4,46 +4,22 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
- import $React, { useCallback } from "react";
7
+ import $React, { useState } from "react";
9
8
  const React = $importDefault($React);
10
- import { Pressable } from "react-native/index.js";
11
- import { TextButtonSize } from "../../types/index.mjs";
12
- import { Icon, IconSize } from "../Icon/index.mjs";
9
+ import { TextVariant, TextColor } from "../../types/index.mjs";
13
10
  import { Text, FontWeight } from "../Text/index.mjs";
14
- import { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from "./TextButton.constants.mjs";
15
- export const TextButton = ({ children, size = TextButtonSize.BodyMd, textProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled = false, isInverse = false, twClassName = '', accessibilityRole, accessibilityLabel, style, ...props }) => {
16
- const tw = useTailwind();
17
- /**
18
- * Calculating the baselineOffset. This baselineOffset is needed to make sure
19
- * the TextButton aligns perfectly when placed within Text elements
20
- */
21
- // eslint-disable-next-line tailwindcss/no-custom-classname
22
- const { fontSize, lineHeight } = tw `text-${MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]}`;
23
- const baselineOffset = (lineHeight - fontSize) / 2;
24
- const getTextColor = useCallback((pressed) => {
25
- if (isInverse) {
26
- return 'text-primary-inverse';
27
- }
28
- return pressed ? 'text-primary-default-pressed' : 'text-primary-default';
29
- }, [isInverse]);
30
- const getTextDecoration = useCallback((pressed) => isInverse || pressed ? 'underline' : 'no-underline', [isInverse]);
31
- return (<Text>
32
- <Pressable accessibilityRole={accessibilityRole ?? 'button'} accessibilityLabel={accessibilityLabel} disabled={isDisabled} style={({ pressed }) => [
33
- { transform: [{ translateY: baselineOffset }] },
34
- tw `flex-row items-center ${pressed ? 'bg-pressed' : 'bg-transparent'} ${isDisabled ? 'opacity-50' : 'opacity-100'} ${twClassName}`,
35
- style,
36
- ]} {...props}>
37
- {({ pressed }) => (<>
38
- {startIconName ? (<Icon name={startIconName} size={IconSize.Sm} testID="start-icon" twClassName={`${getTextColor(pressed)} mr-1`} {...startIconProps}/>) : (startAccessory)}
39
-
40
- <Text variant={MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]} fontWeight={FontWeight.Medium} {...textProps} twClassName={` ${getTextColor(pressed)} ${getTextDecoration(pressed)} ${textProps?.twClassName ?? ''} `}>
41
- {children}
42
- </Text>
43
-
44
- {endIconName ? (<Icon name={endIconName} size={IconSize.Sm} testID="end-icon" twClassName={`${getTextColor(pressed)} ml-1`} {...endIconProps}/>) : (endAccessory)}
45
- </>)}
46
- </Pressable>
11
+ export const TextButton = ({ children, variant = TextVariant.BodyMd, fontWeight = FontWeight.Medium, twClassName, accessibilityRole = 'link', onPress, onPressIn, onPressOut, suppressHighlighting = true, ...rest }) => {
12
+ const [pressed, setPressed] = useState(false);
13
+ const handlePressIn = (e) => {
14
+ setPressed(true);
15
+ onPressIn?.(e);
16
+ };
17
+ const handlePressOut = (e) => {
18
+ setPressed(false);
19
+ onPressOut?.(e);
20
+ };
21
+ return (<Text {...rest} accessibilityRole={accessibilityRole} variant={variant} fontWeight={fontWeight} color={pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault} twClassName={twClassName} onPress={onPress} onPressIn={handlePressIn} onPressOut={handlePressOut} suppressHighlighting={suppressHighlighting}>
22
+ {children}
47
23
  </Text>);
48
24
  };
49
25
  //# sourceMappingURL=TextButton.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,WAAW,EAAE,cAAc;;AAC3C,OAAO,EAAE,SAAS,EAAE,8BAAqB;AAEzC,OAAO,EAAE,cAAc,EAAE,8BAAoB;AAC7C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,0BAAgB;AACzC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAE3C,OAAO,EAAE,+BAA+B,EAAE,mCAA+B;AAGzE,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,IAAI,GAAG,cAAc,CAAC,MAAM,EAC5B,SAAS,EACT,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB;;;OAGG;IACH,2DAA2D;IAC3D,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,EAAE,CAAA,QACjC,+BAA+B,CAAC,IAAI,CACtC,EAGC,CAAC;IACF,MAAM,cAAc,GAA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CACnB,WAAW,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAC7C,IAAI,cAAc,CAAC,EACnB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CAED;;YAAA,CAAC,IAAI,CACH,OAAO,CAAC,CAAC,+BAA+B,CAAC,IAAI,CAAC,CAAC,CAC/C,UAAU,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAC9B,IAAI,SAAS,CAAC,CACd,WAAW,CAAC,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,IAAI,SAAS,EAAE,WAAW,IAAI,EAAE,GAAG,CAAC,CAExG;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,IAAI,CAEN;;YAAA,CAAC,WAAW,CAAC,CAAC,CAAC,CACb,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,WAAW,CAAC,CAClB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,MAAM,CAAC,UAAU,CACjB,WAAW,CAAC,CAAC,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAC7C,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACH;UAAA,GAAG,CACJ,CACH;MAAA,EAAE,SAAS,CACb;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useCallback } from 'react';\nimport { Pressable } from 'react-native';\n\nimport { TextButtonSize } from '../../types';\nimport { Icon, IconSize } from '../Icon';\nimport { Text, FontWeight } from '../Text';\n\nimport { MAP_TEXTBUTTON_SIZE_TEXTVARIANT } from './TextButton.constants';\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n size = TextButtonSize.BodyMd,\n textProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled = false,\n isInverse = false,\n twClassName = '',\n accessibilityRole,\n accessibilityLabel,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n /**\n * Calculating the baselineOffset. This baselineOffset is needed to make sure\n * the TextButton aligns perfectly when placed within Text elements\n */\n // eslint-disable-next-line tailwindcss/no-custom-classname\n const { fontSize, lineHeight } = tw`text-${\n MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size] as string\n }` as {\n fontSize: number;\n lineHeight: number;\n };\n const baselineOffset = (lineHeight - fontSize) / 2;\n\n const getTextColor = useCallback(\n (pressed: boolean): string => {\n if (isInverse) {\n return 'text-primary-inverse';\n }\n return pressed ? 'text-primary-default-pressed' : 'text-primary-default';\n },\n [isInverse],\n );\n\n const getTextDecoration = useCallback(\n (pressed: boolean): string =>\n isInverse || pressed ? 'underline' : 'no-underline',\n [isInverse],\n );\n\n return (\n <Text>\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n accessibilityLabel={accessibilityLabel}\n disabled={isDisabled}\n style={({ pressed }) => [\n { transform: [{ translateY: baselineOffset }] },\n tw`flex-row items-center ${pressed ? 'bg-pressed' : 'bg-transparent'} ${isDisabled ? 'opacity-50' : 'opacity-100'} ${twClassName}`,\n style,\n ]}\n {...props}\n >\n {({ pressed }) => (\n <>\n {startIconName ? (\n <Icon\n name={startIconName}\n size={IconSize.Sm}\n testID=\"start-icon\"\n twClassName={`${getTextColor(pressed)} mr-1`}\n {...startIconProps}\n />\n ) : (\n startAccessory\n )}\n\n <Text\n variant={MAP_TEXTBUTTON_SIZE_TEXTVARIANT[size]}\n fontWeight={FontWeight.Medium}\n {...textProps}\n twClassName={` ${getTextColor(pressed)} ${getTextDecoration(pressed)} ${textProps?.twClassName ?? ''} `}\n >\n {children}\n </Text>\n\n {endIconName ? (\n <Icon\n name={endIconName}\n size={IconSize.Sm}\n testID=\"end-icon\"\n twClassName={`${getTextColor(pressed)} ml-1`}\n {...endIconProps}\n />\n ) : (\n endAccessory\n )}\n </>\n )}\n </Pressable>\n </Text>\n );\n};\n"]}
1
+ {"version":3,"file":"TextButton.mjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAExC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,8BAAoB;AACrD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,0BAAgB;AAI3C,MAAM,CAAC,MAAM,UAAU,GAA8B,CAAC,EACpD,QAAQ,EACR,OAAO,GAAG,WAAW,CAAC,MAAM,EAC5B,UAAU,GAAG,UAAU,CAAC,MAAM,EAC9B,WAAW,EACX,iBAAiB,GAAG,MAAM,EAC1B,OAAO,EACP,SAAS,EACT,UAAU,EACV,oBAAoB,GAAG,IAAI,EAC3B,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE9C,MAAM,aAAa,GAA8C,CAAC,CAAC,EAAE,EAAE;QACrE,UAAU,CAAC,IAAI,CAAC,CAAC;QACjB,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,MAAM,cAAc,GAA+C,CAAC,CAAC,EAAE,EAAE;QACvE,UAAU,CAAC,KAAK,CAAC,CAAC;QAClB,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,IAAI,CACH,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CACJ,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,qBAAqB,CAAC,CAAC,CAAC,SAAS,CAAC,cAAc,CACrE,CACD,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,UAAU,CAAC,CAAC,cAAc,CAAC,CAC3B,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAE3C;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\n\nimport { TextVariant, TextColor } from '../../types';\nimport { Text, FontWeight } from '../Text';\n\nimport type { TextButtonProps } from './TextButton.types';\n\nexport const TextButton: React.FC<TextButtonProps> = ({\n children,\n variant = TextVariant.BodyMd,\n fontWeight = FontWeight.Medium,\n twClassName,\n accessibilityRole = 'link',\n onPress,\n onPressIn,\n onPressOut,\n suppressHighlighting = true,\n ...rest\n}) => {\n const [pressed, setPressed] = useState(false);\n\n const handlePressIn: NonNullable<TextButtonProps['onPressIn']> = (e) => {\n setPressed(true);\n onPressIn?.(e);\n };\n\n const handlePressOut: NonNullable<TextButtonProps['onPressOut']> = (e) => {\n setPressed(false);\n onPressOut?.(e);\n };\n\n return (\n <Text\n {...rest}\n accessibilityRole={accessibilityRole}\n variant={variant}\n fontWeight={fontWeight}\n color={\n pressed ? TextColor.PrimaryDefaultPressed : TextColor.PrimaryDefault\n }\n twClassName={twClassName}\n onPress={onPress}\n onPressIn={handlePressIn}\n onPressOut={handlePressOut}\n suppressHighlighting={suppressHighlighting}\n >\n {children}\n </Text>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { TextButtonSize } from '../../types';\nimport type { IconProps, IconName } from '../Icon';\nimport type { TextProps } from '../Text';\n\n/**\n * TextButton component props.\n */\nexport type TextButtonProps = {\n /**\n * Required prop for the content to be rendered within the TextButton\n */\n children: string;\n /**\n * Optional prop to control the size of the TextButton\n *\n * @default TextButtonSize.BodyMd\n */\n size?: TextButtonSize;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\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 add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & Omit<PressableProps, 'disabled'>;\n"]}
1
+ {"version":3,"file":"TextButton.types.cjs","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TextProps } from '../Text';\n\n/**\n * Props for `TextButton`, a text-only control for links and inline actions.\n * Extends {@link Text} props.\n */\nexport type TextButtonProps = Omit<\n TextProps,\n 'children' | 'color' | 'onPress'\n> & {\n /**\n * Content shown as the label.\n */\n children: React.ReactNode;\n /**\n * Called when the user presses the label. Primary interaction for this control.\n */\n onPress?: TextProps['onPress'];\n};\n"]}
@@ -1,68 +1,16 @@
1
- import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
2
- import type { TextButtonSize } from "../../types/index.cjs";
3
- import type { IconProps, IconName } from "../Icon/index.cjs";
4
1
  import type { TextProps } from "../Text/index.cjs";
5
2
  /**
6
- * TextButton component props.
3
+ * Props for `TextButton`, a text-only control for links and inline actions.
4
+ * Extends {@link Text} props.
7
5
  */
8
- export type TextButtonProps = {
6
+ export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
9
7
  /**
10
- * Required prop for the content to be rendered within the TextButton
8
+ * Content shown as the label.
11
9
  */
12
- children: string;
10
+ children: React.ReactNode;
13
11
  /**
14
- * Optional prop to control the size of the TextButton
15
- *
16
- * @default TextButtonSize.BodyMd
12
+ * Called when the user presses the label. Primary interaction for this control.
17
13
  */
18
- size?: TextButtonSize;
19
- /**
20
- * Optional props to be passed to the Text component when children is a string
21
- */
22
- textProps?: Omit<Partial<TextProps>, 'children'>;
23
- /**
24
- * Optional prop to specify an icon to show at the start of the button
25
- */
26
- startIconName?: IconName;
27
- /**
28
- * Optional prop to pass additional properties to the start icon
29
- */
30
- startIconProps?: Partial<IconProps>;
31
- /**
32
- * Optional prop for a custom element to show at the start of the button
33
- */
34
- startAccessory?: React.ReactNode;
35
- /**
36
- * Optional prop to specify an icon to show at the end of the button
37
- */
38
- endIconName?: IconName;
39
- /**
40
- * Optional prop to pass additional properties to the end icon
41
- */
42
- endIconProps?: Partial<IconProps>;
43
- /**
44
- * Optional prop for a custom element to show at the end of the button
45
- */
46
- endAccessory?: React.ReactNode;
47
- /**
48
- * Optional prop that when true, disables the button
49
- *
50
- * @default false
51
- */
52
- isDisabled?: boolean;
53
- /**
54
- * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.
55
- *
56
- * @default false
57
- */
58
- isInverse?: boolean;
59
- /**
60
- * Optional prop to add twrnc overriding classNames.
61
- */
62
- twClassName?: string;
63
- /**
64
- * Optional prop to control the style.
65
- */
66
- style?: StyleProp<ViewStyle>;
67
- } & Omit<PressableProps, 'disabled'>;
14
+ onPress?: TextProps['onPress'];
15
+ };
68
16
  //# sourceMappingURL=TextButton.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAoB;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACjD;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"TextButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}
@@ -1,68 +1,16 @@
1
- import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
2
- import type { TextButtonSize } from "../../types/index.mjs";
3
- import type { IconProps, IconName } from "../Icon/index.mjs";
4
1
  import type { TextProps } from "../Text/index.mjs";
5
2
  /**
6
- * TextButton component props.
3
+ * Props for `TextButton`, a text-only control for links and inline actions.
4
+ * Extends {@link Text} props.
7
5
  */
8
- export type TextButtonProps = {
6
+ export type TextButtonProps = Omit<TextProps, 'children' | 'color' | 'onPress'> & {
9
7
  /**
10
- * Required prop for the content to be rendered within the TextButton
8
+ * Content shown as the label.
11
9
  */
12
- children: string;
10
+ children: React.ReactNode;
13
11
  /**
14
- * Optional prop to control the size of the TextButton
15
- *
16
- * @default TextButtonSize.BodyMd
12
+ * Called when the user presses the label. Primary interaction for this control.
17
13
  */
18
- size?: TextButtonSize;
19
- /**
20
- * Optional props to be passed to the Text component when children is a string
21
- */
22
- textProps?: Omit<Partial<TextProps>, 'children'>;
23
- /**
24
- * Optional prop to specify an icon to show at the start of the button
25
- */
26
- startIconName?: IconName;
27
- /**
28
- * Optional prop to pass additional properties to the start icon
29
- */
30
- startIconProps?: Partial<IconProps>;
31
- /**
32
- * Optional prop for a custom element to show at the start of the button
33
- */
34
- startAccessory?: React.ReactNode;
35
- /**
36
- * Optional prop to specify an icon to show at the end of the button
37
- */
38
- endIconName?: IconName;
39
- /**
40
- * Optional prop to pass additional properties to the end icon
41
- */
42
- endIconProps?: Partial<IconProps>;
43
- /**
44
- * Optional prop for a custom element to show at the end of the button
45
- */
46
- endAccessory?: React.ReactNode;
47
- /**
48
- * Optional prop that when true, disables the button
49
- *
50
- * @default false
51
- */
52
- isDisabled?: boolean;
53
- /**
54
- * Optional prop to show the inverse state of the button, which is reserved for buttons on colored backgrounds.
55
- *
56
- * @default false
57
- */
58
- isInverse?: boolean;
59
- /**
60
- * Optional prop to add twrnc overriding classNames.
61
- */
62
- twClassName?: string;
63
- /**
64
- * Optional prop to control the style.
65
- */
66
- style?: StyleProp<ViewStyle>;
67
- } & Omit<PressableProps, 'disabled'>;
14
+ onPress?: TextProps['onPress'];
15
+ };
68
16
  //# sourceMappingURL=TextButton.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,8BAAoB;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACjD;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"TextButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/TextButton/TextButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,SAAS,EACT,UAAU,GAAG,OAAO,GAAG,SAAS,CACjC,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAChC,CAAC"}