@metamask-previews/design-system-react-native 0.18.0-preview.ba86146 → 0.22.0-preview.f515a62

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 (452) hide show
  1. package/CHANGELOG.md +76 -18
  2. package/dist/components/AvatarIcon/AvatarIcon.cjs +2 -1
  3. package/dist/components/AvatarIcon/AvatarIcon.cjs.map +1 -1
  4. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +16 -16
  5. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
  6. package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts +1 -1
  7. package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts.map +1 -1
  8. package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts +1 -1
  9. package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts.map +1 -1
  10. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +1 -1
  11. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
  12. package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
  13. package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
  14. package/dist/components/AvatarIcon/AvatarIcon.mjs +2 -1
  15. package/dist/components/AvatarIcon/AvatarIcon.mjs.map +1 -1
  16. package/dist/components/AvatarIcon/AvatarIcon.types.cjs.map +1 -1
  17. package/dist/components/AvatarIcon/AvatarIcon.types.d.cts +3 -13
  18. package/dist/components/AvatarIcon/AvatarIcon.types.d.cts.map +1 -1
  19. package/dist/components/AvatarIcon/AvatarIcon.types.d.mts +3 -13
  20. package/dist/components/AvatarIcon/AvatarIcon.types.d.mts.map +1 -1
  21. package/dist/components/AvatarIcon/AvatarIcon.types.mjs.map +1 -1
  22. package/dist/components/AvatarIcon/index.cjs +4 -4
  23. package/dist/components/AvatarIcon/index.cjs.map +1 -1
  24. package/dist/components/AvatarIcon/index.d.cts +1 -1
  25. package/dist/components/AvatarIcon/index.d.cts.map +1 -1
  26. package/dist/components/AvatarIcon/index.d.mts +1 -1
  27. package/dist/components/AvatarIcon/index.d.mts.map +1 -1
  28. package/dist/components/AvatarIcon/index.mjs +1 -1
  29. package/dist/components/AvatarIcon/index.mjs.map +1 -1
  30. package/dist/components/BadgeIcon/BadgeIcon.cjs +2 -1
  31. package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
  32. package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
  33. package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
  34. package/dist/components/BadgeIcon/BadgeIcon.mjs +2 -1
  35. package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
  36. package/dist/components/BadgeIcon/BadgeIcon.types.cjs.map +1 -1
  37. package/dist/components/BadgeIcon/BadgeIcon.types.d.cts +5 -7
  38. package/dist/components/BadgeIcon/BadgeIcon.types.d.cts.map +1 -1
  39. package/dist/components/BadgeIcon/BadgeIcon.types.d.mts +5 -7
  40. package/dist/components/BadgeIcon/BadgeIcon.types.d.mts.map +1 -1
  41. package/dist/components/BadgeIcon/BadgeIcon.types.mjs.map +1 -1
  42. package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -8
  43. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  44. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
  45. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  46. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
  47. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  48. package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
  49. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  50. package/dist/components/BannerBase/BannerBase.cjs +3 -4
  51. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  52. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  53. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  54. package/dist/components/BannerBase/BannerBase.mjs +1 -2
  55. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  56. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +1 -1
  57. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  58. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +1 -1
  59. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  60. package/dist/components/Box/Box.cjs +35 -12
  61. package/dist/components/Box/Box.cjs.map +1 -1
  62. package/dist/components/Box/Box.constants.cjs.map +1 -1
  63. package/dist/components/Box/Box.constants.d.cts +1 -1
  64. package/dist/components/Box/Box.constants.d.cts.map +1 -1
  65. package/dist/components/Box/Box.constants.d.mts +1 -1
  66. package/dist/components/Box/Box.constants.d.mts.map +1 -1
  67. package/dist/components/Box/Box.constants.mjs.map +1 -1
  68. package/dist/components/Box/Box.d.cts +4 -2
  69. package/dist/components/Box/Box.d.cts.map +1 -1
  70. package/dist/components/Box/Box.d.mts +4 -2
  71. package/dist/components/Box/Box.d.mts.map +1 -1
  72. package/dist/components/Box/Box.mjs +13 -9
  73. package/dist/components/Box/Box.mjs.map +1 -1
  74. package/dist/components/Box/Box.types.cjs.map +1 -1
  75. package/dist/components/Box/Box.types.d.cts +3 -107
  76. package/dist/components/Box/Box.types.d.cts.map +1 -1
  77. package/dist/components/Box/Box.types.d.mts +3 -107
  78. package/dist/components/Box/Box.types.d.mts.map +1 -1
  79. package/dist/components/Box/Box.types.mjs.map +1 -1
  80. package/dist/components/Box/index.cjs +7 -7
  81. package/dist/components/Box/index.cjs.map +1 -1
  82. package/dist/components/Box/index.d.cts +1 -2
  83. package/dist/components/Box/index.d.cts.map +1 -1
  84. package/dist/components/Box/index.d.mts +1 -2
  85. package/dist/components/Box/index.d.mts.map +1 -1
  86. package/dist/components/Box/index.mjs +1 -1
  87. package/dist/components/Box/index.mjs.map +1 -1
  88. package/dist/components/BoxColumn/BoxColumn.cjs +2 -2
  89. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
  90. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
  91. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
  92. package/dist/components/BoxColumn/BoxColumn.mjs +1 -1
  93. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
  94. package/dist/components/BoxRow/BoxRow.cjs +2 -2
  95. package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
  96. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
  97. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
  98. package/dist/components/BoxRow/BoxRow.mjs +1 -1
  99. package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
  100. package/dist/components/Button/Button.cjs +6 -6
  101. package/dist/components/Button/Button.cjs.map +1 -1
  102. package/dist/components/Button/Button.d.cts.map +1 -1
  103. package/dist/components/Button/Button.d.mts.map +1 -1
  104. package/dist/components/Button/Button.mjs +1 -1
  105. package/dist/components/Button/Button.mjs.map +1 -1
  106. package/dist/components/Button/Button.types.cjs.map +1 -1
  107. package/dist/components/Button/Button.types.d.cts +2 -7
  108. package/dist/components/Button/Button.types.d.cts.map +1 -1
  109. package/dist/components/Button/Button.types.d.mts +2 -7
  110. package/dist/components/Button/Button.types.d.mts.map +1 -1
  111. package/dist/components/Button/Button.types.mjs.map +1 -1
  112. package/dist/components/Button/index.cjs +3 -3
  113. package/dist/components/Button/index.cjs.map +1 -1
  114. package/dist/components/Button/index.d.cts +1 -1
  115. package/dist/components/Button/index.d.cts.map +1 -1
  116. package/dist/components/Button/index.d.mts +1 -1
  117. package/dist/components/Button/index.d.mts.map +1 -1
  118. package/dist/components/Button/index.mjs +1 -1
  119. package/dist/components/Button/index.mjs.map +1 -1
  120. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +2 -0
  121. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
  122. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.cts.map +1 -1
  123. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.mts.map +1 -1
  124. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs +2 -0
  125. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
  126. package/dist/components/Button/variants/ButtonPrimary/index.cjs +1 -3
  127. package/dist/components/Button/variants/ButtonPrimary/index.cjs.map +1 -1
  128. package/dist/components/Button/variants/ButtonPrimary/index.d.cts +0 -1
  129. package/dist/components/Button/variants/ButtonPrimary/index.d.cts.map +1 -1
  130. package/dist/components/Button/variants/ButtonPrimary/index.d.mts +0 -1
  131. package/dist/components/Button/variants/ButtonPrimary/index.d.mts.map +1 -1
  132. package/dist/components/Button/variants/ButtonPrimary/index.mjs +0 -1
  133. package/dist/components/Button/variants/ButtonPrimary/index.mjs.map +1 -1
  134. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +2 -0
  135. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
  136. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.cts.map +1 -1
  137. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.mts.map +1 -1
  138. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs +2 -0
  139. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
  140. package/dist/components/Button/variants/ButtonSecondary/index.cjs +1 -3
  141. package/dist/components/Button/variants/ButtonSecondary/index.cjs.map +1 -1
  142. package/dist/components/Button/variants/ButtonSecondary/index.d.cts +0 -1
  143. package/dist/components/Button/variants/ButtonSecondary/index.d.cts.map +1 -1
  144. package/dist/components/Button/variants/ButtonSecondary/index.d.mts +0 -1
  145. package/dist/components/Button/variants/ButtonSecondary/index.d.mts.map +1 -1
  146. package/dist/components/Button/variants/ButtonSecondary/index.mjs +0 -1
  147. package/dist/components/Button/variants/ButtonSecondary/index.mjs.map +1 -1
  148. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +4 -3
  149. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
  150. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
  151. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
  152. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +4 -3
  153. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
  154. package/dist/components/Button/variants/ButtonTertiary/index.cjs +1 -3
  155. package/dist/components/Button/variants/ButtonTertiary/index.cjs.map +1 -1
  156. package/dist/components/Button/variants/ButtonTertiary/index.d.cts +0 -1
  157. package/dist/components/Button/variants/ButtonTertiary/index.d.cts.map +1 -1
  158. package/dist/components/Button/variants/ButtonTertiary/index.d.mts +0 -1
  159. package/dist/components/Button/variants/ButtonTertiary/index.d.mts.map +1 -1
  160. package/dist/components/Button/variants/ButtonTertiary/index.mjs +0 -1
  161. package/dist/components/Button/variants/ButtonTertiary/index.mjs.map +1 -1
  162. package/dist/components/ButtonBase/ButtonBase.cjs +2 -2
  163. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  164. package/dist/components/ButtonBase/ButtonBase.constants.cjs +4 -4
  165. package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
  166. package/dist/components/ButtonBase/ButtonBase.constants.d.cts +1 -1
  167. package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
  168. package/dist/components/ButtonBase/ButtonBase.constants.d.mts +1 -1
  169. package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
  170. package/dist/components/ButtonBase/ButtonBase.constants.mjs +1 -1
  171. package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
  172. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  173. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  174. package/dist/components/ButtonBase/ButtonBase.mjs +1 -1
  175. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  176. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  177. package/dist/components/ButtonBase/ButtonBase.types.d.cts +3 -32
  178. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  179. package/dist/components/ButtonBase/ButtonBase.types.d.mts +3 -32
  180. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  181. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  182. package/dist/components/ButtonBase/index.cjs +2 -2
  183. package/dist/components/ButtonBase/index.cjs.map +1 -1
  184. package/dist/components/ButtonBase/index.d.cts +1 -1
  185. package/dist/components/ButtonBase/index.d.cts.map +1 -1
  186. package/dist/components/ButtonBase/index.d.mts +1 -1
  187. package/dist/components/ButtonBase/index.d.mts.map +1 -1
  188. package/dist/components/ButtonBase/index.mjs +1 -1
  189. package/dist/components/ButtonBase/index.mjs.map +1 -1
  190. package/dist/components/ButtonHero/index.cjs +2 -2
  191. package/dist/components/ButtonHero/index.cjs.map +1 -1
  192. package/dist/components/ButtonHero/index.d.cts +1 -1
  193. package/dist/components/ButtonHero/index.d.cts.map +1 -1
  194. package/dist/components/ButtonHero/index.d.mts +1 -1
  195. package/dist/components/ButtonHero/index.d.mts.map +1 -1
  196. package/dist/components/ButtonHero/index.mjs +1 -1
  197. package/dist/components/ButtonHero/index.mjs.map +1 -1
  198. package/dist/components/ButtonIcon/ButtonIcon.cjs +6 -6
  199. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  200. package/dist/components/ButtonIcon/ButtonIcon.constants.cjs +7 -8
  201. package/dist/components/ButtonIcon/ButtonIcon.constants.cjs.map +1 -1
  202. package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts +1 -2
  203. package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts.map +1 -1
  204. package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts +1 -2
  205. package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts.map +1 -1
  206. package/dist/components/ButtonIcon/ButtonIcon.constants.mjs +1 -2
  207. package/dist/components/ButtonIcon/ButtonIcon.constants.mjs.map +1 -1
  208. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  209. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  210. package/dist/components/ButtonIcon/ButtonIcon.mjs +1 -1
  211. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  212. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  213. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +3 -26
  214. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  215. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +3 -26
  216. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  217. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  218. package/dist/components/ButtonIcon/index.cjs +3 -3
  219. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  220. package/dist/components/ButtonIcon/index.d.cts +1 -1
  221. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  222. package/dist/components/ButtonIcon/index.d.mts +1 -1
  223. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  224. package/dist/components/ButtonIcon/index.mjs +1 -1
  225. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  226. package/dist/components/Icon/Icon.assets.cjs +284 -283
  227. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  228. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  229. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  230. package/dist/components/Icon/Icon.assets.mjs +284 -283
  231. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  232. package/dist/components/Icon/Icon.cjs +1 -2
  233. package/dist/components/Icon/Icon.cjs.map +1 -1
  234. package/dist/components/Icon/Icon.d.cts.map +1 -1
  235. package/dist/components/Icon/Icon.d.mts.map +1 -1
  236. package/dist/components/Icon/Icon.mjs +1 -2
  237. package/dist/components/Icon/Icon.mjs.map +1 -1
  238. package/dist/components/Icon/Icon.types.cjs.map +1 -1
  239. package/dist/components/Icon/Icon.types.d.cts +2 -19
  240. package/dist/components/Icon/Icon.types.d.cts.map +1 -1
  241. package/dist/components/Icon/Icon.types.d.mts +2 -19
  242. package/dist/components/Icon/Icon.types.d.mts.map +1 -1
  243. package/dist/components/Icon/Icon.types.mjs.map +1 -1
  244. package/dist/components/Icon/assets/after-hours.svg +1 -1
  245. package/dist/components/Icon/assets/telegram.svg +3 -0
  246. package/dist/components/Input/Input.cjs +2 -2
  247. package/dist/components/Input/Input.cjs.map +1 -1
  248. package/dist/components/Input/Input.d.cts +1 -1
  249. package/dist/components/Input/Input.d.mts +1 -1
  250. package/dist/components/Input/Input.mjs +2 -2
  251. package/dist/components/Input/Input.mjs.map +1 -1
  252. package/dist/components/Input/Input.types.cjs.map +1 -1
  253. package/dist/components/Input/Input.types.d.cts +1 -1
  254. package/dist/components/Input/Input.types.d.mts +1 -1
  255. package/dist/components/Input/Input.types.mjs.map +1 -1
  256. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +2 -2
  257. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  258. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  259. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  260. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +2 -2
  261. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  262. package/dist/components/KeyValueRow/KeyValueRow.cjs +2 -2
  263. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  264. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  265. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  266. package/dist/components/KeyValueRow/KeyValueRow.mjs +2 -2
  267. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  268. package/dist/components/TabEmptyState/TabEmptyState.cjs +1 -1
  269. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -1
  270. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -1
  271. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -1
  272. package/dist/components/TabEmptyState/TabEmptyState.mjs +1 -1
  273. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -1
  274. package/dist/components/Tag/Tag.cjs +45 -0
  275. package/dist/components/Tag/Tag.cjs.map +1 -0
  276. package/dist/components/Tag/Tag.constants.cjs +27 -0
  277. package/dist/components/Tag/Tag.constants.cjs.map +1 -0
  278. package/dist/components/Tag/Tag.constants.d.cts +6 -0
  279. package/dist/components/Tag/Tag.constants.d.cts.map +1 -0
  280. package/dist/components/Tag/Tag.constants.d.mts +6 -0
  281. package/dist/components/Tag/Tag.constants.d.mts.map +1 -0
  282. package/dist/components/Tag/Tag.constants.mjs +24 -0
  283. package/dist/components/Tag/Tag.constants.mjs.map +1 -0
  284. package/dist/components/Tag/Tag.d.cts +4 -0
  285. package/dist/components/Tag/Tag.d.cts.map +1 -0
  286. package/dist/components/Tag/Tag.d.mts +4 -0
  287. package/dist/components/Tag/Tag.d.mts.map +1 -0
  288. package/dist/components/Tag/Tag.mjs +45 -0
  289. package/dist/components/Tag/Tag.mjs.map +1 -0
  290. package/dist/components/Tag/Tag.types.cjs +3 -0
  291. package/dist/components/Tag/Tag.types.cjs.map +1 -0
  292. package/dist/components/Tag/Tag.types.d.cts +38 -0
  293. package/dist/components/Tag/Tag.types.d.cts.map +1 -0
  294. package/dist/components/Tag/Tag.types.d.mts +38 -0
  295. package/dist/components/Tag/Tag.types.d.mts.map +1 -0
  296. package/dist/components/Tag/Tag.types.mjs +2 -0
  297. package/dist/components/Tag/Tag.types.mjs.map +1 -0
  298. package/dist/components/Tag/index.cjs +8 -0
  299. package/dist/components/Tag/index.cjs.map +1 -0
  300. package/dist/components/Tag/index.d.cts +4 -0
  301. package/dist/components/Tag/index.d.cts.map +1 -0
  302. package/dist/components/Tag/index.d.mts +4 -0
  303. package/dist/components/Tag/index.d.mts.map +1 -0
  304. package/dist/components/Tag/index.mjs +3 -0
  305. package/dist/components/Tag/index.mjs.map +1 -0
  306. package/dist/components/TextField/TextField.cjs +10 -30
  307. package/dist/components/TextField/TextField.cjs.map +1 -1
  308. package/dist/components/TextField/TextField.d.cts +159 -7
  309. package/dist/components/TextField/TextField.d.cts.map +1 -1
  310. package/dist/components/TextField/TextField.d.mts +159 -7
  311. package/dist/components/TextField/TextField.d.mts.map +1 -1
  312. package/dist/components/TextField/TextField.mjs +12 -32
  313. package/dist/components/TextField/TextField.mjs.map +1 -1
  314. package/dist/components/TextField/TextField.types.cjs.map +1 -1
  315. package/dist/components/TextField/TextField.types.d.cts +41 -16
  316. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  317. package/dist/components/TextField/TextField.types.d.mts +41 -16
  318. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  319. package/dist/components/TextField/TextField.types.mjs.map +1 -1
  320. package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -1
  321. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +160 -8
  322. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
  323. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +160 -8
  324. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
  325. package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -1
  326. package/dist/components/TitleHub/TitleHub.cjs +65 -0
  327. package/dist/components/TitleHub/TitleHub.cjs.map +1 -0
  328. package/dist/components/TitleHub/TitleHub.d.cts +26 -0
  329. package/dist/components/TitleHub/TitleHub.d.cts.map +1 -0
  330. package/dist/components/TitleHub/TitleHub.d.mts +26 -0
  331. package/dist/components/TitleHub/TitleHub.d.mts.map +1 -0
  332. package/dist/components/TitleHub/TitleHub.mjs +65 -0
  333. package/dist/components/TitleHub/TitleHub.mjs.map +1 -0
  334. package/dist/components/TitleHub/TitleHub.types.cjs +3 -0
  335. package/dist/components/TitleHub/TitleHub.types.cjs.map +1 -0
  336. package/dist/components/TitleHub/TitleHub.types.d.cts +39 -0
  337. package/dist/components/TitleHub/TitleHub.types.d.cts.map +1 -0
  338. package/dist/components/TitleHub/TitleHub.types.d.mts +39 -0
  339. package/dist/components/TitleHub/TitleHub.types.d.mts.map +1 -0
  340. package/dist/components/TitleHub/TitleHub.types.mjs +2 -0
  341. package/dist/components/TitleHub/TitleHub.types.mjs.map +1 -0
  342. package/dist/components/TitleHub/index.cjs +6 -0
  343. package/dist/components/TitleHub/index.cjs.map +1 -0
  344. package/dist/components/TitleHub/index.d.cts +4 -0
  345. package/dist/components/TitleHub/index.d.cts.map +1 -0
  346. package/dist/components/TitleHub/index.d.mts +4 -0
  347. package/dist/components/TitleHub/index.d.mts.map +1 -0
  348. package/dist/components/TitleHub/index.mjs +2 -0
  349. package/dist/components/TitleHub/index.mjs.map +1 -0
  350. package/dist/components/TitleStandard/TitleStandard.cjs +58 -0
  351. package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -0
  352. package/dist/components/TitleStandard/TitleStandard.d.cts +23 -0
  353. package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -0
  354. package/dist/components/TitleStandard/TitleStandard.d.mts +23 -0
  355. package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -0
  356. package/dist/components/TitleStandard/TitleStandard.mjs +58 -0
  357. package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -0
  358. package/dist/components/TitleStandard/TitleStandard.types.cjs +3 -0
  359. package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -0
  360. package/dist/components/TitleStandard/TitleStandard.types.d.cts +31 -0
  361. package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -0
  362. package/dist/components/TitleStandard/TitleStandard.types.d.mts +31 -0
  363. package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -0
  364. package/dist/components/TitleStandard/TitleStandard.types.mjs +2 -0
  365. package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -0
  366. package/dist/components/TitleStandard/index.cjs +6 -0
  367. package/dist/components/TitleStandard/index.cjs.map +1 -0
  368. package/dist/components/TitleStandard/index.d.cts +3 -0
  369. package/dist/components/TitleStandard/index.d.cts.map +1 -0
  370. package/dist/components/TitleStandard/index.d.mts +3 -0
  371. package/dist/components/TitleStandard/index.d.mts.map +1 -0
  372. package/dist/components/TitleStandard/index.mjs +2 -0
  373. package/dist/components/TitleStandard/index.mjs.map +1 -0
  374. package/dist/components/TitleSubpage/TitleSubpage.cjs +85 -0
  375. package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -0
  376. package/dist/components/TitleSubpage/TitleSubpage.d.cts +30 -0
  377. package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -0
  378. package/dist/components/TitleSubpage/TitleSubpage.d.mts +30 -0
  379. package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -0
  380. package/dist/components/TitleSubpage/TitleSubpage.mjs +85 -0
  381. package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -0
  382. package/dist/components/TitleSubpage/TitleSubpage.types.cjs +3 -0
  383. package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -0
  384. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +44 -0
  385. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -0
  386. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +44 -0
  387. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -0
  388. package/dist/components/TitleSubpage/TitleSubpage.types.mjs +2 -0
  389. package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -0
  390. package/dist/components/TitleSubpage/index.cjs +6 -0
  391. package/dist/components/TitleSubpage/index.cjs.map +1 -0
  392. package/dist/components/TitleSubpage/index.d.cts +3 -0
  393. package/dist/components/TitleSubpage/index.d.cts.map +1 -0
  394. package/dist/components/TitleSubpage/index.d.mts +3 -0
  395. package/dist/components/TitleSubpage/index.d.mts.map +1 -0
  396. package/dist/components/TitleSubpage/index.mjs +2 -0
  397. package/dist/components/TitleSubpage/index.mjs.map +1 -0
  398. package/dist/components/Toast/Toast.cjs +29 -142
  399. package/dist/components/Toast/Toast.cjs.map +1 -1
  400. package/dist/components/Toast/Toast.d.cts +15 -3
  401. package/dist/components/Toast/Toast.d.cts.map +1 -1
  402. package/dist/components/Toast/Toast.d.mts +15 -3
  403. package/dist/components/Toast/Toast.d.mts.map +1 -1
  404. package/dist/components/Toast/Toast.mjs +30 -143
  405. package/dist/components/Toast/Toast.mjs.map +1 -1
  406. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  407. package/dist/components/Toast/Toast.types.d.cts +1 -8
  408. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  409. package/dist/components/Toast/Toast.types.d.mts +1 -8
  410. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  411. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  412. package/dist/components/Toast/ToastView.cjs +174 -0
  413. package/dist/components/Toast/ToastView.cjs.map +1 -0
  414. package/dist/components/Toast/ToastView.d.cts +7 -0
  415. package/dist/components/Toast/ToastView.d.cts.map +1 -0
  416. package/dist/components/Toast/ToastView.d.mts +7 -0
  417. package/dist/components/Toast/ToastView.d.mts.map +1 -0
  418. package/dist/components/Toast/ToastView.mjs +155 -0
  419. package/dist/components/Toast/ToastView.mjs.map +1 -0
  420. package/dist/components/Toast/index.cjs +1 -4
  421. package/dist/components/Toast/index.cjs.map +1 -1
  422. package/dist/components/Toast/index.d.cts +1 -2
  423. package/dist/components/Toast/index.d.cts.map +1 -1
  424. package/dist/components/Toast/index.d.mts +1 -2
  425. package/dist/components/Toast/index.d.mts.map +1 -1
  426. package/dist/components/Toast/index.mjs +0 -1
  427. package/dist/components/Toast/index.mjs.map +1 -1
  428. package/dist/components/index.cjs +11 -4
  429. package/dist/components/index.cjs.map +1 -1
  430. package/dist/components/index.d.cts +10 -2
  431. package/dist/components/index.d.cts.map +1 -1
  432. package/dist/components/index.d.mts +10 -2
  433. package/dist/components/index.d.mts.map +1 -1
  434. package/dist/components/index.mjs +5 -1
  435. package/dist/components/index.mjs.map +1 -1
  436. package/dist/types/index.cjs +8 -596
  437. package/dist/types/index.cjs.map +1 -1
  438. package/dist/types/index.d.cts +4 -586
  439. package/dist/types/index.d.cts.map +1 -1
  440. package/dist/types/index.d.mts +4 -586
  441. package/dist/types/index.d.mts.map +1 -1
  442. package/dist/types/index.mjs +4 -599
  443. package/dist/types/index.mjs.map +1 -1
  444. package/package.json +6 -7
  445. package/dist/components/Toast/Toast.context.cjs +0 -40
  446. package/dist/components/Toast/Toast.context.cjs.map +0 -1
  447. package/dist/components/Toast/Toast.context.d.cts +0 -7
  448. package/dist/components/Toast/Toast.context.d.cts.map +0 -1
  449. package/dist/components/Toast/Toast.context.d.mts +0 -7
  450. package/dist/components/Toast/Toast.context.d.mts.map +0 -1
  451. package/dist/components/Toast/Toast.context.mjs +0 -20
  452. package/dist/components/Toast/Toast.context.mjs.map +0 -1
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=TitleSubpage.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleSubpage.types.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleSubpagePropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleSubpage component props (React Native).\n * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleSubpageProps = TitleSubpagePropsShared & {\n /**\n * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).\n */\n identityRowProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'textProps'\n >;\n /**\n * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).\n */\n titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).\n */\n bottomLabelWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.\n */\n amountProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `subtitle` is a string.\n */\n subtitleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,44 @@
1
+ import type { TitleSubpagePropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ import type { BoxProps } from "../Box/Box.types.cjs";
4
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
5
+ import type { TextProps } from "../Text/Text.types.cjs";
6
+ /**
7
+ * TitleSubpage component props (React Native).
8
+ * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.
9
+ */
10
+ export type TitleSubpageProps = TitleSubpagePropsShared & {
11
+ /**
12
+ * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).
13
+ */
14
+ identityRowProps?: Omit<Partial<BoxRowProps>, 'children' | 'startAccessory' | 'textProps'>;
15
+ /**
16
+ * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).
17
+ */
18
+ titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;
19
+ /**
20
+ * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).
21
+ */
22
+ bottomLabelWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
23
+ /**
24
+ * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.
25
+ */
26
+ amountProps?: Omit<Partial<TextProps>, 'children'>;
27
+ /**
28
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
29
+ */
30
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
31
+ /**
32
+ * Optional props merged into {@link BoxRow} `textProps` when `subtitle` is a string.
33
+ */
34
+ subtitleProps?: Omit<Partial<TextProps>, 'children'>;
35
+ /**
36
+ * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.
37
+ */
38
+ bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;
39
+ /**
40
+ * Optional Tailwind class name to apply to the container.
41
+ */
42
+ twClassName?: string;
43
+ } & Omit<ViewProps, 'children'>;
44
+ //# sourceMappingURL=TitleSubpage.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleSubpage.types.d.cts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CACrB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,gBAAgB,GAAG,WAAW,CAC5C,CAAC;IACF;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACvD;;OAEG;IACH,uBAAuB,CAAC,EAAE,IAAI,CAC5B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACnD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACrD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { TitleSubpagePropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ import type { BoxProps } from "../Box/Box.types.mjs";
4
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.mjs";
5
+ import type { TextProps } from "../Text/Text.types.mjs";
6
+ /**
7
+ * TitleSubpage component props (React Native).
8
+ * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.
9
+ */
10
+ export type TitleSubpageProps = TitleSubpagePropsShared & {
11
+ /**
12
+ * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).
13
+ */
14
+ identityRowProps?: Omit<Partial<BoxRowProps>, 'children' | 'startAccessory' | 'textProps'>;
15
+ /**
16
+ * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).
17
+ */
18
+ titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;
19
+ /**
20
+ * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).
21
+ */
22
+ bottomLabelWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
23
+ /**
24
+ * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.
25
+ */
26
+ amountProps?: Omit<Partial<TextProps>, 'children'>;
27
+ /**
28
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
29
+ */
30
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
31
+ /**
32
+ * Optional props merged into {@link BoxRow} `textProps` when `subtitle` is a string.
33
+ */
34
+ subtitleProps?: Omit<Partial<TextProps>, 'children'>;
35
+ /**
36
+ * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.
37
+ */
38
+ bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;
39
+ /**
40
+ * Optional Tailwind class name to apply to the container.
41
+ */
42
+ twClassName?: string;
43
+ } & Omit<ViewProps, 'children'>;
44
+ //# sourceMappingURL=TitleSubpage.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleSubpage.types.d.mts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CACrB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,gBAAgB,GAAG,WAAW,CAC5C,CAAC;IACF;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACvD;;OAEG;IACH,uBAAuB,CAAC,EAAE,IAAI,CAC5B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACnD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACrD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=TitleSubpage.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TitleSubpage.types.mjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleSubpagePropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleSubpage component props (React Native).\n * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleSubpageProps = TitleSubpagePropsShared & {\n /**\n * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).\n */\n identityRowProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'textProps'\n >;\n /**\n * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).\n */\n titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).\n */\n bottomLabelWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.\n */\n amountProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `subtitle` is a string.\n */\n subtitleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TitleSubpage = void 0;
4
+ var TitleSubpage_1 = require("./TitleSubpage.cjs");
5
+ Object.defineProperty(exports, "TitleSubpage", { enumerable: true, get: function () { return TitleSubpage_1.TitleSubpage; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export { TitleSubpage } from './TitleSubpage';\nexport type { TitleSubpageProps } from './TitleSubpage.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { TitleSubpage } from "./TitleSubpage.cjs";
2
+ export type { TitleSubpageProps } from "./TitleSubpage.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
@@ -0,0 +1,3 @@
1
+ export { TitleSubpage } from "./TitleSubpage.mjs";
2
+ export type { TitleSubpageProps } from "./TitleSubpage.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
@@ -0,0 +1,2 @@
1
+ export { TitleSubpage } from "./TitleSubpage.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export { TitleSubpage } from './TitleSubpage';\nexport type { TitleSubpageProps } from './TitleSubpage.types';\n"]}
@@ -25,150 +25,37 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.Toast = void 0;
27
27
  // Third party dependencies.
28
- const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
29
28
  const react_1 = __importStar(require("react"));
30
- const react_native_1 = require("react-native/index.js");
31
- const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
32
- const react_native_safe_area_context_1 = require("react-native-safe-area-context");
33
- // External dependencies.
34
- const AvatarAccount_1 = require("../AvatarAccount/index.cjs");
35
- const AvatarFavicon_1 = require("../AvatarFavicon/index.cjs");
36
- const AvatarIcon_1 = require("../AvatarIcon/index.cjs");
37
- const AvatarNetwork_1 = require("../AvatarNetwork/index.cjs");
38
- const Button_1 = require("../Button/index.cjs");
39
- const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
40
- const Text_1 = require("../Text/index.cjs");
41
- // Internal dependencies.
42
- const Toast_constants_1 = require("./Toast.constants.cjs");
43
- const Toast_types_1 = require("./Toast.types.cjs");
44
- const screenHeight = react_native_1.Dimensions.get('window').height;
45
- exports.Toast = (0, react_1.forwardRef)(({ twClassName, labelsContainerProps, ...props }, ref) => {
46
- const tw = (0, design_system_twrnc_preset_1.useTailwind)();
47
- const [toastOptions, setToastOptions] = (0, react_1.useState)(undefined);
48
- const replacementTimerRef = (0, react_1.useRef)(null);
49
- const { bottom: bottomNotchSpacing } = (0, react_native_safe_area_context_1.useSafeAreaInsets)();
50
- const translateYProgress = (0, react_native_reanimated_1.useSharedValue)(screenHeight);
51
- const bottomOffset = toastOptions?.bottomOffset ?? 0;
52
- const animatedStyle = (0, react_native_reanimated_1.useAnimatedStyle)(() => ({
53
- transform: [{ translateY: translateYProgress.value - bottomOffset }],
54
- }));
55
- const baseStyle = (0, react_1.useMemo)(() => [
56
- tw.style('absolute left-4 right-4 bottom-0 bg-background-section border border-border-muted rounded-xl p-3 flex-row items-center', twClassName),
57
- animatedStyle,
58
- ], [tw, animatedStyle, twClassName]);
59
- const resetState = () => setToastOptions(undefined);
60
- const showToast = (options) => {
61
- let timeoutDuration = 0;
62
- if (toastOptions) {
63
- (0, react_native_reanimated_1.cancelAnimation)(translateYProgress);
64
- timeoutDuration = 100;
65
- // Clear existing toast state to prevent animation conflicts when showing rapid successive toasts
66
- setToastOptions(undefined);
67
- }
68
- if (replacementTimerRef.current !== null) {
69
- clearTimeout(replacementTimerRef.current);
70
- }
71
- replacementTimerRef.current = setTimeout(() => {
72
- replacementTimerRef.current = null;
73
- setToastOptions(options);
74
- }, timeoutDuration);
75
- };
76
- const closeToast = () => {
77
- if (replacementTimerRef.current !== null) {
78
- clearTimeout(replacementTimerRef.current);
79
- replacementTimerRef.current = null;
80
- }
81
- translateYProgress.value = (0, react_native_reanimated_1.withTiming)(screenHeight, { duration: Toast_constants_1.TOAST_ANIMATION_DURATION }, () => {
82
- (0, react_native_reanimated_1.runOnJS)(resetState)();
83
- });
84
- };
29
+ const ToastView_1 = require("./ToastView.cjs");
30
+ let registeredRef = null;
31
+ const assertRegisteredRef = (method) => {
32
+ if (!registeredRef?.current) {
33
+ throw new Error(`Toast.${method}() called before <Toast /> mounted. Render <Toast /> once at the root of your app.`);
34
+ }
35
+ return registeredRef.current;
36
+ };
37
+ const ToastComponent = (0, react_1.forwardRef)((props, ref) => {
38
+ const innerRef = (0, react_1.useRef)(null);
85
39
  (0, react_1.useImperativeHandle)(ref, () => ({
86
- showToast,
87
- closeToast,
88
- }));
89
- const onAnimatedViewLayout = (e) => {
90
- /* istanbul ignore next - guard only; layout fires when toastOptions is set */
91
- if (toastOptions) {
92
- const { height } = e.nativeEvent.layout;
93
- const translateYToValue = -(Toast_constants_1.TOAST_BOTTOM_PADDING + bottomNotchSpacing);
94
- translateYProgress.value = height;
95
- if (toastOptions.hasNoTimeout) {
96
- translateYProgress.value = (0, react_native_reanimated_1.withTiming)(translateYToValue, {
97
- duration: Toast_constants_1.TOAST_ANIMATION_DURATION,
98
- });
99
- }
100
- else {
101
- translateYProgress.value = (0, react_native_reanimated_1.withTiming)(translateYToValue, { duration: Toast_constants_1.TOAST_ANIMATION_DURATION }, () => {
102
- translateYProgress.value = (0, react_native_reanimated_1.withDelay)(Toast_constants_1.TOAST_VISIBILITY_DURATION, (0, react_native_reanimated_1.withTiming)(height, { duration: Toast_constants_1.TOAST_ANIMATION_DURATION }, (0, react_native_reanimated_1.runOnJS)(resetState)));
103
- });
104
- }
105
- }
106
- };
107
- const renderLabel = (labelOptions) => (<Text_1.Text variant={Text_1.TextVariant.BodyMd}>
108
- {labelOptions.map(({ label, isBold }, index) => (<Text_1.Text key={`toast-label-${index}`} variant={Text_1.TextVariant.BodyMd} fontWeight={isBold ? Text_1.FontWeight.Bold : undefined} color={Text_1.TextColor.TextDefault}>
109
- {label}
110
- </Text_1.Text>))}
111
- </Text_1.Text>);
112
- const renderDescription = (descriptionOptions) => descriptionOptions && (<Text_1.Text variant={Text_1.TextVariant.BodySm} color={Text_1.TextColor.TextAlternative} style={tw.style('mt-1')}>
113
- {descriptionOptions.description}
114
- </Text_1.Text>);
115
- const renderActionButton = (linkButtonOptions) => linkButtonOptions && (<Button_1.Button variant={Button_1.ButtonVariant.Secondary} onPress={linkButtonOptions.onPress} style={tw.style('mt-2')}>
116
- {linkButtonOptions.label}
117
- </Button_1.Button>);
118
- const renderCloseButton = (closeButtonOptions) => {
119
- if (closeButtonOptions && 'iconName' in closeButtonOptions) {
120
- const iconOptions = closeButtonOptions;
121
- return (<ButtonIcon_1.ButtonIcon iconName={iconOptions.iconName} onPress={(e) => iconOptions.onPress?.(e)} size={iconOptions.size} isDisabled={iconOptions.isDisabled} twClassName={iconOptions.twClassName} style={iconOptions.style} iconProps={iconOptions.iconProps}/>);
122
- }
123
- return (<Button_1.Button variant={Button_1.ButtonVariant.Primary} onPress={(e) => closeButtonOptions?.onPress?.(e)} startIconName={closeButtonOptions?.startIconName} endIconName={closeButtonOptions?.endIconName} style={closeButtonOptions?.style}>
124
- {closeButtonOptions?.children}
125
- </Button_1.Button>);
126
- };
127
- const renderAvatar = () => {
128
- switch (toastOptions?.variant) {
129
- case Toast_types_1.ToastVariant.Plain:
130
- return null;
131
- case Toast_types_1.ToastVariant.Account: {
132
- const { accountAddress, accountAvatarType } = toastOptions;
133
- return (<AvatarAccount_1.AvatarAccount address={accountAddress} variant={accountAvatarType} size={AvatarAccount_1.AvatarAccountSize.Md} style={tw.style('mr-4')}/>);
134
- }
135
- case Toast_types_1.ToastVariant.Network: {
136
- const { networkImageSource, networkName } = toastOptions;
137
- return (<AvatarNetwork_1.AvatarNetwork name={networkName} src={networkImageSource} size={AvatarNetwork_1.AvatarNetworkSize.Md} style={tw.style('mr-4')}/>);
40
+ showToast: (options) => innerRef.current?.showToast(options),
41
+ closeToast: () => innerRef.current?.closeToast(),
42
+ }), []);
43
+ (0, react_1.useEffect)(() => {
44
+ registeredRef = innerRef;
45
+ return () => {
46
+ if (registeredRef === innerRef) {
47
+ registeredRef = null;
138
48
  }
139
- case Toast_types_1.ToastVariant.App: {
140
- const { appIconSource } = toastOptions;
141
- return (<AvatarFavicon_1.AvatarFavicon src={appIconSource} size={AvatarFavicon_1.AvatarFaviconSize.Md} style={tw.style('mr-4')}/>);
142
- }
143
- case Toast_types_1.ToastVariant.Icon: {
144
- const { iconName, severity } = toastOptions;
145
- return (<AvatarIcon_1.AvatarIcon iconName={iconName} severity={severity} size={AvatarIcon_1.AvatarIconSize.Md} style={tw.style('mr-4')}/>);
146
- }
147
- /* istanbul ignore next - all variants handled above */
148
- default:
149
- return null;
150
- }
151
- };
152
- const renderToastContent = (options) => {
153
- const { labelOptions, descriptionOptions, linkButtonOptions, closeButtonOptions, startAccessory, } = options;
154
- const isStartAccessoryValid = startAccessory !== null &&
155
- startAccessory !== undefined &&
156
- (0, react_1.isValidElement)(startAccessory);
157
- return (<>
158
- {isStartAccessoryValid ? startAccessory : renderAvatar()}
159
- <react_native_1.View style={tw.style('flex-1 justify-center')} {...labelsContainerProps}>
160
- {renderLabel(labelOptions)}
161
- {renderDescription(descriptionOptions)}
162
- {renderActionButton(linkButtonOptions)}
163
- </react_native_1.View>
164
- {closeButtonOptions ? renderCloseButton(closeButtonOptions) : null}
165
- </>);
166
- };
167
- if (!toastOptions) {
168
- return null;
169
- }
170
- return (<react_native_reanimated_1.default.View onLayout={onAnimatedViewLayout} style={baseStyle} {...props}>
171
- {renderToastContent(toastOptions)}
172
- </react_native_reanimated_1.default.View>);
49
+ };
50
+ }, []);
51
+ return <ToastView_1.ToastView ref={innerRef} {...props}/>;
173
52
  });
53
+ ToastComponent.displayName = 'Toast';
54
+ exports.Toast = ToastComponent;
55
+ exports.Toast.show = (options) => {
56
+ assertRegisteredRef('show').showToast(options);
57
+ };
58
+ exports.Toast.hide = () => {
59
+ assertRegisteredRef('hide').closeToast();
60
+ };
174
61
  //# sourceMappingURL=Toast.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,8FAA4E;AAC5E,+CAOe;AACf,wDAAgD;AAEhD,mFAOiC;AACjC,mFAAmE;AAEnE,yBAAyB;AACzB,8DAAoE;AACpE,8DAAoE;AACpE,wDAA2D;AAC3D,8DAAoE;AACpE,gDAAkD;AAClD,wDAA2C;AAC3C,4CAAmE;AAEnE,yBAAyB;AACzB,2DAI2B;AAW3B,mDAA6C;AAE7C,MAAM,YAAY,GAAG,yBAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AAExC,QAAA,KAAK,GAAG,IAAA,kBAAU,EAC7B,CAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IACvD,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAC9C,SAAS,CACV,CAAC;IACF,MAAM,mBAAmB,GAAG,IAAA,c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AkB,CAAC,YAAY,CAAC,CACnC;MAAA,EAAE,iCAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, {\n forwardRef,\n isValidElement,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { Dimensions, View } from 'react-native';\nimport type { LayoutChangeEvent, StyleProp, ViewStyle } from 'react-native';\nimport Animated, {\n cancelAnimation,\n runOnJS,\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withTiming,\n} from 'react-native-reanimated';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { AvatarAccount, AvatarAccountSize } from '../AvatarAccount';\nimport { AvatarFavicon, AvatarFaviconSize } from '../AvatarFavicon';\nimport { AvatarIcon, AvatarIconSize } from '../AvatarIcon';\nimport { AvatarNetwork, AvatarNetworkSize } from '../AvatarNetwork';\nimport { Button, ButtonVariant } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text, TextVariant, TextColor, FontWeight } from '../Text';\n\n// Internal dependencies.\nimport {\n TOAST_VISIBILITY_DURATION,\n TOAST_ANIMATION_DURATION,\n TOAST_BOTTOM_PADDING,\n} from './Toast.constants';\nimport type {\n ToastCloseButtonIconOptions,\n ToastCloseButtonOptions,\n ToastDescriptionOptions,\n ToastLabelOptions,\n ToastLinkButtonOptions,\n ToastOptions,\n ToastProps,\n ToastRef,\n} from './Toast.types';\nimport { ToastVariant } from './Toast.types';\n\nconst screenHeight = Dimensions.get('window').height;\n\nexport const Toast = forwardRef<ToastRef, ToastProps>(\n ({ twClassName, labelsContainerProps, ...props }, ref) => {\n const tw = useTailwind();\n const [toastOptions, setToastOptions] = useState<ToastOptions | undefined>(\n undefined,\n );\n const replacementTimerRef = useRef<ReturnType<typeof setTimeout> | null>(\n null,\n );\n const { bottom: bottomNotchSpacing } = useSafeAreaInsets();\n const translateYProgress = useSharedValue(screenHeight);\n const bottomOffset = toastOptions?.bottomOffset ?? 0;\n const animatedStyle = useAnimatedStyle(() => ({\n transform: [{ translateY: translateYProgress.value - bottomOffset }],\n }));\n const baseStyle: StyleProp<ViewStyle> = useMemo(\n () => [\n tw.style(\n 'absolute left-4 right-4 bottom-0 bg-background-section border border-border-muted rounded-xl p-3 flex-row items-center',\n twClassName,\n ),\n animatedStyle,\n ],\n [tw, animatedStyle, twClassName],\n );\n\n const resetState = () => setToastOptions(undefined);\n\n const showToast = (options: ToastOptions) => {\n let timeoutDuration = 0;\n if (toastOptions) {\n cancelAnimation(translateYProgress);\n timeoutDuration = 100;\n // Clear existing toast state to prevent animation conflicts when showing rapid successive toasts\n setToastOptions(undefined);\n }\n if (replacementTimerRef.current !== null) {\n clearTimeout(replacementTimerRef.current);\n }\n replacementTimerRef.current = setTimeout(() => {\n replacementTimerRef.current = null;\n setToastOptions(options);\n }, timeoutDuration);\n };\n\n const closeToast = () => {\n if (replacementTimerRef.current !== null) {\n clearTimeout(replacementTimerRef.current);\n replacementTimerRef.current = null;\n }\n translateYProgress.value = withTiming(\n screenHeight,\n { duration: TOAST_ANIMATION_DURATION },\n () => {\n runOnJS(resetState)();\n },\n );\n };\n\n useImperativeHandle(ref, () => ({\n showToast,\n closeToast,\n }));\n\n const onAnimatedViewLayout = (e: LayoutChangeEvent) => {\n /* istanbul ignore next - guard only; layout fires when toastOptions is set */\n if (toastOptions) {\n const { height } = e.nativeEvent.layout;\n const translateYToValue = -(TOAST_BOTTOM_PADDING + bottomNotchSpacing);\n\n translateYProgress.value = height;\n\n if (toastOptions.hasNoTimeout) {\n translateYProgress.value = withTiming(translateYToValue, {\n duration: TOAST_ANIMATION_DURATION,\n });\n } else {\n translateYProgress.value = withTiming(\n translateYToValue,\n { duration: TOAST_ANIMATION_DURATION },\n () => {\n translateYProgress.value = withDelay(\n TOAST_VISIBILITY_DURATION,\n withTiming(\n height,\n { duration: TOAST_ANIMATION_DURATION },\n runOnJS(resetState),\n ),\n );\n },\n );\n }\n }\n };\n\n const renderLabel = (labelOptions: ToastLabelOptions) => (\n <Text variant={TextVariant.BodyMd}>\n {labelOptions.map(({ label, isBold }, index) => (\n <Text\n key={`toast-label-${index}`}\n variant={TextVariant.BodyMd}\n fontWeight={isBold ? FontWeight.Bold : undefined}\n color={TextColor.TextDefault}\n >\n {label}\n </Text>\n ))}\n </Text>\n );\n\n const renderDescription = (descriptionOptions?: ToastDescriptionOptions) =>\n descriptionOptions && (\n <Text\n variant={TextVariant.BodySm}\n color={TextColor.TextAlternative}\n style={tw.style('mt-1')}\n >\n {descriptionOptions.description}\n </Text>\n );\n\n const renderActionButton = (linkButtonOptions?: ToastLinkButtonOptions) =>\n linkButtonOptions && (\n <Button\n variant={ButtonVariant.Secondary}\n onPress={linkButtonOptions.onPress}\n style={tw.style('mt-2')}\n >\n {linkButtonOptions.label}\n </Button>\n );\n\n const renderCloseButton = (\n closeButtonOptions?: ToastCloseButtonOptions,\n ) => {\n if (closeButtonOptions && 'iconName' in closeButtonOptions) {\n const iconOptions = closeButtonOptions as ToastCloseButtonIconOptions;\n return (\n <ButtonIcon\n iconName={iconOptions.iconName}\n onPress={(e) => iconOptions.onPress?.(e)}\n size={iconOptions.size}\n isDisabled={iconOptions.isDisabled}\n twClassName={iconOptions.twClassName}\n style={iconOptions.style}\n iconProps={iconOptions.iconProps}\n />\n );\n }\n return (\n <Button\n variant={ButtonVariant.Primary}\n onPress={(e) => closeButtonOptions?.onPress?.(e)}\n startIconName={closeButtonOptions?.startIconName}\n endIconName={closeButtonOptions?.endIconName}\n style={closeButtonOptions?.style}\n >\n {closeButtonOptions?.children}\n </Button>\n );\n };\n\n const renderAvatar = () => {\n switch (toastOptions?.variant) {\n case ToastVariant.Plain:\n return null;\n case ToastVariant.Account: {\n const { accountAddress, accountAvatarType } = toastOptions;\n return (\n <AvatarAccount\n address={accountAddress}\n variant={accountAvatarType}\n size={AvatarAccountSize.Md}\n style={tw.style('mr-4')}\n />\n );\n }\n case ToastVariant.Network: {\n const { networkImageSource, networkName } = toastOptions;\n return (\n <AvatarNetwork\n name={networkName}\n src={networkImageSource}\n size={AvatarNetworkSize.Md}\n style={tw.style('mr-4')}\n />\n );\n }\n case ToastVariant.App: {\n const { appIconSource } = toastOptions;\n return (\n <AvatarFavicon\n src={appIconSource}\n size={AvatarFaviconSize.Md}\n style={tw.style('mr-4')}\n />\n );\n }\n case ToastVariant.Icon: {\n const { iconName, severity } = toastOptions;\n return (\n <AvatarIcon\n iconName={iconName}\n severity={severity}\n size={AvatarIconSize.Md}\n style={tw.style('mr-4')}\n />\n );\n }\n /* istanbul ignore next - all variants handled above */\n default:\n return null;\n }\n };\n\n const renderToastContent = (options: ToastOptions) => {\n const {\n labelOptions,\n descriptionOptions,\n linkButtonOptions,\n closeButtonOptions,\n startAccessory,\n } = options;\n\n const isStartAccessoryValid =\n startAccessory !== null &&\n startAccessory !== undefined &&\n isValidElement(startAccessory);\n\n return (\n <>\n {isStartAccessoryValid ? startAccessory : renderAvatar()}\n <View\n style={tw.style('flex-1 justify-center')}\n {...labelsContainerProps}\n >\n {renderLabel(labelOptions)}\n {renderDescription(descriptionOptions)}\n {renderActionButton(linkButtonOptions)}\n </View>\n {closeButtonOptions ? renderCloseButton(closeButtonOptions) : null}\n </>\n );\n };\n\n if (!toastOptions) {\n return null;\n }\n\n return (\n <Animated.View\n onLayout={onAnimatedViewLayout}\n style={baseStyle}\n {...props}\n >\n {renderToastContent(toastOptions)}\n </Animated.View>\n );\n },\n);\n"]}
1
+ {"version":3,"file":"Toast.cjs","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,+CAKe;AAKf,+CAAwC;AAExC,IAAI,aAAa,GAA+B,IAAI,CAAC;AAErD,MAAM,mBAAmB,GAAG,CAAC,MAAc,EAAY,EAAE;IACvD,IAAI,CAAC,aAAa,EAAE,OAAO,E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encies.\nimport React, {\n forwardRef,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport type { RefObject } from 'react';\n\n// Internal dependencies.\nimport type { ToastOptions, ToastProps, ToastRef } from './Toast.types';\nimport { ToastView } from './ToastView';\n\nlet registeredRef: RefObject<ToastRef> | null = null;\n\nconst assertRegisteredRef = (method: string): ToastRef => {\n if (!registeredRef?.current) {\n throw new Error(\n `Toast.${method}() called before <Toast /> mounted. Render <Toast /> once at the root of your app.`,\n );\n }\n return registeredRef.current;\n};\n\nconst ToastComponent = forwardRef<ToastRef, ToastProps>((props, ref) => {\n const innerRef = useRef<ToastRef>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n showToast: (options) => innerRef.current?.showToast(options),\n closeToast: () => innerRef.current?.closeToast(),\n }),\n [],\n );\n\n useEffect(() => {\n registeredRef = innerRef;\n return () => {\n if (registeredRef === innerRef) {\n registeredRef = null;\n }\n };\n }, []);\n\n return <ToastView ref={innerRef} {...props} />;\n});\n\nToastComponent.displayName = 'Toast';\n\ntype ToastWithStatics = typeof ToastComponent & {\n /**\n * Show a toast notification. Requires `<Toast />` to be mounted.\n */\n show: (options: ToastOptions) => void;\n /**\n * Hide the currently visible toast, if any.\n */\n hide: () => void;\n};\n\nexport const Toast = ToastComponent as ToastWithStatics;\n\nToast.show = (options) => {\n assertRegisteredRef('show').showToast(options);\n};\n\nToast.hide = () => {\n assertRegisteredRef('hide').closeToast();\n};\n"]}
@@ -1,7 +1,19 @@
1
1
  import React from "react";
2
- import type { ToastRef } from "./Toast.types.cjs";
3
- export declare const Toast: React.ForwardRefExoticComponent<{
2
+ import type { ToastOptions, ToastRef } from "./Toast.types.cjs";
3
+ declare const ToastComponent: React.ForwardRefExoticComponent<{
4
4
  twClassName?: string | undefined;
5
- labelsContainerProps?: Omit<import("react-native").ViewProps, "style" | "children"> | undefined;
5
+ labelsContainerProps?: Omit<import("react-native").ViewProps, "children" | "style"> | undefined;
6
6
  } & Omit<import("react-native").ViewProps, "style"> & React.RefAttributes<ToastRef>>;
7
+ type ToastWithStatics = typeof ToastComponent & {
8
+ /**
9
+ * Show a toast notification. Requires `<Toast />` to be mounted.
10
+ */
11
+ show: (options: ToastOptions) => void;
12
+ /**
13
+ * Hide the currently visible toast, if any.
14
+ */
15
+ hide: () => void;
16
+ };
17
+ export declare const Toast: ToastWithStatics;
18
+ export {};
7
19
  //# sourceMappingURL=Toast.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,cAAc;AA4Bf,OAAO,KAAK,EAQV,QAAQ,EACT,0BAAsB;AAKvB,eAAO,MAAM,KAAK;;;oFAmQjB,CAAC"}
1
+ {"version":3,"file":"Toast.d.cts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAKN,cAAc;AAIf,OAAO,KAAK,EAAE,YAAY,EAAc,QAAQ,EAAE,0BAAsB;AAcxE,QAAA,MAAM,cAAc;;;oFAsBlB,CAAC;AAIH,KAAK,gBAAgB,GAAG,OAAO,cAAc,GAAG;IAC9C;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,KAAK,kBAAqC,CAAC"}
@@ -1,7 +1,19 @@
1
1
  import React from "react";
2
- import type { ToastRef } from "./Toast.types.mjs";
3
- export declare const Toast: React.ForwardRefExoticComponent<{
2
+ import type { ToastOptions, ToastRef } from "./Toast.types.mjs";
3
+ declare const ToastComponent: React.ForwardRefExoticComponent<{
4
4
  twClassName?: string | undefined;
5
- labelsContainerProps?: Omit<import("react-native").ViewProps, "style" | "children"> | undefined;
5
+ labelsContainerProps?: Omit<import("react-native").ViewProps, "children" | "style"> | undefined;
6
6
  } & Omit<import("react-native").ViewProps, "style"> & React.RefAttributes<ToastRef>>;
7
+ type ToastWithStatics = typeof ToastComponent & {
8
+ /**
9
+ * Show a toast notification. Requires `<Toast />` to be mounted.
10
+ */
11
+ show: (options: ToastOptions) => void;
12
+ /**
13
+ * Hide the currently visible toast, if any.
14
+ */
15
+ hide: () => void;
16
+ };
17
+ export declare const Toast: ToastWithStatics;
18
+ export {};
7
19
  //# sourceMappingURL=Toast.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,KAON,cAAc;AA4Bf,OAAO,KAAK,EAQV,QAAQ,EACT,0BAAsB;AAKvB,eAAO,MAAM,KAAK;;;oFAmQjB,CAAC"}
1
+ {"version":3,"file":"Toast.d.mts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAKN,cAAc;AAIf,OAAO,KAAK,EAAE,YAAY,EAAc,QAAQ,EAAE,0BAAsB;AAcxE,QAAA,MAAM,cAAc;;;oFAsBlB,CAAC;AAIH,KAAK,gBAAgB,GAAG,OAAO,cAAc,GAAG;IAC9C;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,KAAK,kBAAqC,CAAC"}