@metamask-previews/design-system-react-native 0.53.0-preview.f03faa2 → 0.56.1-preview-00dfeb8

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 (543) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/dist/components/ActionListItem/ActionListItem.cjs +17 -7
  3. package/dist/components/ActionListItem/ActionListItem.cjs.map +1 -1
  4. package/dist/components/ActionListItem/ActionListItem.mjs.map +1 -1
  5. package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
  6. package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
  7. package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
  8. package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
  9. package/dist/components/AvatarBase/AvatarBase.constants.cjs +16 -16
  10. package/dist/components/AvatarBase/AvatarBase.constants.cjs.map +1 -1
  11. package/dist/components/AvatarBase/AvatarBase.constants.mjs +16 -16
  12. package/dist/components/AvatarBase/AvatarBase.constants.mjs.map +1 -1
  13. package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
  14. package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
  15. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +24 -8
  16. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  17. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  18. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  19. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +7 -1
  20. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  21. package/dist/components/AvatarGroup/AvatarGroup.cjs +17 -7
  22. package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
  23. package/dist/components/AvatarGroup/AvatarGroup.d.cts.map +1 -1
  24. package/dist/components/AvatarGroup/AvatarGroup.d.mts.map +1 -1
  25. package/dist/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
  26. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +4 -4
  27. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
  28. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +4 -4
  29. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
  30. package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
  31. package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
  32. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +24 -8
  33. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  34. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  35. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  36. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +7 -1
  37. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  38. package/dist/components/AvatarToken/AvatarToken.cjs +24 -8
  39. package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
  40. package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
  41. package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
  42. package/dist/components/AvatarToken/AvatarToken.mjs +7 -1
  43. package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
  44. package/dist/components/BadgeCount/BadgeCount.constants.cjs +1 -1
  45. package/dist/components/BadgeCount/BadgeCount.constants.cjs.map +1 -1
  46. package/dist/components/BadgeCount/BadgeCount.constants.mjs +1 -1
  47. package/dist/components/BadgeCount/BadgeCount.constants.mjs.map +1 -1
  48. package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
  49. package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
  50. package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
  51. package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
  52. package/dist/components/BadgeNetwork/BadgeNetwork.d.cts.map +1 -1
  53. package/dist/components/BadgeNetwork/BadgeNetwork.d.mts.map +1 -1
  54. package/dist/components/BadgeStatus/BadgeStatus.constants.cjs +1 -1
  55. package/dist/components/BadgeStatus/BadgeStatus.constants.cjs.map +1 -1
  56. package/dist/components/BadgeStatus/BadgeStatus.constants.mjs +1 -1
  57. package/dist/components/BadgeStatus/BadgeStatus.constants.mjs.map +1 -1
  58. package/dist/components/BadgeStatus/BadgeStatus.d.cts.map +1 -1
  59. package/dist/components/BadgeStatus/BadgeStatus.d.mts.map +1 -1
  60. package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
  61. package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
  62. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
  63. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
  64. package/dist/components/BannerBase/BannerBase.cjs +17 -7
  65. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  66. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  67. package/dist/components/BottomSheet/BottomSheet.cjs +17 -7
  68. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  69. package/dist/components/BottomSheet/BottomSheet.d.cts +8 -8
  70. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
  71. package/dist/components/BottomSheet/BottomSheet.d.mts +8 -8
  72. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
  73. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
  74. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +17 -7
  75. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  76. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +6 -6
  77. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
  78. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +6 -6
  79. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
  80. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  81. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -1
  82. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -1
  83. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +17 -7
  84. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -1
  85. package/dist/components/Box/Box.cjs +17 -7
  86. package/dist/components/Box/Box.cjs.map +1 -1
  87. package/dist/components/Box/Box.d.cts +1 -1
  88. package/dist/components/Box/Box.d.mts +1 -1
  89. package/dist/components/BoxColumn/BoxColumn.cjs +13 -0
  90. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
  91. package/dist/components/BoxColumn/BoxColumn.d.cts +13 -0
  92. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
  93. package/dist/components/BoxColumn/BoxColumn.d.mts +13 -0
  94. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
  95. package/dist/components/BoxColumn/BoxColumn.mjs +13 -0
  96. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
  97. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -1
  98. package/dist/components/BoxColumn/BoxColumn.types.d.cts +2 -0
  99. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -1
  100. package/dist/components/BoxColumn/BoxColumn.types.d.mts +2 -0
  101. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -1
  102. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -1
  103. package/dist/components/BoxRow/BoxRow.cjs +13 -0
  104. package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
  105. package/dist/components/BoxRow/BoxRow.d.cts +13 -0
  106. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
  107. package/dist/components/BoxRow/BoxRow.d.mts +13 -0
  108. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
  109. package/dist/components/BoxRow/BoxRow.mjs +13 -0
  110. package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
  111. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -1
  112. package/dist/components/BoxRow/BoxRow.types.d.cts +2 -0
  113. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -1
  114. package/dist/components/BoxRow/BoxRow.types.d.mts +2 -0
  115. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -1
  116. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -1
  117. package/dist/components/Button/Button.cjs.map +1 -1
  118. package/dist/components/Button/Button.d.cts.map +1 -1
  119. package/dist/components/Button/Button.d.mts.map +1 -1
  120. package/dist/components/Button/Button.mjs.map +1 -1
  121. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +17 -7
  122. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
  123. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.cts.map +1 -1
  124. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.mts.map +1 -1
  125. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
  126. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +17 -7
  127. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
  128. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.cts.map +1 -1
  129. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.mts.map +1 -1
  130. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
  131. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +17 -7
  132. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
  133. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
  134. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
  135. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
  136. package/dist/components/ButtonBase/ButtonBase.cjs +27 -13
  137. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  138. package/dist/components/ButtonBase/ButtonBase.constants.cjs +2 -2
  139. package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
  140. package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
  141. package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
  142. package/dist/components/ButtonBase/ButtonBase.constants.mjs +2 -2
  143. package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
  144. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  145. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  146. package/dist/components/ButtonBase/ButtonBase.mjs +11 -7
  147. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  148. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  149. package/dist/components/ButtonBase/ButtonBase.types.d.cts +3 -4
  150. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  151. package/dist/components/ButtonBase/ButtonBase.types.d.mts +3 -4
  152. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  153. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  154. package/dist/components/ButtonHero/ButtonHero.cjs.map +1 -1
  155. package/dist/components/ButtonHero/ButtonHero.mjs.map +1 -1
  156. package/dist/components/ButtonIcon/ButtonIcon.cjs +17 -7
  157. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  158. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  159. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  160. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  161. package/dist/components/ButtonSemantic/ButtonSemantic.cjs +17 -7
  162. package/dist/components/ButtonSemantic/ButtonSemantic.cjs.map +1 -1
  163. package/dist/components/ButtonSemantic/ButtonSemantic.d.cts.map +1 -1
  164. package/dist/components/ButtonSemantic/ButtonSemantic.d.mts.map +1 -1
  165. package/dist/components/Card/Card.cjs.map +1 -1
  166. package/dist/components/Card/Card.mjs.map +1 -1
  167. package/dist/components/Checkbox/Checkbox.cjs +17 -7
  168. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  169. package/dist/components/Checkbox/Checkbox.d.cts +5 -6
  170. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  171. package/dist/components/Checkbox/Checkbox.d.mts +5 -6
  172. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  173. package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
  174. package/dist/components/Content/Content.cjs +40 -32
  175. package/dist/components/Content/Content.cjs.map +1 -1
  176. package/dist/components/Content/Content.d.cts.map +1 -1
  177. package/dist/components/Content/Content.d.mts.map +1 -1
  178. package/dist/components/Content/Content.mjs +40 -32
  179. package/dist/components/Content/Content.mjs.map +1 -1
  180. package/dist/components/FilterButton/FilterButton.cjs +17 -7
  181. package/dist/components/FilterButton/FilterButton.cjs.map +1 -1
  182. package/dist/components/FilterButton/FilterButton.mjs.map +1 -1
  183. package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs +17 -7
  184. package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs.map +1 -1
  185. package/dist/components/HeaderBase/HeaderBase.cjs +17 -7
  186. package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -1
  187. package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -1
  188. package/dist/components/HeaderRoot/HeaderRoot.cjs +8 -5
  189. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  190. package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -1
  191. package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -1
  192. package/dist/components/HeaderRoot/HeaderRoot.mjs +8 -5
  193. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  194. package/dist/components/HeaderSearch/HeaderSearch.cjs +2 -0
  195. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -1
  196. package/dist/components/HeaderSearch/HeaderSearch.d.cts +2 -0
  197. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -1
  198. package/dist/components/HeaderSearch/HeaderSearch.d.mts +2 -0
  199. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -1
  200. package/dist/components/HeaderSearch/HeaderSearch.mjs +2 -0
  201. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -1
  202. package/dist/components/HeaderStandard/HeaderStandard.cjs +17 -7
  203. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  204. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  205. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs +17 -7
  206. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs.map +1 -1
  207. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +1 -2
  208. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -1
  209. package/dist/components/HeaderSubpage/HeaderSubpage.cjs +17 -7
  210. package/dist/components/HeaderSubpage/HeaderSubpage.cjs.map +1 -1
  211. package/dist/components/HeaderSubpage/HeaderSubpage.mjs.map +1 -1
  212. package/dist/components/HelpText/HelpText.cjs.map +1 -1
  213. package/dist/components/HelpText/HelpText.mjs.map +1 -1
  214. package/dist/components/Icon/Icon.assets.cjs +32 -0
  215. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  216. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  217. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  218. package/dist/components/Icon/Icon.assets.mjs +32 -0
  219. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  220. package/dist/components/Icon/Icon.constants.cjs +4 -4
  221. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  222. package/dist/components/Icon/Icon.constants.mjs +4 -4
  223. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  224. package/dist/components/Icon/Icon.d.cts.map +1 -1
  225. package/dist/components/Icon/Icon.d.mts.map +1 -1
  226. package/dist/components/Icon/assets/baseball.svg +1 -0
  227. package/dist/components/Icon/assets/basketball.svg +1 -0
  228. package/dist/components/Icon/assets/bicycle.svg +1 -0
  229. package/dist/components/Icon/assets/boxing-glove.svg +1 -0
  230. package/dist/components/Icon/assets/cricket.svg +1 -0
  231. package/dist/components/Icon/assets/feed-post.svg +1 -0
  232. package/dist/components/Icon/assets/flag-checkered.svg +1 -0
  233. package/dist/components/Icon/assets/football.svg +1 -0
  234. package/dist/components/Icon/assets/game-controller.svg +1 -0
  235. package/dist/components/Icon/assets/golf.svg +1 -0
  236. package/dist/components/Icon/assets/hockey.svg +1 -0
  237. package/dist/components/Icon/assets/horse.svg +1 -0
  238. package/dist/components/Icon/assets/medal.svg +1 -0
  239. package/dist/components/Icon/assets/musd-filled.svg +1 -1
  240. package/dist/components/Icon/assets/ping-pong.svg +1 -0
  241. package/dist/components/Icon/assets/soccer-ball.svg +1 -0
  242. package/dist/components/Icon/assets/tennis-ball.svg +1 -0
  243. package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
  244. package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
  245. package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
  246. package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
  247. package/dist/components/Input/Input.cjs.map +1 -1
  248. package/dist/components/Input/Input.d.cts +1 -1
  249. package/dist/components/Input/Input.d.mts +1 -1
  250. package/dist/components/Input/Input.mjs.map +1 -1
  251. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +21 -12
  252. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  253. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  254. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  255. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +22 -13
  256. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  257. package/dist/components/KeyValueRow/KeyValueRow.cjs +19 -10
  258. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  259. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  260. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  261. package/dist/components/KeyValueRow/KeyValueRow.mjs +20 -11
  262. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  263. package/dist/components/KeyValueSelect/KeyValueSelect.cjs +17 -7
  264. package/dist/components/KeyValueSelect/KeyValueSelect.cjs.map +1 -1
  265. package/dist/components/KeyValueSelect/KeyValueSelect.d.cts +5 -5
  266. package/dist/components/KeyValueSelect/KeyValueSelect.d.mts +5 -5
  267. package/dist/components/KeyValueSelect/KeyValueSelect.mjs.map +1 -1
  268. package/dist/components/ListItem/ListItem.cjs +4 -3
  269. package/dist/components/ListItem/ListItem.cjs.map +1 -1
  270. package/dist/components/ListItem/ListItem.d.cts.map +1 -1
  271. package/dist/components/ListItem/ListItem.d.mts.map +1 -1
  272. package/dist/components/ListItem/ListItem.mjs +5 -4
  273. package/dist/components/ListItem/ListItem.mjs.map +1 -1
  274. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.cjs.map +1 -1
  275. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.mjs.map +1 -1
  276. package/dist/components/MainActionButton/MainActionButton.d.cts.map +1 -1
  277. package/dist/components/MainActionButton/MainActionButton.d.mts.map +1 -1
  278. package/dist/components/RadioButton/RadioButton.cjs +2 -2
  279. package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
  280. package/dist/components/RadioButton/RadioButton.d.cts.map +1 -1
  281. package/dist/components/RadioButton/RadioButton.d.mts.map +1 -1
  282. package/dist/components/RadioButton/RadioButton.mjs +2 -2
  283. package/dist/components/RadioButton/RadioButton.mjs.map +1 -1
  284. package/dist/components/SectionDivider/SectionDivider.cjs +17 -7
  285. package/dist/components/SectionDivider/SectionDivider.cjs.map +1 -1
  286. package/dist/components/SectionDivider/SectionDivider.d.cts +1 -1
  287. package/dist/components/SectionDivider/SectionDivider.d.mts +1 -1
  288. package/dist/components/SectionDivider/SectionDivider.mjs.map +1 -1
  289. package/dist/components/SectionHeader/SectionHeader.cjs +17 -10
  290. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  291. package/dist/components/SectionHeader/SectionHeader.d.cts +2 -2
  292. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
  293. package/dist/components/SectionHeader/SectionHeader.d.mts +2 -2
  294. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
  295. package/dist/components/SectionHeader/SectionHeader.mjs +18 -11
  296. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
  297. package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
  298. package/dist/components/SectionHeader/SectionHeader.types.d.cts +5 -5
  299. package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
  300. package/dist/components/SectionHeader/SectionHeader.types.d.mts +5 -5
  301. package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
  302. package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
  303. package/dist/components/SegmentedControl/SegmentedControl.cjs +17 -7
  304. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -1
  305. package/dist/components/SelectButton/SelectButton.cjs.map +1 -1
  306. package/dist/components/SelectButton/SelectButton.mjs.map +1 -1
  307. package/dist/components/SensitiveText/SensitiveText.cjs +17 -7
  308. package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -1
  309. package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -1
  310. package/dist/components/Skeleton/Skeleton.cjs +17 -7
  311. package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
  312. package/dist/components/Skeleton/Skeleton.mjs.map +1 -1
  313. package/dist/components/Slider/Slider.cjs +17 -7
  314. package/dist/components/Slider/Slider.cjs.map +1 -1
  315. package/dist/components/Slider/Slider.constants.cjs +5 -6
  316. package/dist/components/Slider/Slider.constants.cjs.map +1 -1
  317. package/dist/components/Slider/Slider.constants.d.cts +5 -6
  318. package/dist/components/Slider/Slider.constants.d.cts.map +1 -1
  319. package/dist/components/Slider/Slider.constants.d.mts +5 -6
  320. package/dist/components/Slider/Slider.constants.d.mts.map +1 -1
  321. package/dist/components/Slider/Slider.constants.mjs +5 -6
  322. package/dist/components/Slider/Slider.constants.mjs.map +1 -1
  323. package/dist/components/Slider/Slider.mjs.map +1 -1
  324. package/dist/components/Slider/Slider.types.cjs.map +1 -1
  325. package/dist/components/Slider/Slider.types.d.cts +4 -5
  326. package/dist/components/Slider/Slider.types.d.cts.map +1 -1
  327. package/dist/components/Slider/Slider.types.d.mts +4 -5
  328. package/dist/components/Slider/Slider.types.d.mts.map +1 -1
  329. package/dist/components/Slider/Slider.types.mjs.map +1 -1
  330. package/dist/components/Slider/Slider.utilities.cjs +55 -26
  331. package/dist/components/Slider/Slider.utilities.cjs.map +1 -1
  332. package/dist/components/Slider/Slider.utilities.d.cts +24 -3
  333. package/dist/components/Slider/Slider.utilities.d.cts.map +1 -1
  334. package/dist/components/Slider/Slider.utilities.d.mts +24 -3
  335. package/dist/components/Slider/Slider.utilities.d.mts.map +1 -1
  336. package/dist/components/Slider/Slider.utilities.mjs +38 -8
  337. package/dist/components/Slider/Slider.utilities.mjs.map +1 -1
  338. package/dist/components/Slider/useSliderGesture.cjs +1 -2
  339. package/dist/components/Slider/useSliderGesture.cjs.map +1 -1
  340. package/dist/components/Slider/useSliderGesture.mjs.map +1 -1
  341. package/dist/components/Spinner/Spinner.cjs +95 -0
  342. package/dist/components/Spinner/Spinner.cjs.map +1 -0
  343. package/dist/components/Spinner/Spinner.d.cts.map +1 -0
  344. package/dist/components/Spinner/Spinner.d.mts.map +1 -0
  345. package/dist/components/Spinner/Spinner.mjs +65 -0
  346. package/dist/components/Spinner/Spinner.mjs.map +1 -0
  347. package/dist/components/Spinner/Spinner.types.cjs.map +1 -0
  348. package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.d.cts +2 -2
  349. package/dist/components/Spinner/Spinner.types.d.cts.map +1 -0
  350. package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.d.mts +2 -2
  351. package/dist/components/Spinner/Spinner.types.d.mts.map +1 -0
  352. package/dist/components/Spinner/Spinner.types.mjs.map +1 -0
  353. package/dist/components/Spinner/index.cjs.map +1 -0
  354. package/dist/components/Spinner/index.d.cts.map +1 -0
  355. package/dist/components/Spinner/index.d.mts.map +1 -0
  356. package/dist/components/Spinner/index.mjs.map +1 -0
  357. package/dist/components/Switch/Switch.d.cts.map +1 -1
  358. package/dist/components/Switch/Switch.d.mts.map +1 -1
  359. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -1
  360. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -1
  361. package/dist/components/Tag/Tag.cjs +12 -18
  362. package/dist/components/Tag/Tag.cjs.map +1 -1
  363. package/dist/components/Tag/Tag.d.cts.map +1 -1
  364. package/dist/components/Tag/Tag.d.mts.map +1 -1
  365. package/dist/components/Tag/Tag.mjs +13 -19
  366. package/dist/components/Tag/Tag.mjs.map +1 -1
  367. package/dist/components/Text/Text.cjs +17 -7
  368. package/dist/components/Text/Text.cjs.map +1 -1
  369. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  370. package/dist/components/TextArea/TextArea.d.cts +131 -130
  371. package/dist/components/TextArea/TextArea.d.cts.map +1 -1
  372. package/dist/components/TextArea/TextArea.d.mts +131 -130
  373. package/dist/components/TextArea/TextArea.d.mts.map +1 -1
  374. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  375. package/dist/components/TextButton/TextButton.cjs +17 -7
  376. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  377. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  378. package/dist/components/TextField/TextField.cjs.map +1 -1
  379. package/dist/components/TextField/TextField.d.cts +136 -135
  380. package/dist/components/TextField/TextField.d.cts.map +1 -1
  381. package/dist/components/TextField/TextField.d.mts +136 -135
  382. package/dist/components/TextField/TextField.d.mts.map +1 -1
  383. package/dist/components/TextField/TextField.mjs.map +1 -1
  384. package/dist/components/TextFieldSearch/TextFieldSearch.cjs +22 -9
  385. package/dist/components/TextFieldSearch/TextFieldSearch.cjs.map +1 -1
  386. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +137 -136
  387. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
  388. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +137 -136
  389. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
  390. package/dist/components/TextFieldSearch/TextFieldSearch.mjs +5 -2
  391. package/dist/components/TextFieldSearch/TextFieldSearch.mjs.map +1 -1
  392. package/dist/components/TextFieldSearch/TextFieldSearch.types.cjs.map +1 -1
  393. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts +5 -0
  394. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.cts.map +1 -1
  395. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts +5 -0
  396. package/dist/components/TextFieldSearch/TextFieldSearch.types.d.mts.map +1 -1
  397. package/dist/components/TextFieldSearch/TextFieldSearch.types.mjs.map +1 -1
  398. package/dist/components/TitleAlert/TitleAlert.cjs +21 -19
  399. package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
  400. package/dist/components/TitleAlert/TitleAlert.d.cts +4 -4
  401. package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -1
  402. package/dist/components/TitleAlert/TitleAlert.d.mts +4 -4
  403. package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -1
  404. package/dist/components/TitleAlert/TitleAlert.mjs +22 -20
  405. package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
  406. package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -1
  407. package/dist/components/TitleAlert/TitleAlert.types.d.cts +6 -7
  408. package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -1
  409. package/dist/components/TitleAlert/TitleAlert.types.d.mts +6 -7
  410. package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -1
  411. package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -1
  412. package/dist/components/TitleHub/TitleHub.cjs +22 -13
  413. package/dist/components/TitleHub/TitleHub.cjs.map +1 -1
  414. package/dist/components/TitleHub/TitleHub.d.cts +3 -3
  415. package/dist/components/TitleHub/TitleHub.d.cts.map +1 -1
  416. package/dist/components/TitleHub/TitleHub.d.mts +3 -3
  417. package/dist/components/TitleHub/TitleHub.d.mts.map +1 -1
  418. package/dist/components/TitleHub/TitleHub.mjs +23 -14
  419. package/dist/components/TitleHub/TitleHub.mjs.map +1 -1
  420. package/dist/components/TitleHub/TitleHub.types.cjs.map +1 -1
  421. package/dist/components/TitleHub/TitleHub.types.d.cts +10 -10
  422. package/dist/components/TitleHub/TitleHub.types.d.cts.map +1 -1
  423. package/dist/components/TitleHub/TitleHub.types.d.mts +10 -10
  424. package/dist/components/TitleHub/TitleHub.types.d.mts.map +1 -1
  425. package/dist/components/TitleHub/TitleHub.types.mjs.map +1 -1
  426. package/dist/components/TitleStandard/TitleStandard.cjs +15 -9
  427. package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -1
  428. package/dist/components/TitleStandard/TitleStandard.d.cts +2 -2
  429. package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -1
  430. package/dist/components/TitleStandard/TitleStandard.d.mts +2 -2
  431. package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -1
  432. package/dist/components/TitleStandard/TitleStandard.mjs +16 -10
  433. package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -1
  434. package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -1
  435. package/dist/components/TitleStandard/TitleStandard.types.d.cts +7 -7
  436. package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -1
  437. package/dist/components/TitleStandard/TitleStandard.types.d.mts +7 -7
  438. package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -1
  439. package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -1
  440. package/dist/components/TitleSubpage/TitleSubpage.cjs +31 -18
  441. package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -1
  442. package/dist/components/TitleSubpage/TitleSubpage.d.cts +3 -3
  443. package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -1
  444. package/dist/components/TitleSubpage/TitleSubpage.d.mts +3 -3
  445. package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -1
  446. package/dist/components/TitleSubpage/TitleSubpage.mjs +32 -19
  447. package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -1
  448. package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -1
  449. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +8 -9
  450. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -1
  451. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +8 -9
  452. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -1
  453. package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -1
  454. package/dist/components/Toast/Toast.cjs.map +1 -1
  455. package/dist/components/Toast/Toast.mjs.map +1 -1
  456. package/dist/components/Toast/Toaster.cjs +17 -7
  457. package/dist/components/Toast/Toaster.cjs.map +1 -1
  458. package/dist/components/Toast/Toaster.d.cts +1 -1
  459. package/dist/components/Toast/Toaster.d.cts.map +1 -1
  460. package/dist/components/Toast/Toaster.d.mts +1 -1
  461. package/dist/components/Toast/Toaster.d.mts.map +1 -1
  462. package/dist/components/Toast/Toaster.mjs.map +1 -1
  463. package/dist/components/index.cjs +1 -1
  464. package/dist/components/index.cjs.map +1 -1
  465. package/dist/components/index.d.cts +2 -2
  466. package/dist/components/index.d.cts.map +1 -1
  467. package/dist/components/index.d.mts +2 -2
  468. package/dist/components/index.d.mts.map +1 -1
  469. package/dist/components/index.mjs +1 -1
  470. package/dist/components/index.mjs.map +1 -1
  471. package/dist/components/temp-components/Blockies/Blockies.d.cts.map +1 -1
  472. package/dist/components/temp-components/Blockies/Blockies.d.mts.map +1 -1
  473. package/dist/components/temp-components/Blockies/Blockies.utilities.cjs +2 -2
  474. package/dist/components/temp-components/Blockies/Blockies.utilities.cjs.map +1 -1
  475. package/dist/components/temp-components/Blockies/Blockies.utilities.mjs.map +1 -1
  476. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +17 -7
  477. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
  478. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
  479. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
  480. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +10 -9
  481. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -1
  482. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -1
  483. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -1
  484. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +10 -8
  485. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -1
  486. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs +0 -5
  487. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs.map +1 -1
  488. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs +17 -7
  489. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs.map +1 -1
  490. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.cts.map +1 -1
  491. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.d.mts.map +1 -1
  492. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.mjs.map +1 -1
  493. package/dist/components/temp-components/Jazzicon/Jazzicon.cjs +1 -1
  494. package/dist/components/temp-components/Jazzicon/Jazzicon.cjs.map +1 -1
  495. package/dist/components/temp-components/Jazzicon/Jazzicon.d.cts.map +1 -1
  496. package/dist/components/temp-components/Jazzicon/Jazzicon.d.mts.map +1 -1
  497. package/dist/components/temp-components/Jazzicon/Jazzicon.mjs +1 -1
  498. package/dist/components/temp-components/Jazzicon/Jazzicon.mjs.map +1 -1
  499. package/dist/components/temp-components/Maskicon/Maskicon.cjs +17 -7
  500. package/dist/components/temp-components/Maskicon/Maskicon.cjs.map +1 -1
  501. package/dist/components/temp-components/Maskicon/Maskicon.d.cts.map +1 -1
  502. package/dist/components/temp-components/Maskicon/Maskicon.d.mts.map +1 -1
  503. package/dist/components/temp-components/Maskicon/Maskicon.mjs.map +1 -1
  504. package/dist/components/temp-components/Maskicon/Maskicon.utilities.cjs +4 -5
  505. package/dist/components/temp-components/Maskicon/Maskicon.utilities.cjs.map +1 -1
  506. package/dist/components/temp-components/Maskicon/Maskicon.utilities.mjs.map +1 -1
  507. package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs +1 -1
  508. package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs.map +1 -1
  509. package/dist/components/temp-components/TextOrChildren/TextOrChildren.d.cts.map +1 -1
  510. package/dist/components/temp-components/TextOrChildren/TextOrChildren.d.mts.map +1 -1
  511. package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs +1 -1
  512. package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs.map +1 -1
  513. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
  514. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +1 -1
  515. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +1 -1
  516. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
  517. package/dist/test-utils/createRenderer.cjs +17 -11
  518. package/dist/test-utils/createRenderer.cjs.map +1 -1
  519. package/dist/test-utils/createRenderer.d.cts.map +1 -1
  520. package/dist/test-utils/createRenderer.d.mts.map +1 -1
  521. package/package.json +8 -8
  522. package/dist/components/temp-components/Spinner/Spinner.cjs +0 -68
  523. package/dist/components/temp-components/Spinner/Spinner.cjs.map +0 -1
  524. package/dist/components/temp-components/Spinner/Spinner.d.cts.map +0 -1
  525. package/dist/components/temp-components/Spinner/Spinner.d.mts.map +0 -1
  526. package/dist/components/temp-components/Spinner/Spinner.mjs +0 -48
  527. package/dist/components/temp-components/Spinner/Spinner.mjs.map +0 -1
  528. package/dist/components/temp-components/Spinner/Spinner.types.cjs.map +0 -1
  529. package/dist/components/temp-components/Spinner/Spinner.types.d.cts.map +0 -1
  530. package/dist/components/temp-components/Spinner/Spinner.types.d.mts.map +0 -1
  531. package/dist/components/temp-components/Spinner/Spinner.types.mjs.map +0 -1
  532. package/dist/components/temp-components/Spinner/index.cjs.map +0 -1
  533. package/dist/components/temp-components/Spinner/index.d.cts.map +0 -1
  534. package/dist/components/temp-components/Spinner/index.d.mts.map +0 -1
  535. package/dist/components/temp-components/Spinner/index.mjs.map +0 -1
  536. /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.d.cts +0 -0
  537. /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.d.mts +0 -0
  538. /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.cjs +0 -0
  539. /package/dist/components/{temp-components/Spinner → Spinner}/Spinner.types.mjs +0 -0
  540. /package/dist/components/{temp-components/Spinner → Spinner}/index.cjs +0 -0
  541. /package/dist/components/{temp-components/Spinner → Spinner}/index.d.cts +0 -0
  542. /package/dist/components/{temp-components/Spinner → Spinner}/index.d.mts +0 -0
  543. /package/dist/components/{temp-components/Spinner → Spinner}/index.mjs +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ListItemMultiSelect.mjs","sourceRoot":"","sources":["../../../src/components/ListItemMultiSelect/ListItemMultiSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AACvC,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAIvC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAEnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,EACV,YAAY,GAAG,CAAC,EAChB,WAAW,EACX,GAAG,KAAK,EACiB,EAAE,EAAE;IAC7B,MAAM,mBAAmB,GAAG,UAAU;QACpC,CAAC,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,WAAW,CAAC;QACtD,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,CACL,CAAC,QAAQ,CACP,aAAa,CACb,WAAW,CAAC,CAAC,mBAAmB,CAAC,CACjC,YAAY,CAAC,CACX,CAAC,QAAQ,CACP,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,EAAE,CACR,aAAa,CAAC,MAAM,EACpB,CACH,CACD,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC","sourcesContent":["import { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Checkbox } from '../Checkbox';\nimport { ListItem } from '../ListItem';\n\nimport type { ListItemMultiSelectProps } from './ListItemMultiSelect.types';\n\nconst noopChange = () => undefined;\n\nexport const ListItemMultiSelect = ({\n isSelected,\n accessoryGap = 3,\n twClassName,\n ...props\n}: ListItemMultiSelectProps) => {\n const resolvedTwClassName = isSelected\n ? mergeTwClassName('bg-background-muted', twClassName)\n : twClassName;\n\n return (\n <ListItem\n isInteractive\n twClassName={resolvedTwClassName}\n endAccessory={\n <Checkbox\n isSelected={isSelected}\n onChange={noopChange}\n label=\"\"\n pointerEvents=\"none\"\n />\n }\n accessoryGap={accessoryGap}\n {...props}\n />\n );\n};\n\nListItemMultiSelect.displayName = 'ListItemMultiSelect';\n"]}
1
+ {"version":3,"file":"ListItemMultiSelect.mjs","sourceRoot":"","sources":["../../../src/components/ListItemMultiSelect/ListItemMultiSelect.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AACvC,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAIvC,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC;AAEnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAClC,UAAU,EACV,YAAY,GAAG,CAAC,EAChB,WAAW,EACX,GAAG,KAAK,EACiB,EAAE,EAAE;IAC7B,MAAM,mBAAmB,GAAG,UAAU;QACpC,CAAC,CAAC,gBAAgB,CAAC,qBAAqB,EAAE,WAAW,CAAC;QACtD,CAAC,CAAC,WAAW,CAAC;IAEhB,OAAO,CACL,CAAC,QAAQ,CACP,aAAa,CACb,WAAW,CAAC,CAAC,mBAAmB,CAAC,CACjC,YAAY,CAAC,CACX,CAAC,QAAQ,CACP,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,KAAK,CAAC,EAAE,CACR,aAAa,CAAC,MAAM,EAExB,CAAC,CACD,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,IAAI,KAAK,CAAC,EACV,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC","sourcesContent":["import { mergeTwClassName } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Checkbox } from '../Checkbox';\nimport { ListItem } from '../ListItem';\n\nimport type { ListItemMultiSelectProps } from './ListItemMultiSelect.types';\n\nconst noopChange = () => undefined;\n\nexport const ListItemMultiSelect = ({\n isSelected,\n accessoryGap = 3,\n twClassName,\n ...props\n}: ListItemMultiSelectProps) => {\n const resolvedTwClassName = isSelected\n ? mergeTwClassName('bg-background-muted', twClassName)\n : twClassName;\n\n return (\n <ListItem\n isInteractive\n twClassName={resolvedTwClassName}\n endAccessory={\n <Checkbox\n isSelected={isSelected}\n onChange={noopChange}\n label=\"\"\n pointerEvents=\"none\"\n />\n }\n accessoryGap={accessoryGap}\n {...props}\n />\n );\n};\n\nListItemMultiSelect.displayName = 'ListItemMultiSelect';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MainActionButton.d.cts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,yHAY1B,qBAAqB,sBA8CvB,CAAC"}
1
+ {"version":3,"file":"MainActionButton.d.cts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,GAAI,sHAY9B,qBAAqB,sBA8CvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MainActionButton.d.mts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,yHAY1B,qBAAqB,sBA8CvB,CAAC"}
1
+ {"version":3,"file":"MainActionButton.d.mts","sourceRoot":"","sources":["../../../src/components/MainActionButton/MainActionButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB,GAAI,sHAY9B,qBAAqB,sBA8CvB,CAAC"}
@@ -16,7 +16,7 @@ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
16
16
  return 'border-error-default';
17
17
  }
18
18
  if (isChecked) {
19
- return 'border-primary-default';
19
+ return 'border-icon-default';
20
20
  }
21
21
  return 'border-default';
22
22
  };
@@ -27,7 +27,7 @@ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
27
27
  if (isDanger) {
28
28
  return 'bg-error-default';
29
29
  }
30
- return 'bg-primary-default';
30
+ return 'bg-icon-default';
31
31
  };
32
32
  const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
33
33
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,2BAA2B,CAAC;KACpC;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,sBAAsB,CAAC;KAC/B;IACD,IAAI,SAAS,EAAE;QACb,OAAO,wBAAwB,CAAC;KACjC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,UAAmB,EACnB,QAAiB,EACT,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,qBAAqB,CAAC;KAC9B;IACD,IAAI,QAAQ,EAAE;QACZ,OAAO,kBAAkB,CAAC;KAC3B;IACD,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAA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ACZ,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CACb,qBAAqB,EACrB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7C,CAAC,EACF,CACH,CACH;QAAA,EAAE,mBAAI,CACN;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,+BAAgB,CACpB;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,WAAW,eAuEtB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-primary-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-primary-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
1
+ {"version":3,"file":"RadioButton.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAsD;AAEtD,gFAAmE;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,2BAA2B,CAAC;IACrC,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,sBAAsB,GAAG,CAC7B,UAAmB,EACnB,QAAiB,EACT,EAAE;IACV,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC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CAAC,CAC3D;YACD,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAEF;UAAA,CAAC,SAAS,IAAI,CACZ,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CACb,qBAAqB,EACrB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7C,CAAC,EACF,CACH,CACH;QAAA,EAAE,mBAAI,CACN;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,+BAAgB,CACpB;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAvEW,QAAA,WAAW,eAuEtB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-icon-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-icon-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,gKAarB,gBAAgB,sBA0DlB,CAAC"}
1
+ {"version":3,"file":"RadioButton.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,GAAI,6JAazB,gBAAgB,sBA0DlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,gKAarB,gBAAgB,sBA0DlB,CAAC"}
1
+ {"version":3,"file":"RadioButton.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAgC5D,eAAO,MAAM,WAAW,GAAI,6JAazB,gBAAgB,sBA0DlB,CAAC"}
@@ -17,7 +17,7 @@ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
17
17
  return 'border-error-default';
18
18
  }
19
19
  if (isChecked) {
20
- return 'border-primary-default';
20
+ return 'border-icon-default';
21
21
  }
22
22
  return 'border-default';
23
23
  };
@@ -28,7 +28,7 @@ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
28
28
  if (isDanger) {
29
29
  return 'bg-error-default';
30
30
  }
31
- return 'bg-primary-default';
31
+ return 'bg-icon-default';
32
32
  };
33
33
  export const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
34
34
  const tw = useTailwind();
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,qBAAqB;AAEtD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,EAAE;QACd,OAAO,2BAA2B,CAAC;KACpC;IACD,IAAI,QAAQ,EAAE;QACZ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C1B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;YACjC,qBAAqB,EAAE,KAAK;SAC7B,CAAC,CAEF;QAAA,CAAC,IAAI,CACH,IAAI,yBAAyB,CAAC,CAC9B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,qEAAqE,EACrE,yBAAyB,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAC3D;YACD,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAEF;UAAA,CAAC,SAAS,IAAI,CACZ,CAAC,IAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CACb,qBAAqB,EACrB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7C,CAAC,EACF,CACH,CACH;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,gBAAgB,CACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-primary-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-primary-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
1
+ {"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,qBAAqB;AAEtD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,yBAAyB,GAAG,CAChC,UAAmB,EACnB,QAAiB,EACjB,SAAkB,EACV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U;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAClE,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC;YACjC,qBAAqB,EAAE,KAAK;SAC7B,CAAC,CAEF;QAAA,CAAC,IAAI,CACH,IAAI,yBAAyB,CAAC,CAC9B,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,qEAAqE,EACrE,yBAAyB,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAC3D;YACD,yBAAyB,EAAE,KAAK;SACjC,CAAC,CAEF;UAAA,CAAC,SAAS,IAAI,CACZ,CAAC,IAAI,CACH,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CACb,qBAAqB,EACrB,sBAAsB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAC7C,CAAC,EACF,CACH,CACH;QAAA,EAAE,IAAI,CACN;QAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAChE;YAAA,CAAC,KAAK,CACR;UAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;MAAA,EAAE,gBAAgB,CACpB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-icon-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-icon-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.SectionDivider = void 0;
27
37
  const design_system_shared_1 = require("@metamask-previews/design-system-shared");
@@ -1 +1 @@
1
- {"version":3,"file":"SectionDivider.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAyE;AACzE,8FAA4E;AAC5E,+CAA0C;AAG1C,0CAA6B;AAIhB,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,cAAc,GAAG,YAAY,CAAC;KAC/B;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE;QAClB,cAAc,GAAG,UAAU,CAAC;KAC7B;SAAM;QACL,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;KAClC;IAED,OAAO,CACL,CAAC,SAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,qCAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
1
+ {"version":3,"file":"SectionDivider.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAyE;AACzE,8FAA4E;AAC5E,+CAA0C;AAG1C,0CAA6B;AAIhB,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,cAAc,GAAG,YAAY,CAAC;IAChC,CAAC;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,cAAc,GAAG,UAAU,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,CACL,CAAC,SAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,qCAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { View } from "react-native";
3
3
  export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask-previews/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
4
- twClassName?: string | undefined;
4
+ twClassName?: string;
5
5
  } & React.RefAttributes<View>>;
6
6
  //# sourceMappingURL=SectionDivider.d.cts.map
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import type { View } from "react-native";
3
3
  export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask-previews/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
4
- twClassName?: string | undefined;
4
+ twClassName?: string;
5
5
  } & React.RefAttributes<View>>;
6
6
  //# sourceMappingURL=SectionDivider.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionDivider.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AACzE,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAG1C,OAAO,EAAE,GAAG,EAAE,yBAAe;AAI7B,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,cAAc,GAAG,YAAY,CAAC;KAC/B;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE;QAClB,cAAc,GAAG,UAAU,CAAC;KAC7B;SAAM;QACL,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;KAClC;IAED,OAAO,CACL,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
1
+ {"version":3,"file":"SectionDivider.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AACzE,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAG1C,OAAO,EAAE,GAAG,EAAE,yBAAe;AAI7B,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACZ,cAAc,GAAG,YAAY,CAAC;IAChC,CAAC;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACnB,cAAc,GAAG,UAAU,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,CACL,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
@@ -9,19 +9,19 @@ const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-t
9
9
  const react_1 = __importDefault(require("react"));
10
10
  const react_native_1 = require("react-native");
11
11
  const Box_1 = require("../Box/index.cjs");
12
- const BoxRow_1 = require("../BoxRow/index.cjs");
13
12
  const Icon_1 = require("../Icon/index.cjs");
13
+ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
14
14
  /**
15
15
  * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
16
16
  * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
17
- * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.
17
+ * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
18
18
  *
19
19
  * @param sectionHeaderProps - Component props
20
20
  * @param sectionHeaderProps.title - Title content for the inner row (required)
21
21
  * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
22
22
  * @param sectionHeaderProps.children - Optional full-width content below the header row
23
23
  * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
24
- * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
24
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
25
25
  * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
26
26
  * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
27
27
  * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
@@ -42,20 +42,25 @@ const SectionHeader = (sectionHeaderProps) => {
42
42
  const resolvedStartAccessory = startIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={startIconName}/>) : (startAccessory);
43
43
  const resolvedEndAccessory = resolvedEndIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconAlternative} twClassName="shrink-0" {...endIconProps} name={resolvedEndIconName}/>) : (endAccessory);
44
44
  const hasAccessories = Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);
45
- const titleRow = title ? (<BoxRow_1.BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} twClassName={(0, design_system_shared_1.mergeTwClassName)(hasAccessories ? 'w-full shrink min-w-0' : '', titleWrapperProps?.twClassName)} textProps={{
45
+ const titleRow = title ? (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} {...titleWrapperProps} twClassName={(0, design_system_shared_1.mergeTwClassName)(hasAccessories ? 'w-full shrink min-w-0' : '', titleWrapperProps?.twClassName)}>
46
+ <TextOrChildren_1.TextOrChildren textProps={{
46
47
  variant: design_system_shared_1.TextVariant.HeadingMd,
47
48
  color: design_system_shared_1.TextColor.TextDefault,
48
49
  ...titleProps,
49
50
  }}>
50
- {title}
51
- </BoxRow_1.BoxRow>) : null;
51
+ {title}
52
+ </TextOrChildren_1.TextOrChildren>
53
+ {titleAccessory}
54
+ </Box_1.Box>) : null;
52
55
  let mainContent = null;
53
56
  if (titleRow) {
54
57
  mainContent = hasAccessories ? (<Box_1.Box twClassName="shrink min-w-0">{titleRow}</Box_1.Box>) : (titleRow);
55
58
  }
56
- const headerRow = (<BoxRow_1.BoxRow gap={1} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
59
+ const headerRow = (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1}>
60
+ {resolvedStartAccessory}
57
61
  {mainContent}
58
- </BoxRow_1.BoxRow>);
62
+ {resolvedEndAccessory}
63
+ </Box_1.Box>);
59
64
  const body = children ? (<Box_1.Box gap={1}>
60
65
  {headerRow}
61
66
  {children}
@@ -77,9 +82,11 @@ const SectionHeader = (sectionHeaderProps) => {
77
82
  {children}
78
83
  </Box_1.Box>);
79
84
  }
80
- return (<BoxRow_1.BoxRow {...props} gap={1} style={style} twClassName={(0, design_system_shared_1.mergeTwClassName)('px-4 pb-2 pt-3', twClassName)} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
85
+ return (<Box_1.Box {...props} flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} style={style} twClassName={(0, design_system_shared_1.mergeTwClassName)('px-4 pb-2 pt-3', twClassName)}>
86
+ {resolvedStartAccessory}
81
87
  {mainContent}
82
- </BoxRow_1.BoxRow>);
88
+ {resolvedEndAccessory}
89
+ </Box_1.Box>);
83
90
  };
84
91
  exports.SectionHeader = SectionHeader;
85
92
  exports.SectionHeader.displayName = 'SectionHeader';
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAEzC,0CAA6B;AAC7B,gDAAmC;AACn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C7D,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,WAAW,CACd;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAvJW,QAAA,aAAa,iBAuJxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <BoxRow\n gap={1}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <BoxRow\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
1
+ {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,kFASiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAEzC,0CAA6B;AAC7B,4CAA+B;AAC/B,gFAAmE;AAInE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACI,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW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CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,oBAAoB,CACvB;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAhKW,QAAA,aAAa,iBAgKxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Icon } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n {...titleWrapperProps}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {titleAccessory}\n </Box>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <Box\n {...props}\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -3,14 +3,14 @@ import type { SectionHeaderProps } from "./SectionHeader.types.cjs";
3
3
  /**
4
4
  * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
5
5
  * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
6
- * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.
6
+ * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
7
7
  *
8
8
  * @param sectionHeaderProps - Component props
9
9
  * @param sectionHeaderProps.title - Title content for the inner row (required)
10
10
  * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
11
11
  * @param sectionHeaderProps.children - Optional full-width content below the header row
12
12
  * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
13
- * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
13
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
14
14
  * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
15
15
  * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
16
16
  * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuJtD,CAAC"}
1
+ {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgKtD,CAAC"}
@@ -3,14 +3,14 @@ import type { SectionHeaderProps } from "./SectionHeader.types.mjs";
3
3
  /**
4
4
  * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
5
5
  * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
6
- * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.
6
+ * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
7
7
  *
8
8
  * @param sectionHeaderProps - Component props
9
9
  * @param sectionHeaderProps.title - Title content for the inner row (required)
10
10
  * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
11
11
  * @param sectionHeaderProps.children - Optional full-width content below the header row
12
12
  * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
13
- * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
13
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
14
14
  * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
15
15
  * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
16
16
  * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAuJtD,CAAC"}
1
+ {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAgKtD,CAAC"}
@@ -4,25 +4,25 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { IconColor, IconName, IconSize, mergeTwClassName, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
7
+ import { BoxAlignItems, BoxFlexDirection, IconColor, IconName, IconSize, mergeTwClassName, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
9
9
  import $React from "react";
10
10
  const React = $importDefault($React);
11
11
  import { Pressable } from "react-native";
12
12
  import { Box } from "../Box/index.mjs";
13
- import { BoxRow } from "../BoxRow/index.mjs";
14
13
  import { Icon } from "../Icon/index.mjs";
14
+ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
15
15
  /**
16
16
  * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
17
17
  * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
18
- * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.
18
+ * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.
19
19
  *
20
20
  * @param sectionHeaderProps - Component props
21
21
  * @param sectionHeaderProps.title - Title content for the inner row (required)
22
22
  * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)
23
23
  * @param sectionHeaderProps.children - Optional full-width content below the header row
24
24
  * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
25
- * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
25
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`
26
26
  * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
27
27
  * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
28
28
  * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
@@ -43,20 +43,25 @@ export const SectionHeader = (sectionHeaderProps) => {
43
43
  const resolvedStartAccessory = startIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={startIconName}/>) : (startAccessory);
44
44
  const resolvedEndAccessory = resolvedEndIconName ? (<Icon size={IconSize.Md} color={IconColor.IconAlternative} twClassName="shrink-0" {...endIconProps} name={resolvedEndIconName}/>) : (endAccessory);
45
45
  const hasAccessories = Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);
46
- const titleRow = title ? (<BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} twClassName={mergeTwClassName(hasAccessories ? 'w-full shrink min-w-0' : '', titleWrapperProps?.twClassName)} textProps={{
46
+ const titleRow = title ? (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} {...titleWrapperProps} twClassName={mergeTwClassName(hasAccessories ? 'w-full shrink min-w-0' : '', titleWrapperProps?.twClassName)}>
47
+ <TextOrChildren textProps={{
47
48
  variant: TextVariant.HeadingMd,
48
49
  color: TextColor.TextDefault,
49
50
  ...titleProps,
50
51
  }}>
51
- {title}
52
- </BoxRow>) : null;
52
+ {title}
53
+ </TextOrChildren>
54
+ {titleAccessory}
55
+ </Box>) : null;
53
56
  let mainContent = null;
54
57
  if (titleRow) {
55
58
  mainContent = hasAccessories ? (<Box twClassName="shrink min-w-0">{titleRow}</Box>) : (titleRow);
56
59
  }
57
- const headerRow = (<BoxRow gap={1} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
60
+ const headerRow = (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1}>
61
+ {resolvedStartAccessory}
58
62
  {mainContent}
59
- </BoxRow>);
63
+ {resolvedEndAccessory}
64
+ </Box>);
60
65
  const body = children ? (<Box gap={1}>
61
66
  {headerRow}
62
67
  {children}
@@ -78,9 +83,11 @@ export const SectionHeader = (sectionHeaderProps) => {
78
83
  {children}
79
84
  </Box>);
80
85
  }
81
- return (<BoxRow {...props} gap={1} style={style} twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
86
+ return (<Box {...props} flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} style={style} twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}>
87
+ {resolvedStartAccessory}
82
88
  {mainContent}
83
- </BoxRow>);
89
+ {resolvedEndAccessory}
90
+ </Box>);
84
91
  };
85
92
  SectionHeader.displayName = 'SectionHeader';
86
93
  //# sourceMappingURL=SectionHeader.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAEzC,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,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AAW,EACX,OAAO,IAAI,CAAC,UAAU,IAAI,YAAY,CACvC,CAAC;gBACF,MAAM,eAAe,GACnB,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAE3D,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,CAAC,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,IAAI,CACP;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,IAAI,QAAQ,EAAE;QACZ,OAAO,CACL,CAAC,GAAG,CACF,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAE7D;QAAA,CAAC,SAAS,CACV;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,GAAG,CAAC,CACP,CAAC;KACH;IAED,OAAO,CACL,CAAC,MAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAC7D,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,WAAW,CACd;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <BoxRow\n gap={1}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <BoxRow\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {mainContent}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
1
+ {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAEzC,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAC/B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACT,GAAG,kBAAkB,CAAC;IAEvB,MA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vB;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,oBAAoB,CACvB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Icon } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.\n * Otherwise, remaining `View` props are forwarded to the outer row {@link Box}.\n *\n * @param sectionHeaderProps - Component props\n * @param sectionHeaderProps.title - Title content for the inner row (required)\n * @param sectionHeaderProps.titleAccessory - Optional inline metadata beside `title` in the inner row (not for trailing chevrons; use `endIconName` / `endIconProps`)\n * @param sectionHeaderProps.children - Optional full-width content below the header row\n * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner title row `Box`\n * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set\n * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param sectionHeaderProps.endIconName - Optional end icon on the outer header row (trailing chevrons, disclosure arrows); takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided\n * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`\n * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press\n * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)\n * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = (\n sectionHeaderProps,\n) => {\n const {\n title,\n children,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n isInteractive,\n twClassName = '',\n style,\n ...props\n } = sectionHeaderProps;\n\n const tw = useTailwind();\n const resolvedEndIconName =\n endIconName ??\n (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);\n\n const resolvedStartAccessory = startIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={startIconName}\n />\n ) : (\n startAccessory\n );\n\n const resolvedEndAccessory = resolvedEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconAlternative}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={resolvedEndIconName}\n />\n ) : (\n endAccessory\n );\n\n const hasAccessories =\n Boolean(resolvedStartAccessory) || Boolean(resolvedEndAccessory);\n\n const titleRow = title ? (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n {...titleWrapperProps}\n twClassName={mergeTwClassName(\n hasAccessories ? 'w-full shrink min-w-0' : '',\n titleWrapperProps?.twClassName,\n )}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {titleAccessory}\n </Box>\n ) : null;\n\n let mainContent = null;\n if (titleRow) {\n mainContent = hasAccessories ? (\n <Box twClassName=\"shrink min-w-0\">{titleRow}</Box>\n ) : (\n titleRow\n );\n }\n\n const headerRow = (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n\n const body = children ? (\n <Box gap={1}>\n {headerRow}\n {children}\n </Box>\n ) : (\n headerRow\n );\n\n if (isInteractive) {\n const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;\n const isDisabled = Boolean(disabled);\n\n return (\n <Pressable\n accessibilityRole={accessibilityRole}\n style={({ pressed }) => {\n const baseStyle = tw.style(\n 'px-4 pb-2 pt-3',\n twClassName,\n pressed && !isDisabled && 'opacity-70',\n );\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;\n }}\n {...props}\n >\n {body}\n </Pressable>\n );\n }\n\n if (children) {\n return (\n <Box\n {...props}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {headerRow}\n {children}\n </Box>\n );\n }\n\n return (\n <Box\n {...props}\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n style={style}\n twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)}\n >\n {resolvedStartAccessory}\n {mainContent}\n {resolvedEndAccessory}\n </Box>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask-previews/design-system-shared';\nimport type { PressableProps, ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text/Text.types';\n\ntype SectionHeaderPropsBase = SectionHeaderPropsShared & {\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional prop to pass additional properties to the start icon.\n */\n startIconProps?: Omit<Partial<IconProps>, 'name'>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Omit<Partial<IconProps>, 'name'>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n};\n\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and wrapper props.\n * When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a {@link BoxRow} with `ViewProps`.\n */\nexport type SectionHeaderProps =\n | (SectionHeaderPropsBase & {\n isInteractive?: false;\n } & Omit<ViewProps, 'children'>)\n | (SectionHeaderPropsBase & {\n isInteractive: true;\n } & Omit<PressableProps, 'children'>);\n"]}
1
+ {"version":3,"file":"SectionHeader.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask-previews/design-system-shared';\nimport type { PressableProps, ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text/Text.types';\n\ntype SectionHeaderPropsBase = SectionHeaderPropsShared & {\n /**\n * Optional props merged into the title `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props spread onto the title row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Omits `children` (SectionHeader sets it via `title` and `titleAccessory`).\n */\n titleWrapperProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional prop to pass additional properties to the start icon.\n */\n startIconProps?: Omit<Partial<IconProps>, 'name'>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Omit<Partial<IconProps>, 'name'>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n};\n\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and wrapper props.\n * When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a row {@link Box} with `ViewProps`.\n */\nexport type SectionHeaderProps =\n | (SectionHeaderPropsBase & {\n isInteractive?: false;\n } & Omit<ViewProps, 'children'>)\n | (SectionHeaderPropsBase & {\n isInteractive: true;\n } & Omit<PressableProps, 'children'>);\n"]}
@@ -1,17 +1,17 @@
1
1
  import type { SectionHeaderPropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { PressableProps, ViewProps } from "react-native";
3
- import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
3
+ import type { BoxProps } from "../Box/Box.types.cjs";
4
4
  import type { IconProps } from "../Icon/index.cjs";
5
5
  import type { TextProps } from "../Text/Text.types.cjs";
6
6
  type SectionHeaderPropsBase = SectionHeaderPropsShared & {
7
7
  /**
8
- * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
8
+ * Optional props merged into the title `Text` when `title` is a string.
9
9
  */
10
10
  titleProps?: Omit<Partial<TextProps>, 'children'>;
11
11
  /**
12
- * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).
12
+ * Optional props spread onto the title row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Omits `children` (SectionHeader sets it via `title` and `titleAccessory`).
13
13
  */
14
- titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
14
+ titleWrapperProps?: Omit<Partial<BoxProps>, 'children'>;
15
15
  /**
16
16
  * Optional prop to pass additional properties to the start icon.
17
17
  */
@@ -28,7 +28,7 @@ type SectionHeaderPropsBase = SectionHeaderPropsShared & {
28
28
  /**
29
29
  * SectionHeader component props (React Native).
30
30
  * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and wrapper props.
31
- * When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a {@link BoxRow} with `ViewProps`.
31
+ * When `isInteractive` is `true`, the outer wrapper is a `Pressable`; otherwise it is a row {@link Box} with `ViewProps`.
32
32
  */
33
33
  export type SectionHeaderProps = (SectionHeaderPropsBase & {
34
34
  isInteractive?: false;
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB;AAG9D,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,KAAK,sBAAsB,GAAG,wBAAwB,GAAG;IACvD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CACtB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAClD;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAChD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,CAAC,sBAAsB,GAAG;IACxB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,GAChC,CAAC,sBAAsB,GAAG;IACxB,aAAa,EAAE,IAAI,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"SectionHeader.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,qBAAqB;AAG9D,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,KAAK,sBAAsB,GAAG,wBAAwB,GAAG;IACvD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,cAAc,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAClD;;OAEG;IACH,YAAY,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IAChD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAC1B,CAAC,sBAAsB,GAAG;IACxB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,GAChC,CAAC,sBAAsB,GAAG;IACxB,aAAa,EAAE,IAAI,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC,CAAC"}