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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/dist/components/BadgeNetwork/BadgeNetwork.types.cjs.map +1 -1
  3. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts +6 -15
  4. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.cts.map +1 -1
  5. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts +6 -15
  6. package/dist/components/BadgeNetwork/BadgeNetwork.types.d.mts.map +1 -1
  7. package/dist/components/BadgeNetwork/BadgeNetwork.types.mjs.map +1 -1
  8. package/dist/components/BannerAlert/BannerAlert.cjs +1 -2
  9. package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -1
  10. package/dist/components/BannerAlert/BannerAlert.constants.cjs +16 -16
  11. package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
  12. package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
  13. package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
  14. package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
  15. package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
  16. package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
  17. package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
  18. package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -1
  19. package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -1
  20. package/dist/components/BannerAlert/BannerAlert.mjs +1 -2
  21. package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -1
  22. package/dist/components/BannerBase/BannerBase.cjs +2 -2
  23. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  24. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  25. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  26. package/dist/components/BannerBase/BannerBase.mjs +2 -2
  27. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  28. package/dist/components/Box/Box.constants.cjs.map +1 -1
  29. package/dist/components/Box/Box.constants.d.cts +1 -1
  30. package/dist/components/Box/Box.constants.d.cts.map +1 -1
  31. package/dist/components/Box/Box.constants.d.mts +1 -1
  32. package/dist/components/Box/Box.constants.d.mts.map +1 -1
  33. package/dist/components/Box/Box.constants.mjs.map +1 -1
  34. package/dist/components/Box/Box.types.cjs.map +1 -1
  35. package/dist/components/Box/Box.types.d.cts +107 -3
  36. package/dist/components/Box/Box.types.d.cts.map +1 -1
  37. package/dist/components/Box/Box.types.d.mts +107 -3
  38. package/dist/components/Box/Box.types.d.mts.map +1 -1
  39. package/dist/components/Box/Box.types.mjs.map +1 -1
  40. package/dist/components/Box/index.cjs +7 -7
  41. package/dist/components/Box/index.cjs.map +1 -1
  42. package/dist/components/Box/index.d.cts +2 -1
  43. package/dist/components/Box/index.d.cts.map +1 -1
  44. package/dist/components/Box/index.d.mts +2 -1
  45. package/dist/components/Box/index.d.mts.map +1 -1
  46. package/dist/components/Box/index.mjs +1 -1
  47. package/dist/components/Box/index.mjs.map +1 -1
  48. package/dist/components/{BoxVertical/BoxVertical.cjs → BoxColumn/BoxColumn.cjs} +6 -6
  49. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -0
  50. package/dist/components/BoxColumn/BoxColumn.d.cts +7 -0
  51. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -0
  52. package/dist/components/BoxColumn/BoxColumn.d.mts +7 -0
  53. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -0
  54. package/dist/components/{BoxVertical/BoxVertical.mjs → BoxColumn/BoxColumn.mjs} +4 -4
  55. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -0
  56. package/dist/components/{BoxVertical/BoxVertical.types.cjs → BoxColumn/BoxColumn.types.cjs} +1 -1
  57. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -0
  58. package/dist/components/BoxColumn/BoxColumn.types.d.cts +13 -0
  59. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -0
  60. package/dist/components/BoxColumn/BoxColumn.types.d.mts +13 -0
  61. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -0
  62. package/dist/components/BoxColumn/BoxColumn.types.mjs +2 -0
  63. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -0
  64. package/dist/components/BoxColumn/index.cjs +6 -0
  65. package/dist/components/BoxColumn/index.cjs.map +1 -0
  66. package/dist/components/BoxColumn/index.d.cts +3 -0
  67. package/dist/components/BoxColumn/index.d.cts.map +1 -0
  68. package/dist/components/BoxColumn/index.d.mts +3 -0
  69. package/dist/components/BoxColumn/index.d.mts.map +1 -0
  70. package/dist/components/BoxColumn/index.mjs +2 -0
  71. package/dist/components/BoxColumn/index.mjs.map +1 -0
  72. package/dist/components/{BoxHorizontal/BoxHorizontal.cjs → BoxRow/BoxRow.cjs} +6 -6
  73. package/dist/components/BoxRow/BoxRow.cjs.map +1 -0
  74. package/dist/components/BoxRow/BoxRow.d.cts +7 -0
  75. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -0
  76. package/dist/components/BoxRow/BoxRow.d.mts +7 -0
  77. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -0
  78. package/dist/components/{BoxHorizontal/BoxHorizontal.mjs → BoxRow/BoxRow.mjs} +4 -4
  79. package/dist/components/BoxRow/BoxRow.mjs.map +1 -0
  80. package/dist/components/{BoxHorizontal/BoxHorizontal.types.cjs → BoxRow/BoxRow.types.cjs} +1 -1
  81. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -0
  82. package/dist/components/BoxRow/BoxRow.types.d.cts +13 -0
  83. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -0
  84. package/dist/components/BoxRow/BoxRow.types.d.mts +13 -0
  85. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -0
  86. package/dist/components/BoxRow/BoxRow.types.mjs +2 -0
  87. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -0
  88. package/dist/components/BoxRow/index.cjs +6 -0
  89. package/dist/components/BoxRow/index.cjs.map +1 -0
  90. package/dist/components/BoxRow/index.d.cts +3 -0
  91. package/dist/components/BoxRow/index.d.cts.map +1 -0
  92. package/dist/components/BoxRow/index.d.mts +3 -0
  93. package/dist/components/BoxRow/index.d.mts.map +1 -0
  94. package/dist/components/BoxRow/index.mjs +2 -0
  95. package/dist/components/BoxRow/index.mjs.map +1 -0
  96. package/dist/components/HeaderRoot/HeaderRoot.cjs +3 -3
  97. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  98. package/dist/components/HeaderRoot/HeaderRoot.mjs +3 -3
  99. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  100. package/dist/components/HeaderSearch/HeaderSearch.cjs +80 -0
  101. package/dist/components/HeaderSearch/HeaderSearch.cjs.map +1 -0
  102. package/dist/components/HeaderSearch/HeaderSearch.d.cts +37 -0
  103. package/dist/components/HeaderSearch/HeaderSearch.d.cts.map +1 -0
  104. package/dist/components/HeaderSearch/HeaderSearch.d.mts +37 -0
  105. package/dist/components/HeaderSearch/HeaderSearch.d.mts.map +1 -0
  106. package/dist/components/HeaderSearch/HeaderSearch.mjs +80 -0
  107. package/dist/components/HeaderSearch/HeaderSearch.mjs.map +1 -0
  108. package/dist/components/HeaderSearch/HeaderSearch.types.cjs +3 -0
  109. package/dist/components/HeaderSearch/HeaderSearch.types.cjs.map +1 -0
  110. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts +33 -0
  111. package/dist/components/HeaderSearch/HeaderSearch.types.d.cts.map +1 -0
  112. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts +33 -0
  113. package/dist/components/HeaderSearch/HeaderSearch.types.d.mts.map +1 -0
  114. package/dist/components/HeaderSearch/HeaderSearch.types.mjs +2 -0
  115. package/dist/components/HeaderSearch/HeaderSearch.types.mjs.map +1 -0
  116. package/dist/components/HeaderSearch/index.cjs +8 -0
  117. package/dist/components/HeaderSearch/index.cjs.map +1 -0
  118. package/dist/components/HeaderSearch/index.d.cts +4 -0
  119. package/dist/components/HeaderSearch/index.d.cts.map +1 -0
  120. package/dist/components/HeaderSearch/index.d.mts +4 -0
  121. package/dist/components/HeaderSearch/index.d.mts.map +1 -0
  122. package/dist/components/HeaderSearch/index.mjs +3 -0
  123. package/dist/components/HeaderSearch/index.mjs.map +1 -0
  124. package/dist/components/HeaderStandard/HeaderStandard.cjs +3 -3
  125. package/dist/components/HeaderStandard/HeaderStandard.cjs.map +1 -1
  126. package/dist/components/HeaderStandard/HeaderStandard.mjs +3 -3
  127. package/dist/components/HeaderStandard/HeaderStandard.mjs.map +1 -1
  128. package/dist/components/Icon/Icon.assets.cjs +285 -281
  129. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  130. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  131. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  132. package/dist/components/Icon/Icon.assets.mjs +6 -2
  133. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  134. package/dist/components/Icon/Icon.cjs +2 -2
  135. package/dist/components/Icon/Icon.cjs.map +1 -1
  136. package/dist/components/Icon/Icon.constants.cjs +6 -6
  137. package/dist/components/Icon/Icon.constants.cjs.map +1 -1
  138. package/dist/components/Icon/Icon.constants.d.cts +1 -1
  139. package/dist/components/Icon/Icon.constants.d.cts.map +1 -1
  140. package/dist/components/Icon/Icon.constants.d.mts +1 -1
  141. package/dist/components/Icon/Icon.constants.d.mts.map +1 -1
  142. package/dist/components/Icon/Icon.constants.mjs +1 -1
  143. package/dist/components/Icon/Icon.constants.mjs.map +1 -1
  144. package/dist/components/Icon/Icon.d.cts.map +1 -1
  145. package/dist/components/Icon/Icon.d.mts.map +1 -1
  146. package/dist/components/Icon/Icon.mjs +1 -1
  147. package/dist/components/Icon/Icon.mjs.map +1 -1
  148. package/dist/components/Icon/Icon.types.cjs.map +1 -1
  149. package/dist/components/Icon/Icon.types.d.cts +2 -2
  150. package/dist/components/Icon/Icon.types.d.cts.map +1 -1
  151. package/dist/components/Icon/Icon.types.d.mts +2 -2
  152. package/dist/components/Icon/Icon.types.d.mts.map +1 -1
  153. package/dist/components/Icon/Icon.types.mjs.map +1 -1
  154. package/dist/components/Icon/assets/after-hours.svg +1 -1
  155. package/dist/components/Icon/assets/pop-up.svg +1 -0
  156. package/dist/components/Icon/assets/side-panel.svg +1 -0
  157. package/dist/components/Icon/index.cjs +4 -4
  158. package/dist/components/Icon/index.cjs.map +1 -1
  159. package/dist/components/Icon/index.d.cts +1 -1
  160. package/dist/components/Icon/index.d.cts.map +1 -1
  161. package/dist/components/Icon/index.d.mts +1 -1
  162. package/dist/components/Icon/index.d.mts.map +1 -1
  163. package/dist/components/Icon/index.mjs +1 -1
  164. package/dist/components/Icon/index.mjs.map +1 -1
  165. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +8 -8
  166. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  167. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +8 -8
  168. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  169. package/dist/components/KeyValueRow/KeyValueRow.cjs +43 -64
  170. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  171. package/dist/components/KeyValueRow/KeyValueRow.d.cts +3 -20
  172. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  173. package/dist/components/KeyValueRow/KeyValueRow.d.mts +3 -20
  174. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  175. package/dist/components/KeyValueRow/KeyValueRow.mjs +42 -63
  176. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  177. package/dist/components/KeyValueRow/KeyValueRow.types.cjs +0 -26
  178. package/dist/components/KeyValueRow/KeyValueRow.types.cjs.map +1 -1
  179. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts +14 -174
  180. package/dist/components/KeyValueRow/KeyValueRow.types.d.cts.map +1 -1
  181. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts +14 -174
  182. package/dist/components/KeyValueRow/KeyValueRow.types.d.mts.map +1 -1
  183. package/dist/components/KeyValueRow/KeyValueRow.types.mjs +1 -25
  184. package/dist/components/KeyValueRow/KeyValueRow.types.mjs.map +1 -1
  185. package/dist/components/KeyValueRow/index.cjs +3 -7
  186. package/dist/components/KeyValueRow/index.cjs.map +1 -1
  187. package/dist/components/KeyValueRow/index.d.cts +3 -2
  188. package/dist/components/KeyValueRow/index.d.cts.map +1 -1
  189. package/dist/components/KeyValueRow/index.d.mts +3 -2
  190. package/dist/components/KeyValueRow/index.d.mts.map +1 -1
  191. package/dist/components/KeyValueRow/index.mjs +2 -2
  192. package/dist/components/KeyValueRow/index.mjs.map +1 -1
  193. package/dist/components/index.cjs +13 -7
  194. package/dist/components/index.cjs.map +1 -1
  195. package/dist/components/index.d.cts +8 -4
  196. package/dist/components/index.d.cts.map +1 -1
  197. package/dist/components/index.d.mts +8 -4
  198. package/dist/components/index.d.mts.map +1 -1
  199. package/dist/components/index.mjs +4 -2
  200. package/dist/components/index.mjs.map +1 -1
  201. package/dist/types/index.cjs +177 -354
  202. package/dist/types/index.cjs.map +1 -1
  203. package/dist/types/index.d.cts +175 -344
  204. package/dist/types/index.d.cts.map +1 -1
  205. package/dist/types/index.d.mts +175 -344
  206. package/dist/types/index.d.mts.map +1 -1
  207. package/dist/types/index.mjs +173 -353
  208. package/dist/types/index.mjs.map +1 -1
  209. package/package.json +5 -6
  210. package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +0 -1
  211. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts +0 -7
  212. package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +0 -1
  213. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts +0 -7
  214. package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +0 -1
  215. package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +0 -1
  216. package/dist/components/BoxHorizontal/BoxHorizontal.types.cjs.map +0 -1
  217. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts +0 -13
  218. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.cts.map +0 -1
  219. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts +0 -13
  220. package/dist/components/BoxHorizontal/BoxHorizontal.types.d.mts.map +0 -1
  221. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs +0 -2
  222. package/dist/components/BoxHorizontal/BoxHorizontal.types.mjs.map +0 -1
  223. package/dist/components/BoxHorizontal/index.cjs +0 -6
  224. package/dist/components/BoxHorizontal/index.cjs.map +0 -1
  225. package/dist/components/BoxHorizontal/index.d.cts +0 -3
  226. package/dist/components/BoxHorizontal/index.d.cts.map +0 -1
  227. package/dist/components/BoxHorizontal/index.d.mts +0 -3
  228. package/dist/components/BoxHorizontal/index.d.mts.map +0 -1
  229. package/dist/components/BoxHorizontal/index.mjs +0 -2
  230. package/dist/components/BoxHorizontal/index.mjs.map +0 -1
  231. package/dist/components/BoxVertical/BoxVertical.cjs.map +0 -1
  232. package/dist/components/BoxVertical/BoxVertical.d.cts +0 -7
  233. package/dist/components/BoxVertical/BoxVertical.d.cts.map +0 -1
  234. package/dist/components/BoxVertical/BoxVertical.d.mts +0 -7
  235. package/dist/components/BoxVertical/BoxVertical.d.mts.map +0 -1
  236. package/dist/components/BoxVertical/BoxVertical.mjs.map +0 -1
  237. package/dist/components/BoxVertical/BoxVertical.types.cjs.map +0 -1
  238. package/dist/components/BoxVertical/BoxVertical.types.d.cts +0 -13
  239. package/dist/components/BoxVertical/BoxVertical.types.d.cts.map +0 -1
  240. package/dist/components/BoxVertical/BoxVertical.types.d.mts +0 -13
  241. package/dist/components/BoxVertical/BoxVertical.types.d.mts.map +0 -1
  242. package/dist/components/BoxVertical/BoxVertical.types.mjs +0 -2
  243. package/dist/components/BoxVertical/BoxVertical.types.mjs.map +0 -1
  244. package/dist/components/BoxVertical/index.cjs +0 -6
  245. package/dist/components/BoxVertical/index.cjs.map +0 -1
  246. package/dist/components/BoxVertical/index.d.cts +0 -3
  247. package/dist/components/BoxVertical/index.d.cts.map +0 -1
  248. package/dist/components/BoxVertical/index.d.mts +0 -3
  249. package/dist/components/BoxVertical/index.d.mts.map +0 -1
  250. package/dist/components/BoxVertical/index.mjs +0 -2
  251. package/dist/components/BoxVertical/index.mjs.map +0 -1
  252. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs +0 -34
  253. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.cjs.map +0 -1
  254. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts +0 -13
  255. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.cts.map +0 -1
  256. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts +0 -13
  257. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.d.mts.map +0 -1
  258. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs +0 -34
  259. package/dist/components/KeyValueRow/KeyValueLabel/KeyValueLabel.mjs.map +0 -1
  260. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs +0 -40
  261. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.cjs.map +0 -1
  262. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts +0 -24
  263. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.cts.map +0 -1
  264. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts +0 -24
  265. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.d.mts.map +0 -1
  266. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs +0 -40
  267. package/dist/components/KeyValueRow/KeyValueRoot/KeyValueRoot.mjs.map +0 -1
  268. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs +0 -6
  269. package/dist/components/KeyValueRow/KeyValueRow.utils.cjs.map +0 -1
  270. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts +0 -3
  271. package/dist/components/KeyValueRow/KeyValueRow.utils.d.cts.map +0 -1
  272. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts +0 -3
  273. package/dist/components/KeyValueRow/KeyValueRow.utils.d.mts.map +0 -1
  274. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs +0 -2
  275. package/dist/components/KeyValueRow/KeyValueRow.utils.mjs.map +0 -1
  276. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs +0 -30
  277. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.cjs.map +0 -1
  278. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts +0 -16
  279. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.cts.map +0 -1
  280. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts +0 -16
  281. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.d.mts.map +0 -1
  282. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs +0 -30
  283. package/dist/components/KeyValueRow/KeyValueSection/KeyValueSection.mjs.map +0 -1
@@ -4,73 +4,52 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { KeyValueRowVariant } from "@metamask-previews/design-system-shared";
7
8
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
9
  import $React from "react";
9
10
  const React = $importDefault($React);
10
- import { View } from "react-native/index.js";
11
- import { Icon } from "../Icon/index.mjs";
12
- import { KeyValueRowLabel } from "./KeyValueLabel/KeyValueLabel.mjs";
13
- import { KeyValueRowRoot } from "./KeyValueRoot/KeyValueRoot.mjs";
14
- import { KeyValueRowFieldIconSides, KeyValueRowSectionAlignments } from "./KeyValueRow.types.mjs";
15
- import { KeyValueSection } from "./KeyValueSection/KeyValueSection.mjs";
16
- const renderIcon = (icon) => {
17
- const { side: _side, ...iconProps } = icon;
18
- return <Icon {...iconProps}/>;
19
- };
20
- /**
21
- * Prebuilt convenience component to format and render a key/value label pair.
22
- * The KeyValueRowLabel component has props to display a tooltip and icon.
23
- *
24
- * @param props - Component props
25
- * @param props.field - Represents the left side of the key value row pair
26
- * @param props.value - Represents the right side of the key value row pair
27
- * @param props.twClassName - Optional Tailwind class names for the root element
28
- * @param props.style - Optional additional styles for the root element
29
- *
30
- * @returns The rendered KeyValueRow component.
31
- */
32
- export const KeyValueRow = ({ field, value, twClassName, style, ...props }) => {
11
+ import { ButtonIconSize, FontWeight, IconColor, TextColor, TextVariant } from "../../types/index.mjs";
12
+ import { Box } from "../Box/index.mjs";
13
+ import { BoxRow } from "../BoxRow/index.mjs";
14
+ import { ButtonIcon } from "../ButtonIcon/index.mjs";
15
+ export const KeyValueRow = ({ keyStartAccessory, keyEndAccessory, keyEndButtonIconProps, keyLabel: keyContent, keyTextProps, valueStartAccessory, valueEndAccessory, valueEndButtonIconProps, value: valueContent, valueTextProps, variant = KeyValueRowVariant.Summary, twClassName, style, ...viewProps }) => {
33
16
  const tw = useTailwind();
34
- const fieldIcon = field?.icon;
35
- const valueIcon = value?.icon;
36
- return (<KeyValueRowRoot twClassName={twClassName} style={style} {...props}>
37
- <KeyValueSection>
38
- <View style={tw.style('flex-row items-center gap-2')}>
39
- {fieldIcon?.name &&
40
- (fieldIcon.side === KeyValueRowFieldIconSides.Left ||
41
- fieldIcon.side === KeyValueRowFieldIconSides.Both ||
42
- !fieldIcon.side) &&
43
- renderIcon(fieldIcon)}
44
- <KeyValueRowLabel label={field.label} tooltip={field.tooltip}/>
45
- {fieldIcon?.name &&
46
- (fieldIcon.side === KeyValueRowFieldIconSides.Right ||
47
- fieldIcon.side === KeyValueRowFieldIconSides.Both) &&
48
- renderIcon(fieldIcon)}
49
- </View>
50
- </KeyValueSection>
51
- <KeyValueSection align={KeyValueRowSectionAlignments.Right}>
52
- <View style={tw.style('flex-row items-center gap-2')}>
53
- {valueIcon?.name &&
54
- (valueIcon.side === KeyValueRowFieldIconSides.Left ||
55
- valueIcon.side === KeyValueRowFieldIconSides.Both ||
56
- !valueIcon.side) &&
57
- renderIcon(valueIcon)}
58
- <KeyValueRowLabel label={value.label} tooltip={value.tooltip}/>
59
- {valueIcon?.name &&
60
- (valueIcon.side === KeyValueRowFieldIconSides.Right ||
61
- valueIcon.side === KeyValueRowFieldIconSides.Both) &&
62
- renderIcon(valueIcon)}
63
- </View>
64
- </KeyValueSection>
65
- </KeyValueRowRoot>);
17
+ const keyEndAccessoryNode = keyEndButtonIconProps?.iconName !== undefined &&
18
+ keyEndButtonIconProps.iconName !== null ? (<ButtonIcon size={ButtonIconSize.Sm} {...keyEndButtonIconProps} iconName={keyEndButtonIconProps.iconName} iconProps={{
19
+ color: IconColor.IconAlternative,
20
+ ...keyEndButtonIconProps.iconProps,
21
+ }}/>) : (keyEndAccessory);
22
+ const valueEndAccessoryNode = valueEndButtonIconProps?.iconName !== undefined &&
23
+ valueEndButtonIconProps.iconName !== null ? (<ButtonIcon size={ButtonIconSize.Sm} {...valueEndButtonIconProps} iconName={valueEndButtonIconProps.iconName} iconProps={{
24
+ color: IconColor.IconDefault,
25
+ ...valueEndButtonIconProps.iconProps,
26
+ }}/>) : (valueEndAccessory);
27
+ const keyBox = (<BoxRow startAccessory={keyStartAccessory} endAccessory={keyEndAccessoryNode} textProps={{
28
+ variant: TextVariant.BodyMd,
29
+ fontWeight: FontWeight.Medium,
30
+ color: TextColor.TextAlternative,
31
+ numberOfLines: 1,
32
+ ellipsizeMode: 'tail',
33
+ ...keyTextProps,
34
+ }}>
35
+ {keyContent}
36
+ </BoxRow>);
37
+ const valueBox = (<BoxRow startAccessory={valueStartAccessory} endAccessory={valueEndAccessoryNode} textProps={{
38
+ variant: TextVariant.BodyMd,
39
+ fontWeight: FontWeight.Medium,
40
+ color: TextColor.TextDefault,
41
+ numberOfLines: 1,
42
+ ellipsizeMode: 'tail',
43
+ ...valueTextProps,
44
+ }} twClassName="flex-1 min-w-0 justify-end">
45
+ {valueContent}
46
+ </BoxRow>);
47
+ return (<BoxRow endAccessory={valueBox} gap={4} style={[
48
+ tw.style(variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10', twClassName),
49
+ style,
50
+ ]} {...viewProps}>
51
+ <Box twClassName="shrink-0">{keyBox}</Box>
52
+ </BoxRow>);
66
53
  };
67
54
  KeyValueRow.displayName = 'KeyValueRow';
68
- /**
69
- * Exported sub-components to provide a base for new KeyValueRow variants.
70
- */
71
- export const KeyValueRowStubs = {
72
- Root: KeyValueRowRoot,
73
- Section: KeyValueSection,
74
- Label: KeyValueRowLabel,
75
- };
76
55
  //# sourceMappingURL=KeyValueRow.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.mjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,8BAAqB;AAEpC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAG/B,OAAO,EAAE,gBAAgB,EAAE,0CAAsC;AACjE,OAAO,EAAE,eAAe,EAAE,wCAAoC;AAE9D,OAAO,EACL,yBAAyB,EACzB,4BAA4B,EAC7B,gCAA4B;AAC7B,OAAO,EAAE,eAAe,EAAE,8CAA0C;AAIpE,MAAM,UAAU,GAAG,CAAC,IAAkB,EAAE,EAAE;IACxC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IAC3C,OAAO,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,EAAG,CAAC;AACjC,CAAC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,WAAW,GAA+B,CAAC,EACtD,KAAK,EACL,KAAK,EACL,WAAW,EACX,KAAK,EACL,GAAG,KAAK,EACT,EAAE,EAAE;IAC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AAyB,CAAC,IAAI;gBACjD,CAAC,SAAS,CAAC,IAAI,CAAC;YAClB,UAAU,CAAC,SAAS,CAAC,CACvB;UAAA,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,EAC7D;UAAA,CAAC,SAAS,EAAE,IAAI;YACd,CAAC,SAAS,CAAC,IAAI,KAAK,yBAAyB,CAAC,KAAK;gBACjD,SAAS,CAAC,IAAI,KAAK,yBAAyB,CAAC,IAAI,CAAC;YACpD,UAAU,CAAC,SAAS,CAAC,CACzB;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,eAAe,CACnB;IAAA,EAAE,eAAe,CAAC,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,eAAe;IACxB,KAAK,EAAE,gBAAgB;CACxB,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { Icon } from '../Icon';\nimport type { IconProps } from '../Icon';\n\nimport { KeyValueRowLabel } from './KeyValueLabel/KeyValueLabel';\nimport { KeyValueRowRoot } from './KeyValueRoot/KeyValueRoot';\nimport type { KeyValueRowProps } from './KeyValueRow.types';\nimport {\n KeyValueRowFieldIconSides,\n KeyValueRowSectionAlignments,\n} from './KeyValueRow.types';\nimport { KeyValueSection } from './KeyValueSection/KeyValueSection';\n\ntype IconWithSide = IconProps & { side?: KeyValueRowFieldIconSides };\n\nconst renderIcon = (icon: IconWithSide) => {\n const { side: _side, ...iconProps } = icon;\n return <Icon {...iconProps} />;\n};\n\n/**\n * Prebuilt convenience component to format and render a key/value label pair.\n * The KeyValueRowLabel component has props to display a tooltip and icon.\n *\n * @param props - Component props\n * @param props.field - Represents the left side of the key value row pair\n * @param props.value - Represents the right side of the key value row pair\n * @param props.twClassName - Optional Tailwind class names for the root element\n * @param props.style - Optional additional styles for the root element\n *\n * @returns The rendered KeyValueRow component.\n */\nexport const KeyValueRow: React.FC<KeyValueRowProps> = ({\n field,\n value,\n twClassName,\n style,\n ...props\n}) => {\n const tw = useTailwind();\n\n const fieldIcon = field?.icon;\n const valueIcon = value?.icon;\n\n return (\n <KeyValueRowRoot twClassName={twClassName} style={style} {...props}>\n <KeyValueSection>\n <View style={tw.style('flex-row items-center gap-2')}>\n {fieldIcon?.name &&\n (fieldIcon.side === KeyValueRowFieldIconSides.Left ||\n fieldIcon.side === KeyValueRowFieldIconSides.Both ||\n !fieldIcon.side) &&\n renderIcon(fieldIcon)}\n <KeyValueRowLabel label={field.label} tooltip={field.tooltip} />\n {fieldIcon?.name &&\n (fieldIcon.side === KeyValueRowFieldIconSides.Right ||\n fieldIcon.side === KeyValueRowFieldIconSides.Both) &&\n renderIcon(fieldIcon)}\n </View>\n </KeyValueSection>\n <KeyValueSection align={KeyValueRowSectionAlignments.Right}>\n <View style={tw.style('flex-row items-center gap-2')}>\n {valueIcon?.name &&\n (valueIcon.side === KeyValueRowFieldIconSides.Left ||\n valueIcon.side === KeyValueRowFieldIconSides.Both ||\n !valueIcon.side) &&\n renderIcon(valueIcon)}\n <KeyValueRowLabel label={value.label} tooltip={value.tooltip} />\n {valueIcon?.name &&\n (valueIcon.side === KeyValueRowFieldIconSides.Right ||\n valueIcon.side === KeyValueRowFieldIconSides.Both) &&\n renderIcon(valueIcon)}\n </View>\n </KeyValueSection>\n </KeyValueRowRoot>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n\n/**\n * Exported sub-components to provide a base for new KeyValueRow variants.\n */\nexport const KeyValueRowStubs = {\n Root: KeyValueRowRoot,\n Section: KeyValueSection,\n Label: KeyValueRowLabel,\n};\n"]}
1
+ {"version":3,"file":"KeyValueRow.mjs","sourceRoot":"","sources":["../../../src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C,CAAC;YACL,EAAE,CAAC,KAAK,CACN,OAAO,KAAK,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EACtD,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,SAAS,CAAC,CAEd;MAAA,CAAC,GAAG,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,CAC3C;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import { KeyValueRowVariant } from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\n\nimport {\n ButtonIconSize,\n FontWeight,\n IconColor,\n TextColor,\n TextVariant,\n} from '../../types';\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { ButtonIcon } from '../ButtonIcon';\n\nimport type { KeyValueRowProps } from './KeyValueRow.types';\n\nexport const KeyValueRow = ({\n keyStartAccessory,\n keyEndAccessory,\n keyEndButtonIconProps,\n keyLabel: keyContent,\n keyTextProps,\n valueStartAccessory,\n valueEndAccessory,\n valueEndButtonIconProps,\n value: valueContent,\n valueTextProps,\n variant = KeyValueRowVariant.Summary,\n twClassName,\n style,\n ...viewProps\n}: KeyValueRowProps) => {\n const tw = useTailwind();\n\n const keyEndAccessoryNode =\n keyEndButtonIconProps?.iconName !== undefined &&\n keyEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...keyEndButtonIconProps}\n iconName={keyEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconAlternative,\n ...keyEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n keyEndAccessory\n );\n\n const valueEndAccessoryNode =\n valueEndButtonIconProps?.iconName !== undefined &&\n valueEndButtonIconProps.iconName !== null ? (\n <ButtonIcon\n size={ButtonIconSize.Sm}\n {...valueEndButtonIconProps}\n iconName={valueEndButtonIconProps.iconName}\n iconProps={{\n color: IconColor.IconDefault,\n ...valueEndButtonIconProps.iconProps,\n }}\n />\n ) : (\n valueEndAccessory\n );\n\n const keyBox = (\n <BoxRow\n startAccessory={keyStartAccessory}\n endAccessory={keyEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...keyTextProps,\n }}\n >\n {keyContent}\n </BoxRow>\n );\n\n const valueBox = (\n <BoxRow\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessoryNode}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'tail',\n ...valueTextProps,\n }}\n twClassName=\"flex-1 min-w-0 justify-end\"\n >\n {valueContent}\n </BoxRow>\n );\n\n return (\n <BoxRow\n endAccessory={valueBox}\n gap={4}\n style={[\n tw.style(\n variant === KeyValueRowVariant.Input ? 'h-12' : 'h-10',\n twClassName,\n ),\n style,\n ]}\n {...viewProps}\n >\n <Box twClassName=\"shrink-0\">{keyBox}</Box>\n </BoxRow>\n );\n};\n\nKeyValueRow.displayName = 'KeyValueRow';\n"]}
@@ -1,29 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KeyValueRowSectionAlignments = exports.TooltipSizes = exports.IconSizes = exports.KeyValueRowFieldIconSides = void 0;
4
- const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
5
- const Icon_1 = require("../Icon/index.cjs");
6
- /**
7
- * Used to position an icon in a KeyValueRowField.
8
- */
9
- exports.KeyValueRowFieldIconSides = {
10
- Left: 'left',
11
- Right: 'right',
12
- Both: 'both',
13
- };
14
- /**
15
- * Re-exported for backwards compatibility.
16
- */
17
- exports.IconSizes = Icon_1.IconSize;
18
- /**
19
- * Re-exported for backwards compatibility.
20
- */
21
- exports.TooltipSizes = ButtonIcon_1.ButtonIconSize;
22
- /**
23
- * Represents the valid KeyValueSection alignments.
24
- */
25
- exports.KeyValueRowSectionAlignments = {
26
- Left: 'items-start',
27
- Right: 'items-end',
28
- };
29
3
  //# sourceMappingURL=KeyValueRow.types.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.types.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.types.ts"],"names":[],"mappings":";;;AAGA,wDAA+C;AAC/C,4CAA6C;AAsC7C;;GAEG;AACU,QAAA,yBAAyB,GAAG;IACvC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;CACJ,CAAC;AAuBX;;GAEG;AACU,QAAA,SAAS,GAAG,eAAQ,CAAC;AAElC;;GAEG;AACU,QAAA,YAAY,GAAG,2BAAc,CAAC;AAsC3C;;GAEG;AACU,QAAA,4BAA4B,GAAG;IAC1C,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,WAAW;CACV,CAAC","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\nimport { ButtonIconSize } from '../ButtonIcon';\nimport { IconName, IconSize } from '../Icon';\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text';\n\n/**\n * The optional tooltip that can be displayed within a KeyValueRowField.\n */\nexport type KeyValueRowTooltip = {\n /**\n * The title displayed at the top of the tooltip.\n */\n title: string;\n /**\n * The content displayed within the tooltip body.\n */\n content: string | ReactNode;\n /**\n * Optional size of the tooltip icon button.\n *\n * @default ButtonIconSize.Md\n */\n size?: ButtonIconSize;\n /**\n * Optional icon name for the tooltip icon.\n *\n * @default IconName.Question\n */\n iconName?: IconName;\n /**\n * Optional onPress handler called when the tooltip icon is pressed.\n */\n onPress?: (...args: unknown[]) => unknown;\n /**\n * Optional bottom padding for the tooltip modal.\n */\n bottomPadding?: number;\n};\n\n/**\n * Used to position an icon in a KeyValueRowField.\n */\nexport const KeyValueRowFieldIconSides = {\n Left: 'left',\n Right: 'right',\n Both: 'both',\n} as const;\n\nexport type KeyValueRowFieldIconSides =\n (typeof KeyValueRowFieldIconSides)[keyof typeof KeyValueRowFieldIconSides];\n\n/**\n * Represents a field displayed within KeyValueRowProps.\n */\nexport type KeyValueRowField = {\n /**\n * The label content displayed.\n */\n label: PreDefinedKeyValueRowLabel | ReactNode;\n /**\n * Optional icon to display. If undefined, no icon is displayed.\n */\n icon?: IconProps & { side?: KeyValueRowFieldIconSides };\n /**\n * Optional tooltip to display. If undefined, no tooltip is displayed.\n */\n tooltip?: KeyValueRowTooltip;\n};\n\n/**\n * Re-exported for backwards compatibility.\n */\nexport const IconSizes = IconSize;\n\n/**\n * Re-exported for backwards compatibility.\n */\nexport const TooltipSizes = ButtonIconSize;\n\n/**\n * A predefined label object with text, variant, and color.\n */\nexport type PreDefinedKeyValueRowLabel = {\n /**\n * Text to display.\n */\n text: string;\n /**\n * Optional text variant.\n *\n * @default TextVariant.BodyMd\n */\n variant?: TextProps['variant'];\n /**\n * Optional text color.\n *\n * @default TextColor.TextDefault\n */\n color?: TextProps['color'];\n};\n\n/**\n * The KeyValueRowLabel component props.\n */\nexport type KeyValueRowLabelProps = {\n /**\n * The label content displayed.\n */\n label: PreDefinedKeyValueRowLabel | ReactNode;\n /**\n * Optional tooltip. If undefined, the tooltip won't be displayed.\n */\n tooltip?: KeyValueRowTooltip;\n};\n\n/**\n * Represents the valid KeyValueSection alignments.\n */\nexport const KeyValueRowSectionAlignments = {\n Left: 'items-start',\n Right: 'items-end',\n} as const;\n\nexport type KeyValueRowSectionAlignments =\n (typeof KeyValueRowSectionAlignments)[keyof typeof KeyValueRowSectionAlignments];\n\n/**\n * Represents the main container for the KeyValueRow component.\n *\n * Extends `ViewProps` so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type KeyValueRowRootProps = {\n /**\n * Must have exactly two children. Adding more will lead to an undesired outcome.\n */\n children: [ReactNode, ReactNode];\n /**\n * Optional Tailwind class names to override default styles on the root element.\n */\n twClassName?: string;\n} & ViewProps;\n\n/**\n * The KeyValueSection component props.\n *\n * Extends `ViewProps` so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type KeyValueSectionProps = {\n /**\n * Child components.\n */\n children: ReactNode;\n /**\n * Optional content alignment.\n *\n * @default KeyValueRowSectionAlignments.Left\n */\n align?: KeyValueRowSectionAlignments;\n /**\n * Optional Tailwind class names to override default styles on the root element.\n */\n twClassName?: string;\n} & ViewProps;\n\n/**\n * The KeyValueRow component props.\n *\n * Extends `ViewProps` so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type KeyValueRowProps = {\n /**\n * The \"key\" portion of the KeyValueRow (left side).\n * Using the variable name field because key is reserved.\n */\n field: KeyValueRowField;\n /**\n * The \"value\" portion of the KeyValueRow (right side).\n */\n value: KeyValueRowField;\n /**\n * Optional Tailwind class names to override default styles on the root element.\n */\n twClassName?: string;\n} & ViewProps;\n"]}
1
+ {"version":3,"file":"KeyValueRow.types.cjs","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { KeyValueRowPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nimport type { ButtonIconProps } from '../ButtonIcon/ButtonIcon.types';\nimport type { TextProps } from '../Text/Text.types';\n\nexport type KeyValueRowProps = KeyValueRowPropsShared &\n Omit<ViewProps, 'children'> & {\n /** Optional props for the key Text when key is a string. */\n keyTextProps?: Partial<Omit<TextProps, 'children'>>;\n /** Optional props for the value Text when value is a string. */\n valueTextProps?: Partial<Omit<TextProps, 'children'>>;\n /** Optional Tailwind class names applied to the outer BoxHorizontal. Merged with base styles. */\n twClassName?: string;\n /** When set, renders a ButtonIcon as the key endAccessory (takes precedence over keyEndAccessory). */\n keyEndButtonIconProps?: Partial<ButtonIconProps>;\n /** When set, renders a ButtonIcon as the value endAccessory (takes precedence over valueEndAccessory). */\n valueEndButtonIconProps?: Partial<ButtonIconProps>;\n };\n"]}
@@ -1,177 +1,17 @@
1
- import type { ReactNode } from "react";
1
+ import type { KeyValueRowPropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { ViewProps } from "react-native/index.js";
3
- import { ButtonIconSize } from "../ButtonIcon/index.cjs";
4
- import { IconName, IconSize } from "../Icon/index.cjs";
5
- import type { IconProps } from "../Icon/index.cjs";
6
- import type { TextProps } from "../Text/index.cjs";
7
- /**
8
- * The optional tooltip that can be displayed within a KeyValueRowField.
9
- */
10
- export type KeyValueRowTooltip = {
11
- /**
12
- * The title displayed at the top of the tooltip.
13
- */
14
- title: string;
15
- /**
16
- * The content displayed within the tooltip body.
17
- */
18
- content: string | ReactNode;
19
- /**
20
- * Optional size of the tooltip icon button.
21
- *
22
- * @default ButtonIconSize.Md
23
- */
24
- size?: ButtonIconSize;
25
- /**
26
- * Optional icon name for the tooltip icon.
27
- *
28
- * @default IconName.Question
29
- */
30
- iconName?: IconName;
31
- /**
32
- * Optional onPress handler called when the tooltip icon is pressed.
33
- */
34
- onPress?: (...args: unknown[]) => unknown;
35
- /**
36
- * Optional bottom padding for the tooltip modal.
37
- */
38
- bottomPadding?: number;
39
- };
40
- /**
41
- * Used to position an icon in a KeyValueRowField.
42
- */
43
- export declare const KeyValueRowFieldIconSides: {
44
- readonly Left: "left";
45
- readonly Right: "right";
46
- readonly Both: "both";
47
- };
48
- export type KeyValueRowFieldIconSides = (typeof KeyValueRowFieldIconSides)[keyof typeof KeyValueRowFieldIconSides];
49
- /**
50
- * Represents a field displayed within KeyValueRowProps.
51
- */
52
- export type KeyValueRowField = {
53
- /**
54
- * The label content displayed.
55
- */
56
- label: PreDefinedKeyValueRowLabel | ReactNode;
57
- /**
58
- * Optional icon to display. If undefined, no icon is displayed.
59
- */
60
- icon?: IconProps & {
61
- side?: KeyValueRowFieldIconSides;
62
- };
63
- /**
64
- * Optional tooltip to display. If undefined, no tooltip is displayed.
65
- */
66
- tooltip?: KeyValueRowTooltip;
67
- };
68
- /**
69
- * Re-exported for backwards compatibility.
70
- */
71
- export declare const IconSizes: typeof IconSize;
72
- /**
73
- * Re-exported for backwards compatibility.
74
- */
75
- export declare const TooltipSizes: typeof ButtonIconSize;
76
- /**
77
- * A predefined label object with text, variant, and color.
78
- */
79
- export type PreDefinedKeyValueRowLabel = {
80
- /**
81
- * Text to display.
82
- */
83
- text: string;
84
- /**
85
- * Optional text variant.
86
- *
87
- * @default TextVariant.BodyMd
88
- */
89
- variant?: TextProps['variant'];
90
- /**
91
- * Optional text color.
92
- *
93
- * @default TextColor.TextDefault
94
- */
95
- color?: TextProps['color'];
96
- };
97
- /**
98
- * The KeyValueRowLabel component props.
99
- */
100
- export type KeyValueRowLabelProps = {
101
- /**
102
- * The label content displayed.
103
- */
104
- label: PreDefinedKeyValueRowLabel | ReactNode;
105
- /**
106
- * Optional tooltip. If undefined, the tooltip won't be displayed.
107
- */
108
- tooltip?: KeyValueRowTooltip;
109
- };
110
- /**
111
- * Represents the valid KeyValueSection alignments.
112
- */
113
- export declare const KeyValueRowSectionAlignments: {
114
- readonly Left: "items-start";
115
- readonly Right: "items-end";
116
- };
117
- export type KeyValueRowSectionAlignments = (typeof KeyValueRowSectionAlignments)[keyof typeof KeyValueRowSectionAlignments];
118
- /**
119
- * Represents the main container for the KeyValueRow component.
120
- *
121
- * Extends `ViewProps` so the root View inherits standard React Native
122
- * props such as `testID` and `accessibilityLabel`.
123
- */
124
- export type KeyValueRowRootProps = {
125
- /**
126
- * Must have exactly two children. Adding more will lead to an undesired outcome.
127
- */
128
- children: [ReactNode, ReactNode];
129
- /**
130
- * Optional Tailwind class names to override default styles on the root element.
131
- */
132
- twClassName?: string;
133
- } & ViewProps;
134
- /**
135
- * The KeyValueSection component props.
136
- *
137
- * Extends `ViewProps` so the root View inherits standard React Native
138
- * props such as `testID` and `accessibilityLabel`.
139
- */
140
- export type KeyValueSectionProps = {
141
- /**
142
- * Child components.
143
- */
144
- children: ReactNode;
145
- /**
146
- * Optional content alignment.
147
- *
148
- * @default KeyValueRowSectionAlignments.Left
149
- */
150
- align?: KeyValueRowSectionAlignments;
151
- /**
152
- * Optional Tailwind class names to override default styles on the root element.
153
- */
3
+ import type { ButtonIconProps } from "../ButtonIcon/ButtonIcon.types.cjs";
4
+ import type { TextProps } from "../Text/Text.types.cjs";
5
+ export type KeyValueRowProps = KeyValueRowPropsShared & Omit<ViewProps, 'children'> & {
6
+ /** Optional props for the key Text when key is a string. */
7
+ keyTextProps?: Partial<Omit<TextProps, 'children'>>;
8
+ /** Optional props for the value Text when value is a string. */
9
+ valueTextProps?: Partial<Omit<TextProps, 'children'>>;
10
+ /** Optional Tailwind class names applied to the outer BoxHorizontal. Merged with base styles. */
154
11
  twClassName?: string;
155
- } & ViewProps;
156
- /**
157
- * The KeyValueRow component props.
158
- *
159
- * Extends `ViewProps` so the root View inherits standard React Native
160
- * props such as `testID` and `accessibilityLabel`.
161
- */
162
- export type KeyValueRowProps = {
163
- /**
164
- * The "key" portion of the KeyValueRow (left side).
165
- * Using the variable name field because key is reserved.
166
- */
167
- field: KeyValueRowField;
168
- /**
169
- * The "value" portion of the KeyValueRow (right side).
170
- */
171
- value: KeyValueRowField;
172
- /**
173
- * Optional Tailwind class names to override default styles on the root element.
174
- */
175
- twClassName?: string;
176
- } & ViewProps;
12
+ /** When set, renders a ButtonIcon as the key endAccessory (takes precedence over keyEndAccessory). */
13
+ keyEndButtonIconProps?: Partial<ButtonIconProps>;
14
+ /** When set, renders a ButtonIcon as the value endAccessory (takes precedence over valueEndAccessory). */
15
+ valueEndButtonIconProps?: Partial<ButtonIconProps>;
16
+ };
177
17
  //# sourceMappingURL=KeyValueRow.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.types.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE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AM,CAAC;IACb;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,KAAK,EAAE,0BAA0B,GAAG,SAAS,CAAC;IAC9C;;OAEG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;CAG/B,CAAC;AAEX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC;AAEd;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,4BAA4B,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC;AAEd;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"KeyValueRow.types.d.cts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,2CAAuC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAC5B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACpD,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACtD,iGAAiG;IACjG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,qBAAqB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACjD,0GAA0G;IAC1G,uBAAuB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC"}
@@ -1,177 +1,17 @@
1
- import type { ReactNode } from "react";
1
+ import type { KeyValueRowPropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { ViewProps } from "react-native/index.js";
3
- import { ButtonIconSize } from "../ButtonIcon/index.mjs";
4
- import { IconName, IconSize } from "../Icon/index.mjs";
5
- import type { IconProps } from "../Icon/index.mjs";
6
- import type { TextProps } from "../Text/index.mjs";
7
- /**
8
- * The optional tooltip that can be displayed within a KeyValueRowField.
9
- */
10
- export type KeyValueRowTooltip = {
11
- /**
12
- * The title displayed at the top of the tooltip.
13
- */
14
- title: string;
15
- /**
16
- * The content displayed within the tooltip body.
17
- */
18
- content: string | ReactNode;
19
- /**
20
- * Optional size of the tooltip icon button.
21
- *
22
- * @default ButtonIconSize.Md
23
- */
24
- size?: ButtonIconSize;
25
- /**
26
- * Optional icon name for the tooltip icon.
27
- *
28
- * @default IconName.Question
29
- */
30
- iconName?: IconName;
31
- /**
32
- * Optional onPress handler called when the tooltip icon is pressed.
33
- */
34
- onPress?: (...args: unknown[]) => unknown;
35
- /**
36
- * Optional bottom padding for the tooltip modal.
37
- */
38
- bottomPadding?: number;
39
- };
40
- /**
41
- * Used to position an icon in a KeyValueRowField.
42
- */
43
- export declare const KeyValueRowFieldIconSides: {
44
- readonly Left: "left";
45
- readonly Right: "right";
46
- readonly Both: "both";
47
- };
48
- export type KeyValueRowFieldIconSides = (typeof KeyValueRowFieldIconSides)[keyof typeof KeyValueRowFieldIconSides];
49
- /**
50
- * Represents a field displayed within KeyValueRowProps.
51
- */
52
- export type KeyValueRowField = {
53
- /**
54
- * The label content displayed.
55
- */
56
- label: PreDefinedKeyValueRowLabel | ReactNode;
57
- /**
58
- * Optional icon to display. If undefined, no icon is displayed.
59
- */
60
- icon?: IconProps & {
61
- side?: KeyValueRowFieldIconSides;
62
- };
63
- /**
64
- * Optional tooltip to display. If undefined, no tooltip is displayed.
65
- */
66
- tooltip?: KeyValueRowTooltip;
67
- };
68
- /**
69
- * Re-exported for backwards compatibility.
70
- */
71
- export declare const IconSizes: typeof IconSize;
72
- /**
73
- * Re-exported for backwards compatibility.
74
- */
75
- export declare const TooltipSizes: typeof ButtonIconSize;
76
- /**
77
- * A predefined label object with text, variant, and color.
78
- */
79
- export type PreDefinedKeyValueRowLabel = {
80
- /**
81
- * Text to display.
82
- */
83
- text: string;
84
- /**
85
- * Optional text variant.
86
- *
87
- * @default TextVariant.BodyMd
88
- */
89
- variant?: TextProps['variant'];
90
- /**
91
- * Optional text color.
92
- *
93
- * @default TextColor.TextDefault
94
- */
95
- color?: TextProps['color'];
96
- };
97
- /**
98
- * The KeyValueRowLabel component props.
99
- */
100
- export type KeyValueRowLabelProps = {
101
- /**
102
- * The label content displayed.
103
- */
104
- label: PreDefinedKeyValueRowLabel | ReactNode;
105
- /**
106
- * Optional tooltip. If undefined, the tooltip won't be displayed.
107
- */
108
- tooltip?: KeyValueRowTooltip;
109
- };
110
- /**
111
- * Represents the valid KeyValueSection alignments.
112
- */
113
- export declare const KeyValueRowSectionAlignments: {
114
- readonly Left: "items-start";
115
- readonly Right: "items-end";
116
- };
117
- export type KeyValueRowSectionAlignments = (typeof KeyValueRowSectionAlignments)[keyof typeof KeyValueRowSectionAlignments];
118
- /**
119
- * Represents the main container for the KeyValueRow component.
120
- *
121
- * Extends `ViewProps` so the root View inherits standard React Native
122
- * props such as `testID` and `accessibilityLabel`.
123
- */
124
- export type KeyValueRowRootProps = {
125
- /**
126
- * Must have exactly two children. Adding more will lead to an undesired outcome.
127
- */
128
- children: [ReactNode, ReactNode];
129
- /**
130
- * Optional Tailwind class names to override default styles on the root element.
131
- */
132
- twClassName?: string;
133
- } & ViewProps;
134
- /**
135
- * The KeyValueSection component props.
136
- *
137
- * Extends `ViewProps` so the root View inherits standard React Native
138
- * props such as `testID` and `accessibilityLabel`.
139
- */
140
- export type KeyValueSectionProps = {
141
- /**
142
- * Child components.
143
- */
144
- children: ReactNode;
145
- /**
146
- * Optional content alignment.
147
- *
148
- * @default KeyValueRowSectionAlignments.Left
149
- */
150
- align?: KeyValueRowSectionAlignments;
151
- /**
152
- * Optional Tailwind class names to override default styles on the root element.
153
- */
3
+ import type { ButtonIconProps } from "../ButtonIcon/ButtonIcon.types.mjs";
4
+ import type { TextProps } from "../Text/Text.types.mjs";
5
+ export type KeyValueRowProps = KeyValueRowPropsShared & Omit<ViewProps, 'children'> & {
6
+ /** Optional props for the key Text when key is a string. */
7
+ keyTextProps?: Partial<Omit<TextProps, 'children'>>;
8
+ /** Optional props for the value Text when value is a string. */
9
+ valueTextProps?: Partial<Omit<TextProps, 'children'>>;
10
+ /** Optional Tailwind class names applied to the outer BoxHorizontal. Merged with base styles. */
154
11
  twClassName?: string;
155
- } & ViewProps;
156
- /**
157
- * The KeyValueRow component props.
158
- *
159
- * Extends `ViewProps` so the root View inherits standard React Native
160
- * props such as `testID` and `accessibilityLabel`.
161
- */
162
- export type KeyValueRowProps = {
163
- /**
164
- * The "key" portion of the KeyValueRow (left side).
165
- * Using the variable name field because key is reserved.
166
- */
167
- field: KeyValueRowField;
168
- /**
169
- * The "value" portion of the KeyValueRow (right side).
170
- */
171
- value: KeyValueRowField;
172
- /**
173
- * Optional Tailwind class names to override default styles on the root element.
174
- */
175
- twClassName?: string;
176
- } & ViewProps;
12
+ /** When set, renders a ButtonIcon as the key endAccessory (takes precedence over keyEndAccessory). */
13
+ keyEndButtonIconProps?: Partial<ButtonIconProps>;
14
+ /** When set, renders a ButtonIcon as the value endAccessory (takes precedence over valueEndAccessory). */
15
+ valueEndButtonIconProps?: Partial<ButtonIconProps>;
16
+ };
177
17
  //# sourceMappingURL=KeyValueRow.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"KeyValueRow.types.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C,OAAO,EAAE,cAAc,EAAE,gCAAsB;AAC/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,0BAAgB;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC1C;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAA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AAC;AAEd;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,KAAK,CAAC,EAAE,4BAA4B,CAAC;IACrC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC;AAEd;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,KAAK,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;IACxB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"KeyValueRow.types.d.mts","sourceRoot":"","sources":["../../../src/components/KeyValueRow/KeyValueRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AACtF,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C,OAAO,KAAK,EAAE,eAAe,EAAE,2CAAuC;AACtE,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,GACnD,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG;IAC5B,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACpD,gEAAgE;IAChE,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACtD,iGAAiG;IACjG,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sGAAsG;IACtG,qBAAqB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACjD,0GAA0G;IAC1G,uBAAuB,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CACpD,CAAC"}
@@ -1,26 +1,2 @@
1
- import { ButtonIconSize } from "../ButtonIcon/index.mjs";
2
- import { IconName, IconSize } from "../Icon/index.mjs";
3
- /**
4
- * Used to position an icon in a KeyValueRowField.
5
- */
6
- export const KeyValueRowFieldIconSides = {
7
- Left: 'left',
8
- Right: 'right',
9
- Both: 'both',
10
- };
11
- /**
12
- * Re-exported for backwards compatibility.
13
- */
14
- export const IconSizes = IconSize;
15
- /**
16
- * Re-exported for backwards compatibility.
17
- */
18
- export const TooltipSizes = ButtonIconSize;
19
- /**
20
- * Represents the valid KeyValueSection alignments.
21
- */
22
- export const KeyValueRowSectionAlignments = {
23
- Left: 'items-start',
24
- Right: 'items-end',
25
- };
1
+ export {};
26
2
  //# sourceMappingURL=KeyValueRow.types.mjs.map