@metamask-previews/design-system-react-native 0.26.0-preview.047f96c → 0.27.0-preview.f5c2542

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 (177) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/dist/components/BottomSheet/BottomSheet.cjs +3 -0
  3. package/dist/components/BottomSheet/BottomSheet.cjs.map +1 -1
  4. package/dist/components/BottomSheet/BottomSheet.d.cts.map +1 -1
  5. package/dist/components/BottomSheet/BottomSheet.d.mts.map +1 -1
  6. package/dist/components/BottomSheet/BottomSheet.mjs +3 -0
  7. package/dist/components/BottomSheet/BottomSheet.mjs.map +1 -1
  8. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs +1 -1
  9. package/dist/components/BottomSheetDialog/BottomSheetDialog.cjs.map +1 -1
  10. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.cts.map +1 -1
  11. package/dist/components/BottomSheetDialog/BottomSheetDialog.d.mts.map +1 -1
  12. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs +1 -1
  13. package/dist/components/BottomSheetDialog/BottomSheetDialog.mjs.map +1 -1
  14. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs +2 -6
  15. package/dist/components/BottomSheetHeader/BottomSheetHeader.cjs.map +1 -1
  16. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.cts.map +1 -1
  17. package/dist/components/BottomSheetHeader/BottomSheetHeader.d.mts.map +1 -1
  18. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs +2 -6
  19. package/dist/components/BottomSheetHeader/BottomSheetHeader.mjs.map +1 -1
  20. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs +0 -11
  21. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.cjs.map +1 -1
  22. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts +6 -20
  23. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.cts.map +1 -1
  24. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts +6 -20
  25. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.d.mts.map +1 -1
  26. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs +1 -10
  27. package/dist/components/BottomSheetHeader/BottomSheetHeader.types.mjs.map +1 -1
  28. package/dist/components/BottomSheetHeader/index.cjs +1 -3
  29. package/dist/components/BottomSheetHeader/index.cjs.map +1 -1
  30. package/dist/components/BottomSheetHeader/index.d.cts +0 -1
  31. package/dist/components/BottomSheetHeader/index.d.cts.map +1 -1
  32. package/dist/components/BottomSheetHeader/index.d.mts +0 -1
  33. package/dist/components/BottomSheetHeader/index.d.mts.map +1 -1
  34. package/dist/components/BottomSheetHeader/index.mjs +0 -1
  35. package/dist/components/BottomSheetHeader/index.mjs.map +1 -1
  36. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +1 -1
  37. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -1
  38. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts.map +1 -1
  39. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts.map +1 -1
  40. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs +3 -3
  41. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs.map +1 -1
  42. package/dist/components/Content/Content.cjs +71 -0
  43. package/dist/components/Content/Content.cjs.map +1 -0
  44. package/dist/components/Content/Content.constants.cjs +9 -0
  45. package/dist/components/Content/Content.constants.cjs.map +1 -0
  46. package/dist/components/Content/Content.constants.d.cts +3 -0
  47. package/dist/components/Content/Content.constants.d.cts.map +1 -0
  48. package/dist/components/Content/Content.constants.d.mts +3 -0
  49. package/dist/components/Content/Content.constants.d.mts.map +1 -0
  50. package/dist/components/Content/Content.constants.mjs +6 -0
  51. package/dist/components/Content/Content.constants.mjs.map +1 -0
  52. package/dist/components/Content/Content.d.cts +4 -0
  53. package/dist/components/Content/Content.d.cts.map +1 -0
  54. package/dist/components/Content/Content.d.mts +4 -0
  55. package/dist/components/Content/Content.d.mts.map +1 -0
  56. package/dist/components/Content/Content.mjs +71 -0
  57. package/dist/components/Content/Content.mjs.map +1 -0
  58. package/dist/components/Content/Content.types.cjs +3 -0
  59. package/dist/components/Content/Content.types.cjs.map +1 -0
  60. package/dist/components/Content/Content.types.d.cts +31 -0
  61. package/dist/components/Content/Content.types.d.cts.map +1 -0
  62. package/dist/components/Content/Content.types.d.mts +31 -0
  63. package/dist/components/Content/Content.types.d.mts.map +1 -0
  64. package/dist/components/Content/Content.types.mjs +2 -0
  65. package/dist/components/Content/Content.types.mjs.map +1 -0
  66. package/dist/components/Content/index.cjs +8 -0
  67. package/dist/components/Content/index.cjs.map +1 -0
  68. package/dist/components/Content/index.d.cts +4 -0
  69. package/dist/components/Content/index.d.cts.map +1 -0
  70. package/dist/components/Content/index.d.mts +4 -0
  71. package/dist/components/Content/index.d.mts.map +1 -0
  72. package/dist/components/Content/index.mjs +3 -0
  73. package/dist/components/Content/index.mjs.map +1 -0
  74. package/dist/components/HeaderBase/HeaderBase.cjs +93 -72
  75. package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -1
  76. package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -1
  77. package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -1
  78. package/dist/components/HeaderBase/HeaderBase.mjs +93 -72
  79. package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -1
  80. package/dist/components/HeaderBase/HeaderBase.types.cjs +0 -12
  81. package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -1
  82. package/dist/components/HeaderBase/HeaderBase.types.d.cts +11 -19
  83. package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -1
  84. package/dist/components/HeaderBase/HeaderBase.types.d.mts +11 -19
  85. package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -1
  86. package/dist/components/HeaderBase/HeaderBase.types.mjs +1 -11
  87. package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -1
  88. package/dist/components/HeaderBase/index.cjs +1 -3
  89. package/dist/components/HeaderBase/index.cjs.map +1 -1
  90. package/dist/components/HeaderBase/index.d.cts +0 -1
  91. package/dist/components/HeaderBase/index.d.cts.map +1 -1
  92. package/dist/components/HeaderBase/index.d.mts +0 -1
  93. package/dist/components/HeaderBase/index.d.mts.map +1 -1
  94. package/dist/components/HeaderBase/index.mjs +0 -1
  95. package/dist/components/HeaderBase/index.mjs.map +1 -1
  96. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs +4 -12
  97. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.cjs.map +1 -1
  98. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts +0 -8
  99. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.cts.map +1 -1
  100. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts +0 -8
  101. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.d.mts.map +1 -1
  102. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs +3 -10
  103. package/dist/components/HeaderStandardAnimated/useHeaderStandardAnimated.mjs.map +1 -1
  104. package/dist/components/Icon/Icon.assets.cjs +2 -0
  105. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  106. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  107. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  108. package/dist/components/Icon/Icon.assets.mjs +2 -0
  109. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  110. package/dist/components/Icon/Icon.cjs +3 -1
  111. package/dist/components/Icon/Icon.cjs.map +1 -1
  112. package/dist/components/Icon/Icon.d.cts.map +1 -1
  113. package/dist/components/Icon/Icon.d.mts.map +1 -1
  114. package/dist/components/Icon/Icon.mjs +3 -1
  115. package/dist/components/Icon/Icon.mjs.map +1 -1
  116. package/dist/components/Icon/assets/flash-filled.svg +1 -0
  117. package/dist/components/SegmentGroup/SegmentGroup.cjs +4 -6
  118. package/dist/components/SegmentGroup/SegmentGroup.cjs.map +1 -1
  119. package/dist/components/SegmentGroup/SegmentGroup.d.cts.map +1 -1
  120. package/dist/components/SegmentGroup/SegmentGroup.d.mts.map +1 -1
  121. package/dist/components/SegmentGroup/SegmentGroup.mjs +5 -7
  122. package/dist/components/SegmentGroup/SegmentGroup.mjs.map +1 -1
  123. package/dist/components/TextArea/TextArea.d.cts +2 -2
  124. package/dist/components/TextArea/TextArea.d.mts +2 -2
  125. package/dist/components/TextField/TextField.d.cts +2 -2
  126. package/dist/components/TextField/TextField.d.mts +2 -2
  127. package/dist/components/TextFieldSearch/TextFieldSearch.d.cts +2 -2
  128. package/dist/components/TextFieldSearch/TextFieldSearch.d.mts +2 -2
  129. package/dist/components/Toast/Toast.types.cjs +2 -10
  130. package/dist/components/Toast/Toast.types.cjs.map +1 -1
  131. package/dist/components/Toast/Toast.types.d.cts +4 -11
  132. package/dist/components/Toast/Toast.types.d.cts.map +1 -1
  133. package/dist/components/Toast/Toast.types.d.mts +4 -11
  134. package/dist/components/Toast/Toast.types.d.mts.map +1 -1
  135. package/dist/components/Toast/Toast.types.mjs +2 -10
  136. package/dist/components/Toast/Toast.types.mjs.map +1 -1
  137. package/dist/components/Toast/index.cjs +2 -2
  138. package/dist/components/Toast/index.cjs.map +1 -1
  139. package/dist/components/Toast/index.d.cts +1 -1
  140. package/dist/components/Toast/index.d.cts.map +1 -1
  141. package/dist/components/Toast/index.d.mts +1 -1
  142. package/dist/components/Toast/index.d.mts.map +1 -1
  143. package/dist/components/Toast/index.mjs +1 -1
  144. package/dist/components/Toast/index.mjs.map +1 -1
  145. package/dist/components/index.cjs +5 -4
  146. package/dist/components/index.cjs.map +1 -1
  147. package/dist/components/index.d.cts +4 -2
  148. package/dist/components/index.d.cts.map +1 -1
  149. package/dist/components/index.d.mts +4 -2
  150. package/dist/components/index.d.mts.map +1 -1
  151. package/dist/components/index.mjs +3 -2
  152. package/dist/components/index.mjs.map +1 -1
  153. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +1 -1
  154. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
  155. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +1 -1
  156. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
  157. package/dist/components/temp-components/Spinner/Spinner.cjs +1 -1
  158. package/dist/components/temp-components/Spinner/Spinner.cjs.map +1 -1
  159. package/dist/components/temp-components/Spinner/Spinner.mjs +1 -1
  160. package/dist/components/temp-components/Spinner/Spinner.mjs.map +1 -1
  161. package/package.json +4 -4
  162. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs +0 -15
  163. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.cjs.map +0 -1
  164. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts +0 -7
  165. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.cts.map +0 -1
  166. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts +0 -7
  167. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.d.mts.map +0 -1
  168. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs +0 -12
  169. package/dist/components/BottomSheetHeader/BottomSheetHeader.constants.mjs.map +0 -1
  170. package/dist/components/HeaderBase/HeaderBase.constants.cjs +0 -15
  171. package/dist/components/HeaderBase/HeaderBase.constants.cjs.map +0 -1
  172. package/dist/components/HeaderBase/HeaderBase.constants.d.cts +0 -7
  173. package/dist/components/HeaderBase/HeaderBase.constants.d.cts.map +0 -1
  174. package/dist/components/HeaderBase/HeaderBase.constants.d.mts +0 -7
  175. package/dist/components/HeaderBase/HeaderBase.constants.d.mts.map +0 -1
  176. package/dist/components/HeaderBase/HeaderBase.constants.mjs +0 -12
  177. package/dist/components/HeaderBase/HeaderBase.constants.mjs.map +0 -1
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BottomSheetHeaderVariant = exports.BottomSheetHeader = void 0;
3
+ exports.BottomSheetHeader = void 0;
4
4
  var BottomSheetHeader_1 = require("./BottomSheetHeader.cjs");
5
5
  Object.defineProperty(exports, "BottomSheetHeader", { enumerable: true, get: function () { return BottomSheetHeader_1.BottomSheetHeader; } });
6
- var BottomSheetHeader_types_1 = require("./BottomSheetHeader.types.cjs");
7
- Object.defineProperty(exports, "BottomSheetHeaderVariant", { enumerable: true, get: function () { return BottomSheetHeader_types_1.BottomSheetHeaderVariant; } });
8
6
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,yEAAqE;AAA5D,mIAAA,wBAAwB,OAAA","sourcesContent":["export { BottomSheetHeader } from './BottomSheetHeader';\nexport { BottomSheetHeaderVariant } from './BottomSheetHeader.types';\nexport type { BottomSheetHeaderProps } from './BottomSheetHeader.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":";;;AAAA,6DAAwD;AAA/C,sHAAA,iBAAiB,OAAA","sourcesContent":["export { BottomSheetHeader } from './BottomSheetHeader';\nexport type { BottomSheetHeaderProps } from './BottomSheetHeader.types';\n"]}
@@ -1,4 +1,3 @@
1
1
  export { BottomSheetHeader } from "./BottomSheetHeader.cjs";
2
- export { BottomSheetHeaderVariant } from "./BottomSheetHeader.types.cjs";
3
2
  export type { BottomSheetHeaderProps } from "./BottomSheetHeader.types.cjs";
4
3
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B;AACxD,OAAO,EAAE,wBAAwB,EAAE,sCAAkC;AACrE,YAAY,EAAE,sBAAsB,EAAE,sCAAkC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B;AACxD,YAAY,EAAE,sBAAsB,EAAE,sCAAkC"}
@@ -1,4 +1,3 @@
1
1
  export { BottomSheetHeader } from "./BottomSheetHeader.mjs";
2
- export { BottomSheetHeaderVariant } from "./BottomSheetHeader.types.mjs";
3
2
  export type { BottomSheetHeaderProps } from "./BottomSheetHeader.types.mjs";
4
3
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B;AACxD,OAAO,EAAE,wBAAwB,EAAE,sCAAkC;AACrE,YAAY,EAAE,sBAAsB,EAAE,sCAAkC"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B;AACxD,YAAY,EAAE,sBAAsB,EAAE,sCAAkC"}
@@ -1,3 +1,2 @@
1
1
  export { BottomSheetHeader } from "./BottomSheetHeader.mjs";
2
- export { BottomSheetHeaderVariant } from "./BottomSheetHeader.types.mjs";
3
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B;AACxD,OAAO,EAAE,wBAAwB,EAAE,sCAAkC","sourcesContent":["export { BottomSheetHeader } from './BottomSheetHeader';\nexport { BottomSheetHeaderVariant } from './BottomSheetHeader.types';\nexport type { BottomSheetHeaderProps } from './BottomSheetHeader.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetHeader/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gCAA4B","sourcesContent":["export { BottomSheetHeader } from './BottomSheetHeader';\nexport type { BottomSheetHeaderProps } from './BottomSheetHeader.types';\n"]}
@@ -30,7 +30,7 @@ const react_native_1 = require("react-native");
30
30
  const BottomSheetOverlay_constants_1 = require("./BottomSheetOverlay.constants.cjs");
31
31
  const BottomSheetOverlay = ({ style, twClassName, onPress, touchableOpacityProps, ...props }) => {
32
32
  const tw = (0, design_system_twrnc_preset_1.useTailwind)();
33
- const opacityVal = (0, react_native_1.useAnimatedValue)(0);
33
+ const opacityVal = (0, react_1.useRef)(new react_native_1.Animated.Value(0)).current;
34
34
  (0, react_1.useEffect)(() => {
35
35
  react_native_1.Animated.timing(opacityVal, {
36
36
  toValue: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetOverlay.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAyC;AACzC,+CAKsB;AAEtB,qFAAoF;AAG7E,MAAM,kBAAkB,GAAsC,CAAC,EACpE,KAAK,EACL,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,+BAAgB,EAAC,CAAC,CAAC,CAAC;IAEvC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,uBAAQ,CAAC,MAAM,CAAC,UAAU,EAAE;YAC1B,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,iEAAkC;YAC5C,MAAM,EAAE,qBAAM,CAAC,MAAM;YACrB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC,KAAK,EAAE,CAAC;IACb,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,uBAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,qCAAqC,EAAE,WAAW,CAAC;YAC5D,KAAK;YACL,EAAE,OAAO,EAAE,UAAU,EAAE;SACxB,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,OAAO,IAAI,CACV,CAAC,+BAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAC1B,CACH,CACH;IAAA,EAAE,uBAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,kBAAkB,sBAqC7B","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect } from 'react';\nimport {\n Animated,\n Easing,\n TouchableOpacity,\n useAnimatedValue,\n} from 'react-native';\n\nimport { DEFAULT_OVERLAY_ANIMATION_DURATION } from './BottomSheetOverlay.constants';\nimport { BottomSheetOverlayProps } from './BottomSheetOverlay.types';\n\nexport const BottomSheetOverlay: React.FC<BottomSheetOverlayProps> = ({\n style,\n twClassName,\n onPress,\n touchableOpacityProps,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityVal = useAnimatedValue(0);\n\n useEffect(() => {\n Animated.timing(opacityVal, {\n toValue: 1,\n duration: DEFAULT_OVERLAY_ANIMATION_DURATION,\n easing: Easing.linear,\n useNativeDriver: true,\n }).start();\n }, [opacityVal]);\n\n return (\n <Animated.View\n style={[\n tw.style('absolute inset-0 bg-overlay-default', twClassName),\n style,\n { opacity: opacityVal },\n ]}\n {...props}\n >\n {onPress && (\n <TouchableOpacity\n onPress={onPress}\n {...touchableOpacityProps}\n style={tw.style('flex-1')}\n />\n )}\n </Animated.View>\n );\n};\n"]}
1
+ {"version":3,"file":"BottomSheetOverlay.cjs","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8FAA4E;AAC5E,+CAAiD;AACjD,+CAAkE;AAElE,qFAAoF;AAG7E,MAAM,kBAAkB,GAAsC,CAAC,EACpE,KAAK,EACL,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAEzD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,uBAAQ,CAAC,MAAM,CAAC,UAAU,EAAE;YAC1B,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,iEAAkC;YAC5C,MAAM,EAAE,qBAAM,CAAC,MAAM;YACrB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC,KAAK,EAAE,CAAC;IACb,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,uBAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,qCAAqC,EAAE,WAAW,CAAC;YAC5D,KAAK;YACL,EAAE,OAAO,EAAE,UAAU,EAAE;SACxB,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,OAAO,IAAI,CACV,CAAC,+BAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAC1B,CACH,CACH;IAAA,EAAE,uBAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC;AArCW,QAAA,kBAAkB,sBAqC7B","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, Easing, TouchableOpacity } from 'react-native';\n\nimport { DEFAULT_OVERLAY_ANIMATION_DURATION } from './BottomSheetOverlay.constants';\nimport { BottomSheetOverlayProps } from './BottomSheetOverlay.types';\n\nexport const BottomSheetOverlay: React.FC<BottomSheetOverlayProps> = ({\n style,\n twClassName,\n onPress,\n touchableOpacityProps,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityVal = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n Animated.timing(opacityVal, {\n toValue: 1,\n duration: DEFAULT_OVERLAY_ANIMATION_DURATION,\n easing: Easing.linear,\n useNativeDriver: true,\n }).start();\n }, [opacityVal]);\n\n return (\n <Animated.View\n style={[\n tw.style('absolute inset-0 bg-overlay-default', twClassName),\n style,\n { opacity: opacityVal },\n ]}\n {...props}\n >\n {onPress && (\n <TouchableOpacity\n onPress={onPress}\n {...touchableOpacityProps}\n style={tw.style('flex-1')}\n />\n )}\n </Animated.View>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetOverlay.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,cAAc;AASzC,OAAO,EAAE,uBAAuB,EAAE,uCAAmC;AAErE,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqChE,CAAC"}
1
+ {"version":3,"file":"BottomSheetOverlay.d.cts","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAIjD,OAAO,EAAE,uBAAuB,EAAE,uCAAmC;AAErE,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqChE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetOverlay.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,cAAc;AASzC,OAAO,EAAE,uBAAuB,EAAE,uCAAmC;AAErE,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqChE,CAAC"}
1
+ {"version":3,"file":"BottomSheetOverlay.d.mts","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAIjD,OAAO,EAAE,uBAAuB,EAAE,uCAAmC;AAErE,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAqChE,CAAC"}
@@ -5,13 +5,13 @@ function $importDefault(module) {
5
5
  return module;
6
6
  }
7
7
  import { useTailwind } from "@metamask-previews/design-system-twrnc-preset";
8
- import $React, { useEffect } from "react";
8
+ import $React, { useEffect, useRef } from "react";
9
9
  const React = $importDefault($React);
10
- import { Animated, Easing, TouchableOpacity, useAnimatedValue } from "react-native";
10
+ import { Animated, Easing, TouchableOpacity } from "react-native";
11
11
  import { DEFAULT_OVERLAY_ANIMATION_DURATION } from "./BottomSheetOverlay.constants.mjs";
12
12
  export const BottomSheetOverlay = ({ style, twClassName, onPress, touchableOpacityProps, ...props }) => {
13
13
  const tw = useTailwind();
14
- const opacityVal = useAnimatedValue(0);
14
+ const opacityVal = useRef(new Animated.Value(0)).current;
15
15
  useEffect(() => {
16
16
  Animated.timing(opacityVal, {
17
17
  toValue: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheetOverlay.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,cAAc;;AACzC,OAAO,EACL,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EACjB,qBAAqB;AAEtB,OAAO,EAAE,kCAAkC,EAAE,2CAAuC;AAGpF,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EACpE,KAAK,EACL,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAEvC,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE;YAC1B,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,kCAAkC;YAC5C,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC,KAAK,EAAE,CAAC;IACb,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,qCAAqC,EAAE,WAAW,CAAC;YAC5D,KAAK;YACL,EAAE,OAAO,EAAE,UAAU,EAAE;SACxB,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,OAAO,IAAI,CACV,CAAC,gBAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAC1B,CACH,CACH;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect } from 'react';\nimport {\n Animated,\n Easing,\n TouchableOpacity,\n useAnimatedValue,\n} from 'react-native';\n\nimport { DEFAULT_OVERLAY_ANIMATION_DURATION } from './BottomSheetOverlay.constants';\nimport { BottomSheetOverlayProps } from './BottomSheetOverlay.types';\n\nexport const BottomSheetOverlay: React.FC<BottomSheetOverlayProps> = ({\n style,\n twClassName,\n onPress,\n touchableOpacityProps,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityVal = useAnimatedValue(0);\n\n useEffect(() => {\n Animated.timing(opacityVal, {\n toValue: 1,\n duration: DEFAULT_OVERLAY_ANIMATION_DURATION,\n easing: Easing.linear,\n useNativeDriver: true,\n }).start();\n }, [opacityVal]);\n\n return (\n <Animated.View\n style={[\n tw.style('absolute inset-0 bg-overlay-default', twClassName),\n style,\n { opacity: opacityVal },\n ]}\n {...props}\n >\n {onPress && (\n <TouchableOpacity\n onPress={onPress}\n {...touchableOpacityProps}\n style={tw.style('flex-1')}\n />\n )}\n </Animated.View>\n );\n};\n"]}
1
+ {"version":3,"file":"BottomSheetOverlay.mjs","sourceRoot":"","sources":["../../../src/components/BottomSheetOverlay/BottomSheetOverlay.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,sDAAsD;AAC5E,OAAO,QAAO,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc;;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,qBAAqB;AAElE,OAAO,EAAE,kCAAkC,EAAE,2CAAuC;AAGpF,MAAM,CAAC,MAAM,kBAAkB,GAAsC,CAAC,EACpE,KAAK,EACL,WAAW,EACX,OAAO,EACP,qBAAqB,EACrB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;IAEzD,SAAS,CAAC,GAAG,EAAE;QACb,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE;YAC1B,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,kCAAkC;YAC5C,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC,KAAK,EAAE,CAAC;IACb,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,CACZ,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,qCAAqC,EAAE,WAAW,CAAC;YAC5D,KAAK;YACL,EAAE,OAAO,EAAE,UAAU,EAAE;SACxB,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,OAAO,IAAI,CACV,CAAC,gBAAgB,CACf,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,qBAAqB,CAAC,CAC1B,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,EAC1B,CACH,CACH;IAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useTailwind } from '@metamask-previews/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, Easing, TouchableOpacity } from 'react-native';\n\nimport { DEFAULT_OVERLAY_ANIMATION_DURATION } from './BottomSheetOverlay.constants';\nimport { BottomSheetOverlayProps } from './BottomSheetOverlay.types';\n\nexport const BottomSheetOverlay: React.FC<BottomSheetOverlayProps> = ({\n style,\n twClassName,\n onPress,\n touchableOpacityProps,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityVal = useRef(new Animated.Value(0)).current;\n\n useEffect(() => {\n Animated.timing(opacityVal, {\n toValue: 1,\n duration: DEFAULT_OVERLAY_ANIMATION_DURATION,\n easing: Easing.linear,\n useNativeDriver: true,\n }).start();\n }, [opacityVal]);\n\n return (\n <Animated.View\n style={[\n tw.style('absolute inset-0 bg-overlay-default', twClassName),\n style,\n { opacity: opacityVal },\n ]}\n {...props}\n >\n {onPress && (\n <TouchableOpacity\n onPress={onPress}\n {...touchableOpacityProps}\n style={tw.style('flex-1')}\n />\n )}\n </Animated.View>\n );\n};\n"]}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Content = void 0;
7
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
8
+ const react_1 = __importDefault(require("react"));
9
+ const BoxColumn_1 = require("../BoxColumn/index.cjs");
10
+ const BoxRow_1 = require("../BoxRow/index.cjs");
11
+ const TextOrChildren_1 = require("../temp-components/TextOrChildren/index.cjs");
12
+ const Content_constants_1 = require("./Content.constants.cjs");
13
+ const Content = ({ startAccessory, endAccessory, topAccessory, bottomAccessory, verticalAlignment = design_system_shared_1.ContentVerticalAlignment.Center, avatar, twClassName, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, ...props }) => {
14
+ const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);
15
+ const contentRow = (<BoxRow_1.BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={Content_constants_1.VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()} {...(hasColumnShell ? {} : props)}>
16
+ {avatar}
17
+ {/* Title and description Column */}
18
+ <BoxColumn_1.BoxColumn twClassName="flex-1 min-w-0" bottomAccessory={description ? (<BoxRow_1.BoxRow twClassName="w-full" startAccessory={descriptionStartAccessory} endAccessory={descriptionEndAccessory} gap={1}>
19
+ <TextOrChildren_1.TextOrChildren textProps={{
20
+ variant: design_system_shared_1.TextVariant.BodySm,
21
+ fontWeight: design_system_shared_1.FontWeight.Medium,
22
+ color: design_system_shared_1.TextColor.TextAlternative,
23
+ ...descriptionProps,
24
+ }}>
25
+ {description}
26
+ </TextOrChildren_1.TextOrChildren>
27
+ </BoxRow_1.BoxRow>) : null}>
28
+ {title ? (<BoxRow_1.BoxRow twClassName="w-full" startAccessory={titleStartAccessory} endAccessory={titleEndAccessory} gap={1}>
29
+ <TextOrChildren_1.TextOrChildren textProps={{
30
+ variant: design_system_shared_1.TextVariant.BodyMd,
31
+ fontWeight: design_system_shared_1.FontWeight.Medium,
32
+ color: design_system_shared_1.TextColor.TextDefault,
33
+ ...titleProps,
34
+ }}>
35
+ {title}
36
+ </TextOrChildren_1.TextOrChildren>
37
+ </BoxRow_1.BoxRow>) : null}
38
+ </BoxColumn_1.BoxColumn>
39
+ {/* Value and subvalue Column */}
40
+ {value || subvalue ? (<BoxColumn_1.BoxColumn twClassName="min-w-0" bottomAccessory={subvalue ? (<BoxRow_1.BoxRow twClassName="w-full" startAccessory={subvalueStartAccessory} endAccessory={subvalueEndAccessory} gap={1}>
41
+ <TextOrChildren_1.TextOrChildren textProps={{
42
+ variant: design_system_shared_1.TextVariant.BodySm,
43
+ fontWeight: design_system_shared_1.FontWeight.Medium,
44
+ color: design_system_shared_1.TextColor.TextAlternative,
45
+ ...subvalueProps,
46
+ }}>
47
+ {subvalue}
48
+ </TextOrChildren_1.TextOrChildren>
49
+ </BoxRow_1.BoxRow>) : null}>
50
+ {value ? (<BoxRow_1.BoxRow twClassName="w-full" startAccessory={valueStartAccessory} endAccessory={valueEndAccessory} gap={1}>
51
+ <TextOrChildren_1.TextOrChildren textProps={{
52
+ variant: design_system_shared_1.TextVariant.BodyMd,
53
+ fontWeight: design_system_shared_1.FontWeight.Medium,
54
+ color: design_system_shared_1.TextColor.TextDefault,
55
+ ...valueProps,
56
+ }}>
57
+ {value}
58
+ </TextOrChildren_1.TextOrChildren>
59
+ </BoxRow_1.BoxRow>) : null}
60
+ </BoxColumn_1.BoxColumn>) : null}
61
+ </BoxRow_1.BoxRow>);
62
+ if (hasColumnShell) {
63
+ return (<BoxColumn_1.BoxColumn gap={1} topAccessory={topAccessory} bottomAccessory={bottomAccessory} twClassName={twClassName} {...props}>
64
+ {contentRow}
65
+ </BoxColumn_1.BoxColumn>);
66
+ }
67
+ return contentRow;
68
+ };
69
+ exports.Content = Content;
70
+ exports.Content.displayName = 'Content';
71
+ //# sourceMappingURL=Content.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAKiD;AACjD,kDAA0B;AAE1B,sDAAyC;AACzC,gDAAmC;AACnC,gFAAmE;AAEnE,+DAA6D;AAGtD,MAAM,OAAO,GAA2B,CAAC,EAC9C,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,GAAG,+CAAwB,CAAC,MAAM,EACnD,MAAM,EACN,WAAW,EACX,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;IAEzE,MAAM,UAAU,GAAG,CACjB,CAAC,eAAM,CACL,cAAc,CAAC,CAAC,cAAc,CAAC,CAC/B,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,UAAU,CAAC,CAAC,0CAAsB,CAAC,iBAAiB,CAAC,CAAC,CACtD,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,WAAW,CAAC,CAAC,gBAAgB,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE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AC;IAEF,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,CAAC,qBAAS,CACR,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,UAAU,CACb;MAAA,EAAE,qBAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AApJW,QAAA,OAAO,WAoJlB;AAEF,eAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import {\n ContentVerticalAlignment,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport { VERTICAL_ALIGNMENT_MAP } from './Content.constants';\nimport type { ContentProps } from './Content.types';\n\nexport const Content: React.FC<ContentProps> = ({\n startAccessory,\n endAccessory,\n topAccessory,\n bottomAccessory,\n verticalAlignment = ContentVerticalAlignment.Center,\n avatar,\n twClassName,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n ...props\n}) => {\n const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);\n\n const contentRow = (\n <BoxRow\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n gap={4}\n twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()}\n {...(hasColumnShell ? {} : props)}\n >\n {avatar}\n {/* Title and description Column */}\n <BoxColumn\n twClassName=\"flex-1 min-w-0\"\n bottomAccessory={\n description ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={descriptionStartAccessory}\n endAccessory={descriptionEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...descriptionProps,\n }}\n >\n {description}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {title ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n {/* Value and subvalue Column */}\n {value || subvalue ? (\n <BoxColumn\n twClassName=\"min-w-0\"\n bottomAccessory={\n subvalue ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={subvalueStartAccessory}\n endAccessory={subvalueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subvalueProps,\n }}\n >\n {subvalue}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {value ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...valueProps,\n }}\n >\n {value}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n ) : null}\n </BoxRow>\n );\n\n if (hasColumnShell) {\n return (\n <BoxColumn\n gap={1}\n topAccessory={topAccessory}\n bottomAccessory={bottomAccessory}\n twClassName={twClassName}\n {...props}\n >\n {contentRow}\n </BoxColumn>\n );\n }\n\n return contentRow;\n};\n\nContent.displayName = 'Content';\n"]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.VERTICAL_ALIGNMENT_MAP = void 0;
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ exports.VERTICAL_ALIGNMENT_MAP = {
6
+ [design_system_shared_1.ContentVerticalAlignment.Top]: design_system_shared_1.BoxAlignItems.Start,
7
+ [design_system_shared_1.ContentVerticalAlignment.Center]: design_system_shared_1.BoxAlignItems.Center,
8
+ };
9
+ //# sourceMappingURL=Content.constants.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.constants.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":";;;AAAA,kFAGiD;AAEpC,QAAA,sBAAsB,GAG/B;IACF,CAAC,+CAAwB,CAAC,GAAG,CAAC,EAAE,oCAAa,CAAC,KAAK;IACnD,CAAC,+CAAwB,CAAC,MAAM,CAAC,EAAE,oCAAa,CAAC,MAAM;CACxD,CAAC","sourcesContent":["import {\n BoxAlignItems,\n ContentVerticalAlignment,\n} from '@metamask-previews/design-system-shared';\n\nexport const VERTICAL_ALIGNMENT_MAP: Record<\n ContentVerticalAlignment,\n BoxAlignItems\n> = {\n [ContentVerticalAlignment.Top]: BoxAlignItems.Start,\n [ContentVerticalAlignment.Center]: BoxAlignItems.Center,\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import { BoxAlignItems, ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
2
+ export declare const VERTICAL_ALIGNMENT_MAP: Record<ContentVerticalAlignment, BoxAlignItems>;
3
+ //# sourceMappingURL=Content.constants.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACzB,gDAAgD;AAEjD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,wBAAwB,EACxB,aAAa,CAId,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { BoxAlignItems, ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
2
+ export declare const VERTICAL_ALIGNMENT_MAP: Record<ContentVerticalAlignment, BoxAlignItems>;
3
+ //# sourceMappingURL=Content.constants.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACzB,gDAAgD;AAEjD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CACzC,wBAAwB,EACxB,aAAa,CAId,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { BoxAlignItems, ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
2
+ export const VERTICAL_ALIGNMENT_MAP = {
3
+ [ContentVerticalAlignment.Top]: BoxAlignItems.Start,
4
+ [ContentVerticalAlignment.Center]: BoxAlignItems.Center,
5
+ };
6
+ //# sourceMappingURL=Content.constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.constants.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACzB,gDAAgD;AAEjD,MAAM,CAAC,MAAM,sBAAsB,GAG/B;IACF,CAAC,wBAAwB,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,KAAK;IACnD,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM;CACxD,CAAC","sourcesContent":["import {\n BoxAlignItems,\n ContentVerticalAlignment,\n} from '@metamask-previews/design-system-shared';\n\nexport const VERTICAL_ALIGNMENT_MAP: Record<\n ContentVerticalAlignment,\n BoxAlignItems\n> = {\n [ContentVerticalAlignment.Top]: BoxAlignItems.Start,\n [ContentVerticalAlignment.Center]: BoxAlignItems.Center,\n};\n"]}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { ContentProps } from "./Content.types.cjs";
3
+ export declare const Content: React.FC<ContentProps>;
4
+ //# sourceMappingURL=Content.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,4BAAwB;AAEpD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoJ1C,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { ContentProps } from "./Content.types.mjs";
3
+ export declare const Content: React.FC<ContentProps>;
4
+ //# sourceMappingURL=Content.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,YAAY,EAAE,4BAAwB;AAEpD,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAoJ1C,CAAC"}
@@ -0,0 +1,71 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { ContentVerticalAlignment, FontWeight, TextColor, TextVariant } from "@metamask-previews/design-system-shared";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { BoxColumn } from "../BoxColumn/index.mjs";
11
+ import { BoxRow } from "../BoxRow/index.mjs";
12
+ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
13
+ import { VERTICAL_ALIGNMENT_MAP } from "./Content.constants.mjs";
14
+ export const Content = ({ startAccessory, endAccessory, topAccessory, bottomAccessory, verticalAlignment = ContentVerticalAlignment.Center, avatar, twClassName, title, titleProps, titleStartAccessory, titleEndAccessory, description, descriptionProps, descriptionStartAccessory, descriptionEndAccessory, value, valueProps, valueStartAccessory, valueEndAccessory, subvalue, subvalueProps, subvalueStartAccessory, subvalueEndAccessory, ...props }) => {
15
+ const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);
16
+ const contentRow = (<BoxRow startAccessory={startAccessory} endAccessory={endAccessory} alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]} gap={4} twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()} {...(hasColumnShell ? {} : props)}>
17
+ {avatar}
18
+ {/* Title and description Column */}
19
+ <BoxColumn twClassName="flex-1 min-w-0" bottomAccessory={description ? (<BoxRow twClassName="w-full" startAccessory={descriptionStartAccessory} endAccessory={descriptionEndAccessory} gap={1}>
20
+ <TextOrChildren textProps={{
21
+ variant: TextVariant.BodySm,
22
+ fontWeight: FontWeight.Medium,
23
+ color: TextColor.TextAlternative,
24
+ ...descriptionProps,
25
+ }}>
26
+ {description}
27
+ </TextOrChildren>
28
+ </BoxRow>) : null}>
29
+ {title ? (<BoxRow twClassName="w-full" startAccessory={titleStartAccessory} endAccessory={titleEndAccessory} gap={1}>
30
+ <TextOrChildren textProps={{
31
+ variant: TextVariant.BodyMd,
32
+ fontWeight: FontWeight.Medium,
33
+ color: TextColor.TextDefault,
34
+ ...titleProps,
35
+ }}>
36
+ {title}
37
+ </TextOrChildren>
38
+ </BoxRow>) : null}
39
+ </BoxColumn>
40
+ {/* Value and subvalue Column */}
41
+ {value || subvalue ? (<BoxColumn twClassName="min-w-0" bottomAccessory={subvalue ? (<BoxRow twClassName="w-full" startAccessory={subvalueStartAccessory} endAccessory={subvalueEndAccessory} gap={1}>
42
+ <TextOrChildren textProps={{
43
+ variant: TextVariant.BodySm,
44
+ fontWeight: FontWeight.Medium,
45
+ color: TextColor.TextAlternative,
46
+ ...subvalueProps,
47
+ }}>
48
+ {subvalue}
49
+ </TextOrChildren>
50
+ </BoxRow>) : null}>
51
+ {value ? (<BoxRow twClassName="w-full" startAccessory={valueStartAccessory} endAccessory={valueEndAccessory} gap={1}>
52
+ <TextOrChildren textProps={{
53
+ variant: TextVariant.BodyMd,
54
+ fontWeight: FontWeight.Medium,
55
+ color: TextColor.TextDefault,
56
+ ...valueProps,
57
+ }}>
58
+ {value}
59
+ </TextOrChildren>
60
+ </BoxRow>) : null}
61
+ </BoxColumn>) : null}
62
+ </BoxRow>);
63
+ if (hasColumnShell) {
64
+ return (<BoxColumn gap={1} topAccessory={topAccessory} bottomAccessory={bottomAccessory} twClassName={twClassName} {...props}>
65
+ {contentRow}
66
+ </BoxColumn>);
67
+ }
68
+ return contentRow;
69
+ };
70
+ Content.displayName = 'Content';
71
+ //# sourceMappingURL=Content.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,SAAS,EACT,WAAW,EACZ,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,cAAc,EAAE,oDAA0C;AAEnE,OAAO,EAAE,sBAAsB,EAAE,gCAA4B;AAG7D,MAAM,CAAC,MAAM,OAAO,GAA2B,CAAC,EAC9C,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,iBAAiB,GAAG,wBAAwB,CAAC,MAAM,EACnD,MAAM,EACN,WAAW,EACX,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,sBAAsB,EACtB,oBAAoB,EACpB,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,OAAO,CAAC,YAAY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CAAC,CAAC;oBACT,OAAO,EAAE,WAAW,CAAC,MAAM;oBAC3B,UAAU,EAAE,UAAU,CAAC,MAAM;oBAC7B,KAAK,EAAE,SAAS,CAAC,WAAW;oBAC5B,GAAG,UAAU;iBACd,CAAC,CAEF;gBAAA,CAAC,KAAK,CACR;cAAA,EAAE,cAAc,CAClB;YAAA,EAAE,MAAM,CAAC,CACV,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,SAAS,CAAC,CACb,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;IAEF,IAAI,cAAc,EAAE;QAClB,OAAO,CACL,CAAC,SAAS,CACR,GAAG,CAAC,CAAC,CAAC,CAAC,CACP,YAAY,CAAC,CAAC,YAAY,CAAC,CAC3B,eAAe,CAAC,CAAC,eAAe,CAAC,CACjC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,IAAI,KAAK,CAAC,CAEV;QAAA,CAAC,UAAU,CACb;MAAA,EAAE,SAAS,CAAC,CACb,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC","sourcesContent":["import {\n ContentVerticalAlignment,\n FontWeight,\n TextColor,\n TextVariant,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { BoxColumn } from '../BoxColumn';\nimport { BoxRow } from '../BoxRow';\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport { VERTICAL_ALIGNMENT_MAP } from './Content.constants';\nimport type { ContentProps } from './Content.types';\n\nexport const Content: React.FC<ContentProps> = ({\n startAccessory,\n endAccessory,\n topAccessory,\n bottomAccessory,\n verticalAlignment = ContentVerticalAlignment.Center,\n avatar,\n twClassName,\n title,\n titleProps,\n titleStartAccessory,\n titleEndAccessory,\n description,\n descriptionProps,\n descriptionStartAccessory,\n descriptionEndAccessory,\n value,\n valueProps,\n valueStartAccessory,\n valueEndAccessory,\n subvalue,\n subvalueProps,\n subvalueStartAccessory,\n subvalueEndAccessory,\n ...props\n}) => {\n const hasColumnShell = Boolean(topAccessory) || Boolean(bottomAccessory);\n\n const contentRow = (\n <BoxRow\n startAccessory={startAccessory}\n endAccessory={endAccessory}\n alignItems={VERTICAL_ALIGNMENT_MAP[verticalAlignment]}\n gap={4}\n twClassName={`min-h-[46px] ${hasColumnShell ? 'min-w-0' : (twClassName ?? '')}`.trim()}\n {...(hasColumnShell ? {} : props)}\n >\n {avatar}\n {/* Title and description Column */}\n <BoxColumn\n twClassName=\"flex-1 min-w-0\"\n bottomAccessory={\n description ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={descriptionStartAccessory}\n endAccessory={descriptionEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...descriptionProps,\n }}\n >\n {description}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {title ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={titleStartAccessory}\n endAccessory={titleEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...titleProps,\n }}\n >\n {title}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n {/* Value and subvalue Column */}\n {value || subvalue ? (\n <BoxColumn\n twClassName=\"min-w-0\"\n bottomAccessory={\n subvalue ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={subvalueStartAccessory}\n endAccessory={subvalueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodySm,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextAlternative,\n ...subvalueProps,\n }}\n >\n {subvalue}\n </TextOrChildren>\n </BoxRow>\n ) : null\n }\n >\n {value ? (\n <BoxRow\n twClassName=\"w-full\"\n startAccessory={valueStartAccessory}\n endAccessory={valueEndAccessory}\n gap={1}\n >\n <TextOrChildren\n textProps={{\n variant: TextVariant.BodyMd,\n fontWeight: FontWeight.Medium,\n color: TextColor.TextDefault,\n ...valueProps,\n }}\n >\n {value}\n </TextOrChildren>\n </BoxRow>\n ) : null}\n </BoxColumn>\n ) : null}\n </BoxRow>\n );\n\n if (hasColumnShell) {\n return (\n <BoxColumn\n gap={1}\n topAccessory={topAccessory}\n bottomAccessory={bottomAccessory}\n twClassName={twClassName}\n {...props}\n >\n {contentRow}\n </BoxColumn>\n );\n }\n\n return contentRow;\n};\n\nContent.displayName = 'Content';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Content.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.types.cjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for list rows (`title`, `avatar`, accessories, etc.).\n */\nexport type ContentProps = Omit<BoxProps, 'children'> &\n ContentPropsShared & {\n /**\n * Optional props for the title Text when `title` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n titleProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the description Text when `description` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n descriptionProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the value Text when `value` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n valueProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the subvalue Text when `subvalue` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n subvalueProps?: Partial<Omit<TextProps, 'children'>>;\n };\n"]}
@@ -0,0 +1,31 @@
1
+ import type { ContentPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BoxProps } from "../Box/Box.types.cjs";
3
+ import type { TextProps } from "../Text/Text.types.cjs";
4
+ /**
5
+ * Content component props.
6
+ *
7
+ * Props-only layout for list rows (`title`, `avatar`, accessories, etc.).
8
+ */
9
+ export type ContentProps = Omit<BoxProps, 'children'> & ContentPropsShared & {
10
+ /**
11
+ * Optional props for the title Text when `title` is a string.
12
+ * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
13
+ */
14
+ titleProps?: Partial<Omit<TextProps, 'children'>>;
15
+ /**
16
+ * Optional props for the description Text when `description` is a string.
17
+ * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
18
+ */
19
+ descriptionProps?: Partial<Omit<TextProps, 'children'>>;
20
+ /**
21
+ * Optional props for the value Text when `value` is a string.
22
+ * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
23
+ */
24
+ valueProps?: Partial<Omit<TextProps, 'children'>>;
25
+ /**
26
+ * Optional props for the subvalue Text when `subvalue` is a string.
27
+ * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
28
+ */
29
+ subvalueProps?: Partial<Omit<TextProps, 'children'>>;
30
+ };
31
+ //# sourceMappingURL=Content.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.types.d.cts","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gDAAgD;AAElF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GACnD,kBAAkB,GAAG;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;CACtD,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { ContentPropsShared } from "@metamask-previews/design-system-shared";
2
+ import type { BoxProps } from "../Box/Box.types.mjs";
3
+ import type { TextProps } from "../Text/Text.types.mjs";
4
+ /**
5
+ * Content component props.
6
+ *
7
+ * Props-only layout for list rows (`title`, `avatar`, accessories, etc.).
8
+ */
9
+ export type ContentProps = Omit<BoxProps, 'children'> & ContentPropsShared & {
10
+ /**
11
+ * Optional props for the title Text when `title` is a string.
12
+ * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
13
+ */
14
+ titleProps?: Partial<Omit<TextProps, 'children'>>;
15
+ /**
16
+ * Optional props for the description Text when `description` is a string.
17
+ * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
18
+ */
19
+ descriptionProps?: Partial<Omit<TextProps, 'children'>>;
20
+ /**
21
+ * Optional props for the value Text when `value` is a string.
22
+ * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.
23
+ */
24
+ valueProps?: Partial<Omit<TextProps, 'children'>>;
25
+ /**
26
+ * Optional props for the subvalue Text when `subvalue` is a string.
27
+ * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.
28
+ */
29
+ subvalueProps?: Partial<Omit<TextProps, 'children'>>;
30
+ };
31
+ //# sourceMappingURL=Content.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.types.d.mts","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,gDAAgD;AAElF,OAAO,KAAK,EAAE,QAAQ,EAAE,6BAAyB;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,+BAA2B;AAEpD;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,GACnD,kBAAkB,GAAG;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IACxD;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;IAClD;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC;CACtD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Content.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Content.types.mjs","sourceRoot":"","sources":["../../../src/components/Content/Content.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ContentPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { BoxProps } from '../Box/Box.types';\nimport type { TextProps } from '../Text/Text.types';\n\n/**\n * Content component props.\n *\n * Props-only layout for list rows (`title`, `avatar`, accessories, etc.).\n */\nexport type ContentProps = Omit<BoxProps, 'children'> &\n ContentPropsShared & {\n /**\n * Optional props for the title Text when `title` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n titleProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the description Text when `description` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n descriptionProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the value Text when `value` is a string.\n * Default: TextVariant.BodyMd, FontWeight.Medium, TextColor.TextDefault.\n */\n valueProps?: Partial<Omit<TextProps, 'children'>>;\n /**\n * Optional props for the subvalue Text when `subvalue` is a string.\n * Default: TextVariant.BodySm, FontWeight.Medium, TextColor.TextAlternative.\n */\n subvalueProps?: Partial<Omit<TextProps, 'children'>>;\n };\n"]}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Content = exports.ContentVerticalAlignment = void 0;
4
+ var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ Object.defineProperty(exports, "ContentVerticalAlignment", { enumerable: true, get: function () { return design_system_shared_1.ContentVerticalAlignment; } });
6
+ var Content_1 = require("./Content.cjs");
7
+ Object.defineProperty(exports, "Content", { enumerable: true, get: function () { return Content_1.Content; } });
8
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":";;;AAAA,gFAAmF;AAA1E,gIAAA,wBAAwB,OAAA;AACjC,yCAAoC;AAA3B,kGAAA,OAAO,OAAA","sourcesContent":["export { ContentVerticalAlignment } from '@metamask-previews/design-system-shared';\nexport { Content } from './Content';\nexport type { ContentProps } from './Content.types';\n"]}
@@ -0,0 +1,4 @@
1
+ export { ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
2
+ export { Content } from "./Content.cjs";
3
+ export type { ContentProps } from "./Content.types.cjs";
4
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,gDAAgD;AACnF,OAAO,EAAE,OAAO,EAAE,sBAAkB;AACpC,YAAY,EAAE,YAAY,EAAE,4BAAwB"}
@@ -0,0 +1,4 @@
1
+ export { ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
2
+ export { Content } from "./Content.mjs";
3
+ export type { ContentProps } from "./Content.types.mjs";
4
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,gDAAgD;AACnF,OAAO,EAAE,OAAO,EAAE,sBAAkB;AACpC,YAAY,EAAE,YAAY,EAAE,4BAAwB"}
@@ -0,0 +1,3 @@
1
+ export { ContentVerticalAlignment } from "@metamask-previews/design-system-shared";
2
+ export { Content } from "./Content.mjs";
3
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Content/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,gDAAgD;AACnF,OAAO,EAAE,OAAO,EAAE,sBAAkB","sourcesContent":["export { ContentVerticalAlignment } from '@metamask-previews/design-system-shared';\nexport { Content } from './Content';\nexport type { ContentProps } from './Content.types';\n"]}