@metamask/design-system-react-native 0.26.0 → 0.28.0

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 (505) hide show
  1. package/CHANGELOG.md +38 -1
  2. package/dist/components/ActionListItem/ActionListItem.cjs +1 -1
  3. package/dist/components/ActionListItem/ActionListItem.cjs.map +1 -1
  4. package/dist/components/ActionListItem/ActionListItem.mjs +1 -1
  5. package/dist/components/ActionListItem/ActionListItem.mjs.map +1 -1
  6. package/dist/components/ActionListItem/ActionListItem.types.d.cts +1 -1
  7. package/dist/components/ActionListItem/ActionListItem.types.d.cts.map +1 -1
  8. package/dist/components/ActionListItem/ActionListItem.types.d.mts +1 -1
  9. package/dist/components/ActionListItem/ActionListItem.types.d.mts.map +1 -1
  10. package/dist/components/AvatarBase/AvatarBase.cjs +2 -2
  11. package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
  12. package/dist/components/AvatarBase/AvatarBase.mjs +2 -2
  13. package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
  14. package/dist/components/AvatarBase/AvatarBase.types.d.cts +1 -1
  15. package/dist/components/AvatarBase/AvatarBase.types.d.cts.map +1 -1
  16. package/dist/components/AvatarBase/AvatarBase.types.d.mts +1 -1
  17. package/dist/components/AvatarBase/AvatarBase.types.d.mts.map +1 -1
  18. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -2
  19. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  20. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  21. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  22. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -2
  23. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  24. package/dist/components/AvatarGroup/AvatarGroup.cjs +1 -1
  25. package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
  26. package/dist/components/AvatarGroup/AvatarGroup.mjs +1 -1
  27. package/dist/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
  28. package/dist/components/AvatarGroup/AvatarGroup.types.d.cts +1 -1
  29. package/dist/components/AvatarGroup/AvatarGroup.types.d.cts.map +1 -1
  30. package/dist/components/AvatarGroup/AvatarGroup.types.d.mts +1 -1
  31. package/dist/components/AvatarGroup/AvatarGroup.types.d.mts.map +1 -1
  32. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -2
  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 +2 -2
  37. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  38. package/dist/components/AvatarToken/AvatarToken.cjs +2 -2
  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 +2 -2
  43. package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
  44. package/dist/components/BadgeCount/BadgeCount.cjs +1 -1
  45. package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
  46. package/dist/components/BadgeCount/BadgeCount.mjs +1 -1
  47. package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
  48. package/dist/components/BadgeCount/BadgeCount.types.d.cts +1 -1
  49. package/dist/components/BadgeCount/BadgeCount.types.d.cts.map +1 -1
  50. package/dist/components/BadgeCount/BadgeCount.types.d.mts +1 -1
  51. package/dist/components/BadgeCount/BadgeCount.types.d.mts.map +1 -1
  52. package/dist/components/BadgeIcon/BadgeIcon.cjs +1 -1
  53. package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
  54. package/dist/components/BadgeIcon/BadgeIcon.mjs +1 -1
  55. package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
  56. package/dist/components/BadgeIcon/BadgeIcon.types.d.cts +1 -1
  57. package/dist/components/BadgeIcon/BadgeIcon.types.d.cts.map +1 -1
  58. package/dist/components/BadgeIcon/BadgeIcon.types.d.mts +1 -1
  59. package/dist/components/BadgeIcon/BadgeIcon.types.d.mts.map +1 -1
  60. package/dist/components/BadgeStatus/BadgeStatus.cjs +1 -1
  61. package/dist/components/BadgeStatus/BadgeStatus.cjs.map +1 -1
  62. package/dist/components/BadgeStatus/BadgeStatus.mjs +1 -1
  63. package/dist/components/BadgeStatus/BadgeStatus.mjs.map +1 -1
  64. package/dist/components/BadgeStatus/BadgeStatus.types.d.cts +1 -1
  65. package/dist/components/BadgeStatus/BadgeStatus.types.d.cts.map +1 -1
  66. package/dist/components/BadgeStatus/BadgeStatus.types.d.mts +1 -1
  67. package/dist/components/BadgeStatus/BadgeStatus.types.d.mts.map +1 -1
  68. package/dist/components/BadgeWrapper/BadgeWrapper.cjs +1 -1
  69. package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
  70. package/dist/components/BadgeWrapper/BadgeWrapper.mjs +1 -1
  71. package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
  72. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts +1 -1
  73. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.cts.map +1 -1
  74. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts +1 -1
  75. package/dist/components/BadgeWrapper/BadgeWrapper.types.d.mts.map +1 -1
  76. package/dist/components/BannerBase/BannerBase.types.d.cts +1 -1
  77. package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -1
  78. package/dist/components/BannerBase/BannerBase.types.d.mts +1 -1
  79. package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -1
  80. package/dist/components/BottomSheet/BottomSheet.cjs +9 -6
  81. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  82. package/dist/components/BottomSheet/BottomSheet.d.cts +0 -35
  83. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
  84. package/dist/components/BottomSheet/BottomSheet.d.mts +0 -35
  85. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
  86. package/dist/components/BottomSheet/BottomSheet.mjs +9 -6
  87. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
  88. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +28 -17
  89. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  90. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts +0 -35
  91. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
  92. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts +0 -35
  93. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
  94. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +30 -19
  95. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  96. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.cjs.map +1 -1
  97. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts +1 -9
  98. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.cts.map +1 -1
  99. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts +1 -9
  100. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.d.mts.map +1 -1
  101. package/dist/components/BottomSheetDialog/BottomSheetDialog.types.mjs.map +1 -1
  102. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs +1 -1
  103. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -1
  104. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs +1 -1
  105. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -1
  106. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts +1 -1
  107. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts.map +1 -1
  108. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts +1 -1
  109. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts.map +1 -1
  110. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +2 -6
  111. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
  112. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts.map +1 -1
  113. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts.map +1 -1
  114. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +2 -6
  115. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
  116. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs +0 -11
  117. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs.map +1 -1
  118. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts +6 -20
  119. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts.map +1 -1
  120. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts +6 -20
  121. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts.map +1 -1
  122. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs +1 -10
  123. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs.map +1 -1
  124. package/dist/components/BottomSheetHeader/index.cjs +1 -3
  125. package/dist/components/BottomSheetHeader/index.cjs.map +1 -1
  126. package/dist/components/BottomSheetHeader/index.d.cts +0 -1
  127. package/dist/components/BottomSheetHeader/index.d.cts.map +1 -1
  128. package/dist/components/BottomSheetHeader/index.d.mts +0 -1
  129. package/dist/components/BottomSheetHeader/index.d.mts.map +1 -1
  130. package/dist/components/BottomSheetHeader/index.mjs +0 -1
  131. package/dist/components/BottomSheetHeader/index.mjs.map +1 -1
  132. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +2 -2
  133. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -1
  134. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts.map +1 -1
  135. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts.map +1 -1
  136. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs +3 -3
  137. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs.map +1 -1
  138. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.cts +1 -1
  139. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.cts.map +1 -1
  140. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.mts +1 -1
  141. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.mts.map +1 -1
  142. package/dist/components/Box/Box.cjs +1 -1
  143. package/dist/components/Box/Box.cjs.map +1 -1
  144. package/dist/components/Box/Box.d.cts +1 -1
  145. package/dist/components/Box/Box.d.cts.map +1 -1
  146. package/dist/components/Box/Box.d.mts +1 -1
  147. package/dist/components/Box/Box.d.mts.map +1 -1
  148. package/dist/components/Box/Box.mjs +1 -1
  149. package/dist/components/Box/Box.mjs.map +1 -1
  150. package/dist/components/Box/Box.types.d.cts +1 -1
  151. package/dist/components/Box/Box.types.d.cts.map +1 -1
  152. package/dist/components/Box/Box.types.d.mts +1 -1
  153. package/dist/components/Box/Box.types.d.mts.map +1 -1
  154. package/dist/components/ButtonBase/ButtonBase.types.d.cts +1 -2
  155. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  156. package/dist/components/ButtonBase/ButtonBase.types.d.mts +1 -2
  157. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  158. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +1 -1
  159. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  160. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +1 -1
  161. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  162. package/dist/components/Card/Card.cjs +2 -2
  163. package/dist/components/Card/Card.cjs.map +1 -1
  164. package/dist/components/Card/Card.mjs +2 -2
  165. package/dist/components/Card/Card.mjs.map +1 -1
  166. package/dist/components/Card/Card.types.cjs.map +1 -1
  167. package/dist/components/Card/Card.types.d.cts +2 -2
  168. package/dist/components/Card/Card.types.d.cts.map +1 -1
  169. package/dist/components/Card/Card.types.d.mts +2 -2
  170. package/dist/components/Card/Card.types.d.mts.map +1 -1
  171. package/dist/components/Card/Card.types.mjs.map +1 -1
  172. package/dist/components/Checkbox/Checkbox.cjs +1 -1
  173. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  174. package/dist/components/Checkbox/Checkbox.d.cts +1 -1
  175. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  176. package/dist/components/Checkbox/Checkbox.d.mts +1 -1
  177. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  178. package/dist/components/Checkbox/Checkbox.mjs +1 -1
  179. package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
  180. package/dist/components/Checkbox/Checkbox.types.d.cts +1 -1
  181. package/dist/components/Checkbox/Checkbox.types.d.cts.map +1 -1
  182. package/dist/components/Checkbox/Checkbox.types.d.mts +1 -1
  183. package/dist/components/Checkbox/Checkbox.types.d.mts.map +1 -1
  184. package/dist/components/Content/Content.cjs +71 -0
  185. package/dist/components/Content/Content.cjs.map +1 -0
  186. package/dist/components/Content/Content.constants.cjs +9 -0
  187. package/dist/components/Content/Content.constants.cjs.map +1 -0
  188. package/dist/components/Content/Content.constants.d.cts +3 -0
  189. package/dist/components/Content/Content.constants.d.cts.map +1 -0
  190. package/dist/components/Content/Content.constants.d.mts +3 -0
  191. package/dist/components/Content/Content.constants.d.mts.map +1 -0
  192. package/dist/components/Content/Content.constants.mjs +6 -0
  193. package/dist/components/Content/Content.constants.mjs.map +1 -0
  194. package/dist/components/Content/Content.d.cts +4 -0
  195. package/dist/components/Content/Content.d.cts.map +1 -0
  196. package/dist/components/Content/Content.d.mts +4 -0
  197. package/dist/components/Content/Content.d.mts.map +1 -0
  198. package/dist/components/Content/Content.mjs +71 -0
  199. package/dist/components/Content/Content.mjs.map +1 -0
  200. package/dist/components/Content/Content.types.cjs +3 -0
  201. package/dist/components/Content/Content.types.cjs.map +1 -0
  202. package/dist/components/Content/Content.types.d.cts +31 -0
  203. package/dist/components/Content/Content.types.d.cts.map +1 -0
  204. package/dist/components/Content/Content.types.d.mts +31 -0
  205. package/dist/components/Content/Content.types.d.mts.map +1 -0
  206. package/dist/components/Content/Content.types.mjs +2 -0
  207. package/dist/components/Content/Content.types.mjs.map +1 -0
  208. package/dist/components/Content/index.cjs +8 -0
  209. package/dist/components/Content/index.cjs.map +1 -0
  210. package/dist/components/Content/index.d.cts +4 -0
  211. package/dist/components/Content/index.d.cts.map +1 -0
  212. package/dist/components/Content/index.d.mts +4 -0
  213. package/dist/components/Content/index.d.mts.map +1 -0
  214. package/dist/components/Content/index.mjs +3 -0
  215. package/dist/components/Content/index.mjs.map +1 -0
  216. package/dist/components/HeaderBase/HeaderBase.cjs +94 -73
  217. package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -1
  218. package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -1
  219. package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -1
  220. package/dist/components/HeaderBase/HeaderBase.mjs +94 -73
  221. package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -1
  222. package/dist/components/HeaderBase/HeaderBase.types.cjs +0 -12
  223. package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -1
  224. package/dist/components/HeaderBase/HeaderBase.types.d.cts +12 -20
  225. package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -1
  226. package/dist/components/HeaderBase/HeaderBase.types.d.mts +12 -20
  227. package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -1
  228. package/dist/components/HeaderBase/HeaderBase.types.mjs +1 -11
  229. package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -1
  230. package/dist/components/HeaderBase/index.cjs +1 -3
  231. package/dist/components/HeaderBase/index.cjs.map +1 -1
  232. package/dist/components/HeaderBase/index.d.cts +0 -1
  233. package/dist/components/HeaderBase/index.d.cts.map +1 -1
  234. package/dist/components/HeaderBase/index.d.mts +0 -1
  235. package/dist/components/HeaderBase/index.d.mts.map +1 -1
  236. package/dist/components/HeaderBase/index.mjs +0 -1
  237. package/dist/components/HeaderBase/index.mjs.map +1 -1
  238. package/dist/components/HeaderRoot/HeaderRoot.types.d.cts +1 -1
  239. package/dist/components/HeaderRoot/HeaderRoot.types.d.cts.map +1 -1
  240. package/dist/components/HeaderRoot/HeaderRoot.types.d.mts +1 -1
  241. package/dist/components/HeaderRoot/HeaderRoot.types.d.mts.map +1 -1
  242. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +4 -12
  243. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -1
  244. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts +0 -8
  245. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts.map +1 -1
  246. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts +0 -8
  247. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts.map +1 -1
  248. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs +3 -10
  249. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs.map +1 -1
  250. package/dist/components/Icon/Icon.assets.cjs +2 -0
  251. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  252. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  253. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  254. package/dist/components/Icon/Icon.assets.mjs +2 -0
  255. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  256. package/dist/components/Icon/Icon.cjs +3 -1
  257. package/dist/components/Icon/Icon.cjs.map +1 -1
  258. package/dist/components/Icon/Icon.d.cts.map +1 -1
  259. package/dist/components/Icon/Icon.d.mts.map +1 -1
  260. package/dist/components/Icon/Icon.mjs +3 -1
  261. package/dist/components/Icon/Icon.mjs.map +1 -1
  262. package/dist/components/Icon/assets/flash-filled.svg +1 -0
  263. package/dist/components/Input/Input.cjs +1 -1
  264. package/dist/components/Input/Input.cjs.map +1 -1
  265. package/dist/components/Input/Input.d.cts +1 -2
  266. package/dist/components/Input/Input.d.cts.map +1 -1
  267. package/dist/components/Input/Input.d.mts +1 -2
  268. package/dist/components/Input/Input.d.mts.map +1 -1
  269. package/dist/components/Input/Input.mjs +1 -1
  270. package/dist/components/Input/Input.mjs.map +1 -1
  271. package/dist/components/Input/Input.types.d.cts +1 -1
  272. package/dist/components/Input/Input.types.d.cts.map +1 -1
  273. package/dist/components/Input/Input.types.d.mts +1 -1
  274. package/dist/components/Input/Input.types.d.mts.map +1 -1
  275. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts +1 -1
  276. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts.map +1 -1
  277. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts +1 -1
  278. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts.map +1 -1
  279. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +1 -1
  280. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  281. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +1 -1
  282. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  283. package/dist/components/ListItem/ListItem.cjs +1 -1
  284. package/dist/components/ListItem/ListItem.cjs.map +1 -1
  285. package/dist/components/ListItem/ListItem.mjs +1 -1
  286. package/dist/components/ListItem/ListItem.mjs.map +1 -1
  287. package/dist/components/ListItem/ListItem.types.d.cts +1 -1
  288. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -1
  289. package/dist/components/ListItem/ListItem.types.d.mts +1 -1
  290. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -1
  291. package/dist/components/MainActionButton/MainActionButton.types.d.cts +1 -1
  292. package/dist/components/MainActionButton/MainActionButton.types.d.cts.map +1 -1
  293. package/dist/components/MainActionButton/MainActionButton.types.d.mts +1 -1
  294. package/dist/components/MainActionButton/MainActionButton.types.d.mts.map +1 -1
  295. package/dist/components/RadioButton/RadioButton.cjs +1 -1
  296. package/dist/components/RadioButton/RadioButton.cjs.map +1 -1
  297. package/dist/components/RadioButton/RadioButton.mjs +1 -1
  298. package/dist/components/RadioButton/RadioButton.mjs.map +1 -1
  299. package/dist/components/RadioButton/RadioButton.types.d.cts +1 -2
  300. package/dist/components/RadioButton/RadioButton.types.d.cts.map +1 -1
  301. package/dist/components/RadioButton/RadioButton.types.d.mts +1 -2
  302. package/dist/components/RadioButton/RadioButton.types.d.mts.map +1 -1
  303. package/dist/components/SectionDivider/SectionDivider.d.cts +1 -1
  304. package/dist/components/SectionDivider/SectionDivider.d.cts.map +1 -1
  305. package/dist/components/SectionDivider/SectionDivider.d.mts +1 -1
  306. package/dist/components/SectionDivider/SectionDivider.d.mts.map +1 -1
  307. package/dist/components/SectionHeader/SectionHeader.cjs +47 -24
  308. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  309. package/dist/components/SectionHeader/SectionHeader.d.cts +16 -13
  310. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
  311. package/dist/components/SectionHeader/SectionHeader.d.mts +16 -13
  312. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
  313. package/dist/components/SectionHeader/SectionHeader.mjs +48 -25
  314. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
  315. package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
  316. package/dist/components/SectionHeader/SectionHeader.types.d.cts +16 -9
  317. package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
  318. package/dist/components/SectionHeader/SectionHeader.types.d.mts +16 -9
  319. package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
  320. package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
  321. package/dist/components/SegmentGroup/SegmentGroup.cjs +5 -7
  322. package/dist/components/SegmentGroup/SegmentGroup.cjs.map +1 -1
  323. package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +1 -1
  324. package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +1 -1
  325. package/dist/components/SegmentGroup/SegmentGroup.mjs +6 -8
  326. package/dist/components/SegmentGroup/SegmentGroup.mjs.map +1 -1
  327. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +1 -1
  328. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +1 -1
  329. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +1 -1
  330. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +1 -1
  331. package/dist/components/SelectButton/SelectButton.cjs +1 -1
  332. package/dist/components/SelectButton/SelectButton.cjs.map +1 -1
  333. package/dist/components/SelectButton/SelectButton.mjs +2 -2
  334. package/dist/components/SelectButton/SelectButton.mjs.map +1 -1
  335. package/dist/components/SelectButton/SelectButton.types.cjs.map +1 -1
  336. package/dist/components/SelectButton/SelectButton.types.d.cts +1 -1
  337. package/dist/components/SelectButton/SelectButton.types.d.cts.map +1 -1
  338. package/dist/components/SelectButton/SelectButton.types.d.mts +1 -1
  339. package/dist/components/SelectButton/SelectButton.types.d.mts.map +1 -1
  340. package/dist/components/SelectButton/SelectButton.types.mjs.map +1 -1
  341. package/dist/components/SelectButton/index.cjs +2 -1
  342. package/dist/components/SelectButton/index.cjs.map +1 -1
  343. package/dist/components/SelectButton/index.d.cts +1 -1
  344. package/dist/components/SelectButton/index.d.cts.map +1 -1
  345. package/dist/components/SelectButton/index.d.mts +1 -1
  346. package/dist/components/SelectButton/index.d.mts.map +1 -1
  347. package/dist/components/SelectButton/index.mjs +1 -1
  348. package/dist/components/SelectButton/index.mjs.map +1 -1
  349. package/dist/components/Skeleton/Skeleton.cjs +1 -1
  350. package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
  351. package/dist/components/Skeleton/Skeleton.mjs +1 -1
  352. package/dist/components/Skeleton/Skeleton.mjs.map +1 -1
  353. package/dist/components/Skeleton/Skeleton.types.d.cts +1 -1
  354. package/dist/components/Skeleton/Skeleton.types.d.cts.map +1 -1
  355. package/dist/components/Skeleton/Skeleton.types.d.mts +1 -1
  356. package/dist/components/Skeleton/Skeleton.types.d.mts.map +1 -1
  357. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts +1 -1
  358. package/dist/components/TabEmptyState/TabEmptyState.types.d.cts.map +1 -1
  359. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts +1 -1
  360. package/dist/components/TabEmptyState/TabEmptyState.types.d.mts.map +1 -1
  361. package/dist/components/Tag/Tag.types.d.cts +1 -1
  362. package/dist/components/Tag/Tag.types.d.cts.map +1 -1
  363. package/dist/components/Tag/Tag.types.d.mts +1 -1
  364. package/dist/components/Tag/Tag.types.d.mts.map +1 -1
  365. package/dist/components/Text/Text.cjs +1 -1
  366. package/dist/components/Text/Text.cjs.map +1 -1
  367. package/dist/components/Text/Text.mjs +1 -1
  368. package/dist/components/Text/Text.mjs.map +1 -1
  369. package/dist/components/Text/Text.types.d.cts +1 -1
  370. package/dist/components/Text/Text.types.d.cts.map +1 -1
  371. package/dist/components/Text/Text.types.d.mts +1 -1
  372. package/dist/components/Text/Text.types.d.mts.map +1 -1
  373. package/dist/components/TextArea/TextArea.cjs +4 -8
  374. package/dist/components/TextArea/TextArea.cjs.map +1 -1
  375. package/dist/components/TextArea/TextArea.d.cts +160 -161
  376. package/dist/components/TextArea/TextArea.d.cts.map +1 -1
  377. package/dist/components/TextArea/TextArea.d.mts +160 -161
  378. package/dist/components/TextArea/TextArea.d.mts.map +1 -1
  379. package/dist/components/TextArea/TextArea.mjs +4 -8
  380. package/dist/components/TextArea/TextArea.mjs.map +1 -1
  381. package/dist/components/TextArea/TextArea.types.cjs.map +1 -1
  382. package/dist/components/TextArea/TextArea.types.d.cts +12 -45
  383. package/dist/components/TextArea/TextArea.types.d.cts.map +1 -1
  384. package/dist/components/TextArea/TextArea.types.d.mts +12 -45
  385. package/dist/components/TextArea/TextArea.types.d.mts.map +1 -1
  386. package/dist/components/TextArea/TextArea.types.mjs.map +1 -1
  387. package/dist/components/TextButton/TextButton.types.d.cts +0 -1
  388. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  389. package/dist/components/TextButton/TextButton.types.d.mts +0 -1
  390. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  391. package/dist/components/TextField/TextField.cjs +1 -1
  392. package/dist/components/TextField/TextField.cjs.map +1 -1
  393. package/dist/components/TextField/TextField.d.cts +20 -16
  394. package/dist/components/TextField/TextField.d.cts.map +1 -1
  395. package/dist/components/TextField/TextField.d.mts +20 -16
  396. package/dist/components/TextField/TextField.d.mts.map +1 -1
  397. package/dist/components/TextField/TextField.mjs +1 -1
  398. package/dist/components/TextField/TextField.mjs.map +1 -1
  399. package/dist/components/TextField/TextField.types.d.cts +1 -1
  400. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  401. package/dist/components/TextField/TextField.types.d.mts +1 -1
  402. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  403. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +20 -15
  404. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
  405. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +20 -15
  406. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
  407. package/dist/components/TitleAlert/TitleAlert.types.d.cts +1 -1
  408. package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -1
  409. package/dist/components/TitleAlert/TitleAlert.types.d.mts +1 -1
  410. package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -1
  411. package/dist/components/TitleHub/TitleHub.types.d.cts +1 -1
  412. package/dist/components/TitleHub/TitleHub.types.d.cts.map +1 -1
  413. package/dist/components/TitleHub/TitleHub.types.d.mts +1 -1
  414. package/dist/components/TitleHub/TitleHub.types.d.mts.map +1 -1
  415. package/dist/components/TitleStandard/TitleStandard.types.d.cts +1 -1
  416. package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -1
  417. package/dist/components/TitleStandard/TitleStandard.types.d.mts +1 -1
  418. package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -1
  419. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +1 -1
  420. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -1
  421. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +1 -1
  422. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -1
  423. package/dist/components/Toast/Toast.types.d.cts +1 -1
  424. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  425. package/dist/components/Toast/Toast.types.d.mts +1 -1
  426. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  427. package/dist/components/Toast/Toaster.cjs +1 -1
  428. package/dist/components/Toast/Toaster.cjs.map +1 -1
  429. package/dist/components/Toast/Toaster.mjs +1 -1
  430. package/dist/components/Toast/Toaster.mjs.map +1 -1
  431. package/dist/components/index.cjs +7 -5
  432. package/dist/components/index.cjs.map +1 -1
  433. package/dist/components/index.d.cts +5 -3
  434. package/dist/components/index.d.cts.map +1 -1
  435. package/dist/components/index.d.mts +5 -3
  436. package/dist/components/index.d.mts.map +1 -1
  437. package/dist/components/index.mjs +4 -3
  438. package/dist/components/index.mjs.map +1 -1
  439. package/dist/components/temp-components/Blockies/Blockies.cjs +1 -1
  440. package/dist/components/temp-components/Blockies/Blockies.cjs.map +1 -1
  441. package/dist/components/temp-components/Blockies/Blockies.mjs +1 -1
  442. package/dist/components/temp-components/Blockies/Blockies.mjs.map +1 -1
  443. package/dist/components/temp-components/Blockies/Blockies.types.d.cts +1 -1
  444. package/dist/components/temp-components/Blockies/Blockies.types.d.cts.map +1 -1
  445. package/dist/components/temp-components/Blockies/Blockies.types.d.mts +1 -1
  446. package/dist/components/temp-components/Blockies/Blockies.types.d.mts.map +1 -1
  447. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +2 -2
  448. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
  449. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +2 -2
  450. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
  451. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts +1 -1
  452. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.cts.map +1 -1
  453. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts +1 -1
  454. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.types.d.mts.map +1 -1
  455. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs +1 -1
  456. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.cjs.map +1 -1
  457. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.mjs +1 -1
  458. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.mjs.map +1 -1
  459. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.cjs.map +1 -1
  460. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts +2 -3
  461. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.cts.map +1 -1
  462. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts +2 -3
  463. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.d.mts.map +1 -1
  464. package/dist/components/temp-components/ImageOrSvg/ImageOrSvg.types.mjs.map +1 -1
  465. package/dist/components/temp-components/Jazzicon/Jazzicon.cjs +1 -1
  466. package/dist/components/temp-components/Jazzicon/Jazzicon.cjs.map +1 -1
  467. package/dist/components/temp-components/Jazzicon/Jazzicon.mjs +1 -1
  468. package/dist/components/temp-components/Jazzicon/Jazzicon.mjs.map +1 -1
  469. package/dist/components/temp-components/Maskicon/Maskicon.cjs +1 -1
  470. package/dist/components/temp-components/Maskicon/Maskicon.cjs.map +1 -1
  471. package/dist/components/temp-components/Maskicon/Maskicon.mjs +1 -1
  472. package/dist/components/temp-components/Maskicon/Maskicon.mjs.map +1 -1
  473. package/dist/components/temp-components/Spinner/Spinner.cjs +2 -2
  474. package/dist/components/temp-components/Spinner/Spinner.cjs.map +1 -1
  475. package/dist/components/temp-components/Spinner/Spinner.mjs +2 -2
  476. package/dist/components/temp-components/Spinner/Spinner.mjs.map +1 -1
  477. package/dist/components/temp-components/Spinner/Spinner.types.d.cts +1 -1
  478. package/dist/components/temp-components/Spinner/Spinner.types.d.cts.map +1 -1
  479. package/dist/components/temp-components/Spinner/Spinner.types.d.mts +1 -1
  480. package/dist/components/temp-components/Spinner/Spinner.types.d.mts.map +1 -1
  481. package/dist/test-utils/createRenderer.cjs +41 -0
  482. package/dist/test-utils/createRenderer.cjs.map +1 -0
  483. package/dist/test-utils/createRenderer.d.cts +4 -0
  484. package/dist/test-utils/createRenderer.d.cts.map +1 -0
  485. package/dist/test-utils/createRenderer.d.mts +4 -0
  486. package/dist/test-utils/createRenderer.d.mts.map +1 -0
  487. package/dist/test-utils/createRenderer.mjs +18 -0
  488. package/dist/test-utils/createRenderer.mjs.map +1 -0
  489. package/package.json +21 -22
  490. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs +0 -15
  491. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs.map +0 -1
  492. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts +0 -7
  493. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts.map +0 -1
  494. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts +0 -7
  495. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts.map +0 -1
  496. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs +0 -12
  497. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs.map +0 -1
  498. package/dist/components/HeaderBase/HeaderBase.constants.cjs +0 -15
  499. package/dist/components/HeaderBase/HeaderBase.constants.cjs.map +0 -1
  500. package/dist/components/HeaderBase/HeaderBase.constants.d.cts +0 -7
  501. package/dist/components/HeaderBase/HeaderBase.constants.d.cts.map +0 -1
  502. package/dist/components/HeaderBase/HeaderBase.constants.d.mts +0 -7
  503. package/dist/components/HeaderBase/HeaderBase.constants.d.mts.map +0 -1
  504. package/dist/components/HeaderBase/HeaderBase.constants.mjs +0 -12
  505. package/dist/components/HeaderBase/HeaderBase.constants.mjs.map +0 -1
@@ -5,39 +5,62 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.SectionHeader = void 0;
7
7
  const design_system_shared_1 = require("@metamask/design-system-shared");
8
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
8
9
  const react_1 = __importDefault(require("react"));
10
+ const react_native_1 = require("react-native");
9
11
  const BoxRow_1 = require("../BoxRow/index.cjs");
10
12
  const Icon_1 = require("../Icon/index.cjs");
11
13
  /**
12
14
  * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
13
- * Remaining `View` props are forwarded to the outer {@link BoxRow}.
15
+ * When `isInteractive` is `true`, the header is wrapped in a `Pressable` and remaining `PressableProps` are forwarded to it.
16
+ * Otherwise, remaining `View` props are forwarded to the outer {@link BoxRow}.
14
17
  *
15
- * @param props - Component props
16
- * @param props.title - Title content for the inner row (required)
17
- * @param props.titleAccessory - Optional node to the right of `title` in the inner row
18
- * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
19
- * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
20
- * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
21
- * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
22
- * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
23
- * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
24
- * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
25
- * @param props.endIconProps - Props merged into the end `Icon`
26
- * @param props.twClassName - Optional Tailwind classes on the outer row
18
+ * @param sectionHeaderProps - Component props
19
+ * @param sectionHeaderProps.title - Title content for the inner row (required)
20
+ * @param sectionHeaderProps.titleAccessory - Optional node to the right of `title` in the inner row
21
+ * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
22
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
23
+ * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
24
+ * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
25
+ * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
26
+ * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
27
+ * @param sectionHeaderProps.endIconName - Optional end icon; takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided
28
+ * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`
29
+ * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press
30
+ * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)
31
+ * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row
27
32
  *
28
33
  * @returns The rendered SectionHeader layout.
29
34
  */
30
- const SectionHeader = ({ title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, twClassName = '', ...rest }) => {
31
- const finalStartIconName = startIconName ?? startIconProps?.name;
32
- const finalEndIconName = endIconName ?? endIconProps?.name;
33
- return (<BoxRow_1.BoxRow {...rest} gap={1} twClassName={twClassName} startAccessory={finalStartIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={finalStartIconName}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...endIconProps} name={finalEndIconName}/>) : (endAccessory)}>
34
- {title ? (<BoxRow_1.BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
35
- variant: design_system_shared_1.TextVariant.HeadingMd,
36
- color: design_system_shared_1.TextColor.TextDefault,
37
- ...titleProps,
38
- }}>
39
- {title}
40
- </BoxRow_1.BoxRow>) : null}
35
+ const SectionHeader = (sectionHeaderProps) => {
36
+ const { title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, isInteractive, twClassName = '', style, ...props } = sectionHeaderProps;
37
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
38
+ const resolvedEndIconName = endIconName ??
39
+ (isInteractive && !endAccessory ? design_system_shared_1.IconName.ArrowRight : undefined);
40
+ 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);
41
+ 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);
42
+ const titleRow = title ? (<BoxRow_1.BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
43
+ variant: design_system_shared_1.TextVariant.HeadingMd,
44
+ color: design_system_shared_1.TextColor.TextDefault,
45
+ ...titleProps,
46
+ }}>
47
+ {title}
48
+ </BoxRow_1.BoxRow>) : null;
49
+ if (isInteractive) {
50
+ const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;
51
+ const isDisabled = Boolean(disabled);
52
+ return (<react_native_1.Pressable accessibilityRole={accessibilityRole} style={({ pressed }) => {
53
+ const baseStyle = tw.style('px-4 pb-2 pt-3', twClassName, pressed && !isDisabled && 'opacity-70');
54
+ const additionalStyle = typeof style === 'function' ? style({ pressed }) : style;
55
+ return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;
56
+ }} {...props}>
57
+ <BoxRow_1.BoxRow gap={1} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
58
+ {titleRow}
59
+ </BoxRow_1.BoxRow>
60
+ </react_native_1.Pressable>);
61
+ }
62
+ return (<BoxRow_1.BoxRow {...props} gap={1} style={style} twClassName={`px-4 pb-2 pt-3 ${twClassName}`} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
63
+ {titleRow}
41
64
  </BoxRow_1.BoxRow>);
42
65
  };
43
66
  exports.SectionHeader = SectionHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAKwC;AACxC,kDAA0B;AAE1B,gDAAmC;AACnC,4CAA+B;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,GAAG,EAAE,EAChB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,OAAO,CACL,CAAC,eAAM,CACL,IAAI,IAAI,CAAC,CACT,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CACb,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,CACnB,IAAI,CAAC,CAAC,kBAAkB,CAAC,EACzB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,CACjB,IAAI,CAAC,CAAC,gBAAgB,CAAC,EACvB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CAED;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,cAAc,CAAC,CAC7B,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,gCAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,aAAa,iBAiExB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\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 * Remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param props - Component props\n * @param props.title - Title content for the inner row (required)\n * @param props.titleAccessory - Optional node to the right of `title` in the inner row\n * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved\n * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved\n * @param props.endIconProps - Props merged into the end `Icon`\n * @param props.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = ({\n title,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n twClassName = '',\n ...rest\n}) => {\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n return (\n <BoxRow\n {...rest}\n gap={1}\n twClassName={twClassName}\n startAccessory={\n finalStartIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={finalStartIconName}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={finalEndIconName}\n />\n ) : (\n endAccessory\n )\n }\n >\n {title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
1
+ {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\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 node to the right of `title` in the inner 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; 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 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 titleRow = title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null;\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 <BoxRow\n gap={1}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {titleRow}\n </BoxRow>\n </Pressable>\n );\n }\n\n return (\n <BoxRow\n {...props}\n gap={1}\n style={style}\n twClassName={`px-4 pb-2 pt-3 ${twClassName}`}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {titleRow}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -2,20 +2,23 @@ import React from "react";
2
2
  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
- * Remaining `View` props are forwarded to the outer {@link BoxRow}.
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
7
  *
7
- * @param props - Component props
8
- * @param props.title - Title content for the inner row (required)
9
- * @param props.titleAccessory - Optional node to the right of `title` in the inner row
10
- * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
11
- * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
12
- * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
13
- * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
14
- * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
15
- * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
16
- * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
17
- * @param props.endIconProps - Props merged into the end `Icon`
18
- * @param props.twClassName - Optional Tailwind classes on the outer row
8
+ * @param sectionHeaderProps - Component props
9
+ * @param sectionHeaderProps.title - Title content for the inner row (required)
10
+ * @param sectionHeaderProps.titleAccessory - Optional node to the right of `title` in the inner row
11
+ * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
12
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
13
+ * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
14
+ * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
15
+ * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
16
+ * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
17
+ * @param sectionHeaderProps.endIconName - Optional end icon; takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided
18
+ * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`
19
+ * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press
20
+ * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)
21
+ * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row
19
22
  *
20
23
  * @returns The rendered SectionHeader layout.
21
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiEtD,CAAC"}
1
+ {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2GtD,CAAC"}
@@ -2,20 +2,23 @@ import React from "react";
2
2
  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
- * Remaining `View` props are forwarded to the outer {@link BoxRow}.
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
7
  *
7
- * @param props - Component props
8
- * @param props.title - Title content for the inner row (required)
9
- * @param props.titleAccessory - Optional node to the right of `title` in the inner row
10
- * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
11
- * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
12
- * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
13
- * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
14
- * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
15
- * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
16
- * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
17
- * @param props.endIconProps - Props merged into the end `Icon`
18
- * @param props.twClassName - Optional Tailwind classes on the outer row
8
+ * @param sectionHeaderProps - Component props
9
+ * @param sectionHeaderProps.title - Title content for the inner row (required)
10
+ * @param sectionHeaderProps.titleAccessory - Optional node to the right of `title` in the inner row
11
+ * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
12
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
13
+ * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
14
+ * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
15
+ * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
16
+ * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
17
+ * @param sectionHeaderProps.endIconName - Optional end icon; takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided
18
+ * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`
19
+ * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press
20
+ * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)
21
+ * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row
19
22
  *
20
23
  * @returns The rendered SectionHeader layout.
21
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiEtD,CAAC"}
1
+ {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2GtD,CAAC"}
@@ -4,41 +4,64 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { IconColor, IconSize, TextColor, TextVariant } from "@metamask/design-system-shared";
7
+ import { IconColor, IconName, IconSize, TextColor, TextVariant } from "@metamask/design-system-shared";
8
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
8
9
  import $React from "react";
9
10
  const React = $importDefault($React);
11
+ import { Pressable } from "react-native";
10
12
  import { BoxRow } from "../BoxRow/index.mjs";
11
13
  import { Icon } from "../Icon/index.mjs";
12
14
  /**
13
15
  * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
14
- * Remaining `View` props are forwarded to the outer {@link BoxRow}.
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}.
15
18
  *
16
- * @param props - Component props
17
- * @param props.title - Title content for the inner row (required)
18
- * @param props.titleAccessory - Optional node to the right of `title` in the inner row
19
- * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
20
- * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
21
- * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
22
- * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
23
- * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
24
- * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
25
- * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
26
- * @param props.endIconProps - Props merged into the end `Icon`
27
- * @param props.twClassName - Optional Tailwind classes on the outer row
19
+ * @param sectionHeaderProps - Component props
20
+ * @param sectionHeaderProps.title - Title content for the inner row (required)
21
+ * @param sectionHeaderProps.titleAccessory - Optional node to the right of `title` in the inner row
22
+ * @param sectionHeaderProps.titleProps - Optional props merged into inner row `Text` when `title` is a string
23
+ * @param sectionHeaderProps.titleWrapperProps - Optional props spread onto the inner `BoxRow`
24
+ * @param sectionHeaderProps.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
25
+ * @param sectionHeaderProps.startIconName - Optional start icon; takes precedence over `startAccessory` when set
26
+ * @param sectionHeaderProps.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
27
+ * @param sectionHeaderProps.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
28
+ * @param sectionHeaderProps.endIconName - Optional end icon; takes precedence over `endAccessory` when set. Defaults to `IconName.ArrowRight` when `isInteractive` is `true` and no end icon or `endAccessory` is provided
29
+ * @param sectionHeaderProps.endIconProps - Props merged into the end `Icon`
30
+ * @param sectionHeaderProps.isInteractive - When `true`, wraps the header in a `Pressable` with reduced opacity on press
31
+ * @param sectionHeaderProps.style - Optional style on the outer wrapper (`View` or `Pressable` style, including function form when interactive)
32
+ * @param sectionHeaderProps.twClassName - Optional Tailwind classes on the outer row
28
33
  *
29
34
  * @returns The rendered SectionHeader layout.
30
35
  */
31
- export const SectionHeader = ({ title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, twClassName = '', ...rest }) => {
32
- const finalStartIconName = startIconName ?? startIconProps?.name;
33
- const finalEndIconName = endIconName ?? endIconProps?.name;
34
- return (<BoxRow {...rest} gap={1} twClassName={twClassName} startAccessory={finalStartIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={finalStartIconName}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...endIconProps} name={finalEndIconName}/>) : (endAccessory)}>
35
- {title ? (<BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
36
- variant: TextVariant.HeadingMd,
37
- color: TextColor.TextDefault,
38
- ...titleProps,
39
- }}>
40
- {title}
41
- </BoxRow>) : null}
36
+ export const SectionHeader = (sectionHeaderProps) => {
37
+ const { title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, isInteractive, twClassName = '', style, ...props } = sectionHeaderProps;
38
+ const tw = useTailwind();
39
+ const resolvedEndIconName = endIconName ??
40
+ (isInteractive && !endAccessory ? IconName.ArrowRight : undefined);
41
+ const resolvedStartAccessory = startIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={startIconName}/>) : (startAccessory);
42
+ const resolvedEndAccessory = resolvedEndIconName ? (<Icon size={IconSize.Md} color={IconColor.IconAlternative} twClassName="shrink-0" {...endIconProps} name={resolvedEndIconName}/>) : (endAccessory);
43
+ const titleRow = title ? (<BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
44
+ variant: TextVariant.HeadingMd,
45
+ color: TextColor.TextDefault,
46
+ ...titleProps,
47
+ }}>
48
+ {title}
49
+ </BoxRow>) : null;
50
+ if (isInteractive) {
51
+ const { disabled, accessibilityRole = 'button' } = sectionHeaderProps;
52
+ const isDisabled = Boolean(disabled);
53
+ return (<Pressable accessibilityRole={accessibilityRole} style={({ pressed }) => {
54
+ const baseStyle = tw.style('px-4 pb-2 pt-3', twClassName, pressed && !isDisabled && 'opacity-70');
55
+ const additionalStyle = typeof style === 'function' ? style({ pressed }) : style;
56
+ return additionalStyle ? [baseStyle, additionalStyle] : baseStyle;
57
+ }} {...props}>
58
+ <BoxRow gap={1} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
59
+ {titleRow}
60
+ </BoxRow>
61
+ </Pressable>);
62
+ }
63
+ return (<BoxRow {...props} gap={1} style={style} twClassName={`px-4 pb-2 pt-3 ${twClassName}`} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
64
+ {titleRow}
42
65
  </BoxRow>);
43
66
  };
44
67
  SectionHeader.displayName = 'SectionHeader';
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,GAAG,EAAE,EAChB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,OAAO,CACL,CAAC,MAAM,CACL,IAAI,IAAI,CAAC,CACT,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CACb,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,CACnB,IAAI,CAAC,CAAC,kBAAkB,CAAC,EACzB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,CACjB,IAAI,CAAC,CAAC,gBAAgB,CAAC,EACvB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CAED;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,MAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,cAAc,CAAC,CAC7B,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,SAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\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 * Remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param props - Component props\n * @param props.title - Title content for the inner row (required)\n * @param props.titleAccessory - Optional node to the right of `title` in the inner row\n * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved\n * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved\n * @param props.endIconProps - Props merged into the end `Icon`\n * @param props.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = ({\n title,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n twClassName = '',\n ...rest\n}) => {\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n return (\n <BoxRow\n {...rest}\n gap={1}\n twClassName={twClassName}\n startAccessory={\n finalStartIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={finalStartIconName}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={finalEndIconName}\n />\n ) : (\n endAccessory\n )\n }\n >\n {title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
1
+ {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"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","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\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 node to the right of `title` in the inner 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; 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 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 titleRow = title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null;\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 <BoxRow\n gap={1}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {titleRow}\n </BoxRow>\n </Pressable>\n );\n }\n\n return (\n <BoxRow\n {...props}\n gap={1}\n style={style}\n twClassName={`px-4 pb-2 pt-3 ${twClassName}`}\n startAccessory={resolvedStartAccessory}\n endAccessory={resolvedEndAccessory}\n >\n {titleRow}\n </BoxRow>\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/design-system-shared';\nimport type { 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\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.\n */\nexport type SectionHeaderProps = 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?: Partial<IconProps>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n} & Omit<ViewProps, '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/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,13 +1,9 @@
1
1
  import type { SectionHeaderPropsShared } from "@metamask/design-system-shared";
2
- import type { ViewProps } from "react-native/index.js";
2
+ import type { PressableProps, ViewProps } from "react-native";
3
3
  import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
4
4
  import type { IconProps } from "../Icon/index.cjs";
5
5
  import type { TextProps } from "../Text/Text.types.cjs";
6
- /**
7
- * SectionHeader component props (React Native).
8
- * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.
9
- */
10
- export type SectionHeaderProps = SectionHeaderPropsShared & {
6
+ type SectionHeaderPropsBase = SectionHeaderPropsShared & {
11
7
  /**
12
8
  * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
13
9
  */
@@ -19,14 +15,25 @@ export type SectionHeaderProps = SectionHeaderPropsShared & {
19
15
  /**
20
16
  * Optional prop to pass additional properties to the start icon.
21
17
  */
22
- startIconProps?: Partial<IconProps>;
18
+ startIconProps?: Omit<Partial<IconProps>, 'name'>;
23
19
  /**
24
20
  * Optional prop to pass additional properties to the end icon.
25
21
  */
26
- endIconProps?: Partial<IconProps>;
22
+ endIconProps?: Omit<Partial<IconProps>, 'name'>;
27
23
  /**
28
24
  * Optional Tailwind class name to apply to the outer row.
29
25
  */
30
26
  twClassName?: string;
31
- } & Omit<ViewProps, 'children'>;
27
+ };
28
+ /**
29
+ * SectionHeader component props (React Native).
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`.
32
+ */
33
+ export type SectionHeaderProps = (SectionHeaderPropsBase & {
34
+ isInteractive?: false;
35
+ } & Omit<ViewProps, 'children'>) | (SectionHeaderPropsBase & {
36
+ isInteractive: true;
37
+ } & Omit<PressableProps, 'children'>);
38
+ export {};
32
39
  //# sourceMappingURL=SectionHeader.types.d.cts.map
@@ -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,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;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,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,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,uCAAuC;AAC/E,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,13 +1,9 @@
1
1
  import type { SectionHeaderPropsShared } from "@metamask/design-system-shared";
2
- import type { ViewProps } from "react-native/index.js";
2
+ import type { PressableProps, ViewProps } from "react-native";
3
3
  import type { BoxRowProps } from "../BoxRow/BoxRow.types.mjs";
4
4
  import type { IconProps } from "../Icon/index.mjs";
5
5
  import type { TextProps } from "../Text/Text.types.mjs";
6
- /**
7
- * SectionHeader component props (React Native).
8
- * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.
9
- */
10
- export type SectionHeaderProps = SectionHeaderPropsShared & {
6
+ type SectionHeaderPropsBase = SectionHeaderPropsShared & {
11
7
  /**
12
8
  * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
13
9
  */
@@ -19,14 +15,25 @@ export type SectionHeaderProps = SectionHeaderPropsShared & {
19
15
  /**
20
16
  * Optional prop to pass additional properties to the start icon.
21
17
  */
22
- startIconProps?: Partial<IconProps>;
18
+ startIconProps?: Omit<Partial<IconProps>, 'name'>;
23
19
  /**
24
20
  * Optional prop to pass additional properties to the end icon.
25
21
  */
26
- endIconProps?: Partial<IconProps>;
22
+ endIconProps?: Omit<Partial<IconProps>, 'name'>;
27
23
  /**
28
24
  * Optional Tailwind class name to apply to the outer row.
29
25
  */
30
26
  twClassName?: string;
31
- } & Omit<ViewProps, 'children'>;
27
+ };
28
+ /**
29
+ * SectionHeader component props (React Native).
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`.
32
+ */
33
+ export type SectionHeaderProps = (SectionHeaderPropsBase & {
34
+ isInteractive?: false;
35
+ } & Omit<ViewProps, 'children'>) | (SectionHeaderPropsBase & {
36
+ isInteractive: true;
37
+ } & Omit<PressableProps, 'children'>);
38
+ export {};
32
39
  //# sourceMappingURL=SectionHeader.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.types.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;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,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
1
+ {"version":3,"file":"SectionHeader.types.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,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 +1 @@
1
- {"version":3,"file":"SectionHeader.types.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask/design-system-shared';\nimport type { 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\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.\n */\nexport type SectionHeaderProps = 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?: Partial<IconProps>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
1
+ {"version":3,"file":"SectionHeader.types.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask/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"]}
@@ -27,17 +27,15 @@ exports.SegmentGroup = void 0;
27
27
  const design_system_shared_1 = require("@metamask/design-system-shared");
28
28
  const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
29
29
  const react_1 = __importStar(require("react"));
30
- const react_native_1 = require("react-native/index.js");
31
- const Box_constants_1 = require("../Box/Box.constants.cjs");
30
+ const react_native_1 = require("react-native");
32
31
  const SegmentGroup = ({ value, onChange, variant, children, twClassName, style, contentContainerStyle, ...scrollRest }) => {
33
32
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
34
33
  const contextValue = (0, react_1.useMemo)(() => ({ value, onChange, variant }), [value, onChange, variant]);
35
- const mergedContentContainerStyle = [
36
- tw.style('flex', design_system_shared_1.BoxFlexDirection.Row, design_system_shared_1.BoxAlignItems.Center, Box_constants_1.TWCLASSMAP_BOX_GAP[3], twClassName),
37
- contentContainerStyle,
38
- ];
39
34
  return (<design_system_shared_1.SegmentGroupContext.Provider value={contextValue}>
40
- <react_native_1.ScrollView {...scrollRest} horizontal showsHorizontalScrollIndicator={false} accessibilityRole="tablist" style={[tw.style('self-stretch'), style]} contentContainerStyle={mergedContentContainerStyle}>
35
+ <react_native_1.ScrollView {...scrollRest} horizontal showsHorizontalScrollIndicator={false} accessibilityRole="tablist" style={[tw.style('self-stretch'), style]} contentContainerStyle={[
36
+ tw.style('flex flex-row items-center gap-1', twClassName),
37
+ contentContainerStyle,
38
+ ]}>
41
39
  {children}
42
40
  </react_native_1.ScrollView>
43
41
  </design_system_shared_1.SegmentGroupContext.Provider>);
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentGroup.cjs","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAIwC;AACxC,qFAAmE;AACnE,+CAAuC;AACvC,wDAA0C;AAG1C,4DAA0D;AAInD,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,KAAK,EACL,qBAAqB,EACrB,GAAG,UAAU,EACK,EAAE,EAAE;IACtB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,YAAY,GAAG,IAAA,eAAO,EAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACpC,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAC3B,CAAC;IAEF,MAAM,2BAA2B,GAAyB;QACxD,EAAE,CAAC,KAAK,CACN,MAAM,EACN,uCAAgB,CAAC,GAAG,EACpB,oCAAa,CAAC,MAAM,EACpB,kCAAkB,CAAC,CAAC,CAAC,EACrB,WAAW,CACZ;QACD,qBAAqB;KACtB,CAAC;IAEF,OAAO,CACL,CAAC,0CAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAChD;MAAA,CAAC,yBAAU,CACT,IAAI,UAAU,CAAC,CACf,UAAU,CACV,8BAA8B,CAAC,CAAC,KAAK,CAAC,CACtC,iBAAiB,CAAC,SAAS,CAC3B,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC,CACzC,qBAAqB,CAAC,CAAC,2BAA2B,CAAC,CAEnD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,yBAAU,CACd;IAAA,EAAE,0CAAmB,CAAC,QAAQ,CAAC,CAChC,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,YAAY,gBA0CvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n SegmentGroupContext,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { ScrollView } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { TWCLASSMAP_BOX_GAP } from '../Box/Box.constants';\n\nimport type { SegmentGroupProps } from './SegmentGroup.types';\n\nexport const SegmentGroup = ({\n value,\n onChange,\n variant,\n children,\n twClassName,\n style,\n contentContainerStyle,\n ...scrollRest\n}: SegmentGroupProps) => {\n const tw = useTailwind();\n\n const contextValue = useMemo(\n () => ({ value, onChange, variant }),\n [value, onChange, variant],\n );\n\n const mergedContentContainerStyle: StyleProp<ViewStyle> = [\n tw.style(\n 'flex',\n BoxFlexDirection.Row,\n BoxAlignItems.Center,\n TWCLASSMAP_BOX_GAP[3],\n twClassName,\n ),\n contentContainerStyle,\n ];\n\n return (\n <SegmentGroupContext.Provider value={contextValue}>\n <ScrollView\n {...scrollRest}\n horizontal\n showsHorizontalScrollIndicator={false}\n accessibilityRole=\"tablist\"\n style={[tw.style('self-stretch'), style]}\n contentContainerStyle={mergedContentContainerStyle}\n >\n {children}\n </ScrollView>\n </SegmentGroupContext.Provider>\n );\n};\n\nSegmentGroup.displayName = 'SegmentGroup';\n"]}
1
+ {"version":3,"file":"SegmentGroup.cjs","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAqE;AACrE,qFAAmE;AACnE,+CAAuC;AACvC,+CAA0C;AAInC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,KAAK,EACL,qBAAqB,EACrB,GAAG,UAAU,EACK,EAAE,EAAE;IACtB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,YAAY,GAAG,IAAA,eAAO,EAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACpC,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,CAAC,0CAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAChD;MAAA,CAAC,yBAAU,CACT,IAAI,UAAU,CAAC,CACf,UAAU,CACV,8BAA8B,CAAC,CAAC,KAAK,CAAC,CACtC,iBAAiB,CAAC,SAAS,CAC3B,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC,CACzC,qBAAqB,CAAC,CAAC;YACrB,EAAE,CAAC,KAAK,CAAC,kCAAkC,EAAE,WAAW,CAAC;YACzD,qBAAqB;SACtB,CAAC,CAEF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,yBAAU,CACd;IAAA,EAAE,0CAAmB,CAAC,QAAQ,CAAC,CAChC,CAAC;AACJ,CAAC,CAAC;AAlCW,QAAA,YAAY,gBAkCvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import { SegmentGroupContext } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { ScrollView } from 'react-native';\n\nimport type { SegmentGroupProps } from './SegmentGroup.types';\n\nexport const SegmentGroup = ({\n value,\n onChange,\n variant,\n children,\n twClassName,\n style,\n contentContainerStyle,\n ...scrollRest\n}: SegmentGroupProps) => {\n const tw = useTailwind();\n\n const contextValue = useMemo(\n () => ({ value, onChange, variant }),\n [value, onChange, variant],\n );\n\n return (\n <SegmentGroupContext.Provider value={contextValue}>\n <ScrollView\n {...scrollRest}\n horizontal\n showsHorizontalScrollIndicator={false}\n accessibilityRole=\"tablist\"\n style={[tw.style('self-stretch'), style]}\n contentContainerStyle={[\n tw.style('flex flex-row items-center gap-1', twClassName),\n contentContainerStyle,\n ]}\n >\n {children}\n </ScrollView>\n </SegmentGroupContext.Provider>\n );\n};\n\nSegmentGroup.displayName = 'SegmentGroup';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentGroup.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkB,cAAc;AAMvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY;uGAStB,iBAAiB;;CAiCnB,CAAC"}
1
+ {"version":3,"file":"SegmentGroup.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,cAAc;AAGvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY;uGAStB,iBAAiB;;CAyBnB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentGroup.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkB,cAAc;AAMvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY;uGAStB,iBAAiB;;CAiCnB,CAAC"}
1
+ {"version":3,"file":"SegmentGroup.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,cAAc;AAGvC,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D,eAAO,MAAM,YAAY;uGAStB,iBAAiB;;CAyBnB,CAAC"}
@@ -4,21 +4,19 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { BoxAlignItems, BoxFlexDirection, SegmentGroupContext } from "@metamask/design-system-shared";
7
+ import { SegmentGroupContext } from "@metamask/design-system-shared";
8
8
  import { useTailwind } from "@metamask/design-system-twrnc-preset";
9
9
  import $React, { useMemo } from "react";
10
10
  const React = $importDefault($React);
11
- import { ScrollView } from "react-native/index.js";
12
- import { TWCLASSMAP_BOX_GAP } from "../Box/Box.constants.mjs";
11
+ import { ScrollView } from "react-native";
13
12
  export const SegmentGroup = ({ value, onChange, variant, children, twClassName, style, contentContainerStyle, ...scrollRest }) => {
14
13
  const tw = useTailwind();
15
14
  const contextValue = useMemo(() => ({ value, onChange, variant }), [value, onChange, variant]);
16
- const mergedContentContainerStyle = [
17
- tw.style('flex', BoxFlexDirection.Row, BoxAlignItems.Center, TWCLASSMAP_BOX_GAP[3], twClassName),
18
- contentContainerStyle,
19
- ];
20
15
  return (<SegmentGroupContext.Provider value={contextValue}>
21
- <ScrollView {...scrollRest} horizontal showsHorizontalScrollIndicator={false} accessibilityRole="tablist" style={[tw.style('self-stretch'), style]} contentContainerStyle={mergedContentContainerStyle}>
16
+ <ScrollView {...scrollRest} horizontal showsHorizontalScrollIndicator={false} accessibilityRole="tablist" style={[tw.style('self-stretch'), style]} contentContainerStyle={[
17
+ tw.style('flex flex-row items-center gap-1', twClassName),
18
+ contentContainerStyle,
19
+ ]}>
22
20
  {children}
23
21
  </ScrollView>
24
22
  </SegmentGroupContext.Provider>);
@@ -1 +1 @@
1
- {"version":3,"file":"SegmentGroup.mjs","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACpB,uCAAuC;AACxC,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,UAAU,EAAE,8BAAqB;AAG1C,OAAO,EAAE,kBAAkB,EAAE,iCAA6B;AAI1D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,KAAK,EACL,qBAAqB,EACrB,GAAG,UAAU,EACK,EAAE,EAAE;IACtB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACpC,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAC3B,CAAC;IAEF,MAAM,2BAA2B,GAAyB;QACxD,EAAE,CAAC,KAAK,CACN,MAAM,EACN,gBAAgB,CAAC,GAAG,EACpB,aAAa,CAAC,MAAM,EACpB,kBAAkB,CAAC,CAAC,CAAC,EACrB,WAAW,CACZ;QACD,qBAAqB;KACtB,CAAC;IAEF,OAAO,CACL,CAAC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAChD;MAAA,CAAC,UAAU,CACT,IAAI,UAAU,CAAC,CACf,UAAU,CACV,8BAA8B,CAAC,CAAC,KAAK,CAAC,CACtC,iBAAiB,CAAC,SAAS,CAC3B,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC,CACzC,qBAAqB,CAAC,CAAC,2BAA2B,CAAC,CAEnD;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAChC,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n SegmentGroupContext,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { ScrollView } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { TWCLASSMAP_BOX_GAP } from '../Box/Box.constants';\n\nimport type { SegmentGroupProps } from './SegmentGroup.types';\n\nexport const SegmentGroup = ({\n value,\n onChange,\n variant,\n children,\n twClassName,\n style,\n contentContainerStyle,\n ...scrollRest\n}: SegmentGroupProps) => {\n const tw = useTailwind();\n\n const contextValue = useMemo(\n () => ({ value, onChange, variant }),\n [value, onChange, variant],\n );\n\n const mergedContentContainerStyle: StyleProp<ViewStyle> = [\n tw.style(\n 'flex',\n BoxFlexDirection.Row,\n BoxAlignItems.Center,\n TWCLASSMAP_BOX_GAP[3],\n twClassName,\n ),\n contentContainerStyle,\n ];\n\n return (\n <SegmentGroupContext.Provider value={contextValue}>\n <ScrollView\n {...scrollRest}\n horizontal\n showsHorizontalScrollIndicator={false}\n accessibilityRole=\"tablist\"\n style={[tw.style('self-stretch'), style]}\n contentContainerStyle={mergedContentContainerStyle}\n >\n {children}\n </ScrollView>\n </SegmentGroupContext.Provider>\n );\n};\n\nSegmentGroup.displayName = 'SegmentGroup';\n"]}
1
+ {"version":3,"file":"SegmentGroup.mjs","sourceRoot":"","sources":["../../../src/components/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,uCAAuC;AACrE,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,UAAU,EAAE,qBAAqB;AAI1C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,KAAK,EACL,qBAAqB,EACrB,GAAG,UAAU,EACK,EAAE,EAAE;IACtB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACpC,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAC3B,CAAC;IAEF,OAAO,CACL,CAAC,mBAAmB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAChD;MAAA,CAAC,UAAU,CACT,IAAI,UAAU,CAAC,CACf,UAAU,CACV,8BAA8B,CAAC,CAAC,KAAK,CAAC,CACtC,iBAAiB,CAAC,SAAS,CAC3B,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,CAAC,CACzC,qBAAqB,CAAC,CAAC;YACrB,EAAE,CAAC,KAAK,CAAC,kCAAkC,EAAE,WAAW,CAAC;YACzD,qBAAqB;SACtB,CAAC,CAEF;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,UAAU,CACd;IAAA,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAChC,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import { SegmentGroupContext } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { ScrollView } from 'react-native';\n\nimport type { SegmentGroupProps } from './SegmentGroup.types';\n\nexport const SegmentGroup = ({\n value,\n onChange,\n variant,\n children,\n twClassName,\n style,\n contentContainerStyle,\n ...scrollRest\n}: SegmentGroupProps) => {\n const tw = useTailwind();\n\n const contextValue = useMemo(\n () => ({ value, onChange, variant }),\n [value, onChange, variant],\n );\n\n return (\n <SegmentGroupContext.Provider value={contextValue}>\n <ScrollView\n {...scrollRest}\n horizontal\n showsHorizontalScrollIndicator={false}\n accessibilityRole=\"tablist\"\n style={[tw.style('self-stretch'), style]}\n contentContainerStyle={[\n tw.style('flex flex-row items-center gap-1', twClassName),\n contentContainerStyle,\n ]}\n >\n {children}\n </ScrollView>\n </SegmentGroupContext.Provider>\n );\n};\n\nSegmentGroup.displayName = 'SegmentGroup';\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { SegmentGroupPropsShared } from "@metamask/design-system-shared";
2
- import type { ScrollViewProps } from "react-native/index.js";
2
+ import type { ScrollViewProps } from "react-native";
3
3
  /**
4
4
  * SegmentGroup component props.
5
5
  */