@metamask-previews/design-system-react-native 0.13.0-preview.beee588 → 0.14.0-preview.dff9dce

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 (156) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/components/AvatarAccount/AvatarAccount.cjs +6 -6
  3. package/dist/components/AvatarAccount/AvatarAccount.cjs.map +1 -1
  4. package/dist/components/AvatarAccount/AvatarAccount.constants.cjs +6 -6
  5. package/dist/components/AvatarAccount/AvatarAccount.constants.cjs.map +1 -1
  6. package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts +1 -1
  7. package/dist/components/AvatarAccount/AvatarAccount.constants.d.cts.map +1 -1
  8. package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts +1 -1
  9. package/dist/components/AvatarAccount/AvatarAccount.constants.d.mts.map +1 -1
  10. package/dist/components/AvatarAccount/AvatarAccount.constants.mjs +1 -1
  11. package/dist/components/AvatarAccount/AvatarAccount.constants.mjs.map +1 -1
  12. package/dist/components/AvatarAccount/AvatarAccount.d.cts.map +1 -1
  13. package/dist/components/AvatarAccount/AvatarAccount.d.mts.map +1 -1
  14. package/dist/components/AvatarAccount/AvatarAccount.mjs +1 -1
  15. package/dist/components/AvatarAccount/AvatarAccount.mjs.map +1 -1
  16. package/dist/components/AvatarAccount/AvatarAccount.types.cjs.map +1 -1
  17. package/dist/components/AvatarAccount/AvatarAccount.types.d.cts +2 -12
  18. package/dist/components/AvatarAccount/AvatarAccount.types.d.cts.map +1 -1
  19. package/dist/components/AvatarAccount/AvatarAccount.types.d.mts +2 -12
  20. package/dist/components/AvatarAccount/AvatarAccount.types.d.mts.map +1 -1
  21. package/dist/components/AvatarAccount/AvatarAccount.types.mjs.map +1 -1
  22. package/dist/components/AvatarAccount/index.cjs +3 -3
  23. package/dist/components/AvatarAccount/index.cjs.map +1 -1
  24. package/dist/components/AvatarAccount/index.d.cts +1 -1
  25. package/dist/components/AvatarAccount/index.d.cts.map +1 -1
  26. package/dist/components/AvatarAccount/index.d.mts +1 -1
  27. package/dist/components/AvatarAccount/index.d.mts.map +1 -1
  28. package/dist/components/AvatarAccount/index.mjs +1 -1
  29. package/dist/components/AvatarAccount/index.mjs.map +1 -1
  30. package/dist/components/AvatarBase/index.cjs.map +1 -1
  31. package/dist/components/AvatarBase/index.d.cts.map +1 -1
  32. package/dist/components/AvatarBase/index.d.mts.map +1 -1
  33. package/dist/components/AvatarBase/index.mjs.map +1 -1
  34. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -1
  35. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  36. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  37. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  38. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -1
  39. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  40. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -1
  41. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  42. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  43. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  44. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +2 -1
  45. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  46. package/dist/components/AvatarToken/AvatarToken.cjs +3 -3
  47. package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
  48. package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
  49. package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
  50. package/dist/components/AvatarToken/AvatarToken.mjs +1 -1
  51. package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
  52. package/dist/components/AvatarToken/AvatarToken.types.cjs.map +1 -1
  53. package/dist/components/AvatarToken/AvatarToken.types.d.cts +5 -7
  54. package/dist/components/AvatarToken/AvatarToken.types.d.cts.map +1 -1
  55. package/dist/components/AvatarToken/AvatarToken.types.d.mts +5 -7
  56. package/dist/components/AvatarToken/AvatarToken.types.d.mts.map +1 -1
  57. package/dist/components/AvatarToken/AvatarToken.types.mjs.map +1 -1
  58. package/dist/components/AvatarToken/index.cjs +2 -2
  59. package/dist/components/AvatarToken/index.cjs.map +1 -1
  60. package/dist/components/AvatarToken/index.d.cts +1 -1
  61. package/dist/components/AvatarToken/index.d.cts.map +1 -1
  62. package/dist/components/AvatarToken/index.d.mts +1 -1
  63. package/dist/components/AvatarToken/index.d.mts.map +1 -1
  64. package/dist/components/AvatarToken/index.mjs +1 -1
  65. package/dist/components/AvatarToken/index.mjs.map +1 -1
  66. package/dist/components/BannerBase/BannerBase.cjs +4 -3
  67. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  68. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  69. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  70. package/dist/components/BannerBase/BannerBase.mjs +2 -1
  71. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  72. package/dist/components/Icon/Icon.cjs +2 -1
  73. package/dist/components/Icon/Icon.cjs.map +1 -1
  74. package/dist/components/Icon/Icon.constants.cjs +12 -0
  75. package/dist/components/Icon/Icon.constants.cjs.map +1 -0
  76. package/dist/components/Icon/Icon.constants.d.cts +3 -0
  77. package/dist/components/Icon/Icon.constants.d.cts.map +1 -0
  78. package/dist/components/Icon/Icon.constants.d.mts +3 -0
  79. package/dist/components/Icon/Icon.constants.d.mts.map +1 -0
  80. package/dist/components/Icon/Icon.constants.mjs +9 -0
  81. package/dist/components/Icon/Icon.constants.mjs.map +1 -0
  82. package/dist/components/Icon/Icon.d.cts.map +1 -1
  83. package/dist/components/Icon/Icon.d.mts.map +1 -1
  84. package/dist/components/Icon/Icon.mjs +2 -1
  85. package/dist/components/Icon/Icon.mjs.map +1 -1
  86. package/dist/components/Input/Input.cjs +3 -3
  87. package/dist/components/Input/Input.cjs.map +1 -1
  88. package/dist/components/Input/Input.constants.cjs +15 -15
  89. package/dist/components/Input/Input.constants.cjs.map +1 -1
  90. package/dist/components/Input/Input.constants.d.cts +1 -1
  91. package/dist/components/Input/Input.constants.d.cts.map +1 -1
  92. package/dist/components/Input/Input.constants.d.mts +1 -1
  93. package/dist/components/Input/Input.constants.d.mts.map +1 -1
  94. package/dist/components/Input/Input.constants.mjs +1 -1
  95. package/dist/components/Input/Input.constants.mjs.map +1 -1
  96. package/dist/components/Input/Input.d.cts +1 -1
  97. package/dist/components/Input/Input.d.cts.map +1 -1
  98. package/dist/components/Input/Input.d.mts +1 -1
  99. package/dist/components/Input/Input.d.mts.map +1 -1
  100. package/dist/components/Input/Input.mjs +1 -1
  101. package/dist/components/Input/Input.mjs.map +1 -1
  102. package/dist/components/Input/Input.types.cjs.map +1 -1
  103. package/dist/components/Input/Input.types.d.cts +1 -1
  104. package/dist/components/Input/Input.types.d.cts.map +1 -1
  105. package/dist/components/Input/Input.types.d.mts +1 -1
  106. package/dist/components/Input/Input.types.d.mts.map +1 -1
  107. package/dist/components/Input/Input.types.mjs.map +1 -1
  108. package/dist/components/Text/Text.cjs +4 -4
  109. package/dist/components/Text/Text.cjs.map +1 -1
  110. package/dist/components/Text/Text.constants.cjs +18 -23
  111. package/dist/components/Text/Text.constants.cjs.map +1 -1
  112. package/dist/components/Text/Text.constants.d.cts +1 -1
  113. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  114. package/dist/components/Text/Text.constants.d.mts +1 -1
  115. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  116. package/dist/components/Text/Text.constants.mjs +15 -20
  117. package/dist/components/Text/Text.constants.mjs.map +1 -1
  118. package/dist/components/Text/Text.d.cts.map +1 -1
  119. package/dist/components/Text/Text.d.mts.map +1 -1
  120. package/dist/components/Text/Text.mjs +1 -1
  121. package/dist/components/Text/Text.mjs.map +1 -1
  122. package/dist/components/Text/Text.types.cjs.map +1 -1
  123. package/dist/components/Text/Text.types.d.cts +3 -17
  124. package/dist/components/Text/Text.types.d.cts.map +1 -1
  125. package/dist/components/Text/Text.types.d.mts +3 -17
  126. package/dist/components/Text/Text.types.d.mts.map +1 -1
  127. package/dist/components/Text/Text.types.mjs.map +1 -1
  128. package/dist/components/Text/index.cjs +7 -7
  129. package/dist/components/Text/index.cjs.map +1 -1
  130. package/dist/components/Text/index.d.cts +1 -1
  131. package/dist/components/Text/index.d.cts.map +1 -1
  132. package/dist/components/Text/index.d.mts +1 -1
  133. package/dist/components/Text/index.d.mts.map +1 -1
  134. package/dist/components/Text/index.mjs +1 -1
  135. package/dist/components/Text/index.mjs.map +1 -1
  136. package/dist/components/TextButton/TextButton.cjs +3 -3
  137. package/dist/components/TextButton/TextButton.cjs.map +1 -1
  138. package/dist/components/TextButton/TextButton.d.cts.map +1 -1
  139. package/dist/components/TextButton/TextButton.d.mts.map +1 -1
  140. package/dist/components/TextButton/TextButton.mjs +1 -1
  141. package/dist/components/TextButton/TextButton.mjs.map +1 -1
  142. package/dist/components/TextField/TextField.cjs +2 -2
  143. package/dist/components/TextField/TextField.cjs.map +1 -1
  144. package/dist/components/TextField/TextField.d.cts.map +1 -1
  145. package/dist/components/TextField/TextField.d.mts.map +1 -1
  146. package/dist/components/TextField/TextField.mjs +1 -1
  147. package/dist/components/TextField/TextField.mjs.map +1 -1
  148. package/dist/types/index.cjs +11 -131
  149. package/dist/types/index.cjs.map +1 -1
  150. package/dist/types/index.d.cts +5 -113
  151. package/dist/types/index.d.cts.map +1 -1
  152. package/dist/types/index.d.mts +5 -113
  153. package/dist/types/index.d.mts.map +1 -1
  154. package/dist/types/index.mjs +5 -123
  155. package/dist/types/index.mjs.map +1 -1
  156. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -7,6 +7,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.14.0]
11
+
12
+ ### Added
13
+
14
+ - Added `HeaderRoot` as a new root primitive for React Native header composition ([#1029](https://github.com/MetaMask/metamask-design-system/pull/1029)).
15
+ - Added `HeaderStandard` for standardized title + action header layouts in mobile screens ([#1028](https://github.com/MetaMask/metamask-design-system/pull/1028), [#1030](https://github.com/MetaMask/metamask-design-system/pull/1030)).
16
+ - Added `TextFieldSearch` for search-style text input flows on mobile ([#1027](https://github.com/MetaMask/metamask-design-system/pull/1027)).
17
+ - Added `BoxHorizontal` and `BoxVertical` utility components for common directional layout composition ([#1003](https://github.com/MetaMask/metamask-design-system/pull/1003)).
18
+
19
+ ### Changed
20
+
21
+ - **BREAKING:** Replaced BottomSheet `shouldNavigateBack` with an optional `goBack` callback for explicit navigation handling in host apps ([#1024](https://github.com/MetaMask/metamask-design-system/pull/1024)).
22
+ - Remove `shouldNavigateBack` usage and pass `goBack` when you want the sheet close action to navigate back.
23
+ - See [Migration Guide](./MIGRATION.md#from-version-0130-to-0140).
24
+ - Added `panGestureHandlerProps` support to `BottomSheet` so integrators can customize gesture-handler behavior ([#1016](https://github.com/MetaMask/metamask-design-system/pull/1016)).
25
+ - Migrated React Native package exports from default exports to named exports for more consistent import ergonomics across the library ([#1032](https://github.com/MetaMask/metamask-design-system/pull/1032)).
26
+ - **BREAKING:** Updated `AvatarBase` exports to use shared const-object + string-union types instead of local enums ([#1005](https://github.com/MetaMask/metamask-design-system/pull/1005)).
27
+ - No migration required for typical usage; continue importing from `@metamask/design-system-react-native` as before.
28
+ - Runtime values remain stable while type definitions follow ADR-0003/ADR-0004.
29
+ - Updated `@metamask/utils` peer dependency to `^11.11.0` ([#1033](https://github.com/MetaMask/metamask-design-system/pull/1033)).
30
+ - Expanded `BannerBase` migration documentation to improve upgrade guidance for consumers ([#1011](https://github.com/MetaMask/metamask-design-system/pull/1011)).
31
+
32
+ ### Fixed
33
+
34
+ - Updated `BottomSheetHeader` action button size to `md` for consistent sizing and visual alignment ([#1012](https://github.com/MetaMask/metamask-design-system/pull/1012)).
35
+
10
36
  ## [0.13.0]
11
37
 
12
38
  ### Changed
@@ -262,7 +288,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
262
288
  - Full TypeScript support with type definitions and enums
263
289
  - React Native integration with TWRNC preset support
264
290
 
265
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.13.0...HEAD
291
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.14.0...HEAD
292
+ [0.14.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.13.0...@metamask/design-system-react-native@0.14.0
266
293
  [0.13.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.12.0...@metamask/design-system-react-native@0.13.0
267
294
  [0.12.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.11.0...@metamask/design-system-react-native@0.12.0
268
295
  [0.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.10.0...@metamask/design-system-react-native@0.11.0
@@ -4,28 +4,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.AvatarAccount = void 0;
7
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
7
8
  const react_1 = __importDefault(require("react"));
8
- const types_1 = require("../../types/index.cjs");
9
9
  const AvatarBase_1 = require("../AvatarBase/index.cjs");
10
10
  const Blockies_1 = require("../temp-components/Blockies/index.cjs");
11
11
  const Jazzicon_1 = require("../temp-components/Jazzicon/index.cjs");
12
12
  const Maskicon_1 = require("../temp-components/Maskicon/index.cjs");
13
13
  const AvatarAccount_constants_1 = require("./AvatarAccount.constants.cjs");
14
- const AvatarAccount = ({ address, variant = types_1.AvatarAccountVariant.Jazzicon, size = types_1.AvatarAccountSize.Md, blockiesProps, jazziconProps, maskiconProps, ...props }) => {
14
+ const AvatarAccount = ({ address, variant = design_system_shared_1.AvatarAccountVariant.Jazzicon, size = design_system_shared_1.AvatarAccountSize.Md, blockiesProps, jazziconProps, maskiconProps, ...props }) => {
15
15
  let AvatarArtComponent;
16
16
  switch (variant) {
17
- case types_1.AvatarAccountVariant.Blockies:
17
+ case design_system_shared_1.AvatarAccountVariant.Blockies:
18
18
  AvatarArtComponent = (<Blockies_1.Blockies address={address} size={AvatarAccount_constants_1.MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]} {...blockiesProps}/>);
19
19
  break;
20
- case types_1.AvatarAccountVariant.Maskicon:
20
+ case design_system_shared_1.AvatarAccountVariant.Maskicon:
21
21
  AvatarArtComponent = (<Maskicon_1.Maskicon address={address} size={AvatarAccount_constants_1.MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]} {...maskiconProps}/>);
22
22
  break;
23
- case types_1.AvatarAccountVariant.Jazzicon:
23
+ case design_system_shared_1.AvatarAccountVariant.Jazzicon:
24
24
  default:
25
25
  AvatarArtComponent = (<Jazzicon_1.Jazzicon address={address} size={AvatarAccount_constants_1.MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]} {...jazziconProps}/>);
26
26
  break;
27
27
  }
28
- return (<AvatarBase_1.AvatarBase size={size} shape={types_1.AvatarBaseShape.Square} accessibilityRole="image" {...props}>
28
+ return (<AvatarBase_1.AvatarBase size={size} shape={design_system_shared_1.AvatarBaseShape.Square} accessibilityRole="image" {...props}>
29
29
  {AvatarArtComponent}
30
30
  </AvatarBase_1.AvatarBase>);
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,iDAIqB;AACrB,wDAA2C;AAC3C,oEAAuD;AACvD,oEAAuD;AACvD,oEAAuD;AAEvD,2EAA8E;AAGvE,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,OAAO,GAAG,4BAAoB,CAAC,QAAQ,EACvC,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,IAAI,kBAAkB,CAAC;IAEvB,QAAQ,OAAO,EAAE;QACf,KAAK,4BAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,mBAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,2DAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,4BAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,mBAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,2DAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,4BAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,CAAC,mBAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,2DAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,uBAAe,CAAC,MAAM,CAAC,CAC9B,iBAAiB,CAAC,OAAO,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,aAAa,iBAoDxB","sourcesContent":["import React from 'react';\n\nimport {\n AvatarAccountSize,\n AvatarBaseShape,\n AvatarAccountVariant,\n} from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { Blockies } from '../temp-components/Blockies';\nimport { Jazzicon } from '../temp-components/Jazzicon';\nimport { Maskicon } from '../temp-components/Maskicon';\n\nimport { MAP_AVATARACCOUNT_SIZE_SIZENUMBER } from './AvatarAccount.constants';\nimport type { AvatarAccountProps } from './AvatarAccount.types';\n\nexport const AvatarAccount = ({\n address,\n variant = AvatarAccountVariant.Jazzicon,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n}: AvatarAccountProps) => {\n let AvatarArtComponent;\n\n switch (variant) {\n case AvatarAccountVariant.Blockies:\n AvatarArtComponent = (\n <Blockies\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...blockiesProps}\n />\n );\n break;\n case AvatarAccountVariant.Maskicon:\n AvatarArtComponent = (\n <Maskicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...maskiconProps}\n />\n );\n break;\n case AvatarAccountVariant.Jazzicon:\n default:\n AvatarArtComponent = (\n <Jazzicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...jazziconProps}\n />\n );\n break;\n }\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n accessibilityRole=\"image\"\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n};\n"]}
1
+ {"version":3,"file":"AvatarAccount.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":";;;;;;AAAA,kFAIiD;AACjD,kDAA0B;AAE1B,wDAA2C;AAC3C,oEAAuD;AACvD,oEAAuD;AACvD,oEAAuD;AAEvD,2EAA8E;AAGvE,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,OAAO,GAAG,2CAAoB,CAAC,QAAQ,EACvC,IAAI,GAAG,wCAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,IAAI,kBAAkB,CAAC;IAEvB,QAAQ,OAAO,EAAE;QACf,KAAK,2CAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,mBAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,2DAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,2CAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,mBAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,2DAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,2CAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,CAAC,mBAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,2DAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,sCAAe,CAAC,MAAM,CAAC,CAC9B,iBAAiB,CAAC,OAAO,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AApDW,QAAA,aAAa,iBAoDxB","sourcesContent":["import {\n AvatarAccountSize,\n AvatarAccountVariant,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { AvatarBase } from '../AvatarBase';\nimport { Blockies } from '../temp-components/Blockies';\nimport { Jazzicon } from '../temp-components/Jazzicon';\nimport { Maskicon } from '../temp-components/Maskicon';\n\nimport { MAP_AVATARACCOUNT_SIZE_SIZENUMBER } from './AvatarAccount.constants';\nimport type { AvatarAccountProps } from './AvatarAccount.types';\n\nexport const AvatarAccount = ({\n address,\n variant = AvatarAccountVariant.Jazzicon,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n}: AvatarAccountProps) => {\n let AvatarArtComponent;\n\n switch (variant) {\n case AvatarAccountVariant.Blockies:\n AvatarArtComponent = (\n <Blockies\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...blockiesProps}\n />\n );\n break;\n case AvatarAccountVariant.Maskicon:\n AvatarArtComponent = (\n <Maskicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...maskiconProps}\n />\n );\n break;\n case AvatarAccountVariant.Jazzicon:\n default:\n AvatarArtComponent = (\n <Jazzicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...jazziconProps}\n />\n );\n break;\n }\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n accessibilityRole=\"image\"\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n};\n"]}
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SAMPLE_AVATARACCOUNT_ADDRESSES = exports.MAP_AVATARACCOUNT_SIZE_SIZENUMBER = void 0;
4
- const types_1 = require("../../types/index.cjs");
4
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
5
  exports.MAP_AVATARACCOUNT_SIZE_SIZENUMBER = {
6
- [types_1.AvatarAccountSize.Xs]: 16,
7
- [types_1.AvatarAccountSize.Sm]: 24,
8
- [types_1.AvatarAccountSize.Md]: 32,
9
- [types_1.AvatarAccountSize.Lg]: 40,
10
- [types_1.AvatarAccountSize.Xl]: 48,
6
+ [design_system_shared_1.AvatarAccountSize.Xs]: 16,
7
+ [design_system_shared_1.AvatarAccountSize.Sm]: 24,
8
+ [design_system_shared_1.AvatarAccountSize.Md]: 32,
9
+ [design_system_shared_1.AvatarAccountSize.Lg]: 40,
10
+ [design_system_shared_1.AvatarAccountSize.Xl]: 48,
11
11
  };
12
12
  // Sample account addresses
13
13
  exports.SAMPLE_AVATARACCOUNT_ADDRESSES = [
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.constants.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":";;;AAAA,iDAAgD;AAEnC,QAAA,iCAAiC,GAG1C;IACF,CAAC,yBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,yBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,yBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,yBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,yBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;CAC3B,CAAC;AAEF,2BAA2B;AACd,QAAA,8BAA8B,GAAG;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;CAC7C,CAAC","sourcesContent":["import { AvatarAccountSize } from '../../types';\n\nexport const MAP_AVATARACCOUNT_SIZE_SIZENUMBER: Record<\n AvatarAccountSize,\n number\n> = {\n [AvatarAccountSize.Xs]: 16,\n [AvatarAccountSize.Sm]: 24,\n [AvatarAccountSize.Md]: 32,\n [AvatarAccountSize.Lg]: 40,\n [AvatarAccountSize.Xl]: 48,\n};\n\n// Sample account addresses\nexport const SAMPLE_AVATARACCOUNT_ADDRESSES = [\n '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8',\n '0xb9b81f6bd23B953c5257C3b5E2F0c03B07E944eB',\n '0x360507dfEC4Bf0c03495f91154A78C672599F308',\n '0x50cA820Ff810F7687E7d0aDb23A830e3ac6032C3',\n '0x840C9Eb73729E626673714D6E4dA8afc8Ccc90d3',\n '0xCA0361BE89B7d47a6233d1875F0727ddeAB23377',\n '0xD78CBcA88eCd65c6128511e46a518CDc6c66fC74',\n '0xCFc8b1d1031ef2ecce3a98d5D79ce4D75Edb06bA',\n '0xDe53fa2E659b6134991bB56F64B691990e5C44E7',\n '0x8AceA3A9748294d1B5C25a08EFE37b756AafDFdd',\n '0xEC5CE72f2e18B0017C88F7B12d3308119C5Cf129',\n '0xeC56Da21c90Af6b50E4Ba5ec252bD97e735290fc',\n];\n"]}
1
+ {"version":3,"file":"AvatarAccount.constants.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":";;;AAAA,kFAA4E;AAE/D,QAAA,iCAAiC,GAG1C;IACF,CAAC,wCAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,wCAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,wCAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,wCAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,wCAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;CAC3B,CAAC;AAEF,2BAA2B;AACd,QAAA,8BAA8B,GAAG;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;CAC7C,CAAC","sourcesContent":["import { AvatarAccountSize } from '@metamask-previews/design-system-shared';\n\nexport const MAP_AVATARACCOUNT_SIZE_SIZENUMBER: Record<\n AvatarAccountSize,\n number\n> = {\n [AvatarAccountSize.Xs]: 16,\n [AvatarAccountSize.Sm]: 24,\n [AvatarAccountSize.Md]: 32,\n [AvatarAccountSize.Lg]: 40,\n [AvatarAccountSize.Xl]: 48,\n};\n\n// Sample account addresses\nexport const SAMPLE_AVATARACCOUNT_ADDRESSES = [\n '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8',\n '0xb9b81f6bd23B953c5257C3b5E2F0c03B07E944eB',\n '0x360507dfEC4Bf0c03495f91154A78C672599F308',\n '0x50cA820Ff810F7687E7d0aDb23A830e3ac6032C3',\n '0x840C9Eb73729E626673714D6E4dA8afc8Ccc90d3',\n '0xCA0361BE89B7d47a6233d1875F0727ddeAB23377',\n '0xD78CBcA88eCd65c6128511e46a518CDc6c66fC74',\n '0xCFc8b1d1031ef2ecce3a98d5D79ce4D75Edb06bA',\n '0xDe53fa2E659b6134991bB56F64B691990e5C44E7',\n '0x8AceA3A9748294d1B5C25a08EFE37b756AafDFdd',\n '0xEC5CE72f2e18B0017C88F7B12d3308119C5Cf129',\n '0xeC56Da21c90Af6b50E4Ba5ec252bD97e735290fc',\n];\n"]}
@@ -1,4 +1,4 @@
1
- import { AvatarAccountSize } from "../../types/index.cjs";
1
+ import { AvatarAccountSize } from "@metamask-previews/design-system-shared";
2
2
  export declare const MAP_AVATARACCOUNT_SIZE_SIZENUMBER: Record<AvatarAccountSize, number>;
3
3
  export declare const SAMPLE_AVATARACCOUNT_ADDRESSES: string[];
4
4
  //# sourceMappingURL=AvatarAccount.constants.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.constants.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAEhD,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,iBAAiB,EACjB,MAAM,CAOP,CAAC;AAGF,eAAO,MAAM,8BAA8B,UAa1C,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.constants.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gDAAgD;AAE5E,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,iBAAiB,EACjB,MAAM,CAOP,CAAC;AAGF,eAAO,MAAM,8BAA8B,UAa1C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AvatarAccountSize } from "../../types/index.mjs";
1
+ import { AvatarAccountSize } from "@metamask-previews/design-system-shared";
2
2
  export declare const MAP_AVATARACCOUNT_SIZE_SIZENUMBER: Record<AvatarAccountSize, number>;
3
3
  export declare const SAMPLE_AVATARACCOUNT_ADDRESSES: string[];
4
4
  //# sourceMappingURL=AvatarAccount.constants.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.constants.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAEhD,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,iBAAiB,EACjB,MAAM,CAOP,CAAC;AAGF,eAAO,MAAM,8BAA8B,UAa1C,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.constants.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gDAAgD;AAE5E,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,iBAAiB,EACjB,MAAM,CAOP,CAAC;AAGF,eAAO,MAAM,8BAA8B,UAa1C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AvatarAccountSize } from "../../types/index.mjs";
1
+ import { AvatarAccountSize } from "@metamask-previews/design-system-shared";
2
2
  export const MAP_AVATARACCOUNT_SIZE_SIZENUMBER = {
3
3
  [AvatarAccountSize.Xs]: 16,
4
4
  [AvatarAccountSize.Sm]: 24,
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.constants.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAEhD,MAAM,CAAC,MAAM,iCAAiC,GAG1C;IACF,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;CAC3B,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;CAC7C,CAAC","sourcesContent":["import { AvatarAccountSize } from '../../types';\n\nexport const MAP_AVATARACCOUNT_SIZE_SIZENUMBER: Record<\n AvatarAccountSize,\n number\n> = {\n [AvatarAccountSize.Xs]: 16,\n [AvatarAccountSize.Sm]: 24,\n [AvatarAccountSize.Md]: 32,\n [AvatarAccountSize.Lg]: 40,\n [AvatarAccountSize.Xl]: 48,\n};\n\n// Sample account addresses\nexport const SAMPLE_AVATARACCOUNT_ADDRESSES = [\n '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8',\n '0xb9b81f6bd23B953c5257C3b5E2F0c03B07E944eB',\n '0x360507dfEC4Bf0c03495f91154A78C672599F308',\n '0x50cA820Ff810F7687E7d0aDb23A830e3ac6032C3',\n '0x840C9Eb73729E626673714D6E4dA8afc8Ccc90d3',\n '0xCA0361BE89B7d47a6233d1875F0727ddeAB23377',\n '0xD78CBcA88eCd65c6128511e46a518CDc6c66fC74',\n '0xCFc8b1d1031ef2ecce3a98d5D79ce4D75Edb06bA',\n '0xDe53fa2E659b6134991bB56F64B691990e5C44E7',\n '0x8AceA3A9748294d1B5C25a08EFE37b756AafDFdd',\n '0xEC5CE72f2e18B0017C88F7B12d3308119C5Cf129',\n '0xeC56Da21c90Af6b50E4Ba5ec252bD97e735290fc',\n];\n"]}
1
+ {"version":3,"file":"AvatarAccount.constants.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,gDAAgD;AAE5E,MAAM,CAAC,MAAM,iCAAiC,GAG1C;IACF,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;IAC1B,CAAC,iBAAiB,CAAC,EAAE,CAAC,EAAE,EAAE;CAC3B,CAAC;AAEF,2BAA2B;AAC3B,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;IAC5C,4CAA4C;CAC7C,CAAC","sourcesContent":["import { AvatarAccountSize } from '@metamask-previews/design-system-shared';\n\nexport const MAP_AVATARACCOUNT_SIZE_SIZENUMBER: Record<\n AvatarAccountSize,\n number\n> = {\n [AvatarAccountSize.Xs]: 16,\n [AvatarAccountSize.Sm]: 24,\n [AvatarAccountSize.Md]: 32,\n [AvatarAccountSize.Lg]: 40,\n [AvatarAccountSize.Xl]: 48,\n};\n\n// Sample account addresses\nexport const SAMPLE_AVATARACCOUNT_ADDRESSES = [\n '0x9Cbf7c41B7787F6c621115010D3B044029FE2Ce8',\n '0xb9b81f6bd23B953c5257C3b5E2F0c03B07E944eB',\n '0x360507dfEC4Bf0c03495f91154A78C672599F308',\n '0x50cA820Ff810F7687E7d0aDb23A830e3ac6032C3',\n '0x840C9Eb73729E626673714D6E4dA8afc8Ccc90d3',\n '0xCA0361BE89B7d47a6233d1875F0727ddeAB23377',\n '0xD78CBcA88eCd65c6128511e46a518CDc6c66fC74',\n '0xCFc8b1d1031ef2ecce3a98d5D79ce4D75Edb06bA',\n '0xDe53fa2E659b6134991bB56F64B691990e5C44E7',\n '0x8AceA3A9748294d1B5C25a08EFE37b756AafDFdd',\n '0xEC5CE72f2e18B0017C88F7B12d3308119C5Cf129',\n '0xeC56Da21c90Af6b50E4Ba5ec252bD97e735290fc',\n];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAa1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,sFAQvB,kBAAkB,sBA4CpB,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,sFAQvB,kBAAkB,sBA4CpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAa1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,sFAQvB,kBAAkB,sBA4CpB,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,cAAc;AAQ1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,sFAQvB,kBAAkB,sBA4CpB,CAAC"}
@@ -4,9 +4,9 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { AvatarAccountSize, AvatarAccountVariant, AvatarBaseShape } from "@metamask-previews/design-system-shared";
7
8
  import $React from "react";
8
9
  const React = $importDefault($React);
9
- import { AvatarAccountSize, AvatarBaseShape, AvatarAccountVariant } from "../../types/index.mjs";
10
10
  import { AvatarBase } from "../AvatarBase/index.mjs";
11
11
  import { Blockies } from "../temp-components/Blockies/index.mjs";
12
12
  import { Jazzicon } from "../temp-components/Jazzicon/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAE1B,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,oBAAoB,EACrB,8BAAoB;AACrB,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,8CAAoC;AACvD,OAAO,EAAE,QAAQ,EAAE,8CAAoC;AACvD,OAAO,EAAE,QAAQ,EAAE,8CAAoC;AAEvD,OAAO,EAAE,iCAAiC,EAAE,sCAAkC;AAG9E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EACvC,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,IAAI,kBAAkB,CAAC;IAEvB,QAAQ,OAAO,EAAE;QACf,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,QAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,QAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,CAAC,QAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAC9B,iBAAiB,CAAC,OAAO,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\n\nimport {\n AvatarAccountSize,\n AvatarBaseShape,\n AvatarAccountVariant,\n} from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { Blockies } from '../temp-components/Blockies';\nimport { Jazzicon } from '../temp-components/Jazzicon';\nimport { Maskicon } from '../temp-components/Maskicon';\n\nimport { MAP_AVATARACCOUNT_SIZE_SIZENUMBER } from './AvatarAccount.constants';\nimport type { AvatarAccountProps } from './AvatarAccount.types';\n\nexport const AvatarAccount = ({\n address,\n variant = AvatarAccountVariant.Jazzicon,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n}: AvatarAccountProps) => {\n let AvatarArtComponent;\n\n switch (variant) {\n case AvatarAccountVariant.Blockies:\n AvatarArtComponent = (\n <Blockies\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...blockiesProps}\n />\n );\n break;\n case AvatarAccountVariant.Maskicon:\n AvatarArtComponent = (\n <Maskicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...maskiconProps}\n />\n );\n break;\n case AvatarAccountVariant.Jazzicon:\n default:\n AvatarArtComponent = (\n <Jazzicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...jazziconProps}\n />\n );\n break;\n }\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n accessibilityRole=\"image\"\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n};\n"]}
1
+ {"version":3,"file":"AvatarAccount.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EAChB,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,QAAQ,EAAE,8CAAoC;AACvD,OAAO,EAAE,QAAQ,EAAE,8CAAoC;AACvD,OAAO,EAAE,QAAQ,EAAE,8CAAoC;AAEvD,OAAO,EAAE,iCAAiC,EAAE,sCAAkC;AAG9E,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EACvC,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,IAAI,kBAAkB,CAAC;IAEvB,QAAQ,OAAO,EAAE;QACf,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,QAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,CAAC,QAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,CAAC,QAAQ,CACP,OAAO,CAAC,CAAC,OAAO,CAAC,CACjB,IAAI,CAAC,CAAC,iCAAiC,CAAC,IAAI,CAAC,CAAC,CAC9C,IAAI,aAAa,CAAC,EAClB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAC9B,iBAAiB,CAAC,OAAO,CACzB,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,kBAAkB,CACrB;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n AvatarAccountSize,\n AvatarAccountVariant,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\n\nimport { AvatarBase } from '../AvatarBase';\nimport { Blockies } from '../temp-components/Blockies';\nimport { Jazzicon } from '../temp-components/Jazzicon';\nimport { Maskicon } from '../temp-components/Maskicon';\n\nimport { MAP_AVATARACCOUNT_SIZE_SIZENUMBER } from './AvatarAccount.constants';\nimport type { AvatarAccountProps } from './AvatarAccount.types';\n\nexport const AvatarAccount = ({\n address,\n variant = AvatarAccountVariant.Jazzicon,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n}: AvatarAccountProps) => {\n let AvatarArtComponent;\n\n switch (variant) {\n case AvatarAccountVariant.Blockies:\n AvatarArtComponent = (\n <Blockies\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...blockiesProps}\n />\n );\n break;\n case AvatarAccountVariant.Maskicon:\n AvatarArtComponent = (\n <Maskicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...maskiconProps}\n />\n );\n break;\n case AvatarAccountVariant.Jazzicon:\n default:\n AvatarArtComponent = (\n <Jazzicon\n address={address}\n size={MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size]}\n {...jazziconProps}\n />\n );\n break;\n }\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n accessibilityRole=\"image\"\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarAccountVariant } from '../../types';\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { BlockiesProps } from '../temp-components/Blockies';\nimport type { JazziconProps } from '../temp-components/Jazzicon';\nimport type { MaskiconProps } from '../temp-components/Maskicon';\n\n/**\n * AvatarAccount component props.\n */\nexport type AvatarAccountProps = {\n /**\n * Required address used as a unique identifier to generate the AvatarAccount art.\n */\n address: string;\n /**\n * Optional prop to control the variant of the avatar account\n *\n * @default AvatarAccountVariant.Jazzicon\n */\n variant?: AvatarAccountVariant;\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<BlockiesProps>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<JazziconProps>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<MaskiconProps>;\n} & Omit<AvatarBaseProps, 'children' | 'fallbackText' | 'fallbackTextProps'>;\n"]}
1
+ {"version":3,"file":"AvatarAccount.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarAccountPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { BlockiesProps } from '../temp-components/Blockies';\nimport type { JazziconProps } from '../temp-components/Jazzicon';\nimport type { MaskiconProps } from '../temp-components/Maskicon';\n\n/**\n * AvatarAccount component props.\n */\nexport type AvatarAccountProps = AvatarAccountPropsShared & {\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<BlockiesProps>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<JazziconProps>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<MaskiconProps>;\n} & Omit<AvatarBaseProps, 'children' | 'fallbackText' | 'fallbackTextProps'>;\n"]}
@@ -1,4 +1,4 @@
1
- import type { AvatarAccountVariant } from "../../types/index.cjs";
1
+ import type { AvatarAccountPropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { AvatarBaseProps } from "../AvatarBase/index.cjs";
3
3
  import type { BlockiesProps } from "../temp-components/Blockies/index.cjs";
4
4
  import type { JazziconProps } from "../temp-components/Jazzicon/index.cjs";
@@ -6,17 +6,7 @@ import type { MaskiconProps } from "../temp-components/Maskicon/index.cjs";
6
6
  /**
7
7
  * AvatarAccount component props.
8
8
  */
9
- export type AvatarAccountProps = {
10
- /**
11
- * Required address used as a unique identifier to generate the AvatarAccount art.
12
- */
13
- address: string;
14
- /**
15
- * Optional prop to control the variant of the avatar account
16
- *
17
- * @default AvatarAccountVariant.Jazzicon
18
- */
19
- variant?: AvatarAccountVariant;
9
+ export type AvatarAccountProps = AvatarAccountPropsShared & {
20
10
  /**
21
11
  * Optional props to be passed to the Blockies component
22
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,8BAAoB;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AAEjE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACxC,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AAExF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AAEjE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACxC,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { AvatarAccountVariant } from "../../types/index.mjs";
1
+ import type { AvatarAccountPropsShared } from "@metamask-previews/design-system-shared";
2
2
  import type { AvatarBaseProps } from "../AvatarBase/index.mjs";
3
3
  import type { BlockiesProps } from "../temp-components/Blockies/index.mjs";
4
4
  import type { JazziconProps } from "../temp-components/Jazzicon/index.mjs";
@@ -6,17 +6,7 @@ import type { MaskiconProps } from "../temp-components/Maskicon/index.mjs";
6
6
  /**
7
7
  * AvatarAccount component props.
8
8
  */
9
- export type AvatarAccountProps = {
10
- /**
11
- * Required address used as a unique identifier to generate the AvatarAccount art.
12
- */
13
- address: string;
14
- /**
15
- * Optional prop to control the variant of the avatar account
16
- *
17
- * @default AvatarAccountVariant.Jazzicon
18
- */
19
- variant?: AvatarAccountVariant;
9
+ export type AvatarAccountProps = AvatarAccountPropsShared & {
20
10
  /**
21
11
  * Optional props to be passed to the Blockies component
22
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,8BAAoB;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AAEjE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACxC,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gDAAgD;AAExF,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,8CAAoC;AAEjE;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,GAAG;IAC1D;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACvC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;CACxC,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarAccountVariant } from '../../types';\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { BlockiesProps } from '../temp-components/Blockies';\nimport type { JazziconProps } from '../temp-components/Jazzicon';\nimport type { MaskiconProps } from '../temp-components/Maskicon';\n\n/**\n * AvatarAccount component props.\n */\nexport type AvatarAccountProps = {\n /**\n * Required address used as a unique identifier to generate the AvatarAccount art.\n */\n address: string;\n /**\n * Optional prop to control the variant of the avatar account\n *\n * @default AvatarAccountVariant.Jazzicon\n */\n variant?: AvatarAccountVariant;\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<BlockiesProps>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<JazziconProps>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<MaskiconProps>;\n} & Omit<AvatarBaseProps, 'children' | 'fallbackText' | 'fallbackTextProps'>;\n"]}
1
+ {"version":3,"file":"AvatarAccount.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarAccountPropsShared } from '@metamask-previews/design-system-shared';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { BlockiesProps } from '../temp-components/Blockies';\nimport type { JazziconProps } from '../temp-components/Jazzicon';\nimport type { MaskiconProps } from '../temp-components/Maskicon';\n\n/**\n * AvatarAccount component props.\n */\nexport type AvatarAccountProps = AvatarAccountPropsShared & {\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<BlockiesProps>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<JazziconProps>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<MaskiconProps>;\n} & Omit<AvatarBaseProps, 'children' | 'fallbackText' | 'fallbackTextProps'>;\n"]}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AvatarAccount = exports.AvatarAccountVariant = exports.AvatarAccountSize = void 0;
4
- var types_1 = require("../../types/index.cjs");
5
- Object.defineProperty(exports, "AvatarAccountSize", { enumerable: true, get: function () { return types_1.AvatarAccountSize; } });
6
- Object.defineProperty(exports, "AvatarAccountVariant", { enumerable: true, get: function () { return types_1.AvatarAccountVariant; } });
4
+ var design_system_shared_1 = require("@metamask-previews/design-system-shared");
5
+ Object.defineProperty(exports, "AvatarAccountSize", { enumerable: true, get: function () { return design_system_shared_1.AvatarAccountSize; } });
6
+ Object.defineProperty(exports, "AvatarAccountVariant", { enumerable: true, get: function () { return design_system_shared_1.AvatarAccountVariant; } });
7
7
  var AvatarAccount_1 = require("./AvatarAccount.cjs");
8
8
  Object.defineProperty(exports, "AvatarAccount", { enumerable: true, get: function () { return AvatarAccount_1.AvatarAccount; } });
9
9
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":";;;AAAA,+CAAsE;AAA7D,0GAAA,iBAAiB,OAAA;AAAE,6GAAA,oBAAoB,OAAA;AAChD,qDAAgD;AAAvC,8GAAA,aAAa,OAAA","sourcesContent":["export { AvatarAccountSize, AvatarAccountVariant } from '../../types';\nexport { AvatarAccount } from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":";;;AAAA,gFAGiD;AAF/C,yHAAA,iBAAiB,OAAA;AACjB,4HAAA,oBAAoB,OAAA;AAEtB,qDAAgD;AAAvC,8GAAA,aAAa,OAAA","sourcesContent":["export {\n AvatarAccountSize,\n AvatarAccountVariant,\n} from '@metamask-previews/design-system-shared';\nexport { AvatarAccount } from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount.types';\n"]}
@@ -1,4 +1,4 @@
1
- export { AvatarAccountSize, AvatarAccountVariant } from "../../types/index.cjs";
1
+ export { AvatarAccountSize, AvatarAccountVariant, } from "@metamask-previews/design-system-shared";
2
2
  export { AvatarAccount } from "./AvatarAccount.cjs";
3
3
  export type { AvatarAccountProps } from "./AvatarAccount.types.cjs";
4
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,8BAAoB;AACtE,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,gDAAgD;AACjD,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
@@ -1,4 +1,4 @@
1
- export { AvatarAccountSize, AvatarAccountVariant } from "../../types/index.mjs";
1
+ export { AvatarAccountSize, AvatarAccountVariant, } from "@metamask-previews/design-system-shared";
2
2
  export { AvatarAccount } from "./AvatarAccount.mjs";
3
3
  export type { AvatarAccountProps } from "./AvatarAccount.types.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,8BAAoB;AACtE,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,gDAAgD;AACjD,OAAO,EAAE,aAAa,EAAE,4BAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAA8B"}
@@ -1,3 +1,3 @@
1
- export { AvatarAccountSize, AvatarAccountVariant } from "../../types/index.mjs";
1
+ export { AvatarAccountSize, AvatarAccountVariant } from "@metamask-previews/design-system-shared";
2
2
  export { AvatarAccount } from "./AvatarAccount.mjs";
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,8BAAoB;AACtE,OAAO,EAAE,aAAa,EAAE,4BAAwB","sourcesContent":["export { AvatarAccountSize, AvatarAccountVariant } from '../../types';\nexport { AvatarAccount } from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACrB,gDAAgD;AACjD,OAAO,EAAE,aAAa,EAAE,4BAAwB","sourcesContent":["export {\n AvatarAccountSize,\n AvatarAccountVariant,\n} from '@metamask-previews/design-system-shared';\nexport { AvatarAccount } from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount.types';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":";;;AAAA,gFAGiD;AAF/C,sHAAA,cAAc,OAAA;AACd,uHAAA,eAAe,OAAA;AAEjB,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export {\n AvatarBaseSize,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\nexport { AvatarBase } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":";;;AAAA,gFAGiD;AAF/C,sHAAA,cAAc,OAAA;AACd,uHAAA,eAAe,OAAA;AAGjB,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export {\n AvatarBaseSize,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\n\nexport { AvatarBase } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase.types';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,GAChB,gDAAgD;AACjD,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,GAChB,gDAAgD;AAEjD,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,GAChB,gDAAgD;AACjD,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,GAChB,gDAAgD;AAEjD,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EAChB,gDAAgD;AACjD,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export {\n AvatarBaseSize,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\nexport { AvatarBase } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EAChB,gDAAgD;AAEjD,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export {\n AvatarBaseSize,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\n\nexport { AvatarBase } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase.types';\n"]}
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.AvatarFavicon = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
28
  const react_1 = __importStar(require("react"));
28
29
  const types_1 = require("../../types/index.cjs");
29
30
  const AvatarBase_1 = require("../AvatarBase/index.cjs");
@@ -39,7 +40,7 @@ const AvatarFavicon = ({ src, size = types_1.AvatarFaviconSize.Md, name, fallbac
39
40
  setFallbackText(backupFallbackText);
40
41
  imageOrSvgProps?.onSvgError?.(e);
41
42
  };
42
- return (<AvatarBase_1.AvatarBase size={size} shape={types_1.AvatarBaseShape.Circle} fallbackText={finalFallbackText} fallbackTextProps={fallbackTextProps} {...props}>
43
+ return (<AvatarBase_1.AvatarBase size={size} shape={design_system_shared_1.AvatarBaseShape.Circle} fallbackText={finalFallbackText} fallbackTextProps={fallbackTextProps} {...props}>
43
44
  {src && (<ImageOrSvg_1.ImageOrSvg src={src} width={'100%'} height={'100%'} {...imageOrSvgProps} imageProps={{
44
45
  resizeMode: 'contain',
45
46
  ...imageOrSvgProps?.imageProps,
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.cjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAGxC,iDAAiE;AACjE,wDAA2C;AAC3C,wEAA2D;AAIpD,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,uBAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,uBAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,aAAa,iBAgDxB","sourcesContent":["import React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarFaviconSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = ({\n src,\n size = AvatarFaviconSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarFaviconProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Circle}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
1
+ {"version":3,"file":"AvatarFavicon.cjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAA0E;AAC1E,+CAAwC;AAGxC,iDAAgD;AAChD,wDAA2C;AAC3C,wEAA2D;AAIpD,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,sCAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,uBAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,aAAa,iBAgDxB","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarFaviconSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = ({\n src,\n size = AvatarFaviconSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarFaviconProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Circle}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
1
+ {"version":3,"file":"AvatarFavicon.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
1
+ {"version":3,"file":"AvatarFavicon.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
@@ -4,9 +4,10 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { AvatarBaseShape } from "@metamask-previews/design-system-shared";
7
8
  import $React, { useState } from "react";
8
9
  const React = $importDefault($React);
9
- import { AvatarFaviconSize, AvatarBaseShape } from "../../types/index.mjs";
10
+ import { AvatarFaviconSize } from "../../types/index.mjs";
10
11
  import { AvatarBase } from "../AvatarBase/index.mjs";
11
12
  import { ImageOrSvg } from "../temp-components/ImageOrSvg/index.mjs";
12
13
  export const AvatarFavicon = ({ src, size = AvatarFaviconSize.Md, name, fallbackText, fallbackTextProps, imageOrSvgProps, ...props }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.mjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAGxC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,UAAU,EAAE,gDAAsC;AAI3D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarFaviconSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = ({\n src,\n size = AvatarFaviconSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarFaviconProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Circle}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
1
+ {"version":3,"file":"AvatarFavicon.mjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,gDAAgD;AAC1E,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAGxC,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAChD,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,UAAU,EAAE,gDAAsC;AAI3D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarFaviconSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = ({\n src,\n size = AvatarFaviconSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarFaviconProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Circle}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.AvatarNetwork = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
28
  const react_1 = __importStar(require("react"));
28
29
  const types_1 = require("../../types/index.cjs");
29
30
  const AvatarBase_1 = require("../AvatarBase/index.cjs");
@@ -39,7 +40,7 @@ const AvatarNetwork = ({ src, size = types_1.AvatarNetworkSize.Md, name, fallbac
39
40
  setFallbackText(backupFallbackText);
40
41
  imageOrSvgProps?.onSvgError?.(e);
41
42
  };
42
- return (<AvatarBase_1.AvatarBase size={size} shape={types_1.AvatarBaseShape.Square} fallbackText={finalFallbackText} fallbackTextProps={fallbackTextProps} {...props}>
43
+ return (<AvatarBase_1.AvatarBase size={size} shape={design_system_shared_1.AvatarBaseShape.Square} fallbackText={finalFallbackText} fallbackTextProps={fallbackTextProps} {...props}>
43
44
  {src && (<ImageOrSvg_1.ImageOrSvg src={src} width={'100%'} height={'100%'} {...imageOrSvgProps} imageProps={{
44
45
  resizeMode: 'contain',
45
46
  ...imageOrSvgProps?.imageProps,
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.cjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAwC;AAGxC,iDAAiE;AACjE,wDAA2C;AAC3C,wEAA2D;AAIpD,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,uBAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,uBAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,aAAa,iBAgDxB","sourcesContent":["import React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarNetworkSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = ({\n src,\n size = AvatarNetworkSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarNetworkProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
1
+ {"version":3,"file":"AvatarNetwork.cjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAA0E;AAC1E,+CAAwC;AAGxC,iDAAgD;AAChD,wDAA2C;AAC3C,wEAA2D;AAIpD,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,uBAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,sCAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,uBAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,uBAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,aAAa,iBAgDxB","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarNetworkSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = ({\n src,\n size = AvatarNetworkSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarNetworkProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
1
+ {"version":3,"file":"AvatarNetwork.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
1
+ {"version":3,"file":"AvatarNetwork.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,cAAc;AAOxC,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,oFAQvB,kBAAkB,sBAwCpB,CAAC"}
@@ -4,9 +4,10 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { AvatarBaseShape } from "@metamask-previews/design-system-shared";
7
8
  import $React, { useState } from "react";
8
9
  const React = $importDefault($React);
9
- import { AvatarNetworkSize, AvatarBaseShape } from "../../types/index.mjs";
10
+ import { AvatarNetworkSize } from "../../types/index.mjs";
10
11
  import { AvatarBase } from "../AvatarBase/index.mjs";
11
12
  import { ImageOrSvg } from "../temp-components/ImageOrSvg/index.mjs";
12
13
  export const AvatarNetwork = ({ src, size = AvatarNetworkSize.Md, name, fallbackText, fallbackTextProps, imageOrSvgProps, ...props }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.mjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAGxC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,UAAU,EAAE,gDAAsC;AAI3D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarNetworkSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = ({\n src,\n size = AvatarNetworkSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarNetworkProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
1
+ {"version":3,"file":"AvatarNetwork.mjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,gDAAgD;AAC1E,OAAO,QAAO,EAAE,QAAQ,EAAE,cAAc;;AAGxC,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAChD,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,UAAU,EAAE,gDAAsC;AAI3D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,GAAG,EACH,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,IAAI,EACJ,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,GAAG,KAAK,EACW,EAAE,EAAE;IACvB,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IAElE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,CAC1B,CAA4C,EAC5C,EAAE;QACF,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IACrC,CAAC,CAAC;IAEF,MAAM,iBAAiB,GAAG,CAAC,CAAQ,EAAE,EAAE;QACrC,eAAe,CAAC,kBAAkB,CAAC,CAAC;QACpC,eAAe,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC;IAEF,OAAO,CACL,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,KAAK,CAAC,CAAC,eAAe,CAAC,MAAM,CAAC,CAC9B,YAAY,CAAC,CAAC,iBAAiB,CAAC,CAChC,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,GAAG,IAAI,CACN,CAAC,UAAU,CACT,GAAG,CAAC,CAAC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,MAAM,CAAC,CACd,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,IAAI,eAAe,CAAC,CACpB,UAAU,CAAC,CAAC;gBACV,UAAU,EAAE,SAAS;gBACrB,GAAG,eAAe,EAAE,UAAU;aAC/B,CAAC,CACF,YAAY,CAAC,CAAC,mBAAmB,CAAC,CAClC,UAAU,CAAC,CAAC,iBAAiB,CAAC,EAC9B,CACH,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { useState } from 'react';\nimport type { ImageErrorEventData, NativeSyntheticEvent } from 'react-native';\n\nimport { AvatarNetworkSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\nimport { ImageOrSvg } from '../temp-components/ImageOrSvg';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = ({\n src,\n size = AvatarNetworkSize.Md,\n name,\n fallbackText,\n fallbackTextProps,\n imageOrSvgProps,\n ...props\n}: AvatarNetworkProps) => {\n const [finalFallbackText, setFallbackText] = useState<string>('');\n\n const backupFallbackText = fallbackText || name?.[0] || '';\n const onImageErrorHandler = (\n e: NativeSyntheticEvent<ImageErrorEventData>,\n ) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onImageError?.(e);\n };\n\n const onSvgErrorHandler = (e: Error) => {\n setFallbackText(backupFallbackText);\n imageOrSvgProps?.onSvgError?.(e);\n };\n\n return (\n <AvatarBase\n size={size}\n shape={AvatarBaseShape.Square}\n fallbackText={finalFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <ImageOrSvg\n src={src}\n width={'100%'}\n height={'100%'}\n {...imageOrSvgProps}\n imageProps={{\n resizeMode: 'contain',\n ...imageOrSvgProps?.imageProps,\n }}\n onImageError={onImageErrorHandler}\n onSvgError={onSvgErrorHandler}\n />\n )}\n </AvatarBase>\n );\n};\n"]}
@@ -24,11 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.AvatarToken = void 0;
27
+ const design_system_shared_1 = require("@metamask-previews/design-system-shared");
27
28
  const react_1 = __importStar(require("react"));
28
- const types_1 = require("../../types/index.cjs");
29
29
  const AvatarBase_1 = require("../AvatarBase/index.cjs");
30
30
  const ImageOrSvg_1 = require("../temp-components/ImageOrSvg/index.cjs");
31
- const AvatarToken = ({ src, size = types_1.AvatarTokenSize.Md, name, fallbackText, fallbackTextProps, imageOrSvgProps, ...props }) => {
31
+ const AvatarToken = ({ src, size = design_system_shared_1.AvatarTokenSize.Md, name, fallbackText, fallbackTextProps, imageOrSvgProps, ...props }) => {
32
32
  const [finalFallbackText, setFallbackText] = (0, react_1.useState)('');
33
33
  const backupFallbackText = fallbackText || name?.[0] || '';
34
34
  const onImageErrorHandler = (e) => {
@@ -39,7 +39,7 @@ const AvatarToken = ({ src, size = types_1.AvatarTokenSize.Md, name, fallbackTex
39
39
  setFallbackText(backupFallbackText);
40
40
  imageOrSvgProps?.onSvgError?.(e);
41
41
  };
42
- return (<AvatarBase_1.AvatarBase size={size} shape={types_1.AvatarBaseShape.Circle} fallbackText={finalFallbackText} fallbackTextProps={fallbackTextProps} {...props}>
42
+ return (<AvatarBase_1.AvatarBase size={size} shape={design_system_shared_1.AvatarBaseShape.Circle} fallbackText={finalFallbackText} fallbackTextProps={fallbackTextProps} {...props}>
43
43
  {src && (<ImageOrSvg_1.ImageOrSvg src={src} width={'100%'} height={'100%'} {...imageOrSvgProps} imageProps={{
44
44
  resizeMode: 'contain',
45
45
  ...imageOrSvgProps?.imageProps,