@metamask-previews/design-system-react-native 0.28.0-preview.1f40f69f → 0.30.2-preview.25db973

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 (415) hide show
  1. package/CHANGELOG.md +52 -1
  2. package/dist/components/AvatarBase/AvatarBase.cjs +1 -1
  3. package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
  4. package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
  5. package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
  6. package/dist/components/AvatarBase/AvatarBase.mjs +2 -2
  7. package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
  8. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +2 -2
  9. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
  10. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +2 -2
  11. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
  12. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +1 -2
  13. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  14. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  15. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  16. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +1 -2
  17. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  18. package/dist/components/AvatarNetwork/index.cjs +2 -2
  19. package/dist/components/AvatarNetwork/index.cjs.map +1 -1
  20. package/dist/components/AvatarNetwork/index.d.cts +1 -1
  21. package/dist/components/AvatarNetwork/index.d.cts.map +1 -1
  22. package/dist/components/AvatarNetwork/index.d.mts +1 -1
  23. package/dist/components/AvatarNetwork/index.d.mts.map +1 -1
  24. package/dist/components/AvatarNetwork/index.mjs +1 -1
  25. package/dist/components/AvatarNetwork/index.mjs.map +1 -1
  26. package/dist/components/BadgeCount/BadgeCount.cjs +1 -1
  27. package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
  28. package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
  29. package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
  30. package/dist/components/BadgeCount/BadgeCount.mjs +2 -2
  31. package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
  32. package/dist/components/BannerBase/BannerBase.cjs +1 -1
  33. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  34. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  35. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  36. package/dist/components/BannerBase/BannerBase.mjs +2 -2
  37. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  38. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +10 -0
  39. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  40. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
  41. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
  42. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +10 -0
  43. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  44. package/dist/components/ButtonBase/ButtonBase.cjs +5 -3
  45. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  46. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  47. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  48. package/dist/components/ButtonBase/ButtonBase.mjs +6 -4
  49. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  50. package/dist/components/Content/Content.cjs +6 -12
  51. package/dist/components/Content/Content.cjs.map +1 -1
  52. package/dist/components/Content/Content.d.cts.map +1 -1
  53. package/dist/components/Content/Content.d.mts.map +1 -1
  54. package/dist/components/Content/Content.mjs +7 -13
  55. package/dist/components/Content/Content.mjs.map +1 -1
  56. package/dist/components/Content/Content.types.cjs.map +1 -1
  57. package/dist/components/Content/Content.types.d.cts +1 -1
  58. package/dist/components/Content/Content.types.d.mts +1 -1
  59. package/dist/components/Content/Content.types.mjs.map +1 -1
  60. package/dist/components/{SegmentButton/SegmentButton.cjs → FilterButton/FilterButton.cjs} +19 -17
  61. package/dist/components/FilterButton/FilterButton.cjs.map +1 -0
  62. package/dist/components/FilterButton/FilterButton.d.cts +7 -0
  63. package/dist/components/FilterButton/FilterButton.d.cts.map +1 -0
  64. package/dist/components/FilterButton/FilterButton.d.mts +7 -0
  65. package/dist/components/FilterButton/FilterButton.d.mts.map +1 -0
  66. package/dist/components/{SegmentButton/SegmentButton.mjs → FilterButton/FilterButton.mjs} +18 -16
  67. package/dist/components/FilterButton/FilterButton.mjs.map +1 -0
  68. package/dist/components/{SegmentGroup/SegmentGroup.types.cjs → FilterButton/FilterButton.types.cjs} +1 -1
  69. package/dist/components/FilterButton/FilterButton.types.cjs.map +1 -0
  70. package/dist/components/FilterButton/FilterButton.types.d.cts +9 -0
  71. package/dist/components/FilterButton/FilterButton.types.d.cts.map +1 -0
  72. package/dist/components/FilterButton/FilterButton.types.d.mts +9 -0
  73. package/dist/components/FilterButton/FilterButton.types.d.mts.map +1 -0
  74. package/dist/components/FilterButton/FilterButton.types.mjs +2 -0
  75. package/dist/components/FilterButton/FilterButton.types.mjs.map +1 -0
  76. package/dist/components/FilterButton/index.cjs +8 -0
  77. package/dist/components/FilterButton/index.cjs.map +1 -0
  78. package/dist/components/FilterButton/index.d.cts +4 -0
  79. package/dist/components/FilterButton/index.d.cts.map +1 -0
  80. package/dist/components/FilterButton/index.d.mts +4 -0
  81. package/dist/components/FilterButton/index.d.mts.map +1 -0
  82. package/dist/components/FilterButton/index.mjs +3 -0
  83. package/dist/components/FilterButton/index.mjs.map +1 -0
  84. package/dist/components/{SegmentGroup/SegmentGroup.cjs → FilterButtonGroup/FilterButtonGroup.cjs} +7 -7
  85. package/dist/components/FilterButtonGroup/FilterButtonGroup.cjs.map +1 -0
  86. package/dist/components/FilterButtonGroup/FilterButtonGroup.d.cts +7 -0
  87. package/dist/components/FilterButtonGroup/FilterButtonGroup.d.cts.map +1 -0
  88. package/dist/components/FilterButtonGroup/FilterButtonGroup.d.mts +7 -0
  89. package/dist/components/FilterButtonGroup/FilterButtonGroup.d.mts.map +1 -0
  90. package/dist/components/{SegmentGroup/SegmentGroup.mjs → FilterButtonGroup/FilterButtonGroup.mjs} +6 -6
  91. package/dist/components/FilterButtonGroup/FilterButtonGroup.mjs.map +1 -0
  92. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.cjs +3 -0
  93. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.cjs.map +1 -0
  94. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.cts +12 -0
  95. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.cts.map +1 -0
  96. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.mts +12 -0
  97. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.d.mts.map +1 -0
  98. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.mjs +2 -0
  99. package/dist/components/FilterButtonGroup/FilterButtonGroup.types.mjs.map +1 -0
  100. package/dist/components/FilterButtonGroup/index.cjs +6 -0
  101. package/dist/components/FilterButtonGroup/index.cjs.map +1 -0
  102. package/dist/components/FilterButtonGroup/index.d.cts +3 -0
  103. package/dist/components/FilterButtonGroup/index.d.cts.map +1 -0
  104. package/dist/components/FilterButtonGroup/index.d.mts +3 -0
  105. package/dist/components/FilterButtonGroup/index.d.mts.map +1 -0
  106. package/dist/components/FilterButtonGroup/index.mjs +2 -0
  107. package/dist/components/FilterButtonGroup/index.mjs.map +1 -0
  108. package/dist/components/HeaderRoot/HeaderRoot.cjs +2 -1
  109. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  110. package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -1
  111. package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -1
  112. package/dist/components/HeaderRoot/HeaderRoot.mjs +2 -1
  113. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  114. package/dist/components/HeaderStandard/HeaderStandard.cjs +2 -1
  115. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  116. package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -1
  117. package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -1
  118. package/dist/components/HeaderStandard/HeaderStandard.mjs +2 -1
  119. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  120. package/dist/components/HeaderSubpage/HeaderSubpage.cjs +90 -0
  121. package/dist/components/HeaderSubpage/HeaderSubpage.cjs.map +1 -0
  122. package/dist/components/HeaderSubpage/HeaderSubpage.d.cts +4 -0
  123. package/dist/components/HeaderSubpage/HeaderSubpage.d.cts.map +1 -0
  124. package/dist/components/HeaderSubpage/HeaderSubpage.d.mts +4 -0
  125. package/dist/components/HeaderSubpage/HeaderSubpage.d.mts.map +1 -0
  126. package/dist/components/HeaderSubpage/HeaderSubpage.mjs +70 -0
  127. package/dist/components/HeaderSubpage/HeaderSubpage.mjs.map +1 -0
  128. package/dist/components/{SegmentButton/SegmentButton.types.cjs → HeaderSubpage/HeaderSubpage.types.cjs} +1 -1
  129. package/dist/components/HeaderSubpage/HeaderSubpage.types.cjs.map +1 -0
  130. package/dist/components/HeaderSubpage/HeaderSubpage.types.d.cts +59 -0
  131. package/dist/components/HeaderSubpage/HeaderSubpage.types.d.cts.map +1 -0
  132. package/dist/components/HeaderSubpage/HeaderSubpage.types.d.mts +59 -0
  133. package/dist/components/HeaderSubpage/HeaderSubpage.types.d.mts.map +1 -0
  134. package/dist/components/HeaderSubpage/HeaderSubpage.types.mjs +2 -0
  135. package/dist/components/HeaderSubpage/HeaderSubpage.types.mjs.map +1 -0
  136. package/dist/components/HeaderSubpage/index.cjs +6 -0
  137. package/dist/components/HeaderSubpage/index.cjs.map +1 -0
  138. package/dist/components/HeaderSubpage/index.d.cts +3 -0
  139. package/dist/components/HeaderSubpage/index.d.cts.map +1 -0
  140. package/dist/components/HeaderSubpage/index.d.mts +3 -0
  141. package/dist/components/HeaderSubpage/index.d.mts.map +1 -0
  142. package/dist/components/HeaderSubpage/index.mjs +2 -0
  143. package/dist/components/HeaderSubpage/index.mjs.map +1 -0
  144. package/dist/components/Icon/Icon.assets.cjs +2 -0
  145. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  146. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  147. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  148. package/dist/components/Icon/Icon.assets.mjs +2 -0
  149. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  150. package/dist/components/Icon/Icon.constants.cjs +6 -6
  151. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  152. package/dist/components/Icon/Icon.constants.d.cts +1 -1
  153. package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
  154. package/dist/components/Icon/Icon.constants.d.mts +1 -1
  155. package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
  156. package/dist/components/Icon/Icon.constants.mjs +1 -1
  157. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  158. package/dist/components/Icon/assets/trophy.svg +1 -0
  159. package/dist/components/IconAlert/IconAlert.constants.cjs +1 -1
  160. package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -1
  161. package/dist/components/IconAlert/IconAlert.constants.mjs +1 -1
  162. package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -1
  163. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +2 -3
  164. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  165. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  166. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  167. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +1 -2
  168. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  169. package/dist/components/KeyValueRow/KeyValueRow.cjs +2 -3
  170. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  171. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  172. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  173. package/dist/components/KeyValueRow/KeyValueRow.mjs +1 -2
  174. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  175. package/dist/components/ListItem/ListItem.cjs +34 -48
  176. package/dist/components/ListItem/ListItem.cjs.map +1 -1
  177. package/dist/components/ListItem/ListItem.d.cts.map +1 -1
  178. package/dist/components/ListItem/ListItem.d.mts.map +1 -1
  179. package/dist/components/ListItem/ListItem.mjs +34 -28
  180. package/dist/components/ListItem/ListItem.mjs.map +1 -1
  181. package/dist/components/ListItem/ListItem.types.cjs +0 -9
  182. package/dist/components/ListItem/ListItem.types.cjs.map +1 -1
  183. package/dist/components/ListItem/ListItem.types.d.cts +14 -55
  184. package/dist/components/ListItem/ListItem.types.d.cts.map +1 -1
  185. package/dist/components/ListItem/ListItem.types.d.mts +14 -55
  186. package/dist/components/ListItem/ListItem.types.d.mts.map +1 -1
  187. package/dist/components/ListItem/ListItem.types.mjs +1 -8
  188. package/dist/components/ListItem/ListItem.types.mjs.map +1 -1
  189. package/dist/components/ListItem/index.cjs +3 -3
  190. package/dist/components/ListItem/index.cjs.map +1 -1
  191. package/dist/components/ListItem/index.d.cts +1 -1
  192. package/dist/components/ListItem/index.d.cts.map +1 -1
  193. package/dist/components/ListItem/index.d.mts +1 -1
  194. package/dist/components/ListItem/index.d.mts.map +1 -1
  195. package/dist/components/ListItem/index.mjs +1 -1
  196. package/dist/components/ListItem/index.mjs.map +1 -1
  197. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.cjs +20 -0
  198. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.cjs.map +1 -0
  199. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.cts +7 -0
  200. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.cts.map +1 -0
  201. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.mts +7 -0
  202. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.d.mts.map +1 -0
  203. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.mjs +20 -0
  204. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.mjs.map +1 -0
  205. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.cjs +3 -0
  206. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.cjs.map +1 -0
  207. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.cts +14 -0
  208. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.cts.map +1 -0
  209. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.mts +14 -0
  210. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.d.mts.map +1 -0
  211. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.mjs +2 -0
  212. package/dist/components/ListItemMultiSelect/ListItemMultiSelect.types.mjs.map +1 -0
  213. package/dist/components/ListItemMultiSelect/index.cjs +6 -0
  214. package/dist/components/ListItemMultiSelect/index.cjs.map +1 -0
  215. package/dist/components/ListItemMultiSelect/index.d.cts +3 -0
  216. package/dist/components/ListItemMultiSelect/index.d.cts.map +1 -0
  217. package/dist/components/ListItemMultiSelect/index.d.mts +3 -0
  218. package/dist/components/ListItemMultiSelect/index.d.mts.map +1 -0
  219. package/dist/components/ListItemMultiSelect/index.mjs +2 -0
  220. package/dist/components/ListItemMultiSelect/index.mjs.map +1 -0
  221. package/dist/components/ListItemSelect/ListItemSelect.cjs +21 -0
  222. package/dist/components/ListItemSelect/ListItemSelect.cjs.map +1 -0
  223. package/dist/components/ListItemSelect/ListItemSelect.d.cts +7 -0
  224. package/dist/components/ListItemSelect/ListItemSelect.d.cts.map +1 -0
  225. package/dist/components/ListItemSelect/ListItemSelect.d.mts +7 -0
  226. package/dist/components/ListItemSelect/ListItemSelect.d.mts.map +1 -0
  227. package/dist/components/ListItemSelect/ListItemSelect.mjs +21 -0
  228. package/dist/components/ListItemSelect/ListItemSelect.mjs.map +1 -0
  229. package/dist/components/ListItemSelect/ListItemSelect.types.cjs +3 -0
  230. package/dist/components/ListItemSelect/ListItemSelect.types.cjs.map +1 -0
  231. package/dist/components/ListItemSelect/ListItemSelect.types.d.cts +18 -0
  232. package/dist/components/ListItemSelect/ListItemSelect.types.d.cts.map +1 -0
  233. package/dist/components/ListItemSelect/ListItemSelect.types.d.mts +18 -0
  234. package/dist/components/ListItemSelect/ListItemSelect.types.d.mts.map +1 -0
  235. package/dist/components/ListItemSelect/ListItemSelect.types.mjs +2 -0
  236. package/dist/components/ListItemSelect/ListItemSelect.types.mjs.map +1 -0
  237. package/dist/components/ListItemSelect/index.cjs +6 -0
  238. package/dist/components/ListItemSelect/index.cjs.map +1 -0
  239. package/dist/components/ListItemSelect/index.d.cts +3 -0
  240. package/dist/components/ListItemSelect/index.d.cts.map +1 -0
  241. package/dist/components/ListItemSelect/index.d.mts +3 -0
  242. package/dist/components/ListItemSelect/index.d.mts.map +1 -0
  243. package/dist/components/ListItemSelect/index.mjs +2 -0
  244. package/dist/components/ListItemSelect/index.mjs.map +1 -0
  245. package/dist/components/SectionHeader/SectionHeader.cjs +1 -1
  246. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  247. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
  248. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
  249. package/dist/components/SectionHeader/SectionHeader.mjs +2 -2
  250. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
  251. package/dist/components/SegmentedControl/SegmentedControl.cjs +50 -0
  252. package/dist/components/SegmentedControl/SegmentedControl.cjs.map +1 -0
  253. package/dist/components/SegmentedControl/SegmentedControl.constants.cjs +12 -0
  254. package/dist/components/SegmentedControl/SegmentedControl.constants.cjs.map +1 -0
  255. package/dist/components/SegmentedControl/SegmentedControl.constants.d.cts +4 -0
  256. package/dist/components/SegmentedControl/SegmentedControl.constants.d.cts.map +1 -0
  257. package/dist/components/SegmentedControl/SegmentedControl.constants.d.mts +4 -0
  258. package/dist/components/SegmentedControl/SegmentedControl.constants.d.mts.map +1 -0
  259. package/dist/components/SegmentedControl/SegmentedControl.constants.mjs +8 -0
  260. package/dist/components/SegmentedControl/SegmentedControl.constants.mjs.map +1 -0
  261. package/dist/components/SegmentedControl/SegmentedControl.d.cts +7 -0
  262. package/dist/components/SegmentedControl/SegmentedControl.d.cts.map +1 -0
  263. package/dist/components/SegmentedControl/SegmentedControl.d.mts +7 -0
  264. package/dist/components/SegmentedControl/SegmentedControl.d.mts.map +1 -0
  265. package/dist/components/SegmentedControl/SegmentedControl.mjs +30 -0
  266. package/dist/components/SegmentedControl/SegmentedControl.mjs.map +1 -0
  267. package/dist/components/SegmentedControl/SegmentedControl.types.cjs +3 -0
  268. package/dist/components/SegmentedControl/SegmentedControl.types.cjs.map +1 -0
  269. package/dist/components/SegmentedControl/SegmentedControl.types.d.cts +12 -0
  270. package/dist/components/SegmentedControl/SegmentedControl.types.d.cts.map +1 -0
  271. package/dist/components/SegmentedControl/SegmentedControl.types.d.mts +12 -0
  272. package/dist/components/SegmentedControl/SegmentedControl.types.d.mts.map +1 -0
  273. package/dist/components/SegmentedControl/SegmentedControl.types.mjs +2 -0
  274. package/dist/components/SegmentedControl/SegmentedControl.types.mjs.map +1 -0
  275. package/dist/components/SegmentedControl/index.cjs +6 -0
  276. package/dist/components/SegmentedControl/index.cjs.map +1 -0
  277. package/dist/components/SegmentedControl/index.d.cts +3 -0
  278. package/dist/components/SegmentedControl/index.d.cts.map +1 -0
  279. package/dist/components/SegmentedControl/index.d.mts +3 -0
  280. package/dist/components/SegmentedControl/index.d.mts.map +1 -0
  281. package/dist/components/SegmentedControl/index.mjs +2 -0
  282. package/dist/components/SegmentedControl/index.mjs.map +1 -0
  283. package/dist/components/SelectButton/SelectButton.constants.cjs +4 -5
  284. package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -1
  285. package/dist/components/SelectButton/SelectButton.constants.d.cts +1 -2
  286. package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -1
  287. package/dist/components/SelectButton/SelectButton.constants.d.mts +1 -2
  288. package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -1
  289. package/dist/components/SelectButton/SelectButton.constants.mjs +1 -2
  290. package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -1
  291. package/dist/components/Switch/Switch.cjs +28 -0
  292. package/dist/components/Switch/Switch.cjs.map +1 -0
  293. package/dist/components/Switch/Switch.d.cts +4 -0
  294. package/dist/components/Switch/Switch.d.cts.map +1 -0
  295. package/dist/components/Switch/Switch.d.mts +4 -0
  296. package/dist/components/Switch/Switch.d.mts.map +1 -0
  297. package/dist/components/Switch/Switch.mjs +28 -0
  298. package/dist/components/Switch/Switch.mjs.map +1 -0
  299. package/dist/components/Switch/Switch.types.cjs +3 -0
  300. package/dist/components/Switch/Switch.types.cjs.map +1 -0
  301. package/dist/components/Switch/Switch.types.d.cts +14 -0
  302. package/dist/components/Switch/Switch.types.d.cts.map +1 -0
  303. package/dist/components/Switch/Switch.types.d.mts +14 -0
  304. package/dist/components/Switch/Switch.types.d.mts.map +1 -0
  305. package/dist/components/Switch/Switch.types.mjs +2 -0
  306. package/dist/components/Switch/Switch.types.mjs.map +1 -0
  307. package/dist/components/Switch/index.cjs +6 -0
  308. package/dist/components/Switch/index.cjs.map +1 -0
  309. package/dist/components/Switch/index.d.cts +3 -0
  310. package/dist/components/Switch/index.d.cts.map +1 -0
  311. package/dist/components/Switch/index.d.mts +3 -0
  312. package/dist/components/Switch/index.d.mts.map +1 -0
  313. package/dist/components/Switch/index.mjs +2 -0
  314. package/dist/components/Switch/index.mjs.map +1 -0
  315. package/dist/components/TabEmptyState/TabEmptyState.cjs +2 -1
  316. package/dist/components/TabEmptyState/TabEmptyState.cjs.map +1 -1
  317. package/dist/components/TabEmptyState/TabEmptyState.d.cts.map +1 -1
  318. package/dist/components/TabEmptyState/TabEmptyState.d.mts.map +1 -1
  319. package/dist/components/TabEmptyState/TabEmptyState.mjs +2 -1
  320. package/dist/components/TabEmptyState/TabEmptyState.mjs.map +1 -1
  321. package/dist/components/Tag/Tag.cjs +1 -1
  322. package/dist/components/Tag/Tag.cjs.map +1 -1
  323. package/dist/components/Tag/Tag.constants.cjs +3 -3
  324. package/dist/components/Tag/Tag.constants.cjs.map +1 -1
  325. package/dist/components/Tag/Tag.constants.mjs +3 -3
  326. package/dist/components/Tag/Tag.constants.mjs.map +1 -1
  327. package/dist/components/Tag/Tag.d.cts.map +1 -1
  328. package/dist/components/Tag/Tag.d.mts.map +1 -1
  329. package/dist/components/Tag/Tag.mjs +1 -1
  330. package/dist/components/Tag/Tag.mjs.map +1 -1
  331. package/dist/components/TextField/TextField.cjs +2 -1
  332. package/dist/components/TextField/TextField.cjs.map +1 -1
  333. package/dist/components/TextField/TextField.d.cts.map +1 -1
  334. package/dist/components/TextField/TextField.d.mts.map +1 -1
  335. package/dist/components/TextField/TextField.mjs +2 -1
  336. package/dist/components/TextField/TextField.mjs.map +1 -1
  337. package/dist/components/Toast/Toast.cjs +1 -1
  338. package/dist/components/Toast/Toast.cjs.map +1 -1
  339. package/dist/components/Toast/Toast.constants.cjs +1 -1
  340. package/dist/components/Toast/Toast.constants.cjs.map +1 -1
  341. package/dist/components/Toast/Toast.constants.d.cts +1 -1
  342. package/dist/components/Toast/Toast.constants.d.mts +1 -1
  343. package/dist/components/Toast/Toast.constants.mjs +1 -1
  344. package/dist/components/Toast/Toast.constants.mjs.map +1 -1
  345. package/dist/components/Toast/Toast.d.cts.map +1 -1
  346. package/dist/components/Toast/Toast.d.mts.map +1 -1
  347. package/dist/components/Toast/Toast.mjs +2 -2
  348. package/dist/components/Toast/Toast.mjs.map +1 -1
  349. package/dist/components/index.cjs +19 -9
  350. package/dist/components/index.cjs.map +1 -1
  351. package/dist/components/index.d.cts +16 -6
  352. package/dist/components/index.d.cts.map +1 -1
  353. package/dist/components/index.d.mts +16 -6
  354. package/dist/components/index.d.mts.map +1 -1
  355. package/dist/components/index.mjs +8 -3
  356. package/dist/components/index.mjs.map +1 -1
  357. package/package.json +11 -9
  358. package/dist/components/ListItem/ListItem.constants.cjs +0 -14
  359. package/dist/components/ListItem/ListItem.constants.cjs.map +0 -1
  360. package/dist/components/ListItem/ListItem.constants.d.cts +0 -8
  361. package/dist/components/ListItem/ListItem.constants.d.cts.map +0 -1
  362. package/dist/components/ListItem/ListItem.constants.d.mts +0 -8
  363. package/dist/components/ListItem/ListItem.constants.d.mts.map +0 -1
  364. package/dist/components/ListItem/ListItem.constants.mjs +0 -11
  365. package/dist/components/ListItem/ListItem.constants.mjs.map +0 -1
  366. package/dist/components/SegmentButton/SegmentButton.cjs.map +0 -1
  367. package/dist/components/SegmentButton/SegmentButton.d.cts +0 -7
  368. package/dist/components/SegmentButton/SegmentButton.d.cts.map +0 -1
  369. package/dist/components/SegmentButton/SegmentButton.d.mts +0 -7
  370. package/dist/components/SegmentButton/SegmentButton.d.mts.map +0 -1
  371. package/dist/components/SegmentButton/SegmentButton.mjs.map +0 -1
  372. package/dist/components/SegmentButton/SegmentButton.types.cjs.map +0 -1
  373. package/dist/components/SegmentButton/SegmentButton.types.d.cts +0 -9
  374. package/dist/components/SegmentButton/SegmentButton.types.d.cts.map +0 -1
  375. package/dist/components/SegmentButton/SegmentButton.types.d.mts +0 -9
  376. package/dist/components/SegmentButton/SegmentButton.types.d.mts.map +0 -1
  377. package/dist/components/SegmentButton/SegmentButton.types.mjs +0 -2
  378. package/dist/components/SegmentButton/SegmentButton.types.mjs.map +0 -1
  379. package/dist/components/SegmentButton/index.cjs +0 -8
  380. package/dist/components/SegmentButton/index.cjs.map +0 -1
  381. package/dist/components/SegmentButton/index.d.cts +0 -4
  382. package/dist/components/SegmentButton/index.d.cts.map +0 -1
  383. package/dist/components/SegmentButton/index.d.mts +0 -4
  384. package/dist/components/SegmentButton/index.d.mts.map +0 -1
  385. package/dist/components/SegmentButton/index.mjs +0 -3
  386. package/dist/components/SegmentButton/index.mjs.map +0 -1
  387. package/dist/components/SegmentGroup/SegmentGroup.cjs.map +0 -1
  388. package/dist/components/SegmentGroup/SegmentGroup.d.cts +0 -7
  389. package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +0 -1
  390. package/dist/components/SegmentGroup/SegmentGroup.d.mts +0 -7
  391. package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +0 -1
  392. package/dist/components/SegmentGroup/SegmentGroup.mjs.map +0 -1
  393. package/dist/components/SegmentGroup/SegmentGroup.types.cjs.map +0 -1
  394. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +0 -12
  395. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +0 -1
  396. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +0 -12
  397. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +0 -1
  398. package/dist/components/SegmentGroup/SegmentGroup.types.mjs +0 -2
  399. package/dist/components/SegmentGroup/SegmentGroup.types.mjs.map +0 -1
  400. package/dist/components/SegmentGroup/index.cjs +0 -6
  401. package/dist/components/SegmentGroup/index.cjs.map +0 -1
  402. package/dist/components/SegmentGroup/index.d.cts +0 -3
  403. package/dist/components/SegmentGroup/index.d.cts.map +0 -1
  404. package/dist/components/SegmentGroup/index.d.mts +0 -3
  405. package/dist/components/SegmentGroup/index.d.mts.map +0 -1
  406. package/dist/components/SegmentGroup/index.mjs +0 -2
  407. package/dist/components/SegmentGroup/index.mjs.map +0 -1
  408. package/dist/types/index.cjs +0 -18
  409. package/dist/types/index.cjs.map +0 -1
  410. package/dist/types/index.d.cts +0 -8
  411. package/dist/types/index.d.cts.map +0 -1
  412. package/dist/types/index.d.mts +0 -8
  413. package/dist/types/index.d.mts.map +0 -1
  414. package/dist/types/index.mjs +0 -8
  415. package/dist/types/index.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.t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eAAM,CACV;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,eAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAC7C,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AA3GW,QAAA,aAAa,iBA2GxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { 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
+ {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAEzC,gDAAmC;AACnC,4CAA+B;AAI/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACI,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACT,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,mBAAmB,GACvB,WAAW;QACX,CAAC,aAAa,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,+BAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAErE,MAAM,sBAAsB,GAAG,aAAa,CAAC,CAAC,CAAC,CAC7C,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BA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B,gBAAgB,EAChB,WAAW,EACX,OAAO,IAAI,CAAC,UAAU,IAAI,YAAY,CACvC,CAAC;gBACF,MAAM,eAAe,GACnB,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAE3D,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,CAAC,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,eAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,eAAM,CACV;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,eAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,IAAA,uCAAgB,EAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAC7D,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AA3GW,QAAA,aAAa,iBA2GxB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { 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={mergeTwClassName('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.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"}
1
+ {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA2GtD,CAAC"}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AASA,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,7 +4,7 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { IconColor, IconName, IconSize, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
7
+ import { IconColor, IconName, IconSize, mergeTwClassName, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
9
9
  import $React from "react";
10
10
  const React = $importDefault($React);
@@ -60,7 +60,7 @@ export const SectionHeader = (sectionHeaderProps) => {
60
60
  </BoxRow>
61
61
  </Pressable>);
62
62
  }
63
- return (<BoxRow {...props} gap={1} style={style} twClassName={`px-4 pb-2 pt-3 ${twClassName}`} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
63
+ return (<BoxRow {...props} gap={1} style={style} twClassName={mergeTwClassName('px-4 pb-2 pt-3', twClassName)} startAccessory={resolvedStartAccessory} endAccessory={resolvedEndAccessory}>
64
64
  {titleRow}
65
65
  </BoxRow>);
66
66
  };
@@ -1 +1 @@
1
- {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,qBAAqB;AAEzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAiC,CACzD,kBAAkB,EAClB,EAAE;IACF,MAAM,EACJ,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACT,GAAG,kBAAkB,CAAC;IAEvB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,mBAAmB,GACvB,WAAW;QACX,CAAC,aAAa,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAErE,MAAM,sBAAsB,GAAG,aAAa,CAA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AAE;gBACrB,MAAM,SAAS,GAAG,EAAE,CAAC,KAAK,CACxB,gBAAgB,EAChB,WAAW,EACX,OAAO,IAAI,CAAC,UAAU,IAAI,YAAY,CACvC,CAAC;gBACF,MAAM,eAAe,GACnB,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;gBAE3D,OAAO,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACpE,CAAC,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,MAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,MAAM,CACV;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,MAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,kBAAkB,WAAW,EAAE,CAAC,CAC7C,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { 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
+ {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;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,QAAQ,CACX;QAAA,EAAE,MAAM,CACV;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,MAAM,CACL,IAAI,KAAK,CAAC,CACV,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,WAAW,CAAC,CAAC,gBAAgB,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC,CAC7D,cAAc,CAAC,CAAC,sBAAsB,CAAC,CACvC,YAAY,CAAC,CAAC,oBAAoB,CAAC,CAEnC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconName,\n IconSize,\n mergeTwClassName,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\n\nimport { 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={mergeTwClassName('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"]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SegmentedControl = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
28
+ const react_1 = __importStar(require("react"));
29
+ const Box_1 = require("../Box/index.cjs");
30
+ const SegmentedControl_constants_1 = require("./SegmentedControl.constants.cjs");
31
+ const SegmentedControl = ({ value, onChange, size = design_system_shared_1.ButtonBaseSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
32
+ const contextValue = (0, react_1.useMemo)(() => ({
33
+ value,
34
+ onChange,
35
+ variant: design_system_shared_1.FilterButtonVariant.Secondary,
36
+ size,
37
+ isEqualWidth: isFullWidth,
38
+ }), [value, onChange, size, isFullWidth]);
39
+ const widthClass = isFullWidth ? 'self-stretch' : 'self-start';
40
+ return (<design_system_shared_1.FilterButtonGroupContext.Provider value={contextValue}>
41
+ <Box_1.Box {...rest} accessibilityRole="tablist" twClassName={(0, design_system_shared_1.mergeTwClassName)((0, design_system_shared_1.mergeTwClassName)(`${widthClass} flex-row items-center gap-1 border border-muted p-1`, (0, SegmentedControl_constants_1.getSegmentedControlBorderRadiusTwClass)(size)), twClassName)} style={style}>
42
+ {react_1.Children.map(children, (child, index) => isFullWidth ? (<Box_1.Box key={index} twClassName="flex-1">
43
+ {child}
44
+ </Box_1.Box>) : (<react_1.default.Fragment key={index}>{child}</react_1.default.Fragment>))}
45
+ </Box_1.Box>
46
+ </design_system_shared_1.FilterButtonGroupContext.Provider>);
47
+ };
48
+ exports.SegmentedControl = SegmentedControl;
49
+ exports.SegmentedControl.displayName = 'SegmentedControl';
50
+ //# sourceMappingURL=SegmentedControl.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAKiD;AACjD,+CAAiD;AAEjD,0CAA6B;AAE7B,iFAAsF;AAG/E,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,qCAAc,CAAC,EAAE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CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,gBAAgB,oBAiD3B;AAEF,wBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonGroupContext,\n FilterButtonVariant,\n mergeTwClassName,\n} from '@metamask-previews/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = ButtonBaseSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSegmentedControlBorderRadiusTwClass = exports.TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS = void 0;
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ exports.TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS = {
6
+ [design_system_shared_1.ButtonBaseSize.Sm]: 'rounded-xl',
7
+ [design_system_shared_1.ButtonBaseSize.Md]: 'rounded-2xl',
8
+ [design_system_shared_1.ButtonBaseSize.Lg]: 'rounded-2xl',
9
+ };
10
+ const getSegmentedControlBorderRadiusTwClass = (size) => exports.TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];
11
+ exports.getSegmentedControlBorderRadiusTwClass = getSegmentedControlBorderRadiusTwClass;
12
+ //# sourceMappingURL=SegmentedControl.constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.constants.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":";;;AAAA,kFAAyE;AAE5D,QAAA,yCAAyC,GAGlD;IACF,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,YAAY;IACjC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,aAAa;IAClC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,aAAa;CACnC,CAAC;AAEK,MAAM,sCAAsC,GAAG,CACpD,IAAoB,EACZ,EAAE,CAAC,iDAAyC,CAAC,IAAI,CAAC,CAAC;AAFhD,QAAA,sCAAsC,0CAEU","sourcesContent":["import { ButtonBaseSize } from '@metamask-previews/design-system-shared';\n\nexport const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<\n ButtonBaseSize,\n string\n> = {\n [ButtonBaseSize.Sm]: 'rounded-xl',\n [ButtonBaseSize.Md]: 'rounded-2xl',\n [ButtonBaseSize.Lg]: 'rounded-2xl',\n};\n\nexport const getSegmentedControlBorderRadiusTwClass = (\n size: ButtonBaseSize,\n): string => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];\n"]}
@@ -0,0 +1,4 @@
1
+ import { ButtonBaseSize } from "@metamask-previews/design-system-shared";
2
+ export declare const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<ButtonBaseSize, string>;
3
+ export declare const getSegmentedControlBorderRadiusTwClass: (size: ButtonBaseSize) => string;
4
+ //# sourceMappingURL=SegmentedControl.constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AAEzE,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAC5D,cAAc,EACd,MAAM,CAKP,CAAC;AAEF,eAAO,MAAM,sCAAsC,SAC3C,cAAc,KACnB,MAAyD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { ButtonBaseSize } from "@metamask-previews/design-system-shared";
2
+ export declare const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<ButtonBaseSize, string>;
3
+ export declare const getSegmentedControlBorderRadiusTwClass: (size: ButtonBaseSize) => string;
4
+ //# sourceMappingURL=SegmentedControl.constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AAEzE,eAAO,MAAM,yCAAyC,EAAE,MAAM,CAC5D,cAAc,EACd,MAAM,CAKP,CAAC;AAEF,eAAO,MAAM,sCAAsC,SAC3C,cAAc,KACnB,MAAyD,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ButtonBaseSize } from "@metamask-previews/design-system-shared";
2
+ export const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS = {
3
+ [ButtonBaseSize.Sm]: 'rounded-xl',
4
+ [ButtonBaseSize.Md]: 'rounded-2xl',
5
+ [ButtonBaseSize.Lg]: 'rounded-2xl',
6
+ };
7
+ export const getSegmentedControlBorderRadiusTwClass = (size) => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];
8
+ //# sourceMappingURL=SegmentedControl.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.constants.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AAEzE,MAAM,CAAC,MAAM,yCAAyC,GAGlD;IACF,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,YAAY;IACjC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,aAAa;IAClC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,aAAa;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG,CACpD,IAAoB,EACZ,EAAE,CAAC,yCAAyC,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import { ButtonBaseSize } from '@metamask-previews/design-system-shared';\n\nexport const TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS: Record<\n ButtonBaseSize,\n string\n> = {\n [ButtonBaseSize.Sm]: 'rounded-xl',\n [ButtonBaseSize.Md]: 'rounded-2xl',\n [ButtonBaseSize.Lg]: 'rounded-2xl',\n};\n\nexport const getSegmentedControlBorderRadiusTwClass = (\n size: ButtonBaseSize,\n): string => TWCLASSMAP_SEGMENTEDCONTROL_BORDER_RADIUS[size];\n"]}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { SegmentedControlProps } from "./SegmentedControl.types.cjs";
3
+ export declare const SegmentedControl: {
4
+ ({ value, onChange, size, isFullWidth, children, twClassName, style, ...rest }: SegmentedControlProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
7
+ //# sourceMappingURL=SegmentedControl.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA4B,cAAc;AAKjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB;oFAS1B,qBAAqB;;CAwCvB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import type { SegmentedControlProps } from "./SegmentedControl.types.mjs";
3
+ export declare const SegmentedControl: {
4
+ ({ value, onChange, size, isFullWidth, children, twClassName, style, ...rest }: SegmentedControlProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
7
+ //# sourceMappingURL=SegmentedControl.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA4B,cAAc;AAKjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,qCAAiC;AAEtE,eAAO,MAAM,gBAAgB;oFAS1B,qBAAqB;;CAwCvB,CAAC"}
@@ -0,0 +1,30 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { ButtonBaseSize, FilterButtonGroupContext, FilterButtonVariant, mergeTwClassName } from "@metamask-previews/design-system-shared";
8
+ import $React, { Children, useMemo } from "react";
9
+ const React = $importDefault($React);
10
+ import { Box } from "../Box/index.mjs";
11
+ import { getSegmentedControlBorderRadiusTwClass } from "./SegmentedControl.constants.mjs";
12
+ export const SegmentedControl = ({ value, onChange, size = ButtonBaseSize.Sm, isFullWidth = false, children, twClassName, style, ...rest }) => {
13
+ const contextValue = useMemo(() => ({
14
+ value,
15
+ onChange,
16
+ variant: FilterButtonVariant.Secondary,
17
+ size,
18
+ isEqualWidth: isFullWidth,
19
+ }), [value, onChange, size, isFullWidth]);
20
+ const widthClass = isFullWidth ? 'self-stretch' : 'self-start';
21
+ return (<FilterButtonGroupContext.Provider value={contextValue}>
22
+ <Box {...rest} accessibilityRole="tablist" twClassName={mergeTwClassName(mergeTwClassName(`${widthClass} flex-row items-center gap-1 border border-muted p-1`, getSegmentedControlBorderRadiusTwClass(size)), twClassName)} style={style}>
23
+ {Children.map(children, (child, index) => isFullWidth ? (<Box key={index} twClassName="flex-1">
24
+ {child}
25
+ </Box>) : (<React.Fragment key={index}>{child}</React.Fragment>))}
26
+ </Box>
27
+ </FilterButtonGroupContext.Provider>);
28
+ };
29
+ SegmentedControl.displayName = 'SegmentedControl';
30
+ //# sourceMappingURL=SegmentedControl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EACjB,gDAAgD;AACjD,OAAO,QAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc;;AAEjD,OAAO,EAAE,GAAG,EAAE,yBAAe;AAE7B,OAAO,EAAE,sCAAsC,EAAE,yCAAqC;AAGtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,KAAK,EACL,QAAQ,EACR,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,WAAW,GAAG,KAAK,EACnB,QAAQ,EACR,WAAW,EACX,KAAK,EACL,GAAG,IAAI,EACe,EAAE,EAAE;IAC1B,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,CAAC,CAAC;QACL,KAAK;QACL,QAAQ;QACR,OAAO,EAAE,mBAAmB,CAAC,SAAS;QACtC,IAAI;QACJ,YAAY,EAAE,WAAW;KAC1B,CAAC,EACF,CAAC,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,CAAC,CACrC,CAAC;IAEF,MAAM,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC;IAE/D,OAAO,CACL,CAAC,wBAAwB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CACrD;MAAA,CAAC,GAAG,CACF,IAAI,IAAI,CAAC,CACT,iBAAiB,CAAC,SAAS,CAC3B,WAAW,CAAC,CAAC,gBAAgB,CAC3B,gBAAgB,CACd,GAAG,UAAU,sDAAsD,EACnE,sCAAsC,CAAC,IAAI,CAAC,CAC7C,EACD,WAAW,CACZ,CAAC,CACF,KAAK,CAAC,CAAC,KAAK,CAAC,CAEb;QAAA,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CACvC,WAAW,CAAC,CAAC,CAAC,CACZ,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,QAAQ,CACnC;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,CACF,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CACrD,CACF,CACH;MAAA,EAAE,GAAG,CACP;IAAA,EAAE,wBAAwB,CAAC,QAAQ,CAAC,CACrC,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FilterButtonGroupContext,\n FilterButtonVariant,\n mergeTwClassName,\n} from '@metamask-previews/design-system-shared';\nimport React, { Children, useMemo } from 'react';\n\nimport { Box } from '../Box';\n\nimport { getSegmentedControlBorderRadiusTwClass } from './SegmentedControl.constants';\nimport type { SegmentedControlProps } from './SegmentedControl.types';\n\nexport const SegmentedControl = ({\n value,\n onChange,\n size = ButtonBaseSize.Sm,\n isFullWidth = false,\n children,\n twClassName,\n style,\n ...rest\n}: SegmentedControlProps) => {\n const contextValue = useMemo(\n () => ({\n value,\n onChange,\n variant: FilterButtonVariant.Secondary,\n size,\n isEqualWidth: isFullWidth,\n }),\n [value, onChange, size, isFullWidth],\n );\n\n const widthClass = isFullWidth ? 'self-stretch' : 'self-start';\n\n return (\n <FilterButtonGroupContext.Provider value={contextValue}>\n <Box\n {...rest}\n accessibilityRole=\"tablist\"\n twClassName={mergeTwClassName(\n mergeTwClassName(\n `${widthClass} flex-row items-center gap-1 border border-muted p-1`,\n getSegmentedControlBorderRadiusTwClass(size),\n ),\n twClassName,\n )}\n style={style}\n >\n {Children.map(children, (child, index) =>\n isFullWidth ? (\n <Box key={index} twClassName=\"flex-1\">\n {child}\n </Box>\n ) : (\n <React.Fragment key={index}>{child}</React.Fragment>\n ),\n )}\n </Box>\n </FilterButtonGroupContext.Provider>\n );\n};\n\nSegmentedControl.displayName = 'SegmentedControl';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SegmentedControl.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.types.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SegmentedControlPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n/**\n * SegmentedControl component props.\n */\nexport type SegmentedControlProps = SegmentedControlPropsShared &\n ViewProps & {\n /**\n * Optional twrnc classes merged into the root container after defaults.\n */\n twClassName?: string;\n };\n"]}
@@ -0,0 +1,12 @@
1
+ import type { SegmentedControlPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { ViewProps } from "react-native";
3
+ /**
4
+ * SegmentedControl component props.
5
+ */
6
+ export type SegmentedControlProps = SegmentedControlPropsShared & ViewProps & {
7
+ /**
8
+ * Optional twrnc classes merged into the root container after defaults.
9
+ */
10
+ twClassName?: string;
11
+ };
12
+ //# sourceMappingURL=SegmentedControl.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.types.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,gDAAgD;AAC3F,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { SegmentedControlPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { ViewProps } from "react-native";
3
+ /**
4
+ * SegmentedControl component props.
5
+ */
6
+ export type SegmentedControlProps = SegmentedControlPropsShared & ViewProps & {
7
+ /**
8
+ * Optional twrnc classes merged into the root container after defaults.
9
+ */
10
+ twClassName?: string;
11
+ };
12
+ //# sourceMappingURL=SegmentedControl.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.types.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,gDAAgD;AAC3F,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAC7D,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SegmentedControl.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SegmentedControl.types.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/SegmentedControl.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SegmentedControlPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n/**\n * SegmentedControl component props.\n */\nexport type SegmentedControlProps = SegmentedControlPropsShared &\n ViewProps & {\n /**\n * Optional twrnc classes merged into the root container after defaults.\n */\n twClassName?: string;\n };\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SegmentedControl = void 0;
4
+ var SegmentedControl_1 = require("./SegmentedControl.cjs");
5
+ Object.defineProperty(exports, "SegmentedControl", { enumerable: true, get: function () { return SegmentedControl_1.SegmentedControl; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAA7C,oHAAA,gBAAgB,OAAA","sourcesContent":["export { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { SegmentedControl } from "./SegmentedControl.cjs";
2
+ export type { SegmentedControlProps } from "./SegmentedControl.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
@@ -0,0 +1,3 @@
1
+ export { SegmentedControl } from "./SegmentedControl.mjs";
2
+ export type { SegmentedControlProps } from "./SegmentedControl.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B;AACtD,YAAY,EAAE,qBAAqB,EAAE,qCAAiC"}
@@ -0,0 +1,2 @@
1
+ export { SegmentedControl } from "./SegmentedControl.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,+BAA2B","sourcesContent":["export { SegmentedControl } from './SegmentedControl';\nexport type { SegmentedControlProps } from './SegmentedControl.types';\n"]}
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME = void 0;
4
4
  const design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
- const types_1 = require("../../types/index.cjs");
6
5
  exports.MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME = {
7
- [design_system_shared_1.SelectButtonEndArrow.Up]: types_1.IconName.ArrowUp,
8
- [design_system_shared_1.SelectButtonEndArrow.Down]: types_1.IconName.ArrowDown,
9
- [design_system_shared_1.SelectButtonEndArrow.Left]: types_1.IconName.ArrowLeft,
10
- [design_system_shared_1.SelectButtonEndArrow.Right]: types_1.IconName.ArrowRight,
6
+ [design_system_shared_1.SelectButtonEndArrow.Up]: design_system_shared_1.IconName.ArrowUp,
7
+ [design_system_shared_1.SelectButtonEndArrow.Down]: design_system_shared_1.IconName.ArrowDown,
8
+ [design_system_shared_1.SelectButtonEndArrow.Left]: design_system_shared_1.IconName.ArrowLeft,
9
+ [design_system_shared_1.SelectButtonEndArrow.Right]: design_system_shared_1.IconName.ArrowRight,
11
10
  };
12
11
  //# sourceMappingURL=SelectButton.constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":";;;AAAA,kFAA+E;AAE/E,iDAAuC;AAE1B,QAAA,iDAAiD,GAG1D;IACF,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,gBAAQ,CAAC,OAAO;IAC3C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,gBAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,gBAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,KAAK,CAAC,EAAE,gBAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { SelectButtonEndArrow } from '@metamask-previews/design-system-shared';\n\nimport { IconName } from '../../types';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
1
+ {"version":3,"file":"SelectButton.constants.cjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":";;;AAAA,kFAAyF;AAE5E,QAAA,iDAAiD,GAG1D;IACF,CAAC,2CAAoB,CAAC,EAAE,CAAC,EAAE,+BAAQ,CAAC,OAAO;IAC3C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,+BAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,IAAI,CAAC,EAAE,+BAAQ,CAAC,SAAS;IAC/C,CAAC,2CAAoB,CAAC,KAAK,CAAC,EAAE,+BAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { IconName, SelectButtonEndArrow } from '@metamask-previews/design-system-shared';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
@@ -1,4 +1,3 @@
1
- import { SelectButtonEndArrow } from "@metamask-previews/design-system-shared";
2
- import { IconName } from "../../types/index.cjs";
1
+ import { IconName, SelectButtonEndArrow } from "@metamask-previews/design-system-shared";
3
2
  export declare const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<(typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow], IconName>;
4
3
  //# sourceMappingURL=SelectButton.constants.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gDAAgD;AAE/E,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAEvC,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
1
+ {"version":3,"file":"SelectButton.constants.d.cts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,gDAAgD;AAEzF,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
@@ -1,4 +1,3 @@
1
- import { SelectButtonEndArrow } from "@metamask-previews/design-system-shared";
2
- import { IconName } from "../../types/index.mjs";
1
+ import { IconName, SelectButtonEndArrow } from "@metamask-previews/design-system-shared";
3
2
  export declare const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<(typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow], IconName>;
4
3
  //# sourceMappingURL=SelectButton.constants.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gDAAgD;AAE/E,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAEvC,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
1
+ {"version":3,"file":"SelectButton.constants.d.mts","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,gDAAgD;AAEzF,eAAO,MAAM,iDAAiD,EAAE,MAAM,CACpE,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,QAAQ,CAMT,CAAC"}
@@ -1,5 +1,4 @@
1
- import { SelectButtonEndArrow } from "@metamask-previews/design-system-shared";
2
- import { IconName } from "../../types/index.mjs";
1
+ import { IconName, SelectButtonEndArrow } from "@metamask-previews/design-system-shared";
3
2
  export const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME = {
4
3
  [SelectButtonEndArrow.Up]: IconName.ArrowUp,
5
4
  [SelectButtonEndArrow.Down]: IconName.ArrowDown,
@@ -1 +1 @@
1
- {"version":3,"file":"SelectButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,gDAAgD;AAE/E,OAAO,EAAE,QAAQ,EAAE,8BAAoB;AAEvC,MAAM,CAAC,MAAM,iDAAiD,GAG1D;IACF,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,OAAO;IAC3C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { SelectButtonEndArrow } from '@metamask-previews/design-system-shared';\n\nimport { IconName } from '../../types';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
1
+ {"version":3,"file":"SelectButton.constants.mjs","sourceRoot":"","sources":["../../../src/components/SelectButton/SelectButton.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,gDAAgD;AAEzF,MAAM,CAAC,MAAM,iDAAiD,GAG1D;IACF,CAAC,oBAAoB,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,OAAO;IAC3C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,SAAS;IAC/C,CAAC,oBAAoB,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,UAAU;CAClD,CAAC","sourcesContent":["import { IconName, SelectButtonEndArrow } from '@metamask-previews/design-system-shared';\n\nexport const MAP_SELECTBUTTON_END_ARROW_DIRECTION_TO_ICON_NAME: Record<\n (typeof SelectButtonEndArrow)[keyof typeof SelectButtonEndArrow],\n IconName\n> = {\n [SelectButtonEndArrow.Up]: IconName.ArrowUp,\n [SelectButtonEndArrow.Down]: IconName.ArrowDown,\n [SelectButtonEndArrow.Left]: IconName.ArrowLeft,\n [SelectButtonEndArrow.Right]: IconName.ArrowRight,\n};\n"]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Switch = void 0;
7
+ const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
8
+ const react_1 = __importDefault(require("react"));
9
+ const react_native_1 = require("react-native");
10
+ const Text_1 = require("../Text/index.cjs");
11
+ const IOS_SWITCH_MARGIN_FIX = 4;
12
+ const Switch = ({ isOn, isDisabled = false, onValueChange, label, style, testID, ...props }) => {
13
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
14
+ return (<react_native_1.View testID={testID} style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}>
15
+ {label ? (<Text_1.Text variant={Text_1.TextVariant.BodyMd} color={Text_1.TextColor.TextDefault} style={tw `mr-2 flex-1`}>
16
+ {label}
17
+ </Text_1.Text>) : null}
18
+ <react_native_1.Switch {...props} value={isOn} disabled={isDisabled} onValueChange={onValueChange} accessibilityRole="switch" accessibilityState={{
19
+ checked: isOn,
20
+ disabled: isDisabled,
21
+ }} accessibilityLabel={label} style={[
22
+ react_native_1.Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },
23
+ style,
24
+ ]}/>
25
+ </react_native_1.View>);
26
+ };
27
+ exports.Switch = Switch;
28
+ //# sourceMappingURL=Switch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.cjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;AAAA,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAkE;AAElE,4CAAuD;AAIvD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEzB,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,EACJ,UAAU,GAAG,KAAK,EAClB,aAAa,EACb,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,mBAAI,CACH,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,IAAI,YAAY,CAAC,CAAC,CAErE;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,WAAI,CACH,OAAO,CAAC,CAAC,kBAAW,CAAC,MAAM,CAAC,CAC5B,KAAK,CAAC,CAAC,gBAAS,CAAC,WAAW,CAAC,CAC7B,KAAK,CAAC,CAAC,EAAE,CAAA,aAAa,CAAC,CAEvB;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,WAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,qBAAQ,CACP,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,QAAQ,CAC1B,kBAAkB,CAAC,CAAC;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,UAAU;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,uBAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE;YAC/D,KAAK;SACN,CAAC,EAEN;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AA3CW,QAAA,MAAM,UA2CjB","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Switch as RNSwitch, Platform, View } from 'react-native';\n\nimport { Text, TextVariant, TextColor } from '../Text';\n\nimport type { SwitchProps } from './Switch.types';\n\nconst IOS_SWITCH_MARGIN_FIX = 4;\n\nexport const Switch = ({\n isOn,\n isDisabled = false,\n onValueChange,\n label,\n style,\n testID,\n ...props\n}: SwitchProps) => {\n const tw = useTailwind();\n\n return (\n <View\n testID={testID}\n style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}\n >\n {label ? (\n <Text\n variant={TextVariant.BodyMd}\n color={TextColor.TextDefault}\n style={tw`mr-2 flex-1`}\n >\n {label}\n </Text>\n ) : null}\n <RNSwitch\n {...props}\n value={isOn}\n disabled={isDisabled}\n onValueChange={onValueChange}\n accessibilityRole=\"switch\"\n accessibilityState={{\n checked: isOn,\n disabled: isDisabled,\n }}\n accessibilityLabel={label}\n style={[\n Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },\n style,\n ]}\n />\n </View>\n );\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { SwitchProps } from "./Switch.types.cjs";
3
+ export declare const Switch: ({ isOn, isDisabled, onValueChange, label, style, testID, ...props }: SwitchProps) => React.JSX.Element;
4
+ //# sourceMappingURL=Switch.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.cts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAIlD,eAAO,MAAM,MAAM,wEAQhB,WAAW,sBAmCb,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { SwitchProps } from "./Switch.types.mjs";
3
+ export declare const Switch: ({ isOn, isDisabled, onValueChange, label, style, testID, ...props }: SwitchProps) => React.JSX.Element;
4
+ //# sourceMappingURL=Switch.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.d.mts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAIlD,eAAO,MAAM,MAAM,wEAQhB,WAAW,sBAmCb,CAAC"}
@@ -0,0 +1,28 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { Switch as RNSwitch, Platform, View } from "react-native";
11
+ import { Text, TextVariant, TextColor } from "../Text/index.mjs";
12
+ const IOS_SWITCH_MARGIN_FIX = 4;
13
+ export const Switch = ({ isOn, isDisabled = false, onValueChange, label, style, testID, ...props }) => {
14
+ const tw = useTailwind();
15
+ return (<View testID={testID} style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}>
16
+ {label ? (<Text variant={TextVariant.BodyMd} color={TextColor.TextDefault} style={tw `mr-2 flex-1`}>
17
+ {label}
18
+ </Text>) : null}
19
+ <RNSwitch {...props} value={isOn} disabled={isDisabled} onValueChange={onValueChange} accessibilityRole="switch" accessibilityState={{
20
+ checked: isOn,
21
+ disabled: isDisabled,
22
+ }} accessibilityLabel={label} style={[
23
+ Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },
24
+ style,
25
+ ]}/>
26
+ </View>);
27
+ };
28
+ //# sourceMappingURL=Switch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.mjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAqB;AAElE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,0BAAgB;AAIvD,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEhC,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,EACJ,UAAU,GAAG,KAAK,EAClB,aAAa,EACb,KAAK,EACL,KAAK,EACL,MAAM,EACN,GAAG,KAAK,EACI,EAAE,EAAE;IAChB,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IAEzB,OAAO,CACL,CAAC,IAAI,CACH,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,uBAAuB,EAAE,UAAU,IAAI,YAAY,CAAC,CAAC,CAErE;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,IAAI,CACH,OAAO,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAC5B,KAAK,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAC7B,KAAK,CAAC,CAAC,EAAE,CAAA,aAAa,CAAC,CAEvB;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACR;MAAA,CAAC,QAAQ,CACP,IAAI,KAAK,CAAC,CACV,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,QAAQ,CAAC,CAAC,UAAU,CAAC,CACrB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,iBAAiB,CAAC,QAAQ,CAC1B,kBAAkB,CAAC,CAAC;YAClB,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,UAAU;SACrB,CAAC,CACF,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC;YACL,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,EAAE,WAAW,EAAE,qBAAqB,EAAE;YAC/D,KAAK;SACN,CAAC,EAEN;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Switch as RNSwitch, Platform, View } from 'react-native';\n\nimport { Text, TextVariant, TextColor } from '../Text';\n\nimport type { SwitchProps } from './Switch.types';\n\nconst IOS_SWITCH_MARGIN_FIX = 4;\n\nexport const Switch = ({\n isOn,\n isDisabled = false,\n onValueChange,\n label,\n style,\n testID,\n ...props\n}: SwitchProps) => {\n const tw = useTailwind();\n\n return (\n <View\n testID={testID}\n style={tw.style('flex-row items-center', isDisabled && 'opacity-50')}\n >\n {label ? (\n <Text\n variant={TextVariant.BodyMd}\n color={TextColor.TextDefault}\n style={tw`mr-2 flex-1`}\n >\n {label}\n </Text>\n ) : null}\n <RNSwitch\n {...props}\n value={isOn}\n disabled={isDisabled}\n onValueChange={onValueChange}\n accessibilityRole=\"switch\"\n accessibilityState={{\n checked: isOn,\n disabled: isDisabled,\n }}\n accessibilityLabel={label}\n style={[\n Platform.OS === 'ios' && { marginRight: IOS_SWITCH_MARGIN_FIX },\n style,\n ]}\n />\n </View>\n );\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Switch.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.types.cjs","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SwitchPropsShared } from '@metamask-previews/design-system-shared';\nimport type { SwitchProps as RNSwitchProps } from 'react-native';\n\n/**\n * Switch component props (React Native platform-specific)\n * Extends shared props from @metamask-previews/design-system-shared with React Native specific platform concerns\n */\nexport type SwitchProps = SwitchPropsShared &\n Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange'> & {\n /**\n * Required callback for when the switch value changes.\n * Use this to update your state.\n */\n onValueChange: (value: boolean) => void;\n };\n"]}
@@ -0,0 +1,14 @@
1
+ import type { SwitchPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { SwitchProps as RNSwitchProps } from "react-native";
3
+ /**
4
+ * Switch component props (React Native platform-specific)
5
+ * Extends shared props from @metamask-previews/design-system-shared with React Native specific platform concerns
6
+ */
7
+ export type SwitchProps = SwitchPropsShared & Omit<RNSwitchProps, 'value' | 'disabled' | 'onValueChange'> & {
8
+ /**
9
+ * Required callback for when the switch value changes.
10
+ * Use this to update your state.
11
+ */
12
+ onValueChange: (value: boolean) => void;
13
+ };
14
+ //# sourceMappingURL=Switch.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Switch.types.d.cts","sourceRoot":"","sources":["../../../src/components/Switch/Switch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AACjF,OAAO,KAAK,EAAE,WAAW,IAAI,aAAa,EAAE,qBAAqB;AAEjE;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,aAAa,EAAE,OAAO,GAAG,UAAU,GAAG,eAAe,CAAC,GAAG;IAC5D;;;OAGG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACzC,CAAC"}