@metamask/design-system-react-native 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/CHANGELOG.md +26 -1
  2. package/dist/components/BadgeNetwork/BadgeNetwork.types.cjs.map +1 -1
  3. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts +6 -15
  4. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts.map +1 -1
  5. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts +6 -15
  6. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts.map +1 -1
  7. package/dist/components/BadgeNetwork/BadgeNetwork.types.mjs.map +1 -1
  8. package/dist/components/BannerBase/BannerBase.cjs +4 -3
  9. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  10. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  11. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  12. package/dist/components/BannerBase/BannerBase.mjs +2 -1
  13. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  14. package/dist/components/{BoxVertical/BoxVertical.cjs → BoxColumn/BoxColumn.cjs} +5 -5
  15. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -0
  16. package/dist/components/BoxColumn/BoxColumn.d.cts +7 -0
  17. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -0
  18. package/dist/components/BoxColumn/BoxColumn.d.mts +7 -0
  19. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -0
  20. package/dist/components/{BoxVertical/BoxVertical.mjs → BoxColumn/BoxColumn.mjs} +3 -3
  21. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -0
  22. package/dist/components/{BoxVertical/BoxVertical.types.cjs → BoxColumn/BoxColumn.types.cjs} +1 -1
  23. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -0
  24. package/dist/components/BoxColumn/BoxColumn.types.d.cts +13 -0
  25. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -0
  26. package/dist/components/BoxColumn/BoxColumn.types.d.mts +13 -0
  27. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -0
  28. package/dist/components/BoxColumn/BoxColumn.types.mjs +2 -0
  29. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -0
  30. package/dist/components/BoxColumn/index.cjs +6 -0
  31. package/dist/components/BoxColumn/index.cjs.map +1 -0
  32. package/dist/components/BoxColumn/index.d.cts +3 -0
  33. package/dist/components/BoxColumn/index.d.cts.map +1 -0
  34. package/dist/components/BoxColumn/index.d.mts +3 -0
  35. package/dist/components/BoxColumn/index.d.mts.map +1 -0
  36. package/dist/components/BoxColumn/index.mjs +2 -0
  37. package/dist/components/BoxColumn/index.mjs.map +1 -0
  38. package/dist/components/{BoxHorizontal/BoxHorizontal.cjs → BoxRow/BoxRow.cjs} +5 -5
  39. package/dist/components/BoxRow/BoxRow.cjs.map +1 -0
  40. package/dist/components/BoxRow/BoxRow.d.cts +7 -0
  41. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -0
  42. package/dist/components/BoxRow/BoxRow.d.mts +7 -0
  43. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -0
  44. package/dist/components/{BoxHorizontal/BoxHorizontal.mjs → BoxRow/BoxRow.mjs} +3 -3
  45. package/dist/components/BoxRow/BoxRow.mjs.map +1 -0
  46. package/dist/components/{BoxHorizontal/BoxHorizontal.types.cjs → BoxRow/BoxRow.types.cjs} +1 -1
  47. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -0
  48. package/dist/components/BoxRow/BoxRow.types.d.cts +13 -0
  49. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -0
  50. package/dist/components/BoxRow/BoxRow.types.d.mts +13 -0
  51. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -0
  52. package/dist/components/BoxRow/BoxRow.types.mjs +2 -0
  53. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -0
  54. package/dist/components/BoxRow/index.cjs +6 -0
  55. package/dist/components/BoxRow/index.cjs.map +1 -0
  56. package/dist/components/BoxRow/index.d.cts +3 -0
  57. package/dist/components/BoxRow/index.d.cts.map +1 -0
  58. package/dist/components/BoxRow/index.d.mts +3 -0
  59. package/dist/components/BoxRow/index.d.mts.map +1 -0
  60. package/dist/components/BoxRow/index.mjs +2 -0
  61. package/dist/components/BoxRow/index.mjs.map +1 -0
  62. package/dist/components/HeaderRoot/HeaderRoot.cjs +3 -3
  63. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  64. package/dist/components/HeaderRoot/HeaderRoot.mjs +3 -3
  65. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  66. package/dist/components/HeaderSearch/HeaderSearch.cjs +80 -0
  67. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -0
  68. package/dist/components/HeaderSearch/HeaderSearch.d.cts +37 -0
  69. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -0
  70. package/dist/components/HeaderSearch/HeaderSearch.d.mts +37 -0
  71. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -0
  72. package/dist/components/HeaderSearch/HeaderSearch.mjs +80 -0
  73. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -0
  74. package/dist/components/HeaderSearch/HeaderSearch.types.cjs +3 -0
  75. package/dist/components/HeaderSearch/HeaderSearch.types.cjs.map +1 -0
  76. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts +33 -0
  77. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts.map +1 -0
  78. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts +33 -0
  79. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts.map +1 -0
  80. package/dist/components/HeaderSearch/HeaderSearch.types.mjs +2 -0
  81. package/dist/components/HeaderSearch/HeaderSearch.types.mjs.map +1 -0
  82. package/dist/components/HeaderSearch/index.cjs +8 -0
  83. package/dist/components/HeaderSearch/index.cjs.map +1 -0
  84. package/dist/components/HeaderSearch/index.d.cts +4 -0
  85. package/dist/components/HeaderSearch/index.d.cts.map +1 -0
  86. package/dist/components/HeaderSearch/index.d.mts +4 -0
  87. package/dist/components/HeaderSearch/index.d.mts.map +1 -0
  88. package/dist/components/HeaderSearch/index.mjs +3 -0
  89. package/dist/components/HeaderSearch/index.mjs.map +1 -0
  90. package/dist/components/HeaderStandard/HeaderStandard.cjs +3 -3
  91. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  92. package/dist/components/HeaderStandard/HeaderStandard.mjs +3 -3
  93. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  94. package/dist/components/Input/Input.cjs +4 -4
  95. package/dist/components/Input/Input.cjs.map +1 -1
  96. package/dist/components/Input/Input.constants.cjs +15 -15
  97. package/dist/components/Input/Input.constants.cjs.map +1 -1
  98. package/dist/components/Input/Input.constants.d.cts +1 -1
  99. package/dist/components/Input/Input.constants.d.cts.map +1 -1
  100. package/dist/components/Input/Input.constants.d.mts +1 -1
  101. package/dist/components/Input/Input.constants.d.mts.map +1 -1
  102. package/dist/components/Input/Input.constants.mjs +1 -1
  103. package/dist/components/Input/Input.constants.mjs.map +1 -1
  104. package/dist/components/Input/Input.d.cts +1 -1
  105. package/dist/components/Input/Input.d.cts.map +1 -1
  106. package/dist/components/Input/Input.d.mts +1 -1
  107. package/dist/components/Input/Input.d.mts.map +1 -1
  108. package/dist/components/Input/Input.mjs +3 -3
  109. package/dist/components/Input/Input.mjs.map +1 -1
  110. package/dist/components/Input/Input.types.cjs.map +1 -1
  111. package/dist/components/Input/Input.types.d.cts +1 -1
  112. package/dist/components/Input/Input.types.d.cts.map +1 -1
  113. package/dist/components/Input/Input.types.d.mts +1 -1
  114. package/dist/components/Input/Input.types.d.mts.map +1 -1
  115. package/dist/components/Input/Input.types.mjs.map +1 -1
  116. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +44 -0
  117. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -0
  118. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts +7 -0
  119. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -0
  120. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts +7 -0
  121. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -0
  122. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +44 -0
  123. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -0
  124. package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs +3 -0
  125. package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs.map +1 -0
  126. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts +17 -0
  127. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts.map +1 -0
  128. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts +17 -0
  129. package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts.map +1 -0
  130. package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs +2 -0
  131. package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs.map +1 -0
  132. package/dist/components/KeyValueColumn/index.cjs +6 -0
  133. package/dist/components/KeyValueColumn/index.cjs.map +1 -0
  134. package/dist/components/KeyValueColumn/index.d.cts +3 -0
  135. package/dist/components/KeyValueColumn/index.d.cts.map +1 -0
  136. package/dist/components/KeyValueColumn/index.d.mts +3 -0
  137. package/dist/components/KeyValueColumn/index.d.mts.map +1 -0
  138. package/dist/components/KeyValueColumn/index.mjs +2 -0
  139. package/dist/components/KeyValueColumn/index.mjs.map +1 -0
  140. package/dist/components/KeyValueRow/KeyValueRow.cjs +43 -64
  141. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  142. package/dist/components/KeyValueRow/KeyValueRow.d.cts +3 -20
  143. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  144. package/dist/components/KeyValueRow/KeyValueRow.d.mts +3 -20
  145. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  146. package/dist/components/KeyValueRow/KeyValueRow.mjs +42 -63
  147. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  148. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +0 -26
  149. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -1
  150. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +14 -174
  151. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  152. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +14 -174
  153. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  154. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +1 -25
  155. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -1
  156. package/dist/components/KeyValueRow/index.cjs +3 -7
  157. package/dist/components/KeyValueRow/index.cjs.map +1 -1
  158. package/dist/components/KeyValueRow/index.d.cts +3 -2
  159. package/dist/components/KeyValueRow/index.d.cts.map +1 -1
  160. package/dist/components/KeyValueRow/index.d.mts +3 -2
  161. package/dist/components/KeyValueRow/index.d.mts.map +1 -1
  162. package/dist/components/KeyValueRow/index.mjs +2 -2
  163. package/dist/components/KeyValueRow/index.mjs.map +1 -1
  164. package/dist/components/Text/Text.cjs +5 -5
  165. package/dist/components/Text/Text.cjs.map +1 -1
  166. package/dist/components/Text/Text.constants.cjs +20 -25
  167. package/dist/components/Text/Text.constants.cjs.map +1 -1
  168. package/dist/components/Text/Text.constants.d.cts +2 -2
  169. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  170. package/dist/components/Text/Text.constants.d.mts +2 -2
  171. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  172. package/dist/components/Text/Text.constants.mjs +16 -21
  173. package/dist/components/Text/Text.constants.mjs.map +1 -1
  174. package/dist/components/Text/Text.d.cts.map +1 -1
  175. package/dist/components/Text/Text.d.mts.map +1 -1
  176. package/dist/components/Text/Text.mjs +3 -3
  177. package/dist/components/Text/Text.mjs.map +1 -1
  178. package/dist/components/Text/Text.types.cjs.map +1 -1
  179. package/dist/components/Text/Text.types.d.cts +3 -35
  180. package/dist/components/Text/Text.types.d.cts.map +1 -1
  181. package/dist/components/Text/Text.types.d.mts +3 -35
  182. package/dist/components/Text/Text.types.d.mts.map +1 -1
  183. package/dist/components/Text/Text.types.mjs.map +1 -1
  184. package/dist/components/Text/index.cjs +7 -7
  185. package/dist/components/Text/index.cjs.map +1 -1
  186. package/dist/components/Text/index.d.cts +1 -1
  187. package/dist/components/Text/index.d.cts.map +1 -1
  188. package/dist/components/Text/index.d.mts +1 -1
  189. package/dist/components/Text/index.d.mts.map +1 -1
  190. package/dist/components/Text/index.mjs +1 -1
  191. package/dist/components/Text/index.mjs.map +1 -1
  192. package/dist/components/TextButton/TextButton.cjs +3 -3
  193. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  194. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  195. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  196. package/dist/components/TextButton/TextButton.mjs +1 -1
  197. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  198. package/dist/components/TextField/TextField.cjs +2 -2
  199. package/dist/components/TextField/TextField.cjs.map +1 -1
  200. package/dist/components/TextField/TextField.d.cts.map +1 -1
  201. package/dist/components/TextField/TextField.d.mts.map +1 -1
  202. package/dist/components/TextField/TextField.mjs +1 -1
  203. package/dist/components/TextField/TextField.mjs.map +1 -1
  204. package/dist/components/index.cjs +15 -7
  205. package/dist/components/index.cjs.map +1 -1
  206. package/dist/components/index.d.cts +10 -4
  207. package/dist/components/index.d.cts.map +1 -1
  208. package/dist/components/index.d.mts +10 -4
  209. package/dist/components/index.d.mts.map +1 -1
  210. package/dist/components/index.mjs +5 -2
  211. package/dist/components/index.mjs.map +1 -1
  212. package/dist/types/index.cjs +1 -108
  213. package/dist/types/index.cjs.map +1 -1
  214. package/dist/types/index.d.cts +0 -98
  215. package/dist/types/index.d.cts.map +1 -1
  216. package/dist/types/index.d.mts +0 -98
  217. package/dist/types/index.d.mts.map +1 -1
  218. package/dist/types/index.mjs +0 -107
  219. package/dist/types/index.mjs.map +1 -1
  220. package/package.json +2 -2
  221. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +0 -1
  222. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +0 -7
  223. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +0 -1
  224. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +0 -7
  225. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +0 -1
  226. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +0 -1
  227. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +0 -1
  228. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +0 -13
  229. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +0 -1
  230. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +0 -13
  231. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +0 -1
  232. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +0 -2
  233. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +0 -1
  234. package/dist/components/BoxHorizontal/index.cjs +0 -6
  235. package/dist/components/BoxHorizontal/index.cjs.map +0 -1
  236. package/dist/components/BoxHorizontal/index.d.cts +0 -3
  237. package/dist/components/BoxHorizontal/index.d.cts.map +0 -1
  238. package/dist/components/BoxHorizontal/index.d.mts +0 -3
  239. package/dist/components/BoxHorizontal/index.d.mts.map +0 -1
  240. package/dist/components/BoxHorizontal/index.mjs +0 -2
  241. package/dist/components/BoxHorizontal/index.mjs.map +0 -1
  242. package/dist/components/BoxVertical/BoxVertical.cjs.map +0 -1
  243. package/dist/components/BoxVertical/BoxVertical.d.cts +0 -7
  244. package/dist/components/BoxVertical/BoxVertical.d.cts.map +0 -1
  245. package/dist/components/BoxVertical/BoxVertical.d.mts +0 -7
  246. package/dist/components/BoxVertical/BoxVertical.d.mts.map +0 -1
  247. package/dist/components/BoxVertical/BoxVertical.mjs.map +0 -1
  248. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +0 -1
  249. package/dist/components/BoxVertical/BoxVertical.types.d.cts +0 -13
  250. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +0 -1
  251. package/dist/components/BoxVertical/BoxVertical.types.d.mts +0 -13
  252. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +0 -1
  253. package/dist/components/BoxVertical/BoxVertical.types.mjs +0 -2
  254. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +0 -1
  255. package/dist/components/BoxVertical/index.cjs +0 -6
  256. package/dist/components/BoxVertical/index.cjs.map +0 -1
  257. package/dist/components/BoxVertical/index.d.cts +0 -3
  258. package/dist/components/BoxVertical/index.d.cts.map +0 -1
  259. package/dist/components/BoxVertical/index.d.mts +0 -3
  260. package/dist/components/BoxVertical/index.d.mts.map +0 -1
  261. package/dist/components/BoxVertical/index.mjs +0 -2
  262. package/dist/components/BoxVertical/index.mjs.map +0 -1
  263. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +0 -34
  264. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +0 -1
  265. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +0 -13
  266. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +0 -1
  267. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +0 -13
  268. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +0 -1
  269. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +0 -34
  270. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +0 -1
  271. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +0 -40
  272. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +0 -1
  273. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +0 -24
  274. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +0 -1
  275. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +0 -24
  276. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +0 -1
  277. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +0 -40
  278. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +0 -1
  279. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +0 -6
  280. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +0 -1
  281. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +0 -3
  282. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +0 -1
  283. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +0 -3
  284. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +0 -1
  285. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +0 -2
  286. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +0 -1
  287. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +0 -30
  288. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +0 -1
  289. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +0 -16
  290. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +0 -1
  291. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +0 -16
  292. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +0 -1
  293. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +0 -30
  294. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAiB;AAClC,YAAY,EAAE,WAAW,EAAE,2BAAuB"}
@@ -0,0 +1,2 @@
1
+ export { BoxRow } from "./BoxRow.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAiB","sourcesContent":["export { BoxRow } from './BoxRow';\nexport type { BoxRowProps } from './BoxRow.types';\n"]}
@@ -10,7 +10,7 @@ const react_1 = __importDefault(require("react"));
10
10
  const react_native_safe_area_context_1 = require("react-native-safe-area-context");
11
11
  // External dependencies.
12
12
  const Box_1 = require("../Box/index.cjs");
13
- const BoxHorizontal_1 = require("../BoxHorizontal/index.cjs");
13
+ const BoxRow_1 = require("../BoxRow/index.cjs");
14
14
  const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
15
15
  const Text_1 = require("../Text/index.cjs");
16
16
  const HeaderRoot = ({ children, title, titleProps, titleAccessory, endAccessory, endButtonIconProps, includesTopInset = false, style, testID, twClassName, ...viewProps }) => {
@@ -38,12 +38,12 @@ const HeaderRoot = ({ children, title, titleProps, titleAccessory, endAccessory,
38
38
  }
39
39
  if (shouldRenderTitleRow) {
40
40
  const titleNode = (0, design_system_shared_1.isReactNodeRenderable)(title) && title !== '' ? title : null;
41
- return (<BoxHorizontal_1.BoxHorizontal endAccessory={titleAccessory} textProps={{
41
+ return (<BoxRow_1.BoxRow endAccessory={titleAccessory} textProps={{
42
42
  variant: Text_1.TextVariant.HeadingLg,
43
43
  ...titleProps,
44
44
  }}>
45
45
  {titleNode}
46
- </BoxHorizontal_1.BoxHorizontal>);
46
+ </BoxRow_1.BoxRow>);
47
47
  }
48
48
  return null;
49
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderRoot.cjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":";;;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AE,IAAI,EAAE,CAAC,EAAE,CAAC,CACvD;QAAA,CAAC,iBAAiB,EAAE,CACtB;MAAA,EAAE,SAAG,CACL;MAAA,CAAC,aAAa,CAAC,CAAC,CAAC,CACf,CAAC,SAAG,CAAC,aAAa,CAAC,CAAC,sBAAgB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAC/C;UAAA,CAAC,iBAAiB,CACpB;QAAA,EAAE,SAAG,CAAC,CACP,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAxFW,QAAA,UAAU,cAwFrB;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["// Third party dependencies.\nimport { isReactNodeRenderable } from '@metamask/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.cjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,yEAAuE;AACvE,kDAA0B;AAC1B,mFAAmE;AAEnE,yBAAyB;AACzB,0CAA8D;AAC9D,gDAAmC;AACnC,wDAA2D;AAC3D,4CAAsC;AAK/B,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,IAAA,kDAAiB,GAAE,CAAC;IAEnC,MAAM,qBAAqB,GAAG,IAA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AC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["// Third party dependencies.\nimport { isReactNodeRenderable } from '@metamask/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"]}
@@ -11,7 +11,7 @@ const React = $importDefault($React);
11
11
  import { useSafeAreaInsets } from "react-native-safe-area-context";
12
12
  // External dependencies.
13
13
  import { Box, BoxAlignItems, BoxFlexDirection } from "../Box/index.mjs";
14
- import { BoxHorizontal } from "../BoxHorizontal/index.mjs";
14
+ import { BoxRow } from "../BoxRow/index.mjs";
15
15
  import { ButtonIcon, ButtonIconSize } from "../ButtonIcon/index.mjs";
16
16
  import { TextVariant } from "../Text/index.mjs";
17
17
  export const HeaderRoot = ({ children, title, titleProps, titleAccessory, endAccessory, endButtonIconProps, includesTopInset = false, style, testID, twClassName, ...viewProps }) => {
@@ -39,12 +39,12 @@ export const HeaderRoot = ({ children, title, titleProps, titleAccessory, endAcc
39
39
  }
40
40
  if (shouldRenderTitleRow) {
41
41
  const titleNode = isReactNodeRenderable(title) && title !== '' ? title : null;
42
- return (<BoxHorizontal endAccessory={titleAccessory} textProps={{
42
+ return (<BoxRow endAccessory={titleAccessory} textProps={{
43
43
  variant: TextVariant.HeadingLg,
44
44
  ...titleProps,
45
45
  }}>
46
46
  {titleNode}
47
- </BoxHorizontal>);
47
+ </BoxRow>);
48
48
  }
49
49
  return null;
50
50
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderRoot.mjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/HeaderRoot.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,qBAAqB,EAAE,uCAAuC;AACvE,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,iBA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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/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,uCAAuC;AACvE,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,EACz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,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/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/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,yEAAqE;AACrE,kDAA0B;AAE1B,0CAA6B;AAC7B,gDAAkD;AAClD,wDAA2D;AAC3D,4CAAmC;AACnC,kEAAqD;AAKrD,MAAM,YAAY,GAAG,QAAQ,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACI,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IACjE,MAAM,eAAe,GAAG,4BAA4B,CAAC;IAErD,IAAI,KAAK,CAAC,OAAO,KAAK,0CAAmB,CAAC,MAAM,EAAE;QAChD,MAAM,EACJ,OAAO,EAAE,QAAQ,EACjB,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,GAAG,cAAc,EAClB,GAAG,KAAK,CAAC;QAEV,OAAO,CACL,CAAC,SAAG,CACF,IAAI,cAAc,CAAC,CACnB,WAAW,CAAC,CACV,WAAW;gBACT,CAAC,CAAC,GAAG,eAAe,oBAAoB,WAAW,EAAE;gBACrD,CAAC,CAAC,GAAG,eAAe,kBAAkB,CACzC,CAED;QAAA,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,2BAAc,CAAC,EAAE,CAAC,CACxB,IAAI,eAAe,CAAC,CACpB,QAAQ,CAAC,CAAC,eAAQ,CAAC,SAAS,CAAC,CAC7B,OAAO,CAAC,CAAC,iBAAiB,CAAC,EAE7B;QAAA,CAAC,iCAAe,C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from '@metamask/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/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":";;;;;;AA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AC,CACP,CAAC;KACH;IAED,MAAM,EACJ,OAAO,EAAE,QAAQ,EACjB,oBAAoB,EACpB,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,GAAG,cAAc,EAClB,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,CAAC,GAAG,CACF,IAAI,cAAc,CAAC,CACnB,WAAW,CAAC,CACV,WAAW;YACT,CAAC,CAAC,GAAG,eAAe,SAAS,WAAW,EAAE;YAC1C,CAAC,CAAC,GAAG,eAAe,OAAO,CAC9B,CAED;MAAA,CAAC,eAAe,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,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/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/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/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,uCAAuC;AAExC,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/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,uCAAuC;AAExC,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/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/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,uEAKwC;AAJtC,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/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/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,uCAAuC;AACxC,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/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,uCAAuC;AACxC,OAAO,EAAE,YAAY,EAAE,2BAAuB;AAC9C,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,GACxB,iCAA6B"}
@@ -0,0 +1,3 @@
1
+ export { HeaderSearchVariant } from "@metamask/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,uCAAuC;AACxC,OAAO,EAAE,YAAY,EAAE,2BAAuB","sourcesContent":["export {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from '@metamask/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,M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AC,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,I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\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"]}