@metamask-previews/design-system-react 0.13.0-preview.beee588 → 0.14.0-preview.4ce710b

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 (122) hide show
  1. package/CHANGELOG.md +12 -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 -18
  18. package/dist/components/AvatarAccount/AvatarAccount.types.d.cts.map +1 -1
  19. package/dist/components/AvatarAccount/AvatarAccount.types.d.mts +2 -18
  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 +6 -6
  54. package/dist/components/AvatarToken/AvatarToken.types.d.cts.map +1 -1
  55. package/dist/components/AvatarToken/AvatarToken.types.d.mts +6 -6
  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/Input/Input.cjs +2 -2
  73. package/dist/components/Input/Input.cjs.map +1 -1
  74. package/dist/components/Input/Input.d.cts +1 -1
  75. package/dist/components/Input/Input.d.cts.map +1 -1
  76. package/dist/components/Input/Input.d.mts +1 -1
  77. package/dist/components/Input/Input.d.mts.map +1 -1
  78. package/dist/components/Input/Input.mjs +1 -1
  79. package/dist/components/Input/Input.mjs.map +1 -1
  80. package/dist/components/Input/Input.types.cjs.map +1 -1
  81. package/dist/components/Input/Input.types.d.cts +1 -1
  82. package/dist/components/Input/Input.types.d.cts.map +1 -1
  83. package/dist/components/Input/Input.types.d.mts +1 -1
  84. package/dist/components/Input/Input.types.d.mts.map +1 -1
  85. package/dist/components/Input/Input.types.mjs.map +1 -1
  86. package/dist/components/Text/Text.cjs +5 -3
  87. package/dist/components/Text/Text.cjs.map +1 -1
  88. package/dist/components/Text/Text.constants.cjs +58 -44
  89. package/dist/components/Text/Text.constants.cjs.map +1 -1
  90. package/dist/components/Text/Text.constants.d.cts +4 -1
  91. package/dist/components/Text/Text.constants.d.cts.map +1 -1
  92. package/dist/components/Text/Text.constants.d.mts +4 -1
  93. package/dist/components/Text/Text.constants.d.mts.map +1 -1
  94. package/dist/components/Text/Text.constants.mjs +15 -1
  95. package/dist/components/Text/Text.constants.mjs.map +1 -1
  96. package/dist/components/Text/Text.d.cts.map +1 -1
  97. package/dist/components/Text/Text.d.mts.map +1 -1
  98. package/dist/components/Text/Text.mjs +5 -3
  99. package/dist/components/Text/Text.mjs.map +1 -1
  100. package/dist/components/Text/Text.types.cjs.map +1 -1
  101. package/dist/components/Text/Text.types.d.cts +4 -39
  102. package/dist/components/Text/Text.types.d.cts.map +1 -1
  103. package/dist/components/Text/Text.types.d.mts +4 -39
  104. package/dist/components/Text/Text.types.d.mts.map +1 -1
  105. package/dist/components/Text/Text.types.mjs.map +1 -1
  106. package/dist/components/Text/index.cjs +7 -6
  107. package/dist/components/Text/index.cjs.map +1 -1
  108. package/dist/components/Text/index.d.cts +2 -1
  109. package/dist/components/Text/index.d.cts.map +1 -1
  110. package/dist/components/Text/index.d.mts +2 -1
  111. package/dist/components/Text/index.d.mts.map +1 -1
  112. package/dist/components/Text/index.mjs +2 -1
  113. package/dist/components/Text/index.mjs.map +1 -1
  114. package/dist/types/index.cjs +23 -157
  115. package/dist/types/index.cjs.map +1 -1
  116. package/dist/types/index.d.cts +20 -133
  117. package/dist/types/index.d.cts.map +1 -1
  118. package/dist/types/index.d.mts +20 -133
  119. package/dist/types/index.d.mts.map +1 -1
  120. package/dist/types/index.mjs +17 -149
  121. package/dist/types/index.mjs.map +1 -1
  122. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ 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
+ ### Changed
13
+
14
+ - **BREAKING:** Updated `AvatarBase` exports to consume shared const-object + string-union types rather than local enums, aligning React with shared cross-platform type contracts ([#1005](https://github.com/MetaMask/metamask-design-system/pull/1005)).
15
+ - No migration required for typical usage; continue importing from `@metamask/design-system-react` as before.
16
+ - Runtime values remain stable while type definitions follow ADR-0003/ADR-0004.
17
+ - Updated `@metamask/utils` peer dependency to `^11.11.0` ([#1033](https://github.com/MetaMask/metamask-design-system/pull/1033)).
18
+ - Expanded `BannerBase` migration documentation to improve upgrade guidance for consumers moving between recent releases ([#1011](https://github.com/MetaMask/metamask-design-system/pull/1011)).
19
+
10
20
  ## [0.13.0]
11
21
 
12
22
  ### Changed
@@ -205,7 +215,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
205
215
  - Full TypeScript support with type definitions and enums
206
216
  - Tailwind CSS integration with design token support
207
217
 
208
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.13.0...HEAD
218
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.14.0...HEAD
219
+ [0.14.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.13.0...@metamask/design-system-react@0.14.0
209
220
  [0.13.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.12.0...@metamask/design-system-react@0.13.0
210
221
  [0.12.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.11.0...@metamask/design-system-react@0.12.0
211
222
  [0.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.10.0...@metamask/design-system-react@0.11.0
@@ -24,28 +24,28 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.AvatarAccount = 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 Blockies_1 = require("../temp-components/Blockies/index.cjs");
31
31
  const Jazzicon_1 = require("../temp-components/Jazzicon/index.cjs");
32
32
  const Maskicon_1 = require("../temp-components/Maskicon/index.cjs");
33
33
  const AvatarAccount_constants_1 = require("./AvatarAccount.constants.cjs");
34
- exports.AvatarAccount = (0, react_1.forwardRef)(({ address, variant = types_1.AvatarAccountVariant.Jazzicon, className, size = types_1.AvatarAccountSize.Md, blockiesProps, jazziconProps, maskiconProps, ...props }, ref) => {
34
+ exports.AvatarAccount = (0, react_1.forwardRef)(({ address, variant = design_system_shared_1.AvatarAccountVariant.Jazzicon, className, size = design_system_shared_1.AvatarAccountSize.Md, blockiesProps, jazziconProps, maskiconProps, ...props }, ref) => {
35
35
  let AvatarArtComponent;
36
36
  switch (variant) {
37
- case types_1.AvatarAccountVariant.Blockies:
37
+ case design_system_shared_1.AvatarAccountVariant.Blockies:
38
38
  AvatarArtComponent = (react_1.default.createElement(Blockies_1.Blockies, { address: address, size: AvatarAccount_constants_1.MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size], ...blockiesProps }));
39
39
  break;
40
- case types_1.AvatarAccountVariant.Maskicon:
40
+ case design_system_shared_1.AvatarAccountVariant.Maskicon:
41
41
  AvatarArtComponent = (react_1.default.createElement(Maskicon_1.Maskicon, { address: address, size: AvatarAccount_constants_1.MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size], ...maskiconProps }));
42
42
  break;
43
- case types_1.AvatarAccountVariant.Jazzicon:
43
+ case design_system_shared_1.AvatarAccountVariant.Jazzicon:
44
44
  default:
45
45
  AvatarArtComponent = (react_1.default.createElement(Jazzicon_1.Jazzicon, { address: address, size: AvatarAccount_constants_1.MAP_AVATARACCOUNT_SIZE_SIZENUMBER[size], ...jazziconProps }));
46
46
  break;
47
47
  }
48
- return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: types_1.AvatarBaseShape.Square, size: size, className: className, ...props }, AvatarArtComponent));
48
+ return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: design_system_shared_1.AvatarBaseShape.Square, size: size, className: className, ...props }, AvatarArtComponent));
49
49
  });
50
50
  exports.AvatarAccount.displayName = 'AvatarAccount';
51
51
  //# sourceMappingURL=AvatarAccount.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,iDAIqB;AACrB,wDAA2C;AAC3C,oEAAuD;AACvD,oEAAuD;AACvD,oEAAuD;AAEvD,2EAA8E;AAGjE,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CACE,EACE,OAAO,EACP,OAAO,GAAG,4BAAoB,CAAC,QAAQ,EACvC,SAAS,EACT,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,IAAI,kBAAkB,CAAC;IACvB,QAAQ,OAAO,EAAE;QACf,KAAK,4BAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,8BAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,2DAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,4BAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,8BAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,2DAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,4BAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,8BAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,2DAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,uBAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,kBAAkB,CACR,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport {\n AvatarAccountVariant,\n AvatarAccountSize,\n AvatarBaseShape,\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 = forwardRef<HTMLDivElement, AvatarAccountProps>(\n (\n {\n address,\n variant = AvatarAccountVariant.Jazzicon,\n className,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n },\n ref,\n ) => {\n let AvatarArtComponent;\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 ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n },\n);\n\nAvatarAccount.displayName = 'AvatarAccount';\n"]}
1
+ {"version":3,"file":"AvatarAccount.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAIiD;AACjD,+CAA0C;AAE1C,wDAA2C;AAC3C,oEAAuD;AACvD,oEAAuD;AACvD,oEAAuD;AAEvD,2EAA8E;AAGjE,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CACE,EACE,OAAO,EACP,OAAO,GAAG,2CAAoB,CAAC,QAAQ,EACvC,SAAS,EACT,IAAI,GAAG,wCAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,IAAI,kBAAkB,CAAC;IACvB,QAAQ,OAAO,EAAE;QACf,KAAK,2CAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,8BAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,2DAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,2CAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,8BAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,2DAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,2CAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,8BAAC,mBAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,2DAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,sCAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,kBAAkB,CACR,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n AvatarAccountSize,\n AvatarAccountVariant,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\nimport React, { forwardRef } 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 = forwardRef<HTMLDivElement, AvatarAccountProps>(\n (\n {\n address,\n variant = AvatarAccountVariant.Jazzicon,\n className,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n },\n ref,\n ) => {\n let AvatarArtComponent;\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 ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n },\n);\n\nAvatarAccount.displayName = 'AvatarAccount';\n"]}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  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
  //# sourceMappingURL=AvatarAccount.constants.cjs.map
@@ -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","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"]}
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","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"]}
@@ -1,3 +1,3 @@
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
  //# 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"}
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"}
@@ -1,3 +1,3 @@
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
  //# 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"}
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"}
@@ -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","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"]}
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","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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAa1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA0DzB,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,cAAc;AAQ1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA0DzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAa1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA0DzB,CAAC"}
1
+ {"version":3,"file":"AvatarAccount.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAqB,cAAc;AAQ1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA0DzB,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, { forwardRef } from "react";
8
9
  const React = $importDefault($React);
9
- import { AvatarAccountVariant, AvatarAccountSize, AvatarBaseShape } 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,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,eAAe,EAChB,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,UAAU,CACrC,CACE,EACE,OAAO,EACP,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EACvC,SAAS,EACT,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,IAAI,kBAAkB,CAAC;IACvB,QAAQ,OAAO,EAAE;QACf,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,oBAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,oBAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,oBAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,kBAAkB,CACR,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport {\n AvatarAccountVariant,\n AvatarAccountSize,\n AvatarBaseShape,\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 = forwardRef<HTMLDivElement, AvatarAccountProps>(\n (\n {\n address,\n variant = AvatarAccountVariant.Jazzicon,\n className,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n },\n ref,\n ) => {\n let AvatarArtComponent;\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 ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n },\n);\n\nAvatarAccount.displayName = 'AvatarAccount';\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,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,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,UAAU,CACrC,CACE,EACE,OAAO,EACP,OAAO,GAAG,oBAAoB,CAAC,QAAQ,EACvC,SAAS,EACT,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,aAAa,EACb,aAAa,EACb,aAAa,EACb,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,IAAI,kBAAkB,CAAC;IACvB,QAAQ,OAAO,EAAE;QACf,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,oBAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ;YAChC,kBAAkB,GAAG,CACnB,oBAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;QACR,KAAK,oBAAoB,CAAC,QAAQ,CAAC;QACnC;YACE,kBAAkB,GAAG,CACnB,oBAAC,QAAQ,IACP,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,iCAAiC,CAAC,IAAI,CAAC,KACzC,aAAa,GACjB,CACH,CAAC;YACF,MAAM;KACT;IAED,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,kBAAkB,CACR,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import {\n AvatarAccountSize,\n AvatarAccountVariant,\n AvatarBaseShape,\n} from '@metamask-previews/design-system-shared';\nimport React, { forwardRef } 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 = forwardRef<HTMLDivElement, AvatarAccountProps>(\n (\n {\n address,\n variant = AvatarAccountVariant.Jazzicon,\n className,\n size = AvatarAccountSize.Md,\n blockiesProps,\n jazziconProps,\n maskiconProps,\n ...props\n },\n ref,\n ) => {\n let AvatarArtComponent;\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 ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n {...props}\n >\n {AvatarArtComponent}\n </AvatarBase>\n );\n },\n);\n\nAvatarAccount.displayName = 'AvatarAccount';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { AvatarAccountVariant, AvatarAccountSize } from '../../types';\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { Blockies } from '../temp-components/Blockies';\nimport type { Jazzicon } from '../temp-components/Jazzicon';\nimport type { Maskicon } from '../temp-components/Maskicon';\n\nexport type AvatarAccountProps = Omit<\n ComponentProps<'img'>,\n 'children' | 'size'\n> &\n Omit<AvatarBaseProps, 'children' | 'size'> & {\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 prop to control the size of the avatar\n *\n * @default AvatarAccountSize.Md\n */\n size?: AvatarAccountSize;\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<ComponentProps<typeof Blockies>>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<ComponentProps<typeof Jazzicon>>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<ComponentProps<typeof Maskicon>>;\n };\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';\nimport type { ComponentProps } from 'react';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { Blockies } from '../temp-components/Blockies';\nimport type { Jazzicon } from '../temp-components/Jazzicon';\nimport type { Maskicon } from '../temp-components/Maskicon';\n\nexport type AvatarAccountProps = Omit<\n ComponentProps<'img'>,\n 'children' | 'size'\n> &\n Omit<AvatarBaseProps, 'children' | 'size'> &\n AvatarAccountPropsShared & {\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<ComponentProps<typeof Blockies>>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<ComponentProps<typeof Jazzicon>>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<ComponentProps<typeof Maskicon>>;\n };\n"]}
@@ -1,26 +1,10 @@
1
+ import type { AvatarAccountPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { ComponentProps } from "react";
2
- import type { AvatarAccountVariant, AvatarAccountSize } from "../../types/index.cjs";
3
3
  import type { AvatarBaseProps } from "../AvatarBase/index.cjs";
4
4
  import type { Blockies } from "../temp-components/Blockies/index.cjs";
5
5
  import type { Jazzicon } from "../temp-components/Jazzicon/index.cjs";
6
6
  import type { Maskicon } from "../temp-components/Maskicon/index.cjs";
7
- export type AvatarAccountProps = Omit<ComponentProps<'img'>, 'children' | 'size'> & Omit<AvatarBaseProps, 'children' | 'size'> & {
8
- /**
9
- * Required address used as a unique identifier to generate the AvatarAccount art.
10
- */
11
- address: string;
12
- /**
13
- * Optional prop to control the variant of the avatar account
14
- *
15
- * @default AvatarAccountVariant.Jazzicon
16
- */
17
- variant?: AvatarAccountVariant;
18
- /**
19
- * Optional prop to control the size of the avatar
20
- *
21
- * @default AvatarAccountSize.Md
22
- */
23
- size?: AvatarAccountSize;
7
+ export type AvatarAccountProps = Omit<ComponentProps<'img'>, 'children' | 'size'> & Omit<AvatarBaseProps, 'children' | 'size'> & AvatarAccountPropsShared & {
24
8
  /**
25
9
  * Optional props to be passed to the Blockies component
26
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,8BAAoB;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,MAAM,CACpB,GACC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IAC3C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;CAC1D,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;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,MAAM,CACpB,GACC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAC1C,wBAAwB,GAAG;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;CAC1D,CAAC"}
@@ -1,26 +1,10 @@
1
+ import type { AvatarAccountPropsShared } from "@metamask-previews/design-system-shared";
1
2
  import type { ComponentProps } from "react";
2
- import type { AvatarAccountVariant, AvatarAccountSize } from "../../types/index.mjs";
3
3
  import type { AvatarBaseProps } from "../AvatarBase/index.mjs";
4
4
  import type { Blockies } from "../temp-components/Blockies/index.mjs";
5
5
  import type { Jazzicon } from "../temp-components/Jazzicon/index.mjs";
6
6
  import type { Maskicon } from "../temp-components/Maskicon/index.mjs";
7
- export type AvatarAccountProps = Omit<ComponentProps<'img'>, 'children' | 'size'> & Omit<AvatarBaseProps, 'children' | 'size'> & {
8
- /**
9
- * Required address used as a unique identifier to generate the AvatarAccount art.
10
- */
11
- address: string;
12
- /**
13
- * Optional prop to control the variant of the avatar account
14
- *
15
- * @default AvatarAccountVariant.Jazzicon
16
- */
17
- variant?: AvatarAccountVariant;
18
- /**
19
- * Optional prop to control the size of the avatar
20
- *
21
- * @default AvatarAccountSize.Md
22
- */
23
- size?: AvatarAccountSize;
7
+ export type AvatarAccountProps = Omit<ComponentProps<'img'>, 'children' | 'size'> & Omit<AvatarBaseProps, 'children' | 'size'> & AvatarAccountPropsShared & {
24
8
  /**
25
9
  * Optional props to be passed to the Blockies component
26
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,8BAAoB;AAC3E,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,MAAM,CACpB,GACC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IAC3C;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;CAC1D,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;AACxF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,8CAAoC;AAE5D,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,MAAM,CACpB,GACC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAC1C,wBAAwB,GAAG;IACzB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC;CAC1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarAccount.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarAccount/AvatarAccount.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { AvatarAccountVariant, AvatarAccountSize } from '../../types';\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { Blockies } from '../temp-components/Blockies';\nimport type { Jazzicon } from '../temp-components/Jazzicon';\nimport type { Maskicon } from '../temp-components/Maskicon';\n\nexport type AvatarAccountProps = Omit<\n ComponentProps<'img'>,\n 'children' | 'size'\n> &\n Omit<AvatarBaseProps, 'children' | 'size'> & {\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 prop to control the size of the avatar\n *\n * @default AvatarAccountSize.Md\n */\n size?: AvatarAccountSize;\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<ComponentProps<typeof Blockies>>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<ComponentProps<typeof Jazzicon>>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<ComponentProps<typeof Maskicon>>;\n };\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';\nimport type { ComponentProps } from 'react';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { Blockies } from '../temp-components/Blockies';\nimport type { Jazzicon } from '../temp-components/Jazzicon';\nimport type { Maskicon } from '../temp-components/Maskicon';\n\nexport type AvatarAccountProps = Omit<\n ComponentProps<'img'>,\n 'children' | 'size'\n> &\n Omit<AvatarBaseProps, 'children' | 'size'> &\n AvatarAccountPropsShared & {\n /**\n * Optional props to be passed to the Blockies component\n */\n blockiesProps?: Partial<ComponentProps<typeof Blockies>>;\n /**\n * Optional props to be passed to the Jazzicon component\n */\n jazziconProps?: Partial<ComponentProps<typeof Jazzicon>>;\n /**\n * Optional props to be passed to the Maskicon component\n */\n maskiconProps?: Partial<ComponentProps<typeof Maskicon>>;\n };\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");
@@ -35,7 +36,7 @@ exports.AvatarFavicon = (0, react_1.forwardRef)(({ src, name = '', fallbackText,
35
36
  setFinalFallbackText(backupFallbackText);
36
37
  imageProps?.onError?.(e);
37
38
  };
38
- return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: types_1.AvatarBaseShape.Circle, size: size, className: className, fallbackText: src ? finalFallbackText : backupFallbackText, fallbackTextProps: fallbackTextProps, ...props }, src && (react_1.default.createElement("img", { src: src, alt: altText, className: "size-full object-contain", ...imageProps, onError: onErrorHandler }))));
39
+ return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: design_system_shared_1.AvatarBaseShape.Circle, size: size, className: className, fallbackText: src ? finalFallbackText : backupFallbackText, fallbackTextProps: fallbackTextProps, ...props }, src && (react_1.default.createElement("img", { src: src, alt: altText, className: "size-full object-contain", ...imageProps, onError: onErrorHandler }))));
39
40
  });
40
41
  exports.AvatarFavicon.displayName = 'AvatarFavicon';
41
42
  //# sourceMappingURL=AvatarFavicon.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.cjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoD;AAEpD,iDAAiE;AACjE,wDAA2C;AAI9B,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,WAAW,CAAC,CAAC,yCAAyC;IAE9E,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,uBAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,uCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import React, { forwardRef, useState } from 'react';\n\nimport { AvatarFaviconSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = forwardRef<HTMLDivElement, AvatarFaviconProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarFaviconSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Dapp logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarFavicon.displayName = 'AvatarFavicon';\n"]}
1
+ {"version":3,"file":"AvatarFavicon.cjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAA0E;AAC1E,+CAAoD;AAEpD,iDAAgD;AAChD,wDAA2C;AAI9B,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,WAAW,CAAC,CAAC,yCAAyC;IAE9E,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,sCAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,uCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef, useState } from 'react';\n\nimport { AvatarFaviconSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = forwardRef<HTMLDivElement, AvatarFaviconProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarFaviconSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Dapp logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarFavicon.displayName = 'AvatarFavicon';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,CAAC"}
1
+ {"version":3,"file":"AvatarFavicon.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,CAAC"}
1
+ {"version":3,"file":"AvatarFavicon.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,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, { forwardRef, 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
  export const AvatarFavicon = forwardRef(({ src, name = '', fallbackText, fallbackTextProps, className, size = AvatarFaviconSize.Md, imageProps, ...props }, ref) => {
12
13
  const [finalFallbackText, setFinalFallbackText] = useState('');
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarFavicon.mjs","sourceRoot":"","sources":["../../../src/components/AvatarFavicon/AvatarFavicon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc;;AAEpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,WAAW,CAAC,CAAC,yCAAyC;IAE9E,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,6BACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import React, { forwardRef, useState } from 'react';\n\nimport { AvatarFaviconSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = forwardRef<HTMLDivElement, AvatarFaviconProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarFaviconSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Dapp logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarFavicon.displayName = 'AvatarFavicon';\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,UAAU,EAAE,QAAQ,EAAE,cAAc;;AAEpD,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAChD,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,WAAW,CAAC,CAAC,yCAAyC;IAE9E,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,6BACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef, useState } from 'react';\n\nimport { AvatarFaviconSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarFaviconProps } from './AvatarFavicon.types';\n\nexport const AvatarFavicon = forwardRef<HTMLDivElement, AvatarFaviconProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarFaviconSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Dapp logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarFavicon.displayName = 'AvatarFavicon';\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");
@@ -35,7 +36,7 @@ exports.AvatarNetwork = (0, react_1.forwardRef)(({ src, name = '', fallbackText,
35
36
  setFinalFallbackText(backupFallbackText);
36
37
  imageProps?.onError?.(e);
37
38
  };
38
- return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: types_1.AvatarBaseShape.Square, size: size, className: className, fallbackText: src ? finalFallbackText : backupFallbackText, fallbackTextProps: fallbackTextProps, ...props }, src && (react_1.default.createElement("img", { src: src, alt: altText, className: "size-full object-contain", ...imageProps, onError: onErrorHandler }))));
39
+ return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: design_system_shared_1.AvatarBaseShape.Square, size: size, className: className, fallbackText: src ? finalFallbackText : backupFallbackText, fallbackTextProps: fallbackTextProps, ...props }, src && (react_1.default.createElement("img", { src: src, alt: altText, className: "size-full object-contain", ...imageProps, onError: onErrorHandler }))));
39
40
  });
40
41
  exports.AvatarNetwork.displayName = 'AvatarNetwork';
41
42
  //# sourceMappingURL=AvatarNetwork.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.cjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoD;AAEpD,iDAAiE;AACjE,wDAA2C;AAI9B,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,cAAc,CAAC,CAAC,yCAAyC;IAEjF,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,uBAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,uCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import React, { forwardRef, useState } from 'react';\n\nimport { AvatarNetworkSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = forwardRef<HTMLDivElement, AvatarNetworkProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarNetworkSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Network logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarNetwork.displayName = 'AvatarNetwork';\n"]}
1
+ {"version":3,"file":"AvatarNetwork.cjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAA0E;AAC1E,+CAAoD;AAEpD,iDAAgD;AAChD,wDAA2C;AAI9B,QAAA,aAAa,GAAG,IAAA,kBAAU,EACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,yBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,cAAc,CAAC,CAAC,yCAAyC;IAEjF,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,sCAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,uCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef, useState } from 'react';\n\nimport { AvatarNetworkSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = forwardRef<HTMLDivElement, AvatarNetworkProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarNetworkSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Network logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarNetwork.displayName = 'AvatarNetwork';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,CAAC"}
1
+ {"version":3,"file":"AvatarNetwork.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,CAAC"}
1
+ {"version":3,"file":"AvatarNetwork.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":"AACA,OAAO,KAA+B,cAAc;AAKpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,kCAA8B;AAEhE,eAAO,MAAM,aAAa,wGA6CzB,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, { forwardRef, 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
  export const AvatarNetwork = forwardRef(({ src, name = '', fallbackText, fallbackTextProps, className, size = AvatarNetworkSize.Md, imageProps, ...props }, ref) => {
12
13
  const [finalFallbackText, setFinalFallbackText] = useState('');
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarNetwork.mjs","sourceRoot":"","sources":["../../../src/components/AvatarNetwork/AvatarNetwork.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc;;AAEpD,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,cAAc,CAAC,CAAC,yCAAyC;IAEjF,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,6BACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import React, { forwardRef, useState } from 'react';\n\nimport { AvatarNetworkSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = forwardRef<HTMLDivElement, AvatarNetworkProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarNetworkSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Network logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarNetwork.displayName = 'AvatarNetwork';\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,UAAU,EAAE,QAAQ,EAAE,cAAc;;AAEpD,OAAO,EAAE,iBAAiB,EAAE,8BAAoB;AAChD,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAI3C,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CACrC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,iBAAiB,CAAC,EAAE,EAC3B,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,cAAc,CAAC,CAAC,yCAAyC;IAEjF,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,6BACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,KAChC,UAAU,EACd,OAAO,EAAE,cAAc,GACvB,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC","sourcesContent":["import { AvatarBaseShape } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef, useState } from 'react';\n\nimport { AvatarNetworkSize } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarNetworkProps } from './AvatarNetwork.types';\n\nexport const AvatarNetwork = forwardRef<HTMLDivElement, AvatarNetworkProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarNetworkSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Network logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Square}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n {...imageProps}\n onError={onErrorHandler}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarNetwork.displayName = 'AvatarNetwork';\n"]}
@@ -24,10 +24,10 @@ 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
- exports.AvatarToken = (0, react_1.forwardRef)(({ src, name = '', fallbackText, fallbackTextProps, className, size = types_1.AvatarTokenSize.Md, imageProps, ...props }, ref) => {
30
+ exports.AvatarToken = (0, react_1.forwardRef)(({ src, name = '', fallbackText, fallbackTextProps, className, size = design_system_shared_1.AvatarTokenSize.Md, imageProps, ...props }, ref) => {
31
31
  const [finalFallbackText, setFinalFallbackText] = (0, react_1.useState)('');
32
32
  const backupFallbackText = fallbackText || name?.[0] || '';
33
33
  const altText = name || 'Token logo'; // TBC: Add localization for default text
@@ -35,7 +35,7 @@ exports.AvatarToken = (0, react_1.forwardRef)(({ src, name = '', fallbackText, f
35
35
  setFinalFallbackText(backupFallbackText);
36
36
  imageProps?.onError?.(e);
37
37
  };
38
- return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: types_1.AvatarBaseShape.Circle, size: size, className: className, fallbackText: src ? finalFallbackText : backupFallbackText, fallbackTextProps: fallbackTextProps, ...props }, src && (react_1.default.createElement("img", { src: src, alt: altText, className: "size-full object-contain", onError: onErrorHandler, ...imageProps }))));
38
+ return (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: design_system_shared_1.AvatarBaseShape.Circle, size: size, className: className, fallbackText: src ? finalFallbackText : backupFallbackText, fallbackTextProps: fallbackTextProps, ...props }, src && (react_1.default.createElement("img", { src: src, alt: altText, className: "size-full object-contain", onError: onErrorHandler, ...imageProps }))));
39
39
  });
40
40
  exports.AvatarToken.displayName = 'AvatarToken';
41
41
  //# sourceMappingURL=AvatarToken.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarToken.cjs","sourceRoot":"","sources":["../../../src/components/AvatarToken/AvatarToken.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAoD;AAEpD,iDAA+D;AAC/D,wDAA2C;AAI9B,QAAA,WAAW,GAAG,IAAA,kBAAU,EACnC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,uBAAe,CAAC,EAAE,EACzB,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,YAAY,CAAC,CAAC,yCAAyC;IAE/E,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,uBAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,uCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,EACpC,OAAO,EAAE,cAAc,KACnB,UAAU,GACd,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import React, { forwardRef, useState } from 'react';\n\nimport { AvatarTokenSize, AvatarBaseShape } from '../../types';\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarTokenProps } from './AvatarToken.types';\n\nexport const AvatarToken = forwardRef<HTMLDivElement, AvatarTokenProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarTokenSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Token logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n onError={onErrorHandler}\n {...imageProps}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarToken.displayName = 'AvatarToken';\n"]}
1
+ {"version":3,"file":"AvatarToken.cjs","sourceRoot":"","sources":["../../../src/components/AvatarToken/AvatarToken.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAGiD;AACjD,+CAAoD;AAEpD,wDAA2C;AAI9B,QAAA,WAAW,GAAG,IAAA,kBAAU,EACnC,CACE,EACE,GAAG,EACH,IAAI,GAAG,EAAE,EACT,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,IAAI,GAAG,sCAAe,CAAC,EAAE,EACzB,UAAU,EACV,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAAS,EAAE,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,YAAY,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,MAAM,OAAO,GAAG,IAAI,IAAI,YAAY,CAAC,CAAC,yCAAyC;IAE/E,MAAM,cAAc,GAAG,CAAC,CAAyC,EAAE,EAAE;QACnE,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACzC,UAAU,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,sCAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,kBAAkB,EAC1D,iBAAiB,EAAE,iBAAiB,KAChC,KAAK,IAER,GAAG,IAAI,CACN,uCACE,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,OAAO,EACZ,SAAS,EAAC,0BAA0B,EACpC,OAAO,EAAE,cAAc,KACnB,UAAU,GACd,CACH,CACU,CACd,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import {\n AvatarBaseShape,\n AvatarTokenSize,\n} from '@metamask-previews/design-system-shared';\nimport React, { forwardRef, useState } from 'react';\n\nimport { AvatarBase } from '../AvatarBase';\n\nimport type { AvatarTokenProps } from './AvatarToken.types';\n\nexport const AvatarToken = forwardRef<HTMLDivElement, AvatarTokenProps>(\n (\n {\n src,\n name = '',\n fallbackText,\n fallbackTextProps,\n className,\n size = AvatarTokenSize.Md,\n imageProps,\n ...props\n },\n ref,\n ) => {\n const [finalFallbackText, setFinalFallbackText] = useState<string>('');\n const backupFallbackText = fallbackText || name?.[0] || '';\n const altText = name || 'Token logo'; // TBC: Add localization for default text\n\n const onErrorHandler = (e: React.SyntheticEvent<HTMLImageElement>) => {\n setFinalFallbackText(backupFallbackText);\n imageProps?.onError?.(e);\n };\n\n return (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={className}\n fallbackText={src ? finalFallbackText : backupFallbackText}\n fallbackTextProps={fallbackTextProps}\n {...props}\n >\n {src && (\n <img\n src={src}\n alt={altText}\n className=\"size-full object-contain\"\n onError={onErrorHandler}\n {...imageProps}\n />\n )}\n </AvatarBase>\n );\n },\n);\n\nAvatarToken.displayName = 'AvatarToken';\n"]}