@metamask/design-system-react-native 0.24.0 → 0.26.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 (367) hide show
  1. package/CHANGELOG.md +30 -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/Icon/assets/telegram.svg +1 -3
  107. package/dist/components/Input/Input.cjs +25 -14
  108. package/dist/components/Input/Input.cjs.map +1 -1
  109. package/dist/components/Input/Input.d.cts.map +1 -1
  110. package/dist/components/Input/Input.d.mts.map +1 -1
  111. package/dist/components/Input/Input.mjs +25 -14
  112. package/dist/components/Input/Input.mjs.map +1 -1
  113. package/dist/components/SectionDivider/SectionDivider.cjs +47 -0
  114. package/dist/components/SectionDivider/SectionDivider.cjs.map +1 -0
  115. package/dist/components/SectionDivider/SectionDivider.d.cts +6 -0
  116. package/dist/components/SectionDivider/SectionDivider.d.cts.map +1 -0
  117. package/dist/components/SectionDivider/SectionDivider.d.mts +6 -0
  118. package/dist/components/SectionDivider/SectionDivider.d.mts.map +1 -0
  119. package/dist/components/SectionDivider/SectionDivider.mjs +28 -0
  120. package/dist/components/SectionDivider/SectionDivider.mjs.map +1 -0
  121. package/dist/components/SectionDivider/SectionDivider.types.cjs +3 -0
  122. package/dist/components/SectionDivider/SectionDivider.types.cjs.map +1 -0
  123. package/dist/components/SectionDivider/SectionDivider.types.d.cts +3 -0
  124. package/dist/components/SectionDivider/SectionDivider.types.d.cts.map +1 -0
  125. package/dist/components/SectionDivider/SectionDivider.types.d.mts +3 -0
  126. package/dist/components/SectionDivider/SectionDivider.types.d.mts.map +1 -0
  127. package/dist/components/SectionDivider/SectionDivider.types.mjs +2 -0
  128. package/dist/components/SectionDivider/SectionDivider.types.mjs.map +1 -0
  129. package/dist/components/SectionDivider/index.cjs +6 -0
  130. package/dist/components/SectionDivider/index.cjs.map +1 -0
  131. package/dist/components/SectionDivider/index.d.cts +3 -0
  132. package/dist/components/SectionDivider/index.d.cts.map +1 -0
  133. package/dist/components/SectionDivider/index.d.mts +3 -0
  134. package/dist/components/SectionDivider/index.d.mts.map +1 -0
  135. package/dist/components/SectionDivider/index.mjs +2 -0
  136. package/dist/components/SectionDivider/index.mjs.map +1 -0
  137. package/dist/components/SectionHeader/SectionHeader.cjs +45 -0
  138. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -0
  139. package/dist/components/SectionHeader/SectionHeader.d.cts +23 -0
  140. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -0
  141. package/dist/components/SectionHeader/SectionHeader.d.mts +23 -0
  142. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -0
  143. package/dist/components/SectionHeader/SectionHeader.mjs +45 -0
  144. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -0
  145. package/dist/components/SectionHeader/SectionHeader.types.cjs +3 -0
  146. package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -0
  147. package/dist/components/SectionHeader/SectionHeader.types.d.cts +32 -0
  148. package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -0
  149. package/dist/components/SectionHeader/SectionHeader.types.d.mts +32 -0
  150. package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -0
  151. package/dist/components/SectionHeader/SectionHeader.types.mjs +2 -0
  152. package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -0
  153. package/dist/components/SectionHeader/index.cjs +6 -0
  154. package/dist/components/SectionHeader/index.cjs.map +1 -0
  155. package/dist/components/SectionHeader/index.d.cts +3 -0
  156. package/dist/components/SectionHeader/index.d.cts.map +1 -0
  157. package/dist/components/SectionHeader/index.d.mts +3 -0
  158. package/dist/components/SectionHeader/index.d.mts.map +1 -0
  159. package/dist/components/SectionHeader/index.mjs +2 -0
  160. package/dist/components/SectionHeader/index.mjs.map +1 -0
  161. package/dist/components/SegmentButton/SegmentButton.cjs +86 -0
  162. package/dist/components/SegmentButton/SegmentButton.cjs.map +1 -0
  163. package/dist/components/SegmentButton/SegmentButton.d.cts +7 -0
  164. package/dist/components/SegmentButton/SegmentButton.d.cts.map +1 -0
  165. package/dist/components/SegmentButton/SegmentButton.d.mts +7 -0
  166. package/dist/components/SegmentButton/SegmentButton.d.mts.map +1 -0
  167. package/dist/components/SegmentButton/SegmentButton.mjs +66 -0
  168. package/dist/components/SegmentButton/SegmentButton.mjs.map +1 -0
  169. package/dist/components/SegmentButton/SegmentButton.types.cjs +3 -0
  170. package/dist/components/SegmentButton/SegmentButton.types.cjs.map +1 -0
  171. package/dist/components/SegmentButton/SegmentButton.types.d.cts +9 -0
  172. package/dist/components/SegmentButton/SegmentButton.types.d.cts.map +1 -0
  173. package/dist/components/SegmentButton/SegmentButton.types.d.mts +9 -0
  174. package/dist/components/SegmentButton/SegmentButton.types.d.mts.map +1 -0
  175. package/dist/components/SegmentButton/SegmentButton.types.mjs +2 -0
  176. package/dist/components/SegmentButton/SegmentButton.types.mjs.map +1 -0
  177. package/dist/components/SegmentButton/index.cjs +8 -0
  178. package/dist/components/SegmentButton/index.cjs.map +1 -0
  179. package/dist/components/SegmentButton/index.d.cts +4 -0
  180. package/dist/components/SegmentButton/index.d.cts.map +1 -0
  181. package/dist/components/SegmentButton/index.d.mts +4 -0
  182. package/dist/components/SegmentButton/index.d.mts.map +1 -0
  183. package/dist/components/SegmentButton/index.mjs +3 -0
  184. package/dist/components/SegmentButton/index.mjs.map +1 -0
  185. package/dist/components/SegmentGroup/SegmentGroup.cjs +47 -0
  186. package/dist/components/SegmentGroup/SegmentGroup.cjs.map +1 -0
  187. package/dist/components/SegmentGroup/SegmentGroup.d.cts +7 -0
  188. package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +1 -0
  189. package/dist/components/SegmentGroup/SegmentGroup.d.mts +7 -0
  190. package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +1 -0
  191. package/dist/components/SegmentGroup/SegmentGroup.mjs +27 -0
  192. package/dist/components/SegmentGroup/SegmentGroup.mjs.map +1 -0
  193. package/dist/components/SegmentGroup/SegmentGroup.types.cjs +3 -0
  194. package/dist/components/SegmentGroup/SegmentGroup.types.cjs.map +1 -0
  195. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts +12 -0
  196. package/dist/components/SegmentGroup/SegmentGroup.types.d.cts.map +1 -0
  197. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts +12 -0
  198. package/dist/components/SegmentGroup/SegmentGroup.types.d.mts.map +1 -0
  199. package/dist/components/SegmentGroup/SegmentGroup.types.mjs +2 -0
  200. package/dist/components/SegmentGroup/SegmentGroup.types.mjs.map +1 -0
  201. package/dist/components/SegmentGroup/index.cjs +6 -0
  202. package/dist/components/SegmentGroup/index.cjs.map +1 -0
  203. package/dist/components/SegmentGroup/index.d.cts +3 -0
  204. package/dist/components/SegmentGroup/index.d.cts.map +1 -0
  205. package/dist/components/SegmentGroup/index.d.mts +3 -0
  206. package/dist/components/SegmentGroup/index.d.mts.map +1 -0
  207. package/dist/components/SegmentGroup/index.mjs +2 -0
  208. package/dist/components/SegmentGroup/index.mjs.map +1 -0
  209. package/dist/components/SelectButton/SelectButton.cjs +53 -0
  210. package/dist/components/SelectButton/SelectButton.cjs.map +1 -0
  211. package/dist/components/SelectButton/SelectButton.constants.cjs +12 -0
  212. package/dist/components/SelectButton/SelectButton.constants.cjs.map +1 -0
  213. package/dist/components/SelectButton/SelectButton.constants.d.cts +4 -0
  214. package/dist/components/SelectButton/SelectButton.constants.d.cts.map +1 -0
  215. package/dist/components/SelectButton/SelectButton.constants.d.mts +4 -0
  216. package/dist/components/SelectButton/SelectButton.constants.d.mts.map +1 -0
  217. package/dist/components/SelectButton/SelectButton.constants.mjs +9 -0
  218. package/dist/components/SelectButton/SelectButton.constants.mjs.map +1 -0
  219. package/dist/components/SelectButton/SelectButton.d.cts +7 -0
  220. package/dist/components/SelectButton/SelectButton.d.cts.map +1 -0
  221. package/dist/components/SelectButton/SelectButton.d.mts +7 -0
  222. package/dist/components/SelectButton/SelectButton.d.mts.map +1 -0
  223. package/dist/components/SelectButton/SelectButton.mjs +53 -0
  224. package/dist/components/SelectButton/SelectButton.mjs.map +1 -0
  225. package/dist/components/SelectButton/SelectButton.types.cjs +3 -0
  226. package/dist/components/SelectButton/SelectButton.types.cjs.map +1 -0
  227. package/dist/components/SelectButton/SelectButton.types.d.cts +13 -0
  228. package/dist/components/SelectButton/SelectButton.types.d.cts.map +1 -0
  229. package/dist/components/SelectButton/SelectButton.types.d.mts +13 -0
  230. package/dist/components/SelectButton/SelectButton.types.d.mts.map +1 -0
  231. package/dist/components/SelectButton/SelectButton.types.mjs +2 -0
  232. package/dist/components/SelectButton/SelectButton.types.mjs.map +1 -0
  233. package/dist/components/SelectButton/index.cjs +9 -0
  234. package/dist/components/SelectButton/index.cjs.map +1 -0
  235. package/dist/components/SelectButton/index.d.cts +4 -0
  236. package/dist/components/SelectButton/index.d.cts.map +1 -0
  237. package/dist/components/SelectButton/index.d.mts +4 -0
  238. package/dist/components/SelectButton/index.d.mts.map +1 -0
  239. package/dist/components/SelectButton/index.mjs +3 -0
  240. package/dist/components/SelectButton/index.mjs.map +1 -0
  241. package/dist/components/SensitiveText/SensitiveText.cjs +4 -4
  242. package/dist/components/SensitiveText/SensitiveText.cjs.map +1 -1
  243. package/dist/components/SensitiveText/SensitiveText.d.cts.map +1 -1
  244. package/dist/components/SensitiveText/SensitiveText.d.mts.map +1 -1
  245. package/dist/components/SensitiveText/SensitiveText.mjs +1 -1
  246. package/dist/components/SensitiveText/SensitiveText.mjs.map +1 -1
  247. package/dist/components/SensitiveText/SensitiveText.types.cjs.map +1 -1
  248. package/dist/components/SensitiveText/SensitiveText.types.d.cts +6 -34
  249. package/dist/components/SensitiveText/SensitiveText.types.d.cts.map +1 -1
  250. package/dist/components/SensitiveText/SensitiveText.types.d.mts +6 -34
  251. package/dist/components/SensitiveText/SensitiveText.types.d.mts.map +1 -1
  252. package/dist/components/SensitiveText/SensitiveText.types.mjs.map +1 -1
  253. package/dist/components/SensitiveText/index.cjs +3 -3
  254. package/dist/components/SensitiveText/index.cjs.map +1 -1
  255. package/dist/components/SensitiveText/index.d.cts +1 -1
  256. package/dist/components/SensitiveText/index.d.cts.map +1 -1
  257. package/dist/components/SensitiveText/index.d.mts +1 -1
  258. package/dist/components/SensitiveText/index.d.mts.map +1 -1
  259. package/dist/components/SensitiveText/index.mjs +1 -1
  260. package/dist/components/SensitiveText/index.mjs.map +1 -1
  261. package/dist/components/TextArea/TextArea.cjs +38 -0
  262. package/dist/components/TextArea/TextArea.cjs.map +1 -0
  263. package/dist/components/TextArea/TextArea.d.cts +166 -0
  264. package/dist/components/TextArea/TextArea.d.cts.map +1 -0
  265. package/dist/components/TextArea/TextArea.d.mts +166 -0
  266. package/dist/components/TextArea/TextArea.d.mts.map +1 -0
  267. package/dist/components/TextArea/TextArea.mjs +35 -0
  268. package/dist/components/TextArea/TextArea.mjs.map +1 -0
  269. package/dist/components/TextArea/TextArea.types.cjs +3 -0
  270. package/dist/components/TextArea/TextArea.types.cjs.map +1 -0
  271. package/dist/components/TextArea/TextArea.types.d.cts +63 -0
  272. package/dist/components/TextArea/TextArea.types.d.cts.map +1 -0
  273. package/dist/components/TextArea/TextArea.types.d.mts +63 -0
  274. package/dist/components/TextArea/TextArea.types.d.mts.map +1 -0
  275. package/dist/components/TextArea/TextArea.types.mjs +2 -0
  276. package/dist/components/TextArea/TextArea.types.mjs.map +1 -0
  277. package/dist/components/TextArea/index.cjs +6 -0
  278. package/dist/components/TextArea/index.cjs.map +1 -0
  279. package/dist/components/TextArea/index.d.cts +3 -0
  280. package/dist/components/TextArea/index.d.cts.map +1 -0
  281. package/dist/components/TextArea/index.d.mts +3 -0
  282. package/dist/components/TextArea/index.d.mts.map +1 -0
  283. package/dist/components/TextArea/index.mjs +2 -0
  284. package/dist/components/TextArea/index.mjs.map +1 -0
  285. package/dist/components/TextField/TextField.cjs +1 -2
  286. package/dist/components/TextField/TextField.cjs.map +1 -1
  287. package/dist/components/TextField/TextField.d.cts +8 -2
  288. package/dist/components/TextField/TextField.d.cts.map +1 -1
  289. package/dist/components/TextField/TextField.d.mts +8 -2
  290. package/dist/components/TextField/TextField.d.mts.map +1 -1
  291. package/dist/components/TextField/TextField.mjs +1 -2
  292. package/dist/components/TextField/TextField.mjs.map +1 -1
  293. package/dist/components/TextField/TextField.types.cjs.map +1 -1
  294. package/dist/components/TextField/TextField.types.d.cts +5 -1
  295. package/dist/components/TextField/TextField.types.d.cts.map +1 -1
  296. package/dist/components/TextField/TextField.types.d.mts +5 -1
  297. package/dist/components/TextField/TextField.types.d.mts.map +1 -1
  298. package/dist/components/TextField/TextField.types.mjs.map +1 -1
  299. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +8 -2
  300. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts.map +1 -1
  301. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +8 -2
  302. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts.map +1 -1
  303. package/dist/components/TitleAlert/TitleAlert.cjs +54 -0
  304. package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -0
  305. package/dist/components/TitleAlert/TitleAlert.d.cts +21 -0
  306. package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -0
  307. package/dist/components/TitleAlert/TitleAlert.d.mts +21 -0
  308. package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -0
  309. package/dist/components/TitleAlert/TitleAlert.mjs +54 -0
  310. package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -0
  311. package/dist/components/TitleAlert/TitleAlert.types.cjs +3 -0
  312. package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -0
  313. package/dist/components/TitleAlert/TitleAlert.types.d.cts +31 -0
  314. package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -0
  315. package/dist/components/TitleAlert/TitleAlert.types.d.mts +31 -0
  316. package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -0
  317. package/dist/components/TitleAlert/TitleAlert.types.mjs +2 -0
  318. package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -0
  319. package/dist/components/TitleAlert/index.cjs +6 -0
  320. package/dist/components/TitleAlert/index.cjs.map +1 -0
  321. package/dist/components/TitleAlert/index.d.cts +3 -0
  322. package/dist/components/TitleAlert/index.d.cts.map +1 -0
  323. package/dist/components/TitleAlert/index.d.mts +3 -0
  324. package/dist/components/TitleAlert/index.d.mts.map +1 -0
  325. package/dist/components/TitleAlert/index.mjs +2 -0
  326. package/dist/components/TitleAlert/index.mjs.map +1 -0
  327. package/dist/components/index.cjs +24 -2
  328. package/dist/components/index.cjs.map +1 -1
  329. package/dist/components/index.d.cts +18 -0
  330. package/dist/components/index.d.cts.map +1 -1
  331. package/dist/components/index.d.mts +18 -0
  332. package/dist/components/index.d.mts.map +1 -1
  333. package/dist/components/index.mjs +9 -0
  334. package/dist/components/index.mjs.map +1 -1
  335. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +36 -0
  336. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -0
  337. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts +4 -0
  338. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -0
  339. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts +4 -0
  340. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -0
  341. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +36 -0
  342. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -0
  343. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs +8 -0
  344. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.cjs.map +1 -0
  345. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.cts +39 -0
  346. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.cts.map +1 -0
  347. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.mts +39 -0
  348. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.d.mts.map +1 -0
  349. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.mjs +10 -0
  350. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.types.mjs.map +1 -0
  351. package/dist/components/temp-components/HeaderStandardCenterColumn/index.cjs +6 -0
  352. package/dist/components/temp-components/HeaderStandardCenterColumn/index.cjs.map +1 -0
  353. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.cts +3 -0
  354. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.cts.map +1 -0
  355. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.mts +3 -0
  356. package/dist/components/temp-components/HeaderStandardCenterColumn/index.d.mts.map +1 -0
  357. package/dist/components/temp-components/HeaderStandardCenterColumn/index.mjs +2 -0
  358. package/dist/components/temp-components/HeaderStandardCenterColumn/index.mjs.map +1 -0
  359. package/package.json +2 -2
  360. package/dist/components/SensitiveText/SensitiveText.constants.cjs +0 -14
  361. package/dist/components/SensitiveText/SensitiveText.constants.cjs.map +0 -1
  362. package/dist/components/SensitiveText/SensitiveText.constants.d.cts +0 -11
  363. package/dist/components/SensitiveText/SensitiveText.constants.d.cts.map +0 -1
  364. package/dist/components/SensitiveText/SensitiveText.constants.d.mts +0 -11
  365. package/dist/components/SensitiveText/SensitiveText.constants.d.mts.map +0 -1
  366. package/dist/components/SensitiveText/SensitiveText.constants.mjs +0 -11
  367. package/dist/components/SensitiveText/SensitiveText.constants.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Input.cjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";;;AAAA,yEAAyE;AACzE,q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CAAC;IAElB,OAAO,CACL,CAAC,wBAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { FontFamily, TextVariant } from '@metamask/design-system-shared';\nimport {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask/design-tokens';\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadOnly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n const variantTextStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n\n useEffect(() => {\n if (isDisabled || isReadOnly) {\n setIsFocused(false);\n }\n }, [isDisabled, isReadOnly]);\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const resolvedStyle = [\n inputStyle,\n variantTextStyle,\n // iOS-only workaround: when a placeholder is visible, native iOS\n // TextInput can render placeholder text vertically offset.\n // Keep this iOS-only because lineHeight: 0 can collapse text on Android.\n Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n {...props}\n placeholder={placeholder}\n placeholderTextColor={placeholderTextColor}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadOnly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\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,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { FontFamily, TextVariant } from '@metamask/design-system-shared';\nimport {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask/design-tokens';\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadOnly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n multiline,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n const isMultiline = multiline === true;\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n // Multiline field styles\n const multilineChromeStyle = useMemo(\n () =>\n tw.style(\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [isStateStylesDisabled, isDisabled, isFocused, twClassName, tw],\n );\n const multilineTypographyStyle = useMemo(\n () => tw.style(`text-${textVariant}`, fontClass),\n [textVariant, fontClass, tw],\n );\n\n // Single-line field styles\n const singleLineChromeStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n const singleLineTypographyStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n // iOS-only single-line placeholder fix: native TextInput can render\n // placeholder text vertically offset. Do not use on Android (lineHeight 0\n // collapses text) or on multiline (breaks paragraph layout).\n const iosSingleLinePlaceholderLineHeightFix = Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const };\n\n const resolvedStyle = (\n isMultiline\n ? [multilineChromeStyle, multilineTypographyStyle, style]\n : [\n singleLineChromeStyle,\n singleLineTypographyStyle,\n iosSingleLinePlaceholderLineHeightFix,\n style,\n ]\n ).filter(Boolean);\n\n useEffect(() => {\n if (isDisabled || isReadOnly) {\n setIsFocused(false);\n }\n }, [isDisabled, isReadOnly]);\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n\n return (\n <TextInput\n ref={ref}\n {...props}\n multiline={multiline}\n placeholder={placeholder}\n placeholderTextColor={placeholderTextColor}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadOnly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAUnD,eAAO,MAAM,KAAK;;6CAqHjB,CAAC"}
1
+ {"version":3,"file":"Input.d.cts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAUnD,eAAO,MAAM,KAAK;;6CAoJjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAUnD,eAAO,MAAM,KAAK;;6CAqHjB,CAAC"}
1
+ {"version":3,"file":"Input.d.mts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAY,SAAS,EAAE,8BAAqB;AAUnD,eAAO,MAAM,KAAK;;6CAoJjB,CAAC"}
@@ -5,10 +5,11 @@ import { forwardRef, useCallback, useEffect, useMemo, useState } from "react";
5
5
  import { Platform, TextInput } from "react-native/index.js";
6
6
  import { TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT, TWCLASSMAP_TEXT_FONTWEIGHT } from "../Text/Text.constants.mjs";
7
7
  import { MAP_TEXT_VARIANT_INPUT_METRICS } from "./Input.constants.mjs";
8
- export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadOnly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, ...props }, ref) => {
8
+ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isStateStylesDisabled, isDisabled = false, isReadOnly = false, value, placeholder, twClassName, onBlur, onFocus, autoFocus = false, multiline, ...props }, ref) => {
9
9
  const [isFocused, setIsFocused] = useState(autoFocus);
10
10
  const tw = useTailwind();
11
11
  const theme = useTheme();
12
+ const isMultiline = multiline === true;
12
13
  const placeholderTextColor = useMemo(() => theme === Theme.Light
13
14
  ? lightTheme.colors.text.alternative
14
15
  : darkTheme.colors.text.alternative, [theme]);
@@ -20,7 +21,14 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
20
21
  // the controlled value is empty. This keeps the iOS lineHeight workaround
21
22
  // scoped to the placeholder-visible state without affecting typed text.
22
23
  const isPlaceholderVisible = hasPlaceholder && value === '';
23
- const inputStyle = useMemo(() => tw.style(fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
24
+ // Multiline field styles
25
+ const multilineChromeStyle = useMemo(() => tw.style('text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
26
+ !isDisabled &&
27
+ isFocused &&
28
+ 'border-primary-default', twClassName), [isStateStylesDisabled, isDisabled, isFocused, twClassName, tw]);
29
+ const multilineTypographyStyle = useMemo(() => tw.style(`text-${textVariant}`, fontClass), [textVariant, fontClass, tw]);
30
+ // Single-line field styles
31
+ const singleLineChromeStyle = useMemo(() => tw.style(fontClass, 'text-default', 'bg-default', 'border', 'border-transparent', !isStateStylesDisabled && isDisabled && 'opacity-50', !isStateStylesDisabled &&
24
32
  !isDisabled &&
25
33
  isFocused &&
26
34
  'border-primary-default', twClassName), [
@@ -31,7 +39,20 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
31
39
  twClassName,
32
40
  tw,
33
41
  ]);
34
- const variantTextStyle = useMemo(() => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant], [textVariant]);
42
+ const singleLineTypographyStyle = useMemo(() => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant], [textVariant]);
43
+ // iOS-only single-line placeholder fix: native TextInput can render
44
+ // placeholder text vertically offset. Do not use on Android (lineHeight 0
45
+ // collapses text) or on multiline (breaks paragraph layout).
46
+ const iosSingleLinePlaceholderLineHeightFix = Platform.OS === 'ios' &&
47
+ isPlaceholderVisible && { lineHeight: 0 };
48
+ const resolvedStyle = (isMultiline
49
+ ? [multilineChromeStyle, multilineTypographyStyle, style]
50
+ : [
51
+ singleLineChromeStyle,
52
+ singleLineTypographyStyle,
53
+ iosSingleLinePlaceholderLineHeightFix,
54
+ style,
55
+ ]).filter(Boolean);
35
56
  useEffect(() => {
36
57
  if (isDisabled || isReadOnly) {
37
58
  setIsFocused(false);
@@ -45,16 +66,6 @@ export const Input = forwardRef(({ style, textVariant = TextVariant.BodyMd, isSt
45
66
  setIsFocused(true);
46
67
  onFocus?.(e);
47
68
  }, [onFocus]);
48
- const resolvedStyle = [
49
- inputStyle,
50
- variantTextStyle,
51
- // iOS-only workaround: when a placeholder is visible, native iOS
52
- // TextInput can render placeholder text vertically offset.
53
- // Keep this iOS-only because lineHeight: 0 can collapse text on Android.
54
- Platform.OS === 'ios' &&
55
- isPlaceholderVisible && { lineHeight: 0 },
56
- style,
57
- ].filter(Boolean);
58
- return (<TextInput ref={ref} {...props} placeholder={placeholder} placeholderTextColor={placeholderTextColor} value={value} style={resolvedStyle} editable={!isDisabled && !isReadOnly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
69
+ return (<TextInput ref={ref} {...props} multiline={multiline} placeholder={placeholder} placeholderTextColor={placeholderTextColor} value={value} style={resolvedStyle} editable={!isDisabled && !isReadOnly} autoFocus={autoFocus} onBlur={onBlurHandler} onFocus={onFocusHandler}/>);
59
70
  });
60
71
  //# sourceMappingURL=Input.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../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AC,CAAC;IACf,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IACF,MAAM,aAAa,GAAG;QACpB,UAAU;QACV,gBAAgB;QAChB,iEAAiE;QACjE,2DAA2D;QAC3D,yEAAyE;QACzE,QAAQ,CAAC,EAAE,KAAK,KAAK;YACnB,oBAAoB,IAAI,EAAE,UAAU,EAAE,CAAU,EAAE;QACpD,KAAK;KACN,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAElB,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { FontFamily, TextVariant } from '@metamask/design-system-shared';\nimport {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask/design-tokens';\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadOnly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n const inputStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n\n const variantTextStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n\n useEffect(() => {\n if (isDisabled || isReadOnly) {\n setIsFocused(false);\n }\n }, [isDisabled, isReadOnly]);\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n const resolvedStyle = [\n inputStyle,\n variantTextStyle,\n // iOS-only workaround: when a placeholder is visible, native iOS\n // TextInput can render placeholder text vertically offset.\n // Keep this iOS-only because lineHeight: 0 can collapse text on Android.\n Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const },\n style,\n ].filter(Boolean);\n\n return (\n <TextInput\n ref={ref}\n {...props}\n placeholder={placeholder}\n placeholderTextColor={placeholderTextColor}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadOnly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
1
+ {"version":3,"file":"Input.mjs","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,uCAAuC;AACzE,OAAO,EACL,KAAK,EACL,WAAW,EACX,QAAQ,EACT,6CAA6C;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gCAAgC;AAChE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc;AAC9E,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,8BAAqB;AAEnD,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC3B,mCAA+B;AAEhC,OAAO,EAAE,8BAA8B,EAAE,8BAA0B;AAGnE,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EACE,KAAK,EACL,WAAW,GAAG,WAAW,CAAC,MAAM,EAChC,qBAAqB,EACrB,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,WAAW,EACX,WAAW,EACX,MAAM,EACN,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACtD,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,QAAQ,EAAE,CA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C,CAAoD,EAAE,EAAE;QACvD,YAAY,CAAC,IAAI,CAAC,CAAC;QACnB,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IACf,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,IAAI,KAAK,CAAC,CACV,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,oBAAoB,CAAC,CAAC,oBAAoB,CAAC,CAC3C,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,QAAQ,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,CACrC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrB,MAAM,CAAC,CAAC,aAAa,CAAC,CACtB,OAAO,CAAC,CAAC,cAAc,CAAC,EACxB,CACH,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["import { FontFamily, TextVariant } from '@metamask/design-system-shared';\nimport {\n Theme,\n useTailwind,\n useTheme,\n} from '@metamask/design-system-twrnc-preset';\nimport { darkTheme, lightTheme } from '@metamask/design-tokens';\nimport { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT,\n TWCLASSMAP_TEXT_FONTWEIGHT,\n} from '../Text/Text.constants';\n\nimport { MAP_TEXT_VARIANT_INPUT_METRICS } from './Input.constants';\nimport type { InputProps } from './Input.types';\n\nexport const Input = forwardRef<TextInput, InputProps>(\n (\n {\n style,\n textVariant = TextVariant.BodyMd,\n isStateStylesDisabled,\n isDisabled = false,\n isReadOnly = false,\n value,\n placeholder,\n twClassName,\n onBlur,\n onFocus,\n autoFocus = false,\n multiline,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(autoFocus);\n const tw = useTailwind();\n const theme = useTheme();\n const isMultiline = multiline === true;\n\n const placeholderTextColor = useMemo(\n () =>\n theme === Theme.Light\n ? lightTheme.colors.text.alternative\n : darkTheme.colors.text.alternative,\n [theme],\n );\n\n const finalFontWeight = TWCLASSMAP_TEXT_VARIANT_FONTWEIGHT[textVariant];\n const fontSuffix = TWCLASSMAP_TEXT_FONTWEIGHT[finalFontWeight];\n const fontClass = `font-${FontFamily.Default}${fontSuffix}`;\n const hasPlaceholder =\n placeholder !== undefined && placeholder !== null && placeholder !== '';\n // Only apply placeholder-mode styling when a placeholder is present and\n // the controlled value is empty. This keeps the iOS lineHeight workaround\n // scoped to the placeholder-visible state without affecting typed text.\n const isPlaceholderVisible = hasPlaceholder && value === '';\n\n // Multiline field styles\n const multilineChromeStyle = useMemo(\n () =>\n tw.style(\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [isStateStylesDisabled, isDisabled, isFocused, twClassName, tw],\n );\n const multilineTypographyStyle = useMemo(\n () => tw.style(`text-${textVariant}`, fontClass),\n [textVariant, fontClass, tw],\n );\n\n // Single-line field styles\n const singleLineChromeStyle = useMemo(\n () =>\n tw.style(\n fontClass,\n 'text-default',\n 'bg-default',\n 'border',\n 'border-transparent',\n !isStateStylesDisabled && isDisabled && 'opacity-50',\n !isStateStylesDisabled &&\n !isDisabled &&\n isFocused &&\n 'border-primary-default',\n twClassName,\n ),\n [\n fontClass,\n isStateStylesDisabled,\n isDisabled,\n isFocused,\n twClassName,\n tw,\n ],\n );\n const singleLineTypographyStyle = useMemo(\n () => MAP_TEXT_VARIANT_INPUT_METRICS[textVariant],\n [textVariant],\n );\n // iOS-only single-line placeholder fix: native TextInput can render\n // placeholder text vertically offset. Do not use on Android (lineHeight 0\n // collapses text) or on multiline (breaks paragraph layout).\n const iosSingleLinePlaceholderLineHeightFix = Platform.OS === 'ios' &&\n isPlaceholderVisible && { lineHeight: 0 as const };\n\n const resolvedStyle = (\n isMultiline\n ? [multilineChromeStyle, multilineTypographyStyle, style]\n : [\n singleLineChromeStyle,\n singleLineTypographyStyle,\n iosSingleLinePlaceholderLineHeightFix,\n style,\n ]\n ).filter(Boolean);\n\n useEffect(() => {\n if (isDisabled || isReadOnly) {\n setIsFocused(false);\n }\n }, [isDisabled, isReadOnly]);\n\n const onBlurHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onBlur']>>[0]) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [onBlur],\n );\n\n const onFocusHandler = useCallback(\n (e: Parameters<NonNullable<InputProps['onFocus']>>[0]) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [onFocus],\n );\n\n return (\n <TextInput\n ref={ref}\n {...props}\n multiline={multiline}\n placeholder={placeholder}\n placeholderTextColor={placeholderTextColor}\n value={value}\n style={resolvedStyle}\n editable={!isDisabled && !isReadOnly}\n autoFocus={autoFocus}\n onBlur={onBlurHandler}\n onFocus={onFocusHandler}\n />\n );\n },\n);\n"]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.SectionDivider = void 0;
27
+ const design_system_shared_1 = require("@metamask/design-system-shared");
28
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
29
+ const react_1 = __importStar(require("react"));
30
+ const Box_1 = require("../Box/index.cjs");
31
+ exports.SectionDivider = (0, react_1.forwardRef)(({ borderWidth, borderColor, marginVertical, twClassName, style, ...rest }, ref) => {
32
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
33
+ const w = borderWidth ?? 1;
34
+ let borderTopClass;
35
+ if (w === 0) {
36
+ borderTopClass = 'border-t-0';
37
+ }
38
+ else if (w === 1) {
39
+ borderTopClass = 'border-t';
40
+ }
41
+ else {
42
+ borderTopClass = `border-t-${w}`;
43
+ }
44
+ return (<Box_1.Box ref={ref} borderColor={borderColor ?? design_system_shared_1.BoxBorderColor.BorderMuted} marginVertical={marginVertical ?? 5} style={[tw.style('self-stretch', borderTopClass, twClassName), style]} {...rest}/>);
45
+ });
46
+ exports.SectionDivider.displayName = 'SectionDivider';
47
+ //# sourceMappingURL=SectionDivider.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAgE;AAChE,qFAAmE;AACnE,+CAA0C;AAG1C,0CAA6B;AAIhB,QAAA,cAAc,GAAG,IAAA,kBAAU,EACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,cAAc,GAAG,YAAY,CAAC;KAC/B;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE;QAClB,cAAc,GAAG,UAAU,CAAC;KAC7B;SAAM;QACL,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;KAClC;IAED,OAAO,CACL,CAAC,SAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,qCAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { View } from "react-native/index.js";
3
+ export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
4
+ twClassName?: string | undefined;
5
+ } & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=SectionDivider.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.d.cts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,cAAc;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,8BAAqB;AAMzC,eAAO,MAAM,cAAc;;8BA0B1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ import type { View } from "react-native/index.js";
3
+ export declare const SectionDivider: React.ForwardRefExoticComponent<import("@metamask/design-system-shared").BoxPropsShared & import("react-native").ViewProps & {
4
+ twClassName?: string | undefined;
5
+ } & React.RefAttributes<View>>;
6
+ //# sourceMappingURL=SectionDivider.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.d.mts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,cAAc;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,8BAAqB;AAMzC,eAAO,MAAM,cAAc;;8BA0B1B,CAAC"}
@@ -0,0 +1,28 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { BoxBorderColor } from "@metamask/design-system-shared";
8
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
9
+ import $React, { forwardRef } from "react";
10
+ const React = $importDefault($React);
11
+ import { Box } from "../Box/index.mjs";
12
+ export const SectionDivider = forwardRef(({ borderWidth, borderColor, marginVertical, twClassName, style, ...rest }, ref) => {
13
+ const tw = useTailwind();
14
+ const w = borderWidth ?? 1;
15
+ let borderTopClass;
16
+ if (w === 0) {
17
+ borderTopClass = 'border-t-0';
18
+ }
19
+ else if (w === 1) {
20
+ borderTopClass = 'border-t';
21
+ }
22
+ else {
23
+ borderTopClass = `border-t-${w}`;
24
+ }
25
+ return (<Box ref={ref} borderColor={borderColor ?? BoxBorderColor.BorderMuted} marginVertical={marginVertical ?? 5} style={[tw.style('self-stretch', borderTopClass, twClassName), style]} {...rest}/>);
26
+ });
27
+ SectionDivider.displayName = 'SectionDivider';
28
+ //# sourceMappingURL=SectionDivider.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,uCAAuC;AAChE,OAAO,EAAE,WAAW,EAAE,6CAA6C;AACnE,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAG1C,OAAO,EAAE,GAAG,EAAE,yBAAe;AAI7B,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,CACE,EAAE,WAAW,EAAE,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,EACzE,GAAG,EACH,EAAE;IACF,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,CAAC;IAC3B,IAAI,cAAsB,CAAC;IAC3B,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,cAAc,GAAG,YAAY,CAAC;KAC/B;SAAM,IAAI,CAAC,KAAK,CAAC,EAAE;QAClB,cAAc,GAAG,UAAU,CAAC;KAC7B;SAAM;QACL,cAAc,GAAG,YAAY,CAAC,EAAE,CAAC;KAClC;IAED,OAAO,CACL,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,WAAW,CAAC,CAAC,WAAW,IAAI,cAAc,CAAC,WAAW,CAAC,CACvD,cAAc,CAAC,CAAC,cAAc,IAAI,CAAC,CAAC,CACpC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,EAAE,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,CACtE,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import { BoxBorderColor } from '@metamask/design-system-shared';\nimport { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { forwardRef } from 'react';\nimport type { View } from 'react-native';\n\nimport { Box } from '../Box';\n\nimport type { SectionDividerProps } from './SectionDivider.types';\n\nexport const SectionDivider = forwardRef<View, SectionDividerProps>(\n (\n { borderWidth, borderColor, marginVertical, twClassName, style, ...rest },\n ref,\n ) => {\n const tw = useTailwind();\n const w = borderWidth ?? 1;\n let borderTopClass: string;\n if (w === 0) {\n borderTopClass = 'border-t-0';\n } else if (w === 1) {\n borderTopClass = 'border-t';\n } else {\n borderTopClass = `border-t-${w}`;\n }\n\n return (\n <Box\n ref={ref}\n borderColor={borderColor ?? BoxBorderColor.BorderMuted}\n marginVertical={marginVertical ?? 5}\n style={[tw.style('self-stretch', borderTopClass, twClassName), style]}\n {...rest}\n />\n );\n },\n);\n\nSectionDivider.displayName = 'SectionDivider';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SectionDivider.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxProps } from '../Box/Box.types';\n\nexport type SectionDividerProps = BoxProps;\n"]}
@@ -0,0 +1,3 @@
1
+ import type { BoxProps } from "../Box/Box.types.cjs";
2
+ export type SectionDividerProps = BoxProps;
3
+ //# sourceMappingURL=SectionDivider.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AAEjD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { BoxProps } from "../Box/Box.types.mjs";
2
+ export type SectionDividerProps = BoxProps;
3
+ //# sourceMappingURL=SectionDivider.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.d.mts","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AAEjD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=SectionDivider.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionDivider.types.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/SectionDivider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxProps } from '../Box/Box.types';\n\nexport type SectionDividerProps = BoxProps;\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SectionDivider = void 0;
4
+ var SectionDivider_1 = require("./SectionDivider.cjs");
5
+ Object.defineProperty(exports, "SectionDivider", { enumerable: true, get: function () { return SectionDivider_1.SectionDivider; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":";;;AAAA,uDAAkD;AAAzC,gHAAA,cAAc,OAAA","sourcesContent":["export { SectionDivider } from './SectionDivider';\nexport type { SectionDividerProps } from './SectionDivider.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { SectionDivider } from "./SectionDivider.cjs";
2
+ export type { SectionDividerProps } from "./SectionDivider.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,YAAY,EAAE,mBAAmB,EAAE,mCAA+B"}
@@ -0,0 +1,3 @@
1
+ export { SectionDivider } from "./SectionDivider.mjs";
2
+ export type { SectionDividerProps } from "./SectionDivider.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB;AAClD,YAAY,EAAE,mBAAmB,EAAE,mCAA+B"}
@@ -0,0 +1,2 @@
1
+ export { SectionDivider } from "./SectionDivider.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/SectionDivider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,6BAAyB","sourcesContent":["export { SectionDivider } from './SectionDivider';\nexport type { SectionDividerProps } from './SectionDivider.types';\n"]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SectionHeader = void 0;
7
+ const design_system_shared_1 = require("@metamask/design-system-shared");
8
+ const react_1 = __importDefault(require("react"));
9
+ const BoxRow_1 = require("../BoxRow/index.cjs");
10
+ const Icon_1 = require("../Icon/index.cjs");
11
+ /**
12
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
13
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
14
+ *
15
+ * @param props - Component props
16
+ * @param props.title - Title content for the inner row (required)
17
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
18
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
19
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
20
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
21
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
22
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
23
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
24
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
25
+ * @param props.endIconProps - Props merged into the end `Icon`
26
+ * @param props.twClassName - Optional Tailwind classes on the outer row
27
+ *
28
+ * @returns The rendered SectionHeader layout.
29
+ */
30
+ const SectionHeader = ({ title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, twClassName = '', ...rest }) => {
31
+ const finalStartIconName = startIconName ?? startIconProps?.name;
32
+ const finalEndIconName = endIconName ?? endIconProps?.name;
33
+ return (<BoxRow_1.BoxRow {...rest} gap={1} twClassName={twClassName} startAccessory={finalStartIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={finalStartIconName}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon_1.Icon size={design_system_shared_1.IconSize.Md} color={design_system_shared_1.IconColor.IconDefault} twClassName="shrink-0" {...endIconProps} name={finalEndIconName}/>) : (endAccessory)}>
34
+ {title ? (<BoxRow_1.BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
35
+ variant: design_system_shared_1.TextVariant.HeadingMd,
36
+ color: design_system_shared_1.TextColor.TextDefault,
37
+ ...titleProps,
38
+ }}>
39
+ {title}
40
+ </BoxRow_1.BoxRow>) : null}
41
+ </BoxRow_1.BoxRow>);
42
+ };
43
+ exports.SectionHeader = SectionHeader;
44
+ exports.SectionHeader.displayName = 'SectionHeader';
45
+ //# sourceMappingURL=SectionHeader.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAKwC;AACxC,kDAA0B;AAE1B,gDAAmC;AACnC,4CAA+B;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AACI,MAAM,aAAa,GAAiC,CAAC,EAC1D,KAAK,EACL,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,WAAW,GAAG,EAAE,EAChB,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,OAAO,CACL,CAAC,eAAM,CACL,IAAI,IAAI,CAAC,CACT,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,cAAc,CAAC,CACb,kBAAkB,CAAC,CAAC,CAAC,CACnB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,cAAc,CAAC,CACnB,IAAI,CAAC,CAAC,kBAAkB,CAAC,EACzB,CACH,CAAC,CAAC,CAAC,CACF,cAAc,CACf,CACF,CACD,YAAY,CAAC,CACX,gBAAgB,CAAC,CAAC,CAAC,CACjB,CAAC,WAAI,CACH,IAAI,CAAC,CAAC,+BAAQ,CAAC,EAAE,CAAC,CAClB,KAAK,CAAC,CAAC,gCAAS,CAAC,WAAW,CAAC,CAC7B,WAAW,CAAC,UAAU,CACtB,IAAI,YAAY,CAAC,CACjB,IAAI,CAAC,CAAC,gBAAgB,CAAC,EACvB,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACF,CAED;MAAA,CAAC,KAAK,CAAC,CAAC,CAAC,CACP,CAAC,eAAM,CACL,IAAI,iBAAiB,CAAC,CACtB,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,cAAc,CAAC,CAC7B,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,kCAAW,CAAC,SAAS;gBAC9B,KAAK,EAAE,gCAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,eAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,eAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAjEW,QAAA,aAAa,iBAiExB;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * Remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param props - Component props\n * @param props.title - Title content for the inner row (required)\n * @param props.titleAccessory - Optional node to the right of `title` in the inner row\n * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved\n * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved\n * @param props.endIconProps - Props merged into the end `Icon`\n * @param props.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = ({\n title,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n twClassName = '',\n ...rest\n}) => {\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n return (\n <BoxRow\n {...rest}\n gap={1}\n twClassName={twClassName}\n startAccessory={\n finalStartIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={finalStartIconName}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={finalEndIconName}\n />\n ) : (\n endAccessory\n )\n }\n >\n {title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import type { SectionHeaderProps } from "./SectionHeader.types.cjs";
3
+ /**
4
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
5
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
6
+ *
7
+ * @param props - Component props
8
+ * @param props.title - Title content for the inner row (required)
9
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
10
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
11
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
12
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
13
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
14
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
15
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
16
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
17
+ * @param props.endIconProps - Props merged into the end `Icon`
18
+ * @param props.twClassName - Optional Tailwind classes on the outer row
19
+ *
20
+ * @returns The rendered SectionHeader layout.
21
+ */
22
+ export declare const SectionHeader: React.FC<SectionHeaderProps>;
23
+ //# sourceMappingURL=SectionHeader.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiEtD,CAAC"}
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ import type { SectionHeaderProps } from "./SectionHeader.types.mjs";
3
+ /**
4
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
5
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
6
+ *
7
+ * @param props - Component props
8
+ * @param props.title - Title content for the inner row (required)
9
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
10
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
11
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
12
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
13
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
14
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
15
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
16
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
17
+ * @param props.endIconProps - Props merged into the end `Icon`
18
+ * @param props.twClassName - Optional Tailwind classes on the outer row
19
+ *
20
+ * @returns The rendered SectionHeader layout.
21
+ */
22
+ export declare const SectionHeader: React.FC<SectionHeaderProps>;
23
+ //# sourceMappingURL=SectionHeader.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.d.mts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiEtD,CAAC"}
@@ -0,0 +1,45 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { IconColor, IconSize, TextColor, TextVariant } from "@metamask/design-system-shared";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { BoxRow } from "../BoxRow/index.mjs";
11
+ import { Icon } from "../Icon/index.mjs";
12
+ /**
13
+ * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.
14
+ * Remaining `View` props are forwarded to the outer {@link BoxRow}.
15
+ *
16
+ * @param props - Component props
17
+ * @param props.title - Title content for the inner row (required)
18
+ * @param props.titleAccessory - Optional node to the right of `title` in the inner row
19
+ * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string
20
+ * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`
21
+ * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved
22
+ * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved
23
+ * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)
24
+ * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved
25
+ * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved
26
+ * @param props.endIconProps - Props merged into the end `Icon`
27
+ * @param props.twClassName - Optional Tailwind classes on the outer row
28
+ *
29
+ * @returns The rendered SectionHeader layout.
30
+ */
31
+ export const SectionHeader = ({ title, titleAccessory, titleProps, titleWrapperProps, startAccessory, startIconName, startIconProps, endAccessory, endIconName, endIconProps, twClassName = '', ...rest }) => {
32
+ const finalStartIconName = startIconName ?? startIconProps?.name;
33
+ const finalEndIconName = endIconName ?? endIconProps?.name;
34
+ return (<BoxRow {...rest} gap={1} twClassName={twClassName} startAccessory={finalStartIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...startIconProps} name={finalStartIconName}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon size={IconSize.Md} color={IconColor.IconDefault} twClassName="shrink-0" {...endIconProps} name={finalEndIconName}/>) : (endAccessory)}>
35
+ {title ? (<BoxRow {...titleWrapperProps} gap={1} endAccessory={titleAccessory} textProps={{
36
+ variant: TextVariant.HeadingMd,
37
+ color: TextColor.TextDefault,
38
+ ...titleProps,
39
+ }}>
40
+ {title}
41
+ </BoxRow>) : null}
42
+ </BoxRow>);
43
+ };
44
+ SectionHeader.displayName = 'SectionHeader';
45
+ //# sourceMappingURL=SectionHeader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.mjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,aAAa,GAAi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,CAAC,SAAS;gBAC9B,KAAK,EAAE,SAAS,CAAC,WAAW;gBAC5B,GAAG,UAAU;aACd,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n IconColor,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { BoxRow } from '../BoxRow';\nimport { Icon } from '../Icon';\n\nimport type { SectionHeaderProps } from './SectionHeader.types';\n\n/**\n * Horizontal section header: optional start/end icons or accessories, and a title row with optional inline accessory.\n * Remaining `View` props are forwarded to the outer {@link BoxRow}.\n *\n * @param props - Component props\n * @param props.title - Title content for the inner row (required)\n * @param props.titleAccessory - Optional node to the right of `title` in the inner row\n * @param props.titleProps - Optional props merged into inner row `Text` when `title` is a string\n * @param props.titleWrapperProps - Optional props spread onto the inner `BoxRow`\n * @param props.startAccessory - Optional custom node before the title row on the outer row; used when no start icon is resolved\n * @param props.startIconName - Optional start icon; takes precedence over `startAccessory` when resolved\n * @param props.startIconProps - Props merged into the start `Icon` (defaults include medium size and default icon color)\n * @param props.endAccessory - Optional custom node after the title row on the outer row; used when no end icon is resolved\n * @param props.endIconName - Optional end icon; takes precedence over `endAccessory` when resolved\n * @param props.endIconProps - Props merged into the end `Icon`\n * @param props.twClassName - Optional Tailwind classes on the outer row\n *\n * @returns The rendered SectionHeader layout.\n */\nexport const SectionHeader: React.FC<SectionHeaderProps> = ({\n title,\n titleAccessory,\n titleProps,\n titleWrapperProps,\n startAccessory,\n startIconName,\n startIconProps,\n endAccessory,\n endIconName,\n endIconProps,\n twClassName = '',\n ...rest\n}) => {\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n return (\n <BoxRow\n {...rest}\n gap={1}\n twClassName={twClassName}\n startAccessory={\n finalStartIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...startIconProps}\n name={finalStartIconName}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n size={IconSize.Md}\n color={IconColor.IconDefault}\n twClassName=\"shrink-0\"\n {...endIconProps}\n name={finalEndIconName}\n />\n ) : (\n endAccessory\n )\n }\n >\n {title ? (\n <BoxRow\n {...titleWrapperProps}\n gap={1}\n endAccessory={titleAccessory}\n textProps={{\n variant: TextVariant.HeadingMd,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n ) : null}\n </BoxRow>\n );\n};\n\nSectionHeader.displayName = 'SectionHeader';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SectionHeader.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.types.cjs","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { SectionHeaderPropsShared } from '@metamask/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * SectionHeader component props (React Native).\n * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.\n */\nexport type SectionHeaderProps = SectionHeaderPropsShared & {\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).\n */\n titleWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional prop to pass additional properties to the start icon.\n */\n startIconProps?: Partial<IconProps>;\n /**\n * Optional prop to pass additional properties to the end icon.\n */\n endIconProps?: Partial<IconProps>;\n /**\n * Optional Tailwind class name to apply to the outer row.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,32 @@
1
+ import type { SectionHeaderPropsShared } from "@metamask/design-system-shared";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
4
+ import type { IconProps } from "../Icon/index.cjs";
5
+ import type { TextProps } from "../Text/Text.types.cjs";
6
+ /**
7
+ * SectionHeader component props (React Native).
8
+ * Extends {@link SectionHeaderPropsShared} with platform `Text` / `Icon` passthroughs, `twClassName`, and `View` props.
9
+ */
10
+ export type SectionHeaderProps = SectionHeaderPropsShared & {
11
+ /**
12
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
13
+ */
14
+ titleProps?: Omit<Partial<TextProps>, 'children'>;
15
+ /**
16
+ * Optional props spread onto the title row {@link BoxRow}. Omits `children`, `endAccessory`, and `textProps` (SectionHeader sets those via `title`, `titleAccessory`, and `titleProps`).
17
+ */
18
+ titleWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
19
+ /**
20
+ * Optional prop to pass additional properties to the start icon.
21
+ */
22
+ startIconProps?: Partial<IconProps>;
23
+ /**
24
+ * Optional prop to pass additional properties to the end icon.
25
+ */
26
+ endIconProps?: Partial<IconProps>;
27
+ /**
28
+ * Optional Tailwind class name to apply to the outer row.
29
+ */
30
+ twClassName?: string;
31
+ } & Omit<ViewProps, 'children'>;
32
+ //# sourceMappingURL=SectionHeader.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SectionHeader.types.d.cts","sourceRoot":"","sources":["../../../src/components/SectionHeader/SectionHeader.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,uCAAuC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAG9C,OAAO,KAAK,EAAE,WAAW,EAAE,mCAA+B;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,iBAAiB,CAAC,EAAE,IAAI,CACtB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACpC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}