@metamask-previews/design-system-react-native 0.56.1-preview-7d5964a → 0.56.2-preview-473aecb

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 (174) hide show
  1. package/CHANGELOG.md +13 -1
  2. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs +1 -1
  3. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -1
  4. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs +1 -1
  5. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -1
  6. package/dist/components/BoxColumn/BoxColumn.cjs +13 -0
  7. package/dist/components/BoxColumn/BoxColumn.cjs.map +1 -1
  8. package/dist/components/BoxColumn/BoxColumn.d.cts +13 -0
  9. package/dist/components/BoxColumn/BoxColumn.d.cts.map +1 -1
  10. package/dist/components/BoxColumn/BoxColumn.d.mts +13 -0
  11. package/dist/components/BoxColumn/BoxColumn.d.mts.map +1 -1
  12. package/dist/components/BoxColumn/BoxColumn.mjs +13 -0
  13. package/dist/components/BoxColumn/BoxColumn.mjs.map +1 -1
  14. package/dist/components/BoxColumn/BoxColumn.types.cjs.map +1 -1
  15. package/dist/components/BoxColumn/BoxColumn.types.d.cts +2 -0
  16. package/dist/components/BoxColumn/BoxColumn.types.d.cts.map +1 -1
  17. package/dist/components/BoxColumn/BoxColumn.types.d.mts +2 -0
  18. package/dist/components/BoxColumn/BoxColumn.types.d.mts.map +1 -1
  19. package/dist/components/BoxColumn/BoxColumn.types.mjs.map +1 -1
  20. package/dist/components/BoxRow/BoxRow.cjs +13 -0
  21. package/dist/components/BoxRow/BoxRow.cjs.map +1 -1
  22. package/dist/components/BoxRow/BoxRow.d.cts +13 -0
  23. package/dist/components/BoxRow/BoxRow.d.cts.map +1 -1
  24. package/dist/components/BoxRow/BoxRow.d.mts +13 -0
  25. package/dist/components/BoxRow/BoxRow.d.mts.map +1 -1
  26. package/dist/components/BoxRow/BoxRow.mjs +13 -0
  27. package/dist/components/BoxRow/BoxRow.mjs.map +1 -1
  28. package/dist/components/BoxRow/BoxRow.types.cjs.map +1 -1
  29. package/dist/components/BoxRow/BoxRow.types.d.cts +2 -0
  30. package/dist/components/BoxRow/BoxRow.types.d.cts.map +1 -1
  31. package/dist/components/BoxRow/BoxRow.types.d.mts +2 -0
  32. package/dist/components/BoxRow/BoxRow.types.d.mts.map +1 -1
  33. package/dist/components/BoxRow/BoxRow.types.mjs.map +1 -1
  34. package/dist/components/ButtonBase/ButtonBase.cjs +9 -5
  35. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  36. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  37. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  38. package/dist/components/ButtonBase/ButtonBase.mjs +10 -6
  39. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  40. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  41. package/dist/components/ButtonBase/ButtonBase.types.d.cts +2 -3
  42. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  43. package/dist/components/ButtonBase/ButtonBase.types.d.mts +2 -3
  44. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  45. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  46. package/dist/components/Content/Content.cjs +40 -32
  47. package/dist/components/Content/Content.cjs.map +1 -1
  48. package/dist/components/Content/Content.d.cts.map +1 -1
  49. package/dist/components/Content/Content.d.mts.map +1 -1
  50. package/dist/components/Content/Content.mjs +40 -32
  51. package/dist/components/Content/Content.mjs.map +1 -1
  52. package/dist/components/HeaderRoot/HeaderRoot.cjs +8 -5
  53. package/dist/components/HeaderRoot/HeaderRoot.cjs.map +1 -1
  54. package/dist/components/HeaderRoot/HeaderRoot.d.cts.map +1 -1
  55. package/dist/components/HeaderRoot/HeaderRoot.d.mts.map +1 -1
  56. package/dist/components/HeaderRoot/HeaderRoot.mjs +8 -5
  57. package/dist/components/HeaderRoot/HeaderRoot.mjs.map +1 -1
  58. package/dist/components/KeyValueColumn/KeyValueColumn.cjs +21 -12
  59. package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -1
  60. package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -1
  61. package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -1
  62. package/dist/components/KeyValueColumn/KeyValueColumn.mjs +22 -13
  63. package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -1
  64. package/dist/components/KeyValueRow/KeyValueRow.cjs +19 -10
  65. package/dist/components/KeyValueRow/KeyValueRow.cjs.map +1 -1
  66. package/dist/components/KeyValueRow/KeyValueRow.d.cts.map +1 -1
  67. package/dist/components/KeyValueRow/KeyValueRow.d.mts.map +1 -1
  68. package/dist/components/KeyValueRow/KeyValueRow.mjs +20 -11
  69. package/dist/components/KeyValueRow/KeyValueRow.mjs.map +1 -1
  70. package/dist/components/ListItem/ListItem.cjs +4 -3
  71. package/dist/components/ListItem/ListItem.cjs.map +1 -1
  72. package/dist/components/ListItem/ListItem.d.cts.map +1 -1
  73. package/dist/components/ListItem/ListItem.d.mts.map +1 -1
  74. package/dist/components/ListItem/ListItem.mjs +5 -4
  75. package/dist/components/ListItem/ListItem.mjs.map +1 -1
  76. package/dist/components/SectionHeader/SectionHeader.cjs +17 -10
  77. package/dist/components/SectionHeader/SectionHeader.cjs.map +1 -1
  78. package/dist/components/SectionHeader/SectionHeader.d.cts +2 -2
  79. package/dist/components/SectionHeader/SectionHeader.d.cts.map +1 -1
  80. package/dist/components/SectionHeader/SectionHeader.d.mts +2 -2
  81. package/dist/components/SectionHeader/SectionHeader.d.mts.map +1 -1
  82. package/dist/components/SectionHeader/SectionHeader.mjs +18 -11
  83. package/dist/components/SectionHeader/SectionHeader.mjs.map +1 -1
  84. package/dist/components/SectionHeader/SectionHeader.types.cjs.map +1 -1
  85. package/dist/components/SectionHeader/SectionHeader.types.d.cts +5 -5
  86. package/dist/components/SectionHeader/SectionHeader.types.d.cts.map +1 -1
  87. package/dist/components/SectionHeader/SectionHeader.types.d.mts +5 -5
  88. package/dist/components/SectionHeader/SectionHeader.types.d.mts.map +1 -1
  89. package/dist/components/SectionHeader/SectionHeader.types.mjs.map +1 -1
  90. package/dist/components/Switch/Switch.cjs +4 -2
  91. package/dist/components/Switch/Switch.cjs.map +1 -1
  92. package/dist/components/Switch/Switch.d.cts +1 -1
  93. package/dist/components/Switch/Switch.d.cts.map +1 -1
  94. package/dist/components/Switch/Switch.d.mts +1 -1
  95. package/dist/components/Switch/Switch.d.mts.map +1 -1
  96. package/dist/components/Switch/Switch.mjs +4 -2
  97. package/dist/components/Switch/Switch.mjs.map +1 -1
  98. package/dist/components/Tag/Tag.cjs +12 -18
  99. package/dist/components/Tag/Tag.cjs.map +1 -1
  100. package/dist/components/Tag/Tag.d.cts.map +1 -1
  101. package/dist/components/Tag/Tag.d.mts.map +1 -1
  102. package/dist/components/Tag/Tag.mjs +13 -19
  103. package/dist/components/Tag/Tag.mjs.map +1 -1
  104. package/dist/components/TitleAlert/TitleAlert.cjs +20 -18
  105. package/dist/components/TitleAlert/TitleAlert.cjs.map +1 -1
  106. package/dist/components/TitleAlert/TitleAlert.d.cts +3 -3
  107. package/dist/components/TitleAlert/TitleAlert.d.cts.map +1 -1
  108. package/dist/components/TitleAlert/TitleAlert.d.mts +3 -3
  109. package/dist/components/TitleAlert/TitleAlert.d.mts.map +1 -1
  110. package/dist/components/TitleAlert/TitleAlert.mjs +21 -19
  111. package/dist/components/TitleAlert/TitleAlert.mjs.map +1 -1
  112. package/dist/components/TitleAlert/TitleAlert.types.cjs.map +1 -1
  113. package/dist/components/TitleAlert/TitleAlert.types.d.cts +6 -7
  114. package/dist/components/TitleAlert/TitleAlert.types.d.cts.map +1 -1
  115. package/dist/components/TitleAlert/TitleAlert.types.d.mts +6 -7
  116. package/dist/components/TitleAlert/TitleAlert.types.d.mts.map +1 -1
  117. package/dist/components/TitleAlert/TitleAlert.types.mjs.map +1 -1
  118. package/dist/components/TitleHub/TitleHub.cjs +22 -13
  119. package/dist/components/TitleHub/TitleHub.cjs.map +1 -1
  120. package/dist/components/TitleHub/TitleHub.d.cts +3 -3
  121. package/dist/components/TitleHub/TitleHub.d.cts.map +1 -1
  122. package/dist/components/TitleHub/TitleHub.d.mts +3 -3
  123. package/dist/components/TitleHub/TitleHub.d.mts.map +1 -1
  124. package/dist/components/TitleHub/TitleHub.mjs +23 -14
  125. package/dist/components/TitleHub/TitleHub.mjs.map +1 -1
  126. package/dist/components/TitleHub/TitleHub.types.cjs.map +1 -1
  127. package/dist/components/TitleHub/TitleHub.types.d.cts +10 -10
  128. package/dist/components/TitleHub/TitleHub.types.d.cts.map +1 -1
  129. package/dist/components/TitleHub/TitleHub.types.d.mts +10 -10
  130. package/dist/components/TitleHub/TitleHub.types.d.mts.map +1 -1
  131. package/dist/components/TitleHub/TitleHub.types.mjs.map +1 -1
  132. package/dist/components/TitleStandard/TitleStandard.cjs +15 -9
  133. package/dist/components/TitleStandard/TitleStandard.cjs.map +1 -1
  134. package/dist/components/TitleStandard/TitleStandard.d.cts +2 -2
  135. package/dist/components/TitleStandard/TitleStandard.d.cts.map +1 -1
  136. package/dist/components/TitleStandard/TitleStandard.d.mts +2 -2
  137. package/dist/components/TitleStandard/TitleStandard.d.mts.map +1 -1
  138. package/dist/components/TitleStandard/TitleStandard.mjs +16 -10
  139. package/dist/components/TitleStandard/TitleStandard.mjs.map +1 -1
  140. package/dist/components/TitleStandard/TitleStandard.types.cjs.map +1 -1
  141. package/dist/components/TitleStandard/TitleStandard.types.d.cts +7 -7
  142. package/dist/components/TitleStandard/TitleStandard.types.d.cts.map +1 -1
  143. package/dist/components/TitleStandard/TitleStandard.types.d.mts +7 -7
  144. package/dist/components/TitleStandard/TitleStandard.types.d.mts.map +1 -1
  145. package/dist/components/TitleStandard/TitleStandard.types.mjs.map +1 -1
  146. package/dist/components/TitleSubpage/TitleSubpage.cjs +31 -18
  147. package/dist/components/TitleSubpage/TitleSubpage.cjs.map +1 -1
  148. package/dist/components/TitleSubpage/TitleSubpage.d.cts +3 -3
  149. package/dist/components/TitleSubpage/TitleSubpage.d.cts.map +1 -1
  150. package/dist/components/TitleSubpage/TitleSubpage.d.mts +3 -3
  151. package/dist/components/TitleSubpage/TitleSubpage.d.mts.map +1 -1
  152. package/dist/components/TitleSubpage/TitleSubpage.mjs +32 -19
  153. package/dist/components/TitleSubpage/TitleSubpage.mjs.map +1 -1
  154. package/dist/components/TitleSubpage/TitleSubpage.types.cjs.map +1 -1
  155. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts +8 -9
  156. package/dist/components/TitleSubpage/TitleSubpage.types.d.cts.map +1 -1
  157. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts +8 -9
  158. package/dist/components/TitleSubpage/TitleSubpage.types.d.mts.map +1 -1
  159. package/dist/components/TitleSubpage/TitleSubpage.types.mjs.map +1 -1
  160. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs +9 -7
  161. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.cjs.map +1 -1
  162. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.cts.map +1 -1
  163. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.d.mts.map +1 -1
  164. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs +10 -8
  165. package/dist/components/temp-components/HeaderStandardCenterColumn/HeaderStandardCenterColumn.mjs.map +1 -1
  166. package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs +1 -1
  167. package/dist/components/temp-components/TextOrChildren/TextOrChildren.cjs.map +1 -1
  168. package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs +1 -1
  169. package/dist/components/temp-components/TextOrChildren/TextOrChildren.mjs.map +1 -1
  170. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.cjs.map +1 -1
  171. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.cts +1 -1
  172. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.d.mts +1 -1
  173. package/dist/components/temp-components/TextOrChildren/TextOrChildren.types.mjs.map +1 -1
  174. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.56.2]
11
+
12
+ ### Fixed
13
+
14
+ - Fixed `MusdFilled` to use the Phosphor `currency-circle-dollar` fill, so its dollar sign matches `Musd` ([#1677](https://github.com/MetaMask/metamask-design-system/pull/1677))
15
+ - The vertical stroke sits above and below the S, not through it
16
+ - `IconName.MusdFilled` is unchanged
17
+ - Fixed `Slider` so the thumb stays on the track at both ends ([#1582](https://github.com/MetaMask/metamask-design-system/pull/1582))
18
+ - `trackInset` now defaults to `0` instead of `16`
19
+ - Thumb travel is inset by half the thumb size, so the circle no longer hangs off the track at the minimum and maximum
20
+
10
21
  ## [0.56.1]
11
22
 
12
23
  ### Fixed
@@ -935,7 +946,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
935
946
  - Full TypeScript support with type definitions and enums
936
947
  - React Native integration with TWRNC preset support
937
948
 
938
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.56.1...HEAD
949
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.56.2...HEAD
950
+ [0.56.2]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.56.1...@metamask/design-system-react-native@0.56.2
939
951
  [0.56.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.56.0...@metamask/design-system-react-native@0.56.1
940
952
  [0.56.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.55.0...@metamask/design-system-react-native@0.56.0
941
953
  [0.55.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.54.0...@metamask/design-system-react-native@0.55.0
@@ -15,7 +15,7 @@ const BottomSheetFooter = ({ style, twClassName, buttonsAlignment = BottomSheetF
15
15
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
16
16
  const isHorizontal = buttonsAlignment === BottomSheetFooter_types_1.ButtonsAlignment.Horizontal;
17
17
  const buttonBaseClass = isHorizontal ? 'flex-1' : 'self-stretch';
18
- const gapClass = isHorizontal ? 'ml-4' : 'mt-4';
18
+ const gapClass = isHorizontal ? 'ml-2' : 'mt-4';
19
19
  const hasBothButtons = Boolean(primaryButtonProps) && Boolean(secondaryButtonProps);
20
20
  if (!primaryButtonProps && !secondaryButtonProps) {
21
21
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetFooter.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetFooter/BottomSheetFooter.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAoC;AAEpC,yBAAyB;AACzB,gDAAkD;AAIlD,2EAA6D;AAEtD,MAAM,iBAAiB,GAAqC,CAAC,EAClE,KAAK,EACL,WAAW,EACX,gBAAgB,GAAG,0CAAgB,CAAC,UAAU,EAC9C,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,YAAY,GAAG,gBAAgB,KAAK,0CAAgB,CAAC,UAAU,CAAC;IACtE,MAAM,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC;IACjE,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,cAAc,GAClB,OAAO,CAAC,kBAAkB,CAAC,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE/D,IAAI,CAAC,kBAAkB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EACtC,WAAW,EACX,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,oBAAoB,IAAI,CACvB,CAAC,eAAM,CACL,IAAI,oBAAoB,CAAC,CACzB,OAAO,CAAC,CAAC,sBAAa,CAAC,SAAS,CAAC,CACjC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAC/D,CACH,CACD;MAAA,CAAC,kBAAkB,IAAI,CACrB,CAAC,eAAM,CACL,IAAI,kBAAkB,CAAC,CACvB,OAAO,CAAC,CAAC,sBAAa,CAAC,OAAO,CAAC,CAC/B,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,cAAc,IAAI,QAAQ,CAAC;gBACrD,kBAAkB,CAAC,KAAK;aACzB,CAAC,EACF,CACH,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,iBAAiB,qBAkD5B","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\n// External dependencies.\nimport { Button, ButtonVariant } from '../Button';\n\n// Internal dependencies.\nimport type { BottomSheetFooterProps } from './BottomSheetFooter.types';\nimport { ButtonsAlignment } from './BottomSheetFooter.types';\n\nexport const BottomSheetFooter: React.FC<BottomSheetFooterProps> = ({\n style,\n twClassName,\n buttonsAlignment = ButtonsAlignment.Horizontal,\n primaryButtonProps,\n secondaryButtonProps,\n ...props\n}) => {\n const tw = useTailwind();\n const isHorizontal = buttonsAlignment === ButtonsAlignment.Horizontal;\n const buttonBaseClass = isHorizontal ? 'flex-1' : 'self-stretch';\n const gapClass = isHorizontal ? 'ml-4' : 'mt-4';\n const hasBothButtons =\n Boolean(primaryButtonProps) && Boolean(secondaryButtonProps);\n\n if (!primaryButtonProps && !secondaryButtonProps) {\n return null;\n }\n\n return (\n <View\n style={[\n tw.style(\n isHorizontal ? 'flex-row' : 'flex-col',\n 'px-4 py-0',\n twClassName,\n ),\n style,\n ]}\n {...props}\n >\n {secondaryButtonProps && (\n <Button\n {...secondaryButtonProps}\n variant={ButtonVariant.Secondary}\n style={[tw.style(buttonBaseClass), secondaryButtonProps.style]}\n />\n )}\n {primaryButtonProps && (\n <Button\n {...primaryButtonProps}\n variant={ButtonVariant.Primary}\n style={[\n tw.style(buttonBaseClass, hasBothButtons && gapClass),\n primaryButtonProps.style,\n ]}\n />\n )}\n </View>\n );\n};\n"]}
1
+ {"version":3,"file":"BottomSheetFooter.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetFooter/BottomSheetFooter.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,8FAA4E;AAC5E,kDAA0B;AAC1B,+CAAoC;AAEpC,yBAAyB;AACzB,gDAAkD;AAIlD,2EAA6D;AAEtD,MAAM,iBAAiB,GAAqC,CAAC,EAClE,KAAK,EACL,WAAW,EACX,gBAAgB,GAAG,0CAAgB,CAAC,UAAU,EAC9C,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,YAAY,GAAG,gBAAgB,KAAK,0CAAgB,CAAC,UAAU,CAAC;IACtE,MAAM,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC;IACjE,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,cAAc,GAClB,OAAO,CAAC,kBAAkB,CAAC,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE/D,IAAI,CAAC,kBAAkB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EACtC,WAAW,EACX,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,oBAAoB,IAAI,CACvB,CAAC,eAAM,CACL,IAAI,oBAAoB,CAAC,CACzB,OAAO,CAAC,CAAC,sBAAa,CAAC,SAAS,CAAC,CACjC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAC/D,CACH,CACD;MAAA,CAAC,kBAAkB,IAAI,CACrB,CAAC,eAAM,CACL,IAAI,kBAAkB,CAAC,CACvB,OAAO,CAAC,CAAC,sBAAa,CAAC,OAAO,CAAC,CAC/B,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,cAAc,IAAI,QAAQ,CAAC;gBACrD,kBAAkB,CAAC,KAAK;aACzB,CAAC,EACF,CACH,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAlDW,QAAA,iBAAiB,qBAkD5B","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\n// External dependencies.\nimport { Button, ButtonVariant } from '../Button';\n\n// Internal dependencies.\nimport type { BottomSheetFooterProps } from './BottomSheetFooter.types';\nimport { ButtonsAlignment } from './BottomSheetFooter.types';\n\nexport const BottomSheetFooter: React.FC<BottomSheetFooterProps> = ({\n style,\n twClassName,\n buttonsAlignment = ButtonsAlignment.Horizontal,\n primaryButtonProps,\n secondaryButtonProps,\n ...props\n}) => {\n const tw = useTailwind();\n const isHorizontal = buttonsAlignment === ButtonsAlignment.Horizontal;\n const buttonBaseClass = isHorizontal ? 'flex-1' : 'self-stretch';\n const gapClass = isHorizontal ? 'ml-2' : 'mt-4';\n const hasBothButtons =\n Boolean(primaryButtonProps) && Boolean(secondaryButtonProps);\n\n if (!primaryButtonProps && !secondaryButtonProps) {\n return null;\n }\n\n return (\n <View\n style={[\n tw.style(\n isHorizontal ? 'flex-row' : 'flex-col',\n 'px-4 py-0',\n twClassName,\n ),\n style,\n ]}\n {...props}\n >\n {secondaryButtonProps && (\n <Button\n {...secondaryButtonProps}\n variant={ButtonVariant.Secondary}\n style={[tw.style(buttonBaseClass), secondaryButtonProps.style]}\n />\n )}\n {primaryButtonProps && (\n <Button\n {...primaryButtonProps}\n variant={ButtonVariant.Primary}\n style={[\n tw.style(buttonBaseClass, hasBothButtons && gapClass),\n primaryButtonProps.style,\n ]}\n />\n )}\n </View>\n );\n};\n"]}
@@ -16,7 +16,7 @@ export const BottomSheetFooter = ({ style, twClassName, buttonsAlignment = Butto
16
16
  const tw = useTailwind();
17
17
  const isHorizontal = buttonsAlignment === ButtonsAlignment.Horizontal;
18
18
  const buttonBaseClass = isHorizontal ? 'flex-1' : 'self-stretch';
19
- const gapClass = isHorizontal ? 'ml-4' : 'mt-4';
19
+ const gapClass = isHorizontal ? 'ml-2' : 'mt-4';
20
20
  const hasBothButtons = Boolean(primaryButtonProps) && Boolean(secondaryButtonProps);
21
21
  if (!primaryButtonProps && !secondaryButtonProps) {
22
22
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetFooter.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetFooter/BottomSheetFooter.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B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C,eAAe,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAC/D,CACH,CACD;MAAA,CAAC,kBAAkB,IAAI,CACrB,CAAC,MAAM,CACL,IAAI,kBAAkB,CAAC,CACvB,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,cAAc,IAAI,QAAQ,CAAC;gBACrD,kBAAkB,CAAC,KAAK;aACzB,CAAC,EACF,CACH,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\n// External dependencies.\nimport { Button, ButtonVariant } from '../Button';\n\n// Internal dependencies.\nimport type { BottomSheetFooterProps } from './BottomSheetFooter.types';\nimport { ButtonsAlignment } from './BottomSheetFooter.types';\n\nexport const BottomSheetFooter: React.FC<BottomSheetFooterProps> = ({\n style,\n twClassName,\n buttonsAlignment = ButtonsAlignment.Horizontal,\n primaryButtonProps,\n secondaryButtonProps,\n ...props\n}) => {\n const tw = useTailwind();\n const isHorizontal = buttonsAlignment === ButtonsAlignment.Horizontal;\n const buttonBaseClass = isHorizontal ? 'flex-1' : 'self-stretch';\n const gapClass = isHorizontal ? 'ml-4' : 'mt-4';\n const hasBothButtons =\n Boolean(primaryButtonProps) && Boolean(secondaryButtonProps);\n\n if (!primaryButtonProps && !secondaryButtonProps) {\n return null;\n }\n\n return (\n <View\n style={[\n tw.style(\n isHorizontal ? 'flex-row' : 'flex-col',\n 'px-4 py-0',\n twClassName,\n ),\n style,\n ]}\n {...props}\n >\n {secondaryButtonProps && (\n <Button\n {...secondaryButtonProps}\n variant={ButtonVariant.Secondary}\n style={[tw.style(buttonBaseClass), secondaryButtonProps.style]}\n />\n )}\n {primaryButtonProps && (\n <Button\n {...primaryButtonProps}\n variant={ButtonVariant.Primary}\n style={[\n tw.style(buttonBaseClass, hasBothButtons && gapClass),\n primaryButtonProps.style,\n ]}\n />\n )}\n </View>\n );\n};\n"]}
1
+ {"version":3,"file":"BottomSheetFooter.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetFooter/BottomSheetFooter.tsx"],"names":[],"mappings":";;;;;;AAAA,4BAA4B;AAC5B,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,MAAK,cAAc;;AAC1B,OAAO,EAAE,IAAI,EAAE,qBAAqB;AAEpC,yBAAyB;AACzB,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,4BAAkB;AAIlD,OAAO,EAAE,gBAAgB,EAAE,sCAAkC;AAE7D,MAAM,CAAC,MAAM,iBAAiB,GAAqC,CAAC,EAClE,KAAK,EACL,WAAW,EACX,gBAAgB,GAAG,gBAAgB,CAAC,UAAU,EAC9C,kBAAkB,EAClB,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,YAAY,GAAG,gBAAgB,KAAK,gBAAgB,CAAC,UAAU,CAAC;IACtE,MAAM,eAAe,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC;IACjE,MAAM,QAAQ,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IAChD,MAAM,cAAc,GAClB,OAAO,CAAC,kBAAkB,CAAC,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE/D,IAAI,CAAC,kBAAkB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACjD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,CAAC,IAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CACN,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EACtC,WAAW,EACX,WAAW,CACZ;YACD,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,oBAAoB,IAAI,CACvB,CAAC,MAAM,CACL,IAAI,oBAAoB,CAAC,CACzB,OAAO,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,CACjC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC,EAC/D,CACH,CACD;MAAA,CAAC,kBAAkB,IAAI,CACrB,CAAC,MAAM,CACL,IAAI,kBAAkB,CAAC,CACvB,OAAO,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAC/B,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,eAAe,EAAE,cAAc,IAAI,QAAQ,CAAC;gBACrD,kBAAkB,CAAC,KAAK;aACzB,CAAC,EACF,CACH,CACH;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Third party dependencies.\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React from 'react';\nimport { View } from 'react-native';\n\n// External dependencies.\nimport { Button, ButtonVariant } from '../Button';\n\n// Internal dependencies.\nimport type { BottomSheetFooterProps } from './BottomSheetFooter.types';\nimport { ButtonsAlignment } from './BottomSheetFooter.types';\n\nexport const BottomSheetFooter: React.FC<BottomSheetFooterProps> = ({\n style,\n twClassName,\n buttonsAlignment = ButtonsAlignment.Horizontal,\n primaryButtonProps,\n secondaryButtonProps,\n ...props\n}) => {\n const tw = useTailwind();\n const isHorizontal = buttonsAlignment === ButtonsAlignment.Horizontal;\n const buttonBaseClass = isHorizontal ? 'flex-1' : 'self-stretch';\n const gapClass = isHorizontal ? 'ml-2' : 'mt-4';\n const hasBothButtons =\n Boolean(primaryButtonProps) && Boolean(secondaryButtonProps);\n\n if (!primaryButtonProps && !secondaryButtonProps) {\n return null;\n }\n\n return (\n <View\n style={[\n tw.style(\n isHorizontal ? 'flex-row' : 'flex-col',\n 'px-4 py-0',\n twClassName,\n ),\n style,\n ]}\n {...props}\n >\n {secondaryButtonProps && (\n <Button\n {...secondaryButtonProps}\n variant={ButtonVariant.Secondary}\n style={[tw.style(buttonBaseClass), secondaryButtonProps.style]}\n />\n )}\n {primaryButtonProps && (\n <Button\n {...primaryButtonProps}\n variant={ButtonVariant.Primary}\n style={[\n tw.style(buttonBaseClass, hasBothButtons && gapClass),\n primaryButtonProps.style,\n ]}\n />\n )}\n </View>\n );\n};\n"]}
@@ -8,6 +8,19 @@ const design_system_shared_1 = require("@metamask-previews/design-system-shared"
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const Box_1 = require("../Box/index.cjs");
10
10
  const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
11
+ /**
12
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Column}` instead, render accessories as sibling
13
+ * children, and wrap string content with `Text`. This component will be removed in a future major version of the
14
+ * design system. See MIGRATION.md.
15
+ *
16
+ * @param props - Component props.
17
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
18
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
19
+ * @param props.topAccessory - Node rendered above `children`.
20
+ * @param props.bottomAccessory - Node rendered below `children`.
21
+ * @param props.twClassName - Tailwind classes on the root `Box`.
22
+ * @returns The rendered column.
23
+ */
11
24
  const BoxColumn = ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }) => (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Column} twClassName={twClassName} {...rest}>
12
25
  {topAccessory}
13
26
  <TextOrChildren_1.TextOrChildren textProps={textProps}>{children}</TextOrChildren_1.TextOrChildren>
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.cjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAA2E;AAC3E,kDAA0B;AAE1B,0CAA6B;AAC7B,gFAAmE;AAI5D,MAAM,SAAS,GAAG,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,YAAY,CACb;IAAA,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,+BAAc,CAChE;IAAA,CAAC,eAAe,CAClB;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AAjBW,QAAA,SAAS,aAiBpB;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { BoxFlexDirection } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxColumnProps } from './BoxColumn.types';\n\nexport const BoxColumn = ({\n children,\n textProps,\n topAccessory,\n bottomAccessory,\n twClassName,\n ...rest\n}: BoxColumnProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...rest}\n >\n {topAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {bottomAccessory}\n </Box>\n);\n\nBoxColumn.displayName = 'BoxColumn';\n"]}
1
+ {"version":3,"file":"BoxColumn.cjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAA2E;AAC3E,kDAA0B;AAE1B,0CAA6B;AAC7B,gFAAmE;AAInE;;;;;;;;;;;;GAYG;AACI,MAAM,SAAS,GAAG,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,YAAY,CACb;IAAA,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,+BAAc,CAChE;IAAA,CAAC,eAAe,CAClB;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AAjBW,QAAA,SAAS,aAiBpB;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { BoxFlexDirection } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxColumnProps } from './BoxColumn.types';\n\n/**\n * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Column}` instead, render accessories as sibling\n * children, and wrap string content with `Text`. This component will be removed in a future major version of the\n * design system. See MIGRATION.md.\n *\n * @param props - Component props.\n * @param props.children - Main content; strings are wrapped in `SensitiveText`.\n * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.\n * @param props.topAccessory - Node rendered above `children`.\n * @param props.bottomAccessory - Node rendered below `children`.\n * @param props.twClassName - Tailwind classes on the root `Box`.\n * @returns The rendered column.\n */\nexport const BoxColumn = ({\n children,\n textProps,\n topAccessory,\n bottomAccessory,\n twClassName,\n ...rest\n}: BoxColumnProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...rest}\n >\n {topAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {bottomAccessory}\n </Box>\n);\n\nBoxColumn.displayName = 'BoxColumn';\n"]}
@@ -1,5 +1,18 @@
1
1
  import React from "react";
2
2
  import type { BoxColumnProps } from "./BoxColumn.types.cjs";
3
+ /**
4
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Column}` instead, render accessories as sibling
5
+ * children, and wrap string content with `Text`. This component will be removed in a future major version of the
6
+ * design system. See MIGRATION.md.
7
+ *
8
+ * @param props - Component props.
9
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
10
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
11
+ * @param props.topAccessory - Node rendered above `children`.
12
+ * @param props.bottomAccessory - Node rendered below `children`.
13
+ * @param props.twClassName - Tailwind classes on the root `Box`.
14
+ * @returns The rendered column.
15
+ */
3
16
  export declare const BoxColumn: {
4
17
  ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }: BoxColumnProps): React.JSX.Element;
5
18
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.d.cts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS;mFAOnB,cAAc;;CAUhB,CAAC"}
1
+ {"version":3,"file":"BoxColumn.d.cts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS;mFAOnB,cAAc;;CAUhB,CAAC"}
@@ -1,5 +1,18 @@
1
1
  import React from "react";
2
2
  import type { BoxColumnProps } from "./BoxColumn.types.mjs";
3
+ /**
4
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Column}` instead, render accessories as sibling
5
+ * children, and wrap string content with `Text`. This component will be removed in a future major version of the
6
+ * design system. See MIGRATION.md.
7
+ *
8
+ * @param props - Component props.
9
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
10
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
11
+ * @param props.topAccessory - Node rendered above `children`.
12
+ * @param props.bottomAccessory - Node rendered below `children`.
13
+ * @param props.twClassName - Tailwind classes on the root `Box`.
14
+ * @returns The rendered column.
15
+ */
3
16
  export declare const BoxColumn: {
4
17
  ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }: BoxColumnProps): React.JSX.Element;
5
18
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.d.mts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS;mFAOnB,cAAc;;CAUhB,CAAC"}
1
+ {"version":3,"file":"BoxColumn.d.mts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,SAAS;mFAOnB,cAAc;;CAUhB,CAAC"}
@@ -9,6 +9,19 @@ import $React from "react";
9
9
  const React = $importDefault($React);
10
10
  import { Box } from "../Box/index.mjs";
11
11
  import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
12
+ /**
13
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Column}` instead, render accessories as sibling
14
+ * children, and wrap string content with `Text`. This component will be removed in a future major version of the
15
+ * design system. See MIGRATION.md.
16
+ *
17
+ * @param props - Component props.
18
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
19
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
20
+ * @param props.topAccessory - Node rendered above `children`.
21
+ * @param props.bottomAccessory - Node rendered below `children`.
22
+ * @param props.twClassName - Tailwind classes on the root `Box`.
23
+ * @returns The rendered column.
24
+ */
12
25
  export const BoxColumn = ({ children, textProps, topAccessory, bottomAccessory, twClassName, ...rest }) => (<Box flexDirection={BoxFlexDirection.Column} twClassName={twClassName} {...rest}>
13
26
  {topAccessory}
14
27
  <TextOrChildren textProps={textProps}>{children}</TextOrChildren>
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.mjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,YAAY,CACb;IAAA,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAChE;IAAA,CAAC,eAAe,CAClB;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { BoxFlexDirection } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxColumnProps } from './BoxColumn.types';\n\nexport const BoxColumn = ({\n children,\n textProps,\n topAccessory,\n bottomAccessory,\n twClassName,\n ...rest\n}: BoxColumnProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...rest}\n >\n {topAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {bottomAccessory}\n </Box>\n);\n\nBoxColumn.displayName = 'BoxColumn';\n"]}
1
+ {"version":3,"file":"BoxColumn.mjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,gBAAgB,EAAE,gDAAgD;AAC3E,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,eAAe,EACf,WAAW,EACX,GAAG,IAAI,EACQ,EAAE,EAAE,CAAC,CACpB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CACvC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,YAAY,CACb;IAAA,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAChE;IAAA,CAAC,eAAe,CAClB;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { BoxFlexDirection } from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxColumnProps } from './BoxColumn.types';\n\n/**\n * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Column}` instead, render accessories as sibling\n * children, and wrap string content with `Text`. This component will be removed in a future major version of the\n * design system. See MIGRATION.md.\n *\n * @param props - Component props.\n * @param props.children - Main content; strings are wrapped in `SensitiveText`.\n * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.\n * @param props.topAccessory - Node rendered above `children`.\n * @param props.bottomAccessory - Node rendered below `children`.\n * @param props.twClassName - Tailwind classes on the root `Box`.\n * @returns The rendered column.\n */\nexport const BoxColumn = ({\n children,\n textProps,\n topAccessory,\n bottomAccessory,\n twClassName,\n ...rest\n}: BoxColumnProps) => (\n <Box\n flexDirection={BoxFlexDirection.Column}\n twClassName={twClassName}\n {...rest}\n >\n {topAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {bottomAccessory}\n </Box>\n);\n\nBoxColumn.displayName = 'BoxColumn';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.cjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxColumnPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text';\n\n/**\n * BoxColumn component props.\n */\nexport type BoxColumnProps = BoxColumnPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `Text` when `children` is a string.\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n };\n"]}
1
+ {"version":3,"file":"BoxColumn.types.cjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxColumnPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text';\n\n/**\n * BoxColumn component props.\n *\n * @deprecated Use `BoxProps` instead. `BoxColumn` will be removed in a future major version.\n */\nexport type BoxColumnProps = BoxColumnPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `Text` when `children` is a string.\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n };\n"]}
@@ -3,6 +3,8 @@ import type { BoxProps } from "../Box/Box.types.cjs";
3
3
  import type { TextProps } from "../Text/index.cjs";
4
4
  /**
5
5
  * BoxColumn component props.
6
+ *
7
+ * @deprecated Use `BoxProps` instead. `BoxColumn` will be removed in a future major version.
6
8
  */
7
9
  export type BoxColumnProps = BoxColumnPropsShared & Omit<BoxProps, 'children' | 'flexDirection'> & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.d.cts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gDAAgD;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
1
+ {"version":3,"file":"BoxColumn.types.d.cts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gDAAgD;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
@@ -3,6 +3,8 @@ import type { BoxProps } from "../Box/Box.types.mjs";
3
3
  import type { TextProps } from "../Text/index.mjs";
4
4
  /**
5
5
  * BoxColumn component props.
6
+ *
7
+ * @deprecated Use `BoxProps` instead. `BoxColumn` will be removed in a future major version.
6
8
  */
7
9
  export type BoxColumnProps = BoxColumnPropsShared & Omit<BoxProps, 'children' | 'flexDirection'> & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.d.mts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gDAAgD;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
1
+ {"version":3,"file":"BoxColumn.types.d.mts","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,gDAAgD;AAEpF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;CAClD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxColumn.types.mjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxColumnPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text';\n\n/**\n * BoxColumn component props.\n */\nexport type BoxColumnProps = BoxColumnPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `Text` when `children` is a string.\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n };\n"]}
1
+ {"version":3,"file":"BoxColumn.types.mjs","sourceRoot":"","sources":["../../../src/components/BoxColumn/BoxColumn.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxColumnPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text';\n\n/**\n * BoxColumn component props.\n *\n * @deprecated Use `BoxProps` instead. `BoxColumn` will be removed in a future major version.\n */\nexport type BoxColumnProps = BoxColumnPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `Text` when `children` is a string.\n */\n textProps?: Omit<Partial<TextProps>, 'children'>;\n };\n"]}
@@ -8,6 +8,19 @@ const design_system_shared_1 = require("@metamask-previews/design-system-shared"
8
8
  const react_1 = __importDefault(require("react"));
9
9
  const Box_1 = require("../Box/index.cjs");
10
10
  const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
11
+ /**
12
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Row}`, `alignItems={BoxAlignItems.Center}`, and `gap={1}`
13
+ * instead, render accessories as sibling children, and wrap string content with `Text`. This component will be
14
+ * removed in a future major version of the design system. See MIGRATION.md.
15
+ *
16
+ * @param props - Component props.
17
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
18
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
19
+ * @param props.startAccessory - Node rendered before `children`.
20
+ * @param props.endAccessory - Node rendered after `children`.
21
+ * @param props.twClassName - Tailwind classes on the root `Box`.
22
+ * @returns The rendered row.
23
+ */
11
24
  const BoxRow = ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }) => (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={1} twClassName={twClassName} {...rest}>
12
25
  {startAccessory}
13
26
  <TextOrChildren_1.TextOrChildren textProps={textProps}>{children}</TextOrChildren_1.TextOrChildren>
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAGiD;AACjD,kDAA0B;AAE1B,0CAA6B;AAC7B,gFAAmE;AAI5D,MAAM,MAAM,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,GAAG,IAAI,EACK,EAAE,EAAE,CAAC,CACjB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,cAAc,CACf;IAAA,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,+BAAc,CAChE;IAAA,CAAC,YAAY,CACf;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AAnBW,QAAA,MAAM,UAmBjB;AAEF,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxRowProps } from './BoxRow.types';\n\nexport const BoxRow = ({\n children,\n textProps,\n startAccessory,\n endAccessory,\n twClassName,\n ...rest\n}: BoxRowProps) => (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName={twClassName}\n {...rest}\n >\n {startAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {endAccessory}\n </Box>\n);\n\nBoxRow.displayName = 'BoxRow';\n"]}
1
+ {"version":3,"file":"BoxRow.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAGiD;AACjD,kDAA0B;AAE1B,0CAA6B;AAC7B,gFAAmE;AAInE;;;;;;;;;;;;GAYG;AACI,MAAM,MAAM,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,GAAG,IAAI,EACK,EAAE,EAAE,CAAC,CACjB,CAAC,SAAG,CACF,aAAa,CAAC,CAAC,uCAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,oCAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,cAAc,CACf;IAAA,CAAC,+BAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,+BAAc,CAChE;IAAA,CAAC,YAAY,CACf;EAAA,EAAE,SAAG,CAAC,CACP,CAAC;AAnBW,QAAA,MAAM,UAmBjB;AAEF,cAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxRowProps } from './BoxRow.types';\n\n/**\n * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Row}`, `alignItems={BoxAlignItems.Center}`, and `gap={1}`\n * instead, render accessories as sibling children, and wrap string content with `Text`. This component will be\n * removed in a future major version of the design system. See MIGRATION.md.\n *\n * @param props - Component props.\n * @param props.children - Main content; strings are wrapped in `SensitiveText`.\n * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.\n * @param props.startAccessory - Node rendered before `children`.\n * @param props.endAccessory - Node rendered after `children`.\n * @param props.twClassName - Tailwind classes on the root `Box`.\n * @returns The rendered row.\n */\nexport const BoxRow = ({\n children,\n textProps,\n startAccessory,\n endAccessory,\n twClassName,\n ...rest\n}: BoxRowProps) => (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName={twClassName}\n {...rest}\n >\n {startAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {endAccessory}\n </Box>\n);\n\nBoxRow.displayName = 'BoxRow';\n"]}
@@ -1,5 +1,18 @@
1
1
  import React from "react";
2
2
  import type { BoxRowProps } from "./BoxRow.types.cjs";
3
+ /**
4
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Row}`, `alignItems={BoxAlignItems.Center}`, and `gap={1}`
5
+ * instead, render accessories as sibling children, and wrap string content with `Text`. This component will be
6
+ * removed in a future major version of the design system. See MIGRATION.md.
7
+ *
8
+ * @param props - Component props.
9
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
10
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
11
+ * @param props.startAccessory - Node rendered before `children`.
12
+ * @param props.endAccessory - Node rendered after `children`.
13
+ * @param props.twClassName - Tailwind classes on the root `Box`.
14
+ * @returns The rendered row.
15
+ */
3
16
  export declare const BoxRow: {
4
17
  ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }: BoxRowProps): React.JSX.Element;
5
18
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAElD,eAAO,MAAM,MAAM;kFAOhB,WAAW;;CAYb,CAAC"}
1
+ {"version":3,"file":"BoxRow.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAElD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM;kFAOhB,WAAW;;CAYb,CAAC"}
@@ -1,5 +1,18 @@
1
1
  import React from "react";
2
2
  import type { BoxRowProps } from "./BoxRow.types.mjs";
3
+ /**
4
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Row}`, `alignItems={BoxAlignItems.Center}`, and `gap={1}`
5
+ * instead, render accessories as sibling children, and wrap string content with `Text`. This component will be
6
+ * removed in a future major version of the design system. See MIGRATION.md.
7
+ *
8
+ * @param props - Component props.
9
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
10
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
11
+ * @param props.startAccessory - Node rendered before `children`.
12
+ * @param props.endAccessory - Node rendered after `children`.
13
+ * @param props.twClassName - Tailwind classes on the root `Box`.
14
+ * @returns The rendered row.
15
+ */
3
16
  export declare const BoxRow: {
4
17
  ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }: BoxRowProps): React.JSX.Element;
5
18
  displayName: string;
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAElD,eAAO,MAAM,MAAM;kFAOhB,WAAW;;CAYb,CAAC"}
1
+ {"version":3,"file":"BoxRow.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,WAAW,EAAE,2BAAuB;AAElD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,MAAM;kFAOhB,WAAW;;CAYb,CAAC"}
@@ -9,6 +9,19 @@ import $React from "react";
9
9
  const React = $importDefault($React);
10
10
  import { Box } from "../Box/index.mjs";
11
11
  import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
12
+ /**
13
+ * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Row}`, `alignItems={BoxAlignItems.Center}`, and `gap={1}`
14
+ * instead, render accessories as sibling children, and wrap string content with `Text`. This component will be
15
+ * removed in a future major version of the design system. See MIGRATION.md.
16
+ *
17
+ * @param props - Component props.
18
+ * @param props.children - Main content; strings are wrapped in `SensitiveText`.
19
+ * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.
20
+ * @param props.startAccessory - Node rendered before `children`.
21
+ * @param props.endAccessory - Node rendered after `children`.
22
+ * @param props.twClassName - Tailwind classes on the root `Box`.
23
+ * @returns The rendered row.
24
+ */
12
25
  export const BoxRow = ({ children, textProps, startAccessory, endAccessory, twClassName, ...rest }) => (<Box flexDirection={BoxFlexDirection.Row} alignItems={BoxAlignItems.Center} gap={1} twClassName={twClassName} {...rest}>
13
26
  {startAccessory}
14
27
  <TextOrChildren textProps={textProps}>{children}</TextOrChildren>
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EACjB,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,GAAG,IAAI,EACK,EAAE,EAAE,CAAC,CACjB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,cAAc,CACf;IAAA,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAChE;IAAA,CAAC,YAAY,CACf;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxRowProps } from './BoxRow.types';\n\nexport const BoxRow = ({\n children,\n textProps,\n startAccessory,\n endAccessory,\n twClassName,\n ...rest\n}: BoxRowProps) => (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName={twClassName}\n {...rest}\n >\n {startAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {endAccessory}\n </Box>\n);\n\nBoxRow.displayName = 'BoxRow';\n"]}
1
+ {"version":3,"file":"BoxRow.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EACjB,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAInE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,QAAQ,EACR,SAAS,EACT,cAAc,EACd,YAAY,EACZ,WAAW,EACX,GAAG,IAAI,EACK,EAAE,EAAE,CAAC,CACjB,CAAC,GAAG,CACF,aAAa,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CACpC,UAAU,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CACjC,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,IAAI,CAAC,CAET;IAAA,CAAC,cAAc,CACf;IAAA,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,cAAc,CAChE;IAAA,CAAC,YAAY,CACf;EAAA,EAAE,GAAG,CAAC,CACP,CAAC;AAEF,MAAM,CAAC,WAAW,GAAG,QAAQ,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { BoxRowProps } from './BoxRow.types';\n\n/**\n * @deprecated Use `Box` with `flexDirection={BoxFlexDirection.Row}`, `alignItems={BoxAlignItems.Center}`, and `gap={1}`\n * instead, render accessories as sibling children, and wrap string content with `Text`. This component will be\n * removed in a future major version of the design system. See MIGRATION.md.\n *\n * @param props - Component props.\n * @param props.children - Main content; strings are wrapped in `SensitiveText`.\n * @param props.textProps - Props passed to `SensitiveText` when `children` is a string.\n * @param props.startAccessory - Node rendered before `children`.\n * @param props.endAccessory - Node rendered after `children`.\n * @param props.twClassName - Tailwind classes on the root `Box`.\n * @returns The rendered row.\n */\nexport const BoxRow = ({\n children,\n textProps,\n startAccessory,\n endAccessory,\n twClassName,\n ...rest\n}: BoxRowProps) => (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n twClassName={twClassName}\n {...rest}\n >\n {startAccessory}\n <TextOrChildren textProps={textProps}>{children}</TextOrChildren>\n {endAccessory}\n </Box>\n);\n\nBoxRow.displayName = 'BoxRow';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxRowPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { SensitiveTextProps } from '../SensitiveText';\n\n/**\n * BoxRow component props.\n */\nexport type BoxRowProps = BoxRowPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `SensitiveText` when `children` is a string.\n * Supports Text props plus `isHidden` / `length`.\n */\n textProps?: Partial<Omit<SensitiveTextProps, 'children'>>;\n };\n"]}
1
+ {"version":3,"file":"BoxRow.types.cjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxRowPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { SensitiveTextProps } from '../SensitiveText';\n\n/**\n * BoxRow component props.\n *\n * @deprecated Use `BoxProps` instead. `BoxRow` will be removed in a future major version.\n */\nexport type BoxRowProps = BoxRowPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `SensitiveText` when `children` is a string.\n * Supports Text props plus `isHidden` / `length`.\n */\n textProps?: Partial<Omit<SensitiveTextProps, 'children'>>;\n };\n"]}
@@ -3,6 +3,8 @@ import type { BoxProps } from "../Box/Box.types.cjs";
3
3
  import type { SensitiveTextProps } from "../SensitiveText/index.cjs";
4
4
  /**
5
5
  * BoxRow component props.
6
+ *
7
+ * @deprecated Use `BoxProps` instead. `BoxRow` will be removed in a future major version.
6
8
  */
7
9
  export type BoxRowProps = BoxRowPropsShared & Omit<BoxProps, 'children' | 'flexDirection'> & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AAEjF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAAyB;AAE3D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;CAC3D,CAAC"}
1
+ {"version":3,"file":"BoxRow.types.d.cts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AAEjF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAAyB;AAE3D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;CAC3D,CAAC"}
@@ -3,6 +3,8 @@ import type { BoxProps } from "../Box/Box.types.mjs";
3
3
  import type { SensitiveTextProps } from "../SensitiveText/index.mjs";
4
4
  /**
5
5
  * BoxRow component props.
6
+ *
7
+ * @deprecated Use `BoxProps` instead. `BoxRow` will be removed in a future major version.
6
8
  */
7
9
  export type BoxRowProps = BoxRowPropsShared & Omit<BoxProps, 'children' | 'flexDirection'> & {
8
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AAEjF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAAyB;AAE3D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;CAC3D,CAAC"}
1
+ {"version":3,"file":"BoxRow.types.d.mts","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,gDAAgD;AAEjF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,kBAAkB,EAAE,mCAAyB;AAE3D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,iBAAiB,GACzC,IAAI,CAAC,QAAQ,EAAE,UAAU,GAAG,eAAe,CAAC,GAAG;IAC7C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC;CAC3D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BoxRow.types.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxRowPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { SensitiveTextProps } from '../SensitiveText';\n\n/**\n * BoxRow component props.\n */\nexport type BoxRowProps = BoxRowPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `SensitiveText` when `children` is a string.\n * Supports Text props plus `isHidden` / `length`.\n */\n textProps?: Partial<Omit<SensitiveTextProps, 'children'>>;\n };\n"]}
1
+ {"version":3,"file":"BoxRow.types.mjs","sourceRoot":"","sources":["../../../src/components/BoxRow/BoxRow.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxRowPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { SensitiveTextProps } from '../SensitiveText';\n\n/**\n * BoxRow component props.\n *\n * @deprecated Use `BoxProps` instead. `BoxRow` will be removed in a future major version.\n */\nexport type BoxRowProps = BoxRowPropsShared &\n Omit<BoxProps, 'children' | 'flexDirection'> & {\n /**\n * Optional props passed to `SensitiveText` when `children` is a string.\n * Supports Text props plus `isHidden` / `length`.\n */\n textProps?: Partial<Omit<SensitiveTextProps, 'children'>>;\n };\n"]}
@@ -38,10 +38,10 @@ const design_system_shared_1 = require("@metamask-previews/design-system-shared"
38
38
  const design_system_twrnc_preset_1 = require("@metamask-previews/design-system-twrnc-preset");
39
39
  const react_1 = __importStar(require("react"));
40
40
  const Box_1 = require("../Box/index.cjs");
41
- const BoxRow_1 = require("../BoxRow/index.cjs");
42
41
  const Icon_1 = require("../Icon/index.cjs");
43
42
  const Spinner_1 = require("../Spinner/index.cjs");
44
43
  const ButtonAnimated_1 = require("../temp-components/ButtonAnimated/index.cjs");
44
+ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
45
45
  const ButtonBase_constants_1 = require("./ButtonBase.constants.cjs");
46
46
  const ButtonBase = ({ children, textProps, size = design_system_shared_1.ButtonBaseSize.Lg, isLoading, loadingText, spinnerProps, loadingWrapperProps, contentWrapperProps, startIconName, startIconProps, startAccessory, endIconName, endIconProps, endAccessory, isDisabled, isFullWidth, twClassName, textClassName, iconClassName, style, accessibilityLabel, accessibilityHint, accessibilityRole = 'button', accessibilityActions, onAccessibilityAction, ...props }) => {
47
47
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
@@ -134,9 +134,11 @@ const ButtonBase = ({ children, textProps, size = design_system_shared_1.ButtonB
134
134
  }}/>
135
135
  </Box_1.Box>)}
136
136
 
137
- <BoxRow_1.BoxRow {...restContentWrapper} twClassName={isLoading
137
+ <Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Center} gap={hasAccessories ? 1 : 0} {...restContentWrapper} twClassName={isLoading
138
138
  ? (0, design_system_shared_1.mergeTwClassName)('opacity-0', contentWrapperTw)
139
- : contentWrapperTw} gap={hasAccessories ? 1 : 0} startAccessory={finalStartIconName ? (<Icon_1.Icon name={finalStartIconName} size={iconSize} {...startIconProps} twClassName={(0, design_system_shared_1.mergeTwClassName)((0, design_system_shared_1.mergeTwClassName)('shrink-0', iconClassName ? iconClassName(pressed) : undefined), startIconProps?.twClassName)}/>) : (startAccessory)} endAccessory={finalEndIconName ? (<Icon_1.Icon name={finalEndIconName} size={iconSize} {...endIconProps} twClassName={(0, design_system_shared_1.mergeTwClassName)((0, design_system_shared_1.mergeTwClassName)('shrink-0', iconClassName ? iconClassName(pressed) : undefined), endIconProps?.twClassName)}/>) : (endAccessory)} textProps={{
139
+ : contentWrapperTw}>
140
+ {finalStartIconName ? (<Icon_1.Icon name={finalStartIconName} size={iconSize} {...startIconProps} twClassName={(0, design_system_shared_1.mergeTwClassName)((0, design_system_shared_1.mergeTwClassName)('shrink-0', iconClassName ? iconClassName(pressed) : undefined), startIconProps?.twClassName)}/>) : (startAccessory)}
141
+ <TextOrChildren_1.TextOrChildren textProps={{
140
142
  variant: labelTextVariant,
141
143
  fontWeight: design_system_shared_1.FontWeight.Medium,
142
144
  color: design_system_shared_1.TextColor.TextDefault,
@@ -145,8 +147,10 @@ const ButtonBase = ({ children, textProps, size = design_system_shared_1.ButtonB
145
147
  ...textProps,
146
148
  twClassName: (0, design_system_shared_1.mergeTwClassName)((0, design_system_shared_1.mergeTwClassName)('shrink grow-0 flex-wrap text-center', textClassName ? textClassName(pressed) : undefined), textProps?.twClassName),
147
149
  }}>
148
- {children}
149
- </BoxRow_1.BoxRow>
150
+ {children}
151
+ </TextOrChildren_1.TextOrChildren>
152
+ {finalEndIconName ? (<Icon_1.Icon name={finalEndIconName} size={iconSize} {...endIconProps} twClassName={(0, design_system_shared_1.mergeTwClassName)((0, design_system_shared_1.mergeTwClassName)('shrink-0', iconClassName ? iconClassName(pressed) : undefined), endIconProps?.twClassName)}/>) : (endAccessory)}
153
+ </Box_1.Box>
150
154
  </>);
151
155
  }}
152
156
  </ButtonAnimated_1.ButtonAnimated>);
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAKiD;AACjD,8FAA4E;AAC5E,+CAAuC;AAGvC,0CAA6B;AAC7B,gDAAmC;AACnC,4CAA0C;AAC1C,kDAAqC;AACrC,gFAAmE;AAEnE,qEAKgC;AAGzB,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,qCAAc,CAAC,EAAE,EACxB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAAG,QAAQ,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,IAAI,cAAc,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,IAAI,YAAY,CAAC,CAAC;IACzD,MAAM,cAAc,GAAG,QAAQ,IAAI,MAAM,CAAC;IAE1C,MAAM,QAAQ,GAAG,mDAA4B,CAAC,IAAI,CAAC,CAAC;IACpD,MAAM,gBAAgB,GAAG,uDAAgC,CAAC,IAAI,C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AA,EAAE,eAAM,CACV;UAAA,GAAG,CACJ,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,+BAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AAjPW,QAAA,UAAU,cAiPrB","sourcesContent":["import {\n ButtonBaseSize,\n FontWeight,\n mergeTwClassName,\n TextColor,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Box } from '../Box';\nimport { BoxRow } from '../BoxRow';\nimport { Icon, IconColor } from '../Icon';\nimport { Spinner } from '../Spinner';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\n\nimport {\n MAP_BUTTONBASE_SIZE_ICONSIZE,\n MAP_BUTTONBASE_SIZE_TEXT_VARIANT,\n getButtonBaseHorizontalPaddingTwClasses,\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION,\n} from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n loadingWrapperProps,\n contentWrapperProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n const hasStart = Boolean(finalStartIconName || startAccessory);\n const hasEnd = Boolean(finalEndIconName || endAccessory);\n const hasAccessories = hasStart || hasEnd;\n\n const iconSize = MAP_BUTTONBASE_SIZE_ICONSIZE[size];\n const labelTextVariant = MAP_BUTTONBASE_SIZE_TEXT_VARIANT[size];\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center rounded-full',\n // Visual styling\n 'bg-muted overflow-hidden',\n getButtonBaseHorizontalPaddingTwClasses(hasStart, hasEnd),\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => {\n const { twClassName: loadingWrapperTw, ...restLoadingWrapper } =\n loadingWrapperProps ?? {};\n const { twClassName: contentWrapperTw, ...restContentWrapper } =\n contentWrapperProps ?? {};\n\n return (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <Box\n {...restLoadingWrapper}\n twClassName={mergeTwClassName(\n 'absolute inset-0 flex items-center justify-center',\n loadingWrapperTw,\n )}\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n {...spinnerProps}\n spinnerIconProps={{\n size: iconSize,\n ...spinnerProps?.spinnerIconProps,\n }}\n loadingTextProps={{\n numberOfLines: 1,\n variant: labelTextVariant,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n />\n </Box>\n )}\n\n <BoxRow\n {...restContentWrapper}\n twClassName={\n isLoading\n ? mergeTwClassName('opacity-0', contentWrapperTw)\n : contentWrapperTw\n }\n gap={hasAccessories ? 1 : 0}\n startAccessory={\n finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={iconSize}\n {...startIconProps}\n twClassName={mergeTwClassName(\n mergeTwClassName(\n 'shrink-0',\n iconClassName ? iconClassName(pressed) : undefined,\n ),\n startIconProps?.twClassName,\n )}\n />\n ) : (\n startAccessory\n )\n }\n endAccessory={\n finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={iconSize}\n {...endIconProps}\n twClassName={mergeTwClassName(\n mergeTwClassName(\n 'shrink-0',\n iconClassName ? iconClassName(pressed) : undefined,\n ),\n endIconProps?.twClassName,\n )}\n />\n ) : (\n endAccessory\n )\n }\n textProps={{\n variant: labelTextVariant,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n twClassName: mergeTwClassName(\n mergeTwClassName(\n 'shrink grow-0 flex-wrap text-center',\n textClassName ? textClassName(pressed) : undefined,\n ),\n textProps?.twClassName,\n ),\n }}\n >\n {children}\n </BoxRow>\n </>\n );\n }}\n </ButtonAnimated>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonBase.cjs","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAOiD;AACjD,8FAA4E;AAC5E,+CAAuC;AAGvC,0CAA6B;AAC7B,4CAA0C;AAC1C,kDAAqC;AACrC,gFAAmE;AACnE,gFAAmE;AAEnE,qEAKgC;AAGzB,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,qCAAc,CAAC,EAAE,EACxB,SAAS,EACT,WAAW,EACX,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,cAAc,EACd,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,KAAK,EACL,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAAG,QAAQ,EAC5B,oBAAoB,EACpB,qBAAqB,EACrB,GAAG,KAAK,EACQ,EAAE,EAAE;IACpB,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IAEzB,MAAM,kBAAkB,GAAG,aAAa,IAAI,cAAc,EAAE,IAAI,CAAC;IACjE,MAAM,gBAAgB,GAAG,WAAW,IAAI,YAAY,EAAE,IAAI,CAAC;IAE3D,MAAM,QAAQ,GAAG,OAAO,CAAC,kBAAkB,IAAI,cAAc,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,IAAI,YAAY,CAAC,CAAC;IACzD,MAAM,cAAc,GAAG,QAAQ,IAAI,MAAM,CAAC;IAE1C,MAAM,QAAQ,GAAG,mDAA4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C3B,IAAA,uCAAgB,EACd,UAAU,EACV,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CACnD,EACD,YAAY,EAAE,WAAW,CAC1B,CAAC,EACF,CACH,CAAC,CAAC,CAAC,CACF,YAAY,CACb,CACH;YAAA,EAAE,SAAG,CACP;UAAA,GAAG,CACJ,CAAC;QACJ,CAAC,CACH;IAAA,EAAE,+BAAc,CAAC,CAClB,CAAC;AACJ,CAAC,CAAC;AAlPW,QAAA,UAAU,cAkPrB","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n ButtonBaseSize,\n FontWeight,\n mergeTwClassName,\n TextColor,\n} from '@metamask-previews/design-system-shared';\nimport { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useMemo } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\n\nimport { Box } from '../Box';\nimport { Icon, IconColor } from '../Icon';\nimport { Spinner } from '../Spinner';\nimport { ButtonAnimated } from '../temp-components/ButtonAnimated';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport {\n MAP_BUTTONBASE_SIZE_ICONSIZE,\n MAP_BUTTONBASE_SIZE_TEXT_VARIANT,\n getButtonBaseHorizontalPaddingTwClasses,\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION,\n} from './ButtonBase.constants';\nimport type { ButtonBaseProps } from './ButtonBase.types';\n\nexport const ButtonBase = ({\n children,\n textProps,\n size = ButtonBaseSize.Lg,\n isLoading,\n loadingText,\n spinnerProps,\n loadingWrapperProps,\n contentWrapperProps,\n startIconName,\n startIconProps,\n startAccessory,\n endIconName,\n endIconProps,\n endAccessory,\n isDisabled,\n isFullWidth,\n twClassName,\n textClassName,\n iconClassName,\n style,\n accessibilityLabel,\n accessibilityHint,\n accessibilityRole = 'button',\n accessibilityActions,\n onAccessibilityAction,\n ...props\n}: ButtonBaseProps) => {\n const tw = useTailwind();\n\n const finalStartIconName = startIconName ?? startIconProps?.name;\n const finalEndIconName = endIconName ?? endIconProps?.name;\n\n const hasStart = Boolean(finalStartIconName || startAccessory);\n const hasEnd = Boolean(finalEndIconName || endAccessory);\n const hasAccessories = hasStart || hasEnd;\n\n const iconSize = MAP_BUTTONBASE_SIZE_ICONSIZE[size];\n const labelTextVariant = MAP_BUTTONBASE_SIZE_TEXT_VARIANT[size];\n\n // Generate accessibility label if not provided\n const finalAccessibilityLabel = useMemo(() => {\n if (accessibilityLabel) {\n return accessibilityLabel;\n }\n\n // For loading state with loadingText, prioritize loadingText\n if (isLoading && loadingText) {\n return loadingText;\n }\n\n // If children is a string, use it as the label\n if (typeof children === 'string') {\n return children;\n }\n\n return undefined;\n }, [accessibilityLabel, children, isLoading, loadingText]);\n\n // Generate accessibility hint for loading state if not provided\n const finalAccessibilityHint = useMemo(() => {\n if (accessibilityHint) {\n return accessibilityHint;\n }\n\n if (isLoading) {\n return 'Button is currently loading';\n }\n\n return undefined;\n }, [accessibilityHint, isLoading]);\n\n // Create accessibilityState object with only truthy values\n const accessibilityState = useMemo(() => {\n const state: { disabled?: boolean; busy?: boolean } = {};\n\n if (isDisabled || isLoading) {\n state.disabled = true;\n }\n\n if (isLoading) {\n state.busy = true;\n }\n\n return state;\n }, [isDisabled, isLoading]);\n\n return (\n <ButtonAnimated\n disabled={isDisabled || isLoading}\n accessibilityRole={accessibilityRole}\n accessibilityLabel={finalAccessibilityLabel}\n accessibilityHint={finalAccessibilityHint}\n accessibilityActions={accessibilityActions}\n onAccessibilityAction={onAccessibilityAction}\n accessibilityState={accessibilityState}\n accessible\n style={({ pressed }) => {\n // Evaluate custom className if it's a function\n const customClassName =\n typeof twClassName === 'function'\n ? twClassName(pressed)\n : twClassName;\n\n // Build button container styles\n const buttonStyles = tw.style(\n // Base layout - flex container for button content\n 'flex-row items-center justify-center rounded-full',\n // Visual styling\n 'bg-muted overflow-hidden',\n getButtonBaseHorizontalPaddingTwClasses(hasStart, hasEnd),\n // Size\n TWCLASSMAP_BUTTONBASE_SIZE_DIMENSION[size],\n // State-based opacity\n isDisabled ? 'opacity-50' : 'opacity-100',\n // Width - use self-start to prevent stretching when not full width\n isFullWidth ? 'w-full' : 'self-start',\n // Custom classes\n customClassName,\n );\n\n // Merge with additional styles if provided\n const computedStyle: StyleProp<ViewStyle>[] = [buttonStyles];\n\n const additionalStyle =\n typeof style === 'function' ? style({ pressed }) : style;\n\n if (additionalStyle) {\n computedStyle.push(additionalStyle);\n }\n\n return computedStyle;\n }}\n {...props}\n >\n {({ pressed }) => {\n const { twClassName: loadingWrapperTw, ...restLoadingWrapper } =\n loadingWrapperProps ?? {};\n const { twClassName: contentWrapperTw, ...restContentWrapper } =\n contentWrapperProps ?? {};\n\n return (\n <>\n {/* Loading spinner overlay */}\n {isLoading && (\n <Box\n {...restLoadingWrapper}\n twClassName={mergeTwClassName(\n 'absolute inset-0 flex items-center justify-center',\n loadingWrapperTw,\n )}\n >\n <Spinner\n color={\n textClassName\n ? (textClassName(pressed) as IconColor)\n : IconColor.IconDefault\n }\n loadingText={loadingText}\n {...spinnerProps}\n spinnerIconProps={{\n size: iconSize,\n ...spinnerProps?.spinnerIconProps,\n }}\n loadingTextProps={{\n numberOfLines: 1,\n variant: labelTextVariant,\n twClassName: textClassName ? textClassName(pressed) : '',\n ...spinnerProps?.loadingTextProps,\n }}\n />\n </Box>\n )}\n\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={hasAccessories ? 1 : 0}\n {...restContentWrapper}\n twClassName={\n isLoading\n ? mergeTwClassName('opacity-0', contentWrapperTw)\n : contentWrapperTw\n }\n >\n {finalStartIconName ? (\n <Icon\n name={finalStartIconName}\n size={iconSize}\n {...startIconProps}\n twClassName={mergeTwClassName(\n mergeTwClassName(\n 'shrink-0',\n iconClassName ? iconClassName(pressed) : undefined,\n ),\n startIconProps?.twClassName,\n )}\n />\n ) : (\n startAccessory\n )}\n <TextOrChildren\n textProps={{\n variant: labelTextVariant,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n numberOfLines: 1,\n ellipsizeMode: 'clip',\n ...textProps,\n twClassName: mergeTwClassName(\n mergeTwClassName(\n 'shrink grow-0 flex-wrap text-center',\n textClassName ? textClassName(pressed) : undefined,\n ),\n textProps?.twClassName,\n ),\n }}\n >\n {children}\n </TextOrChildren>\n {finalEndIconName ? (\n <Icon\n name={finalEndIconName}\n size={iconSize}\n {...endIconProps}\n twClassName={mergeTwClassName(\n mergeTwClassName(\n 'shrink-0',\n iconClassName ? iconClassName(pressed) : undefined,\n ),\n endIconProps?.twClassName,\n )}\n />\n ) : (\n endAccessory\n )}\n </Box>\n </>\n );\n }}\n </ButtonAnimated>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,cAAc;AAevC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,GAAI,mYA2BxB,eAAe,sBAsNjB,CAAC"}
1
+ {"version":3,"file":"ButtonBase.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,cAAc;AAevC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,GAAI,mYA2BxB,eAAe,sBAuNjB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAkB,cAAc;AAevC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,GAAI,mYA2BxB,eAAe,sBAsNjB,CAAC"}
1
+ {"version":3,"file":"ButtonBase.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkB,cAAc;AAevC,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,GAAI,mYA2BxB,eAAe,sBAuNjB,CAAC"}