@metamask-previews/design-system-react-native 0.15.0-preview.a73a010 → 0.16.0-preview.d854123

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 (283) hide show
  1. package/CHANGELOG.md +17 -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/BannerAlert/BannerAlert.cjs +1 -2
  9. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
  10. package/dist/components/BannerAlert/BannerAlert.constants.cjs +16 -16
  11. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  12. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
  13. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  14. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
  15. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  16. package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
  17. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  18. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
  19. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
  20. package/dist/components/BannerAlert/BannerAlert.mjs +1 -2
  21. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
  22. package/dist/components/BannerBase/BannerBase.cjs +2 -2
  23. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  24. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  25. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  26. package/dist/components/BannerBase/BannerBase.mjs +2 -2
  27. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  28. package/dist/components/Box/Box.constants.cjs.map +1 -1
  29. package/dist/components/Box/Box.constants.d.cts +1 -1
  30. package/dist/components/Box/Box.constants.d.cts.map +1 -1
  31. package/dist/components/Box/Box.constants.d.mts +1 -1
  32. package/dist/components/Box/Box.constants.d.mts.map +1 -1
  33. package/dist/components/Box/Box.constants.mjs.map +1 -1
  34. package/dist/components/Box/Box.types.cjs.map +1 -1
  35. package/dist/components/Box/Box.types.d.cts +107 -3
  36. package/dist/components/Box/Box.types.d.cts.map +1 -1
  37. package/dist/components/Box/Box.types.d.mts +107 -3
  38. package/dist/components/Box/Box.types.d.mts.map +1 -1
  39. package/dist/components/Box/Box.types.mjs.map +1 -1
  40. package/dist/components/Box/index.cjs +7 -7
  41. package/dist/components/Box/index.cjs.map +1 -1
  42. package/dist/components/Box/index.d.cts +2 -1
  43. package/dist/components/Box/index.d.cts.map +1 -1
  44. package/dist/components/Box/index.d.mts +2 -1
  45. package/dist/components/Box/index.d.mts.map +1 -1
  46. package/dist/components/Box/index.mjs +1 -1
  47. package/dist/components/Box/index.mjs.map +1 -1
  48. package/dist/components/{BoxVertical/BoxVertical.cjs → BoxColumn/BoxColumn.cjs} +6 -6
  49. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -0
  50. package/dist/components/BoxColumn/BoxColumn.d.cts +7 -0
  51. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -0
  52. package/dist/components/BoxColumn/BoxColumn.d.mts +7 -0
  53. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -0
  54. package/dist/components/{BoxVertical/BoxVertical.mjs → BoxColumn/BoxColumn.mjs} +4 -4
  55. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -0
  56. package/dist/components/{BoxVertical/BoxVertical.types.cjs → BoxColumn/BoxColumn.types.cjs} +1 -1
  57. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -0
  58. package/dist/components/BoxColumn/BoxColumn.types.d.cts +13 -0
  59. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -0
  60. package/dist/components/BoxColumn/BoxColumn.types.d.mts +13 -0
  61. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -0
  62. package/dist/components/BoxColumn/BoxColumn.types.mjs +2 -0
  63. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -0
  64. package/dist/components/BoxColumn/index.cjs +6 -0
  65. package/dist/components/BoxColumn/index.cjs.map +1 -0
  66. package/dist/components/BoxColumn/index.d.cts +3 -0
  67. package/dist/components/BoxColumn/index.d.cts.map +1 -0
  68. package/dist/components/BoxColumn/index.d.mts +3 -0
  69. package/dist/components/BoxColumn/index.d.mts.map +1 -0
  70. package/dist/components/BoxColumn/index.mjs +2 -0
  71. package/dist/components/BoxColumn/index.mjs.map +1 -0
  72. package/dist/components/{BoxHorizontal/BoxHorizontal.cjs → BoxRow/BoxRow.cjs} +6 -6
  73. package/dist/components/BoxRow/BoxRow.cjs.map +1 -0
  74. package/dist/components/BoxRow/BoxRow.d.cts +7 -0
  75. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -0
  76. package/dist/components/BoxRow/BoxRow.d.mts +7 -0
  77. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -0
  78. package/dist/components/{BoxHorizontal/BoxHorizontal.mjs → BoxRow/BoxRow.mjs} +4 -4
  79. package/dist/components/BoxRow/BoxRow.mjs.map +1 -0
  80. package/dist/components/{BoxHorizontal/BoxHorizontal.types.cjs → BoxRow/BoxRow.types.cjs} +1 -1
  81. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -0
  82. package/dist/components/BoxRow/BoxRow.types.d.cts +13 -0
  83. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -0
  84. package/dist/components/BoxRow/BoxRow.types.d.mts +13 -0
  85. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -0
  86. package/dist/components/BoxRow/BoxRow.types.mjs +2 -0
  87. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -0
  88. package/dist/components/BoxRow/index.cjs +6 -0
  89. package/dist/components/BoxRow/index.cjs.map +1 -0
  90. package/dist/components/BoxRow/index.d.cts +3 -0
  91. package/dist/components/BoxRow/index.d.cts.map +1 -0
  92. package/dist/components/BoxRow/index.d.mts +3 -0
  93. package/dist/components/BoxRow/index.d.mts.map +1 -0
  94. package/dist/components/BoxRow/index.mjs +2 -0
  95. package/dist/components/BoxRow/index.mjs.map +1 -0
  96. package/dist/components/HeaderRoot/HeaderRoot.cjs +3 -3
  97. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  98. package/dist/components/HeaderRoot/HeaderRoot.mjs +3 -3
  99. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  100. package/dist/components/HeaderSearch/HeaderSearch.cjs +80 -0
  101. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -0
  102. package/dist/components/HeaderSearch/HeaderSearch.d.cts +37 -0
  103. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -0
  104. package/dist/components/HeaderSearch/HeaderSearch.d.mts +37 -0
  105. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -0
  106. package/dist/components/HeaderSearch/HeaderSearch.mjs +80 -0
  107. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -0
  108. package/dist/components/HeaderSearch/HeaderSearch.types.cjs +3 -0
  109. package/dist/components/HeaderSearch/HeaderSearch.types.cjs.map +1 -0
  110. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts +33 -0
  111. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts.map +1 -0
  112. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts +33 -0
  113. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts.map +1 -0
  114. package/dist/components/HeaderSearch/HeaderSearch.types.mjs +2 -0
  115. package/dist/components/HeaderSearch/HeaderSearch.types.mjs.map +1 -0
  116. package/dist/components/HeaderSearch/index.cjs +8 -0
  117. package/dist/components/HeaderSearch/index.cjs.map +1 -0
  118. package/dist/components/HeaderSearch/index.d.cts +4 -0
  119. package/dist/components/HeaderSearch/index.d.cts.map +1 -0
  120. package/dist/components/HeaderSearch/index.d.mts +4 -0
  121. package/dist/components/HeaderSearch/index.d.mts.map +1 -0
  122. package/dist/components/HeaderSearch/index.mjs +3 -0
  123. package/dist/components/HeaderSearch/index.mjs.map +1 -0
  124. package/dist/components/HeaderStandard/HeaderStandard.cjs +3 -3
  125. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  126. package/dist/components/HeaderStandard/HeaderStandard.mjs +3 -3
  127. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  128. package/dist/components/Icon/Icon.assets.cjs +285 -281
  129. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  130. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  131. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  132. package/dist/components/Icon/Icon.assets.mjs +6 -2
  133. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  134. package/dist/components/Icon/Icon.cjs +2 -2
  135. package/dist/components/Icon/Icon.cjs.map +1 -1
  136. package/dist/components/Icon/Icon.constants.cjs +6 -6
  137. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  138. package/dist/components/Icon/Icon.constants.d.cts +1 -1
  139. package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
  140. package/dist/components/Icon/Icon.constants.d.mts +1 -1
  141. package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
  142. package/dist/components/Icon/Icon.constants.mjs +1 -1
  143. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  144. package/dist/components/Icon/Icon.d.cts.map +1 -1
  145. package/dist/components/Icon/Icon.d.mts.map +1 -1
  146. package/dist/components/Icon/Icon.mjs +1 -1
  147. package/dist/components/Icon/Icon.mjs.map +1 -1
  148. package/dist/components/Icon/Icon.types.cjs.map +1 -1
  149. package/dist/components/Icon/Icon.types.d.cts +2 -2
  150. package/dist/components/Icon/Icon.types.d.cts.map +1 -1
  151. package/dist/components/Icon/Icon.types.d.mts +2 -2
  152. package/dist/components/Icon/Icon.types.d.mts.map +1 -1
  153. package/dist/components/Icon/Icon.types.mjs.map +1 -1
  154. package/dist/components/Icon/assets/after-hours.svg +1 -1
  155. package/dist/components/Icon/assets/pop-up.svg +1 -0
  156. package/dist/components/Icon/assets/side-panel.svg +1 -0
  157. package/dist/components/Icon/index.cjs +4 -4
  158. package/dist/components/Icon/index.cjs.map +1 -1
  159. package/dist/components/Icon/index.d.cts +1 -1
  160. package/dist/components/Icon/index.d.cts.map +1 -1
  161. package/dist/components/Icon/index.d.mts +1 -1
  162. package/dist/components/Icon/index.d.mts.map +1 -1
  163. package/dist/components/Icon/index.mjs +1 -1
  164. package/dist/components/Icon/index.mjs.map +1 -1
  165. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +8 -8
  166. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  167. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +8 -8
  168. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  169. package/dist/components/KeyValueRow/KeyValueRow.cjs +43 -64
  170. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  171. package/dist/components/KeyValueRow/KeyValueRow.d.cts +3 -20
  172. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  173. package/dist/components/KeyValueRow/KeyValueRow.d.mts +3 -20
  174. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  175. package/dist/components/KeyValueRow/KeyValueRow.mjs +42 -63
  176. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  177. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +0 -26
  178. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -1
  179. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +14 -174
  180. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  181. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +14 -174
  182. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  183. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +1 -25
  184. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -1
  185. package/dist/components/KeyValueRow/index.cjs +3 -7
  186. package/dist/components/KeyValueRow/index.cjs.map +1 -1
  187. package/dist/components/KeyValueRow/index.d.cts +3 -2
  188. package/dist/components/KeyValueRow/index.d.cts.map +1 -1
  189. package/dist/components/KeyValueRow/index.d.mts +3 -2
  190. package/dist/components/KeyValueRow/index.d.mts.map +1 -1
  191. package/dist/components/KeyValueRow/index.mjs +2 -2
  192. package/dist/components/KeyValueRow/index.mjs.map +1 -1
  193. package/dist/components/index.cjs +13 -7
  194. package/dist/components/index.cjs.map +1 -1
  195. package/dist/components/index.d.cts +8 -4
  196. package/dist/components/index.d.cts.map +1 -1
  197. package/dist/components/index.d.mts +8 -4
  198. package/dist/components/index.d.mts.map +1 -1
  199. package/dist/components/index.mjs +4 -2
  200. package/dist/components/index.mjs.map +1 -1
  201. package/dist/types/index.cjs +177 -354
  202. package/dist/types/index.cjs.map +1 -1
  203. package/dist/types/index.d.cts +175 -344
  204. package/dist/types/index.d.cts.map +1 -1
  205. package/dist/types/index.d.mts +175 -344
  206. package/dist/types/index.d.mts.map +1 -1
  207. package/dist/types/index.mjs +173 -353
  208. package/dist/types/index.mjs.map +1 -1
  209. package/package.json +5 -6
  210. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +0 -1
  211. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +0 -7
  212. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +0 -1
  213. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +0 -7
  214. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +0 -1
  215. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +0 -1
  216. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +0 -1
  217. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +0 -13
  218. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +0 -1
  219. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +0 -13
  220. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +0 -1
  221. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +0 -2
  222. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +0 -1
  223. package/dist/components/BoxHorizontal/index.cjs +0 -6
  224. package/dist/components/BoxHorizontal/index.cjs.map +0 -1
  225. package/dist/components/BoxHorizontal/index.d.cts +0 -3
  226. package/dist/components/BoxHorizontal/index.d.cts.map +0 -1
  227. package/dist/components/BoxHorizontal/index.d.mts +0 -3
  228. package/dist/components/BoxHorizontal/index.d.mts.map +0 -1
  229. package/dist/components/BoxHorizontal/index.mjs +0 -2
  230. package/dist/components/BoxHorizontal/index.mjs.map +0 -1
  231. package/dist/components/BoxVertical/BoxVertical.cjs.map +0 -1
  232. package/dist/components/BoxVertical/BoxVertical.d.cts +0 -7
  233. package/dist/components/BoxVertical/BoxVertical.d.cts.map +0 -1
  234. package/dist/components/BoxVertical/BoxVertical.d.mts +0 -7
  235. package/dist/components/BoxVertical/BoxVertical.d.mts.map +0 -1
  236. package/dist/components/BoxVertical/BoxVertical.mjs.map +0 -1
  237. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +0 -1
  238. package/dist/components/BoxVertical/BoxVertical.types.d.cts +0 -13
  239. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +0 -1
  240. package/dist/components/BoxVertical/BoxVertical.types.d.mts +0 -13
  241. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +0 -1
  242. package/dist/components/BoxVertical/BoxVertical.types.mjs +0 -2
  243. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +0 -1
  244. package/dist/components/BoxVertical/index.cjs +0 -6
  245. package/dist/components/BoxVertical/index.cjs.map +0 -1
  246. package/dist/components/BoxVertical/index.d.cts +0 -3
  247. package/dist/components/BoxVertical/index.d.cts.map +0 -1
  248. package/dist/components/BoxVertical/index.d.mts +0 -3
  249. package/dist/components/BoxVertical/index.d.mts.map +0 -1
  250. package/dist/components/BoxVertical/index.mjs +0 -2
  251. package/dist/components/BoxVertical/index.mjs.map +0 -1
  252. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +0 -34
  253. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +0 -1
  254. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +0 -13
  255. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +0 -1
  256. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +0 -13
  257. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +0 -1
  258. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +0 -34
  259. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +0 -1
  260. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +0 -40
  261. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +0 -1
  262. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +0 -24
  263. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +0 -1
  264. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +0 -24
  265. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +0 -1
  266. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +0 -40
  267. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +0 -1
  268. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +0 -6
  269. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +0 -1
  270. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +0 -3
  271. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +0 -1
  272. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +0 -3
  273. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +0 -1
  274. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +0 -2
  275. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +0 -1
  276. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +0 -30
  277. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +0 -1
  278. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +0 -16
  279. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +0 -1
  280. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +0 -16
  281. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +0 -1
  282. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +0 -30
  283. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxRow.types.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxRowPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text';\n\n/**\n * BoxRow component props.\n */\nexport type BoxRowProps = BoxRowPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `Text` when `children` is a string.\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n };\n"]}
@@ -0,0 +1,13 @@
1
+ import type { BoxRowPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BoxProps } from "../Box/Box.types.cjs";
3
+ import type { TextProps } from "../Text/index.cjs";
4
+ /**
5
+ * BoxRow component props.
6
+ */
7
+ export type BoxRowProps = BoxRowPropsShared & Omit<BoxProps, 'children' | 'flexDirection'> & {
8
+ /**
9
+ * Optional props passed to `Text` when `children` is a string.
10
+ */
11
+ textProps?: Omit<Partial<TextProps>, 'children'>;
12
+ };
13
+ //# sourceMappingURL=BoxRow.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxRow.types.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AAEjF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { BoxRowPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BoxProps } from "../Box/Box.types.mjs";
3
+ import type { TextProps } from "../Text/index.mjs";
4
+ /**
5
+ * BoxRow component props.
6
+ */
7
+ export type BoxRowProps = BoxRowPropsShared & Omit<BoxProps, 'children' | 'flexDirection'> & {
8
+ /**
9
+ * Optional props passed to `Text` when `children` is a string.
10
+ */
11
+ textProps?: Omit<Partial<TextProps>, 'children'>;
12
+ };
13
+ //# sourceMappingURL=BoxRow.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxRow.types.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AAEjF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=BoxRow.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BoxRow.types.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxRowPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text';\n\n/**\n * BoxRow component props.\n */\nexport type BoxRowProps = BoxRowPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `Text` when `children` is a string.\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n };\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BoxRow = void 0;
4
+ var BoxRow_1 = require("./BoxRow.cjs");
5
+ Object.defineProperty(exports, "BoxRow", { enumerable: true, get: function () { return BoxRow_1.BoxRow; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/index.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAAzB,gGAAA,MAAM,OAAA","sourcesContent":["export { BoxRow } from './BoxRow';\nexport type { BoxRowProps } from './BoxRow.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { BoxRow } from "./BoxRow.cjs";
2
+ export type { BoxRowProps } from "./BoxRow.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,qBAAiB;AAClC,YAAY,EAAE,WAAW,EAAE,2BAAuB"}
@@ -0,0 +1,3 @@
1
+ export { BoxRow } from "./BoxRow.mjs";
2
+ export type { BoxRowProps } from "./BoxRow.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -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":";;;;;;AAAA,4BAA4B;AAC5B,kFAAgF;AAChF,kDAA0B;AAC1B,mFAAmE;AAEnE,yBAAyB;AACzB,0CAA8D;AAC9D,8DAAiD;AACjD,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,IAAA,4CAAqB,EAAC,QAAQ,CAAC,CAAC;IAE9D,MAAM,eAAe,GACnB,KAAK,KAAK,KAAK;QACf,CAAC,IAAA,4CAAqB,EAAC,KAAK,CAAC,IAAI,IAAA,4CAAqB,EAAC,cAAc,CAAC,CAAC,CAAC;IAE1E,MAAM,oBAAoB,GAAG,CAAC,qBAAqB,IAAI,eAAe,CAAC;IAEvE,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE;QAC9B,IAAI,YAAY,EAAE;YAChB,OAAO,YAAY,CAAC;SACrB;QACD,IAAI,kBAAkB,IAAI,kBAAkB,CAAC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AAC,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,SAAG,CAAC,UAAU,CAAC,CAAC,mBAAa,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,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-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.cjs","sourceRoot":"","sources":["../../../src/components/HeaderRoot/Hea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C,KAAK,CAAC,CAAC,EAAE,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-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"]}
@@ -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,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,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;QAC9B,IA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AG,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 { 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.m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AAgB,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,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,WA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,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,IAAI,KAAK,CAAC,OAAO,KAAK,mBAAmB,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,GAAG,CACF,IAAI,cAAc,CAAC,CACnB,WAAW,CAAC,CACV,WAAW;gBACT,CAAC,CAAC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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