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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/CHANGELOG.md +51 -1
  2. package/dist/components/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -1
  3. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts +7 -9
  4. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -1
  5. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts +7 -9
  6. package/dist/components/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -1
  7. package/dist/components/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -1
  8. package/dist/components/BannerAlert/BannerAlert.cjs +23 -0
  9. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -0
  10. package/dist/components/BannerAlert/BannerAlert.constants.cjs +30 -0
  11. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -0
  12. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +7 -0
  13. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -0
  14. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +7 -0
  15. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -0
  16. package/dist/components/BannerAlert/BannerAlert.constants.mjs +27 -0
  17. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -0
  18. package/dist/components/BannerAlert/BannerAlert.d.cts +4 -0
  19. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -0
  20. package/dist/components/BannerAlert/BannerAlert.d.mts +4 -0
  21. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -0
  22. package/dist/components/BannerAlert/BannerAlert.mjs +23 -0
  23. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -0
  24. package/dist/components/BannerAlert/BannerAlert.types.cjs +3 -0
  25. package/dist/components/BannerAlert/BannerAlert.types.cjs.map +1 -0
  26. package/dist/components/BannerAlert/BannerAlert.types.d.cts +10 -0
  27. package/dist/components/BannerAlert/BannerAlert.types.d.cts.map +1 -0
  28. package/dist/components/BannerAlert/BannerAlert.types.d.mts +10 -0
  29. package/dist/components/BannerAlert/BannerAlert.types.d.mts.map +1 -0
  30. package/dist/components/BannerAlert/BannerAlert.types.mjs +2 -0
  31. package/dist/components/BannerAlert/BannerAlert.types.mjs.map +1 -0
  32. package/dist/components/BannerAlert/index.cjs +8 -0
  33. package/dist/components/BannerAlert/index.cjs.map +1 -0
  34. package/dist/components/BannerAlert/index.d.cts +4 -0
  35. package/dist/components/BannerAlert/index.d.cts.map +1 -0
  36. package/dist/components/BannerAlert/index.d.mts +4 -0
  37. package/dist/components/BannerAlert/index.d.mts.map +1 -0
  38. package/dist/components/BannerAlert/index.mjs +3 -0
  39. package/dist/components/BannerAlert/index.mjs.map +1 -0
  40. package/dist/components/BannerBase/BannerBase.cjs +1 -1
  41. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  42. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  43. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  44. package/dist/components/BannerBase/BannerBase.mjs +1 -1
  45. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  46. package/dist/components/BottomSheet/BottomSheet.cjs +109 -0
  47. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -0
  48. package/dist/components/BottomSheet/BottomSheet.d.cts +16 -0
  49. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -0
  50. package/dist/components/BottomSheet/BottomSheet.d.mts +16 -0
  51. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -0
  52. package/dist/components/BottomSheet/BottomSheet.mjs +87 -0
  53. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -0
  54. package/dist/components/BottomSheet/BottomSheet.types.cjs +3 -0
  55. package/dist/components/BottomSheet/BottomSheet.types.cjs.map +1 -0
  56. package/dist/components/BottomSheet/BottomSheet.types.d.cts +28 -0
  57. package/dist/components/BottomSheet/BottomSheet.types.d.cts.map +1 -0
  58. package/dist/components/BottomSheet/BottomSheet.types.d.mts +28 -0
  59. package/dist/components/BottomSheet/BottomSheet.types.d.mts.map +1 -0
  60. package/dist/components/BottomSheet/BottomSheet.types.mjs +2 -0
  61. package/dist/components/BottomSheet/BottomSheet.types.mjs.map +1 -0
  62. package/dist/components/BottomSheet/index.cjs +6 -0
  63. package/dist/components/BottomSheet/index.cjs.map +1 -0
  64. package/dist/components/BottomSheet/index.d.cts +3 -0
  65. package/dist/components/BottomSheet/index.d.cts.map +1 -0
  66. package/dist/components/BottomSheet/index.d.mts +3 -0
  67. package/dist/components/BottomSheet/index.d.mts.map +1 -0
  68. package/dist/components/BottomSheet/index.mjs +2 -0
  69. package/dist/components/BottomSheet/index.mjs.map +1 -0
  70. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +207 -0
  71. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -0
  72. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs +18 -0
  73. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.cjs.map +1 -0
  74. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts +14 -0
  75. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.cts.map +1 -0
  76. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts +14 -0
  77. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.d.mts.map +1 -0
  78. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs +15 -0
  79. package/dist/components/BottomSheetDialog/BottomSheetDialog.constants.mjs.map +1 -0
  80. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +13 -0
  81. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -0
  82. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +13 -0
  83. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -0
  84. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +190 -0
  85. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -0
  86. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs +3 -0
  87. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -0
  88. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +56 -0
  89. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -0
  90. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +56 -0
  91. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -0
  92. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs +2 -0
  93. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -0
  94. package/dist/components/BottomSheetDialog/index.cjs +9 -0
  95. package/dist/components/BottomSheetDialog/index.cjs.map +1 -0
  96. package/dist/components/BottomSheetDialog/index.d.cts +3 -0
  97. package/dist/components/BottomSheetDialog/index.d.cts.map +1 -0
  98. package/dist/components/BottomSheetDialog/index.d.mts +3 -0
  99. package/dist/components/BottomSheetDialog/index.d.mts.map +1 -0
  100. package/dist/components/BottomSheetDialog/index.mjs +2 -0
  101. package/dist/components/BottomSheetDialog/index.mjs.map +1 -0
  102. package/dist/components/ButtonBase/ButtonBase.cjs +4 -11
  103. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  104. package/dist/components/ButtonBase/ButtonBase.d.cts +1 -1
  105. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  106. package/dist/components/ButtonBase/ButtonBase.d.mts +1 -1
  107. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  108. package/dist/components/ButtonBase/ButtonBase.mjs +5 -12
  109. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  110. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  111. package/dist/components/ButtonBase/ButtonBase.types.d.cts +7 -0
  112. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  113. package/dist/components/ButtonBase/ButtonBase.types.d.mts +7 -0
  114. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  115. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  116. package/dist/components/ButtonFilter/ButtonFilter.cjs +28 -0
  117. package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
  118. package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
  119. package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
  120. package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
  121. package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
  122. package/dist/components/ButtonFilter/ButtonFilter.mjs +28 -0
  123. package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
  124. package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
  125. package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
  126. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +9 -0
  127. package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
  128. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +9 -0
  129. package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
  130. package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
  131. package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
  132. package/dist/components/ButtonFilter/index.cjs +6 -0
  133. package/dist/components/ButtonFilter/index.cjs.map +1 -0
  134. package/dist/components/ButtonFilter/index.d.cts +3 -0
  135. package/dist/components/ButtonFilter/index.d.cts.map +1 -0
  136. package/dist/components/ButtonFilter/index.d.mts +3 -0
  137. package/dist/components/ButtonFilter/index.d.mts.map +1 -0
  138. package/dist/components/ButtonFilter/index.mjs +2 -0
  139. package/dist/components/ButtonFilter/index.mjs.map +1 -0
  140. package/dist/components/ButtonIcon/ButtonIcon.cjs +10 -4
  141. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  142. package/dist/components/ButtonIcon/ButtonIcon.d.cts +1 -1
  143. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  144. package/dist/components/ButtonIcon/ButtonIcon.d.mts +1 -1
  145. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  146. package/dist/components/ButtonIcon/ButtonIcon.mjs +11 -5
  147. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  148. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  149. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -11
  150. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  151. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -11
  152. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  153. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  154. package/dist/components/ButtonIcon/index.cjs +2 -1
  155. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  156. package/dist/components/ButtonIcon/index.d.cts +1 -1
  157. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  158. package/dist/components/ButtonIcon/index.d.mts +1 -1
  159. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  160. package/dist/components/ButtonIcon/index.mjs +1 -1
  161. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  162. package/dist/components/Icon/assets/ai.svg +1 -1
  163. package/dist/components/Input/Input.cjs +12 -2
  164. package/dist/components/Input/Input.cjs.map +1 -1
  165. package/dist/components/Input/Input.d.cts +2 -1
  166. package/dist/components/Input/Input.d.cts.map +1 -1
  167. package/dist/components/Input/Input.d.mts +2 -1
  168. package/dist/components/Input/Input.d.mts.map +1 -1
  169. package/dist/components/Input/Input.mjs +12 -2
  170. package/dist/components/Input/Input.mjs.map +1 -1
  171. package/dist/components/Input/Input.types.cjs.map +1 -1
  172. package/dist/components/Input/Input.types.d.cts +5 -1
  173. package/dist/components/Input/Input.types.d.cts.map +1 -1
  174. package/dist/components/Input/Input.types.d.mts +5 -1
  175. package/dist/components/Input/Input.types.d.mts.map +1 -1
  176. package/dist/components/Input/Input.types.mjs.map +1 -1
  177. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +33 -0
  178. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
  179. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +14 -0
  180. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
  181. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +14 -0
  182. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
  183. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +35 -0
  184. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
  185. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +39 -0
  186. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
  187. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +25 -0
  188. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
  189. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +25 -0
  190. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
  191. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +41 -0
  192. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
  193. package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
  194. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
  195. package/dist/components/KeyValueRow/KeyValueRow.d.cts +25 -0
  196. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
  197. package/dist/components/KeyValueRow/KeyValueRow.d.mts +25 -0
  198. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
  199. package/dist/components/KeyValueRow/KeyValueRow.mjs +77 -0
  200. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
  201. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
  202. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
  203. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
  204. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
  205. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
  206. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
  207. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
  208. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
  209. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
  210. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
  211. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
  212. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
  213. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
  214. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
  215. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
  216. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
  217. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +29 -0
  218. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
  219. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +17 -0
  220. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
  221. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +17 -0
  222. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
  223. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +31 -0
  224. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
  225. package/dist/components/KeyValueRow/index.cjs +15 -0
  226. package/dist/components/KeyValueRow/index.cjs.map +1 -0
  227. package/dist/components/KeyValueRow/index.d.cts +3 -0
  228. package/dist/components/KeyValueRow/index.d.cts.map +1 -0
  229. package/dist/components/KeyValueRow/index.d.mts +3 -0
  230. package/dist/components/KeyValueRow/index.d.mts.map +1 -0
  231. package/dist/components/KeyValueRow/index.mjs +3 -0
  232. package/dist/components/KeyValueRow/index.mjs.map +1 -0
  233. package/dist/components/ListItem/ListItem.cjs +61 -0
  234. package/dist/components/ListItem/ListItem.cjs.map +1 -0
  235. package/dist/components/ListItem/ListItem.constants.cjs +14 -0
  236. package/dist/components/ListItem/ListItem.constants.cjs.map +1 -0
  237. package/dist/components/ListItem/ListItem.constants.d.cts +8 -0
  238. package/dist/components/ListItem/ListItem.constants.d.cts.map +1 -0
  239. package/dist/components/ListItem/ListItem.constants.d.mts +8 -0
  240. package/dist/components/ListItem/ListItem.constants.d.mts.map +1 -0
  241. package/dist/components/ListItem/ListItem.constants.mjs +11 -0
  242. package/dist/components/ListItem/ListItem.constants.mjs.map +1 -0
  243. package/dist/components/ListItem/ListItem.d.cts +4 -0
  244. package/dist/components/ListItem/ListItem.d.cts.map +1 -0
  245. package/dist/components/ListItem/ListItem.d.mts +4 -0
  246. package/dist/components/ListItem/ListItem.d.mts.map +1 -0
  247. package/dist/components/ListItem/ListItem.mjs +41 -0
  248. package/dist/components/ListItem/ListItem.mjs.map +1 -0
  249. package/dist/components/ListItem/ListItem.types.cjs +12 -0
  250. package/dist/components/ListItem/ListItem.types.cjs.map +1 -0
  251. package/dist/components/ListItem/ListItem.types.d.cts +60 -0
  252. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -0
  253. package/dist/components/ListItem/ListItem.types.d.mts +60 -0
  254. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -0
  255. package/dist/components/ListItem/ListItem.types.mjs +9 -0
  256. package/dist/components/ListItem/ListItem.types.mjs.map +1 -0
  257. package/dist/components/ListItem/index.cjs +8 -0
  258. package/dist/components/ListItem/index.cjs.map +1 -0
  259. package/dist/components/ListItem/index.d.cts +4 -0
  260. package/dist/components/ListItem/index.d.cts.map +1 -0
  261. package/dist/components/ListItem/index.d.mts +4 -0
  262. package/dist/components/ListItem/index.d.mts.map +1 -0
  263. package/dist/components/ListItem/index.mjs +3 -0
  264. package/dist/components/ListItem/index.mjs.map +1 -0
  265. package/dist/components/MainActionButton/MainActionButton.cjs +28 -0
  266. package/dist/components/MainActionButton/MainActionButton.cjs.map +1 -0
  267. package/dist/components/MainActionButton/MainActionButton.d.cts +4 -0
  268. package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -0
  269. package/dist/components/MainActionButton/MainActionButton.d.mts +4 -0
  270. package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -0
  271. package/dist/components/MainActionButton/MainActionButton.mjs +28 -0
  272. package/dist/components/MainActionButton/MainActionButton.mjs.map +1 -0
  273. package/dist/components/MainActionButton/MainActionButton.types.cjs +3 -0
  274. package/dist/components/MainActionButton/MainActionButton.types.cjs.map +1 -0
  275. package/dist/components/MainActionButton/MainActionButton.types.d.cts +41 -0
  276. package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -0
  277. package/dist/components/MainActionButton/MainActionButton.types.d.mts +41 -0
  278. package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -0
  279. package/dist/components/MainActionButton/MainActionButton.types.mjs +2 -0
  280. package/dist/components/MainActionButton/MainActionButton.types.mjs.map +1 -0
  281. package/dist/components/MainActionButton/index.cjs +6 -0
  282. package/dist/components/MainActionButton/index.cjs.map +1 -0
  283. package/dist/components/MainActionButton/index.d.cts +3 -0
  284. package/dist/components/MainActionButton/index.d.cts.map +1 -0
  285. package/dist/components/MainActionButton/index.d.mts +3 -0
  286. package/dist/components/MainActionButton/index.d.mts.map +1 -0
  287. package/dist/components/MainActionButton/index.mjs +2 -0
  288. package/dist/components/MainActionButton/index.mjs.map +1 -0
  289. package/dist/components/TabEmptyState/TabEmptyState.cjs +22 -0
  290. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -0
  291. package/dist/components/TabEmptyState/TabEmptyState.d.cts +4 -0
  292. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -0
  293. package/dist/components/TabEmptyState/TabEmptyState.d.mts +4 -0
  294. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -0
  295. package/dist/components/TabEmptyState/TabEmptyState.mjs +22 -0
  296. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -0
  297. package/dist/components/TabEmptyState/TabEmptyState.types.cjs +3 -0
  298. package/dist/components/TabEmptyState/TabEmptyState.types.cjs.map +1 -0
  299. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +45 -0
  300. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -0
  301. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +45 -0
  302. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -0
  303. package/dist/components/TabEmptyState/TabEmptyState.types.mjs +2 -0
  304. package/dist/components/TabEmptyState/TabEmptyState.types.mjs.map +1 -0
  305. package/dist/components/TabEmptyState/index.cjs +6 -0
  306. package/dist/components/TabEmptyState/index.cjs.map +1 -0
  307. package/dist/components/TabEmptyState/index.d.cts +3 -0
  308. package/dist/components/TabEmptyState/index.d.cts.map +1 -0
  309. package/dist/components/TabEmptyState/index.d.mts +3 -0
  310. package/dist/components/TabEmptyState/index.d.mts.map +1 -0
  311. package/dist/components/TabEmptyState/index.mjs +2 -0
  312. package/dist/components/TabEmptyState/index.mjs.map +1 -0
  313. package/dist/components/Toast/Toast.cjs +3 -2
  314. package/dist/components/Toast/Toast.cjs.map +1 -1
  315. package/dist/components/Toast/Toast.d.cts.map +1 -1
  316. package/dist/components/Toast/Toast.d.mts.map +1 -1
  317. package/dist/components/Toast/Toast.mjs +4 -3
  318. package/dist/components/Toast/Toast.mjs.map +1 -1
  319. package/dist/components/Toast/Toast.types.cjs +5 -5
  320. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  321. package/dist/components/Toast/Toast.types.d.cts +5 -4
  322. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  323. package/dist/components/Toast/Toast.types.d.mts +5 -4
  324. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  325. package/dist/components/Toast/Toast.types.mjs +4 -4
  326. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  327. package/dist/components/Toast/index.cjs +2 -2
  328. package/dist/components/Toast/index.cjs.map +1 -1
  329. package/dist/components/Toast/index.d.cts +1 -1
  330. package/dist/components/Toast/index.d.cts.map +1 -1
  331. package/dist/components/Toast/index.d.mts +1 -1
  332. package/dist/components/Toast/index.d.mts.map +1 -1
  333. package/dist/components/Toast/index.mjs +1 -1
  334. package/dist/components/Toast/index.mjs.map +1 -1
  335. package/dist/components/index.cjs +31 -2
  336. package/dist/components/index.cjs.map +1 -1
  337. package/dist/components/index.d.cts +25 -5
  338. package/dist/components/index.d.cts.map +1 -1
  339. package/dist/components/index.d.mts +25 -5
  340. package/dist/components/index.d.mts.map +1 -1
  341. package/dist/components/index.mjs +12 -2
  342. package/dist/components/index.mjs.map +1 -1
  343. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +5 -1
  344. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
  345. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts +1 -1
  346. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
  347. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts +1 -1
  348. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
  349. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +5 -1
  350. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
  351. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.cjs.map +1 -1
  352. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts +14 -1
  353. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts.map +1 -1
  354. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts +14 -1
  355. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts.map +1 -1
  356. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.mjs.map +1 -1
  357. package/dist/components/temp-components/ButtonAnimated/index.cjs.map +1 -1
  358. package/dist/components/temp-components/ButtonAnimated/index.d.cts +1 -1
  359. package/dist/components/temp-components/ButtonAnimated/index.d.cts.map +1 -1
  360. package/dist/components/temp-components/ButtonAnimated/index.d.mts +1 -1
  361. package/dist/components/temp-components/ButtonAnimated/index.d.mts.map +1 -1
  362. package/dist/components/temp-components/ButtonAnimated/index.mjs.map +1 -1
  363. package/dist/types/index.cjs +10 -1
  364. package/dist/types/index.cjs.map +1 -1
  365. package/dist/types/index.d.cts +8 -0
  366. package/dist/types/index.d.cts.map +1 -1
  367. package/dist/types/index.d.mts +8 -0
  368. package/dist/types/index.d.mts.map +1 -1
  369. package/dist/types/index.mjs +9 -0
  370. package/dist/types/index.mjs.map +1 -1
  371. package/package.json +8 -4
package/CHANGELOG.md CHANGED
@@ -7,6 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.11.0]
11
+
12
+ ### Added
13
+
14
+ - Added `ButtonFilter` component for filter button functionality ([#964](https://github.com/MetaMask/metamask-design-system/pull/964))
15
+ - Added `BottomSheet` component for modal bottom sheet interactions ([#963](https://github.com/MetaMask/metamask-design-system/pull/963))
16
+ - Added `MainActionButton` component for primary call-to-action buttons ([#952](https://github.com/MetaMask/metamask-design-system/pull/952))
17
+ - Added `BannerBase` component for creating custom banner notifications ([#955](https://github.com/MetaMask/metamask-design-system/pull/955))
18
+ - Added `ListItem` component for standardized list rows ([#958](https://github.com/MetaMask/metamask-design-system/pull/958))
19
+ - Added `TabEmptyState` component for empty tab state displays ([#949](https://github.com/MetaMask/metamask-design-system/pull/949))
20
+ - Added `BottomSheetDialog` component for bottom sheet dialog interactions ([#905](https://github.com/MetaMask/metamask-design-system/pull/905))
21
+
22
+ ### Changed
23
+
24
+ - **BREAKING:** Updated `ButtonIcon` API to use `variant` prop instead of `isInverse` and `isFloating` boolean props ([#948](https://github.com/MetaMask/metamask-design-system/pull/948))
25
+ - Removed `isInverse` and `isFloating` props
26
+ - Added `variant` prop with three options: `ButtonIconVariant.Default` (default), `ButtonIconVariant.Filled` (new muted background with rounded corners), and `ButtonIconVariant.Floating` (replaces `isFloating` behavior)
27
+ - Migration: Replace `isFloating={true}` with `variant={ButtonIconVariant.Floating}`, and use `variant={ButtonIconVariant.Default}` for standard transparent background
28
+ - See [Migration Guide](./MIGRATION.md#from-version-0100-to-0110) for complete migration instructions
29
+ - **BREAKING:** `Input` component now requires `value` prop and is controlled-only ([#960](https://github.com/MetaMask/metamask-design-system/pull/960))
30
+ - Removed `defaultValue` prop - all Input instances must now pass a `value` prop and manage state via `onChange`
31
+ - This change affects all components using `Input` directly, including `TextField`
32
+ - Migration: Convert uncontrolled inputs to controlled by adding state management with `value` and `onChange` props
33
+ - See [Migration Guide](./MIGRATION.md#from-version-0100-to-0110) for complete migration instructions
34
+ - Updated `Ai` icon to filled version for visual consistency ([#970](https://github.com/MetaMask/metamask-design-system/pull/970))
35
+
36
+ ### Fixed
37
+
38
+ - Fixed iOS placeholder alignment issue in `Input` component without affecting typed text rendering ([#960](https://github.com/MetaMask/metamask-design-system/pull/960))
39
+ - Fixed missing component exports in package entry point ([#967](https://github.com/MetaMask/metamask-design-system/pull/967))
40
+
41
+ ## [0.10.0]
42
+
43
+ ### Added
44
+
45
+ - Added `ActionListItem` component for standardized list row actions ([#951](https://github.com/MetaMask/metamask-design-system/pull/951))
46
+ - Added `SensitiveText` component for sensitive value display and reveal interactions ([#922](https://github.com/MetaMask/metamask-design-system/pull/922))
47
+ - Added `ButtonSemantic` component for semantic intent button variants ([#950](https://github.com/MetaMask/metamask-design-system/pull/950))
48
+ - Added `BottomSheetHeader` component for consistent bottom sheet header layouts ([#927](https://github.com/MetaMask/metamask-design-system/pull/927))
49
+ - Added `ButtonHero` to `@metamask/design-system-react-native` ([#934](https://github.com/MetaMask/metamask-design-system/pull/934))
50
+
51
+ ### Changed
52
+
53
+ - **BREAKING:** Updated `BadgeCount` type exports to use the ADR-0003/ADR-0004 const-object + string-union pattern instead of TypeScript enums ([#942](https://github.com/MetaMask/metamask-design-system/pull/942))
54
+ - `BadgeCountSize` is now provided as a const object with a derived union type rather than an enum
55
+ - `BadgeCount` shared prop types are now sourced from `@metamask/design-system-shared`
56
+ - Migration: update any enum-specific usage to const-object/union usage, while continuing to import from `@metamask/design-system-react-native`
57
+
10
58
  ## [0.9.0]
11
59
 
12
60
  ### Added
@@ -187,7 +235,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
187
235
  - Full TypeScript support with type definitions and enums
188
236
  - React Native integration with TWRNC preset support
189
237
 
190
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.9.0...HEAD
238
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.11.0...HEAD
239
+ [0.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.10.0...@metamask/design-system-react-native@0.11.0
240
+ [0.10.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.9.0...@metamask/design-system-react-native@0.10.0
191
241
  [0.9.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.8.0...@metamask/design-system-react-native@0.9.0
192
242
  [0.8.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.7.0...@metamask/design-system-react-native@0.8.0
193
243
  [0.7.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.6.0...@metamask/design-system-react-native@0.7.0
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarBaseProps } from '../AvatarBase';\nimport type {\n ImageOrSvgProps,\n ImageOrSvgSrc,\n} from '../temp-components/ImageOrSvg';\n\n/**\n * AvatarNetwork component props.\n */\nexport type AvatarNetworkProps = {\n /**\n * Optional prop for the source of the image or SVG.\n */\n src?: ImageOrSvgSrc;\n /**\n * Optional props for network name, to be used to calculate the fallbackText.\n */\n name?: string;\n /**\n * Optional prop to pass to the underlying ImageOrSvg element\n * Useful for overriding the default alt text which is the dapp name\n */\n imageOrSvgProps?: Partial<ImageOrSvgProps>;\n} & Omit<AvatarBaseProps, 'children'>;\n"]}
1
+ {"version":3,"file":"AvatarNetwork.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarNetworkPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type {\n ImageOrSvgProps,\n ImageOrSvgSrc,\n} from '../temp-components/ImageOrSvg';\n\n/**\n * AvatarNetwork component props (React Native platform-specific)\n * Extends shared props from @metamask-previews/design-system-shared with React Native-specific platform concerns\n */\nexport type AvatarNetworkProps = AvatarNetworkPropsShared &\n Omit<AvatarBaseProps, 'children'> & {\n /**\n * Optional prop for the source of the image or SVG.\n */\n src?: ImageOrSvgSrc;\n /**\n * Optional prop to pass to the underlying ImageOrSvg element.\n * Useful for overriding the default alt text which is the network name.\n */\n imageOrSvgProps?: Partial<ImageOrSvgProps>;\n };\n"]}
@@ -1,21 +1,19 @@
1
+ import type { AvatarNetworkPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { AvatarBaseProps } from "../AvatarBase/index.cjs";
2
3
  import type { ImageOrSvgProps, ImageOrSvgSrc } from "../temp-components/ImageOrSvg/index.cjs";
3
4
  /**
4
- * AvatarNetwork component props.
5
+ * AvatarNetwork component props (React Native platform-specific)
6
+ * Extends shared props from @metamask-previews/design-system-shared with React Native-specific platform concerns
5
7
  */
6
- export type AvatarNetworkProps = {
8
+ export type AvatarNetworkProps = AvatarNetworkPropsShared & Omit<AvatarBaseProps, 'children'> & {
7
9
  /**
8
10
  * Optional prop for the source of the image or SVG.
9
11
  */
10
12
  src?: ImageOrSvgSrc;
11
13
  /**
12
- * Optional props for network name, to be used to calculate the fallbackText.
13
- */
14
- name?: string;
15
- /**
16
- * Optional prop to pass to the underlying ImageOrSvg element
17
- * Useful for overriding the default alt text which is the dapp name
14
+ * Optional prop to pass to the underlying ImageOrSvg element.
15
+ * Useful for overriding the default alt text which is the network name.
18
16
  */
19
17
  imageOrSvgProps?: Partial<ImageOrSvgProps>;
20
- } & Omit<AvatarBaseProps, 'children'>;
18
+ };
21
19
  //# sourceMappingURL=AvatarNetwork.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACd,gDAAsC;AAEvC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAC5C,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"AvatarNetwork.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AAExF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACd,gDAAsC;AAEvC;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GACvD,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IAClC;;OAEG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAC5C,CAAC"}
@@ -1,21 +1,19 @@
1
+ import type { AvatarNetworkPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { AvatarBaseProps } from "../AvatarBase/index.mjs";
2
3
  import type { ImageOrSvgProps, ImageOrSvgSrc } from "../temp-components/ImageOrSvg/index.mjs";
3
4
  /**
4
- * AvatarNetwork component props.
5
+ * AvatarNetwork component props (React Native platform-specific)
6
+ * Extends shared props from @metamask-previews/design-system-shared with React Native-specific platform concerns
5
7
  */
6
- export type AvatarNetworkProps = {
8
+ export type AvatarNetworkProps = AvatarNetworkPropsShared & Omit<AvatarBaseProps, 'children'> & {
7
9
  /**
8
10
  * Optional prop for the source of the image or SVG.
9
11
  */
10
12
  src?: ImageOrSvgSrc;
11
13
  /**
12
- * Optional props for network name, to be used to calculate the fallbackText.
13
- */
14
- name?: string;
15
- /**
16
- * Optional prop to pass to the underlying ImageOrSvg element
17
- * Useful for overriding the default alt text which is the dapp name
14
+ * Optional prop to pass to the underlying ImageOrSvg element.
15
+ * Useful for overriding the default alt text which is the network name.
18
16
  */
19
17
  imageOrSvgProps?: Partial<ImageOrSvgProps>;
20
- } & Omit<AvatarBaseProps, 'children'>;
18
+ };
21
19
  //# sourceMappingURL=AvatarNetwork.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACd,gDAAsC;AAEvC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAC5C,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"AvatarNetwork.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AAExF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACd,gDAAsC;AAEvC;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GACvD,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG;IAClC;;OAEG;IACH,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CAC5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarBaseProps } from '../AvatarBase';\nimport type {\n ImageOrSvgProps,\n ImageOrSvgSrc,\n} from '../temp-components/ImageOrSvg';\n\n/**\n * AvatarNetwork component props.\n */\nexport type AvatarNetworkProps = {\n /**\n * Optional prop for the source of the image or SVG.\n */\n src?: ImageOrSvgSrc;\n /**\n * Optional props for network name, to be used to calculate the fallbackText.\n */\n name?: string;\n /**\n * Optional prop to pass to the underlying ImageOrSvg element\n * Useful for overriding the default alt text which is the dapp name\n */\n imageOrSvgProps?: Partial<ImageOrSvgProps>;\n} & Omit<AvatarBaseProps, 'children'>;\n"]}
1
+ {"version":3,"file":"AvatarNetwork.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarNetworkPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type {\n ImageOrSvgProps,\n ImageOrSvgSrc,\n} from '../temp-components/ImageOrSvg';\n\n/**\n * AvatarNetwork component props (React Native platform-specific)\n * Extends shared props from @metamask-previews/design-system-shared with React Native-specific platform concerns\n */\nexport type AvatarNetworkProps = AvatarNetworkPropsShared &\n Omit<AvatarBaseProps, 'children'> & {\n /**\n * Optional prop for the source of the image or SVG.\n */\n src?: ImageOrSvgSrc;\n /**\n * Optional prop to pass to the underlying ImageOrSvg element.\n * Useful for overriding the default alt text which is the network name.\n */\n imageOrSvgProps?: Partial<ImageOrSvgProps>;\n };\n"]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.BannerAlert = void 0;
7
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
8
+ const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
9
+ const react_1 = __importDefault(require("react"));
10
+ const types_1 = require("../../types/index.cjs");
11
+ const BannerBase_1 = require("../BannerBase/index.cjs");
12
+ const Icon_1 = require("../Icon/index.cjs");
13
+ const BannerAlert_constants_1 = require("./BannerAlert.constants.cjs");
14
+ const BannerAlert = ({ severity = design_system_shared_1.BannerAlertSeverity.Info, iconProps, style, ...props }) => {
15
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
16
+ const iconName = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];
17
+ const iconColor = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];
18
+ const backgroundColor = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];
19
+ const borderColorClass = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity];
20
+ return (<BannerBase_1.BannerBase startAccessory={<Icon_1.Icon name={iconName} color={iconColor} size={types_1.IconSize.Lg} {...iconProps}/>} backgroundColor={backgroundColor} paddingLeft={2} style={[tw.style(`border-l-4 ${borderColorClass}`), style]} {...props}/>);
21
+ };
22
+ exports.BannerAlert = BannerAlert;
23
+ //# sourceMappingURL=BannerAlert.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAA8E;AAC9E,8FAA4E;AAC5E,kDAA0B;AAE1B,iDAAuC;AACvC,wDAA2C;AAC3C,4CAA+B;AAE/B,uEAKiC;AAG1B,MAAM,WAAW,GAA+B,CAAC,EACtD,QAAQ,GAAG,0CAAmB,CAAC,IAAI,EACnC,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,2DAAmC,CAAC,QAAQ,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,4DAAoC,CAAC,QAAQ,CAAC,CAAC;IACjE,MAAM,eAAe,GAAG,kEAA0C,CAAC,QAAQ,CAAC,CAAC;IAC7E,MAAM,gBAAgB,GAAG,8DAAsC,CAAC,QAAQ,CAAC,CAAC;IAC1E,OAAO,CACL,CAAC,uBAAU,CACT,cAAc,CAAC,CACb,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,gBAAQ,CAAC,EAAE,CAAC,CAClB,IAAI,SAAS,CAAC,EACd,CACH,CACD,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,gBAAgB,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAC3D,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,WAAW,eA2BtB","sourcesContent":["import { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { IconSize } from '../../types';\nimport { BannerBase } from '../BannerBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR,\n MAP_BANNER_ALERT_SEVERITY_ICON_COLOR,\n MAP_BANNER_ALERT_SEVERITY_ICON_NAME,\n MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR,\n} from './BannerAlert.constants';\nimport type { BannerAlertProps } from './BannerAlert.types';\n\nexport const BannerAlert: React.FC<BannerAlertProps> = ({\n severity = BannerAlertSeverity.Info,\n iconProps,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n const iconName = MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];\n const iconColor = MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];\n const backgroundColor = MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];\n const borderColorClass = MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity];\n return (\n <BannerBase\n startAccessory={\n <Icon\n name={iconName}\n color={iconColor}\n size={IconSize.Lg}\n {...iconProps}\n />\n }\n backgroundColor={backgroundColor}\n paddingLeft={2}\n style={[tw.style(`border-l-4 ${borderColorClass}`), style]}\n {...props}\n />\n );\n};\n"]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = exports.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = exports.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = exports.MAP_BANNER_ALERT_SEVERITY_ICON_NAME = void 0;
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ const types_1 = require("../../types/index.cjs");
6
+ exports.MAP_BANNER_ALERT_SEVERITY_ICON_NAME = {
7
+ info: types_1.IconName.Info,
8
+ success: types_1.IconName.Confirmation,
9
+ warning: types_1.IconName.Danger,
10
+ danger: types_1.IconName.Danger,
11
+ };
12
+ exports.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = {
13
+ info: types_1.IconColor.PrimaryDefault,
14
+ success: types_1.IconColor.SuccessDefault,
15
+ warning: types_1.IconColor.WarningDefault,
16
+ danger: types_1.IconColor.ErrorDefault,
17
+ };
18
+ exports.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = {
19
+ info: types_1.BoxBackgroundColor.PrimaryMuted,
20
+ success: types_1.BoxBackgroundColor.SuccessMuted,
21
+ warning: types_1.BoxBackgroundColor.WarningMuted,
22
+ danger: types_1.BoxBackgroundColor.ErrorMuted,
23
+ };
24
+ exports.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = {
25
+ info: types_1.BoxBorderColor.PrimaryDefault,
26
+ success: types_1.BoxBorderColor.SuccessDefault,
27
+ warning: types_1.BoxBorderColor.WarningDefault,
28
+ danger: types_1.BoxBorderColor.ErrorDefault,
29
+ };
30
+ //# sourceMappingURL=BannerAlert.constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":";;;AAAA,kFAA8E;AAE9E,iDAKqB;AAER,QAAA,mCAAmC,GAG5C;IACF,IAAI,EAAE,gBAAQ,CAAC,IAAI;IACnB,OAAO,EAAE,gBAAQ,CAAC,YAAY;IAC9B,OAAO,EAAE,gBAAQ,CAAC,MAAM;IACxB,MAAM,EAAE,gBAAQ,CAAC,MAAM;CACxB,CAAC;AAEW,QAAA,oCAAoC,GAG7C;IACF,IAAI,EAAE,iBAAS,CAAC,cAAc;IAC9B,OAAO,EAAE,iBAAS,CAAC,cAAc;IACjC,OAAO,EAAE,iBAAS,CAAC,cAAc;IACjC,MAAM,EAAE,iBAAS,CAAC,YAAY;CAC/B,CAAC;AAEW,QAAA,0CAA0C,GAGnD;IACF,IAAI,EAAE,0BAAkB,CAAC,YAAY;IACrC,OAAO,EAAE,0BAAkB,CAAC,YAAY;IACxC,OAAO,EAAE,0BAAkB,CAAC,YAAY;IACxC,MAAM,EAAE,0BAAkB,CAAC,UAAU;CACtC,CAAC;AAEW,QAAA,sCAAsC,GAG/C;IACF,IAAI,EAAE,sBAAc,CAAC,cAAc;IACnC,OAAO,EAAE,sBAAc,CAAC,cAAc;IACtC,OAAO,EAAE,sBAAc,CAAC,cAAc;IACtC,MAAM,EAAE,sBAAc,CAAC,YAAY;CACpC,CAAC","sourcesContent":["import { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\n\nimport {\n BoxBackgroundColor,\n BoxBorderColor,\n IconColor,\n IconName,\n} from '../../types';\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconName\n> = {\n info: IconName.Info,\n success: IconName.Confirmation,\n warning: IconName.Danger,\n danger: IconName.Danger,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconColor\n> = {\n info: IconColor.PrimaryDefault,\n success: IconColor.SuccessDefault,\n warning: IconColor.WarningDefault,\n danger: IconColor.ErrorDefault,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBackgroundColor\n> = {\n info: BoxBackgroundColor.PrimaryMuted,\n success: BoxBackgroundColor.SuccessMuted,\n warning: BoxBackgroundColor.WarningMuted,\n danger: BoxBackgroundColor.ErrorMuted,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBorderColor\n> = {\n info: BoxBorderColor.PrimaryDefault,\n success: BoxBorderColor.SuccessDefault,\n warning: BoxBorderColor.WarningDefault,\n danger: BoxBorderColor.ErrorDefault,\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
+ import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.cjs";
3
+ export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
4
+ export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
5
+ export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
6
+ export declare const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBorderColor>;
7
+ //# sourceMappingURL=BannerAlert.constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAE9E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,QAAQ,EACT,8BAAoB;AAErB,eAAO,MAAM,mCAAmC,EAAE,MAAM,CACtD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,QAAQ,CAMT,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,SAAS,CAMV,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAC7D,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,kBAAkB,CAMnB,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CACzD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,cAAc,CAMf,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
+ import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.mjs";
3
+ export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
4
+ export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
5
+ export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
6
+ export declare const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBorderColor>;
7
+ //# sourceMappingURL=BannerAlert.constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAE9E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,QAAQ,EACT,8BAAoB;AAErB,eAAO,MAAM,mCAAmC,EAAE,MAAM,CACtD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,QAAQ,CAMT,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,SAAS,CAMV,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAC7D,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,kBAAkB,CAMnB,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CACzD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,cAAc,CAMf,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
+ import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.mjs";
3
+ export const MAP_BANNER_ALERT_SEVERITY_ICON_NAME = {
4
+ info: IconName.Info,
5
+ success: IconName.Confirmation,
6
+ warning: IconName.Danger,
7
+ danger: IconName.Danger,
8
+ };
9
+ export const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = {
10
+ info: IconColor.PrimaryDefault,
11
+ success: IconColor.SuccessDefault,
12
+ warning: IconColor.WarningDefault,
13
+ danger: IconColor.ErrorDefault,
14
+ };
15
+ export const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = {
16
+ info: BoxBackgroundColor.PrimaryMuted,
17
+ success: BoxBackgroundColor.SuccessMuted,
18
+ warning: BoxBackgroundColor.WarningMuted,
19
+ danger: BoxBackgroundColor.ErrorMuted,
20
+ };
21
+ export const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = {
22
+ info: BoxBorderColor.PrimaryDefault,
23
+ success: BoxBorderColor.SuccessDefault,
24
+ warning: BoxBorderColor.WarningDefault,
25
+ danger: BoxBorderColor.ErrorDefault,
26
+ };
27
+ //# sourceMappingURL=BannerAlert.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAE9E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,QAAQ,EACT,8BAAoB;AAErB,MAAM,CAAC,MAAM,mCAAmC,GAG5C;IACF,IAAI,EAAE,QAAQ,CAAC,IAAI;IACnB,OAAO,EAAE,QAAQ,CAAC,YAAY;IAC9B,OAAO,EAAE,QAAQ,CAAC,MAAM;IACxB,MAAM,EAAE,QAAQ,CAAC,MAAM;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAG7C;IACF,IAAI,EAAE,SAAS,CAAC,cAAc;IAC9B,OAAO,EAAE,SAAS,CAAC,cAAc;IACjC,OAAO,EAAE,SAAS,CAAC,cAAc;IACjC,MAAM,EAAE,SAAS,CAAC,YAAY;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAGnD;IACF,IAAI,EAAE,kBAAkB,CAAC,YAAY;IACrC,OAAO,EAAE,kBAAkB,CAAC,YAAY;IACxC,OAAO,EAAE,kBAAkB,CAAC,YAAY;IACxC,MAAM,EAAE,kBAAkB,CAAC,UAAU;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAG/C;IACF,IAAI,EAAE,cAAc,CAAC,cAAc;IACnC,OAAO,EAAE,cAAc,CAAC,cAAc;IACtC,OAAO,EAAE,cAAc,CAAC,cAAc;IACtC,MAAM,EAAE,cAAc,CAAC,YAAY;CACpC,CAAC","sourcesContent":["import { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\n\nimport {\n BoxBackgroundColor,\n BoxBorderColor,\n IconColor,\n IconName,\n} from '../../types';\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconName\n> = {\n info: IconName.Info,\n success: IconName.Confirmation,\n warning: IconName.Danger,\n danger: IconName.Danger,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconColor\n> = {\n info: IconColor.PrimaryDefault,\n success: IconColor.SuccessDefault,\n warning: IconColor.WarningDefault,\n danger: IconColor.ErrorDefault,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBackgroundColor\n> = {\n info: BoxBackgroundColor.PrimaryMuted,\n success: BoxBackgroundColor.SuccessMuted,\n warning: BoxBackgroundColor.WarningMuted,\n danger: BoxBackgroundColor.ErrorMuted,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBorderColor\n> = {\n info: BoxBorderColor.PrimaryDefault,\n success: BoxBorderColor.SuccessDefault,\n warning: BoxBorderColor.WarningDefault,\n danger: BoxBorderColor.ErrorDefault,\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { BannerAlertProps } from "./BannerAlert.types.cjs";
3
+ export declare const BannerAlert: React.FC<BannerAlertProps>;
4
+ //# sourceMappingURL=BannerAlert.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2BlD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { BannerAlertProps } from "./BannerAlert.types.mjs";
3
+ export declare const BannerAlert: React.FC<BannerAlertProps>;
4
+ //# sourceMappingURL=BannerAlert.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAY1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA2BlD,CAAC"}
@@ -0,0 +1,23 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
8
+ import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
9
+ import $React from "react";
10
+ const React = $importDefault($React);
11
+ import { IconSize } from "../../types/index.mjs";
12
+ import { BannerBase } from "../BannerBase/index.mjs";
13
+ import { Icon } from "../Icon/index.mjs";
14
+ import { MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR, MAP_BANNER_ALERT_SEVERITY_ICON_COLOR, MAP_BANNER_ALERT_SEVERITY_ICON_NAME, MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR } from "./BannerAlert.constants.mjs";
15
+ export const BannerAlert = ({ severity = BannerAlertSeverity.Info, iconProps, style, ...props }) => {
16
+ const tw = useTailwind();
17
+ const iconName = MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];
18
+ const iconColor = MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];
19
+ const backgroundColor = MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];
20
+ const borderColorClass = MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity];
21
+ return (<BannerBase startAccessory={<Icon name={iconName} color={iconColor} size={IconSize.Lg} {...iconProps}/>} backgroundColor={backgroundColor} paddingLeft={2} style={[tw.style(`border-l-4 ${borderColorClass}`), style]} {...props}/>);
22
+ };
23
+ //# sourceMappingURL=BannerAlert.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AACvC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAE/B,OAAO,EACL,0CAA0C,EAC1C,oCAAoC,EACpC,mCAAmC,EACnC,sCAAsC,EACvC,oCAAgC;AAGjC,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,QAAQ,GAAG,mBAAmB,CAAC,IAAI,EACnC,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,mCAAmC,CAAC,QAAQ,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,oCAAoC,CAAC,QAAQ,CAAC,CAAC;IACjE,MAAM,eAAe,GAAG,0CAA0C,CAAC,QAAQ,CAAC,CAAC;IAC7E,MAAM,gBAAgB,GAAG,sCAAsC,CAAC,QAAQ,CAAC,CAAC;IAC1E,OAAO,CACL,CAAC,UAAU,CACT,cAAc,CAAC,CACb,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,KAAK,CAAC,CAAC,SAAS,CAAC,CACjB,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,IAAI,SAAS,CAAC,EACd,CACH,CACD,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,gBAAgB,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,CAC3D,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { IconSize } from '../../types';\nimport { BannerBase } from '../BannerBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR,\n MAP_BANNER_ALERT_SEVERITY_ICON_COLOR,\n MAP_BANNER_ALERT_SEVERITY_ICON_NAME,\n MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR,\n} from './BannerAlert.constants';\nimport type { BannerAlertProps } from './BannerAlert.types';\n\nexport const BannerAlert: React.FC<BannerAlertProps> = ({\n severity = BannerAlertSeverity.Info,\n iconProps,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n const iconName = MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];\n const iconColor = MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];\n const backgroundColor = MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];\n const borderColorClass = MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity];\n return (\n <BannerBase\n startAccessory={\n <Icon\n name={iconName}\n color={iconColor}\n size={IconSize.Lg}\n {...iconProps}\n />\n }\n backgroundColor={backgroundColor}\n paddingLeft={2}\n style={[tw.style(`border-l-4 ${borderColorClass}`), style]}\n {...props}\n />\n );\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=BannerAlert.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.types.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerAlertPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\n/**\n * BannerAlert component props (React Native platform-specific).\n */\nexport type BannerAlertProps = BannerAlertPropsShared &\n BannerBaseProps & {\n iconProps?: Omit<IconProps, 'name' | 'size' | 'color'>;\n };\n"]}
@@ -0,0 +1,10 @@
1
+ import type { BannerAlertPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BannerBaseProps } from "../BannerBase/index.cjs";
3
+ import type { IconProps } from "../Icon/Icon.types.cjs";
4
+ /**
5
+ * BannerAlert component props (React Native platform-specific).
6
+ */
7
+ export type BannerAlertProps = BannerAlertPropsShared & BannerBaseProps & {
8
+ iconProps?: Omit<IconProps, 'name' | 'size' | 'color'>;
9
+ };
10
+ //# sourceMappingURL=BannerAlert.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.types.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,eAAe,GAAG;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACxD,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { BannerAlertPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BannerBaseProps } from "../BannerBase/index.mjs";
3
+ import type { IconProps } from "../Icon/Icon.types.mjs";
4
+ /**
5
+ * BannerAlert component props (React Native platform-specific).
6
+ */
7
+ export type BannerAlertProps = BannerAlertPropsShared & BannerBaseProps & {
8
+ iconProps?: Omit<IconProps, 'name' | 'size' | 'color'>;
9
+ };
10
+ //# sourceMappingURL=BannerAlert.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.types.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AAEtF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,eAAe,GAAG;IAChB,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;CACxD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BannerAlert.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAlert.types.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BannerAlertPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BannerBaseProps } from '../BannerBase';\nimport type { IconProps } from '../Icon/Icon.types';\n\n/**\n * BannerAlert component props (React Native platform-specific).\n */\nexport type BannerAlertProps = BannerAlertPropsShared &\n BannerBaseProps & {\n iconProps?: Omit<IconProps, 'name' | 'size' | 'color'>;\n };\n"]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BannerAlert = exports.BannerAlertSeverity = void 0;
4
+ var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ Object.defineProperty(exports, "BannerAlertSeverity", { enumerable: true, get: function () { return design_system_shared_1.BannerAlertSeverity; } });
6
+ var BannerAlert_1 = require("./BannerAlert.cjs");
7
+ Object.defineProperty(exports, "BannerAlert", { enumerable: true, get: function () { return BannerAlert_1.BannerAlert; } });
8
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":";;;AAAA,gFAA8E;AAArE,2HAAA,mBAAmB,OAAA;AAC5B,iDAA4C;AAAnC,0GAAA,WAAW,OAAA","sourcesContent":["export { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nexport { BannerAlert } from './BannerAlert';\nexport type { BannerAlertProps } from './BannerAlert.types';\n"]}
@@ -0,0 +1,4 @@
1
+ export { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
+ export { BannerAlert } from "./BannerAlert.cjs";
3
+ export type { BannerAlertProps } from "./BannerAlert.types.cjs";
4
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gCAA4B"}
@@ -0,0 +1,4 @@
1
+ export { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
+ export { BannerAlert } from "./BannerAlert.mjs";
3
+ export type { BannerAlertProps } from "./BannerAlert.types.mjs";
4
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gCAA4B"}
@@ -0,0 +1,3 @@
1
+ export { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
+ export { BannerAlert } from "./BannerAlert.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,EAAE,WAAW,EAAE,0BAAsB","sourcesContent":["export { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nexport { BannerAlert } from './BannerAlert';\nexport type { BannerAlertProps } from './BannerAlert.types';\n"]}
@@ -56,7 +56,7 @@ const BannerBase = ({ title, titleProps, description, descriptionProps, children
56
56
  </Box_1.Box>)}
57
57
  </Box_1.Box>
58
58
 
59
- {shouldShowCloseButton && (<ButtonIcon_1.ButtonIcon testID="banner-base-close-button" twClassName={mergedCloseButtonTwClassName} iconName={types_1.IconName.Close} size={types_1.ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
59
+ {shouldShowCloseButton && (<ButtonIcon_1.ButtonIcon twClassName={mergedCloseButtonTwClassName} iconName={types_1.IconName.Close} size={types_1.ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
60
60
  </Box_1.Box>);
61
61
  };
62
62
  exports.BannerBase = BannerBase;
@@ -1 +1 @@
1
- {"version":3,"file":"BannerBase.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,iDASqB;AACrB,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAC3C,4CAA+B;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAw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,WAAI,CAAC,OAAO,CAAC,CAAC,mBAAW,CAAC,MAAM,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAC1D;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,WAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAC,CAEJ;;QAAA,CAAC,sBAAsB,IAAI,CACzB,CAAC,SAAG,CAAC,WAAW,CAAC,MAAM,CACrB;YAAA,CAAC,eAAM,CACL,IAAI,CAAC,CAAC,kBAAU,CAAC,EAAE,CAAC,CACpB,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,IAAI,yBAAyB,CAAC,CAE9B;cAAA,CAAC,iBAAiB,CACpB;YAAA,EAAE,eAAM,CACV;UAAA,EAAE,SAAG,CAAC,CACP,CACH;MAAA,EAAE,SAAG,CAEL;;MAAA,CAAC,qBAAqB,IAAI,CACxB,CAAC,uBAAU,CACT,MAAM,CAAC,0BAA0B,CACjC,WAAW,CAAC,CAAC,4BAA4B,CAAC,CAC1C,QAAQ,CAAC,CAAC,gBAAQ,CAAC,KAAK,CAAC,CACzB,IAAI,CAAC,CAAC,sBAAc,CAAC,EAAE,CAAC,CACxB,kBAAkB,CAAC,CAAC,6BAA6B,CAAC,CAClD,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAC1B,IAAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AApHW,QAAA,UAAU,cAoHrB","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n testID=\"banner-base-close-button\"\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
1
+ {"version":3,"file":"BannerBase.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAG1B,iDASqB;AACrB,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAC3C,4CAA+B;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC;AAE7D,MAAM,UAAU,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC9C,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AAErC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,kBAAkB,EAAE,6BAA6B,GAAG,cAAc,EAClE,OAAO,EAAE,uBAAuB,EAChC,WAAW,EAAE,sBAAsB,EACnC,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,I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,gBAAQ,CAAC,KAAK,CAAC,CACzB,IAAI,CAAC,CAAC,sBAAc,CAAC,EAAE,CAAC,CACxB,kBAAkB,CAAC,CAAC,6BAA6B,CAAC,CAClD,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAC1B,IAAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAnHW,QAAA,UAAU,cAmHrB","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoHhD,CAAC"}
1
+ {"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoHhD,CAAC"}
1
+ {"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAkB1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
@@ -57,7 +57,7 @@ export const BannerBase = ({ title, titleProps, description, descriptionProps, c
57
57
  </Box>)}
58
58
  </Box>
59
59
 
60
- {shouldShowCloseButton && (<ButtonIcon testID="banner-base-close-button" twClassName={mergedCloseButtonTwClassName} iconName={IconName.Close} size={ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
60
+ {shouldShowCloseButton && (<ButtonIcon twClassName={mergedCloseButtonTwClassName} iconName={IconName.Close} size={ButtonIconSize.Sm} accessibilityLabel={closeButtonAccessibilityLabel} onPress={handleClosePress} {...resolvedCloseButtonProps}/>)}
61
61
  </Box>);
62
62
  };
63
63
  //# sourceMappingURL=BannerBase.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerB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,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n testID=\"banner-base-close-button\"\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
1
+ {"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAG1B,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACZ,8BAAoB;AACrB,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO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AAC,CAAC,IAAI,oBAAoB,CAAC,CAC1D;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAC,CAEJ;;QAAA,CAAC,sBAAsB,IAAI,CACzB,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CACrB;YAAA,CAAC,MAAM,CACL,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CACpB,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,IAAI,yBAAyB,CAAC,CAE9B;cAAA,CAAC,iBAAiB,CACpB;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,GAAG,CAEL;;MAAA,CAAC,qBAAqB,IAAI,CACxB,CAAC,UAAU,CACT,WAAW,CAAC,CAAC,4BAA4B,CAAC,CAC1C,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACzB,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CACxB,kBAAkB,CAAC,CAAC,6BAA6B,CAAC,CAClD,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAC1B,IAAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n BoxAlignItems,\n BoxBackgroundColor,\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n BoxFlexDirection,\n IconName,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box twClassName={hasContent(title) ? 'mt-1' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}