@metamask/design-system-react-native 0.24.0 → 0.25.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 +17 -1
  2. package/dist/components/BannerBase/BannerBase.cjs +3 -12
  3. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  4. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  5. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  6. package/dist/components/BannerBase/BannerBase.mjs +3 -12
  7. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  8. package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -1
  9. package/dist/components/BannerBase/BannerBase.types.d.cts +2 -7
  10. package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -1
  11. package/dist/components/BannerBase/BannerBase.types.d.mts +2 -7
  12. package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -1
  13. package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -1
  14. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +1 -17
  15. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
  16. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.cts.map +1 -1
  17. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.mts.map +1 -1
  18. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs +1 -17
  19. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
  20. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +1 -17
  21. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
  22. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.cts.map +1 -1
  23. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.mts.map +1 -1
  24. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs +1 -17
  25. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
  26. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +1 -17
  27. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
  28. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
  29. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
  30. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +1 -17
  31. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
  32. package/dist/components/ButtonBase/ButtonBase.cjs +42 -28
  33. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  34. package/dist/components/ButtonBase/ButtonBase.constants.cjs +31 -1
  35. package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
  36. package/dist/components/ButtonBase/ButtonBase.constants.d.cts +6 -1
  37. package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
  38. package/dist/components/ButtonBase/ButtonBase.constants.d.mts +6 -1
  39. package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
  40. package/dist/components/ButtonBase/ButtonBase.constants.mjs +29 -1
  41. package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
  42. package/dist/components/ButtonBase/ButtonBase.d.cts +1 -1
  43. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  44. package/dist/components/ButtonBase/ButtonBase.d.mts +1 -1
  45. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  46. package/dist/components/ButtonBase/ButtonBase.mjs +45 -31
  47. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  48. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  49. package/dist/components/ButtonBase/ButtonBase.types.d.cts +12 -0
  50. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  51. package/dist/components/ButtonBase/ButtonBase.types.d.mts +12 -0
  52. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  53. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  54. package/dist/components/ButtonSemantic/ButtonSemantic.cjs +1 -17
  55. package/dist/components/ButtonSemantic/ButtonSemantic.cjs.map +1 -1
  56. package/dist/components/ButtonSemantic/ButtonSemantic.d.cts.map +1 -1
  57. package/dist/components/ButtonSemantic/ButtonSemantic.d.mts.map +1 -1
  58. package/dist/components/ButtonSemantic/ButtonSemantic.mjs +1 -17
  59. package/dist/components/ButtonSemantic/ButtonSemantic.mjs.map +1 -1
  60. package/dist/components/HeaderStandard/HeaderStandard.cjs +2 -26
  61. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  62. package/dist/components/HeaderStandard/HeaderStandard.d.cts.map +1 -1
  63. package/dist/components/HeaderStandard/HeaderStandard.d.mts.map +1 -1
  64. package/dist/components/HeaderStandard/HeaderStandard.mjs +2 -26
  65. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  66. package/dist/components/HeaderStandard/HeaderStandard.types.cjs +0 -5
  67. package/dist/components/HeaderStandard/HeaderStandard.types.cjs.map +1 -1
  68. package/dist/components/HeaderStandard/HeaderStandard.types.d.cts +2 -28
  69. package/dist/components/HeaderStandard/HeaderStandard.types.d.cts.map +1 -1
  70. package/dist/components/HeaderStandard/HeaderStandard.types.d.mts +2 -28
  71. package/dist/components/HeaderStandard/HeaderStandard.types.d.mts.map +1 -1
  72. package/dist/components/HeaderStandard/HeaderStandard.types.mjs +1 -9
  73. package/dist/components/HeaderStandard/HeaderStandard.types.mjs.map +1 -1
  74. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs +63 -0
  75. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.cjs.map +1 -0
  76. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.cts +4 -0
  77. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.cts.map +1 -0
  78. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.mts +4 -0
  79. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.d.mts.map +1 -0
  80. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.mjs +40 -0
  81. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.mjs.map +1 -0
  82. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.cjs +3 -0
  83. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.cjs.map +1 -0
  84. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.cts +31 -0
  85. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.cts.map +1 -0
  86. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.mts +31 -0
  87. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.d.mts.map +1 -0
  88. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.mjs +2 -0
  89. package/dist/components/HeaderStandardAnimated/HeaderStandardAnimated.types.mjs.map +1 -0
  90. package/dist/components/HeaderStandardAnimated/index.cjs +8 -0
  91. package/dist/components/HeaderStandardAnimated/index.cjs.map +1 -0
  92. package/dist/components/HeaderStandardAnimated/index.d.cts +4 -0
  93. package/dist/components/HeaderStandardAnimated/index.d.cts.map +1 -0
  94. package/dist/components/HeaderStandardAnimated/index.d.mts +4 -0
  95. package/dist/components/HeaderStandardAnimated/index.d.mts.map +1 -0
  96. package/dist/components/HeaderStandardAnimated/index.mjs +3 -0
  97. package/dist/components/HeaderStandardAnimated/index.mjs.map +1 -0
  98. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +62 -0
  99. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -0
  100. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts +39 -0
  101. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts.map +1 -0
  102. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts +39 -0
  103. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts.map +1 -0
  104. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs +57 -0
  105. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs.map +1 -0
  106. package/dist/components/Input/Input.cjs +25 -14
  107. package/dist/components/Input/Input.cjs.map +1 -1
  108. package/dist/components/Input/Input.d.cts.map +1 -1
  109. package/dist/components/Input/Input.d.mts.map +1 -1
  110. package/dist/components/Input/Input.mjs +25 -14
  111. package/dist/components/Input/Input.mjs.map +1 -1
  112. package/dist/components/SegmentButton/SegmentButton.cjs +86 -0
  113. package/dist/components/SegmentButton/SegmentButton.cjs.map +1 -0
  114. package/dist/components/SegmentButton/SegmentButton.d.cts +7 -0
  115. package/dist/components/SegmentButton/SegmentButton.d.cts.map +1 -0
  116. package/dist/components/SegmentButton/SegmentButton.d.mts +7 -0
  117. package/dist/components/SegmentButton/SegmentButton.d.mts.map +1 -0
  118. package/dist/components/SegmentButton/SegmentButton.mjs +66 -0
  119. package/dist/components/SegmentButton/SegmentButton.mjs.map +1 -0
  120. package/dist/components/SegmentButton/SegmentButton.types.cjs +3 -0
  121. package/dist/components/SegmentButton/SegmentButton.types.cjs.map +1 -0
  122. package/dist/components/SegmentButton/SegmentButton.types.d.cts +9 -0
  123. package/dist/components/SegmentButton/SegmentButton.types.d.cts.map +1 -0
  124. package/dist/components/SegmentButton/SegmentButton.types.d.mts +9 -0
  125. package/dist/components/SegmentButton/SegmentButton.types.d.mts.map +1 -0
  126. package/dist/components/SegmentButton/SegmentButton.types.mjs +2 -0
  127. package/dist/components/SegmentButton/SegmentButton.types.mjs.map +1 -0
  128. package/dist/components/SegmentButton/index.cjs +8 -0
  129. package/dist/components/SegmentButton/index.cjs.map +1 -0
  130. package/dist/components/SegmentButton/index.d.cts +4 -0
  131. package/dist/components/SegmentButton/index.d.cts.map +1 -0
  132. package/dist/components/SegmentButton/index.d.mts +4 -0
  133. package/dist/components/SegmentButton/index.d.mts.map +1 -0
  134. package/dist/components/SegmentButton/index.mjs +3 -0
  135. package/dist/components/SegmentButton/index.mjs.map +1 -0
  136. package/dist/components/SegmentGroup/SegmentGroup.cjs +47 -0
  137. package/dist/components/SegmentGroup/SegmentGroup.cjs.map +1 -0
  138. package/dist/components/SegmentGroup/SegmentGroup.d.cts +7 -0
  139. package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +1 -0
  140. package/dist/components/SegmentGroup/SegmentGroup.d.mts +7 -0
  141. package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +1 -0
  142. package/dist/components/SegmentGroup/SegmentGroup.mjs +27 -0
  143. package/dist/components/SegmentGroup/SegmentGroup.mjs.map +1 -0
  144. package/dist/components/SegmentGroup/SegmentGroup.types.cjs +3 -0
  145. package/dist/components/SegmentGroup/SegmentGroup.types.cjs.map +1 -0
  146. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +12 -0
  147. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +1 -0
  148. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +12 -0
  149. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +1 -0
  150. package/dist/components/SegmentGroup/SegmentGroup.types.mjs +2 -0
  151. package/dist/components/SegmentGroup/SegmentGroup.types.mjs.map +1 -0
  152. package/dist/components/SegmentGroup/index.cjs +6 -0
  153. package/dist/components/SegmentGroup/index.cjs.map +1 -0
  154. package/dist/components/SegmentGroup/index.d.cts +3 -0
  155. package/dist/components/SegmentGroup/index.d.cts.map +1 -0
  156. package/dist/components/SegmentGroup/index.d.mts +3 -0
  157. package/dist/components/SegmentGroup/index.d.mts.map +1 -0
  158. package/dist/components/SegmentGroup/index.mjs +2 -0
  159. package/dist/components/SegmentGroup/index.mjs.map +1 -0
  160. package/dist/components/SelectButton/SelectButton.cjs +53 -0
  161. package/dist/components/SelectButton/SelectButton.cjs.map +1 -0
  162. package/dist/components/SelectButton/SelectButton.constants.cjs +12 -0
  163. package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -0
  164. package/dist/components/SelectButton/SelectButton.constants.d.cts +4 -0
  165. package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -0
  166. package/dist/components/SelectButton/SelectButton.constants.d.mts +4 -0
  167. package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -0
  168. package/dist/components/SelectButton/SelectButton.constants.mjs +9 -0
  169. package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -0
  170. package/dist/components/SelectButton/SelectButton.d.cts +7 -0
  171. package/dist/components/SelectButton/SelectButton.d.cts.map +1 -0
  172. package/dist/components/SelectButton/SelectButton.d.mts +7 -0
  173. package/dist/components/SelectButton/SelectButton.d.mts.map +1 -0
  174. package/dist/components/SelectButton/SelectButton.mjs +53 -0
  175. package/dist/components/SelectButton/SelectButton.mjs.map +1 -0
  176. package/dist/components/SelectButton/SelectButton.types.cjs +3 -0
  177. package/dist/components/SelectButton/SelectButton.types.cjs.map +1 -0
  178. package/dist/components/SelectButton/SelectButton.types.d.cts +13 -0
  179. package/dist/components/SelectButton/SelectButton.types.d.cts.map +1 -0
  180. package/dist/components/SelectButton/SelectButton.types.d.mts +13 -0
  181. package/dist/components/SelectButton/SelectButton.types.d.mts.map +1 -0
  182. package/dist/components/SelectButton/SelectButton.types.mjs +2 -0
  183. package/dist/components/SelectButton/SelectButton.types.mjs.map +1 -0
  184. package/dist/components/SelectButton/index.cjs +9 -0
  185. package/dist/components/SelectButton/index.cjs.map +1 -0
  186. package/dist/components/SelectButton/index.d.cts +4 -0
  187. package/dist/components/SelectButton/index.d.cts.map +1 -0
  188. package/dist/components/SelectButton/index.d.mts +4 -0
  189. package/dist/components/SelectButton/index.d.mts.map +1 -0
  190. package/dist/components/SelectButton/index.mjs +3 -0
  191. package/dist/components/SelectButton/index.mjs.map +1 -0
  192. package/dist/components/SensitiveText/SensitiveText.cjs +4 -4
  193. package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -1
  194. package/dist/components/SensitiveText/SensitiveText.d.cts.map +1 -1
  195. package/dist/components/SensitiveText/SensitiveText.d.mts.map +1 -1
  196. package/dist/components/SensitiveText/SensitiveText.mjs +1 -1
  197. package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -1
  198. package/dist/components/SensitiveText/SensitiveText.types.cjs.map +1 -1
  199. package/dist/components/SensitiveText/SensitiveText.types.d.cts +6 -34
  200. package/dist/components/SensitiveText/SensitiveText.types.d.cts.map +1 -1
  201. package/dist/components/SensitiveText/SensitiveText.types.d.mts +6 -34
  202. package/dist/components/SensitiveText/SensitiveText.types.d.mts.map +1 -1
  203. package/dist/components/SensitiveText/SensitiveText.types.mjs.map +1 -1
  204. package/dist/components/SensitiveText/index.cjs +3 -3
  205. package/dist/components/SensitiveText/index.cjs.map +1 -1
  206. package/dist/components/SensitiveText/index.d.cts +1 -1
  207. package/dist/components/SensitiveText/index.d.cts.map +1 -1
  208. package/dist/components/SensitiveText/index.d.mts +1 -1
  209. package/dist/components/SensitiveText/index.d.mts.map +1 -1
  210. package/dist/components/SensitiveText/index.mjs +1 -1
  211. package/dist/components/SensitiveText/index.mjs.map +1 -1
  212. package/dist/components/TextArea/TextArea.cjs +38 -0
  213. package/dist/components/TextArea/TextArea.cjs.map +1 -0
  214. package/dist/components/TextArea/TextArea.d.cts +166 -0
  215. package/dist/components/TextArea/TextArea.d.cts.map +1 -0
  216. package/dist/components/TextArea/TextArea.d.mts +166 -0
  217. package/dist/components/TextArea/TextArea.d.mts.map +1 -0
  218. package/dist/components/TextArea/TextArea.mjs +35 -0
  219. package/dist/components/TextArea/TextArea.mjs.map +1 -0
  220. package/dist/components/TextArea/TextArea.types.cjs +3 -0
  221. package/dist/components/TextArea/TextArea.types.cjs.map +1 -0
  222. package/dist/components/TextArea/TextArea.types.d.cts +63 -0
  223. package/dist/components/TextArea/TextArea.types.d.cts.map +1 -0
  224. package/dist/components/TextArea/TextArea.types.d.mts +63 -0
  225. package/dist/components/TextArea/TextArea.types.d.mts.map +1 -0
  226. package/dist/components/TextArea/TextArea.types.mjs +2 -0
  227. package/dist/components/TextArea/TextArea.types.mjs.map +1 -0
  228. package/dist/components/TextArea/index.cjs +6 -0
  229. package/dist/components/TextArea/index.cjs.map +1 -0
  230. package/dist/components/TextArea/index.d.cts +3 -0
  231. package/dist/components/TextArea/index.d.cts.map +1 -0
  232. package/dist/components/TextArea/index.d.mts +3 -0
  233. package/dist/components/TextArea/index.d.mts.map +1 -0
  234. package/dist/components/TextArea/index.mjs +2 -0
  235. package/dist/components/TextArea/index.mjs.map +1 -0
  236. package/dist/components/TextField/TextField.cjs +1 -2
  237. package/dist/components/TextField/TextField.cjs.map +1 -1
  238. package/dist/components/TextField/TextField.d.cts +8 -2
  239. package/dist/components/TextField/TextField.d.cts.map +1 -1
  240. package/dist/components/TextField/TextField.d.mts +8 -2
  241. package/dist/components/TextField/TextField.d.mts.map +1 -1
  242. package/dist/components/TextField/TextField.mjs +1 -2
  243. package/dist/components/TextField/TextField.mjs.map +1 -1
  244. package/dist/components/TextField/TextField.types.cjs.map +1 -1
  245. package/dist/components/TextField/TextField.types.d.cts +5 -1
  246. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  247. package/dist/components/TextField/TextField.types.d.mts +5 -1
  248. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  249. package/dist/components/TextField/TextField.types.mjs.map +1 -1
  250. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +8 -2
  251. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
  252. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +8 -2
  253. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
  254. package/dist/components/index.cjs +18 -2
  255. package/dist/components/index.cjs.map +1 -1
  256. package/dist/components/index.d.cts +12 -0
  257. package/dist/components/index.d.cts.map +1 -1
  258. package/dist/components/index.d.mts +12 -0
  259. package/dist/components/index.d.mts.map +1 -1
  260. package/dist/components/index.mjs +6 -0
  261. package/dist/components/index.mjs.map +1 -1
  262. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +36 -0
  263. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -0
  264. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts +4 -0
  265. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -0
  266. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts +4 -0
  267. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -0
  268. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +36 -0
  269. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -0
  270. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs +8 -0
  271. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs.map +1 -0
  272. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.cts +39 -0
  273. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.cts.map +1 -0
  274. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.mts +39 -0
  275. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.mts.map +1 -0
  276. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.mjs +10 -0
  277. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.mjs.map +1 -0
  278. package/dist/components/temp-components/HeaderStandardCenterColumn/index.cjs +6 -0
  279. package/dist/components/temp-components/HeaderStandardCenterColumn/index.cjs.map +1 -0
  280. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.cts +3 -0
  281. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.cts.map +1 -0
  282. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.mts +3 -0
  283. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.mts.map +1 -0
  284. package/dist/components/temp-components/HeaderStandardCenterColumn/index.mjs +2 -0
  285. package/dist/components/temp-components/HeaderStandardCenterColumn/index.mjs.map +1 -0
  286. package/package.json +2 -2
  287. package/dist/components/SensitiveText/SensitiveText.constants.cjs +0 -14
  288. package/dist/components/SensitiveText/SensitiveText.constants.cjs.map +0 -1
  289. package/dist/components/SensitiveText/SensitiveText.constants.d.cts +0 -11
  290. package/dist/components/SensitiveText/SensitiveText.constants.d.cts.map +0 -1
  291. package/dist/components/SensitiveText/SensitiveText.constants.d.mts +0 -11
  292. package/dist/components/SensitiveText/SensitiveText.constants.d.mts.map +0 -1
  293. package/dist/components/SensitiveText/SensitiveText.constants.mjs +0 -11
  294. package/dist/components/SensitiveText/SensitiveText.constants.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,uCAAuC;AAChE,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,OAAO,EAAE,cAAc;;AACvC,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAGpC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,0BAAgB;AACpD,OAAO,EAAE,cAAc,EAAE,oDAA0C;AACnE,OAAO,EAAE,OAAO,EAAE,6CAAmC;AACrD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,0BAAgB;AAEnE,OAAO,EAAE,oCAAoC,EAAE,mCAA+B;AAG9E,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EAC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C,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvG,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,IAAI,CACd,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,IAAI,WAAW,CAAC,CAAC,CAC9C;gBAAA,CAAC,YAAY,CACf;cAAA,EAAE,IAAI,CAAC,CACR,CACF,CACH;QAAA,GAAG,CACJ,CACH;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { ButtonBaseSize } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport { View } from 'react-native';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Icon, IconColor, IconSize } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\nimport { Text, TextVariant, FontWeight, TextColor } from '../Text';\n\nimport { TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION } from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center gap-x-2',\n // Visual styling\n 'rounded-xl bg-muted px-4 min-w-[80px] overflow-hidden',\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <View\n style={tw.style(\n 'absolute inset-0 flex items-center justify-center',\n )}\n testID=\"spinner-container\"\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n loadingTextProps={{\n numberOfLines: 1,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n {...spinnerProps}\n />\n </View>\n )}\n\n {/* Button content - opacity controlled individually on each child */}\n {finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {startAccessory}\n </View>\n )\n )}\n\n {typeof children === 'string' ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n color={TextColor.TextDefault}\n {...textProps}\n twClassName={`shrink grow-0 flex-wrap text-center ${isLoading ? 'opacity-0' : ''} ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`}\n >\n {children}\n </Text>\n ) : (\n <View style={tw.style(isLoading && 'opacity-0')}>{children}</View>\n )}\n\n {finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={IconSize.Sm}\n twClassName={`shrink-0 ${isLoading ? 'opacity-0' : ''} ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory && (\n <View style={tw.style(isLoading && 'opacity-0')}>\n {endAccessory}\n </View>\n )\n )}\n </>\n )}\n </ButtonAnimated>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonBase.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,cAAc,EACd,UAAU,EACV,SAAS,EACV,uCAAuC;AACxC,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,O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AC,kBAAkB,CAAC,CACzB,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,WAAW,CAAC,CAAC,YAAY,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvE,IAAI,cAAc,CAAC,EACnB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,IAAI,CACH,IAAI,CAAC,CAAC,gBAAgB,CAAC,CACvB,IAAI,CAAC,CAAC,QAAQ,CAAC,CACf,WAAW,CAAC,CAAC,YAAY,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CACvE,IAAI,YAAY,CAAC,EACjB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CACD,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,gBAAgB;oBACzB,UAAU,EAAE,UAAU,CAAC,MAAM;oBAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;oBAC5B,aAAa,EAAE,CAAC;oBAChB,aAAa,EAAE,MAAM;oBACrB,GAAG,SAAS;oBACZ,WAAW,EAAE,uCAAuC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,SAAS,EAAE,WAAW,IAAI,EAAE,EAAE;iBAClI,CAAC,CAEF;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,MAAM,CACV;UAAA,GAAG,CACJ,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,cAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n ButtonBaseSize,\n FontWeight,\n TextColor,\n} from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconColor } from '../Icon';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { Spinner } from '../temp-components/Spinner';\n\nimport {\n MAP_BUTTONBASE_SIZE_ICONSIZE,\n MAP_BUTTONBASE_SIZE_TEXT_VARIANT,\n getButtonBaseBorderRadiusTwClass,\n getButtonBaseHorizontalPaddingTwClasses,\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION,\n} from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n loadingWrapperProps,\n contentWrapperProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n const hasStart = Boolean(finalStartIconName || startAccessory);\n const hasEnd = Boolean(finalEndIconName || endAccessory);\n const hasAccessories = hasStart || hasEnd;\n\n const iconSize = MAP_BUTTONBASE_SIZE_ICONSIZE[size];\n const labelTextVariant = MAP_BUTTONBASE_SIZE_TEXT_VARIANT[size];\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading, please wait';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center',\n // Visual styling\n 'bg-muted overflow-hidden',\n // Conditional Border Radius and Horizontal Spacing based on requirements\n getButtonBaseBorderRadiusTwClass(size),\n getButtonBaseHorizontalPaddingTwClasses(size, hasStart, hasEnd),\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => {\n const { twClassName: loadingWrapperTw, ...restLoadingWrapper } =\n loadingWrapperProps ?? {};\n const { twClassName: contentWrapperTw, ...restContentWrapper } =\n contentWrapperProps ?? {};\n\n return (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <Box\n {...restLoadingWrapper}\n twClassName={`absolute inset-0 flex items-center justify-center ${loadingWrapperTw ?? ''}`}\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n {...spinnerProps}\n spinnerIconProps={{\n size: iconSize,\n ...spinnerProps?.spinnerIconProps,\n }}\n loadingTextProps={{\n numberOfLines: 1,\n variant: labelTextVariant,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n />\n </Box>\n )}\n\n <BoxRow\n {...restContentWrapper}\n twClassName={`${contentWrapperTw ?? ''} ${isLoading ? 'opacity-0' : ''}`}\n gap={hasAccessories ? 1 : 0}\n startAccessory={\n finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={iconSize}\n twClassName={`shrink-0 ${iconClassName ? iconClassName(pressed) : ''}`}\n {...startIconProps}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={iconSize}\n twClassName={`shrink-0 ${iconClassName ? iconClassName(pressed) : ''}`}\n {...endIconProps}\n />\n ) : (\n endAccessory\n )\n }\n textProps={{\n variant: labelTextVariant,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n twClassName: `shrink grow-0 flex-wrap text-center ${textClassName ? textClassName(pressed) : ''} ${textProps?.twClassName ?? ''}`,\n }}\n >\n {children}\n </BoxRow>\n </>\n );\n }}\n </ButtonAnimated>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ButtonBasePropsShared,\n IconName,\n} from '@metamask/design-system-shared';\nimport type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { IconProps } from '../Icon';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = ButtonBasePropsShared & {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n >;\n"]}
1
+ {"version":3,"file":"ButtonBase.types.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ButtonBasePropsShared,\n IconName,\n} from '@metamask/design-system-shared';\nimport type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { IconProps } from '../Icon';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = ButtonBasePropsShared & {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Props passed to the loading overlay wrapper (`Box` around the spinner).\n * Defaults include `twClassName` for full-area centered layout; merge your own `twClassName` to extend.\n * Pass `testID` here for tests — there is no default test id on this wrapper.\n */\n loadingWrapperProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Props passed to the label row (`BoxRow`). Label typography remains controlled via `textProps` on ButtonBase.\n */\n contentWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps'>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n >;\n"]}
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { ButtonBasePropsShared, IconName } from "@metamask/design-system-shared";
3
3
  import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
4
+ import type { BoxProps } from "../Box/Box.types.cjs";
5
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
4
6
  import type { IconProps } from "../Icon/index.cjs";
5
7
  import type { SpinnerProps } from "../temp-components/Spinner/index.cjs";
6
8
  import type { TextProps } from "../Text/index.cjs";
@@ -20,6 +22,16 @@ export type ButtonBaseProps = ButtonBasePropsShared & {
20
22
  * Optional prop to pass additional properties to the end icon
21
23
  */
22
24
  spinnerProps?: Partial<SpinnerProps>;
25
+ /**
26
+ * Props passed to the loading overlay wrapper (`Box` around the spinner).
27
+ * Defaults include `twClassName` for full-area centered layout; merge your own `twClassName` to extend.
28
+ * Pass `testID` here for tests — there is no default test id on this wrapper.
29
+ */
30
+ loadingWrapperProps?: Omit<Partial<BoxProps>, 'children'>;
31
+ /**
32
+ * Props passed to the label row (`BoxRow`). Label typography remains controlled via `textProps` on ButtonBase.
33
+ */
34
+ contentWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps'>;
23
35
  /**
24
36
  * Optional prop to specify an icon to show at the start of the button
25
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.types.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,QAAQ,EACT,uCAAuC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzE,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,6CAAmC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG;IACpD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACjD;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,cAAc,CAA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EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC;IACtD;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7C;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC;IACpE;;;OAGG;IACH,oBAAoB,CAAC,EAAE;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC9B,WAAW,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;KACrC,KAAK,IAAI,CAAC;CACZ,GAAG,IAAI,CACJ,cAAc,EACZ,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,sBAAsB,GACtB,uBAAuB,CAC1B,CAAC"}
@@ -1,6 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import type { ButtonBasePropsShared, IconName } from "@metamask/design-system-shared";
3
3
  import type { PressableProps, StyleProp, ViewStyle } from "react-native/index.js";
4
+ import type { BoxProps } from "../Box/Box.types.mjs";
5
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.mjs";
4
6
  import type { IconProps } from "../Icon/index.mjs";
5
7
  import type { SpinnerProps } from "../temp-components/Spinner/index.mjs";
6
8
  import type { TextProps } from "../Text/index.mjs";
@@ -20,6 +22,16 @@ export type ButtonBaseProps = ButtonBasePropsShared & {
20
22
  * Optional prop to pass additional properties to the end icon
21
23
  */
22
24
  spinnerProps?: Partial<SpinnerProps>;
25
+ /**
26
+ * Props passed to the loading overlay wrapper (`Box` around the spinner).
27
+ * Defaults include `twClassName` for full-area centered layout; merge your own `twClassName` to extend.
28
+ * Pass `testID` here for tests — there is no default test id on this wrapper.
29
+ */
30
+ loadingWrapperProps?: Omit<Partial<BoxProps>, 'children'>;
31
+ /**
32
+ * Props passed to the label row (`BoxRow`). Label typography remains controlled via `textProps` on ButtonBase.
33
+ */
34
+ contentWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps'>;
23
35
  /**
24
36
  * Optional prop to specify an icon to show at the start of the button
25
37
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.types.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,QAAQ,EACT,uCAAuC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,8BAAqB;AAEzE,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,6CAAmC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,qBAAqB,GAAG;IACpD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACjD;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,CAAC;IACzB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;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AGG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,CAAC;IACtD;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7C;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,KAAK,GAAG,MAAM,CAAC;IACpE;;;OAGG;IACH,oBAAoB,CAAC,EAAE;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,EAAE,CAAC;IACJ;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE;QAC9B,WAAW,EAAE;YAAE,UAAU,EAAE,MAAM,CAAA;SAAE,CAAC;KACrC,KAAK,IAAI,CAAC;CACZ,GAAG,IAAI,CACJ,cAAc,EACZ,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,sBAAsB,GACtB,uBAAuB,CAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ButtonBasePropsShared,\n IconName,\n} from '@metamask/design-system-shared';\nimport type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { IconProps } from '../Icon';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = ButtonBasePropsShared & {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n >;\n"]}
1
+ {"version":3,"file":"ButtonBase.types.mjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n ButtonBasePropsShared,\n IconName,\n} from '@metamask/design-system-shared';\nimport type { PressableProps, StyleProp, ViewStyle } from 'react-native';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { IconProps } from '../Icon';\nimport type { SpinnerProps } from '../temp-components/Spinner';\nimport type { TextProps } from '../Text';\n\n/**\n * ButtonBase component props.\n */\nexport type ButtonBaseProps = ButtonBasePropsShared & {\n /**\n * Required prop for the content to be rendered within the ButtonBase\n */\n children: React.ReactNode | string;\n /**\n * Optional props to be passed to the Text component when children is a string\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n spinnerProps?: Partial<SpinnerProps>;\n /**\n * Props passed to the loading overlay wrapper (`Box` around the spinner).\n * Defaults include `twClassName` for full-area centered layout; merge your own `twClassName` to extend.\n * Pass `testID` here for tests — there is no default test id on this wrapper.\n */\n loadingWrapperProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Props passed to the label row (`BoxRow`). Label typography remains controlled via `textProps` on ButtonBase.\n */\n contentWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'textProps'>;\n /**\n * Optional prop to specify an icon to show at the start of the button\n */\n startIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the start icon\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the start of the button\n */\n startAccessory?: React.ReactNode;\n /**\n * Optional prop to specify an icon to show at the end of the button\n */\n endIconName?: IconName;\n /**\n * Optional prop to pass additional properties to the end icon\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional prop for a custom element to show at the end of the button\n */\n endAccessory?: React.ReactNode;\n /**\n * Optional prop to add twrnc overriding classNames.\n * Can be a string or a function that receives pressed state and returns a string.\n */\n twClassName?: string | ((pressed: boolean) => string);\n /**\n * Optional prop to control text className based on pressed state.\n */\n textClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control icon className based on pressed state.\n */\n iconClassName?: (pressed: boolean) => string;\n /**\n * Optional prop to control the style.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Optional accessibility label to describe the button for screen readers.\n * If not provided, the button content will be used as the label.\n */\n accessibilityLabel?: string;\n /**\n * Optional accessibility hint to provide additional context about the button's action.\n * Should describe what happens when the button is pressed.\n */\n accessibilityHint?: string;\n /**\n * Optional accessibility role. Defaults to 'button'.\n * Can be overridden for specific use cases.\n */\n accessibilityRole?: 'button' | 'link' | 'menuitem' | 'tab' | 'none';\n /**\n * Optional accessibility actions for custom interactions.\n * Use sparingly and only when default button behavior is insufficient.\n */\n accessibilityActions?: {\n name: string;\n label?: string;\n }[];\n /**\n * Optional callback for handling accessibility action events.\n */\n onAccessibilityAction?: (event: {\n nativeEvent: { actionName: string };\n }) => void;\n} & Omit<\n PressableProps,\n | 'accessibilityRole'\n | 'accessibilityLabel'\n | 'accessibilityHint'\n | 'accessibilityActions'\n | 'onAccessibilityAction'\n >;\n"]}
@@ -26,8 +26,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.ButtonSemantic = void 0;
27
27
  const react_1 = __importStar(require("react"));
28
28
  const ButtonBase_1 = require("../ButtonBase/index.cjs");
29
- const Icon_1 = require("../Icon/index.cjs");
30
- const Text_1 = require("../Text/index.cjs");
31
29
  const ButtonSemantic_constants_1 = require("./ButtonSemantic.constants.cjs");
32
30
  const ButtonSemantic_types_1 = require("./ButtonSemantic.types.cjs");
33
31
  const ButtonSemantic = ({ severity, children, textProps, spinnerProps, startIconProps, endIconProps, isLoading = false, twClassName = '', style, ...props }) => {
@@ -42,21 +40,7 @@ const ButtonSemantic = ({ severity, children, textProps, spinnerProps, startIcon
42
40
  }, [severity, isLoading, twClassName]);
43
41
  const getTextClassName = (0, react_1.useCallback)((_pressed) => ButtonSemantic_constants_1.TWCLASSMAP_BUTTONSEMANTIC_TEXT[severity] ??
44
42
  ButtonSemantic_constants_1.TWCLASSMAP_BUTTONSEMANTIC_TEXT[ButtonSemantic_types_1.ButtonSemanticSeverity.Success], [severity]);
45
- return (<ButtonBase_1.ButtonBase textProps={{
46
- variant: Text_1.TextVariant.BodyMd,
47
- fontWeight: Text_1.FontWeight.Medium,
48
- numberOfLines: 1,
49
- ellipsizeMode: 'clip',
50
- ...textProps,
51
- }} spinnerProps={{
52
- ...spinnerProps,
53
- }} startIconProps={{
54
- size: Icon_1.IconSize.Sm,
55
- ...startIconProps,
56
- }} endIconProps={{
57
- size: Icon_1.IconSize.Sm,
58
- ...endIconProps,
59
- }} isLoading={isLoading} twClassName={getContainerClassName} textClassName={getTextClassName} iconClassName={getTextClassName} style={style} {...props}>
43
+ return (<ButtonBase_1.ButtonBase textProps={textProps} spinnerProps={spinnerProps} startIconProps={startIconProps} endIconProps={endIconProps} isLoading={isLoading} twClassName={getContainerClassName} textClassName={getTextClassName} iconClassName={getTextClassName} style={style} {...props}>
60
44
  {children}
61
45
  </ButtonBase_1.ButtonBase>);
62
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSemantic.cjs","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAE3C,wDAA2C;AAC3C,4CAAmC;AACnC,4CAAkD;AAElD,6EAIoC;AAEpC,qEAAgE;AAEzD,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,qBAAqB,GAAG,IAA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qBAAqB,CAAC,CACnC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AApEW,QAAA,cAAc,kBAoEzB","sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\nimport { IconSize } from '../Icon';\nimport { TextVariant, FontWeight } from '../Text';\n\nimport {\n TWCLASSMAP_BUTTONSEMANTIC_BG,\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED,\n TWCLASSMAP_BUTTONSEMANTIC_TEXT,\n} from './ButtonSemantic.constants';\nimport type { ButtonSemanticProps } from './ButtonSemantic.types';\nimport { ButtonSemanticSeverity } from './ButtonSemantic.types';\n\nexport const ButtonSemantic = ({\n severity,\n children,\n textProps,\n spinnerProps,\n startIconProps,\n endIconProps,\n isLoading = false,\n twClassName = '',\n style,\n ...props\n}: ButtonSemanticProps) => {\n const getContainerClassName = useCallback(\n (pressed: boolean): string => {\n const classNameStr =\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName;\n\n const bgClass =\n pressed || isLoading\n ? (TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[\n ButtonSemanticSeverity.Success\n ])\n : (TWCLASSMAP_BUTTONSEMANTIC_BG[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG[ButtonSemanticSeverity.Success]);\n\n return `${bgClass} ${classNameStr}`;\n },\n [severity, isLoading, twClassName],\n );\n\n const getTextClassName = useCallback(\n (_pressed: boolean): string =>\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[ButtonSemanticSeverity.Success],\n [severity],\n );\n\n return (\n <ButtonBase\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n }}\n spinnerProps={{\n ...spinnerProps,\n }}\n startIconProps={{\n size: IconSize.Sm,\n ...startIconProps,\n }}\n endIconProps={{\n size: IconSize.Sm,\n ...endIconProps,\n }}\n isLoading={isLoading}\n twClassName={getContainerClassName}\n textClassName={getTextClassName}\n iconClassName={getTextClassName}\n style={style}\n {...props}\n >\n {children}\n </ButtonBase>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonSemantic.cjs","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAE3C,wDAA2C;AAE3C,6EAIoC;AAEpC,qEAAgE;AAEzD,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,qBAAqB,GAAG,IAAA,mBAAW,EACvC,CAAC,OAAgB,EAAU,EAAE;QAC3B,MAAM,YAAY,GAChB,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAEzE,MAAM,OAAO,GACX,OAAO,IAAI,SAAS;YAClB,CAAC,CAAC,CAAC,+DAAoC,CAAC,QAAQ,CAAC;gBAC/C,+DAAoC,CAClC,6CAAsB,CAAC,OAAO,CAC/B,CAAC;YACJ,CAAC,CAAC,CAAC,uDAA4B,CAAC,QAAQ,CAAC;gBACvC,uDAA4B,CAAC,6CAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;QAEpE,OAAO,GAAG,OAAO,IAAI,YAAY,EAAE,CAAC;IACtC,CAAC,EACD,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CACnC,CAAC;IAEF,MAAM,gBAAgB,GAAG,IAAA,mBAAW,EAClC,CAAC,QAAiB,EAAU,EAAE,CAC5B,yDAA8B,CAAC,QAAQ,CAAC;QACxC,yDAA8B,CAAC,6CAAsB,CAAC,OAAO,CAAC,EAChE,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,WAAW,CAAC,CAAC,qBAAqB,CAAC,CACnC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtDW,QAAA,cAAc,kBAsDzB","sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\n\nimport {\n TWCLASSMAP_BUTTONSEMANTIC_BG,\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED,\n TWCLASSMAP_BUTTONSEMANTIC_TEXT,\n} from './ButtonSemantic.constants';\nimport type { ButtonSemanticProps } from './ButtonSemantic.types';\nimport { ButtonSemanticSeverity } from './ButtonSemantic.types';\n\nexport const ButtonSemantic = ({\n severity,\n children,\n textProps,\n spinnerProps,\n startIconProps,\n endIconProps,\n isLoading = false,\n twClassName = '',\n style,\n ...props\n}: ButtonSemanticProps) => {\n const getContainerClassName = useCallback(\n (pressed: boolean): string => {\n const classNameStr =\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName;\n\n const bgClass =\n pressed || isLoading\n ? (TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[\n ButtonSemanticSeverity.Success\n ])\n : (TWCLASSMAP_BUTTONSEMANTIC_BG[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG[ButtonSemanticSeverity.Success]);\n\n return `${bgClass} ${classNameStr}`;\n },\n [severity, isLoading, twClassName],\n );\n\n const getTextClassName = useCallback(\n (_pressed: boolean): string =>\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[ButtonSemanticSeverity.Success],\n [severity],\n );\n\n return (\n <ButtonBase\n textProps={textProps}\n spinnerProps={spinnerProps}\n startIconProps={startIconProps}\n endIconProps={endIconProps}\n isLoading={isLoading}\n twClassName={getContainerClassName}\n textClassName={getTextClassName}\n iconClassName={getTextClassName}\n style={style}\n {...props}\n >\n {children}\n </ButtonBase>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSemantic.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAW3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAGlE,eAAO,MAAM,cAAc,2HAWxB,mBAAmB,sBAyDrB,CAAC"}
1
+ {"version":3,"file":"ButtonSemantic.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAS3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAGlE,eAAO,MAAM,cAAc,2HAWxB,mBAAmB,sBA2CrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSemantic.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAW3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAGlE,eAAO,MAAM,cAAc,2HAWxB,mBAAmB,sBAyDrB,CAAC"}
1
+ {"version":3,"file":"ButtonSemantic.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,cAAc;AAS3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAGlE,eAAO,MAAM,cAAc,2HAWxB,mBAAmB,sBA2CrB,CAAC"}
@@ -7,8 +7,6 @@ function $importDefault(module) {
7
7
  import $React, { useCallback } from "react";
8
8
  const React = $importDefault($React);
9
9
  import { ButtonBase } from "../ButtonBase/index.mjs";
10
- import { IconSize } from "../Icon/index.mjs";
11
- import { TextVariant, FontWeight } from "../Text/index.mjs";
12
10
  import { TWCLASSMAP_BUTTONSEMANTIC_BG, TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED, TWCLASSMAP_BUTTONSEMANTIC_TEXT } from "./ButtonSemantic.constants.mjs";
13
11
  import { ButtonSemanticSeverity } from "./ButtonSemantic.types.mjs";
14
12
  export const ButtonSemantic = ({ severity, children, textProps, spinnerProps, startIconProps, endIconProps, isLoading = false, twClassName = '', style, ...props }) => {
@@ -23,21 +21,7 @@ export const ButtonSemantic = ({ severity, children, textProps, spinnerProps, st
23
21
  }, [severity, isLoading, twClassName]);
24
22
  const getTextClassName = useCallback((_pressed) => TWCLASSMAP_BUTTONSEMANTIC_TEXT[severity] ??
25
23
  TWCLASSMAP_BUTTONSEMANTIC_TEXT[ButtonSemanticSeverity.Success], [severity]);
26
- return (<ButtonBase textProps={{
27
- variant: TextVariant.BodyMd,
28
- fontWeight: FontWeight.Medium,
29
- numberOfLines: 1,
30
- ellipsizeMode: 'clip',
31
- ...textProps,
32
- }} spinnerProps={{
33
- ...spinnerProps,
34
- }} startIconProps={{
35
- size: IconSize.Sm,
36
- ...startIconProps,
37
- }} endIconProps={{
38
- size: IconSize.Sm,
39
- ...endIconProps,
40
- }} isLoading={isLoading} twClassName={getContainerClassName} textClassName={getTextClassName} iconClassName={getTextClassName} style={style} {...props}>
24
+ return (<ButtonBase textProps={textProps} spinnerProps={spinnerProps} startIconProps={startIconProps} endIconProps={endIconProps} isLoading={isLoading} twClassName={getContainerClassName} textClassName={getTextClassName} iconClassName={getTextClassName} style={style} {...props}>
41
25
  {children}
42
26
  </ButtonBase>);
43
27
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonSemantic.mjs","sourceRoot":"","sources":["../../../src/components/ButtonSemantic/ButtonSemantic.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,WAAW,EAAE,cAAc;;AAE3C,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,0BAAgB;AACnC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,0BAAgB;AAElD,OAAO,EACL,4BAA4B,EAC5B,oCAAoC,EACpC,8BAA8B,EAC/B,uCAAmC;AAEpC,OAAO,EAAE,sBAAsB,EAAE,mCAA+B;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,SAAS,GAAG,KAAK,EACjB,WAAW,GAAG,EAAE,EAChB,KAAK,EACL,GAAG,KAAK,EACY,EAAE,EAAE;IACxB,MAAM,qBAAqB,GAAG,WAAW,CACvC,CAAC,OAAgB,EAAU,EAAE;QAC3B,MAAM,YAAY,GAChB,OAAO,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;QAEzE,MAAM,OAAO,GACX,OAAO,IAAI,SAAS;YAClB,CAAC,CAAC,CAAC,oCAAoC,CAAC,QAAQ,CAAC;gBAC/C,oCAAoC,CAClC,sBAAsB,CAAC,OAAO,CAC/B,CAAC;YACJ,CAAC,CAAC,CAAC,4BAA4B,CAAC,QAAQ,CAAC;gBACvC,4BAA4B,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC;QAEpE,OAAO,GAAG,OAAO,IAAI,YAAY,EAAE,CAAC;IACtC,CAAC,EACD,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CACnC,CAAC;IAEF,MAAM,gBAAgB,GAAG,WAAW,CAClC,CAAC,QAAiB,EAAU,EAAE,CAC5B,8BAA8B,CAAC,QAAQ,CAAC;QACxC,8BAA8B,CAAC,sBAAsB,CAAC,OAAO,CAAC,EAChE,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,WAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;YAC7B,aAAa,EAAE,CAAC;YAChB,aAAa,EAAE,MAAM;YACrB,GAAG,SAAS;SACb,CAAC,CACF,YAAY,CAAC,CAAC;YACZ,GAAG,YAAY;SAChB,CAAC,CACF,cAAc,CAAC,CAAC;YACd,IAAI,EAAE,QAAQ,CAAC,EAAE;YACjB,GAAG,cAAc;SAClB,CAAC,CACF,YAAY,CAAC,CAAC;YACZ,IAAI,EAAE,QAAQ,CAAC,EAAE;YACjB,GAAG,YAAY;SAChB,CAAC,CACF,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,WAAW,CAAC,CAAC,qBAAqB,CAAC,CACnC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\nimport { IconSize } from '../Icon';\nimport { TextVariant, FontWeight } from '../Text';\n\nimport {\n TWCLASSMAP_BUTTONSEMANTIC_BG,\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED,\n TWCLASSMAP_BUTTONSEMANTIC_TEXT,\n} from './ButtonSemantic.constants';\nimport type { ButtonSemanticProps } from './ButtonSemantic.types';\nimport { ButtonSemanticSeverity } from './ButtonSemantic.types';\n\nexport const ButtonSemantic = ({\n severity,\n children,\n textProps,\n spinnerProps,\n startIconProps,\n endIconProps,\n isLoading = false,\n twClassName = '',\n style,\n ...props\n}: ButtonSemanticProps) => {\n const getContainerClassName = useCallback(\n (pressed: boolean): string => {\n const classNameStr =\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName;\n\n const bgClass =\n pressed || isLoading\n ? (TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[\n ButtonSemanticSeverity.Success\n ])\n : (TWCLASSMAP_BUTTONSEMANTIC_BG[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG[ButtonSemanticSeverity.Success]);\n\n return `${bgClass} ${classNameStr}`;\n },\n [severity, isLoading, twClassName],\n );\n\n const getTextClassName = useCallback(\n (_pressed: boolean): string =>\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[ButtonSemanticSeverity.Success],\n [severity],\n );\n\n return (\n <ButtonBase\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n }}\n spinnerProps={{\n ...spinnerProps,\n }}\n startIconProps={{\n size: IconSize.Sm,\n ...startIconProps,\n }}\n endIconProps={{\n size: IconSize.Sm,\n ...endIconProps,\n }}\n isLoading={isLoading}\n twClassName={getContainerClassName}\n textClassName={getTextClassName}\n iconClassName={getTextClassName}\n style={style}\n {...props}\n >\n {children}\n </ButtonBase>\n );\n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EAChE,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,WAAW,CAAC,CAAC,qBAAqB,CAAC,CACnC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,aAAa,CAAC,CAAC,gBAAgB,CAAC,CAChC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ButtonBase } from '../ButtonBase';\n\nimport {\n TWCLASSMAP_BUTTONSEMANTIC_BG,\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED,\n TWCLASSMAP_BUTTONSEMANTIC_TEXT,\n} from './ButtonSemantic.constants';\nimport type { ButtonSemanticProps } from './ButtonSemantic.types';\nimport { ButtonSemanticSeverity } from './ButtonSemantic.types';\n\nexport const ButtonSemantic = ({\n severity,\n children,\n textProps,\n spinnerProps,\n startIconProps,\n endIconProps,\n isLoading = false,\n twClassName = '',\n style,\n ...props\n}: ButtonSemanticProps) => {\n const getContainerClassName = useCallback(\n (pressed: boolean): string => {\n const classNameStr =\n typeof twClassName === 'function' ? twClassName(pressed) : twClassName;\n\n const bgClass =\n pressed || isLoading\n ? (TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG_PRESSED[\n ButtonSemanticSeverity.Success\n ])\n : (TWCLASSMAP_BUTTONSEMANTIC_BG[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_BG[ButtonSemanticSeverity.Success]);\n\n return `${bgClass} ${classNameStr}`;\n },\n [severity, isLoading, twClassName],\n );\n\n const getTextClassName = useCallback(\n (_pressed: boolean): string =>\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[severity] ??\n TWCLASSMAP_BUTTONSEMANTIC_TEXT[ButtonSemanticSeverity.Success],\n [severity],\n );\n\n return (\n <ButtonBase\n textProps={textProps}\n spinnerProps={spinnerProps}\n startIconProps={startIconProps}\n endIconProps={endIconProps}\n isLoading={isLoading}\n twClassName={getContainerClassName}\n textClassName={getTextClassName}\n iconClassName={getTextClassName}\n style={style}\n {...props}\n >\n {children}\n </ButtonBase>\n );\n};\n"]}
@@ -26,13 +26,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.HeaderStandard = void 0;
27
27
  // Third party dependencies.
28
28
  const react_1 = __importStar(require("react"));
29
- // External dependencies.
30
- const Box_1 = require("../Box/index.cjs");
31
- const BoxColumn_1 = require("../BoxColumn/index.cjs");
32
29
  const HeaderBase_1 = require("../HeaderBase/index.cjs");
33
30
  const Icon_1 = require("../Icon/index.cjs");
34
- const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
35
- const Text_1 = require("../Text/index.cjs");
31
+ const HeaderStandardCenterColumn_1 = require("../temp-components/HeaderStandardCenterColumn/index.cjs");
36
32
  const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children, onBack, backButtonProps, onClose, closeButtonProps, endButtonIconProps, startButtonIconProps, twClassName = '', testID, ...headerBaseProps }) => {
37
33
  const resolvedStartButtonIconProps = (0, react_1.useMemo)(() => {
38
34
  if (startButtonIconProps) {
@@ -68,27 +64,7 @@ const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children,
68
64
  return children;
69
65
  }
70
66
  if (title) {
71
- let subtitleTextProps;
72
- if (subtitle && typeof subtitle === 'string') {
73
- const { twClassName: subtitleTwClassName, ...subtitleTextRest } = subtitleProps ?? {};
74
- subtitleTextProps = {
75
- variant: Text_1.TextVariant.BodySm,
76
- color: Text_1.TextColor.TextAlternative,
77
- ...subtitleTextRest,
78
- twClassName: ['-mt-0.5', subtitleTwClassName]
79
- .filter(Boolean)
80
- .join(' '),
81
- };
82
- }
83
- return (<BoxColumn_1.BoxColumn alignItems={Box_1.BoxAlignItems.Center} textProps={{
84
- variant: Text_1.TextVariant.BodyMd,
85
- fontWeight: Text_1.FontWeight.Bold,
86
- ...titleProps,
87
- }} bottomAccessory={subtitle ? (<TextOrChildren_1.TextOrChildren textProps={subtitleTextProps}>
88
- {subtitle}
89
- </TextOrChildren_1.TextOrChildren>) : undefined}>
90
- {title}
91
- </BoxColumn_1.BoxColumn>);
67
+ return (<HeaderStandardCenterColumn_1.HeaderStandardCenterColumn title={title} titleProps={titleProps} subtitle={subtitle} subtitleProps={subtitleProps}/>);
92
68
  }
93
69
  return null;
94
70
  };
@@ -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,sDAAyC;AAEzC,wDAA2C;AAC3C,4CAAmC;AACnC,gFAAmE;AAEnE,4CAA6D;AAKtD,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAChD,IAAI,oBAAoB,EAAE;YACxB,OAAO,oBAAoB,CAAC;SAC7B;QACD,IAAI,MAAM,IAAI,eAAe,EAAE;YAC7B,MAAM,UAAU,GAAoB;gBAClC,QAAQ,EAAE,eAAQ,CAAC,SAAS;gB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,EAAE,gBAAS,CAAC,eAAe;oBAChC,GAAG,gBAAgB;oBACnB,WAAW,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC;yBAC1C,MAAM,CAAC,OAAO,CAAC;yBACf,IAAI,CAAC,GAAG,CAAC;iBACb,CAAC;aACH;YAED,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,mBAAa,CAAC,MAAM,CAAC,CACjC,SAAS,CAAC,CAAC;oBACT,OAAO,EAAE,kBAAW,CAAC,MAAM;oBAC3B,UAAU,EAAE,iBAAU,CAAC,IAAI;oBAC3B,GAAG,UAAU;iBACd,CAAC,CACF,eAAe,CAAC,CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;gBAAA,CAAC,QAAQ,CACX;cAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,qBAAS,CAAC,CACb,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAtGW,QAAA,cAAc,kBAsGzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
1
+ {"version":3,"file":"HeaderStandard.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4BAA4B;AAC5B,+CAAuC;AAIvC,wDAA2C;AAC3C,4CAAmC;AACnC,wGAA2F;AAKpF,MAAM,cAAc,GAAkC,CAAC,EAC5D,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,EACb,QAAQ,EACR,MAAM,EACN,eAAe,EACf,OAAO,EACP,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GAAG,EAAE,EAChB,MAAM,EACN,GAAG,eAAe,EACnB,EAAE,EAAE;IACH,MAAM,4BAA4B,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAChD,IAAI,oBAAoB,EAAE;YACxB,OAAO,oBAAoB,CAAC;SAC7B;QACD,IAAI,MAAM,IAAI,eAAe,EAAE;YAC7B,MAAM,UAAU,GAAoB;gBAClC,QAAQ,EAAE,eAAQ,CAAC,SAAS;gBAC5B,GAAG,CAAC,eAAe,IAAI,EAAE,CAAC;gBAC1B,OAAO,EAAE,eAAe,EAAE,OAAO,IAAI,MAAM;aAC5C,CAAC;YACF,OAAO,UAAU,CAAC;SACnB;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,oBAAoB,CAAC,C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,aAAa,EAAE,CAClB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AA7EW,QAAA,cAAc,kBA6EzB;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { HeaderStandardCenterColumn } from '../temp-components/HeaderStandardCenterColumn';\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 return (\n <HeaderStandardCenterColumn\n title={title}\n titleProps={titleProps}\n subtitle={subtitle}\n subtitleProps={subtitleProps}\n />\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 +1 @@
1
- {"version":3,"file":"HeaderStandard.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AAavC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsGxD,CAAC"}
1
+ {"version":3,"file":"HeaderStandard.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6ExD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AAavC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsGxD,CAAC"}
1
+ {"version":3,"file":"HeaderStandard.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkB,cAAc;AASvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,mCAA+B;AAElE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6ExD,CAAC"}
@@ -7,13 +7,9 @@ function $importDefault(module) {
7
7
  // Third party dependencies.
8
8
  import $React, { useMemo } from "react";
9
9
  const React = $importDefault($React);
10
- // External dependencies.
11
- import { BoxAlignItems } from "../Box/index.mjs";
12
- import { BoxColumn } from "../BoxColumn/index.mjs";
13
10
  import { HeaderBase } from "../HeaderBase/index.mjs";
14
11
  import { IconName } from "../Icon/index.mjs";
15
- import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
16
- import { FontWeight, TextColor, TextVariant } from "../Text/index.mjs";
12
+ import { HeaderStandardCenterColumn } from "../temp-components/HeaderStandardCenterColumn/index.mjs";
17
13
  export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, children, onBack, backButtonProps, onClose, closeButtonProps, endButtonIconProps, startButtonIconProps, twClassName = '', testID, ...headerBaseProps }) => {
18
14
  const resolvedStartButtonIconProps = useMemo(() => {
19
15
  if (startButtonIconProps) {
@@ -49,27 +45,7 @@ export const HeaderStandard = ({ title, titleProps, subtitle, subtitleProps, chi
49
45
  return children;
50
46
  }
51
47
  if (title) {
52
- let subtitleTextProps;
53
- if (subtitle && typeof subtitle === 'string') {
54
- const { twClassName: subtitleTwClassName, ...subtitleTextRest } = subtitleProps ?? {};
55
- subtitleTextProps = {
56
- variant: TextVariant.BodySm,
57
- color: TextColor.TextAlternative,
58
- ...subtitleTextRest,
59
- twClassName: ['-mt-0.5', subtitleTwClassName]
60
- .filter(Boolean)
61
- .join(' '),
62
- };
63
- }
64
- return (<BoxColumn alignItems={BoxAlignItems.Center} textProps={{
65
- variant: TextVariant.BodyMd,
66
- fontWeight: FontWeight.Bold,
67
- ...titleProps,
68
- }} bottomAccessory={subtitle ? (<TextOrChildren textProps={subtitleTextProps}>
69
- {subtitle}
70
- </TextOrChildren>) : undefined}>
71
- {title}
72
- </BoxColumn>);
48
+ return (<HeaderStandardCenterColumn title={title} titleProps={titleProps} subtitle={subtitle} subtitleProps={subtitleProps}/>);
73
49
  }
74
50
  return null;
75
51
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.mjs","source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AAC,CACF,eAAe,CAAC,CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;gBAAA,CAAC,QAAQ,CACX;cAAA,EAAE,cAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SAAS,CACd,CAED;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,SAAS,CAAC,CACb,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../Box';\nimport { BoxColumn } from '../BoxColumn';\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\nimport type { TextProps } from '../Text';\nimport { FontWeight, TextColor, TextVariant } from '../Text';\n\n// Internal dependencies.\nimport type { HeaderStandardProps } from './HeaderStandard.types';\n\nexport const HeaderStandard: React.FC<HeaderStandardProps> = ({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n children,\n onBack,\n backButtonProps,\n onClose,\n closeButtonProps,\n endButtonIconProps,\n startButtonIconProps,\n twClassName = '',\n testID,\n ...headerBaseProps\n}) => {\n const resolvedStartButtonIconProps = useMemo(() => {\n if (startButtonIconProps) {\n return startButtonIconProps;\n }\n if (onBack || backButtonProps) {\n const startProps: ButtonIconProps = {\n iconName: IconName.ArrowLeft,\n ...(backButtonProps ?? {}),\n onPress: backButtonProps?.onPress ?? onBack,\n };\n return startProps;\n }\n return undefined;\n }, [onBack, backButtonProps, startButtonIconProps]);\n\n const resolvedEndButtonIconProps = useMemo(() => {\n const props: ButtonIconProps[] = [];\n\n if (onClose || closeButtonProps) {\n const closeProps: ButtonIconProps = {\n iconName: IconName.Close,\n ...(closeButtonProps || {}),\n onPress: closeButtonProps?.onPress ?? onClose,\n };\n props.push(closeProps);\n }\n\n if (endButtonIconProps) {\n props.push(...endButtonIconProps);\n }\n return props.length > 0 ? props : undefined;\n }, [endButtonIconProps, onClose, closeButtonProps]);\n\n const renderContent = () => {\n if (children) {\n return children;\n }\n if (title) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName]\n .filter(Boolean)\n .join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n }\n return null;\n };\n\n return (\n <HeaderBase\n testID={testID}\n startButtonIconProps={resolvedStartButtonIconProps}\n endButtonIconProps={resolvedEndButtonIconProps}\n {...headerBaseProps}\n twClassName={`px-2 ${twClassName}`}\n >\n {renderContent()}\n </HeaderBase>\n );\n};\n\nHeaderStandard.displayName = 'HeaderStandard';\n"]}
1
+ {"version":3,"file":"HeaderStandard.mjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/H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,IAAI,CAAC,UAAU,CAAC,CAAC;SACxB;QAED,IAAI,kBAAkB,EAAE;YACtB,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,CAAC;SACnC;QACD,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC9C,CAAC,EAAE,CAAC,kBAAkB,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEpD,MAAM,aAAa,GAAG,GAAG,EAAE;QACzB,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;QACD,IAAI,KAAK,EAAE;YACT,OAAO,CACL,CAAC,0BAA0B,CACzB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,aAAa,CAAC,CAAC,aAAa,CAAC,EAC7B,CACH,CAAC;SACH;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,oBAAoB,CAAC,CAAC,4BAA4B,CAAC,CACnD,kBAAkB,CAAC,CAAC,0BAA0B,CAAC,CAC/C,IAAI,eAAe,CAAC,CACpB,WAAW,CAAC,CAAC,QAAQ,WAAW,EAAE,CAAC,CAEnC;MAAA,CAAC,aAAa,EAAE,CAClB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["// Third party dependencies.\nimport React, { useMemo } from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport { HeaderBase } from '../HeaderBase';\nimport { IconName } from '../Icon';\nimport { HeaderStandardCenterColumn } from '../temp-components/HeaderStandardCenterColumn';\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 return (\n <HeaderStandardCenterColumn\n title={title}\n titleProps={titleProps}\n subtitle={subtitle}\n subtitleProps={subtitleProps}\n />\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,8 +1,3 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
- // Third party dependencies.
7
- const react_1 = __importDefault(require("react"));
8
3
  //# sourceMappingURL=HeaderStandard.types.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":";;;;;AAAA,4BAA4B;AAC5B,kDAA0B","sourcesContent":["// Third party dependencies.\nimport React from 'react';\n\n// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { HeaderBaseProps } from '../HeaderBase';\nimport type { TextProps } from '../Text';\n\n/**\n * HeaderStandard component props.\n */\nexport type HeaderStandardProps = HeaderBaseProps & {\n /**\n * Title to display in the header. Can be a string or a React node.\n * Used as children if children prop is not provided.\n * When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.\n * When node: rendered as-is; titleProps are not applied.\n */\n title?: string | React.ReactNode;\n /**\n * Additional props to pass to the title Text component.\n * Props are spread to the Text component and can override default values.\n * Only applied when title is a string.\n */\n titleProps?: Partial<TextProps>;\n /**\n * Subtitle to display below the title. Can be a string or a React node.\n * When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.\n * When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).\n */\n subtitle?: string | React.ReactNode;\n /**\n * Additional props to pass to the subtitle Text component.\n * Props are spread to the Text component and can override default values.\n * Only applied when subtitle is a string.\n */\n subtitleProps?: Partial<TextProps>;\n /**\n * Callback when the back button is pressed.\n * If provided, a back button will be rendered as startButtonIconProps.\n */\n onBack?: () => void;\n /**\n * Additional props to pass to the back ButtonIcon.\n * If provided, a back button will be rendered as startButtonIconProps with these props spread.\n */\n backButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Callback when the close button is pressed.\n * If provided, a close button will be added to endButtonIconProps.\n */\n onClose?: () => void;\n /**\n * Additional props to pass to the close ButtonIcon.\n * If provided, a close button will be added to endButtonIconProps with these props spread.\n */\n closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n};\n"]}
1
+ {"version":3,"file":"HeaderStandard.types.cjs","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"","sourcesContent":["// External dependencies.\nimport type { ButtonIconProps } from '../ButtonIcon';\nimport type { HeaderBaseProps } from '../HeaderBase';\nimport type { HeaderStandardCenterColumnFields } from '../temp-components/HeaderStandardCenterColumn';\n\n/**\n * HeaderStandard component props.\n */\nexport type HeaderStandardProps = HeaderBaseProps &\n HeaderStandardCenterColumnFields & {\n /**\n * Callback when the back button is pressed.\n * If provided, a back button will be rendered as startButtonIconProps.\n */\n onBack?: () => void;\n /**\n * Additional props to pass to the back ButtonIcon.\n * If provided, a back button will be rendered as startButtonIconProps with these props spread.\n */\n backButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n /**\n * Callback when the close button is pressed.\n * If provided, a close button will be added to endButtonIconProps.\n */\n onClose?: () => void;\n /**\n * Additional props to pass to the close ButtonIcon.\n * If provided, a close button will be added to endButtonIconProps with these props spread.\n */\n closeButtonProps?: Omit<ButtonIconProps, 'iconName'>;\n };\n"]}
@@ -1,36 +1,10 @@
1
- import React from "react";
2
1
  import type { ButtonIconProps } from "../ButtonIcon/index.cjs";
3
2
  import type { HeaderBaseProps } from "../HeaderBase/index.cjs";
4
- import type { TextProps } from "../Text/index.cjs";
3
+ import type { HeaderStandardCenterColumnFields } from "../temp-components/HeaderStandardCenterColumn/index.cjs";
5
4
  /**
6
5
  * HeaderStandard component props.
7
6
  */
8
- export type HeaderStandardProps = HeaderBaseProps & {
9
- /**
10
- * Title to display in the header. Can be a string or a React node.
11
- * Used as children if children prop is not provided.
12
- * When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.
13
- * When node: rendered as-is; titleProps are not applied.
14
- */
15
- title?: string | React.ReactNode;
16
- /**
17
- * Additional props to pass to the title Text component.
18
- * Props are spread to the Text component and can override default values.
19
- * Only applied when title is a string.
20
- */
21
- titleProps?: Partial<TextProps>;
22
- /**
23
- * Subtitle to display below the title. Can be a string or a React node.
24
- * When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.
25
- * When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).
26
- */
27
- subtitle?: string | React.ReactNode;
28
- /**
29
- * Additional props to pass to the subtitle Text component.
30
- * Props are spread to the Text component and can override default values.
31
- * Only applied when subtitle is a string.
32
- */
33
- subtitleProps?: Partial<TextProps>;
7
+ export type HeaderStandardProps = HeaderBaseProps & HeaderStandardCenterColumnFields & {
34
8
  /**
35
9
  * Callback when the back button is pressed.
36
10
  * If provided, a back button will be rendered as startButtonIconProps.
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IAClD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACtD,CAAC"}
1
+ {"version":3,"file":"HeaderStandard.types.d.cts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,gCAAgC,EAAE,gEAAsD;AAEtG;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAC/C,gCAAgC,GAAG;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACtD,CAAC"}
@@ -1,36 +1,10 @@
1
- import React from "react";
2
1
  import type { ButtonIconProps } from "../ButtonIcon/index.mjs";
3
2
  import type { HeaderBaseProps } from "../HeaderBase/index.mjs";
4
- import type { TextProps } from "../Text/index.mjs";
3
+ import type { HeaderStandardCenterColumnFields } from "../temp-components/HeaderStandardCenterColumn/index.mjs";
5
4
  /**
6
5
  * HeaderStandard component props.
7
6
  */
8
- export type HeaderStandardProps = HeaderBaseProps & {
9
- /**
10
- * Title to display in the header. Can be a string or a React node.
11
- * Used as children if children prop is not provided.
12
- * When string: rendered with TextVariant.BodyMd and FontWeight.Bold by default; titleProps apply.
13
- * When node: rendered as-is; titleProps are not applied.
14
- */
15
- title?: string | React.ReactNode;
16
- /**
17
- * Additional props to pass to the title Text component.
18
- * Props are spread to the Text component and can override default values.
19
- * Only applied when title is a string.
20
- */
21
- titleProps?: Partial<TextProps>;
22
- /**
23
- * Subtitle to display below the title. Can be a string or a React node.
24
- * When string: rendered with TextVariant.BodySm and TextColor.TextAlternative by default; subtitleProps apply.
25
- * When node: rendered as-is; subtitleProps are not applied (add spacing on your root if needed, e.g. twClassName).
26
- */
27
- subtitle?: string | React.ReactNode;
28
- /**
29
- * Additional props to pass to the subtitle Text component.
30
- * Props are spread to the Text component and can override default values.
31
- * Only applied when subtitle is a string.
32
- */
33
- subtitleProps?: Partial<TextProps>;
7
+ export type HeaderStandardProps = HeaderBaseProps & HeaderStandardCenterColumnFields & {
34
8
  /**
35
9
  * Callback when the back button is pressed.
36
10
  * If provided, a back button will be rendered as startButtonIconProps.
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandard.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAG1B,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAAG;IAClD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACjC;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACpC;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACtD,CAAC"}
1
+ {"version":3,"file":"HeaderStandard.types.d.mts","sourceRoot":"","sources":["../../../src/components/HeaderStandard/HeaderStandard.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,gCAAgC,EAAE,gEAAsD;AAEtG;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,eAAe,GAC/C,gCAAgC,GAAG;IACjC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,CAAC,CAAC;CACtD,CAAC"}