@metamask-previews/design-system-react-native 0.28.0-preview.1f40f69f → 0.30.0-preview.0a4d6f8

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 (421) hide show
  1. package/CHANGELOG.md +37 -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 +4 -10
  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 +5 -11
  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/TextButton/TextButton.types.cjs.map +1 -1
  332. package/dist/components/TextButton/TextButton.types.d.cts +2 -5
  333. package/dist/components/TextButton/TextButton.types.d.cts.map +1 -1
  334. package/dist/components/TextButton/TextButton.types.d.mts +2 -5
  335. package/dist/components/TextButton/TextButton.types.d.mts.map +1 -1
  336. package/dist/components/TextButton/TextButton.types.mjs.map +1 -1
  337. package/dist/components/TextField/TextField.cjs +2 -1
  338. package/dist/components/TextField/TextField.cjs.map +1 -1
  339. package/dist/components/TextField/TextField.d.cts.map +1 -1
  340. package/dist/components/TextField/TextField.d.mts.map +1 -1
  341. package/dist/components/TextField/TextField.mjs +2 -1
  342. package/dist/components/TextField/TextField.mjs.map +1 -1
  343. package/dist/components/Toast/Toast.cjs +1 -1
  344. package/dist/components/Toast/Toast.cjs.map +1 -1
  345. package/dist/components/Toast/Toast.constants.cjs +1 -1
  346. package/dist/components/Toast/Toast.constants.cjs.map +1 -1
  347. package/dist/components/Toast/Toast.constants.d.cts +1 -1
  348. package/dist/components/Toast/Toast.constants.d.mts +1 -1
  349. package/dist/components/Toast/Toast.constants.mjs +1 -1
  350. package/dist/components/Toast/Toast.constants.mjs.map +1 -1
  351. package/dist/components/Toast/Toast.d.cts.map +1 -1
  352. package/dist/components/Toast/Toast.d.mts.map +1 -1
  353. package/dist/components/Toast/Toast.mjs +2 -2
  354. package/dist/components/Toast/Toast.mjs.map +1 -1
  355. package/dist/components/index.cjs +19 -9
  356. package/dist/components/index.cjs.map +1 -1
  357. package/dist/components/index.d.cts +16 -6
  358. package/dist/components/index.d.cts.map +1 -1
  359. package/dist/components/index.d.mts +16 -6
  360. package/dist/components/index.d.mts.map +1 -1
  361. package/dist/components/index.mjs +8 -3
  362. package/dist/components/index.mjs.map +1 -1
  363. package/package.json +9 -7
  364. package/dist/components/ListItem/ListItem.constants.cjs +0 -14
  365. package/dist/components/ListItem/ListItem.constants.cjs.map +0 -1
  366. package/dist/components/ListItem/ListItem.constants.d.cts +0 -8
  367. package/dist/components/ListItem/ListItem.constants.d.cts.map +0 -1
  368. package/dist/components/ListItem/ListItem.constants.d.mts +0 -8
  369. package/dist/components/ListItem/ListItem.constants.d.mts.map +0 -1
  370. package/dist/components/ListItem/ListItem.constants.mjs +0 -11
  371. package/dist/components/ListItem/ListItem.constants.mjs.map +0 -1
  372. package/dist/components/SegmentButton/SegmentButton.cjs.map +0 -1
  373. package/dist/components/SegmentButton/SegmentButton.d.cts +0 -7
  374. package/dist/components/SegmentButton/SegmentButton.d.cts.map +0 -1
  375. package/dist/components/SegmentButton/SegmentButton.d.mts +0 -7
  376. package/dist/components/SegmentButton/SegmentButton.d.mts.map +0 -1
  377. package/dist/components/SegmentButton/SegmentButton.mjs.map +0 -1
  378. package/dist/components/SegmentButton/SegmentButton.types.cjs.map +0 -1
  379. package/dist/components/SegmentButton/SegmentButton.types.d.cts +0 -9
  380. package/dist/components/SegmentButton/SegmentButton.types.d.cts.map +0 -1
  381. package/dist/components/SegmentButton/SegmentButton.types.d.mts +0 -9
  382. package/dist/components/SegmentButton/SegmentButton.types.d.mts.map +0 -1
  383. package/dist/components/SegmentButton/SegmentButton.types.mjs +0 -2
  384. package/dist/components/SegmentButton/SegmentButton.types.mjs.map +0 -1
  385. package/dist/components/SegmentButton/index.cjs +0 -8
  386. package/dist/components/SegmentButton/index.cjs.map +0 -1
  387. package/dist/components/SegmentButton/index.d.cts +0 -4
  388. package/dist/components/SegmentButton/index.d.cts.map +0 -1
  389. package/dist/components/SegmentButton/index.d.mts +0 -4
  390. package/dist/components/SegmentButton/index.d.mts.map +0 -1
  391. package/dist/components/SegmentButton/index.mjs +0 -3
  392. package/dist/components/SegmentButton/index.mjs.map +0 -1
  393. package/dist/components/SegmentGroup/SegmentGroup.cjs.map +0 -1
  394. package/dist/components/SegmentGroup/SegmentGroup.d.cts +0 -7
  395. package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +0 -1
  396. package/dist/components/SegmentGroup/SegmentGroup.d.mts +0 -7
  397. package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +0 -1
  398. package/dist/components/SegmentGroup/SegmentGroup.mjs.map +0 -1
  399. package/dist/components/SegmentGroup/SegmentGroup.types.cjs.map +0 -1
  400. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +0 -12
  401. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +0 -1
  402. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +0 -12
  403. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +0 -1
  404. package/dist/components/SegmentGroup/SegmentGroup.types.mjs +0 -2
  405. package/dist/components/SegmentGroup/SegmentGroup.types.mjs.map +0 -1
  406. package/dist/components/SegmentGroup/index.cjs +0 -6
  407. package/dist/components/SegmentGroup/index.cjs.map +0 -1
  408. package/dist/components/SegmentGroup/index.d.cts +0 -3
  409. package/dist/components/SegmentGroup/index.d.cts.map +0 -1
  410. package/dist/components/SegmentGroup/index.d.mts +0 -3
  411. package/dist/components/SegmentGroup/index.d.mts.map +0 -1
  412. package/dist/components/SegmentGroup/index.mjs +0 -2
  413. package/dist/components/SegmentGroup/index.mjs.map +0 -1
  414. package/dist/types/index.cjs +0 -18
  415. package/dist/types/index.cjs.map +0 -1
  416. package/dist/types/index.d.cts +0 -8
  417. package/dist/types/index.d.cts.map +0 -1
  418. package/dist/types/index.d.mts +0 -8
  419. package/dist/types/index.d.mts.map +0 -1
  420. package/dist/types/index.mjs +0 -8
  421. package/dist/types/index.mjs.map +0 -1
@@ -4,10 +4,9 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { ButtonIconSize, FontWeight, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
7
+ import { ButtonIconSize, FontWeight, IconColor, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
8
  import $React from "react";
9
9
  const React = $importDefault($React);
10
- import { IconColor } from "../../types/index.mjs";
11
10
  import { BoxColumn } from "../BoxColumn/index.mjs";
12
11
  import { BoxRow } from "../BoxRow/index.mjs";
13
12
  import { ButtonIcon } from "../ButtonIcon/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueColumn.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE,8BAAoB;AACxC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EAAE,YAAY,EACnB,cAAc,EACd,WAAW,EACX,GAAG,SAAS,EACQ,EAAE,EAAE;IACxB,MAAM,mBAAmB,GACvB,qBAAqB,EAAE,QAAQ,KAAK,SAAS;QAC7C,qBAAqB,CAAC,QAAQ,KAAK,IAAI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S,CAAC,CAAC;YACT,OAAO,EAAE,WAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,eAAe,CAAC,CAAC,QAAQ,CAAC,CAC1B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { IconColor } from '../../types';\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueColumnProps } from './KeyValueColumn.types';\n\nexport const KeyValueColumn = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n twClassName,\n ...viewProps\n}: KeyValueColumnProps) => {\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconAlternative }}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconDefault }}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxColumn\n bottomAccessory={valueBox}\n twClassName={twClassName}\n {...viewProps}\n >\n {keyBox}\n </BoxColumn>\n );\n};\n\nKeyValueColumn.displayName = 'KeyValueColumn';\n"]}
1
+ {"version":3,"file":"KeyValueColumn.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueColumn/KeyValueColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,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AW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CACf,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CACpC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,WAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,gBAAgB,CAE5B;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,eAAe,CAAC,CAAC,QAAQ,CAAC,CAC1B,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,MAAM,CACT;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n IconColor,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueColumnProps } from './KeyValueColumn.types';\n\nexport const KeyValueColumn = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n twClassName,\n ...viewProps\n}: KeyValueColumnProps) => {\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconAlternative }}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n iconProps={{ color: IconColor.IconDefault }}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"w-full min-w-0\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxColumn\n bottomAccessory={valueBox}\n twClassName={twClassName}\n {...viewProps}\n >\n {keyBox}\n </BoxColumn>\n );\n};\n\nKeyValueColumn.displayName = 'KeyValueColumn';\n"]}
@@ -7,7 +7,6 @@ exports.KeyValueRow = void 0;
7
7
  const design_system_shared_1 = require("@metamask-previews/design-system-shared");
8
8
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
9
9
  const react_1 = __importDefault(require("react"));
10
- const types_1 = require("../../types/index.cjs");
11
10
  const Box_1 = require("../Box/index.cjs");
12
11
  const BoxRow_1 = require("../BoxRow/index.cjs");
13
12
  const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
@@ -15,12 +14,12 @@ const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps
15
14
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
16
15
  const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
17
16
  keyEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} {...keyEndButtonIconProps} iconName={keyEndButtonIconProps.iconName} iconProps={{
18
- color: types_1.IconColor.IconAlternative,
17
+ color: design_system_shared_1.IconColor.IconAlternative,
19
18
  ...keyEndButtonIconProps.iconProps,
20
19
  }}/>) : (keyEndAccessory);
21
20
  const valueEndAccessoryNode = valueEndButtonIconProps?.iconName !== undefined &&
22
21
  valueEndButtonIconProps.iconName !== null ? (<ButtonIcon_1.ButtonIcon size={design_system_shared_1.ButtonIconSize.Sm} {...valueEndButtonIconProps} iconName={valueEndButtonIconProps.iconName} iconProps={{
23
- color: types_1.IconColor.IconDefault,
22
+ color: design_system_shared_1.IconColor.IconDefault,
24
23
  ...valueEndButtonIconProps.iconProps,
25
24
  }}/>) : (valueEndAccessory);
26
25
  const keyBox = (<BoxRow_1.BoxRow startAccessory={keyStartAccessory} endAccessory={keyEndAccessoryNode} textProps={{
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAMiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAE1B,iDAAwC;AACxC,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAIpC,MAAM,WAAW,GAAG,CAAC,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EAAE,YAAY,EACnB,cAAc,EACd,OAA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AAC,eAAe;YAChC,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,YAAY;SAChB,CAAC,CAEF;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CACf,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CACpC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,kCAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,iCAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,gCAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,4BAA4B,CAExC;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,eAAM,CACL,YAAY,CAAC,CAAC,QAAQ,CAAC,CACvB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,OAAO,KAAK,yCAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EACtD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,SAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,SAAG,CAC3C;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AArGW,QAAA,WAAW,eAqGtB;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { IconColor } from '../../types';\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxRow\n endAccessory={valueBox}\n gap={4}\n style={[\n tw.style(\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n </BoxRow>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
1
+ {"version":3,"file":"KeyValueRow.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAOiD;AACjD,8FAA4E;AAC5E,kDAA0B;AAE1B,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAIpC,MAAM,WAAW,GAAG,CAAC,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,YAAY,EACZ,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EAAE,YAAY,EACnB,cAAc,EACd,OAAO,GAAG,yCAAkB,CAAC,OAAO,EACpC,WAAW,EACX,KAAK,EACL,GAAG,SAAS,EACK,EAAE,EAAE;IACrB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,mBAAmB,GACvB,qBAAqB,EAAE,QAAQ,KAAK,SAAS;QAC7C,qBAAqB,CAAC,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,CACxC,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,qCAAc,CAAC,EAAE,CAAC,CACxB,IAAI,qBAAqB,CAAC,CAC1B,QAAQ,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CACzC,SAAS,CAAC,CAAC;YACT,KAAK,EAAE,gCAAS,CAAC,eAAe;YAChC,GAAG,qBAAqB,CAAC,SAAS;SACnC,CAAC,EACF,CACH,CAAC,CAAC,CAAC,CACF,eAAe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A,EAAE,eAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,eAAM,CACL,YAAY,CAAC,CAAC,QAAQ,CAAC,CACvB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,OAAO,KAAK,yCAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EACtD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,SAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,SAAG,CAC3C;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AArGW,QAAA,WAAW,eAqGtB;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n IconColor,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxRow\n endAccessory={valueBox}\n gap={4}\n style={[\n tw.style(\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n </BoxRow>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAsFlB,CAAC"}
1
+ {"version":3,"file":"KeyValueRow.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAsFlB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAsFlB,CAAC"}
1
+ {"version":3,"file":"KeyValueRow.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAE5D,eAAO,MAAM,WAAW;yPAerB,gBAAgB;;CAsFlB,CAAC"}
@@ -4,11 +4,10 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
- import { ButtonIconSize, FontWeight, KeyValueRowVariant, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
7
+ import { ButtonIconSize, FontWeight, IconColor, KeyValueRowVariant, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
9
9
  import $React from "react";
10
10
  const React = $importDefault($React);
11
- import { IconColor } from "../../types/index.mjs";
12
11
  import { Box } from "../Box/index.mjs";
13
12
  import { BoxRow } from "../BoxRow/index.mjs";
14
13
  import { ButtonIcon } from "../ButtonIcon/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EAC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,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EACtD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAC3C;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { IconColor } from '../../types';\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxRow\n endAccessory={valueBox}\n gap={4}\n style={[\n tw.style(\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n </BoxRow>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
1
+ {"version":3,"file":"KeyValueRow.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACT,kBAAkB,EAClB,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,iBAAiB,EACjB,eAAe,EACf,qBAAqB,EACrB,QAAQ,EAAE,UAAU,EACpB,Y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AAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,SAAS,CAAC,eAAe;YAChC,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,YAAY;SAChB,CAAC,CAEF;MAAA,CAAC,UAAU,CACb;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,MAAM,QAAQ,GAAG,CACf,CAAC,MAAM,CACL,cAAc,CAAC,CAAC,mBAAmB,CAAC,CACpC,YAAY,CAAC,CAAC,qBAAqB,CAAC,CACpC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,WAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;YAC5B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,cAAc;SAClB,CAAC,CACF,WAAW,CAAC,4BAA4B,CAExC;MAAA,CAAC,YAAY,CACf;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,MAAM,CACL,YAAY,CAAC,CAAC,QAAQ,CAAC,CACvB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,OAAO,KAAK,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EACtD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAC3C;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n ButtonIconSize,\n FontWeight,\n IconColor,\n KeyValueRowVariant,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxRow\n endAccessory={valueBox}\n gap={4}\n style={[\n tw.style(\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n </BoxRow>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
@@ -1,59 +1,45 @@
1
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;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
4
  };
25
5
  Object.defineProperty(exports, "__esModule", { value: true });
26
6
  exports.ListItem = void 0;
7
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
8
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
28
- const react_1 = __importStar(require("react"));
9
+ const react_1 = __importDefault(require("react"));
29
10
  const react_native_1 = require("react-native");
30
11
  const Box_1 = require("../Box/index.cjs");
31
- const ListItem_constants_1 = require("./ListItem.constants.cjs");
32
- const ListItem_types_1 = require("./ListItem.types.cjs");
33
- const VERTICAL_ALIGNMENT_MAP = {
34
- [ListItem_types_1.ListItemVerticalAlignment.Top]: Box_1.BoxAlignItems.Start,
35
- [ListItem_types_1.ListItemVerticalAlignment.Center]: Box_1.BoxAlignItems.Center,
36
- [ListItem_types_1.ListItemVerticalAlignment.Bottom]: Box_1.BoxAlignItems.End,
37
- };
38
- const ListItem = ({ children, topAccessory, bottomAccessory, topAccessoryGap = ListItem_constants_1.DEFAULT_LISTITEM_TOPACCESSORYGAP, bottomAccessoryGap = ListItem_constants_1.DEFAULT_LISTITEM_BOTTOMACCESSORYGAP, gap = ListItem_constants_1.DEFAULT_LISTITEM_GAP, verticalAlignment = ListItem_constants_1.DEFAULT_LISTITEM_VERTICALALIGNMENT, twClassName, style, ...props }) => {
12
+ const BoxRow_1 = require("../BoxRow/index.cjs");
13
+ const Content_1 = require("../Content/index.cjs");
14
+ const Content_constants_1 = require("../Content/Content.constants.cjs");
15
+ const ListItem = ({ children, isInteractive = false, twClassName, style, startAccessory, endAccessory, accessoryGap = 0, verticalAlignment, avatar, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, accessibilityRole, ...props }) => {
39
16
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
40
- return (<Box_1.Box style={style
41
- ? [tw.style('p-4', twClassName), style]
42
- : tw.style('p-4', twClassName)} {...props}>
43
- {topAccessory && (<react_native_1.View testID={ListItem_constants_1.TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER} style={{ marginBottom: topAccessoryGap }}>
44
- {topAccessory}
45
- </react_native_1.View>)}
46
- <Box_1.Box flexDirection={Box_1.BoxFlexDirection.Row} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}>
47
- {react_1.Children.toArray(children)
48
- .filter((child) => Boolean(child))
49
- .map((child, index) => (<react_1.default.Fragment key={index}>
50
- {index > 0 && (<react_native_1.View style={{ width: gap }} testID={ListItem_constants_1.TESTID_LISTITEM_GAP} accessible={false}/>)}
51
- {child}
52
- </react_1.default.Fragment>))}
53
- </Box_1.Box>
54
- {bottomAccessory && (<react_native_1.View testID={ListItem_constants_1.TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER} style={{ marginTop: bottomAccessoryGap }}>
55
- {bottomAccessory}
56
- </react_native_1.View>)}
17
+ const wrapperStyle = style
18
+ ? [tw.style('px-4 py-3', twClassName), style]
19
+ : tw.style('px-4 py-3', twClassName);
20
+ const getPressableStyle = ({ pressed, }) => {
21
+ const baseStyle = tw.style('w-full px-4 py-3', twClassName, pressed && 'bg-pressed');
22
+ if (!style) {
23
+ return baseStyle;
24
+ }
25
+ const userStyle = typeof style === 'function' ? style({ pressed }) : style;
26
+ return [baseStyle, userStyle];
27
+ };
28
+ const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);
29
+ const rowAlignment = Content_constants_1.VERTICAL_ALIGNMENT_MAP[verticalAlignment ?? design_system_shared_1.ContentVerticalAlignment.Center];
30
+ const content = (<Content_1.Content twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined} verticalAlignment={verticalAlignment} avatar={avatar} title={title} titleProps={titleProps} titleStartAccessory={titleStartAccessory} titleEndAccessory={titleEndAccessory} description={description} descriptionProps={descriptionProps} descriptionStartAccessory={descriptionStartAccessory} descriptionEndAccessory={descriptionEndAccessory} value={value} valueProps={valueProps} valueStartAccessory={valueStartAccessory} valueEndAccessory={valueEndAccessory} subvalue={subvalue} subvalueProps={subvalueProps} subvalueStartAccessory={subvalueStartAccessory} subvalueEndAccessory={subvalueEndAccessory}/>);
31
+ const listContent = hasRowAccessories ? (<BoxRow_1.BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={rowAlignment} gap={accessoryGap} twClassName="min-h-[46px] w-full">
32
+ {content}
33
+ </BoxRow_1.BoxRow>) : (content);
34
+ if (isInteractive) {
35
+ return (<react_native_1.Pressable accessibilityRole={accessibilityRole ?? 'button'} style={getPressableStyle} {...props}>
36
+ {listContent}
37
+ {children}
38
+ </react_native_1.Pressable>);
39
+ }
40
+ return (<Box_1.Box style={wrapperStyle} {...props}>
41
+ {listContent}
42
+ {children}
57
43
  </Box_1.Box>);
58
44
  };
59
45
  exports.ListItem = ListItem;
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAwC;AACxC,+CAAoD;AAEpD,0CAA8D;AAE9D,iEAQ8B;AAE9B,yDAA6D;AAE7D,MAAM,sBAAsB,GAC1B;IACE,CAAC,0CAAyB,CAAC,GAAG,CAAC,EAAE,mBAAa,CAAC,KAAK;IACpD,CAAC,0CAAyB,CAAC,MAAM,CAAC,EAAE,mBAAa,CAAC,MAAM;IACxD,CAAC,0CAAyB,CAAC,MAAM,CAAC,EAAE,mBAAa,CAAC,GAAG;CACtD,CAAC;AAEG,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,YAAY,EACZ,eAAe,EACf,eAAe,GAAG,qDAAgC,EAClD,kBAAkB,GAAG,wDAAmC,EACxD,GAAG,GAAG,yCAAoB,EAC1B,iBAAiB,GAAG,uDAAkC,EACtD,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,OAAO,CACL,CAAC,SAAG,CACF,KAAK,CAAC,CACJ,KAAK;YACH,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC;Y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AAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA5DW,QAAA,QAAQ,YA4DnB;AAEF,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { Children } from 'react';\nimport { DimensionValue, View } from 'react-native';\n\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\n\nimport {\n DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n DEFAULT_LISTITEM_GAP,\n DEFAULT_LISTITEM_TOPACCESSORYGAP,\n DEFAULT_LISTITEM_VERTICALALIGNMENT,\n TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER,\n TESTID_LISTITEM_GAP,\n TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER,\n} from './ListItem.constants';\nimport type { ListItemProps } from './ListItem.types';\nimport { ListItemVerticalAlignment } from './ListItem.types';\n\nconst VERTICAL_ALIGNMENT_MAP: Record<ListItemVerticalAlignment, BoxAlignItems> =\n {\n [ListItemVerticalAlignment.Top]: BoxAlignItems.Start,\n [ListItemVerticalAlignment.Center]: BoxAlignItems.Center,\n [ListItemVerticalAlignment.Bottom]: BoxAlignItems.End,\n };\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n topAccessory,\n bottomAccessory,\n topAccessoryGap = DEFAULT_LISTITEM_TOPACCESSORYGAP,\n bottomAccessoryGap = DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n gap = DEFAULT_LISTITEM_GAP,\n verticalAlignment = DEFAULT_LISTITEM_VERTICALALIGNMENT,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n return (\n <Box\n style={\n style\n ? [tw.style('p-4', twClassName), style]\n : tw.style('p-4', twClassName)\n }\n {...props}\n >\n {topAccessory && (\n <View\n testID={TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER}\n style={{ marginBottom: topAccessoryGap }}\n >\n {topAccessory}\n </View>\n )}\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n >\n {Children.toArray(children)\n .filter((child) => Boolean(child))\n .map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <View\n style={{ width: gap as DimensionValue }}\n testID={TESTID_LISTITEM_GAP}\n accessible={false}\n />\n )}\n {child}\n </React.Fragment>\n ))}\n </Box>\n {bottomAccessory && (\n <View\n testID={TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER}\n style={{ marginTop: bottomAccessoryGap }}\n >\n {bottomAccessory}\n </View>\n )}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
1
+ {"version":3,"file":"ListItem.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAAmF;AACnF,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAyC;AAOzC,0CAA6B;AAC7B,gDAAmC;AACnC,kDAAqC;AACrC,wEAAsE;AAI/D,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,aAAa,GAAG,KAAK,EACrB,WAAW,EACX,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,GAAG,CAAC,EAChB,iBAAiB,EACjB,MAAM,EACN,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,YAAY,GAAG,KAAK;QACxB,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC;QAC7C,CAAC,CAAC,EAAE,CAA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C,CACvB,mBAAmB,CAAC,CAAC,mBAAmB,CAAC,CACzC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,CAC7B,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,EAC3C,CACH,CAAC;IAEF,MAAM,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,CACtC,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,UAAU,CAAC,CAAC,YAAY,CAAC,CACzB,GAAG,CAAC,CAAC,YAAY,CAAC,CAClB,WAAW,CAAC,qBAAqB,CAEjC;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,OAAO,CACL,CAAC,wBAAS,CACR,iBAAiB,CAAC,CAAC,iBAAiB,IAAI,QAAQ,CAAC,CACjD,KAAK,CAAC,CAAC,iBAAiB,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,WAAW,CACZ;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,wBAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,SAAG,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAClC;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AApHW,QAAA,QAAQ,YAoHnB;AAEF,gBAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { ContentVerticalAlignment } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Content } from '../Content';\nimport { VERTICAL_ALIGNMENT_MAP } from '../Content/Content.constants';\n\nimport type { ListItemProps } from './ListItem.types';\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n isInteractive = false,\n twClassName,\n style,\n startAccessory,\n endAccessory,\n accessoryGap = 0,\n verticalAlignment,\n avatar,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n accessibilityRole,\n ...props\n}) => {\n const tw = useTailwind();\n\n const wrapperStyle = style\n ? [tw.style('px-4 py-3', twClassName), style]\n : tw.style('px-4 py-3', twClassName);\n\n const getPressableStyle = ({\n pressed,\n }: PressableStateCallbackType): StyleProp<ViewStyle> => {\n const baseStyle = tw.style(\n 'w-full px-4 py-3',\n twClassName,\n pressed && 'bg-pressed',\n );\n\n if (!style) {\n return baseStyle;\n }\n\n const userStyle = typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);\n const rowAlignment =\n VERTICAL_ALIGNMENT_MAP[\n verticalAlignment ?? ContentVerticalAlignment.Center\n ];\n\n const content = (\n <Content\n twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined}\n verticalAlignment={verticalAlignment}\n avatar={avatar}\n title={title}\n titleProps={titleProps}\n titleStartAccessory={titleStartAccessory}\n titleEndAccessory={titleEndAccessory}\n description={description}\n descriptionProps={descriptionProps}\n descriptionStartAccessory={descriptionStartAccessory}\n descriptionEndAccessory={descriptionEndAccessory}\n value={value}\n valueProps={valueProps}\n valueStartAccessory={valueStartAccessory}\n valueEndAccessory={valueEndAccessory}\n subvalue={subvalue}\n subvalueProps={subvalueProps}\n subvalueStartAccessory={subvalueStartAccessory}\n subvalueEndAccessory={subvalueEndAccessory}\n />\n );\n\n const listContent = hasRowAccessories ? (\n <BoxRow\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n alignItems={rowAlignment}\n gap={accessoryGap}\n twClassName=\"min-h-[46px] w-full\"\n >\n {content}\n </BoxRow>\n ) : (\n content\n );\n\n if (isInteractive) {\n return (\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n style={getPressableStyle}\n {...props}\n >\n {listContent}\n {children}\n </Pressable>\n );\n }\n\n return (\n <Box style={wrapperStyle} {...props}>\n {listContent}\n {children}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAcxC,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAUtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4D5C,CAAC"}
1
+ {"version":3,"file":"ListItem.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAa1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoH5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAcxC,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAUtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA4D5C,CAAC"}
1
+ {"version":3,"file":"ListItem.d.mts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,cAAc;AAa1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoH5C,CAAC"}
@@ -4,37 +4,43 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
7
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
- import $React, { Children } from "react";
9
+ import $React from "react";
9
10
  const React = $importDefault($React);
10
- import { View } from "react-native";
11
- import { Box, BoxAlignItems, BoxFlexDirection } from "../Box/index.mjs";
12
- import { DEFAULT_LISTITEM_BOTTOMACCESSORYGAP, DEFAULT_LISTITEM_GAP, DEFAULT_LISTITEM_TOPACCESSORYGAP, DEFAULT_LISTITEM_VERTICALALIGNMENT, TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER, TESTID_LISTITEM_GAP, TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER } from "./ListItem.constants.mjs";
13
- import { ListItemVerticalAlignment } from "./ListItem.types.mjs";
14
- const VERTICAL_ALIGNMENT_MAP = {
15
- [ListItemVerticalAlignment.Top]: BoxAlignItems.Start,
16
- [ListItemVerticalAlignment.Center]: BoxAlignItems.Center,
17
- [ListItemVerticalAlignment.Bottom]: BoxAlignItems.End,
18
- };
19
- export const ListItem = ({ children, topAccessory, bottomAccessory, topAccessoryGap = DEFAULT_LISTITEM_TOPACCESSORYGAP, bottomAccessoryGap = DEFAULT_LISTITEM_BOTTOMACCESSORYGAP, gap = DEFAULT_LISTITEM_GAP, verticalAlignment = DEFAULT_LISTITEM_VERTICALALIGNMENT, twClassName, style, ...props }) => {
11
+ import { Pressable } from "react-native";
12
+ import { Box } from "../Box/index.mjs";
13
+ import { BoxRow } from "../BoxRow/index.mjs";
14
+ import { Content } from "../Content/index.mjs";
15
+ import { VERTICAL_ALIGNMENT_MAP } from "../Content/Content.constants.mjs";
16
+ export const ListItem = ({ children, isInteractive = false, twClassName, style, startAccessory, endAccessory, accessoryGap = 0, verticalAlignment, avatar, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, accessibilityRole, ...props }) => {
20
17
  const tw = useTailwind();
21
- return (<Box style={style
22
- ? [tw.style('p-4', twClassName), style]
23
- : tw.style('p-4', twClassName)} {...props}>
24
- {topAccessory && (<View testID={TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER} style={{ marginBottom: topAccessoryGap }}>
25
- {topAccessory}
26
- </View>)}
27
- <Box flexDirection={BoxFlexDirection.Row} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}>
28
- {Children.toArray(children)
29
- .filter((child) => Boolean(child))
30
- .map((child, index) => (<React.Fragment key={index}>
31
- {index > 0 && (<View style={{ width: gap }} testID={TESTID_LISTITEM_GAP} accessible={false}/>)}
32
- {child}
33
- </React.Fragment>))}
34
- </Box>
35
- {bottomAccessory && (<View testID={TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER} style={{ marginTop: bottomAccessoryGap }}>
36
- {bottomAccessory}
37
- </View>)}
18
+ const wrapperStyle = style
19
+ ? [tw.style('px-4 py-3', twClassName), style]
20
+ : tw.style('px-4 py-3', twClassName);
21
+ const getPressableStyle = ({ pressed, }) => {
22
+ const baseStyle = tw.style('w-full px-4 py-3', twClassName, pressed && 'bg-pressed');
23
+ if (!style) {
24
+ return baseStyle;
25
+ }
26
+ const userStyle = typeof style === 'function' ? style({ pressed }) : style;
27
+ return [baseStyle, userStyle];
28
+ };
29
+ const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);
30
+ const rowAlignment = VERTICAL_ALIGNMENT_MAP[verticalAlignment ?? ContentVerticalAlignment.Center];
31
+ const content = (<Content twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined} verticalAlignment={verticalAlignment} avatar={avatar} title={title} titleProps={titleProps} titleStartAccessory={titleStartAccessory} titleEndAccessory={titleEndAccessory} description={description} descriptionProps={descriptionProps} descriptionStartAccessory={descriptionStartAccessory} descriptionEndAccessory={descriptionEndAccessory} value={value} valueProps={valueProps} valueStartAccessory={valueStartAccessory} valueEndAccessory={valueEndAccessory} subvalue={subvalue} subvalueProps={subvalueProps} subvalueStartAccessory={subvalueStartAccessory} subvalueEndAccessory={subvalueEndAccessory}/>);
32
+ const listContent = hasRowAccessories ? (<BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={rowAlignment} gap={accessoryGap} twClassName="min-h-[46px] w-full">
33
+ {content}
34
+ </BoxRow>) : (content);
35
+ if (isInteractive) {
36
+ return (<Pressable accessibilityRole={accessibilityRole ?? 'button'} style={getPressableStyle} {...props}>
37
+ {listContent}
38
+ {children}
39
+ </Pressable>);
40
+ }
41
+ return (<Box style={wrapperStyle} {...props}>
42
+ {listContent}
43
+ {children}
38
44
  </Box>);
39
45
  };
40
46
  ListItem.displayName = 'ListItem';
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AACxC,OAAO,EAAkB,IAAI,EAAE,qBAAqB;AAEpD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,yBAAe;AAE9D,OAAO,EACL,mCAAmC,EACnC,oBAAoB,EACpB,gCAAgC,EAChC,kCAAkC,EAClC,wCAAwC,EACxC,mBAAmB,EACnB,qCAAqC,EACtC,iCAA6B;AAE9B,OAAO,EAAE,yBAAyB,EAAE,6BAAyB;AAE7D,MAAM,sBAAsB,GAC1B;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,EAAE,KAAK,EAAE,EAAE,CAAC,CACrB,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CACzB;cAAA,CAAC,KAAK,GAAG,CAAC,IAAI,CACZ,CAAC,IAAI,CACH,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,GAAqB,EAAE,CAAC,CACxC,MAAM,CAAC,CAAC,mBAAmB,CAAC,CAC5B,UAAU,CAAC,CAAC,KAAK,CAAC,EAClB,CACH,CACD;cAAA,CAAC,KAAK,CACR;YAAA,EAAE,KAAK,CAAC,QAAQ,CAAC,CAClB,CAAC,CACN;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,eAAe,IAAI,CAClB,CAAC,IAAI,CACH,MAAM,CAAC,CAAC,wCAAwC,CAAC,CACjD,KAAK,CAAC,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAEzC;UAAA,CAAC,eAAe,CAClB;QAAA,EAAE,IAAI,CAAC,CACR,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { Children } from 'react';\nimport { DimensionValue, View } from 'react-native';\n\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\n\nimport {\n DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n DEFAULT_LISTITEM_GAP,\n DEFAULT_LISTITEM_TOPACCESSORYGAP,\n DEFAULT_LISTITEM_VERTICALALIGNMENT,\n TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER,\n TESTID_LISTITEM_GAP,\n TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER,\n} from './ListItem.constants';\nimport type { ListItemProps } from './ListItem.types';\nimport { ListItemVerticalAlignment } from './ListItem.types';\n\nconst VERTICAL_ALIGNMENT_MAP: Record<ListItemVerticalAlignment, BoxAlignItems> =\n {\n [ListItemVerticalAlignment.Top]: BoxAlignItems.Start,\n [ListItemVerticalAlignment.Center]: BoxAlignItems.Center,\n [ListItemVerticalAlignment.Bottom]: BoxAlignItems.End,\n };\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n topAccessory,\n bottomAccessory,\n topAccessoryGap = DEFAULT_LISTITEM_TOPACCESSORYGAP,\n bottomAccessoryGap = DEFAULT_LISTITEM_BOTTOMACCESSORYGAP,\n gap = DEFAULT_LISTITEM_GAP,\n verticalAlignment = DEFAULT_LISTITEM_VERTICALALIGNMENT,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n return (\n <Box\n style={\n style\n ? [tw.style('p-4', twClassName), style]\n : tw.style('p-4', twClassName)\n }\n {...props}\n >\n {topAccessory && (\n <View\n testID={TESTID_LISTITEM_TOP_ACCESSORY_WRAPPER}\n style={{ marginBottom: topAccessoryGap }}\n >\n {topAccessory}\n </View>\n )}\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n >\n {Children.toArray(children)\n .filter((child) => Boolean(child))\n .map((child, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <View\n style={{ width: gap as DimensionValue }}\n testID={TESTID_LISTITEM_GAP}\n accessible={false}\n />\n )}\n {child}\n </React.Fragment>\n ))}\n </Box>\n {bottomAccessory && (\n <View\n testID={TESTID_LISTITEM_BOTTOM_ACCESSORY_WRAPPER}\n style={{ marginTop: bottomAccessoryGap }}\n >\n {bottomAccessory}\n </View>\n )}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
1
+ {"version":3,"file":"ListItem.mjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,wBAAwB,EAAE,gDAAgD;AACnF,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,SAAS,EAAE,q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AAG,CAAC,CAAC,YAAY,CAAC,CAClB,WAAW,CAAC,qBAAqB,CAEjC;MAAA,CAAC,OAAO,CACV;IAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CAAC;IAEF,IAAI,aAAa,EAAE;QACjB,OAAO,CACL,CAAC,SAAS,CACR,iBAAiB,CAAC,CAAC,iBAAiB,IAAI,QAAQ,CAAC,CACjD,KAAK,CAAC,CAAC,iBAAiB,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,WAAW,CACZ;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,CACL,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,CAAC,CAClC;MAAA,CAAC,WAAW,CACZ;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,WAAW,GAAG,UAAU,CAAC","sourcesContent":["import { ContentVerticalAlignment } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { Pressable } from 'react-native';\nimport type {\n PressableStateCallbackType,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Content } from '../Content';\nimport { VERTICAL_ALIGNMENT_MAP } from '../Content/Content.constants';\n\nimport type { ListItemProps } from './ListItem.types';\n\nexport const ListItem: React.FC<ListItemProps> = ({\n children,\n isInteractive = false,\n twClassName,\n style,\n startAccessory,\n endAccessory,\n accessoryGap = 0,\n verticalAlignment,\n avatar,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n accessibilityRole,\n ...props\n}) => {\n const tw = useTailwind();\n\n const wrapperStyle = style\n ? [tw.style('px-4 py-3', twClassName), style]\n : tw.style('px-4 py-3', twClassName);\n\n const getPressableStyle = ({\n pressed,\n }: PressableStateCallbackType): StyleProp<ViewStyle> => {\n const baseStyle = tw.style(\n 'w-full px-4 py-3',\n twClassName,\n pressed && 'bg-pressed',\n );\n\n if (!style) {\n return baseStyle;\n }\n\n const userStyle = typeof style === 'function' ? style({ pressed }) : style;\n\n return [baseStyle, userStyle];\n };\n\n const hasRowAccessories = Boolean(startAccessory) || Boolean(endAccessory);\n const rowAlignment =\n VERTICAL_ALIGNMENT_MAP[\n verticalAlignment ?? ContentVerticalAlignment.Center\n ];\n\n const content = (\n <Content\n twClassName={hasRowAccessories ? 'flex-1 min-w-0' : undefined}\n verticalAlignment={verticalAlignment}\n avatar={avatar}\n title={title}\n titleProps={titleProps}\n titleStartAccessory={titleStartAccessory}\n titleEndAccessory={titleEndAccessory}\n description={description}\n descriptionProps={descriptionProps}\n descriptionStartAccessory={descriptionStartAccessory}\n descriptionEndAccessory={descriptionEndAccessory}\n value={value}\n valueProps={valueProps}\n valueStartAccessory={valueStartAccessory}\n valueEndAccessory={valueEndAccessory}\n subvalue={subvalue}\n subvalueProps={subvalueProps}\n subvalueStartAccessory={subvalueStartAccessory}\n subvalueEndAccessory={subvalueEndAccessory}\n />\n );\n\n const listContent = hasRowAccessories ? (\n <BoxRow\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n alignItems={rowAlignment}\n gap={accessoryGap}\n twClassName=\"min-h-[46px] w-full\"\n >\n {content}\n </BoxRow>\n ) : (\n content\n );\n\n if (isInteractive) {\n return (\n <Pressable\n accessibilityRole={accessibilityRole ?? 'button'}\n style={getPressableStyle}\n {...props}\n >\n {listContent}\n {children}\n </Pressable>\n );\n }\n\n return (\n <Box style={wrapperStyle} {...props}>\n {listContent}\n {children}\n </Box>\n );\n};\n\nListItem.displayName = 'ListItem';\n"]}
@@ -1,12 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListItemVerticalAlignment = void 0;
4
- /**
5
- * Vertical alignment options for children inside the ListItem row.
6
- */
7
- exports.ListItemVerticalAlignment = {
8
- Top: 'top',
9
- Center: 'center',
10
- Bottom: 'bottom',
11
- };
12
3
  //# sourceMappingURL=ListItem.types.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.types.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":";;;AAGA;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACvC,GAAG,EAAE,KAAK;IACV,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Vertical alignment options for children inside the ListItem row.\n */\nexport const ListItemVerticalAlignment = {\n Top: 'top',\n Center: 'center',\n Bottom: 'bottom',\n} as const;\n\nexport type ListItemVerticalAlignment =\n (typeof ListItemVerticalAlignment)[keyof typeof ListItemVerticalAlignment];\n\n/**\n * ListItem component props.\n *\n * Extends `ViewProps` so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type ListItemProps = {\n /**\n * Content to display inside the list item row.\n */\n children?: ReactNode;\n /**\n * Optional content displayed above the list item row.\n */\n topAccessory?: ReactNode;\n /**\n * Optional content displayed below the list item row.\n */\n bottomAccessory?: ReactNode;\n /**\n * Gap in pixels between the topAccessory and the row.\n *\n * @default 0\n */\n topAccessoryGap?: number;\n /**\n * Gap in pixels between the row and the bottomAccessory.\n *\n * @default 0\n */\n bottomAccessoryGap?: number;\n /**\n * Horizontal spacing between each child inside the row.\n *\n * @default 16\n */\n gap?: number | string;\n /**\n * Vertical alignment of children inside the row.\n *\n * @default ListItemVerticalAlignment.Center\n */\n verticalAlignment?: ListItemVerticalAlignment;\n /**\n * Optional Tailwind class names to override default styles on the root element.\n */\n twClassName?: string;\n} & ViewProps;\n"]}
1
+ {"version":3,"file":"ListItem.types.cjs","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ListItemPropsShared } from '@metamask-previews/design-system-shared';\nimport type { PressableProps } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { ContentProps } from '../Content/Content.types';\n\ntype ListItemPropsBase = ListItemPropsShared & ContentProps;\n\n/**\n * ListItem component props.\n *\n * Wraps {@link Content} in a padded root (`px-4 py-3`) with optional row shell\n * accessories. When `isInteractive` is `false` (default), the root is a `Box`; when `true`,\n * the root is a `Pressable`.\n */\nexport type ListItemProps =\n | (ListItemPropsBase & { isInteractive?: false } & Omit<BoxProps, 'children'>)\n | (ListItemPropsBase & {\n isInteractive: true;\n } & Omit<PressableProps, 'children'>);\n"]}
@@ -1,60 +1,19 @@
1
- import type { ReactNode } from "react";
2
- import type { ViewProps } from "react-native";
3
- /**
4
- * Vertical alignment options for children inside the ListItem row.
5
- */
6
- export declare const ListItemVerticalAlignment: {
7
- readonly Top: "top";
8
- readonly Center: "center";
9
- readonly Bottom: "bottom";
10
- };
11
- export type ListItemVerticalAlignment = (typeof ListItemVerticalAlignment)[keyof typeof ListItemVerticalAlignment];
1
+ import type { ListItemPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { PressableProps } from "react-native";
3
+ import type { BoxProps } from "../Box/Box.types.cjs";
4
+ import type { ContentProps } from "../Content/Content.types.cjs";
5
+ type ListItemPropsBase = ListItemPropsShared & ContentProps;
12
6
  /**
13
7
  * ListItem component props.
14
8
  *
15
- * Extends `ViewProps` so the root View inherits standard React Native
16
- * props such as `testID` and `accessibilityLabel`.
9
+ * Wraps {@link Content} in a padded root (`px-4 py-3`) with optional row shell
10
+ * accessories. When `isInteractive` is `false` (default), the root is a `Box`; when `true`,
11
+ * the root is a `Pressable`.
17
12
  */
18
- export type ListItemProps = {
19
- /**
20
- * Content to display inside the list item row.
21
- */
22
- children?: ReactNode;
23
- /**
24
- * Optional content displayed above the list item row.
25
- */
26
- topAccessory?: ReactNode;
27
- /**
28
- * Optional content displayed below the list item row.
29
- */
30
- bottomAccessory?: ReactNode;
31
- /**
32
- * Gap in pixels between the topAccessory and the row.
33
- *
34
- * @default 0
35
- */
36
- topAccessoryGap?: number;
37
- /**
38
- * Gap in pixels between the row and the bottomAccessory.
39
- *
40
- * @default 0
41
- */
42
- bottomAccessoryGap?: number;
43
- /**
44
- * Horizontal spacing between each child inside the row.
45
- *
46
- * @default 16
47
- */
48
- gap?: number | string;
49
- /**
50
- * Vertical alignment of children inside the row.
51
- *
52
- * @default ListItemVerticalAlignment.Center
53
- */
54
- verticalAlignment?: ListItemVerticalAlignment;
55
- /**
56
- * Optional Tailwind class names to override default styles on the root element.
57
- */
58
- twClassName?: string;
59
- } & ViewProps;
13
+ export type ListItemProps = (ListItemPropsBase & {
14
+ isInteractive?: false;
15
+ } & Omit<BoxProps, 'children'>) | (ListItemPropsBase & {
16
+ isInteractive: true;
17
+ } & Omit<PressableProps, 'children'>);
18
+ export {};
60
19
  //# sourceMappingURL=ListItem.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.types.d.cts","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAE9C;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAC;AAEX,MAAM,MAAM,yBAAyB,GACnC,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,OAAO,yBAAyB,CAAC,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB;;OA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