@metamask-previews/design-system-react-native 0.15.0-preview.a73a010 → 0.18.0-preview.9d477a9

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 (407) hide show
  1. package/CHANGELOG.md +37 -1
  2. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +1 -2
  3. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  4. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  5. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  6. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +1 -2
  7. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  8. package/dist/components/AvatarFavicon/AvatarFavicon.types.cjs.map +1 -1
  9. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.cts +5 -7
  10. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.cts.map +1 -1
  11. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.mts +5 -7
  12. package/dist/components/AvatarFavicon/AvatarFavicon.types.d.mts.map +1 -1
  13. package/dist/components/AvatarFavicon/AvatarFavicon.types.mjs.map +1 -1
  14. package/dist/components/AvatarFavicon/index.cjs +2 -2
  15. package/dist/components/AvatarFavicon/index.cjs.map +1 -1
  16. package/dist/components/AvatarFavicon/index.d.cts +1 -1
  17. package/dist/components/AvatarFavicon/index.d.cts.map +1 -1
  18. package/dist/components/AvatarFavicon/index.d.mts +1 -1
  19. package/dist/components/AvatarFavicon/index.d.mts.map +1 -1
  20. package/dist/components/AvatarFavicon/index.mjs +1 -1
  21. package/dist/components/AvatarFavicon/index.mjs.map +1 -1
  22. package/dist/components/BadgeNetwork/BadgeNetwork.types.cjs.map +1 -1
  23. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts +6 -15
  24. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts.map +1 -1
  25. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts +6 -15
  26. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts.map +1 -1
  27. package/dist/components/BadgeNetwork/BadgeNetwork.types.mjs.map +1 -1
  28. package/dist/components/BannerAlert/BannerAlert.cjs +1 -2
  29. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
  30. package/dist/components/BannerAlert/BannerAlert.constants.cjs +16 -16
  31. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  32. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
  33. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  34. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
  35. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  36. package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
  37. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  38. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
  39. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
  40. package/dist/components/BannerAlert/BannerAlert.mjs +1 -2
  41. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
  42. package/dist/components/BannerBase/BannerBase.cjs +5 -5
  43. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  44. package/dist/components/BannerBase/BannerBase.mjs +2 -2
  45. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  46. package/dist/components/Box/Box.constants.cjs.map +1 -1
  47. package/dist/components/Box/Box.constants.d.cts +1 -1
  48. package/dist/components/Box/Box.constants.d.cts.map +1 -1
  49. package/dist/components/Box/Box.constants.d.mts +1 -1
  50. package/dist/components/Box/Box.constants.d.mts.map +1 -1
  51. package/dist/components/Box/Box.constants.mjs.map +1 -1
  52. package/dist/components/Box/Box.types.cjs.map +1 -1
  53. package/dist/components/Box/Box.types.d.cts +107 -3
  54. package/dist/components/Box/Box.types.d.cts.map +1 -1
  55. package/dist/components/Box/Box.types.d.mts +107 -3
  56. package/dist/components/Box/Box.types.d.mts.map +1 -1
  57. package/dist/components/Box/Box.types.mjs.map +1 -1
  58. package/dist/components/Box/index.cjs +7 -7
  59. package/dist/components/Box/index.cjs.map +1 -1
  60. package/dist/components/Box/index.d.cts +2 -1
  61. package/dist/components/Box/index.d.cts.map +1 -1
  62. package/dist/components/Box/index.d.mts +2 -1
  63. package/dist/components/Box/index.d.mts.map +1 -1
  64. package/dist/components/Box/index.mjs +1 -1
  65. package/dist/components/Box/index.mjs.map +1 -1
  66. package/dist/components/{BoxVertical/BoxVertical.cjs → BoxColumn/BoxColumn.cjs} +6 -6
  67. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -0
  68. package/dist/components/BoxColumn/BoxColumn.d.cts +7 -0
  69. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -0
  70. package/dist/components/BoxColumn/BoxColumn.d.mts +7 -0
  71. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -0
  72. package/dist/components/{BoxVertical/BoxVertical.mjs → BoxColumn/BoxColumn.mjs} +4 -4
  73. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -0
  74. package/dist/components/{BoxVertical/BoxVertical.types.cjs → BoxColumn/BoxColumn.types.cjs} +1 -1
  75. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -0
  76. package/dist/components/BoxColumn/BoxColumn.types.d.cts +13 -0
  77. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -0
  78. package/dist/components/BoxColumn/BoxColumn.types.d.mts +13 -0
  79. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -0
  80. package/dist/components/BoxColumn/BoxColumn.types.mjs +2 -0
  81. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -0
  82. package/dist/components/BoxColumn/index.cjs +6 -0
  83. package/dist/components/BoxColumn/index.cjs.map +1 -0
  84. package/dist/components/BoxColumn/index.d.cts +3 -0
  85. package/dist/components/BoxColumn/index.d.cts.map +1 -0
  86. package/dist/components/BoxColumn/index.d.mts +3 -0
  87. package/dist/components/BoxColumn/index.d.mts.map +1 -0
  88. package/dist/components/BoxColumn/index.mjs +2 -0
  89. package/dist/components/BoxColumn/index.mjs.map +1 -0
  90. package/dist/components/{BoxHorizontal/BoxHorizontal.cjs → BoxRow/BoxRow.cjs} +6 -6
  91. package/dist/components/BoxRow/BoxRow.cjs.map +1 -0
  92. package/dist/components/BoxRow/BoxRow.d.cts +7 -0
  93. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -0
  94. package/dist/components/BoxRow/BoxRow.d.mts +7 -0
  95. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -0
  96. package/dist/components/{BoxHorizontal/BoxHorizontal.mjs → BoxRow/BoxRow.mjs} +4 -4
  97. package/dist/components/BoxRow/BoxRow.mjs.map +1 -0
  98. package/dist/components/{BoxHorizontal/BoxHorizontal.types.cjs → BoxRow/BoxRow.types.cjs} +1 -1
  99. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -0
  100. package/dist/components/BoxRow/BoxRow.types.d.cts +13 -0
  101. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -0
  102. package/dist/components/BoxRow/BoxRow.types.d.mts +13 -0
  103. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -0
  104. package/dist/components/BoxRow/BoxRow.types.mjs +2 -0
  105. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -0
  106. package/dist/components/BoxRow/index.cjs +6 -0
  107. package/dist/components/BoxRow/index.cjs.map +1 -0
  108. package/dist/components/BoxRow/index.d.cts +3 -0
  109. package/dist/components/BoxRow/index.d.cts.map +1 -0
  110. package/dist/components/BoxRow/index.d.mts +3 -0
  111. package/dist/components/BoxRow/index.d.mts.map +1 -0
  112. package/dist/components/BoxRow/index.mjs +2 -0
  113. package/dist/components/BoxRow/index.mjs.map +1 -0
  114. package/dist/components/Checkbox/Checkbox.d.cts +1 -6
  115. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  116. package/dist/components/Checkbox/Checkbox.d.mts +1 -6
  117. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  118. package/dist/components/Checkbox/Checkbox.types.cjs.map +1 -1
  119. package/dist/components/Checkbox/Checkbox.types.d.cts +2 -28
  120. package/dist/components/Checkbox/Checkbox.types.d.cts.map +1 -1
  121. package/dist/components/Checkbox/Checkbox.types.d.mts +2 -28
  122. package/dist/components/Checkbox/Checkbox.types.d.mts.map +1 -1
  123. package/dist/components/Checkbox/Checkbox.types.mjs.map +1 -1
  124. package/dist/components/HeaderRoot/HeaderRoot.cjs +3 -3
  125. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  126. package/dist/components/HeaderRoot/HeaderRoot.mjs +3 -3
  127. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  128. package/dist/components/HeaderSearch/HeaderSearch.cjs +80 -0
  129. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -0
  130. package/dist/components/HeaderSearch/HeaderSearch.d.cts +37 -0
  131. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -0
  132. package/dist/components/HeaderSearch/HeaderSearch.d.mts +37 -0
  133. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -0
  134. package/dist/components/HeaderSearch/HeaderSearch.mjs +80 -0
  135. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -0
  136. package/dist/components/HeaderSearch/HeaderSearch.types.cjs +3 -0
  137. package/dist/components/HeaderSearch/HeaderSearch.types.cjs.map +1 -0
  138. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts +33 -0
  139. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts.map +1 -0
  140. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts +33 -0
  141. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts.map +1 -0
  142. package/dist/components/HeaderSearch/HeaderSearch.types.mjs +2 -0
  143. package/dist/components/HeaderSearch/HeaderSearch.types.mjs.map +1 -0
  144. package/dist/components/HeaderSearch/index.cjs +8 -0
  145. package/dist/components/HeaderSearch/index.cjs.map +1 -0
  146. package/dist/components/HeaderSearch/index.d.cts +4 -0
  147. package/dist/components/HeaderSearch/index.d.cts.map +1 -0
  148. package/dist/components/HeaderSearch/index.d.mts +4 -0
  149. package/dist/components/HeaderSearch/index.d.mts.map +1 -0
  150. package/dist/components/HeaderSearch/index.mjs +3 -0
  151. package/dist/components/HeaderSearch/index.mjs.map +1 -0
  152. package/dist/components/HeaderStandard/HeaderStandard.cjs +3 -3
  153. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  154. package/dist/components/HeaderStandard/HeaderStandard.mjs +3 -3
  155. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  156. package/dist/components/Icon/Icon.assets.cjs +284 -281
  157. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  158. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  159. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  160. package/dist/components/Icon/Icon.assets.mjs +284 -281
  161. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  162. package/dist/components/Icon/Icon.cjs +2 -2
  163. package/dist/components/Icon/Icon.cjs.map +1 -1
  164. package/dist/components/Icon/Icon.constants.cjs +6 -6
  165. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  166. package/dist/components/Icon/Icon.constants.d.cts +1 -1
  167. package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
  168. package/dist/components/Icon/Icon.constants.d.mts +1 -1
  169. package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
  170. package/dist/components/Icon/Icon.constants.mjs +1 -1
  171. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  172. package/dist/components/Icon/Icon.d.cts.map +1 -1
  173. package/dist/components/Icon/Icon.d.mts.map +1 -1
  174. package/dist/components/Icon/Icon.mjs +1 -1
  175. package/dist/components/Icon/Icon.mjs.map +1 -1
  176. package/dist/components/Icon/Icon.types.cjs.map +1 -1
  177. package/dist/components/Icon/Icon.types.d.cts +2 -19
  178. package/dist/components/Icon/Icon.types.d.cts.map +1 -1
  179. package/dist/components/Icon/Icon.types.d.mts +2 -19
  180. package/dist/components/Icon/Icon.types.d.mts.map +1 -1
  181. package/dist/components/Icon/Icon.types.mjs.map +1 -1
  182. package/dist/components/Icon/assets/after-hours.svg +1 -1
  183. package/dist/components/Icon/assets/pop-up.svg +1 -0
  184. package/dist/components/Icon/assets/side-panel.svg +1 -0
  185. package/dist/components/Icon/index.cjs +4 -4
  186. package/dist/components/Icon/index.cjs.map +1 -1
  187. package/dist/components/Icon/index.d.cts +1 -1
  188. package/dist/components/Icon/index.d.cts.map +1 -1
  189. package/dist/components/Icon/index.d.mts +1 -1
  190. package/dist/components/Icon/index.d.mts.map +1 -1
  191. package/dist/components/Icon/index.mjs +1 -1
  192. package/dist/components/Icon/index.mjs.map +1 -1
  193. package/dist/components/IconAlert/IconAlert.cjs +16 -0
  194. package/dist/components/IconAlert/IconAlert.cjs.map +1 -0
  195. package/dist/components/IconAlert/IconAlert.constants.cjs +23 -0
  196. package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -0
  197. package/dist/components/IconAlert/IconAlert.constants.d.cts +6 -0
  198. package/dist/components/IconAlert/IconAlert.constants.d.cts.map +1 -0
  199. package/dist/components/IconAlert/IconAlert.constants.d.mts +6 -0
  200. package/dist/components/IconAlert/IconAlert.constants.d.mts.map +1 -0
  201. package/dist/components/IconAlert/IconAlert.constants.mjs +20 -0
  202. package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -0
  203. package/dist/components/IconAlert/IconAlert.d.cts +7 -0
  204. package/dist/components/IconAlert/IconAlert.d.cts.map +1 -0
  205. package/dist/components/IconAlert/IconAlert.d.mts +7 -0
  206. package/dist/components/IconAlert/IconAlert.d.mts.map +1 -0
  207. package/dist/components/IconAlert/IconAlert.mjs +16 -0
  208. package/dist/components/IconAlert/IconAlert.mjs.map +1 -0
  209. package/dist/components/IconAlert/IconAlert.types.cjs +3 -0
  210. package/dist/components/IconAlert/IconAlert.types.cjs.map +1 -0
  211. package/dist/components/IconAlert/IconAlert.types.d.cts +4 -0
  212. package/dist/components/IconAlert/IconAlert.types.d.cts.map +1 -0
  213. package/dist/components/IconAlert/IconAlert.types.d.mts +4 -0
  214. package/dist/components/IconAlert/IconAlert.types.d.mts.map +1 -0
  215. package/dist/components/IconAlert/IconAlert.types.mjs +2 -0
  216. package/dist/components/IconAlert/IconAlert.types.mjs.map +1 -0
  217. package/dist/components/IconAlert/index.cjs +8 -0
  218. package/dist/components/IconAlert/index.cjs.map +1 -0
  219. package/dist/components/IconAlert/index.d.cts +4 -0
  220. package/dist/components/IconAlert/index.d.cts.map +1 -0
  221. package/dist/components/IconAlert/index.d.mts +4 -0
  222. package/dist/components/IconAlert/index.d.mts.map +1 -0
  223. package/dist/components/IconAlert/index.mjs +3 -0
  224. package/dist/components/IconAlert/index.mjs.map +1 -0
  225. package/dist/components/Input/Input.cjs +4 -4
  226. package/dist/components/Input/Input.cjs.map +1 -1
  227. package/dist/components/Input/Input.constants.cjs +15 -15
  228. package/dist/components/Input/Input.constants.cjs.map +1 -1
  229. package/dist/components/Input/Input.constants.d.cts +1 -1
  230. package/dist/components/Input/Input.constants.d.cts.map +1 -1
  231. package/dist/components/Input/Input.constants.d.mts +1 -1
  232. package/dist/components/Input/Input.constants.d.mts.map +1 -1
  233. package/dist/components/Input/Input.constants.mjs +1 -1
  234. package/dist/components/Input/Input.constants.mjs.map +1 -1
  235. package/dist/components/Input/Input.d.cts +1 -1
  236. package/dist/components/Input/Input.d.cts.map +1 -1
  237. package/dist/components/Input/Input.d.mts +1 -1
  238. package/dist/components/Input/Input.d.mts.map +1 -1
  239. package/dist/components/Input/Input.mjs +3 -3
  240. package/dist/components/Input/Input.mjs.map +1 -1
  241. package/dist/components/Input/Input.types.cjs.map +1 -1
  242. package/dist/components/Input/Input.types.d.cts +1 -1
  243. package/dist/components/Input/Input.types.d.cts.map +1 -1
  244. package/dist/components/Input/Input.types.d.mts +1 -1
  245. package/dist/components/Input/Input.types.d.mts.map +1 -1
  246. package/dist/components/Input/Input.types.mjs.map +1 -1
  247. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +17 -16
  248. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  249. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  250. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  251. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +10 -9
  252. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  253. package/dist/components/KeyValueRow/KeyValueRow.cjs +43 -64
  254. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  255. package/dist/components/KeyValueRow/KeyValueRow.d.cts +3 -20
  256. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  257. package/dist/components/KeyValueRow/KeyValueRow.d.mts +3 -20
  258. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  259. package/dist/components/KeyValueRow/KeyValueRow.mjs +42 -63
  260. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  261. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +0 -26
  262. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -1
  263. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +14 -174
  264. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  265. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +14 -174
  266. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  267. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +1 -25
  268. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -1
  269. package/dist/components/KeyValueRow/index.cjs +3 -7
  270. package/dist/components/KeyValueRow/index.cjs.map +1 -1
  271. package/dist/components/KeyValueRow/index.d.cts +3 -2
  272. package/dist/components/KeyValueRow/index.d.cts.map +1 -1
  273. package/dist/components/KeyValueRow/index.d.mts +3 -2
  274. package/dist/components/KeyValueRow/index.d.mts.map +1 -1
  275. package/dist/components/KeyValueRow/index.mjs +2 -2
  276. package/dist/components/KeyValueRow/index.mjs.map +1 -1
  277. package/dist/components/Text/Text.cjs +5 -5
  278. package/dist/components/Text/Text.cjs.map +1 -1
  279. package/dist/components/Text/Text.constants.cjs +20 -25
  280. package/dist/components/Text/Text.constants.cjs.map +1 -1
  281. package/dist/components/Text/Text.constants.d.cts +2 -2
  282. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  283. package/dist/components/Text/Text.constants.d.mts +2 -2
  284. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  285. package/dist/components/Text/Text.constants.mjs +16 -21
  286. package/dist/components/Text/Text.constants.mjs.map +1 -1
  287. package/dist/components/Text/Text.d.cts.map +1 -1
  288. package/dist/components/Text/Text.d.mts.map +1 -1
  289. package/dist/components/Text/Text.mjs +3 -3
  290. package/dist/components/Text/Text.mjs.map +1 -1
  291. package/dist/components/Text/Text.types.cjs.map +1 -1
  292. package/dist/components/Text/Text.types.d.cts +3 -35
  293. package/dist/components/Text/Text.types.d.cts.map +1 -1
  294. package/dist/components/Text/Text.types.d.mts +3 -35
  295. package/dist/components/Text/Text.types.d.mts.map +1 -1
  296. package/dist/components/Text/Text.types.mjs.map +1 -1
  297. package/dist/components/Text/index.cjs +7 -7
  298. package/dist/components/Text/index.cjs.map +1 -1
  299. package/dist/components/Text/index.d.cts +1 -1
  300. package/dist/components/Text/index.d.cts.map +1 -1
  301. package/dist/components/Text/index.d.mts +1 -1
  302. package/dist/components/Text/index.d.mts.map +1 -1
  303. package/dist/components/Text/index.mjs +1 -1
  304. package/dist/components/Text/index.mjs.map +1 -1
  305. package/dist/components/TextButton/TextButton.cjs +3 -3
  306. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  307. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  308. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  309. package/dist/components/TextButton/TextButton.mjs +1 -1
  310. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  311. package/dist/components/TextField/TextField.cjs +2 -2
  312. package/dist/components/TextField/TextField.cjs.map +1 -1
  313. package/dist/components/TextField/TextField.d.cts.map +1 -1
  314. package/dist/components/TextField/TextField.d.mts.map +1 -1
  315. package/dist/components/TextField/TextField.mjs +1 -1
  316. package/dist/components/TextField/TextField.mjs.map +1 -1
  317. package/dist/components/index.cjs +16 -7
  318. package/dist/components/index.cjs.map +1 -1
  319. package/dist/components/index.d.cts +10 -4
  320. package/dist/components/index.d.cts.map +1 -1
  321. package/dist/components/index.d.mts +10 -4
  322. package/dist/components/index.d.mts.map +1 -1
  323. package/dist/components/index.mjs +5 -2
  324. package/dist/components/index.mjs.map +1 -1
  325. package/dist/types/index.cjs +177 -467
  326. package/dist/types/index.cjs.map +1 -1
  327. package/dist/types/index.d.cts +174 -443
  328. package/dist/types/index.d.cts.map +1 -1
  329. package/dist/types/index.d.mts +174 -443
  330. package/dist/types/index.d.mts.map +1 -1
  331. package/dist/types/index.mjs +172 -461
  332. package/dist/types/index.mjs.map +1 -1
  333. package/package.json +6 -7
  334. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +0 -1
  335. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +0 -7
  336. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +0 -1
  337. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +0 -7
  338. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +0 -1
  339. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +0 -1
  340. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +0 -1
  341. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +0 -13
  342. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +0 -1
  343. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +0 -13
  344. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +0 -1
  345. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +0 -2
  346. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +0 -1
  347. package/dist/components/BoxHorizontal/index.cjs +0 -6
  348. package/dist/components/BoxHorizontal/index.cjs.map +0 -1
  349. package/dist/components/BoxHorizontal/index.d.cts +0 -3
  350. package/dist/components/BoxHorizontal/index.d.cts.map +0 -1
  351. package/dist/components/BoxHorizontal/index.d.mts +0 -3
  352. package/dist/components/BoxHorizontal/index.d.mts.map +0 -1
  353. package/dist/components/BoxHorizontal/index.mjs +0 -2
  354. package/dist/components/BoxHorizontal/index.mjs.map +0 -1
  355. package/dist/components/BoxVertical/BoxVertical.cjs.map +0 -1
  356. package/dist/components/BoxVertical/BoxVertical.d.cts +0 -7
  357. package/dist/components/BoxVertical/BoxVertical.d.cts.map +0 -1
  358. package/dist/components/BoxVertical/BoxVertical.d.mts +0 -7
  359. package/dist/components/BoxVertical/BoxVertical.d.mts.map +0 -1
  360. package/dist/components/BoxVertical/BoxVertical.mjs.map +0 -1
  361. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +0 -1
  362. package/dist/components/BoxVertical/BoxVertical.types.d.cts +0 -13
  363. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +0 -1
  364. package/dist/components/BoxVertical/BoxVertical.types.d.mts +0 -13
  365. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +0 -1
  366. package/dist/components/BoxVertical/BoxVertical.types.mjs +0 -2
  367. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +0 -1
  368. package/dist/components/BoxVertical/index.cjs +0 -6
  369. package/dist/components/BoxVertical/index.cjs.map +0 -1
  370. package/dist/components/BoxVertical/index.d.cts +0 -3
  371. package/dist/components/BoxVertical/index.d.cts.map +0 -1
  372. package/dist/components/BoxVertical/index.d.mts +0 -3
  373. package/dist/components/BoxVertical/index.d.mts.map +0 -1
  374. package/dist/components/BoxVertical/index.mjs +0 -2
  375. package/dist/components/BoxVertical/index.mjs.map +0 -1
  376. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +0 -34
  377. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +0 -1
  378. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +0 -13
  379. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +0 -1
  380. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +0 -13
  381. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +0 -1
  382. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +0 -34
  383. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +0 -1
  384. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +0 -40
  385. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +0 -1
  386. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +0 -24
  387. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +0 -1
  388. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +0 -24
  389. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +0 -1
  390. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +0 -40
  391. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +0 -1
  392. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +0 -6
  393. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +0 -1
  394. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +0 -3
  395. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +0 -1
  396. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +0 -3
  397. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +0 -1
  398. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +0 -2
  399. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +0 -1
  400. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +0 -30
  401. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +0 -1
  402. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +0 -16
  403. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +0 -1
  404. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +0 -16
  405. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +0 -1
  406. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +0 -30
  407. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderRoot.mjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,qBAAqB,EAAE,gDAAgD;AAChF,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AAEnE,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,yBAAe;AAC9D,OAAO,EAAE,aAAa,EAAE,mCAAyB;AACjD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAKtC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAAG,KAAK,EACxB,KAAK,EACL,MAAM,EACN,WAAW,EACX,GAAG,SAAS,EACI,EAAE,EAAE;IACpB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IAEnC,MAAM,qBAAqB,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.\nimport { isReactNodeRenderable } from '@metamask-previews/design-system-shared';\nimport React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\nimport { BoxHorizontal } from '../BoxHorizontal';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderRootProps } from './HeaderRoot.types';\n\nexport const HeaderRoot = ({\n children,\n title,\n titleProps,\n titleAccessory,\n endAccessory,\n endButtonIconProps,\n includesTopInset = false,\n style,\n testID,\n twClassName,\n ...viewProps\n}: HeaderRootProps) => {\n const insets = useSafeAreaInsets();\n\n const hasRenderableChildren = isReactNodeRenderable(children);\n\n const hasTitleContent =\n title !== false &&\n (isReactNodeRenderable(title) || isReactNodeRenderable(titleAccessory));\n\n const shouldRenderTitleRow = !hasRenderableChildren && hasTitleContent;\n\n const endSectionContent = (() => {\n if (endAccessory) {\n return endAccessory;\n }\n if (endButtonIconProps && endButtonIconProps.length > 0) {\n const reversedProps = endButtonIconProps\n .map((props, originalIndex) => ({ props, originalIndex }))\n .reverse();\n return reversedProps.map(({ props, originalIndex }) => (\n <ButtonIcon\n key={`end-button-icon-${originalIndex}`}\n size={ButtonIconSize.Md}\n {...props}\n />\n ));\n }\n return null;\n })();\n\n const hasEndSection = Boolean(endSectionContent);\n\n const renderLeftSection = () => {\n if (hasRenderableChildren) {\n return children;\n }\n if (shouldRenderTitleRow) {\n const titleNode =\n isReactNodeRenderable(title) && title !== '' ? title : null;\n return (\n <BoxHorizontal\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n ...titleProps,\n }}\n >\n {titleNode}\n </BoxHorizontal>\n );\n }\n return null;\n };\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n paddingLeft={4}\n paddingRight={2}\n twClassName={`min-h-14 ${twClassName ?? ''}`.trim()}\n style={[includesTopInset && { marginTop: insets.top }, style]}\n testID={testID}\n {...viewProps}\n >\n <Box alignItems={BoxAlignItems.Start} style={{ flex: 1 }}>\n {renderLeftSection()}\n </Box>\n {hasEndSection ? (\n <Box flexDirection={BoxFlexDirection.Row} gap={2}>\n {endSectionContent}\n </Box>\n ) : null}\n </Box>\n );\n};\n\nHeaderRoot.displayName = 'HeaderRoot';\n"]}
1
+ {"version":3,"file":"HeaderRoot.mjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,qBAAqB,EAAE,gDAAgD;AAChF,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AAEnE,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,gBAAgB,EAAE,yBAAe;AAC9D,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAKtC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,GAAG,KAAK,EACxB,KAAK,EACL,MAAM,EACN,WAAW,EACX,GAAG,SAAS,EACI,EAAE,EAAE;IACpB,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IAEnC,MAAM,qBAAqB,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IAE9D,MAAM,eAAe,GACnB,KAAK,KAAK,KAAK;QACf,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,qBAAqB,CAAC,cAAc,CAAC,CAAC,CAAC;IAE1E,MAAM,oBAAoB,GAAG,CAAC,qBAAqB,IAAI,eAAe,CAAC;IAEvE,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE;Q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AC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,CAAC,CAAC,CACf,YAAY,CAAC,CAAC,CAAC,CAAC,CAChB,WAAW,CAAC,CAAC,YAAY,WAAW,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,CACpD,KAAK,CAAC,CAAC,CAAC,gBAAgB,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC,CAC9D,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CACvD;QAAA,CAAC,iBAAiB,EAAE,CACtB;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/C;UAAA,CAAC,iBAAiB,CACpB;QAAA,EAAE,GAAG,CAAC,CACP,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["// Third party dependencies.\nimport { isReactNodeRenderable } from '@metamask-previews/design-system-shared';\nimport React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\n// External dependencies.\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderRootProps } from './HeaderRoot.types';\n\nexport const HeaderRoot = ({\n children,\n title,\n titleProps,\n titleAccessory,\n endAccessory,\n endButtonIconProps,\n includesTopInset = false,\n style,\n testID,\n twClassName,\n ...viewProps\n}: HeaderRootProps) => {\n const insets = useSafeAreaInsets();\n\n const hasRenderableChildren = isReactNodeRenderable(children);\n\n const hasTitleContent =\n title !== false &&\n (isReactNodeRenderable(title) || isReactNodeRenderable(titleAccessory));\n\n const shouldRenderTitleRow = !hasRenderableChildren && hasTitleContent;\n\n const endSectionContent = (() => {\n if (endAccessory) {\n return endAccessory;\n }\n if (endButtonIconProps && endButtonIconProps.length > 0) {\n const reversedProps = endButtonIconProps\n .map((props, originalIndex) => ({ props, originalIndex }))\n .reverse();\n return reversedProps.map(({ props, originalIndex }) => (\n <ButtonIcon\n key={`end-button-icon-${originalIndex}`}\n size={ButtonIconSize.Md}\n {...props}\n />\n ));\n }\n return null;\n })();\n\n const hasEndSection = Boolean(endSectionContent);\n\n const renderLeftSection = () => {\n if (hasRenderableChildren) {\n return children;\n }\n if (shouldRenderTitleRow) {\n const titleNode =\n isReactNodeRenderable(title) && title !== '' ? title : null;\n return (\n <BoxRow\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingLg,\n ...titleProps,\n }}\n >\n {titleNode}\n </BoxRow>\n );\n }\n return null;\n };\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n paddingLeft={4}\n paddingRight={2}\n twClassName={`min-h-14 ${twClassName ?? ''}`.trim()}\n style={[includesTopInset && { marginTop: insets.top }, style]}\n testID={testID}\n {...viewProps}\n >\n <Box alignItems={BoxAlignItems.Start} style={{ flex: 1 }}>\n {renderLeftSection()}\n </Box>\n {hasEndSection ? (\n <Box flexDirection={BoxFlexDirection.Row} gap={2}>\n {endSectionContent}\n </Box>\n ) : null}\n </Box>\n );\n};\n\nHeaderRoot.displayName = 'HeaderRoot';\n"]}
@@ -0,0 +1,80 @@
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.HeaderSearch = void 0;
7
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
8
+ const react_1 = __importDefault(require("react"));
9
+ const Box_1 = require("../Box/index.cjs");
10
+ const Button_1 = require("../Button/index.cjs");
11
+ const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
12
+ const Icon_1 = require("../Icon/index.cjs");
13
+ const TextFieldSearch_1 = require("../TextFieldSearch/index.cjs");
14
+ const CANCEL_LABEL = 'Cancel';
15
+ /**
16
+ * HeaderSearch is a header component that combines a search field
17
+ * with either a back button (screen variant) or cancel button (inline variant).
18
+ *
19
+ * @example
20
+ * // Screen variant with back button
21
+ * <HeaderSearch
22
+ * variant={HeaderSearchVariant.Screen}
23
+ * onPressBackButton={handleBack}
24
+ * textFieldSearchProps={{
25
+ * value: searchText,
26
+ * onChangeText: setSearchText,
27
+ * onPressClearButton: () => setSearchText(''),
28
+ * placeholder: 'Search...',
29
+ * }}
30
+ * />
31
+ *
32
+ * @example
33
+ * // Inline variant with cancel button
34
+ * <HeaderSearch
35
+ * variant={HeaderSearchVariant.Inline}
36
+ * onPressCancelButton={handleCancel}
37
+ * textFieldSearchProps={{
38
+ * value: searchText,
39
+ * onChangeText: setSearchText,
40
+ * onPressClearButton: () => setSearchText(''),
41
+ * placeholder: 'Search...',
42
+ * }}
43
+ * />
44
+ *
45
+ * @param props - Header row props (discriminated by `variant`).
46
+ * @returns The header search UI for the active variant.
47
+ */
48
+ const HeaderSearch = (props) => {
49
+ const baseTwClassName = 'h-14 flex-row items-center';
50
+ if (props.variant === design_system_shared_1.HeaderSearchVariant.Screen) {
51
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressBackButton, backButtonProps, ...screenBoxProps } = props;
52
+ return (<Box_1.Box {...screenBoxProps} twClassName={twClassName
53
+ ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`
54
+ : `${baseTwClassName} ml-1 mr-4 gap-2`}>
55
+ <ButtonIcon_1.ButtonIcon size={ButtonIcon_1.ButtonIconSize.Md} {...backButtonProps} iconName={Icon_1.IconName.ArrowLeft} onPress={onPressBackButton}/>
56
+ <TextFieldSearch_1.TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
57
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
58
+ : 'flex-1'}/>
59
+ </Box_1.Box>);
60
+ }
61
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressCancelButton, cancelButtonProps, ...inlineBoxProps } = props;
62
+ return (<Box_1.Box {...inlineBoxProps} twClassName={twClassName
63
+ ? `${baseTwClassName} ml-4 ${twClassName}`
64
+ : `${baseTwClassName} ml-4`}>
65
+ <TextFieldSearch_1.TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
66
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
67
+ : 'flex-1'}/>
68
+ <Button_1.Button {...cancelButtonProps} variant={Button_1.ButtonVariant.Tertiary} onPress={onPressCancelButton} textProps={{
69
+ ...cancelButtonProps?.textProps,
70
+ twClassName: cancelButtonProps?.textProps?.twClassName
71
+ ? `text-default ${cancelButtonProps.textProps.twClassName}`
72
+ : 'text-default',
73
+ }}>
74
+ {CANCEL_LABEL}
75
+ </Button_1.Button>
76
+ </Box_1.Box>);
77
+ };
78
+ exports.HeaderSearch = HeaderSearch;
79
+ exports.HeaderSearch.displayName = 'HeaderSearch';
80
+ //# sourceMappingURL=HeaderSearch.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAA8E;AAC9E,kDAA0B;AAE1B,0CAA6B;AAC7B,gDAAkD;AAClD,wDAA2D;AAC3D,4CAAmC;AACnC,kEAAqD;AAKrD,MAAM,YAAY,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AAO,CAC9B,CAED;MAAA,CAAC,iCAAe,CACd,IAAK,oBAA6C,CAAC,CACnD,WAAW,CAAC,CACV,oBAAoB,CAAC,WAAW;YAC9B,CAAC,CAAC,UAAU,oBAAoB,CAAC,WAAW,EAAE;YAC9C,CAAC,CAAC,QAAQ,CACb,EAEH;MAAA,CAAC,eAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,OAAO,CAAC,CAAC,sBAAa,CAAC,QAAQ,CAAC,CAChC,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,SAAS,CAAC,CAAC;YACT,GAAG,iBAAiB,EAAE,SAAS;YAC/B,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW;gBACpD,CAAC,CAAC,gBAAgB,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE;gBAC3D,CAAC,CAAC,cAAc;SACnB,CAAC,CAEF;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,eAAM,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAjFW,QAAA,YAAY,gBAiFvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import { HeaderSearchVariant } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { Button, ButtonVariant } from '../Button';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { IconName } from '../Icon';\nimport { TextFieldSearch } from '../TextFieldSearch';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\nimport type { HeaderSearchProps } from './HeaderSearch.types';\n\nconst CANCEL_LABEL = 'Cancel';\n\n/**\n * HeaderSearch is a header component that combines a search field\n * with either a back button (screen variant) or cancel button (inline variant).\n *\n * @example\n * // Screen variant with back button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Screen}\n * onPressBackButton={handleBack}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @example\n * // Inline variant with cancel button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Inline}\n * onPressCancelButton={handleCancel}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @param props - Header row props (discriminated by `variant`).\n * @returns The header search UI for the active variant.\n */\nexport const HeaderSearch: React.FC<HeaderSearchProps> = (props) => {\n const baseTwClassName = 'h-14 flex-row items-center';\n\n if (props.variant === HeaderSearchVariant.Screen) {\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressBackButton,\n backButtonProps,\n ...screenBoxProps\n } = props;\n\n return (\n <Box\n {...screenBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`\n : `${baseTwClassName} ml-1 mr-4 gap-2`\n }\n >\n <ButtonIcon\n size={ButtonIconSize.Md}\n {...backButtonProps}\n iconName={IconName.ArrowLeft}\n onPress={onPressBackButton}\n />\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n </Box>\n );\n }\n\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressCancelButton,\n cancelButtonProps,\n ...inlineBoxProps\n } = props;\n\n return (\n <Box\n {...inlineBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-4 ${twClassName}`\n : `${baseTwClassName} ml-4`\n }\n >\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n <Button\n {...cancelButtonProps}\n variant={ButtonVariant.Tertiary}\n onPress={onPressCancelButton}\n textProps={{\n ...cancelButtonProps?.textProps,\n twClassName: cancelButtonProps?.textProps?.twClassName\n ? `text-default ${cancelButtonProps.textProps.twClassName}`\n : 'text-default',\n }}\n >\n {CANCEL_LABEL}\n </Button>\n </Box>\n );\n};\n\nHeaderSearch.displayName = 'HeaderSearch';\n"]}
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import type { HeaderSearchProps } from "./HeaderSearch.types.cjs";
3
+ /**
4
+ * HeaderSearch is a header component that combines a search field
5
+ * with either a back button (screen variant) or cancel button (inline variant).
6
+ *
7
+ * @example
8
+ * // Screen variant with back button
9
+ * <HeaderSearch
10
+ * variant={HeaderSearchVariant.Screen}
11
+ * onPressBackButton={handleBack}
12
+ * textFieldSearchProps={{
13
+ * value: searchText,
14
+ * onChangeText: setSearchText,
15
+ * onPressClearButton: () => setSearchText(''),
16
+ * placeholder: 'Search...',
17
+ * }}
18
+ * />
19
+ *
20
+ * @example
21
+ * // Inline variant with cancel button
22
+ * <HeaderSearch
23
+ * variant={HeaderSearchVariant.Inline}
24
+ * onPressCancelButton={handleCancel}
25
+ * textFieldSearchProps={{
26
+ * value: searchText,
27
+ * onChangeText: setSearchText,
28
+ * onPressClearButton: () => setSearchText(''),
29
+ * placeholder: 'Search...',
30
+ * }}
31
+ * />
32
+ *
33
+ * @param props - Header row props (discriminated by `variant`).
34
+ * @returns The header search UI for the active variant.
35
+ */
36
+ export declare const HeaderSearch: React.FC<HeaderSearchProps>;
37
+ //# sourceMappingURL=HeaderSearch.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAI9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiFpD,CAAC"}
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import type { HeaderSearchProps } from "./HeaderSearch.types.mjs";
3
+ /**
4
+ * HeaderSearch is a header component that combines a search field
5
+ * with either a back button (screen variant) or cancel button (inline variant).
6
+ *
7
+ * @example
8
+ * // Screen variant with back button
9
+ * <HeaderSearch
10
+ * variant={HeaderSearchVariant.Screen}
11
+ * onPressBackButton={handleBack}
12
+ * textFieldSearchProps={{
13
+ * value: searchText,
14
+ * onChangeText: setSearchText,
15
+ * onPressClearButton: () => setSearchText(''),
16
+ * placeholder: 'Search...',
17
+ * }}
18
+ * />
19
+ *
20
+ * @example
21
+ * // Inline variant with cancel button
22
+ * <HeaderSearch
23
+ * variant={HeaderSearchVariant.Inline}
24
+ * onPressCancelButton={handleCancel}
25
+ * textFieldSearchProps={{
26
+ * value: searchText,
27
+ * onChangeText: setSearchText,
28
+ * onPressClearButton: () => setSearchText(''),
29
+ * placeholder: 'Search...',
30
+ * }}
31
+ * />
32
+ *
33
+ * @param props - Header row props (discriminated by `variant`).
34
+ * @returns The header search UI for the active variant.
35
+ */
36
+ export declare const HeaderSearch: React.FC<HeaderSearchProps>;
37
+ //# sourceMappingURL=HeaderSearch.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAI9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiFpD,CAAC"}
@@ -0,0 +1,80 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { HeaderSearchVariant } from "@metamask-previews/design-system-shared";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { Box } from "../Box/index.mjs";
11
+ import { Button, ButtonVariant } from "../Button/index.mjs";
12
+ import { ButtonIcon, ButtonIconSize } from "../ButtonIcon/index.mjs";
13
+ import { IconName } from "../Icon/index.mjs";
14
+ import { TextFieldSearch } from "../TextFieldSearch/index.mjs";
15
+ const CANCEL_LABEL = 'Cancel';
16
+ /**
17
+ * HeaderSearch is a header component that combines a search field
18
+ * with either a back button (screen variant) or cancel button (inline variant).
19
+ *
20
+ * @example
21
+ * // Screen variant with back button
22
+ * <HeaderSearch
23
+ * variant={HeaderSearchVariant.Screen}
24
+ * onPressBackButton={handleBack}
25
+ * textFieldSearchProps={{
26
+ * value: searchText,
27
+ * onChangeText: setSearchText,
28
+ * onPressClearButton: () => setSearchText(''),
29
+ * placeholder: 'Search...',
30
+ * }}
31
+ * />
32
+ *
33
+ * @example
34
+ * // Inline variant with cancel button
35
+ * <HeaderSearch
36
+ * variant={HeaderSearchVariant.Inline}
37
+ * onPressCancelButton={handleCancel}
38
+ * textFieldSearchProps={{
39
+ * value: searchText,
40
+ * onChangeText: setSearchText,
41
+ * onPressClearButton: () => setSearchText(''),
42
+ * placeholder: 'Search...',
43
+ * }}
44
+ * />
45
+ *
46
+ * @param props - Header row props (discriminated by `variant`).
47
+ * @returns The header search UI for the active variant.
48
+ */
49
+ export const HeaderSearch = (props) => {
50
+ const baseTwClassName = 'h-14 flex-row items-center';
51
+ if (props.variant === HeaderSearchVariant.Screen) {
52
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressBackButton, backButtonProps, ...screenBoxProps } = props;
53
+ return (<Box {...screenBoxProps} twClassName={twClassName
54
+ ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`
55
+ : `${baseTwClassName} ml-1 mr-4 gap-2`}>
56
+ <ButtonIcon size={ButtonIconSize.Md} {...backButtonProps} iconName={IconName.ArrowLeft} onPress={onPressBackButton}/>
57
+ <TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
58
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
59
+ : 'flex-1'}/>
60
+ </Box>);
61
+ }
62
+ const { variant: _variant, textFieldSearchProps, twClassName, onPressCancelButton, cancelButtonProps, ...inlineBoxProps } = props;
63
+ return (<Box {...inlineBoxProps} twClassName={twClassName
64
+ ? `${baseTwClassName} ml-4 ${twClassName}`
65
+ : `${baseTwClassName} ml-4`}>
66
+ <TextFieldSearch {...textFieldSearchProps} twClassName={textFieldSearchProps.twClassName
67
+ ? `flex-1 ${textFieldSearchProps.twClassName}`
68
+ : 'flex-1'}/>
69
+ <Button {...cancelButtonProps} variant={ButtonVariant.Tertiary} onPress={onPressCancelButton} textProps={{
70
+ ...cancelButtonProps?.textProps,
71
+ twClassName: cancelButtonProps?.textProps?.twClassName
72
+ ? `text-default ${cancelButtonProps.textProps.twClassName}`
73
+ : 'text-default',
74
+ }}>
75
+ {CANCEL_LABEL}
76
+ </Button>
77
+ </Box>);
78
+ };
79
+ HeaderSearch.displayName = 'HeaderSearch';
80
+ //# sourceMappingURL=HeaderSearch.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAC9E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,4BAAkB;AAClD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,gCAAsB;AAC3D,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,eAAe,EAAE,qCAA2B;AAKrD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,eAAe,GAAG,4BAA4B,CAAC;IAErD,IAA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AC,QAAQ,CACb,EAEH;MAAA,CAAC,MAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,OAAO,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAChC,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,SAAS,CAAC,CAAC;YACT,GAAG,iBAAiB,EAAE,SAAS;YAC/B,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,WAAW;gBACpD,CAAC,CAAC,gBAAgB,iBAAiB,CAAC,SAAS,CAAC,WAAW,EAAE;gBAC3D,CAAC,CAAC,cAAc;SACnB,CAAC,CAEF;QAAA,CAAC,YAAY,CACf;MAAA,EAAE,MAAM,CACV;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import { HeaderSearchVariant } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { Button, ButtonVariant } from '../Button';\nimport { ButtonIcon, ButtonIconSize } from '../ButtonIcon';\nimport { IconName } from '../Icon';\nimport { TextFieldSearch } from '../TextFieldSearch';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\nimport type { HeaderSearchProps } from './HeaderSearch.types';\n\nconst CANCEL_LABEL = 'Cancel';\n\n/**\n * HeaderSearch is a header component that combines a search field\n * with either a back button (screen variant) or cancel button (inline variant).\n *\n * @example\n * // Screen variant with back button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Screen}\n * onPressBackButton={handleBack}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @example\n * // Inline variant with cancel button\n * <HeaderSearch\n * variant={HeaderSearchVariant.Inline}\n * onPressCancelButton={handleCancel}\n * textFieldSearchProps={{\n * value: searchText,\n * onChangeText: setSearchText,\n * onPressClearButton: () => setSearchText(''),\n * placeholder: 'Search...',\n * }}\n * />\n *\n * @param props - Header row props (discriminated by `variant`).\n * @returns The header search UI for the active variant.\n */\nexport const HeaderSearch: React.FC<HeaderSearchProps> = (props) => {\n const baseTwClassName = 'h-14 flex-row items-center';\n\n if (props.variant === HeaderSearchVariant.Screen) {\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressBackButton,\n backButtonProps,\n ...screenBoxProps\n } = props;\n\n return (\n <Box\n {...screenBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-1 mr-4 gap-2 ${twClassName}`\n : `${baseTwClassName} ml-1 mr-4 gap-2`\n }\n >\n <ButtonIcon\n size={ButtonIconSize.Md}\n {...backButtonProps}\n iconName={IconName.ArrowLeft}\n onPress={onPressBackButton}\n />\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n </Box>\n );\n }\n\n const {\n variant: _variant,\n textFieldSearchProps,\n twClassName,\n onPressCancelButton,\n cancelButtonProps,\n ...inlineBoxProps\n } = props;\n\n return (\n <Box\n {...inlineBoxProps}\n twClassName={\n twClassName\n ? `${baseTwClassName} ml-4 ${twClassName}`\n : `${baseTwClassName} ml-4`\n }\n >\n <TextFieldSearch\n {...(textFieldSearchProps as TextFieldSearchProps)}\n twClassName={\n textFieldSearchProps.twClassName\n ? `flex-1 ${textFieldSearchProps.twClassName}`\n : 'flex-1'\n }\n />\n <Button\n {...cancelButtonProps}\n variant={ButtonVariant.Tertiary}\n onPress={onPressCancelButton}\n textProps={{\n ...cancelButtonProps?.textProps,\n twClassName: cancelButtonProps?.textProps?.twClassName\n ? `text-default ${cancelButtonProps.textProps.twClassName}`\n : 'text-default',\n }}\n >\n {CANCEL_LABEL}\n </Button>\n </Box>\n );\n};\n\nHeaderSearch.displayName = 'HeaderSearch';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=HeaderSearch.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n HeaderSearchInlinePropsShared,\n HeaderSearchScreenPropsShared,\n} from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\ntype HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {\n /**\n * Props to pass to the TextFieldSearch component.\n */\n textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;\n};\n\n/**\n * Screen variant props.\n * Renders a back button (ArrowLeft) on the left side.\n */\nexport type HeaderSearchScreenProps = HeaderSearchScreenPropsShared &\n HeaderSearchBaseProps & {\n onPressBackButton: () => void;\n backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;\n };\n\n/**\n * Inline variant props.\n * Renders a cancel button on the right side.\n */\nexport type HeaderSearchInlineProps = HeaderSearchInlinePropsShared &\n HeaderSearchBaseProps & {\n onPressCancelButton: () => void;\n cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;\n };\n\n/**\n * HeaderSearch component props.\n */\nexport type HeaderSearchProps =\n | HeaderSearchScreenProps\n | HeaderSearchInlineProps;\n"]}
@@ -0,0 +1,33 @@
1
+ import type { HeaderSearchInlinePropsShared, HeaderSearchScreenPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BoxProps } from "../Box/index.cjs";
3
+ import type { ButtonProps } from "../Button/index.cjs";
4
+ import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
5
+ import type { TextFieldSearchProps } from "../TextFieldSearch/index.cjs";
6
+ type HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {
7
+ /**
8
+ * Props to pass to the TextFieldSearch component.
9
+ */
10
+ textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;
11
+ };
12
+ /**
13
+ * Screen variant props.
14
+ * Renders a back button (ArrowLeft) on the left side.
15
+ */
16
+ export type HeaderSearchScreenProps = HeaderSearchScreenPropsShared & HeaderSearchBaseProps & {
17
+ onPressBackButton: () => void;
18
+ backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;
19
+ };
20
+ /**
21
+ * Inline variant props.
22
+ * Renders a cancel button on the right side.
23
+ */
24
+ export type HeaderSearchInlineProps = HeaderSearchInlinePropsShared & HeaderSearchBaseProps & {
25
+ onPressCancelButton: () => void;
26
+ cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;
27
+ };
28
+ /**
29
+ * HeaderSearch component props.
30
+ */
31
+ export type HeaderSearchProps = HeaderSearchScreenProps | HeaderSearchInlineProps;
32
+ export {};
33
+ //# sourceMappingURL=HeaderSearch.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,6BAA6B,EAC9B,gDAAgD;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAAkB;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qCAA2B;AAE/D,KAAK,qBAAqB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IACxD;;OAEG;IACH,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;CAC3D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;CAC3E,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,GACvB,uBAAuB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { HeaderSearchInlinePropsShared, HeaderSearchScreenPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BoxProps } from "../Box/index.mjs";
3
+ import type { ButtonProps } from "../Button/index.mjs";
4
+ import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
5
+ import type { TextFieldSearchProps } from "../TextFieldSearch/index.mjs";
6
+ type HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {
7
+ /**
8
+ * Props to pass to the TextFieldSearch component.
9
+ */
10
+ textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;
11
+ };
12
+ /**
13
+ * Screen variant props.
14
+ * Renders a back button (ArrowLeft) on the left side.
15
+ */
16
+ export type HeaderSearchScreenProps = HeaderSearchScreenPropsShared & HeaderSearchBaseProps & {
17
+ onPressBackButton: () => void;
18
+ backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;
19
+ };
20
+ /**
21
+ * Inline variant props.
22
+ * Renders a cancel button on the right side.
23
+ */
24
+ export type HeaderSearchInlineProps = HeaderSearchInlinePropsShared & HeaderSearchBaseProps & {
25
+ onPressCancelButton: () => void;
26
+ cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;
27
+ };
28
+ /**
29
+ * HeaderSearch component props.
30
+ */
31
+ export type HeaderSearchProps = HeaderSearchScreenProps | HeaderSearchInlineProps;
32
+ export {};
33
+ //# sourceMappingURL=HeaderSearch.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,6BAA6B,EAC7B,6BAA6B,EAC9B,gDAAgD;AAEjD,OAAO,KAAK,EAAE,QAAQ,EAAE,yBAAe;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,4BAAkB;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,qCAA2B;AAE/D,KAAK,qBAAqB,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GAAG;IACxD;;OAEG;IACH,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;CAC3D,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;CACjE,CAAC;AAEJ;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,6BAA6B,GACjE,qBAAqB,GAAG;IACtB,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,iBAAiB,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC,CAAC;CAC3E,CAAC;AAEJ;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,GACvB,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HeaderSearch.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HeaderSearch.types.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/HeaderSearch.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n HeaderSearchInlinePropsShared,\n HeaderSearchScreenPropsShared,\n} from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box';\nimport type { ButtonProps } from '../Button';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { TextFieldSearchProps } from '../TextFieldSearch';\n\ntype HeaderSearchBaseProps = Omit<BoxProps, 'children'> & {\n /**\n * Props to pass to the TextFieldSearch component.\n */\n textFieldSearchProps: Omit<TextFieldSearchProps, 'style'>;\n};\n\n/**\n * Screen variant props.\n * Renders a back button (ArrowLeft) on the left side.\n */\nexport type HeaderSearchScreenProps = HeaderSearchScreenPropsShared &\n HeaderSearchBaseProps & {\n onPressBackButton: () => void;\n backButtonProps?: Omit<ButtonIconProps, 'iconName' | 'onPress'>;\n };\n\n/**\n * Inline variant props.\n * Renders a cancel button on the right side.\n */\nexport type HeaderSearchInlineProps = HeaderSearchInlinePropsShared &\n HeaderSearchBaseProps & {\n onPressCancelButton: () => void;\n cancelButtonProps?: Omit<ButtonProps, 'variant' | 'onPress' | 'children'>;\n };\n\n/**\n * HeaderSearch component props.\n */\nexport type HeaderSearchProps =\n | HeaderSearchScreenProps\n | HeaderSearchInlineProps;\n"]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HeaderSearch = exports.HeaderSearchVariant = void 0;
4
+ var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ Object.defineProperty(exports, "HeaderSearchVariant", { enumerable: true, get: function () { return design_system_shared_1.HeaderSearchVariant; } });
6
+ var HeaderSearch_1 = require("./HeaderSearch.cjs");
7
+ Object.defineProperty(exports, "HeaderSearch", { enumerable: true, get: function () { return HeaderSearch_1.HeaderSearch; } });
8
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":";;;AAAA,gFAKiD;AAJ/C,2HAAA,mBAAmB,OAAA;AAKrB,mDAA8C;AAArC,4GAAA,YAAY,OAAA","sourcesContent":["export {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { HeaderSearch } from './HeaderSearch';\nexport type {\n HeaderSearchProps,\n HeaderSearchScreenProps,\n HeaderSearchInlineProps,\n} from './HeaderSearch.types';\n"]}
@@ -0,0 +1,4 @@
1
+ export { HeaderSearchVariant, type HeaderSearchInlinePropsShared, type HeaderSearchPropsShared, type HeaderSearchScreenPropsShared, } from "@metamask-previews/design-system-shared";
2
+ export { HeaderSearch } from "./HeaderSearch.cjs";
3
+ export type { HeaderSearchProps, HeaderSearchScreenProps, HeaderSearchInlineProps, } from "./HeaderSearch.types.cjs";
4
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,gDAAgD;AACjD,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,iCAA6B"}
@@ -0,0 +1,4 @@
1
+ export { HeaderSearchVariant, type HeaderSearchInlinePropsShared, type HeaderSearchPropsShared, type HeaderSearchScreenPropsShared, } from "@metamask-previews/design-system-shared";
2
+ export { HeaderSearch } from "./HeaderSearch.mjs";
3
+ export type { HeaderSearchProps, HeaderSearchScreenProps, HeaderSearchInlineProps, } from "./HeaderSearch.types.mjs";
4
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,gDAAgD;AACjD,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,iCAA6B"}
@@ -0,0 +1,3 @@
1
+ export { HeaderSearchVariant } from "@metamask-previews/design-system-shared";
2
+ export { HeaderSearch } from "./HeaderSearch.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/HeaderSearch/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAIpB,gDAAgD;AACjD,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from '@metamask-previews/design-system-shared';\nexport { HeaderSearch } from './HeaderSearch';\nexport type {\n HeaderSearchProps,\n HeaderSearchScreenProps,\n HeaderSearchInlineProps,\n} from './HeaderSearch.types';\n"]}
@@ -28,7 +28,7 @@ exports.HeaderStandard = void 0;
28
28
  const react_1 = __importStar(require("react"));
29
29
  // External dependencies.
30
30
  const Box_1 = require("../Box/index.cjs");
31
- const BoxVertical_1 = require("../BoxVertical/index.cjs");
31
+ const BoxColumn_1 = require("../BoxColumn/index.cjs");
32
32
  const HeaderBase_1 = require("../HeaderBase/index.cjs");
33
33
  const Icon_1 = require("../Icon/index.cjs");
34
34
  const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
@@ -80,7 +80,7 @@ const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children,
80
80
  .join(' '),
81
81
  };
82
82
  }
83
- return (<BoxVertical_1.BoxVertical alignItems={Box_1.BoxAlignItems.Center} textProps={{
83
+ return (<BoxColumn_1.BoxColumn alignItems={Box_1.BoxAlignItems.Center} textProps={{
84
84
  variant: Text_1.TextVariant.BodyMd,
85
85
  fontWeight: Text_1.FontWeight.Bold,
86
86
  ...titleProps,
@@ -88,7 +88,7 @@ const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children,
88
88
  {subtitle}
89
89
  </TextOrChildren_1.TextOrChildren>) : undefined}>
90
90
  {title}
91
- </BoxVertical_1.BoxVertical>);
91
+ </BoxColumn_1.BoxColumn>);
92
92
  }
93
93
  return null;
94
94
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,+CAAuC;AAEvC,yBAAyB;AACzB,0CAAuC;AACvC,0DAA6C;AAE7C,wDAA2C;AAC3C,4CAAmC;AACnC,gFAAmE;AAEnE,4CAA6D;AAKtD,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAChD,IAAI,oBAAoB,EAAE;YACxB,OAAO,oBAAoB,CAAC;SAC7B;QACD,IAAI,MAAM,IAAI,eAAe,EAAE;YAC7B,MAAM,UAAU,GAAoB;gBAClC,QAAQ,EAAE,eAAQ,CAAC,SAAS;gBAC5B,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;gBAC1B,OAAO,EAAE,eAAe,EAAE,OAAO,IAAI,MAAM;aAC5C,CAAC;YACF,OAAO,UAAU,CAAC;SACnB;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC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AED,OAAO,CACL,CAAC,yBAAW,CACV,UAAU,CAAC,CAAC,mBAAa,CAAC,MAAM,CAAC,CACjC,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,kBAAW,CAAC,MAAM;oBAC3B,UAAU,EAAE,iBAAU,CAAC,IAAI;oBAC3B,GAAG,UAAU;iBACd,CAAC,CACF,eAAe,CAAC,CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;gBAAA,CAAC,QAAQ,CACX;cAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,yBAAW,CAAC,CACf,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,cAAc,kBAsGzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxVertical } from '../BoxVertical';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxVertical\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxVertical>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
1
+ {"version":3,"file":"HeaderStandard.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,+CAAuC;AAEvC,yBAAyB;AACzB,0CAAuC;AACvC,sDAAyC;AAEzC,wDAA2C;AAC3C,4CAAmC;AACnC,gFAAmE;AAEnE,4CAA6D;AAKtD,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAChD,IAAI,oBAAoB,EAAE;YACxB,OAAO,oBAAoB,CAAC;SAC7B;QACD,IAAI,MAAM,IAAI,eAAe,EAAE;YAC7B,MAAM,UAAU,GAAoB;gBAClC,QAAQ,EAAE,eAAQ,CAAC,SAAS;gBAC5B,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;gBAC1B,OAAO,EAAE,eAAe,EAAE,OAAO,IAAI,MAAM;aAC5C,CAAC;YACF,OAAO,UAAU,CAAC;SACnB;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAEpD,MAAM,0BAA0B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC9C,MAAM,KAAK,GAAsB,EAAE,CAAC;QAEpC,IAAI,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AU,CAAC,IAAI;oBAC3B,GAAG,UAAU;iBACd,CAAC,CACF,eAAe,CAAC,CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;gBAAA,CAAC,QAAQ,CACX;cAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,qBAAS,CAAC,CACb,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,cAAc,kBAsGzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
@@ -9,7 +9,7 @@ import $React, { useMemo } from "react";
9
9
  const React = $importDefault($React);
10
10
  // External dependencies.
11
11
  import { BoxAlignItems } from "../Box/index.mjs";
12
- import { BoxVertical } from "../BoxVertical/index.mjs";
12
+ import { BoxColumn } from "../BoxColumn/index.mjs";
13
13
  import { HeaderBase } from "../HeaderBase/index.mjs";
14
14
  import { IconName } from "../Icon/index.mjs";
15
15
  import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
@@ -61,7 +61,7 @@ export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, chi
61
61
  .join(' '),
62
62
  };
63
63
  }
64
- return (<BoxVertical alignItems={BoxAlignItems.Center} textProps={{
64
+ return (<BoxColumn alignItems={BoxAlignItems.Center} textProps={{
65
65
  variant: TextVariant.BodyMd,
66
66
  fontWeight: FontWeight.Bold,
67
67
  ...titleProps,
@@ -69,7 +69,7 @@ export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, chi
69
69
  {subtitle}
70
70
  </TextOrChildren>) : undefined}>
71
71
  {title}
72
- </BoxVertical>);
72
+ </BoxColumn>);
73
73
  }
74
74
  return null;
75
75
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAEvC,yBAAyB;AACzB,OAAO,EAAE,aAAa,EAAE,yBAAe;AACvC,OAAO,EAAE,WAAW,EAAE,iCAAuB;AAE7C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,0BAAgB;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL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AI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxVertical } from '../BoxVertical';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxVertical\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxVertical>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
1
+ {"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AAEvC,yBAAyB;AACzB,OAAO,EAAE,aAAa,EAAE,yBAAe;AACvC,OAAO,EAAE,SAAS,EAAE,+BAAqB;AAEzC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,0BAAgB;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,E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C,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}