@metamask-previews/design-system-react-native 0.56.1-preview-00dfeb8 → 0.56.1-preview-7d5964a

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 (161) hide show
  1. package/dist/components/BoxColumn/BoxColumn.cjs +0 -13
  2. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
  3. package/dist/components/BoxColumn/BoxColumn.d.cts +0 -13
  4. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
  5. package/dist/components/BoxColumn/BoxColumn.d.mts +0 -13
  6. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
  7. package/dist/components/BoxColumn/BoxColumn.mjs +0 -13
  8. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
  9. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -1
  10. package/dist/components/BoxColumn/BoxColumn.types.d.cts +0 -2
  11. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -1
  12. package/dist/components/BoxColumn/BoxColumn.types.d.mts +0 -2
  13. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -1
  14. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -1
  15. package/dist/components/BoxRow/BoxRow.cjs +0 -13
  16. package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
  17. package/dist/components/BoxRow/BoxRow.d.cts +0 -13
  18. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
  19. package/dist/components/BoxRow/BoxRow.d.mts +0 -13
  20. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
  21. package/dist/components/BoxRow/BoxRow.mjs +0 -13
  22. package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
  23. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -1
  24. package/dist/components/BoxRow/BoxRow.types.d.cts +0 -2
  25. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -1
  26. package/dist/components/BoxRow/BoxRow.types.d.mts +0 -2
  27. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -1
  28. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -1
  29. package/dist/components/ButtonBase/ButtonBase.cjs +5 -9
  30. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  31. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  32. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  33. package/dist/components/ButtonBase/ButtonBase.mjs +6 -10
  34. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  35. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  36. package/dist/components/ButtonBase/ButtonBase.types.d.cts +3 -2
  37. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  38. package/dist/components/ButtonBase/ButtonBase.types.d.mts +3 -2
  39. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  40. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  41. package/dist/components/Content/Content.cjs +32 -40
  42. package/dist/components/Content/Content.cjs.map +1 -1
  43. package/dist/components/Content/Content.d.cts.map +1 -1
  44. package/dist/components/Content/Content.d.mts.map +1 -1
  45. package/dist/components/Content/Content.mjs +32 -40
  46. package/dist/components/Content/Content.mjs.map +1 -1
  47. package/dist/components/HeaderRoot/HeaderRoot.cjs +5 -8
  48. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  49. package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -1
  50. package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -1
  51. package/dist/components/HeaderRoot/HeaderRoot.mjs +5 -8
  52. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  53. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +12 -21
  54. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  55. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  56. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  57. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +13 -22
  58. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  59. package/dist/components/KeyValueRow/KeyValueRow.cjs +10 -19
  60. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  61. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  62. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  63. package/dist/components/KeyValueRow/KeyValueRow.mjs +11 -20
  64. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  65. package/dist/components/ListItem/ListItem.cjs +3 -4
  66. package/dist/components/ListItem/ListItem.cjs.map +1 -1
  67. package/dist/components/ListItem/ListItem.d.cts.map +1 -1
  68. package/dist/components/ListItem/ListItem.d.mts.map +1 -1
  69. package/dist/components/ListItem/ListItem.mjs +4 -5
  70. package/dist/components/ListItem/ListItem.mjs.map +1 -1
  71. package/dist/components/SectionHeader/SectionHeader.cjs +10 -17
  72. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  73. package/dist/components/SectionHeader/SectionHeader.d.cts +2 -2
  74. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
  75. package/dist/components/SectionHeader/SectionHeader.d.mts +2 -2
  76. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
  77. package/dist/components/SectionHeader/SectionHeader.mjs +11 -18
  78. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
  79. package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
  80. package/dist/components/SectionHeader/SectionHeader.types.d.cts +5 -5
  81. package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
  82. package/dist/components/SectionHeader/SectionHeader.types.d.mts +5 -5
  83. package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
  84. package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
  85. package/dist/components/Tag/Tag.cjs +18 -12
  86. package/dist/components/Tag/Tag.cjs.map +1 -1
  87. package/dist/components/Tag/Tag.d.cts.map +1 -1
  88. package/dist/components/Tag/Tag.d.mts.map +1 -1
  89. package/dist/components/Tag/Tag.mjs +19 -13
  90. package/dist/components/Tag/Tag.mjs.map +1 -1
  91. package/dist/components/TitleAlert/TitleAlert.cjs +18 -20
  92. package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
  93. package/dist/components/TitleAlert/TitleAlert.d.cts +3 -3
  94. package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -1
  95. package/dist/components/TitleAlert/TitleAlert.d.mts +3 -3
  96. package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -1
  97. package/dist/components/TitleAlert/TitleAlert.mjs +19 -21
  98. package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
  99. package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -1
  100. package/dist/components/TitleAlert/TitleAlert.types.d.cts +7 -6
  101. package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -1
  102. package/dist/components/TitleAlert/TitleAlert.types.d.mts +7 -6
  103. package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -1
  104. package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -1
  105. package/dist/components/TitleHub/TitleHub.cjs +13 -22
  106. package/dist/components/TitleHub/TitleHub.cjs.map +1 -1
  107. package/dist/components/TitleHub/TitleHub.d.cts +3 -3
  108. package/dist/components/TitleHub/TitleHub.d.cts.map +1 -1
  109. package/dist/components/TitleHub/TitleHub.d.mts +3 -3
  110. package/dist/components/TitleHub/TitleHub.d.mts.map +1 -1
  111. package/dist/components/TitleHub/TitleHub.mjs +14 -23
  112. package/dist/components/TitleHub/TitleHub.mjs.map +1 -1
  113. package/dist/components/TitleHub/TitleHub.types.cjs.map +1 -1
  114. package/dist/components/TitleHub/TitleHub.types.d.cts +10 -10
  115. package/dist/components/TitleHub/TitleHub.types.d.cts.map +1 -1
  116. package/dist/components/TitleHub/TitleHub.types.d.mts +10 -10
  117. package/dist/components/TitleHub/TitleHub.types.d.mts.map +1 -1
  118. package/dist/components/TitleHub/TitleHub.types.mjs.map +1 -1
  119. package/dist/components/TitleStandard/TitleStandard.cjs +9 -15
  120. package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -1
  121. package/dist/components/TitleStandard/TitleStandard.d.cts +2 -2
  122. package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -1
  123. package/dist/components/TitleStandard/TitleStandard.d.mts +2 -2
  124. package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -1
  125. package/dist/components/TitleStandard/TitleStandard.mjs +10 -16
  126. package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -1
  127. package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -1
  128. package/dist/components/TitleStandard/TitleStandard.types.d.cts +7 -7
  129. package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -1
  130. package/dist/components/TitleStandard/TitleStandard.types.d.mts +7 -7
  131. package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -1
  132. package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -1
  133. package/dist/components/TitleSubpage/TitleSubpage.cjs +18 -31
  134. package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -1
  135. package/dist/components/TitleSubpage/TitleSubpage.d.cts +3 -3
  136. package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -1
  137. package/dist/components/TitleSubpage/TitleSubpage.d.mts +3 -3
  138. package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -1
  139. package/dist/components/TitleSubpage/TitleSubpage.mjs +19 -32
  140. package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -1
  141. package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -1
  142. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +9 -8
  143. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -1
  144. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +9 -8
  145. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -1
  146. package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -1
  147. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +7 -9
  148. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -1
  149. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -1
  150. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -1
  151. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +8 -10
  152. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -1
  153. package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs +1 -1
  154. package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs.map +1 -1
  155. package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs +1 -1
  156. package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs.map +1 -1
  157. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
  158. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +1 -1
  159. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +1 -1
  160. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
  161. package/package.json +4 -4
@@ -9,17 +9,17 @@ const design_system_shared_1 = require("@metamask-previews/design-system-shared"
9
9
  const react_1 = __importDefault(require("react"));
10
10
  // Internal dependencies.
11
11
  const Box_1 = require("../Box/index.cjs");
12
- const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
12
+ const BoxRow_1 = require("../BoxRow/index.cjs");
13
13
  /**
14
14
  * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.
15
15
  * Remaining `View` props are forwarded to the root `Box`.
16
16
  *
17
17
  * @param props - Component props
18
18
  * @param props.title - Title row content (required)
19
- * @param props.titleAvatar - Leading visual for the identity row (required); rendered as the first child of the identity row so callers control layout and composition (for example badges that extend past the token)
20
- * @param props.identityRowProps - Optional props spread onto the identity row `Box` after defaults (`children` is reserved)
19
+ * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
20
+ * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
21
21
  * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
22
- * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label row `Box` after defaults (`children` is reserved)
22
+ * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
23
23
  * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
24
24
  * @param props.subtitle - Optional subtitle row below the title and above the amount
25
25
  * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
@@ -39,57 +39,44 @@ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
39
39
  const TitleSubpage = ({ amount, amountEndAccessory, title, titleAvatar, titleEndAccessory, subtitle, subtitleEndAccessory, bottomAccessory, bottomLabel, bottomLabelEndAccessory, amountProps, titleProps, subtitleProps, bottomLabelProps, identityRowProps, titleColumnProps, bottomLabelWrapperProps, twClassName = '', ...props }) => {
40
40
  return (<Box_1.Box twClassName={twClassName} gap={1} {...props}>
41
41
  {/* Identity Row */}
42
- <Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={4} twClassName="h-14" {...identityRowProps}>
43
- {titleAvatar}
42
+ <BoxRow_1.BoxRow gap={4} twClassName="h-14" {...identityRowProps} startAccessory={titleAvatar}>
44
43
  {/* Title and Subtitle Column */}
45
44
  <Box_1.Box {...titleColumnProps}>
46
45
  {/* Title Row */}
47
- {title && (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1}>
48
- <TextOrChildren_1.TextOrChildren textProps={{
46
+ {title && (<BoxRow_1.BoxRow endAccessory={titleEndAccessory} textProps={{
49
47
  variant: design_system_shared_1.TextVariant.HeadingSm,
50
48
  color: design_system_shared_1.TextColor.TextDefault,
51
49
  ...titleProps,
52
50
  }}>
53
- {title}
54
- </TextOrChildren_1.TextOrChildren>
55
- {titleEndAccessory}
56
- </Box_1.Box>)}
51
+ {title}
52
+ </BoxRow_1.BoxRow>)}
57
53
  {/* Subtitle Row */}
58
- {subtitle && (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1}>
59
- <TextOrChildren_1.TextOrChildren textProps={{
54
+ {subtitle && (<BoxRow_1.BoxRow endAccessory={subtitleEndAccessory} textProps={{
60
55
  variant: design_system_shared_1.TextVariant.BodySm,
61
56
  fontWeight: design_system_shared_1.FontWeight.Medium,
62
57
  color: design_system_shared_1.TextColor.TextAlternative,
63
58
  ...subtitleProps,
64
59
  }}>
65
- {subtitle}
66
- </TextOrChildren_1.TextOrChildren>
67
- {subtitleEndAccessory}
68
- </Box_1.Box>)}
60
+ {subtitle}
61
+ </BoxRow_1.BoxRow>)}
69
62
  </Box_1.Box>
70
- </Box_1.Box>
63
+ </BoxRow_1.BoxRow>
71
64
  {/* Amount Row */}
72
- {amount && (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1}>
73
- <TextOrChildren_1.TextOrChildren textProps={{
65
+ {amount && (<BoxRow_1.BoxRow endAccessory={amountEndAccessory} textProps={{
74
66
  variant: design_system_shared_1.TextVariant.DisplayLg,
75
67
  ...amountProps,
76
68
  }}>
77
- {amount}
78
- </TextOrChildren_1.TextOrChildren>
79
- {amountEndAccessory}
80
- </Box_1.Box>)}
69
+ {amount}
70
+ </BoxRow_1.BoxRow>)}
81
71
  {/* Bottom Label Row */}
82
- {bottomLabel && (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} {...bottomLabelWrapperProps}>
83
- <TextOrChildren_1.TextOrChildren textProps={{
72
+ {bottomLabel && (<BoxRow_1.BoxRow {...bottomLabelWrapperProps} endAccessory={bottomLabelEndAccessory} textProps={{
84
73
  variant: design_system_shared_1.TextVariant.BodySm,
85
74
  fontWeight: design_system_shared_1.FontWeight.Medium,
86
75
  color: design_system_shared_1.TextColor.TextAlternative,
87
76
  ...bottomLabelProps,
88
77
  }}>
89
- {bottomLabel}
90
- </TextOrChildren_1.TextOrChildren>
91
- {bottomLabelEndAccessory}
92
- </Box_1.Box>)}
78
+ {bottomLabel}
79
+ </BoxRow_1.BoxRow>)}
93
80
  {!bottomLabel && bottomAccessory}
94
81
  </Box_1.Box>);
95
82
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,kFAMiD;AACjD,kDAA0B;AAE1B,yBAAyB;AACzB,0CAA6B;AAC7B,gFAAmE;AAInE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,MAAM,YAAY,GAAgC,CAAC,EACxD,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAG,CAAC,WAAW,CAAC,CAA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AClC;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AArHW,QAAA,YAAY,gBAqHvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n BoxAlignItems,\n BoxFlexDirection,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleSubpageProps } from './TitleSubpage.types';\n\n/**\n * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Title row content (required)\n * @param props.titleAvatar - Leading visual for the identity row (required); rendered as the first child of the identity row so callers control layout and composition (for example badges that extend past the token)\n * @param props.identityRowProps - Optional props spread onto the identity row `Box` after defaults (`children` is reserved)\n * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)\n * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label row `Box` after defaults (`children` is reserved)\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.subtitle - Optional subtitle row below the title and above the amount\n * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`\n * @param props.amount - Optional primary amount below the title\n * @param props.amountEndAccessory - Optional inline accessory to the right of the amount\n * @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown\n * @param props.bottomLabel - Optional secondary label below the amount row\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string\n * @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleSubpage layout.\n */\nexport const TitleSubpage: React.FC<TitleSubpageProps> = ({\n amount,\n amountEndAccessory,\n title,\n titleAvatar,\n titleEndAccessory,\n subtitle,\n subtitleEndAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n amountProps,\n titleProps,\n subtitleProps,\n bottomLabelProps,\n identityRowProps,\n titleColumnProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Identity Row */}\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n twClassName=\"h-14\"\n {...identityRowProps}\n >\n {titleAvatar}\n {/* Title and Subtitle Column */}\n <Box {...titleColumnProps}>\n {/* Title Row */}\n {title && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.HeadingSm,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {titleEndAccessory}\n </Box>\n )}\n {/* Subtitle Row */}\n {subtitle && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subtitleProps,\n }}\n >\n {subtitle}\n </TextOrChildren>\n {subtitleEndAccessory}\n </Box>\n )}\n </Box>\n </Box>\n {/* Amount Row */}\n {amount && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.DisplayLg,\n ...amountProps,\n }}\n >\n {amount}\n </TextOrChildren>\n {amountEndAccessory}\n </Box>\n )}\n {/* Bottom Label Row */}\n {bottomLabel && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n {...bottomLabelWrapperProps}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </TextOrChildren>\n {bottomLabelEndAccessory}\n </Box>\n )}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleSubpage.displayName = 'TitleSubpage';\n"]}
1
+ {"version":3,"file":"TitleSubpage.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,kFAIiD;AACjD,kDAA0B;AAE1B,yBAAyB;AACzB,0CAA6B;AAC7B,gDAAmC;AAInC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACI,MAAM,YAAY,GAAgC,CAAC,EACxD,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAAC,SAAG,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAC/C;MAAA,CAAC,kBAAkB,CACnB;MAAA,CAAC,eAAM,CACL,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,MAAM,CAClB,IAAI,gBAAgB,CAAC,CACrB,cAAc,CAAC,CAAC,WAAW,CAAC,CAE5B;QAAA,CAAC,+BAA+B,CAChC;QAAA,CAAC,SAAG,CAAC,IAAI,gBAAgB,CAAC,CACxB;UAAA,CAAC,eAAe,CAChB;UAAA,CAAC,KAA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AW,CACd;QAAA,EAAE,eAAM,CAAC,CACV,CACD;MAAA,CAAC,CAAC,WAAW,IAAI,eAAe,CAClC;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AA3FW,QAAA,YAAY,gBA2FvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\n\nimport type { TitleSubpageProps } from './TitleSubpage.types';\n\n/**\n * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Title row content (required)\n * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)\n * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)\n * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)\n * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.subtitle - Optional subtitle row below the title and above the amount\n * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`\n * @param props.amount - Optional primary amount below the title\n * @param props.amountEndAccessory - Optional inline accessory to the right of the amount\n * @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown\n * @param props.bottomLabel - Optional secondary label below the amount row\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string\n * @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleSubpage layout.\n */\nexport const TitleSubpage: React.FC<TitleSubpageProps> = ({\n amount,\n amountEndAccessory,\n title,\n titleAvatar,\n titleEndAccessory,\n subtitle,\n subtitleEndAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n amountProps,\n titleProps,\n subtitleProps,\n bottomLabelProps,\n identityRowProps,\n titleColumnProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Identity Row */}\n <BoxRow\n gap={4}\n twClassName=\"h-14\"\n {...identityRowProps}\n startAccessory={titleAvatar}\n >\n {/* Title and Subtitle Column */}\n <Box {...titleColumnProps}>\n {/* Title Row */}\n {title && (\n <BoxRow\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingSm,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n )}\n {/* Subtitle Row */}\n {subtitle && (\n <BoxRow\n endAccessory={subtitleEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subtitleProps,\n }}\n >\n {subtitle}\n </BoxRow>\n )}\n </Box>\n </BoxRow>\n {/* Amount Row */}\n {amount && (\n <BoxRow\n endAccessory={amountEndAccessory}\n textProps={{\n variant: TextVariant.DisplayLg,\n ...amountProps,\n }}\n >\n {amount}\n </BoxRow>\n )}\n {/* Bottom Label Row */}\n {bottomLabel && (\n <BoxRow\n {...bottomLabelWrapperProps}\n endAccessory={bottomLabelEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </BoxRow>\n )}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleSubpage.displayName = 'TitleSubpage';\n"]}
@@ -6,10 +6,10 @@ import type { TitleSubpageProps } from "./TitleSubpage.types.cjs";
6
6
  *
7
7
  * @param props - Component props
8
8
  * @param props.title - Title row content (required)
9
- * @param props.titleAvatar - Leading visual for the identity row (required); rendered as the first child of the identity row so callers control layout and composition (for example badges that extend past the token)
10
- * @param props.identityRowProps - Optional props spread onto the identity row `Box` after defaults (`children` is reserved)
9
+ * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
10
+ * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
11
11
  * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
12
- * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label row `Box` after defaults (`children` is reserved)
12
+ * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
13
13
  * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
14
14
  * @param props.subtitle - Optional subtitle row below the title and above the amount
15
15
  * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.d.cts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqHpD,CAAC"}
1
+ {"version":3,"file":"TitleSubpage.d.cts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2FpD,CAAC"}
@@ -6,10 +6,10 @@ import type { TitleSubpageProps } from "./TitleSubpage.types.mjs";
6
6
  *
7
7
  * @param props - Component props
8
8
  * @param props.title - Title row content (required)
9
- * @param props.titleAvatar - Leading visual for the identity row (required); rendered as the first child of the identity row so callers control layout and composition (for example badges that extend past the token)
10
- * @param props.identityRowProps - Optional props spread onto the identity row `Box` after defaults (`children` is reserved)
9
+ * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
10
+ * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
11
11
  * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
12
- * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label row `Box` after defaults (`children` is reserved)
12
+ * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
13
13
  * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
14
14
  * @param props.subtitle - Optional subtitle row below the title and above the amount
15
15
  * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.d.mts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqHpD,CAAC"}
1
+ {"version":3,"file":"TitleSubpage.d.mts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAM1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,iCAA6B;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA2FpD,CAAC"}
@@ -5,22 +5,22 @@ function $importDefault(module) {
5
5
  return module;
6
6
  }
7
7
  // Third party dependencies.
8
- import { BoxAlignItems, BoxFlexDirection, FontWeight, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
+ import { FontWeight, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
9
9
  import $React from "react";
10
10
  const React = $importDefault($React);
11
11
  // Internal dependencies.
12
12
  import { Box } from "../Box/index.mjs";
13
- import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
13
+ import { BoxRow } from "../BoxRow/index.mjs";
14
14
  /**
15
15
  * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.
16
16
  * Remaining `View` props are forwarded to the root `Box`.
17
17
  *
18
18
  * @param props - Component props
19
19
  * @param props.title - Title row content (required)
20
- * @param props.titleAvatar - Leading visual for the identity row (required); rendered as the first child of the identity row so callers control layout and composition (for example badges that extend past the token)
21
- * @param props.identityRowProps - Optional props spread onto the identity row `Box` after defaults (`children` is reserved)
20
+ * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)
21
+ * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)
22
22
  * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)
23
- * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label row `Box` after defaults (`children` is reserved)
23
+ * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)
24
24
  * @param props.titleEndAccessory - Optional inline accessory to the right of `title`
25
25
  * @param props.subtitle - Optional subtitle row below the title and above the amount
26
26
  * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`
@@ -40,57 +40,44 @@ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
40
40
  export const TitleSubpage = ({ amount, amountEndAccessory, title, titleAvatar, titleEndAccessory, subtitle, subtitleEndAccessory, bottomAccessory, bottomLabel, bottomLabelEndAccessory, amountProps, titleProps, subtitleProps, bottomLabelProps, identityRowProps, titleColumnProps, bottomLabelWrapperProps, twClassName = '', ...props }) => {
41
41
  return (<Box twClassName={twClassName} gap={1} {...props}>
42
42
  {/* Identity Row */}
43
- <Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={4} twClassName="h-14" {...identityRowProps}>
44
- {titleAvatar}
43
+ <BoxRow gap={4} twClassName="h-14" {...identityRowProps} startAccessory={titleAvatar}>
45
44
  {/* Title and Subtitle Column */}
46
45
  <Box {...titleColumnProps}>
47
46
  {/* Title Row */}
48
- {title && (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1}>
49
- <TextOrChildren textProps={{
47
+ {title && (<BoxRow endAccessory={titleEndAccessory} textProps={{
50
48
  variant: TextVariant.HeadingSm,
51
49
  color: TextColor.TextDefault,
52
50
  ...titleProps,
53
51
  }}>
54
- {title}
55
- </TextOrChildren>
56
- {titleEndAccessory}
57
- </Box>)}
52
+ {title}
53
+ </BoxRow>)}
58
54
  {/* Subtitle Row */}
59
- {subtitle && (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1}>
60
- <TextOrChildren textProps={{
55
+ {subtitle && (<BoxRow endAccessory={subtitleEndAccessory} textProps={{
61
56
  variant: TextVariant.BodySm,
62
57
  fontWeight: FontWeight.Medium,
63
58
  color: TextColor.TextAlternative,
64
59
  ...subtitleProps,
65
60
  }}>
66
- {subtitle}
67
- </TextOrChildren>
68
- {subtitleEndAccessory}
69
- </Box>)}
61
+ {subtitle}
62
+ </BoxRow>)}
70
63
  </Box>
71
- </Box>
64
+ </BoxRow>
72
65
  {/* Amount Row */}
73
- {amount && (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1}>
74
- <TextOrChildren textProps={{
66
+ {amount && (<BoxRow endAccessory={amountEndAccessory} textProps={{
75
67
  variant: TextVariant.DisplayLg,
76
68
  ...amountProps,
77
69
  }}>
78
- {amount}
79
- </TextOrChildren>
80
- {amountEndAccessory}
81
- </Box>)}
70
+ {amount}
71
+ </BoxRow>)}
82
72
  {/* Bottom Label Row */}
83
- {bottomLabel && (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} {...bottomLabelWrapperProps}>
84
- <TextOrChildren textProps={{
73
+ {bottomLabel && (<BoxRow {...bottomLabelWrapperProps} endAccessory={bottomLabelEndAccessory} textProps={{
85
74
  variant: TextVariant.BodySm,
86
75
  fontWeight: FontWeight.Medium,
87
76
  color: TextColor.TextAlternative,
88
77
  ...bottomLabelProps,
89
78
  }}>
90
- {bottomLabel}
91
- </TextOrChildren>
92
- {bottomLabelEndAccessory}
93
- </Box>)}
79
+ {bottomLabel}
80
+ </BoxRow>)}
94
81
  {!bottomLabel && bottomAccessory}
95
82
  </Box>);
96
83
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.mjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,UAAU,EACV,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,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AAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,GAAG,gBAAgB;aACpB,CAAC,CAEF;YAAA,CAAC,WAAW,CACd;UAAA,EAAE,cAAc,CAChB;UAAA,CAAC,uBAAuB,CAC1B;QAAA,EAAE,GAAG,CAAC,CACP,CACD;MAAA,CAAC,CAAC,WAAW,IAAI,eAAe,CAClC;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n BoxAlignItems,\n BoxFlexDirection,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { TitleSubpageProps } from './TitleSubpage.types';\n\n/**\n * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Title row content (required)\n * @param props.titleAvatar - Leading visual for the identity row (required); rendered as the first child of the identity row so callers control layout and composition (for example badges that extend past the token)\n * @param props.identityRowProps - Optional props spread onto the identity row `Box` after defaults (`children` is reserved)\n * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)\n * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label row `Box` after defaults (`children` is reserved)\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.subtitle - Optional subtitle row below the title and above the amount\n * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`\n * @param props.amount - Optional primary amount below the title\n * @param props.amountEndAccessory - Optional inline accessory to the right of the amount\n * @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown\n * @param props.bottomLabel - Optional secondary label below the amount row\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string\n * @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleSubpage layout.\n */\nexport const TitleSubpage: React.FC<TitleSubpageProps> = ({\n amount,\n amountEndAccessory,\n title,\n titleAvatar,\n titleEndAccessory,\n subtitle,\n subtitleEndAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n amountProps,\n titleProps,\n subtitleProps,\n bottomLabelProps,\n identityRowProps,\n titleColumnProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Identity Row */}\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={4}\n twClassName=\"h-14\"\n {...identityRowProps}\n >\n {titleAvatar}\n {/* Title and Subtitle Column */}\n <Box {...titleColumnProps}>\n {/* Title Row */}\n {title && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.HeadingSm,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {titleEndAccessory}\n </Box>\n )}\n {/* Subtitle Row */}\n {subtitle && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subtitleProps,\n }}\n >\n {subtitle}\n </TextOrChildren>\n {subtitleEndAccessory}\n </Box>\n )}\n </Box>\n </Box>\n {/* Amount Row */}\n {amount && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.DisplayLg,\n ...amountProps,\n }}\n >\n {amount}\n </TextOrChildren>\n {amountEndAccessory}\n </Box>\n )}\n {/* Bottom Label Row */}\n {bottomLabel && (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n {...bottomLabelWrapperProps}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </TextOrChildren>\n {bottomLabelEndAccessory}\n </Box>\n )}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleSubpage.displayName = 'TitleSubpage';\n"]}
1
+ {"version":3,"file":"TitleSubpage.mjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EACL,UAAU,EACV,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,yBAAyB;AACzB,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AAInC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,YAAY,GAAgC,CAAC,EACxD,MAAM,EACN,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,WAAW,EACX,uBAAuB,EACvB,WAAW,EACX,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,GAAG,EAAE,EAChB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,OAAO,CACL,CAA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AC,CAEF;UAAA,CAAC,MAAM,CACT;QAAA,EAAE,MAAM,CAAC,CACV,CACD;MAAA,CAAC,sBAAsB,CACvB;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,MAAM,CACL,IAAI,uBAAuB,CAAC,CAC5B,YAAY,CAAC,CAAC,uBAAuB,CAAC,CACtC,SAAS,CAAC,CAAC;gBACT,OAAO,EAAE,WAAW,CAAC,MAAM;gBAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;gBAC7B,KAAK,EAAE,SAAS,CAAC,eAAe;gBAChC,GAAG,gBAAgB;aACpB,CAAC,CAEF;UAAA,CAAC,WAAW,CACd;QAAA,EAAE,MAAM,CAAC,CACV,CACD;MAAA,CAAC,CAAC,WAAW,IAAI,eAAe,CAClC;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// Third party dependencies.\nimport {\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\n// Internal dependencies.\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\n\nimport type { TitleSubpageProps } from './TitleSubpage.types';\n\n/**\n * Displays a required identity row (avatar + title stack) with optional subtitle, amount, inline accessories, and bottom rows in a left-aligned layout.\n * Remaining `View` props are forwarded to the root `Box`.\n *\n * @param props - Component props\n * @param props.title - Title row content (required)\n * @param props.titleAvatar - Leading visual for the identity row (required); passed through as the identity `BoxRow` `startAccessory` so callers control layout and composition (for example badges that extend past the token)\n * @param props.identityRowProps - Optional props spread onto the identity `BoxRow` after defaults (`children`, `startAccessory`, and `textProps` are reserved)\n * @param props.titleColumnProps - Optional props spread onto the title/subtitle column `Box` (`children` is reserved)\n * @param props.bottomLabelWrapperProps - Optional props spread onto the bottom label `BoxRow` after defaults (`children`, `endAccessory`, and `textProps` are reserved)\n * @param props.titleEndAccessory - Optional inline accessory to the right of `title`\n * @param props.subtitle - Optional subtitle row below the title and above the amount\n * @param props.subtitleEndAccessory - Optional inline accessory to the right of `subtitle`\n * @param props.amount - Optional primary amount below the title\n * @param props.amountEndAccessory - Optional inline accessory to the right of the amount\n * @param props.bottomAccessory - Optional custom bottom row when the bottom label row is not shown\n * @param props.bottomLabel - Optional secondary label below the amount row\n * @param props.bottomLabelEndAccessory - Optional inline accessory to the right of `bottomLabel`\n * @param props.titleProps - Optional props merged into title row `Text` when `title` is a string\n * @param props.subtitleProps - Optional props merged into subtitle row `Text` when `subtitle` is a string\n * @param props.amountProps - Optional props merged into amount `Text` when `amount` is a string\n * @param props.bottomLabelProps - Optional props merged into bottom label `Text` when `bottomLabel` is a string\n * @param props.twClassName - Optional Tailwind classes on the root container\n *\n * @returns The rendered TitleSubpage layout.\n */\nexport const TitleSubpage: React.FC<TitleSubpageProps> = ({\n amount,\n amountEndAccessory,\n title,\n titleAvatar,\n titleEndAccessory,\n subtitle,\n subtitleEndAccessory,\n bottomAccessory,\n bottomLabel,\n bottomLabelEndAccessory,\n amountProps,\n titleProps,\n subtitleProps,\n bottomLabelProps,\n identityRowProps,\n titleColumnProps,\n bottomLabelWrapperProps,\n twClassName = '',\n ...props\n}) => {\n return (\n <Box twClassName={twClassName} gap={1} {...props}>\n {/* Identity Row */}\n <BoxRow\n gap={4}\n twClassName=\"h-14\"\n {...identityRowProps}\n startAccessory={titleAvatar}\n >\n {/* Title and Subtitle Column */}\n <Box {...titleColumnProps}>\n {/* Title Row */}\n {title && (\n <BoxRow\n endAccessory={titleEndAccessory}\n textProps={{\n variant: TextVariant.HeadingSm,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </BoxRow>\n )}\n {/* Subtitle Row */}\n {subtitle && (\n <BoxRow\n endAccessory={subtitleEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subtitleProps,\n }}\n >\n {subtitle}\n </BoxRow>\n )}\n </Box>\n </BoxRow>\n {/* Amount Row */}\n {amount && (\n <BoxRow\n endAccessory={amountEndAccessory}\n textProps={{\n variant: TextVariant.DisplayLg,\n ...amountProps,\n }}\n >\n {amount}\n </BoxRow>\n )}\n {/* Bottom Label Row */}\n {bottomLabel && (\n <BoxRow\n {...bottomLabelWrapperProps}\n endAccessory={bottomLabelEndAccessory}\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...bottomLabelProps,\n }}\n >\n {bottomLabel}\n </BoxRow>\n )}\n {!bottomLabel && bottomAccessory}\n </Box>\n );\n};\n\nTitleSubpage.displayName = 'TitleSubpage';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.types.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleSubpagePropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleSubpage component props (React Native).\n * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleSubpageProps = TitleSubpagePropsShared & {\n /**\n * Optional props spread onto the identity row {@link Box} (a row with centered items, `gap={4}`, and `h-14` by default; values here override those defaults). Excludes `children`, which the component owns.\n */\n identityRowProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).\n */\n titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the bottom label row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Excludes `children`, which the component owns.\n */\n bottomLabelWrapperProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props merged into the amount `Text` when `amount` is a string.\n */\n amountProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into the title `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into the subtitle `Text` when `subtitle` is a string.\n */\n subtitleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into the bottom label `Text` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
1
+ {"version":3,"file":"TitleSubpage.types.cjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleSubpagePropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleSubpage component props (React Native).\n * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleSubpageProps = TitleSubpagePropsShared & {\n /**\n * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).\n */\n identityRowProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'textProps'\n >;\n /**\n * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).\n */\n titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).\n */\n bottomLabelWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.\n */\n amountProps?: Omit<Partial<TextProps>, 'children'>;\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 merged into {@link BoxRow} `textProps` when `subtitle` is a string.\n */\n subtitleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -1,6 +1,7 @@
1
1
  import type { TitleSubpagePropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { ViewProps } from "react-native";
3
3
  import type { BoxProps } from "../Box/Box.types.cjs";
4
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.cjs";
4
5
  import type { TextProps } from "../Text/Text.types.cjs";
5
6
  /**
6
7
  * TitleSubpage component props (React Native).
@@ -8,31 +9,31 @@ import type { TextProps } from "../Text/Text.types.cjs";
8
9
  */
9
10
  export type TitleSubpageProps = TitleSubpagePropsShared & {
10
11
  /**
11
- * Optional props spread onto the identity row {@link Box} (a row with centered items, `gap={4}`, and `h-14` by default; values here override those defaults). Excludes `children`, which the component owns.
12
+ * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).
12
13
  */
13
- identityRowProps?: Omit<Partial<BoxProps>, 'children'>;
14
+ identityRowProps?: Omit<Partial<BoxRowProps>, 'children' | 'startAccessory' | 'textProps'>;
14
15
  /**
15
16
  * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).
16
17
  */
17
18
  titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;
18
19
  /**
19
- * Optional props spread onto the bottom label row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Excludes `children`, which the component owns.
20
+ * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).
20
21
  */
21
- bottomLabelWrapperProps?: Omit<Partial<BoxProps>, 'children'>;
22
+ bottomLabelWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
22
23
  /**
23
- * Optional props merged into the amount `Text` when `amount` is a string.
24
+ * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.
24
25
  */
25
26
  amountProps?: Omit<Partial<TextProps>, 'children'>;
26
27
  /**
27
- * Optional props merged into the title `Text` when `title` is a string.
28
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
28
29
  */
29
30
  titleProps?: Omit<Partial<TextProps>, 'children'>;
30
31
  /**
31
- * Optional props merged into the subtitle `Text` when `subtitle` is a string.
32
+ * Optional props merged into {@link BoxRow} `textProps` when `subtitle` is a string.
32
33
  */
33
34
  subtitleProps?: Omit<Partial<TextProps>, 'children'>;
34
35
  /**
35
- * Optional props merged into the bottom label `Text` when `bottomLabel` is a string.
36
+ * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.
36
37
  */
37
38
  bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;
38
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.types.d.cts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG;IACxD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACvD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACvD;;OAEG;IACH,uB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C5B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACnD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACrD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { TitleSubpagePropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { ViewProps } from "react-native";
3
3
  import type { BoxProps } from "../Box/Box.types.mjs";
4
+ import type { BoxRowProps } from "../BoxRow/BoxRow.types.mjs";
4
5
  import type { TextProps } from "../Text/Text.types.mjs";
5
6
  /**
6
7
  * TitleSubpage component props (React Native).
@@ -8,31 +9,31 @@ import type { TextProps } from "../Text/Text.types.mjs";
8
9
  */
9
10
  export type TitleSubpageProps = TitleSubpagePropsShared & {
10
11
  /**
11
- * Optional props spread onto the identity row {@link Box} (a row with centered items, `gap={4}`, and `h-14` by default; values here override those defaults). Excludes `children`, which the component owns.
12
+ * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).
12
13
  */
13
- identityRowProps?: Omit<Partial<BoxProps>, 'children'>;
14
+ identityRowProps?: Omit<Partial<BoxRowProps>, 'children' | 'startAccessory' | 'textProps'>;
14
15
  /**
15
16
  * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).
16
17
  */
17
18
  titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;
18
19
  /**
19
- * Optional props spread onto the bottom label row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Excludes `children`, which the component owns.
20
+ * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).
20
21
  */
21
- bottomLabelWrapperProps?: Omit<Partial<BoxProps>, 'children'>;
22
+ bottomLabelWrapperProps?: Omit<Partial<BoxRowProps>, 'children' | 'endAccessory' | 'textProps'>;
22
23
  /**
23
- * Optional props merged into the amount `Text` when `amount` is a string.
24
+ * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.
24
25
  */
25
26
  amountProps?: Omit<Partial<TextProps>, 'children'>;
26
27
  /**
27
- * Optional props merged into the title `Text` when `title` is a string.
28
+ * Optional props merged into {@link BoxRow} `textProps` when `title` is a string.
28
29
  */
29
30
  titleProps?: Omit<Partial<TextProps>, 'children'>;
30
31
  /**
31
- * Optional props merged into the subtitle `Text` when `subtitle` is a string.
32
+ * Optional props merged into {@link BoxRow} `textProps` when `subtitle` is a string.
32
33
  */
33
34
  subtitleProps?: Omit<Partial<TextProps>, 'children'>;
34
35
  /**
35
- * Optional props merged into the bottom label `Text` when `bottomLabel` is a string.
36
+ * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.
36
37
  */
37
38
  bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;
38
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.types.d.mts","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,gDAAgD;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,qBAAqB;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;GAGG;AACH,MAAM,MAAM,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gB,CAAC,EAAE,IAAI,CACrB,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,gBAAgB,GAAG,WAAW,CAC5C,CAAC;IACF;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IACvD;;OAEG;IACH,uBAAuB,CAAC,EAAE,IAAI,CAC5B,OAAO,CAAC,WAAW,CAAC,EACpB,UAAU,GAAG,cAAc,GAAG,WAAW,CAC1C,CAAC;IACF;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACnD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAClD;;OAEG;IACH,aAAa,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACrD;;OAEG;IACH,gBAAgB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TitleSubpage.types.mjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleSubpagePropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleSubpage component props (React Native).\n * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleSubpageProps = TitleSubpagePropsShared & {\n /**\n * Optional props spread onto the identity row {@link Box} (a row with centered items, `gap={4}`, and `h-14` by default; values here override those defaults). Excludes `children`, which the component owns.\n */\n identityRowProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).\n */\n titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the bottom label row {@link Box} (a row with centered items and `gap={1}` by default; values here override those defaults). Excludes `children`, which the component owns.\n */\n bottomLabelWrapperProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props merged into the amount `Text` when `amount` is a string.\n */\n amountProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into the title `Text` when `title` is a string.\n */\n titleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into the subtitle `Text` when `subtitle` is a string.\n */\n subtitleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into the bottom label `Text` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
1
+ {"version":3,"file":"TitleSubpage.types.mjs","sourceRoot":"","sources":["../../../src/components/TitleSubpage/TitleSubpage.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { TitleSubpagePropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\n// Internal dependencies.\nimport type { BoxProps } from '../Box/Box.types';\nimport type { BoxRowProps } from '../BoxRow/BoxRow.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * TitleSubpage component props (React Native).\n * Extends {@link TitleSubpagePropsShared} (requires `title` and `titleAvatar`) with platform `Text` passthroughs, `twClassName`, and `View` props.\n */\nexport type TitleSubpageProps = TitleSubpagePropsShared & {\n /**\n * Optional props spread onto the identity {@link BoxRow} (excluding `children`, `startAccessory`, and `textProps`, which the component owns).\n */\n identityRowProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'startAccessory' | 'textProps'\n >;\n /**\n * Optional props spread onto the title/subtitle column {@link Box} (excluding `children`, which the component owns).\n */\n titleColumnProps?: Omit<Partial<BoxProps>, 'children'>;\n /**\n * Optional props spread onto the bottom label {@link BoxRow} (excluding `children`, `endAccessory`, and `textProps`, which the component owns).\n */\n bottomLabelWrapperProps?: Omit<\n Partial<BoxRowProps>,\n 'children' | 'endAccessory' | 'textProps'\n >;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `amount` is a string.\n */\n amountProps?: Omit<Partial<TextProps>, 'children'>;\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 merged into {@link BoxRow} `textProps` when `subtitle` is a string.\n */\n subtitleProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional props merged into {@link BoxRow} `textProps` when `bottomLabel` is a string.\n */\n bottomLabelProps?: Omit<Partial<TextProps>, 'children'>;\n /**\n * Optional Tailwind class name to apply to the container.\n */\n twClassName?: string;\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -8,6 +8,7 @@ exports.HeaderStandardCenterColumn = HeaderStandardCenterColumn;
8
8
  const react_1 = __importDefault(require("react"));
9
9
  // External dependencies.
10
10
  const Box_1 = require("../../Box/index.cjs");
11
+ const BoxColumn_1 = require("../../BoxColumn/index.cjs");
11
12
  const Text_1 = require("../../Text/index.cjs");
12
13
  const TextOrChildren_1 = require("../TextOrChildren/index.cjs");
13
14
  function HeaderStandardCenterColumn({ title, titleProps, subtitle, subtitleProps, }) {
@@ -21,17 +22,14 @@ function HeaderStandardCenterColumn({ title, titleProps, subtitle, subtitleProps
21
22
  twClassName: ['-mt-0.5', subtitleTwClassName].filter(Boolean).join(' '),
22
23
  };
23
24
  }
24
- return (<Box_1.Box flexDirection={Box_1.BoxFlexDirection.Column} alignItems={Box_1.BoxAlignItems.Center}>
25
- <TextOrChildren_1.TextOrChildren textProps={{
25
+ return (<BoxColumn_1.BoxColumn alignItems={Box_1.BoxAlignItems.Center} textProps={{
26
26
  variant: Text_1.TextVariant.BodyMd,
27
27
  fontWeight: Text_1.FontWeight.Bold,
28
28
  ...titleProps,
29
- }}>
30
- {title}
31
- </TextOrChildren_1.TextOrChildren>
32
- {subtitle ? (<TextOrChildren_1.TextOrChildren textProps={subtitleTextProps}>
33
- {subtitle}
34
- </TextOrChildren_1.TextOrChildren>) : null}
35
- </Box_1.Box>);
29
+ }} bottomAccessory={subtitle ? (<TextOrChildren_1.TextOrChildren textProps={subtitleTextProps}>
30
+ {subtitle}
31
+ </TextOrChildren_1.TextOrChildren>) : undefined}>
32
+ {title}
33
+ </BoxColumn_1.BoxColumn>);
36
34
  }
37
35
  //# sourceMappingURL=HeaderStandardCenterColumn.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandardCenterColumn.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.tsx"],"names":[],"mappings":";;;;;AAYA,gEAuCC;AAnDD,4BAA4B;AAC5B,kDAA0B;AAE1B,yBAAyB;AACzB,6CAAiE;AAEjE,+CAAgE;AAChE,gEAAmD;AAKnD,SAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,GACmB;IAChC,IAAI,iBAAmE,CAAC;IACxE,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC7C,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,EAAE,GAC7D,aAAa,IAAI,EAAE,CAAC;QACtB,iBAAiB,GAAG;YAClB,OAAO,EAAE,kBAAW,CAAC,MAAM;YAC3B,KAAK,EAAE,gBAAS,CAAC,eAAe;YAChC,GAAG,gBAAgB;YACnB,WAAW,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACxE,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,sBAAgB,CAAC,MAAM,CAAC,CACvC,UAAU,CAAC,CAAC,mBAAa,CAAC,MAAM,CAAC,CAEjC;MAAA,CAAC,+BAAc,CACb,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,kBAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,iBAAU,CAAC,IAAI;YAC3B,GAAG,UAAU;SACd,CAAC,CAEF;QAAA,CAAC,KAAK,CACR;MAAA,EAAE,+BAAc,CAChB;MAAA,CAAC,QAAQ,CAAC,CAAC,CAAC,CACV,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,SAAG,CAAC,CACP,CAAC;AACJ,CAAC","sourcesContent":["// Third party dependencies.\nimport React from 'react';\n\n// External dependencies.\nimport { Box, BoxAlignItems, BoxFlexDirection } from '../../Box';\nimport type { TextProps } from '../../Text';\nimport { FontWeight, TextColor, TextVariant } from '../../Text';\nimport { TextOrChildren } from '../TextOrChildren';\n\n// Internal dependencies.\nimport type { HeaderStandardCenterColumnProps } from './HeaderStandardCenterColumn.types';\n\nexport function HeaderStandardCenterColumn({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n}: HeaderStandardCenterColumnProps) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName].filter(Boolean).join(' '),\n };\n }\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Column}\n alignItems={BoxAlignItems.Center}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n {subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : null}\n </Box>\n );\n}\n"]}
1
+ {"version":3,"file":"HeaderStandardCenterColumn.cjs","sourceRoot":"","sources":["../../../../src/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.tsx"],"names":[],"mappings":";;;;;AAaA,gEAqCC;AAlDD,4BAA4B;AAC5B,kDAA0B;AAE1B,yBAAyB;AACzB,6CAA0C;AAC1C,yDAA4C;AAE5C,+CAAgE;AAChE,gEAAmD;AAKnD,SAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,GACmB;IAChC,IAAI,iBAAmE,CAAC;IACxE,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC7C,MAAM,EAAE,WAAW,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,EAAE,GAC7D,aAAa,IAAI,EAAE,CAAC;QACtB,iBAAiB,GAAG;YAClB,OAAO,EAAE,kBAAW,CAAC,MAAM;YAC3B,KAAK,EAAE,gBAAS,CAAC,eAAe;YAChC,GAAG,gBAAgB;YACnB,WAAW,EAAE,CAAC,SAAS,EAAE,mBAAmB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;SACxE,CAAC;IACJ,CAAC;IAED,OAAO,CACL,CAAC,qBAAS,CACR,UAAU,CAAC,CAAC,mBAAa,CAAC,MAAM,CAAC,CACjC,SAAS,CAAC,CAAC;YACT,OAAO,EAAE,kBAAW,CAAC,MAAM;YAC3B,UAAU,EAAE,iBAAU,CAAC,IAAI;YAC3B,GAAG,UAAU;SACd,CAAC,CACF,eAAe,CAAC,CACd,QAAQ,CAAC,CAAC,CAAC,CACT,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,iBAAiB,CAAC,CAC3C;YAAA,CAAC,QAAQ,CACX;UAAA,EAAE,+BAAc,CAAC,CAClB,CAAC,CAAC,CAAC,SACN,CAAC,CAED;MAAA,CAAC,KAAK,CACR;IAAA,EAAE,qBAAS,CAAC,CACb,CAAC;AACJ,CAAC","sourcesContent":["// Third party dependencies.\nimport React from 'react';\n\n// External dependencies.\nimport { BoxAlignItems } from '../../Box';\nimport { BoxColumn } from '../../BoxColumn';\nimport type { TextProps } from '../../Text';\nimport { FontWeight, TextColor, TextVariant } from '../../Text';\nimport { TextOrChildren } from '../TextOrChildren';\n\n// Internal dependencies.\nimport type { HeaderStandardCenterColumnProps } from './HeaderStandardCenterColumn.types';\n\nexport function HeaderStandardCenterColumn({\n title,\n titleProps,\n subtitle,\n subtitleProps,\n}: HeaderStandardCenterColumnProps) {\n let subtitleTextProps: Omit<Partial<TextProps>, 'children'> | undefined;\n if (subtitle && typeof subtitle === 'string') {\n const { twClassName: subtitleTwClassName, ...subtitleTextRest } =\n subtitleProps ?? {};\n subtitleTextProps = {\n variant: TextVariant.BodySm,\n color: TextColor.TextAlternative,\n ...subtitleTextRest,\n twClassName: ['-mt-0.5', subtitleTwClassName].filter(Boolean).join(' '),\n };\n }\n\n return (\n <BoxColumn\n alignItems={BoxAlignItems.Center}\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Bold,\n ...titleProps,\n }}\n bottomAccessory={\n subtitle ? (\n <TextOrChildren textProps={subtitleTextProps}>\n {subtitle}\n </TextOrChildren>\n ) : undefined\n }\n >\n {title}\n </BoxColumn>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandardCenterColumn.d.cts","sourceRoot":"","sources":["../../../../src/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,+BAA+B,EAAE,+CAA2C;AAE1F,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,GACd,EAAE,+BAA+B,qBAkCjC"}
1
+ {"version":3,"file":"HeaderStandardCenterColumn.d.cts","sourceRoot":"","sources":["../../../../src/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAU1B,OAAO,KAAK,EAAE,+BAA+B,EAAE,+CAA2C;AAE1F,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,GACd,EAAE,+BAA+B,qBAgCjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderStandardCenterColumn.d.mts","sourceRoot":"","sources":["../../../../src/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAS1B,OAAO,KAAK,EAAE,+BAA+B,EAAE,+CAA2C;AAE1F,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,GACd,EAAE,+BAA+B,qBAkCjC"}
1
+ {"version":3,"file":"HeaderStandardCenterColumn.d.mts","sourceRoot":"","sources":["../../../../src/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAU1B,OAAO,KAAK,EAAE,+BAA+B,EAAE,+CAA2C;AAE1F,wBAAgB,0BAA0B,CAAC,EACzC,KAAK,EACL,UAAU,EACV,QAAQ,EACR,aAAa,GACd,EAAE,+BAA+B,qBAgCjC"}
@@ -8,7 +8,8 @@ function $importDefault(module) {
8
8
  import $React from "react";
9
9
  const React = $importDefault($React);
10
10
  // External dependencies.
11
- import { Box, BoxAlignItems, BoxFlexDirection } from "../../Box/index.mjs";
11
+ import { BoxAlignItems } from "../../Box/index.mjs";
12
+ import { BoxColumn } from "../../BoxColumn/index.mjs";
12
13
  import { FontWeight, TextColor, TextVariant } from "../../Text/index.mjs";
13
14
  import { TextOrChildren } from "../TextOrChildren/index.mjs";
14
15
  export function HeaderStandardCenterColumn({ title, titleProps, subtitle, subtitleProps, }) {
@@ -22,17 +23,14 @@ export function HeaderStandardCenterColumn({ title, titleProps, subtitle, subtit
22
23
  twClassName: ['-mt-0.5', subtitleTwClassName].filter(Boolean).join(' '),
23
24
  };
24
25
  }
25
- return (<Box flexDirection={BoxFlexDirection.Column} alignItems={BoxAlignItems.Center}>
26
- <TextOrChildren textProps={{
26
+ return (<BoxColumn alignItems={BoxAlignItems.Center} textProps={{
27
27
  variant: TextVariant.BodyMd,
28
28
  fontWeight: FontWeight.Bold,
29
29
  ...titleProps,
30
- }}>
31
- {title}
32
- </TextOrChildren>
33
- {subtitle ? (<TextOrChildren textProps={subtitleTextProps}>
34
- {subtitle}
35
- </TextOrChildren>) : null}
36
- </Box>);
30
+ }} bottomAccessory={subtitle ? (<TextOrChildren textProps={subtitleTextProps}>
31
+ {subtitle}
32
+ </TextOrChildren>) : undefined}>
33
+ {title}
34
+ </BoxColumn>);
37
35
  }
38
36
  //# sourceMappingURL=HeaderStandardCenterColumn.mjs.map