@metamask-previews/design-system-react-native 0.11.0-preview.fa05289 → 0.13.0-preview.69c659c

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 (293) hide show
  1. package/CHANGELOG.md +30 -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/BadgeWrapper/BadgeWrapper.cjs +8 -8
  9. package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
  10. package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
  11. package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
  12. package/dist/components/BadgeWrapper/BadgeWrapper.mjs +1 -1
  13. package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
  14. package/dist/components/BadgeWrapper/BadgeWrapper.types.cjs.map +1 -1
  15. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts +4 -51
  16. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts.map +1 -1
  17. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts +4 -51
  18. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts.map +1 -1
  19. package/dist/components/BadgeWrapper/BadgeWrapper.types.mjs.map +1 -1
  20. package/dist/components/BadgeWrapper/index.cjs +3 -3
  21. package/dist/components/BadgeWrapper/index.cjs.map +1 -1
  22. package/dist/components/BadgeWrapper/index.d.cts +1 -2
  23. package/dist/components/BadgeWrapper/index.d.cts.map +1 -1
  24. package/dist/components/BadgeWrapper/index.d.mts +1 -2
  25. package/dist/components/BadgeWrapper/index.d.mts.map +1 -1
  26. package/dist/components/BadgeWrapper/index.mjs +1 -1
  27. package/dist/components/BadgeWrapper/index.mjs.map +1 -1
  28. package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -8
  29. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  30. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
  31. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  32. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
  33. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  34. package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
  35. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  36. package/dist/components/BannerBase/BannerBase.cjs +2 -1
  37. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  38. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  39. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  40. package/dist/components/BannerBase/BannerBase.mjs +2 -1
  41. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  42. package/dist/components/BottomSheet/BottomSheet.cjs +2 -2
  43. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  44. package/dist/components/BottomSheet/BottomSheet.d.cts +30 -0
  45. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
  46. package/dist/components/BottomSheet/BottomSheet.d.mts +30 -0
  47. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
  48. package/dist/components/BottomSheet/BottomSheet.mjs +2 -2
  49. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
  50. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +2 -2
  51. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  52. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +30 -0
  53. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
  54. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +30 -0
  55. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
  56. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +2 -2
  57. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  58. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -1
  59. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +7 -0
  60. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -1
  61. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +7 -0
  62. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -1
  63. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -1
  64. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +2 -2
  65. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
  66. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +2 -2
  67. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
  68. package/dist/components/Box/Box.constants.cjs.map +1 -1
  69. package/dist/components/Box/Box.constants.d.cts +1 -1
  70. package/dist/components/Box/Box.constants.d.cts.map +1 -1
  71. package/dist/components/Box/Box.constants.d.mts +1 -1
  72. package/dist/components/Box/Box.constants.d.mts.map +1 -1
  73. package/dist/components/Box/Box.constants.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/BoxHorizontal/BoxHorizontal.cjs +18 -0
  89. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +1 -0
  90. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +7 -0
  91. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +1 -0
  92. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +7 -0
  93. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +1 -0
  94. package/dist/components/BoxHorizontal/BoxHorizontal.mjs +18 -0
  95. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +1 -0
  96. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs +3 -0
  97. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +1 -0
  98. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +13 -0
  99. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +1 -0
  100. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +13 -0
  101. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +1 -0
  102. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +2 -0
  103. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +1 -0
  104. package/dist/components/BoxHorizontal/index.cjs +6 -0
  105. package/dist/components/BoxHorizontal/index.cjs.map +1 -0
  106. package/dist/components/BoxHorizontal/index.d.cts +3 -0
  107. package/dist/components/BoxHorizontal/index.d.cts.map +1 -0
  108. package/dist/components/BoxHorizontal/index.d.mts +3 -0
  109. package/dist/components/BoxHorizontal/index.d.mts.map +1 -0
  110. package/dist/components/BoxHorizontal/index.mjs +2 -0
  111. package/dist/components/BoxHorizontal/index.mjs.map +1 -0
  112. package/dist/components/BoxVertical/BoxVertical.cjs +18 -0
  113. package/dist/components/BoxVertical/BoxVertical.cjs.map +1 -0
  114. package/dist/components/BoxVertical/BoxVertical.d.cts +7 -0
  115. package/dist/components/BoxVertical/BoxVertical.d.cts.map +1 -0
  116. package/dist/components/BoxVertical/BoxVertical.d.mts +7 -0
  117. package/dist/components/BoxVertical/BoxVertical.d.mts.map +1 -0
  118. package/dist/components/BoxVertical/BoxVertical.mjs +18 -0
  119. package/dist/components/BoxVertical/BoxVertical.mjs.map +1 -0
  120. package/dist/components/BoxVertical/BoxVertical.types.cjs +3 -0
  121. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +1 -0
  122. package/dist/components/BoxVertical/BoxVertical.types.d.cts +13 -0
  123. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +1 -0
  124. package/dist/components/BoxVertical/BoxVertical.types.d.mts +13 -0
  125. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +1 -0
  126. package/dist/components/BoxVertical/BoxVertical.types.mjs +2 -0
  127. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +1 -0
  128. package/dist/components/BoxVertical/index.cjs +6 -0
  129. package/dist/components/BoxVertical/index.cjs.map +1 -0
  130. package/dist/components/BoxVertical/index.d.cts +3 -0
  131. package/dist/components/BoxVertical/index.d.cts.map +1 -0
  132. package/dist/components/BoxVertical/index.d.mts +3 -0
  133. package/dist/components/BoxVertical/index.d.mts.map +1 -0
  134. package/dist/components/BoxVertical/index.mjs +2 -0
  135. package/dist/components/BoxVertical/index.mjs.map +1 -0
  136. package/dist/components/Icon/assets/candlestick.svg +1 -1
  137. package/dist/components/Input/Input.cjs +4 -3
  138. package/dist/components/Input/Input.cjs.map +1 -1
  139. package/dist/components/Input/Input.constants.cjs +69 -0
  140. package/dist/components/Input/Input.constants.cjs.map +1 -0
  141. package/dist/components/Input/Input.constants.d.cts +11 -0
  142. package/dist/components/Input/Input.constants.d.cts.map +1 -0
  143. package/dist/components/Input/Input.constants.d.mts +11 -0
  144. package/dist/components/Input/Input.constants.d.mts.map +1 -0
  145. package/dist/components/Input/Input.constants.mjs +66 -0
  146. package/dist/components/Input/Input.constants.mjs.map +1 -0
  147. package/dist/components/Input/Input.d.cts.map +1 -1
  148. package/dist/components/Input/Input.d.mts.map +1 -1
  149. package/dist/components/Input/Input.mjs +4 -3
  150. package/dist/components/Input/Input.mjs.map +1 -1
  151. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +33 -0
  152. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +1 -0
  153. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +14 -0
  154. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +1 -0
  155. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +14 -0
  156. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +1 -0
  157. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +35 -0
  158. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +1 -0
  159. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +39 -0
  160. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +1 -0
  161. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +25 -0
  162. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +1 -0
  163. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +25 -0
  164. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +1 -0
  165. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +41 -0
  166. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +1 -0
  167. package/dist/components/KeyValueRow/KeyValueRow.cjs +76 -0
  168. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -0
  169. package/dist/components/KeyValueRow/KeyValueRow.d.cts +25 -0
  170. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -0
  171. package/dist/components/KeyValueRow/KeyValueRow.d.mts +25 -0
  172. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -0
  173. package/dist/components/KeyValueRow/KeyValueRow.mjs +77 -0
  174. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -0
  175. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +29 -0
  176. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -0
  177. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +177 -0
  178. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -0
  179. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +177 -0
  180. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -0
  181. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +26 -0
  182. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -0
  183. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +6 -0
  184. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +1 -0
  185. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +3 -0
  186. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +1 -0
  187. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +3 -0
  188. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +1 -0
  189. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +2 -0
  190. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +1 -0
  191. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +29 -0
  192. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +1 -0
  193. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +17 -0
  194. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +1 -0
  195. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +17 -0
  196. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +1 -0
  197. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +31 -0
  198. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +1 -0
  199. package/dist/components/KeyValueRow/index.cjs +15 -0
  200. package/dist/components/KeyValueRow/index.cjs.map +1 -0
  201. package/dist/components/KeyValueRow/index.d.cts +3 -0
  202. package/dist/components/KeyValueRow/index.d.cts.map +1 -0
  203. package/dist/components/KeyValueRow/index.d.mts +3 -0
  204. package/dist/components/KeyValueRow/index.d.mts.map +1 -0
  205. package/dist/components/KeyValueRow/index.mjs +3 -0
  206. package/dist/components/KeyValueRow/index.mjs.map +1 -0
  207. package/dist/components/Text/Text.types.cjs.map +1 -1
  208. package/dist/components/Text/Text.types.d.cts +1 -1
  209. package/dist/components/Text/Text.types.d.mts +1 -1
  210. package/dist/components/Text/Text.types.mjs.map +1 -1
  211. package/dist/components/TextButton/TextButton.cjs +12 -36
  212. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  213. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  214. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  215. package/dist/components/TextButton/TextButton.mjs +14 -38
  216. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  217. package/dist/components/TextButton/TextButton.types.cjs.map +1 -1
  218. package/dist/components/TextButton/TextButton.types.d.cts +8 -60
  219. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  220. package/dist/components/TextButton/TextButton.types.d.mts +8 -60
  221. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  222. package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
  223. package/dist/components/TextButton/index.cjs +1 -3
  224. package/dist/components/TextButton/index.cjs.map +1 -1
  225. package/dist/components/TextButton/index.d.cts +0 -1
  226. package/dist/components/TextButton/index.d.cts.map +1 -1
  227. package/dist/components/TextButton/index.d.mts +0 -1
  228. package/dist/components/TextButton/index.d.mts.map +1 -1
  229. package/dist/components/TextButton/index.mjs +0 -1
  230. package/dist/components/TextButton/index.mjs.map +1 -1
  231. package/dist/components/TextField/TextField.cjs +22 -8
  232. package/dist/components/TextField/TextField.cjs.map +1 -1
  233. package/dist/components/TextField/TextField.d.cts +0 -2
  234. package/dist/components/TextField/TextField.d.cts.map +1 -1
  235. package/dist/components/TextField/TextField.d.mts +0 -2
  236. package/dist/components/TextField/TextField.d.mts.map +1 -1
  237. package/dist/components/TextField/TextField.mjs +22 -8
  238. package/dist/components/TextField/TextField.mjs.map +1 -1
  239. package/dist/components/TextField/TextField.types.cjs +0 -10
  240. package/dist/components/TextField/TextField.types.cjs.map +1 -1
  241. package/dist/components/TextField/TextField.types.d.cts +0 -14
  242. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  243. package/dist/components/TextField/TextField.types.d.mts +0 -14
  244. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  245. package/dist/components/TextField/TextField.types.mjs +1 -9
  246. package/dist/components/TextField/TextField.types.mjs.map +1 -1
  247. package/dist/components/TextField/index.cjs +1 -3
  248. package/dist/components/TextField/index.cjs.map +1 -1
  249. package/dist/components/TextField/index.d.cts +0 -1
  250. package/dist/components/TextField/index.d.cts.map +1 -1
  251. package/dist/components/TextField/index.d.mts +0 -1
  252. package/dist/components/TextField/index.d.mts.map +1 -1
  253. package/dist/components/TextField/index.mjs +0 -1
  254. package/dist/components/TextField/index.mjs.map +1 -1
  255. package/dist/components/index.cjs +6 -4
  256. package/dist/components/index.cjs.map +1 -1
  257. package/dist/components/index.d.cts +6 -2
  258. package/dist/components/index.d.cts.map +1 -1
  259. package/dist/components/index.d.mts +6 -2
  260. package/dist/components/index.d.mts.map +1 -1
  261. package/dist/components/index.mjs +4 -2
  262. package/dist/components/index.mjs.map +1 -1
  263. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
  264. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +2 -5
  265. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts.map +1 -1
  266. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +2 -5
  267. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts.map +1 -1
  268. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
  269. package/dist/types/index.cjs +3 -203
  270. package/dist/types/index.cjs.map +1 -1
  271. package/dist/types/index.d.cts +2 -210
  272. package/dist/types/index.d.cts.map +1 -1
  273. package/dist/types/index.d.mts +2 -210
  274. package/dist/types/index.d.mts.map +1 -1
  275. package/dist/types/index.mjs +2 -202
  276. package/dist/types/index.mjs.map +1 -1
  277. package/package.json +5 -6
  278. package/dist/components/TextButton/TextButton.constants.cjs +0 -12
  279. package/dist/components/TextButton/TextButton.constants.cjs.map +0 -1
  280. package/dist/components/TextButton/TextButton.constants.d.cts +0 -4
  281. package/dist/components/TextButton/TextButton.constants.d.cts.map +0 -1
  282. package/dist/components/TextButton/TextButton.constants.d.mts +0 -4
  283. package/dist/components/TextButton/TextButton.constants.d.mts.map +0 -1
  284. package/dist/components/TextButton/TextButton.constants.mjs +0 -9
  285. package/dist/components/TextButton/TextButton.constants.mjs.map +0 -1
  286. package/dist/components/TextField/TextField.constants.cjs +0 -13
  287. package/dist/components/TextField/TextField.constants.cjs.map +0 -1
  288. package/dist/components/TextField/TextField.constants.d.cts +0 -6
  289. package/dist/components/TextField/TextField.constants.d.cts.map +0 -1
  290. package/dist/components/TextField/TextField.constants.d.mts +0 -6
  291. package/dist/components/TextField/TextField.constants.d.mts.map +0 -1
  292. package/dist/components/TextField/TextField.constants.mjs +0 -10
  293. package/dist/components/TextField/TextField.constants.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.13.0]
11
+
12
+ ### Changed
13
+
14
+ - `FontWeight.Bold` and the React Native `Text` component now describe bold as weight 600; the Storybook mobile `FontLoader` and `@metamask/design-system-twrnc-preset` now reference the `Geist-SemiBold`/`Geist-SemiBoldItalic` assets, so update any custom font registrations that previously assumed weight 700 as explained in the [migration guide](./MIGRATION.md#from-version-0120-to-0130) ([#1017](https://github.com/MetaMask/metamask-design-system/pull/1017)).
15
+ - `BadgeWrapperPosition`, `BadgeWrapperPositionAnchorShape`, `BadgeWrapperCustomPosition`, and `BadgeWrapperPropsShared` now derive from const objects annotated `as const`, producing string-union typings per ADR-0003/ADR-0004; the React Native entry point still exports the same names, so your imports stay on `@metamask/design-system-react-native` while the shared package hosts the canonical definitions ([#1014](https://github.com/MetaMask/metamask-design-system/pull/1014); see https://github.com/MetaMask/decisions/blob/main/decisions/design-system/0003-enum-to-string-union-migration.md and https://github.com/MetaMask/decisions/blob/main/decisions/design-system/0004-centralized-types-architecture.md).
16
+ - Documented the Button migration instructions (prop, variant, and size mappings) in [MIGRATION.md#button-component](./MIGRATION.md#button-component) so both web and native developers follow the same before/after story ([#999](https://github.com/MetaMask/metamask-design-system/pull/999)).
17
+
18
+ ## [0.12.0]
19
+
20
+ ### Added
21
+
22
+ - Added `BannerAlert` component ([#966](https://github.com/MetaMask/metamask-design-system/pull/966))
23
+ - Added `KeyValueRow` component ([#959](https://github.com/MetaMask/metamask-design-system/pull/959))
24
+
25
+ ### Changed
26
+
27
+ - **BREAKING:** Simplified `TextButton` to a text-only control and removed `size`/`TextButtonSize`, inverse/disabled props, and icon/accessory props ([#1001](https://github.com/MetaMask/metamask-design-system/pull/1001))
28
+ - See [Migration Guide](./MIGRATION.md#from-version-0110-to-0120)
29
+ - **BREAKING:** Removed `TextFieldSize` and the `size` prop; `TextField` is now a single fixed-height (48px) row ([#1000](https://github.com/MetaMask/metamask-design-system/pull/1000))
30
+ - See [Migration Guide](./MIGRATION.md#from-version-0110-to-0120)
31
+ - Updated `Candlestick` icon asset with smaller size variant ([#998](https://github.com/MetaMask/metamask-design-system/pull/998))
32
+
33
+ ### Fixed
34
+
35
+ - Improved `Input` single-line typography alignment (including iOS placeholder behavior) ([#1000](https://github.com/MetaMask/metamask-design-system/pull/1000))
36
+
10
37
  ## [0.11.0]
11
38
 
12
39
  ### Added
@@ -235,7 +262,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
235
262
  - Full TypeScript support with type definitions and enums
236
263
  - React Native integration with TWRNC preset support
237
264
 
238
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.11.0...HEAD
265
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.13.0...HEAD
266
+ [0.13.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.12.0...@metamask/design-system-react-native@0.13.0
267
+ [0.12.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.11.0...@metamask/design-system-react-native@0.12.0
239
268
  [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
269
  [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
241
270
  [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
@@ -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"]}
@@ -24,11 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.BadgeWrapper = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
28
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
28
29
  const react_1 = __importStar(require("react"));
29
30
  const react_native_1 = require("react-native/index.js");
30
- const types_1 = require("../../types/index.cjs");
31
- const BadgeWrapper = ({ children, childrenContainerProps, badge, badgeContainerProps, position = types_1.BadgeWrapperPosition.BottomRight, positionAnchorShape = types_1.BadgeWrapperPositionAnchorShape.Circular, positionXOffset = 0, positionYOffset = 0, customPosition, twClassName, style, ...props }) => {
31
+ const BadgeWrapper = ({ children, childrenContainerProps, badge, badgeContainerProps, position = design_system_shared_1.BadgeWrapperPosition.BottomRight, positionAnchorShape = design_system_shared_1.BadgeWrapperPositionAnchorShape.Circular, positionXOffset = 0, positionYOffset = 0, customPosition, twClassName, style, ...props }) => {
32
32
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
33
33
  const [anchorWidth, setAnchorWidth] = (0, react_1.useState)(0);
34
34
  const [anchorHeight, setAnchorHeight] = (0, react_1.useState)(0);
@@ -52,10 +52,10 @@ const BadgeWrapper = ({ children, childrenContainerProps, badge, badgeContainerP
52
52
  // 0.1464 is a mathematical coeeficient to move
53
53
  // from a 0,0 corner of a rectangular shape to the closest "corner"
54
54
  // of a circular shape anchor element
55
- const anchorShapeXOffset = positionAnchorShape === types_1.BadgeWrapperPositionAnchorShape.Rectangular
55
+ const anchorShapeXOffset = positionAnchorShape === design_system_shared_1.BadgeWrapperPositionAnchorShape.Rectangular
56
56
  ? 0
57
57
  : anchorWidth * 0.1464;
58
- const anchorShapeYOffset = positionAnchorShape === types_1.BadgeWrapperPositionAnchorShape.Rectangular
58
+ const anchorShapeYOffset = positionAnchorShape === design_system_shared_1.BadgeWrapperPositionAnchorShape.Rectangular
59
59
  ? 0
60
60
  : anchorHeight * 0.1464;
61
61
  // This is to center the badge in the corner of the anchor element
@@ -64,22 +64,22 @@ const BadgeWrapper = ({ children, childrenContainerProps, badge, badgeContainerP
64
64
  const finalXOffset = anchorShapeXOffset - badgeCenteringXOffset + positionXOffset;
65
65
  const finalYOffset = anchorShapeYOffset - badgeCenteringYOffset + positionYOffset;
66
66
  switch (position) {
67
- case types_1.BadgeWrapperPosition.TopRight:
67
+ case design_system_shared_1.BadgeWrapperPosition.TopRight:
68
68
  return {
69
69
  top: finalYOffset,
70
70
  right: finalXOffset,
71
71
  };
72
- case types_1.BadgeWrapperPosition.BottomLeft:
72
+ case design_system_shared_1.BadgeWrapperPosition.BottomLeft:
73
73
  return {
74
74
  bottom: finalYOffset,
75
75
  left: finalXOffset,
76
76
  };
77
- case types_1.BadgeWrapperPosition.TopLeft:
77
+ case design_system_shared_1.BadgeWrapperPosition.TopLeft:
78
78
  return {
79
79
  top: finalYOffset,
80
80
  left: finalXOffset,
81
81
  };
82
- case types_1.BadgeWrapperPosition.BottomRight:
82
+ case design_system_shared_1.BadgeWrapperPosition.BottomRight:
83
83
  default:
84
84
  return {
85
85
  bottom: finalYOffset,
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.cjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAA8D;AAE9D,wDAAoC;AAEpC,iDAGqB;AAId,MAAM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;KACf,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,mBAAI,CACH,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CAE7D;MAAA,CAAC,mBAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,sBAAsB,CAAC,CACxD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,mBAAI,CACN;MAAA,CAAC,mBAAI,CACH,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CACrD,IAAI,mBAAmB,CAAC,CAExB;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,mBAAI,CACR;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA3GW,QAAA,YAAY,gBA2GvB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useCallback, useState, useMemo } from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\n\nimport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from '../../types';\n\nimport type { BadgeWrapperProps } from './BadgeWrapper.types';\n\nexport const BadgeWrapper = ({\n children,\n childrenContainerProps,\n badge,\n badgeContainerProps,\n position = BadgeWrapperPosition.BottomRight,\n positionAnchorShape = BadgeWrapperPositionAnchorShape.Circular,\n positionXOffset = 0,\n positionYOffset = 0,\n customPosition,\n twClassName,\n style,\n ...props\n}: BadgeWrapperProps) => {\n const tw = useTailwind();\n const [anchorWidth, setAnchorWidth] = useState<number>(0);\n const [anchorHeight, setAnchorHeight] = useState<number>(0);\n const [badgeWidth, setbadgeWidth] = useState<number>(0);\n const [badgeHeight, setbadgeHeight] = useState<number>(0);\n\n // Fetching the dimensions of the anchor and bagde element to properly position the badge\n const getAnchorSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setAnchorWidth(width);\n setAnchorHeight(height);\n }, []);\n const getBadgeSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setbadgeWidth(width);\n setbadgeHeight(height);\n }, []);\n\n const finalPositions = useMemo(() => {\n if (customPosition) {\n return customPosition;\n }\n // 0.1464 is a mathematical coeeficient to move\n // from a 0,0 corner of a rectangular shape to the closest \"corner\"\n // of a circular shape anchor element\n const anchorShapeXOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorWidth * 0.1464;\n const anchorShapeYOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorHeight * 0.1464;\n // This is to center the badge in the corner of the anchor element\n const badgeCenteringXOffset = badgeWidth / 2;\n const badgeCenteringYOffset = badgeHeight / 2;\n\n const finalXOffset =\n anchorShapeXOffset - badgeCenteringXOffset + positionXOffset;\n const finalYOffset =\n anchorShapeYOffset - badgeCenteringYOffset + positionYOffset;\n switch (position) {\n case BadgeWrapperPosition.TopRight:\n return {\n top: finalYOffset,\n right: finalXOffset,\n };\n case BadgeWrapperPosition.BottomLeft:\n return {\n bottom: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.TopLeft:\n return {\n top: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.BottomRight:\n default:\n return {\n bottom: finalYOffset,\n right: finalXOffset,\n };\n }\n }, [\n position,\n positionAnchorShape,\n anchorWidth,\n anchorHeight,\n badgeWidth,\n badgeHeight,\n positionXOffset,\n positionYOffset,\n customPosition,\n ]);\n\n return (\n <View\n {...props}\n style={[tw.style('relative self-start', twClassName), style]}\n >\n <View onLayout={getAnchorSize} {...childrenContainerProps}>\n {children}\n </View>\n <View\n onLayout={getBadgeSize}\n style={[tw.style('absolute'), { ...finalPositions }]}\n {...badgeContainerProps}\n >\n {badge}\n </View>\n </View>\n );\n};\n"]}
1
+ {"version":3,"file":"BadgeWrapper.cjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAGiD;AACjD,8FAA4E;AAC5E,+CAA8D;AAE9D,wDAAoC;AAI7B,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,sBAAsB,EACtB,KAAK,EACL,mBAAmB,EACnB,QAAQ,GAAG,2CAAoB,CAAC,WAAW,EAC3C,mBAAmB,GAAG,sDAA+B,CAAC,QAAQ,EAC9D,eAAe,GAAG,CAAC,EACnB,eAAe,GAAG,CAAC,EACnB,cAAc,EACd,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACU,EAAE,EAAE;IACtB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAS,CAAC,CAAC,CAAC;IAC1D,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAS,CAAC,CAAC,CAAC;IAC5D,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAS,CAAC,CAAC,CAAC;IACxD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAS,CAAC,CAAC,CAAC;IAE1D,yFAAyF;IACzF,MAAM,aAAa,GAAG,IAAA,mBAAW,EAAC,CAAC,KAAwB,EAAE,EAAE;QAC7D,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;QACnD,cAAc,CAAC,KAAK,CAAC,CAAC;QACtB,eAAe,CAAC,MAAM,CAAC,CAAC;IAC1B,CAAC,EAAE,EAAE,CAAC,CAAC;IACP,MAAM,YAAY,GAAG,IAAA,mB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B,CAAC;YACJ,KAAK,2CAAoB,CAAC,WAAW,CAAC;YACtC;gBACE,OAAO;oBACL,MAAM,EAAE,YAAY;oBACpB,KAAK,EAAE,YAAY;iBACpB,CAAC;SACL;IACH,CAAC,EAAE;QACD,QAAQ;QACR,mBAAmB;QACnB,WAAW;QACX,YAAY;QACZ,UAAU;QACV,WAAW;QACX,eAAe;QACf,eAAe;QACf,cAAc;KACf,CAAC,CAAC;IAEH,OAAO,CACL,CAAC,mBAAI,CACH,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CAE7D;MAAA,CAAC,mBAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,sBAAsB,CAAC,CACxD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,mBAAI,CACN;MAAA,CAAC,mBAAI,CACH,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CACrD,IAAI,mBAAmB,CAAC,CAExB;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,mBAAI,CACR;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA3GW,QAAA,YAAY,gBA2GvB","sourcesContent":["import {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useCallback, useState, useMemo } from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\n\nimport type { BadgeWrapperProps } from './BadgeWrapper.types';\n\nexport const BadgeWrapper = ({\n children,\n childrenContainerProps,\n badge,\n badgeContainerProps,\n position = BadgeWrapperPosition.BottomRight,\n positionAnchorShape = BadgeWrapperPositionAnchorShape.Circular,\n positionXOffset = 0,\n positionYOffset = 0,\n customPosition,\n twClassName,\n style,\n ...props\n}: BadgeWrapperProps) => {\n const tw = useTailwind();\n const [anchorWidth, setAnchorWidth] = useState<number>(0);\n const [anchorHeight, setAnchorHeight] = useState<number>(0);\n const [badgeWidth, setbadgeWidth] = useState<number>(0);\n const [badgeHeight, setbadgeHeight] = useState<number>(0);\n\n // Fetching the dimensions of the anchor and bagde element to properly position the badge\n const getAnchorSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setAnchorWidth(width);\n setAnchorHeight(height);\n }, []);\n const getBadgeSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setbadgeWidth(width);\n setbadgeHeight(height);\n }, []);\n\n const finalPositions = useMemo(() => {\n if (customPosition) {\n return customPosition;\n }\n // 0.1464 is a mathematical coeeficient to move\n // from a 0,0 corner of a rectangular shape to the closest \"corner\"\n // of a circular shape anchor element\n const anchorShapeXOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorWidth * 0.1464;\n const anchorShapeYOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorHeight * 0.1464;\n // This is to center the badge in the corner of the anchor element\n const badgeCenteringXOffset = badgeWidth / 2;\n const badgeCenteringYOffset = badgeHeight / 2;\n\n const finalXOffset =\n anchorShapeXOffset - badgeCenteringXOffset + positionXOffset;\n const finalYOffset =\n anchorShapeYOffset - badgeCenteringYOffset + positionYOffset;\n switch (position) {\n case BadgeWrapperPosition.TopRight:\n return {\n top: finalYOffset,\n right: finalXOffset,\n };\n case BadgeWrapperPosition.BottomLeft:\n return {\n bottom: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.TopLeft:\n return {\n top: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.BottomRight:\n default:\n return {\n bottom: finalYOffset,\n right: finalXOffset,\n };\n }\n }, [\n position,\n positionAnchorShape,\n anchorWidth,\n anchorHeight,\n badgeWidth,\n badgeHeight,\n positionXOffset,\n positionYOffset,\n customPosition,\n ]);\n\n return (\n <View\n {...props}\n style={[tw.style('relative self-start', twClassName), style]}\n >\n <View onLayout={getAnchorSize} {...childrenContainerProps}>\n {children}\n </View>\n <View\n onLayout={getBadgeSize}\n style={[tw.style('absolute'), { ...finalPositions }]}\n {...badgeContainerProps}\n >\n {badge}\n </View>\n </View>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,cAAc;AAS9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY,oLAatB,iBAAiB,sBA8FnB,CAAC"}
1
+ {"version":3,"file":"BadgeWrapper.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAyC,cAAc;AAI9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY,oLAatB,iBAAiB,sBA8FnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAyC,cAAc;AAS9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY,oLAatB,iBAAiB,sBA8FnB,CAAC"}
1
+ {"version":3,"file":"BadgeWrapper.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAyC,cAAc;AAI9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY,oLAatB,iBAAiB,sBA8FnB,CAAC"}
@@ -4,11 +4,11 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape } from "@metamask-previews/design-system-shared";
7
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
9
  import $React, { useCallback, useState, useMemo } from "react";
9
10
  const React = $importDefault($React);
10
11
  import { View } from "react-native/index.js";
11
- import { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape } from "../../types/index.mjs";
12
12
  export const BadgeWrapper = ({ children, childrenContainerProps, badge, badgeContainerProps, position = BadgeWrapperPosition.BottomRight, positionAnchorShape = BadgeWrapperPositionAnchorShape.Circular, positionXOffset = 0, positionYOffset = 0, customPosition, twClassName, style, ...props }) => {
13
13
  const tw = useTailwind();
14
14
  const [anchorWidth, setAnchorWidth] = useState(0);
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.mjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;;AAE9D,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAEpC,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAChC,8BAAoB;AAIrB,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,sBAAsB,EACtB,KAAK,EACL,mBAAmB,EACnB,QAAQ,GAAG,oBAAoB,CAAC,WAAW,EAC3C,mBAAmB,GAAG,+BAA+B,CAAC,QAAQ,EAC9D,eAAe,GAAG,CAAC,EACnB,eAAe,GAAG,CAAC,EACnB,cAAc,EACd,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACU,EAAE,EAAE;IACtB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,CAAC,WAAW,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AAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CACrD,IAAI,mBAAmB,CAAC,CAExB;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useCallback, useState, useMemo } from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\n\nimport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from '../../types';\n\nimport type { BadgeWrapperProps } from './BadgeWrapper.types';\n\nexport const BadgeWrapper = ({\n children,\n childrenContainerProps,\n badge,\n badgeContainerProps,\n position = BadgeWrapperPosition.BottomRight,\n positionAnchorShape = BadgeWrapperPositionAnchorShape.Circular,\n positionXOffset = 0,\n positionYOffset = 0,\n customPosition,\n twClassName,\n style,\n ...props\n}: BadgeWrapperProps) => {\n const tw = useTailwind();\n const [anchorWidth, setAnchorWidth] = useState<number>(0);\n const [anchorHeight, setAnchorHeight] = useState<number>(0);\n const [badgeWidth, setbadgeWidth] = useState<number>(0);\n const [badgeHeight, setbadgeHeight] = useState<number>(0);\n\n // Fetching the dimensions of the anchor and bagde element to properly position the badge\n const getAnchorSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setAnchorWidth(width);\n setAnchorHeight(height);\n }, []);\n const getBadgeSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setbadgeWidth(width);\n setbadgeHeight(height);\n }, []);\n\n const finalPositions = useMemo(() => {\n if (customPosition) {\n return customPosition;\n }\n // 0.1464 is a mathematical coeeficient to move\n // from a 0,0 corner of a rectangular shape to the closest \"corner\"\n // of a circular shape anchor element\n const anchorShapeXOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorWidth * 0.1464;\n const anchorShapeYOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorHeight * 0.1464;\n // This is to center the badge in the corner of the anchor element\n const badgeCenteringXOffset = badgeWidth / 2;\n const badgeCenteringYOffset = badgeHeight / 2;\n\n const finalXOffset =\n anchorShapeXOffset - badgeCenteringXOffset + positionXOffset;\n const finalYOffset =\n anchorShapeYOffset - badgeCenteringYOffset + positionYOffset;\n switch (position) {\n case BadgeWrapperPosition.TopRight:\n return {\n top: finalYOffset,\n right: finalXOffset,\n };\n case BadgeWrapperPosition.BottomLeft:\n return {\n bottom: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.TopLeft:\n return {\n top: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.BottomRight:\n default:\n return {\n bottom: finalYOffset,\n right: finalXOffset,\n };\n }\n }, [\n position,\n positionAnchorShape,\n anchorWidth,\n anchorHeight,\n badgeWidth,\n badgeHeight,\n positionXOffset,\n positionYOffset,\n customPosition,\n ]);\n\n return (\n <View\n {...props}\n style={[tw.style('relative self-start', twClassName), style]}\n >\n <View onLayout={getAnchorSize} {...childrenContainerProps}>\n {children}\n </View>\n <View\n onLayout={getBadgeSize}\n style={[tw.style('absolute'), { ...finalPositions }]}\n {...badgeContainerProps}\n >\n {badge}\n </View>\n </View>\n );\n};\n"]}
1
+ {"version":3,"file":"BadgeWrapper.mjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAChC,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;;AAE9D,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAIpC,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,QAAQ,EACR,sBAAsB,EAC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AAC,KAAK,CAAC,qBAAqB,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CAE7D;MAAA,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,CAAC,IAAI,sBAAsB,CAAC,CACxD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,IAAI,CACH,QAAQ,CAAC,CAAC,YAAY,CAAC,CACvB,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,cAAc,EAAE,CAAC,CAAC,CACrD,IAAI,mBAAmB,CAAC,CAExB;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useCallback, useState, useMemo } from 'react';\nimport type { LayoutChangeEvent } from 'react-native';\nimport { View } from 'react-native';\n\nimport type { BadgeWrapperProps } from './BadgeWrapper.types';\n\nexport const BadgeWrapper = ({\n children,\n childrenContainerProps,\n badge,\n badgeContainerProps,\n position = BadgeWrapperPosition.BottomRight,\n positionAnchorShape = BadgeWrapperPositionAnchorShape.Circular,\n positionXOffset = 0,\n positionYOffset = 0,\n customPosition,\n twClassName,\n style,\n ...props\n}: BadgeWrapperProps) => {\n const tw = useTailwind();\n const [anchorWidth, setAnchorWidth] = useState<number>(0);\n const [anchorHeight, setAnchorHeight] = useState<number>(0);\n const [badgeWidth, setbadgeWidth] = useState<number>(0);\n const [badgeHeight, setbadgeHeight] = useState<number>(0);\n\n // Fetching the dimensions of the anchor and bagde element to properly position the badge\n const getAnchorSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setAnchorWidth(width);\n setAnchorHeight(height);\n }, []);\n const getBadgeSize = useCallback((event: LayoutChangeEvent) => {\n const { width, height } = event.nativeEvent.layout;\n setbadgeWidth(width);\n setbadgeHeight(height);\n }, []);\n\n const finalPositions = useMemo(() => {\n if (customPosition) {\n return customPosition;\n }\n // 0.1464 is a mathematical coeeficient to move\n // from a 0,0 corner of a rectangular shape to the closest \"corner\"\n // of a circular shape anchor element\n const anchorShapeXOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorWidth * 0.1464;\n const anchorShapeYOffset =\n positionAnchorShape === BadgeWrapperPositionAnchorShape.Rectangular\n ? 0\n : anchorHeight * 0.1464;\n // This is to center the badge in the corner of the anchor element\n const badgeCenteringXOffset = badgeWidth / 2;\n const badgeCenteringYOffset = badgeHeight / 2;\n\n const finalXOffset =\n anchorShapeXOffset - badgeCenteringXOffset + positionXOffset;\n const finalYOffset =\n anchorShapeYOffset - badgeCenteringYOffset + positionYOffset;\n switch (position) {\n case BadgeWrapperPosition.TopRight:\n return {\n top: finalYOffset,\n right: finalXOffset,\n };\n case BadgeWrapperPosition.BottomLeft:\n return {\n bottom: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.TopLeft:\n return {\n top: finalYOffset,\n left: finalXOffset,\n };\n case BadgeWrapperPosition.BottomRight:\n default:\n return {\n bottom: finalYOffset,\n right: finalXOffset,\n };\n }\n }, [\n position,\n positionAnchorShape,\n anchorWidth,\n anchorHeight,\n badgeWidth,\n badgeHeight,\n positionXOffset,\n positionYOffset,\n customPosition,\n ]);\n\n return (\n <View\n {...props}\n style={[tw.style('relative self-start', twClassName), style]}\n >\n <View onLayout={getAnchorSize} {...childrenContainerProps}>\n {children}\n </View>\n <View\n onLayout={getBadgeSize}\n style={[tw.style('absolute'), { ...finalPositions }]}\n {...badgeContainerProps}\n >\n {badge}\n </View>\n </View>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type {\n BadgeWrapperPosition,\n BadgeWrapperCustomPosition,\n BadgeWrapperPositionAnchorShape,\n} from '../../types';\n\n/**\n * Badge component props.\n */\nexport type BadgeWrapperProps = {\n /**\n * Optional prop to determine the shape of the anchoring element.\n * This prop gets used along with position, positionXOffset, and positionYOffset\n * to determine the final position.\n * Possible values:\n * BadgeWrapperPositionAnchorShape.Circular,\n * - BadgeWrapperPositionAnchorShape.Rectangular,\n *\n * @default BadgeWrapperPositionAnchorShape.Circular\n */\n positionAnchorShape?: BadgeWrapperPositionAnchorShape;\n /**\n * Optional prop to control the preset position of the badge.\n * This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset\n * to determine the final position.\n *\n * @default BadgeWrapperPosition.TopRight\n */\n position?: BadgeWrapperPosition;\n /**\n * Optional prop to move the preset position horizontally.\n * This prop gets used along with position, positionAnchorShape, and positionYOffset\n * to determine the final position.\n *\n * @default 0\n */\n positionXOffset?: number;\n /**\n * Optional prop to move the preset position vertically.\n * This prop gets used along with position, positionAnchorShape, and positionXOffset\n * to determine the final position.\n *\n * @default 0\n */\n positionYOffset?: number;\n /**\n * Optional prop to customize the position through the position object.\n * Position object - {top: 0, right: 0, bottom: 0, left: 0}\n */\n customPosition?: BadgeWrapperCustomPosition;\n /**\n * The element that the badge will attach itself to.\n */\n children: React.ReactNode;\n /**\n * Optional prop to pass additional props to the children container\n */\n childrenContainerProps?: ViewProps;\n /**\n * Any element that will be placed in the position of the badge.\n */\n badge: React.ReactNode;\n /**\n * Optional prop to pass additional props to the badge container\n */\n badgeContainerProps?: ViewProps;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & ViewProps;\n"]}
1
+ {"version":3,"file":"BadgeWrapper.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeWrapperPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\n/**\n * BadgeWrapper 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 BadgeWrapperProps = BadgeWrapperPropsShared & {\n /**\n * Optional prop to pass additional props to the children container\n */\n childrenContainerProps?: ViewProps;\n /**\n * Optional prop to pass additional props to the badge container\n */\n badgeContainerProps?: ViewProps;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & ViewProps;\n"]}
@@ -1,61 +1,14 @@
1
+ import type { BadgeWrapperPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { ViewProps, StyleProp, ViewStyle } from "react-native/index.js";
2
- import type { BadgeWrapperPosition, BadgeWrapperCustomPosition, BadgeWrapperPositionAnchorShape } from "../../types/index.cjs";
3
3
  /**
4
- * Badge component props.
4
+ * BadgeWrapper component props (React Native platform-specific)
5
+ * Extends shared props from @metamask-previews/design-system-shared with React Native-specific platform concerns
5
6
  */
6
- export type BadgeWrapperProps = {
7
- /**
8
- * Optional prop to determine the shape of the anchoring element.
9
- * This prop gets used along with position, positionXOffset, and positionYOffset
10
- * to determine the final position.
11
- * Possible values:
12
- * BadgeWrapperPositionAnchorShape.Circular,
13
- * - BadgeWrapperPositionAnchorShape.Rectangular,
14
- *
15
- * @default BadgeWrapperPositionAnchorShape.Circular
16
- */
17
- positionAnchorShape?: BadgeWrapperPositionAnchorShape;
18
- /**
19
- * Optional prop to control the preset position of the badge.
20
- * This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset
21
- * to determine the final position.
22
- *
23
- * @default BadgeWrapperPosition.TopRight
24
- */
25
- position?: BadgeWrapperPosition;
26
- /**
27
- * Optional prop to move the preset position horizontally.
28
- * This prop gets used along with position, positionAnchorShape, and positionYOffset
29
- * to determine the final position.
30
- *
31
- * @default 0
32
- */
33
- positionXOffset?: number;
34
- /**
35
- * Optional prop to move the preset position vertically.
36
- * This prop gets used along with position, positionAnchorShape, and positionXOffset
37
- * to determine the final position.
38
- *
39
- * @default 0
40
- */
41
- positionYOffset?: number;
42
- /**
43
- * Optional prop to customize the position through the position object.
44
- * Position object - {top: 0, right: 0, bottom: 0, left: 0}
45
- */
46
- customPosition?: BadgeWrapperCustomPosition;
47
- /**
48
- * The element that the badge will attach itself to.
49
- */
50
- children: React.ReactNode;
7
+ export type BadgeWrapperProps = BadgeWrapperPropsShared & {
51
8
  /**
52
9
  * Optional prop to pass additional props to the children container
53
10
  */
54
11
  childrenContainerProps?: ViewProps;
55
- /**
56
- * Any element that will be placed in the position of the badge.
57
- */
58
- badge: React.ReactNode;
59
12
  /**
60
13
  * Optional prop to pass additional props to the badge container
61
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAChC,8BAAoB;AAErB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,+BAA+B,CAAC;IACtD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"BadgeWrapper.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD;;OAEG;IACH,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,SAAS,CAAC"}
@@ -1,61 +1,14 @@
1
+ import type { BadgeWrapperPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { ViewProps, StyleProp, ViewStyle } from "react-native/index.js";
2
- import type { BadgeWrapperPosition, BadgeWrapperCustomPosition, BadgeWrapperPositionAnchorShape } from "../../types/index.mjs";
3
3
  /**
4
- * Badge component props.
4
+ * BadgeWrapper component props (React Native platform-specific)
5
+ * Extends shared props from @metamask-previews/design-system-shared with React Native-specific platform concerns
5
6
  */
6
- export type BadgeWrapperProps = {
7
- /**
8
- * Optional prop to determine the shape of the anchoring element.
9
- * This prop gets used along with position, positionXOffset, and positionYOffset
10
- * to determine the final position.
11
- * Possible values:
12
- * BadgeWrapperPositionAnchorShape.Circular,
13
- * - BadgeWrapperPositionAnchorShape.Rectangular,
14
- *
15
- * @default BadgeWrapperPositionAnchorShape.Circular
16
- */
17
- positionAnchorShape?: BadgeWrapperPositionAnchorShape;
18
- /**
19
- * Optional prop to control the preset position of the badge.
20
- * This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset
21
- * to determine the final position.
22
- *
23
- * @default BadgeWrapperPosition.TopRight
24
- */
25
- position?: BadgeWrapperPosition;
26
- /**
27
- * Optional prop to move the preset position horizontally.
28
- * This prop gets used along with position, positionAnchorShape, and positionYOffset
29
- * to determine the final position.
30
- *
31
- * @default 0
32
- */
33
- positionXOffset?: number;
34
- /**
35
- * Optional prop to move the preset position vertically.
36
- * This prop gets used along with position, positionAnchorShape, and positionXOffset
37
- * to determine the final position.
38
- *
39
- * @default 0
40
- */
41
- positionYOffset?: number;
42
- /**
43
- * Optional prop to customize the position through the position object.
44
- * Position object - {top: 0, right: 0, bottom: 0, left: 0}
45
- */
46
- customPosition?: BadgeWrapperCustomPosition;
47
- /**
48
- * The element that the badge will attach itself to.
49
- */
50
- children: React.ReactNode;
7
+ export type BadgeWrapperProps = BadgeWrapperPropsShared & {
51
8
  /**
52
9
  * Optional prop to pass additional props to the children container
53
10
  */
54
11
  childrenContainerProps?: ViewProps;
55
- /**
56
- * Any element that will be placed in the position of the badge.
57
- */
58
- badge: React.ReactNode;
59
12
  /**
60
13
  * Optional prop to pass additional props to the badge container
61
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,+BAA+B,EAChC,8BAAoB;AAErB;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;;;OASG;IACH,mBAAmB,CAAC,EAAE,+BAA+B,CAAC;IACtD;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,oBAAoB,CAAC;IAChC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,0BAA0B,CAAC;IAC5C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"BadgeWrapper.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEpE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD;;OAEG;IACH,sBAAsB,CAAC,EAAE,SAAS,CAAC;IACnC;;OAEG;IACH,mBAAmB,CAAC,EAAE,SAAS,CAAC;IAChC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B,GAAG,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeWrapper.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type {\n BadgeWrapperPosition,\n BadgeWrapperCustomPosition,\n BadgeWrapperPositionAnchorShape,\n} from '../../types';\n\n/**\n * Badge component props.\n */\nexport type BadgeWrapperProps = {\n /**\n * Optional prop to determine the shape of the anchoring element.\n * This prop gets used along with position, positionXOffset, and positionYOffset\n * to determine the final position.\n * Possible values:\n * BadgeWrapperPositionAnchorShape.Circular,\n * - BadgeWrapperPositionAnchorShape.Rectangular,\n *\n * @default BadgeWrapperPositionAnchorShape.Circular\n */\n positionAnchorShape?: BadgeWrapperPositionAnchorShape;\n /**\n * Optional prop to control the preset position of the badge.\n * This prop gets used along with positionAnchorShape, positionXOffset, and positionYOffset\n * to determine the final position.\n *\n * @default BadgeWrapperPosition.TopRight\n */\n position?: BadgeWrapperPosition;\n /**\n * Optional prop to move the preset position horizontally.\n * This prop gets used along with position, positionAnchorShape, and positionYOffset\n * to determine the final position.\n *\n * @default 0\n */\n positionXOffset?: number;\n /**\n * Optional prop to move the preset position vertically.\n * This prop gets used along with position, positionAnchorShape, and positionXOffset\n * to determine the final position.\n *\n * @default 0\n */\n positionYOffset?: number;\n /**\n * Optional prop to customize the position through the position object.\n * Position object - {top: 0, right: 0, bottom: 0, left: 0}\n */\n customPosition?: BadgeWrapperCustomPosition;\n /**\n * The element that the badge will attach itself to.\n */\n children: React.ReactNode;\n /**\n * Optional prop to pass additional props to the children container\n */\n childrenContainerProps?: ViewProps;\n /**\n * Any element that will be placed in the position of the badge.\n */\n badge: React.ReactNode;\n /**\n * Optional prop to pass additional props to the badge container\n */\n badgeContainerProps?: ViewProps;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & ViewProps;\n"]}
1
+ {"version":3,"file":"BadgeWrapper.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/BadgeWrapper.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeWrapperPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps, StyleProp, ViewStyle } from 'react-native';\n\n/**\n * BadgeWrapper 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 BadgeWrapperProps = BadgeWrapperPropsShared & {\n /**\n * Optional prop to pass additional props to the children container\n */\n childrenContainerProps?: ViewProps;\n /**\n * Optional prop to pass additional props to the badge container\n */\n badgeContainerProps?: ViewProps;\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n} & ViewProps;\n"]}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BadgeWrapper = exports.BadgeWrapperPositionAnchorShape = exports.BadgeWrapperPosition = void 0;
4
- var types_1 = require("../../types/index.cjs");
5
- Object.defineProperty(exports, "BadgeWrapperPosition", { enumerable: true, get: function () { return types_1.BadgeWrapperPosition; } });
6
- Object.defineProperty(exports, "BadgeWrapperPositionAnchorShape", { enumerable: true, get: function () { return types_1.BadgeWrapperPositionAnchorShape; } });
4
+ var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ Object.defineProperty(exports, "BadgeWrapperPosition", { enumerable: true, get: function () { return design_system_shared_1.BadgeWrapperPosition; } });
6
+ Object.defineProperty(exports, "BadgeWrapperPositionAnchorShape", { enumerable: true, get: function () { return design_system_shared_1.BadgeWrapperPositionAnchorShape; } });
7
7
  var BadgeWrapper_1 = require("./BadgeWrapper.cjs");
8
8
  Object.defineProperty(exports, "BadgeWrapper", { enumerable: true, get: function () { return BadgeWrapper_1.BadgeWrapper; } });
9
9
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":";;;AAAA,+CAGqB;AAFnB,6GAAA,oBAAoB,OAAA;AACpB,wHAAA,+BAA+B,OAAA;AAGjC,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from '../../types';\nexport type { BadgeWrapperCustomPosition } from '../../types';\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":";;;AAAA,gFAIiD;AAH/C,4HAAA,oBAAoB,OAAA;AACpB,uIAAA,+BAA+B,OAAA;AAGjC,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n type BadgeWrapperCustomPosition,\n} from '@metamask-previews/design-system-shared';\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper.types';\n"]}
@@ -1,5 +1,4 @@
1
- export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, } from "../../types/index.cjs";
2
- export type { BadgeWrapperCustomPosition } from "../../types/index.cjs";
1
+ export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, type BadgeWrapperCustomPosition, } from "@metamask-previews/design-system-shared";
3
2
  export { BadgeWrapper } from "./BadgeWrapper.cjs";
4
3
  export type { BadgeWrapperProps } from "./BadgeWrapper.types.cjs";
5
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,GAChC,8BAAoB;AACrB,YAAY,EAAE,0BAA0B,EAAE,8BAAoB;AAC9D,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,KAAK,0BAA0B,GAChC,gDAAgD;AACjD,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
@@ -1,5 +1,4 @@
1
- export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, } from "../../types/index.mjs";
2
- export type { BadgeWrapperCustomPosition } from "../../types/index.mjs";
1
+ export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, type BadgeWrapperCustomPosition, } from "@metamask-previews/design-system-shared";
3
2
  export { BadgeWrapper } from "./BadgeWrapper.mjs";
4
3
  export type { BadgeWrapperProps } from "./BadgeWrapper.types.mjs";
5
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,GAChC,8BAAoB;AACrB,YAAY,EAAE,0BAA0B,EAAE,8BAAoB;AAC9D,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAC/B,KAAK,0BAA0B,GAChC,gDAAgD;AACjD,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAA6B"}
@@ -1,3 +1,3 @@
1
- export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape } from "../../types/index.mjs";
1
+ export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape } from "@metamask-previews/design-system-shared";
2
2
  export { BadgeWrapper } from "./BadgeWrapper.mjs";
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAChC,8BAAoB;AAErB,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from '../../types';\nexport type { BadgeWrapperCustomPosition } from '../../types';\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BadgeWrapper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,+BAA+B,EAEhC,gDAAgD;AACjD,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n type BadgeWrapperCustomPosition,\n} from '@metamask-previews/design-system-shared';\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper.types';\n"]}
@@ -16,15 +16,15 @@ exports.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = {
16
16
  danger: types_1.IconColor.ErrorDefault,
17
17
  };
18
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,
19
+ info: design_system_shared_1.BoxBackgroundColor.PrimaryMuted,
20
+ success: design_system_shared_1.BoxBackgroundColor.SuccessMuted,
21
+ warning: design_system_shared_1.BoxBackgroundColor.WarningMuted,
22
+ danger: design_system_shared_1.BoxBackgroundColor.ErrorMuted,
23
23
  };
24
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,
25
+ info: design_system_shared_1.BoxBorderColor.PrimaryDefault,
26
+ success: design_system_shared_1.BoxBorderColor.SuccessDefault,
27
+ warning: design_system_shared_1.BoxBorderColor.WarningDefault,
28
+ danger: design_system_shared_1.BoxBorderColor.ErrorDefault,
29
29
  };
30
30
  //# sourceMappingURL=BannerAlert.constants.cjs.map
@@ -1 +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"]}
1
+ {"version":3,"file":"BannerAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":";;;AAAA,kFAIiD;AAEjD,iDAAkD;AAErC,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,yCAAkB,CAAC,YAAY;IACrC,OAAO,EAAE,yCAAkB,CAAC,YAAY;IACxC,OAAO,EAAE,yCAAkB,CAAC,YAAY;IACxC,MAAM,EAAE,yCAAkB,CAAC,UAAU;CACtC,CAAC;AAEW,QAAA,sCAAsC,GAG/C;IACF,IAAI,EAAE,qCAAc,CAAC,cAAc;IACnC,OAAO,EAAE,qCAAc,CAAC,cAAc;IACtC,OAAO,EAAE,qCAAc,CAAC,cAAc;IACtC,MAAM,EAAE,qCAAc,CAAC,YAAY;CACpC,CAAC","sourcesContent":["import {\n BannerAlertSeverity,\n BoxBackgroundColor,\n BoxBorderColor,\n} from '@metamask-previews/design-system-shared';\n\nimport { IconColor, IconName } 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"]}
@@ -1,5 +1,5 @@
1
- import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
- import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.cjs";
1
+ import { BannerAlertSeverity, BoxBackgroundColor, BoxBorderColor } from "@metamask-previews/design-system-shared";
2
+ import { IconColor, IconName } from "../../types/index.cjs";
3
3
  export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
4
4
  export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
5
5
  export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
@@ -1 +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"}
1
+ {"version":3,"file":"BannerAlert.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACf,gDAAgD;AAEjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,8BAAoB;AAElD,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"}
@@ -1,5 +1,5 @@
1
- import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
2
- import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.mjs";
1
+ import { BannerAlertSeverity, BoxBackgroundColor, BoxBorderColor } from "@metamask-previews/design-system-shared";
2
+ import { IconColor, IconName } from "../../types/index.mjs";
3
3
  export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
4
4
  export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
5
5
  export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;