@metamask/design-system-react 0.18.0 → 0.20.0

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 (200) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/dist/components/AvatarIcon/AvatarIcon.cjs +2 -2
  3. package/dist/components/AvatarIcon/AvatarIcon.cjs.map +1 -1
  4. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs +16 -16
  5. package/dist/components/AvatarIcon/AvatarIcon.constants.cjs.map +1 -1
  6. package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts +1 -1
  7. package/dist/components/AvatarIcon/AvatarIcon.constants.d.cts.map +1 -1
  8. package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts +1 -1
  9. package/dist/components/AvatarIcon/AvatarIcon.constants.d.mts.map +1 -1
  10. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs +1 -1
  11. package/dist/components/AvatarIcon/AvatarIcon.constants.mjs.map +1 -1
  12. package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
  13. package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
  14. package/dist/components/AvatarIcon/AvatarIcon.mjs +1 -1
  15. package/dist/components/AvatarIcon/AvatarIcon.mjs.map +1 -1
  16. package/dist/components/AvatarIcon/AvatarIcon.types.cjs.map +1 -1
  17. package/dist/components/AvatarIcon/AvatarIcon.types.d.cts +3 -19
  18. package/dist/components/AvatarIcon/AvatarIcon.types.d.cts.map +1 -1
  19. package/dist/components/AvatarIcon/AvatarIcon.types.d.mts +3 -19
  20. package/dist/components/AvatarIcon/AvatarIcon.types.d.mts.map +1 -1
  21. package/dist/components/AvatarIcon/AvatarIcon.types.mjs.map +1 -1
  22. package/dist/components/AvatarIcon/index.cjs +4 -4
  23. package/dist/components/AvatarIcon/index.cjs.map +1 -1
  24. package/dist/components/AvatarIcon/index.d.cts +1 -1
  25. package/dist/components/AvatarIcon/index.d.cts.map +1 -1
  26. package/dist/components/AvatarIcon/index.d.mts +1 -1
  27. package/dist/components/AvatarIcon/index.d.mts.map +1 -1
  28. package/dist/components/AvatarIcon/index.mjs +1 -1
  29. package/dist/components/AvatarIcon/index.mjs.map +1 -1
  30. package/dist/components/BadgeIcon/BadgeIcon.cjs +2 -1
  31. package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
  32. package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
  33. package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
  34. package/dist/components/BadgeIcon/BadgeIcon.mjs +2 -1
  35. package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
  36. package/dist/components/BadgeIcon/BadgeIcon.types.cjs.map +1 -1
  37. package/dist/components/BadgeIcon/BadgeIcon.types.d.cts +5 -7
  38. package/dist/components/BadgeIcon/BadgeIcon.types.d.cts.map +1 -1
  39. package/dist/components/BadgeIcon/BadgeIcon.types.d.mts +5 -7
  40. package/dist/components/BadgeIcon/BadgeIcon.types.d.mts.map +1 -1
  41. package/dist/components/BadgeIcon/BadgeIcon.types.mjs.map +1 -1
  42. package/dist/components/BannerAlert/BannerAlert.d.cts +6 -6
  43. package/dist/components/BannerAlert/BannerAlert.d.mts +6 -6
  44. package/dist/components/BannerBase/BannerBase.cjs +2 -3
  45. package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
  46. package/dist/components/BannerBase/BannerBase.d.cts +7 -7
  47. package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
  48. package/dist/components/BannerBase/BannerBase.d.mts +7 -7
  49. package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
  50. package/dist/components/BannerBase/BannerBase.mjs +1 -2
  51. package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
  52. package/dist/components/Button/Button.cjs +5 -5
  53. package/dist/components/Button/Button.cjs.map +1 -1
  54. package/dist/components/Button/Button.d.cts.map +1 -1
  55. package/dist/components/Button/Button.d.mts.map +1 -1
  56. package/dist/components/Button/Button.mjs +1 -1
  57. package/dist/components/Button/Button.mjs.map +1 -1
  58. package/dist/components/Button/Button.types.cjs.map +1 -1
  59. package/dist/components/Button/Button.types.d.cts +5 -12
  60. package/dist/components/Button/Button.types.d.cts.map +1 -1
  61. package/dist/components/Button/Button.types.d.mts +5 -12
  62. package/dist/components/Button/Button.types.d.mts.map +1 -1
  63. package/dist/components/Button/Button.types.mjs.map +1 -1
  64. package/dist/components/Button/index.cjs +3 -3
  65. package/dist/components/Button/index.cjs.map +1 -1
  66. package/dist/components/Button/index.d.cts +1 -1
  67. package/dist/components/Button/index.d.cts.map +1 -1
  68. package/dist/components/Button/index.d.mts +1 -1
  69. package/dist/components/Button/index.d.mts.map +1 -1
  70. package/dist/components/Button/index.mjs +1 -1
  71. package/dist/components/Button/index.mjs.map +1 -1
  72. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +2 -0
  73. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
  74. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.cts.map +1 -1
  75. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.d.mts.map +1 -1
  76. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs +2 -0
  77. package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
  78. package/dist/components/Button/variants/ButtonPrimary/index.cjs +1 -3
  79. package/dist/components/Button/variants/ButtonPrimary/index.cjs.map +1 -1
  80. package/dist/components/Button/variants/ButtonPrimary/index.d.cts +0 -1
  81. package/dist/components/Button/variants/ButtonPrimary/index.d.cts.map +1 -1
  82. package/dist/components/Button/variants/ButtonPrimary/index.d.mts +0 -1
  83. package/dist/components/Button/variants/ButtonPrimary/index.d.mts.map +1 -1
  84. package/dist/components/Button/variants/ButtonPrimary/index.mjs +0 -1
  85. package/dist/components/Button/variants/ButtonPrimary/index.mjs.map +1 -1
  86. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +2 -0
  87. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
  88. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.cts.map +1 -1
  89. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.d.mts.map +1 -1
  90. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs +2 -0
  91. package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
  92. package/dist/components/Button/variants/ButtonSecondary/index.cjs +1 -3
  93. package/dist/components/Button/variants/ButtonSecondary/index.cjs.map +1 -1
  94. package/dist/components/Button/variants/ButtonSecondary/index.d.cts +0 -1
  95. package/dist/components/Button/variants/ButtonSecondary/index.d.cts.map +1 -1
  96. package/dist/components/Button/variants/ButtonSecondary/index.d.mts +0 -1
  97. package/dist/components/Button/variants/ButtonSecondary/index.d.mts.map +1 -1
  98. package/dist/components/Button/variants/ButtonSecondary/index.mjs +0 -1
  99. package/dist/components/Button/variants/ButtonSecondary/index.mjs.map +1 -1
  100. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +2 -0
  101. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
  102. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.cts.map +1 -1
  103. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.d.mts.map +1 -1
  104. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +2 -0
  105. package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
  106. package/dist/components/Button/variants/ButtonTertiary/index.cjs +1 -3
  107. package/dist/components/Button/variants/ButtonTertiary/index.cjs.map +1 -1
  108. package/dist/components/Button/variants/ButtonTertiary/index.d.cts +0 -1
  109. package/dist/components/Button/variants/ButtonTertiary/index.d.cts.map +1 -1
  110. package/dist/components/Button/variants/ButtonTertiary/index.d.mts +0 -1
  111. package/dist/components/Button/variants/ButtonTertiary/index.d.mts.map +1 -1
  112. package/dist/components/Button/variants/ButtonTertiary/index.mjs +0 -1
  113. package/dist/components/Button/variants/ButtonTertiary/index.mjs.map +1 -1
  114. package/dist/components/ButtonBase/ButtonBase.cjs +3 -3
  115. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  116. package/dist/components/ButtonBase/ButtonBase.constants.cjs +4 -4
  117. package/dist/components/ButtonBase/ButtonBase.constants.cjs.map +1 -1
  118. package/dist/components/ButtonBase/ButtonBase.constants.d.cts +1 -1
  119. package/dist/components/ButtonBase/ButtonBase.constants.d.cts.map +1 -1
  120. package/dist/components/ButtonBase/ButtonBase.constants.d.mts +1 -1
  121. package/dist/components/ButtonBase/ButtonBase.constants.d.mts.map +1 -1
  122. package/dist/components/ButtonBase/ButtonBase.constants.mjs +1 -1
  123. package/dist/components/ButtonBase/ButtonBase.constants.mjs.map +1 -1
  124. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  125. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  126. package/dist/components/ButtonBase/ButtonBase.mjs +2 -2
  127. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  128. package/dist/components/ButtonBase/ButtonBase.types.cjs.map +1 -1
  129. package/dist/components/ButtonBase/ButtonBase.types.d.cts +3 -35
  130. package/dist/components/ButtonBase/ButtonBase.types.d.cts.map +1 -1
  131. package/dist/components/ButtonBase/ButtonBase.types.d.mts +3 -35
  132. package/dist/components/ButtonBase/ButtonBase.types.d.mts.map +1 -1
  133. package/dist/components/ButtonBase/ButtonBase.types.mjs.map +1 -1
  134. package/dist/components/ButtonBase/index.cjs +2 -2
  135. package/dist/components/ButtonBase/index.cjs.map +1 -1
  136. package/dist/components/ButtonBase/index.d.cts +1 -1
  137. package/dist/components/ButtonBase/index.d.cts.map +1 -1
  138. package/dist/components/ButtonBase/index.d.mts +1 -1
  139. package/dist/components/ButtonBase/index.d.mts.map +1 -1
  140. package/dist/components/ButtonBase/index.mjs +1 -1
  141. package/dist/components/ButtonBase/index.mjs.map +1 -1
  142. package/dist/components/ButtonHero/index.cjs +2 -2
  143. package/dist/components/ButtonHero/index.cjs.map +1 -1
  144. package/dist/components/ButtonHero/index.d.cts +1 -1
  145. package/dist/components/ButtonHero/index.d.cts.map +1 -1
  146. package/dist/components/ButtonHero/index.d.mts +1 -1
  147. package/dist/components/ButtonHero/index.d.mts.map +1 -1
  148. package/dist/components/ButtonHero/index.mjs +1 -1
  149. package/dist/components/ButtonHero/index.mjs.map +1 -1
  150. package/dist/components/ButtonIcon/ButtonIcon.cjs +5 -5
  151. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  152. package/dist/components/ButtonIcon/ButtonIcon.constants.cjs +7 -8
  153. package/dist/components/ButtonIcon/ButtonIcon.constants.cjs.map +1 -1
  154. package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts.map +1 -1
  155. package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts.map +1 -1
  156. package/dist/components/ButtonIcon/ButtonIcon.constants.mjs +1 -2
  157. package/dist/components/ButtonIcon/ButtonIcon.constants.mjs.map +1 -1
  158. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  159. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  160. package/dist/components/ButtonIcon/ButtonIcon.mjs +1 -1
  161. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  162. package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
  163. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +5 -27
  164. package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
  165. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +5 -27
  166. package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
  167. package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
  168. package/dist/components/ButtonIcon/index.cjs +3 -3
  169. package/dist/components/ButtonIcon/index.cjs.map +1 -1
  170. package/dist/components/ButtonIcon/index.d.cts +1 -1
  171. package/dist/components/ButtonIcon/index.d.cts.map +1 -1
  172. package/dist/components/ButtonIcon/index.d.mts +1 -1
  173. package/dist/components/ButtonIcon/index.d.mts.map +1 -1
  174. package/dist/components/ButtonIcon/index.mjs +1 -1
  175. package/dist/components/ButtonIcon/index.mjs.map +1 -1
  176. package/dist/components/Icon/icons/Telegram.cjs +32 -0
  177. package/dist/components/Icon/icons/Telegram.cjs.map +1 -0
  178. package/dist/components/Icon/icons/Telegram.d.cts +4 -0
  179. package/dist/components/Icon/icons/Telegram.d.cts.map +1 -0
  180. package/dist/components/Icon/icons/Telegram.d.mts +4 -0
  181. package/dist/components/Icon/icons/Telegram.d.mts.map +1 -0
  182. package/dist/components/Icon/icons/Telegram.mjs +7 -0
  183. package/dist/components/Icon/icons/Telegram.mjs.map +1 -0
  184. package/dist/components/Icon/icons/index.cjs +2 -0
  185. package/dist/components/Icon/icons/index.cjs.map +1 -1
  186. package/dist/components/Icon/icons/index.d.cts +1 -0
  187. package/dist/components/Icon/icons/index.d.cts.map +1 -1
  188. package/dist/components/Icon/icons/index.d.mts +1 -0
  189. package/dist/components/Icon/icons/index.d.mts.map +1 -1
  190. package/dist/components/Icon/icons/index.mjs +2 -0
  191. package/dist/components/Icon/icons/index.mjs.map +1 -1
  192. package/dist/types/index.cjs +3 -80
  193. package/dist/types/index.cjs.map +1 -1
  194. package/dist/types/index.d.cts +0 -75
  195. package/dist/types/index.d.cts.map +1 -1
  196. package/dist/types/index.d.mts +0 -75
  197. package/dist/types/index.d.mts.map +1 -1
  198. package/dist/types/index.mjs +0 -81
  199. package/dist/types/index.mjs.map +1 -1
  200. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.20.0]
11
+
12
+ ### Changed
13
+
14
+ - **BREAKING:** Updated `Button`, `ButtonBase`, and `ButtonHero` size and variant exports to use shared const-object + string-union types rather than platform-local enum-based definitions, aligning React with the shared cross-platform type contracts ([#1034](https://github.com/MetaMask/metamask-design-system/pull/1034))
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
+ - **BREAKING:** Updated `ButtonIconSize` and `ButtonIconVariant` to use shared const-object + string-union types rather than platform-local enum-based definitions, aligning React with the shared cross-platform type contracts ([#1038](https://github.com/MetaMask/metamask-design-system/pull/1038))
18
+ - No migration required for typical usage; continue importing from `@metamask/design-system-react` as before.
19
+ - Runtime values remain stable while type definitions follow ADR-0003/ADR-0004.
20
+ - Updated Figma Code Connect to the live `MMDS Components` file and aligned `ButtonIcon` and `TextButton` mappings with the current component APIs shown in Dev Mode ([#1109](https://github.com/MetaMask/metamask-design-system/pull/1109))
21
+ - Expanded the `TextButton` migration guide for extension consumers replacing `ButtonLink` and `ButtonVariant.Link` with the current design-system APIs ([#1098](https://github.com/MetaMask/metamask-design-system/pull/1098))
22
+
23
+ ## [0.19.0]
24
+
25
+ ### Added
26
+
27
+ - Added `Telegram` to the `IconName` set for use anywhere the React package accepts design system icons ([#1122](https://github.com/MetaMask/metamask-design-system/pull/1122))
28
+
29
+ ### Changed
30
+
31
+ - **BREAKING:** Updated `AvatarIcon` exports to use shared const-object + string-union types rather than local enum-based definitions, aligning React with the shared cross-platform type contracts ([#996](https://github.com/MetaMask/metamask-design-system/pull/996))
32
+ - No migration required for typical usage; continue importing from `@metamask/design-system-react` as before.
33
+ - Runtime values remain stable while type definitions follow ADR-0003/ADR-0004.
34
+
10
35
  ## [0.18.0]
11
36
 
12
37
  ### Changed
@@ -257,7 +282,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
257
282
  - Full TypeScript support with type definitions and enums
258
283
  - Tailwind CSS integration with design token support
259
284
 
260
- [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.18.0...HEAD
285
+ [Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.20.0...HEAD
286
+ [0.20.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.19.0...@metamask/design-system-react@0.20.0
287
+ [0.19.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.18.0...@metamask/design-system-react@0.19.0
261
288
  [0.18.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.17.1...@metamask/design-system-react@0.18.0
262
289
  [0.17.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.17.0...@metamask/design-system-react@0.17.1
263
290
  [0.17.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.16.0...@metamask/design-system-react@0.17.0
@@ -24,12 +24,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.AvatarIcon = void 0;
27
+ const design_system_shared_1 = require("@metamask/design-system-shared");
27
28
  const react_1 = __importStar(require("react"));
28
- const types_1 = require("../../types/index.cjs");
29
29
  const tw_merge_1 = require("../../utils/tw-merge.cjs");
30
30
  const AvatarBase_1 = require("../AvatarBase/index.cjs");
31
31
  const Icon_1 = require("../Icon/index.cjs");
32
32
  const AvatarIcon_constants_1 = require("./AvatarIcon.constants.cjs");
33
- exports.AvatarIcon = (0, react_1.forwardRef)(({ iconName, iconProps, size = types_1.AvatarIconSize.Md, severity = types_1.AvatarIconSeverity.Neutral, className, ...props }, ref) => (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: AvatarBase_1.AvatarBaseShape.Circle, size: size, className: (0, tw_merge_1.twMerge)(AvatarIcon_constants_1.TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR[severity], className), ...props }, iconName && (react_1.default.createElement(Icon_1.Icon, { name: iconName, size: AvatarIcon_constants_1.MAP_AVATARICON_SIZE_ICONSIZE[size], color: AvatarIcon_constants_1.MAP_AVATARICON_SEVERITY_ICONCOLOR[severity], ...iconProps })))));
33
+ exports.AvatarIcon = (0, react_1.forwardRef)(({ iconName, iconProps, size = design_system_shared_1.AvatarIconSize.Md, severity = design_system_shared_1.AvatarIconSeverity.Neutral, className, ...props }, ref) => (react_1.default.createElement(AvatarBase_1.AvatarBase, { ref: ref, shape: AvatarBase_1.AvatarBaseShape.Circle, size: size, className: (0, tw_merge_1.twMerge)(AvatarIcon_constants_1.TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR[severity], className), ...props }, iconName && (react_1.default.createElement(Icon_1.Icon, { name: iconName, size: AvatarIcon_constants_1.MAP_AVATARICON_SIZE_ICONSIZE[size], color: AvatarIcon_constants_1.MAP_AVATARICON_SEVERITY_ICONCOLOR[severity], ...iconProps })))));
34
34
  exports.AvatarIcon.displayName = 'AvatarIcon';
35
35
  //# sourceMappingURL=AvatarIcon.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,iDAAiE;AACjE,uDAA+C;AAC/C,wDAA4D;AAC5D,4CAA+B;AAE/B,qEAIgC;AAGnB,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EACE,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,sBAAc,CAAC,EAAE,EACxB,QAAQ,GAAG,0BAAkB,CAAC,OAAO,EACrC,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CAAC,CACH,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,4BAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAA,kBAAO,EAChB,qEAA8C,CAAC,QAAQ,CAAC,EACxD,SAAS,CACV,KACG,KAAK,IAER,QAAQ,IAAI,CACX,8BAAC,WAAI,IACH,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,mDAA4B,CAAC,IAAI,CAAC,EACxC,KAAK,EAAE,wDAAiC,CAAC,QAAQ,CAAC,KAC9C,SAAS,GACb,CACH,CACU,CACd,CACF,CAAC;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AvatarIconSize, AvatarIconSeverity } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { AvatarBase, AvatarBaseShape } from '../AvatarBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_AVATARICON_SIZE_ICONSIZE,\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,\n MAP_AVATARICON_SEVERITY_ICONCOLOR,\n} from './AvatarIcon.constants';\nimport type { AvatarIconProps } from './AvatarIcon.types';\n\nexport const AvatarIcon = forwardRef<HTMLDivElement, AvatarIconProps>(\n (\n {\n iconName,\n iconProps,\n size = AvatarIconSize.Md,\n severity = AvatarIconSeverity.Neutral,\n className,\n ...props\n },\n ref,\n ) => (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={twMerge(\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR[severity],\n className,\n )}\n {...props}\n >\n {iconName && (\n <Icon\n name={iconName}\n size={MAP_AVATARICON_SIZE_ICONSIZE[size]}\n color={MAP_AVATARICON_SEVERITY_ICONCOLOR[severity]}\n {...iconProps}\n />\n )}\n </AvatarBase>\n ),\n);\n\nAvatarIcon.displayName = 'AvatarIcon';\n"]}
1
+ {"version":3,"file":"AvatarIcon.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAGwC;AACxC,+CAA0C;AAE1C,uDAA+C;AAC/C,wDAA4D;AAC5D,4CAA+B;AAE/B,qEAIgC;AAGnB,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EACE,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,qCAAc,CAAC,EAAE,EACxB,QAAQ,GAAG,yCAAkB,CAAC,OAAO,EACrC,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CAAC,CACH,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,4BAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAA,kBAAO,EAChB,qEAA8C,CAAC,QAAQ,CAAC,EACxD,SAAS,CACV,KACG,KAAK,IAER,QAAQ,IAAI,CACX,8BAAC,WAAI,IACH,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,mDAA4B,CAAC,IAAI,CAAC,EACxC,KAAK,EAAE,wDAAiC,CAAC,QAAQ,CAAC,KAC9C,SAAS,GACb,CACH,CACU,CACd,CACF,CAAC;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n AvatarIconSeverity,\n AvatarIconSize,\n} from '@metamask/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { AvatarBase, AvatarBaseShape } from '../AvatarBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_AVATARICON_SIZE_ICONSIZE,\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,\n MAP_AVATARICON_SEVERITY_ICONCOLOR,\n} from './AvatarIcon.constants';\nimport type { AvatarIconProps } from './AvatarIcon.types';\n\nexport const AvatarIcon = forwardRef<HTMLDivElement, AvatarIconProps>(\n (\n {\n iconName,\n iconProps,\n size = AvatarIconSize.Md,\n severity = AvatarIconSeverity.Neutral,\n className,\n ...props\n },\n ref,\n ) => (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={twMerge(\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR[severity],\n className,\n )}\n {...props}\n >\n {iconName && (\n <Icon\n name={iconName}\n size={MAP_AVATARICON_SIZE_ICONSIZE[size]}\n color={MAP_AVATARICON_SEVERITY_ICONCOLOR[severity]}\n {...iconProps}\n />\n )}\n </AvatarBase>\n ),\n);\n\nAvatarIcon.displayName = 'AvatarIcon';\n"]}
@@ -1,27 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MAP_AVATARICON_SEVERITY_ICONCOLOR = exports.TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR = exports.MAP_AVATARICON_SIZE_ICONSIZE = void 0;
4
- const types_1 = require("../../types/index.cjs");
4
+ const design_system_shared_1 = require("@metamask/design-system-shared");
5
5
  const Icon_1 = require("../Icon/index.cjs");
6
6
  exports.MAP_AVATARICON_SIZE_ICONSIZE = {
7
- [types_1.AvatarIconSize.Xs]: Icon_1.IconSize.Xs,
8
- [types_1.AvatarIconSize.Sm]: Icon_1.IconSize.Sm,
9
- [types_1.AvatarIconSize.Md]: Icon_1.IconSize.Md,
10
- [types_1.AvatarIconSize.Lg]: Icon_1.IconSize.Lg,
11
- [types_1.AvatarIconSize.Xl]: Icon_1.IconSize.Xl, // 48px avatar -> 32px icon
7
+ [design_system_shared_1.AvatarIconSize.Xs]: Icon_1.IconSize.Xs,
8
+ [design_system_shared_1.AvatarIconSize.Sm]: Icon_1.IconSize.Sm,
9
+ [design_system_shared_1.AvatarIconSize.Md]: Icon_1.IconSize.Md,
10
+ [design_system_shared_1.AvatarIconSize.Lg]: Icon_1.IconSize.Lg,
11
+ [design_system_shared_1.AvatarIconSize.Xl]: Icon_1.IconSize.Xl, // 48px avatar -> 32px icon
12
12
  };
13
13
  exports.TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR = {
14
- [types_1.AvatarIconSeverity.Neutral]: 'bg-muted',
15
- [types_1.AvatarIconSeverity.Info]: 'bg-info-muted',
16
- [types_1.AvatarIconSeverity.Success]: 'bg-success-muted',
17
- [types_1.AvatarIconSeverity.Error]: 'bg-error-muted',
18
- [types_1.AvatarIconSeverity.Warning]: 'bg-warning-muted',
14
+ [design_system_shared_1.AvatarIconSeverity.Neutral]: 'bg-muted',
15
+ [design_system_shared_1.AvatarIconSeverity.Info]: 'bg-info-muted',
16
+ [design_system_shared_1.AvatarIconSeverity.Success]: 'bg-success-muted',
17
+ [design_system_shared_1.AvatarIconSeverity.Error]: 'bg-error-muted',
18
+ [design_system_shared_1.AvatarIconSeverity.Warning]: 'bg-warning-muted',
19
19
  };
20
20
  exports.MAP_AVATARICON_SEVERITY_ICONCOLOR = {
21
- [types_1.AvatarIconSeverity.Neutral]: Icon_1.IconColor.IconAlternative,
22
- [types_1.AvatarIconSeverity.Info]: Icon_1.IconColor.InfoDefault,
23
- [types_1.AvatarIconSeverity.Success]: Icon_1.IconColor.SuccessDefault,
24
- [types_1.AvatarIconSeverity.Error]: Icon_1.IconColor.ErrorDefault,
25
- [types_1.AvatarIconSeverity.Warning]: Icon_1.IconColor.WarningDefault,
21
+ [design_system_shared_1.AvatarIconSeverity.Neutral]: Icon_1.IconColor.IconAlternative,
22
+ [design_system_shared_1.AvatarIconSeverity.Info]: Icon_1.IconColor.InfoDefault,
23
+ [design_system_shared_1.AvatarIconSeverity.Success]: Icon_1.IconColor.SuccessDefault,
24
+ [design_system_shared_1.AvatarIconSeverity.Error]: Icon_1.IconColor.ErrorDefault,
25
+ [design_system_shared_1.AvatarIconSeverity.Warning]: Icon_1.IconColor.WarningDefault,
26
26
  };
27
27
  //# sourceMappingURL=AvatarIcon.constants.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.constants.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":";;;AAAA,iDAAiE;AACjE,4CAA8C;AAEjC,QAAA,4BAA4B,GAAqC;IAC5E,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,sBAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE,EAAE,2BAA2B;CAC9D,CAAC;AAEW,QAAA,8CAA8C,GAGvD;IACF,CAAC,0BAAkB,CAAC,OAAO,CAAC,EAAE,UAAU;IACxC,CAAC,0BAAkB,CAAC,IAAI,CAAC,EAAE,eAAe;IAC1C,CAAC,0BAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;IAChD,CAAC,0BAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB;IAC5C,CAAC,0BAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;CACjD,CAAC;AAEW,QAAA,iCAAiC,GAG1C;IACF,CAAC,0BAAkB,CAAC,OAAO,CAAC,EAAE,gBAAS,CAAC,eAAe;IACvD,CAAC,0BAAkB,CAAC,IAAI,CAAC,EAAE,gBAAS,CAAC,WAAW;IAChD,CAAC,0BAAkB,CAAC,OAAO,CAAC,EAAE,gBAAS,CAAC,cAAc;IACtD,CAAC,0BAAkB,CAAC,KAAK,CAAC,EAAE,gBAAS,CAAC,YAAY;IAClD,CAAC,0BAAkB,CAAC,OAAO,CAAC,EAAE,gBAAS,CAAC,cAAc;CACvD,CAAC","sourcesContent":["import { AvatarIconSize, AvatarIconSeverity } from '../../types';\nimport { IconSize, IconColor } from '../Icon';\n\nexport const MAP_AVATARICON_SIZE_ICONSIZE: Record<AvatarIconSize, IconSize> = {\n [AvatarIconSize.Xs]: IconSize.Xs, // 16px avatar -> 12px icon\n [AvatarIconSize.Sm]: IconSize.Sm, // 24px avatar -> 16px icon\n [AvatarIconSize.Md]: IconSize.Md, // 32px avatar -> 20px icon\n [AvatarIconSize.Lg]: IconSize.Lg, // 40px avatar -> 24px icon\n [AvatarIconSize.Xl]: IconSize.Xl, // 48px avatar -> 32px icon\n};\n\nexport const TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR: Record<\n AvatarIconSeverity,\n string\n> = {\n [AvatarIconSeverity.Neutral]: 'bg-muted',\n [AvatarIconSeverity.Info]: 'bg-info-muted',\n [AvatarIconSeverity.Success]: 'bg-success-muted',\n [AvatarIconSeverity.Error]: 'bg-error-muted',\n [AvatarIconSeverity.Warning]: 'bg-warning-muted',\n};\n\nexport const MAP_AVATARICON_SEVERITY_ICONCOLOR: Record<\n AvatarIconSeverity,\n IconColor\n> = {\n [AvatarIconSeverity.Neutral]: IconColor.IconAlternative,\n [AvatarIconSeverity.Info]: IconColor.InfoDefault,\n [AvatarIconSeverity.Success]: IconColor.SuccessDefault,\n [AvatarIconSeverity.Error]: IconColor.ErrorDefault,\n [AvatarIconSeverity.Warning]: IconColor.WarningDefault,\n};\n"]}
1
+ {"version":3,"file":"AvatarIcon.constants.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":";;;AAAA,yEAGwC;AAExC,4CAA8C;AAEjC,QAAA,4BAA4B,GAAqC;IAC5E,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE;IAChC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,eAAQ,CAAC,EAAE,EAAE,2BAA2B;CAC9D,CAAC;AAEW,QAAA,8CAA8C,GAGvD;IACF,CAAC,yCAAkB,CAAC,OAAO,CAAC,EAAE,UAAU;IACxC,CAAC,yCAAkB,CAAC,IAAI,CAAC,EAAE,eAAe;IAC1C,CAAC,yCAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;IAChD,CAAC,yCAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB;IAC5C,CAAC,yCAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;CACjD,CAAC;AAEW,QAAA,iCAAiC,GAG1C;IACF,CAAC,yCAAkB,CAAC,OAAO,CAAC,EAAE,gBAAS,CAAC,eAAe;IACvD,CAAC,yCAAkB,CAAC,IAAI,CAAC,EAAE,gBAAS,CAAC,WAAW;IAChD,CAAC,yCAAkB,CAAC,OAAO,CAAC,EAAE,gBAAS,CAAC,cAAc;IACtD,CAAC,yCAAkB,CAAC,KAAK,CAAC,EAAE,gBAAS,CAAC,YAAY;IAClD,CAAC,yCAAkB,CAAC,OAAO,CAAC,EAAE,gBAAS,CAAC,cAAc;CACvD,CAAC","sourcesContent":["import {\n AvatarIconSeverity,\n AvatarIconSize,\n} from '@metamask/design-system-shared';\n\nimport { IconSize, IconColor } from '../Icon';\n\nexport const MAP_AVATARICON_SIZE_ICONSIZE: Record<AvatarIconSize, IconSize> = {\n [AvatarIconSize.Xs]: IconSize.Xs, // 16px avatar -> 12px icon\n [AvatarIconSize.Sm]: IconSize.Sm, // 24px avatar -> 16px icon\n [AvatarIconSize.Md]: IconSize.Md, // 32px avatar -> 20px icon\n [AvatarIconSize.Lg]: IconSize.Lg, // 40px avatar -> 24px icon\n [AvatarIconSize.Xl]: IconSize.Xl, // 48px avatar -> 32px icon\n};\n\nexport const TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR: Record<\n AvatarIconSeverity,\n string\n> = {\n [AvatarIconSeverity.Neutral]: 'bg-muted',\n [AvatarIconSeverity.Info]: 'bg-info-muted',\n [AvatarIconSeverity.Success]: 'bg-success-muted',\n [AvatarIconSeverity.Error]: 'bg-error-muted',\n [AvatarIconSeverity.Warning]: 'bg-warning-muted',\n};\n\nexport const MAP_AVATARICON_SEVERITY_ICONCOLOR: Record<\n AvatarIconSeverity,\n IconColor\n> = {\n [AvatarIconSeverity.Neutral]: IconColor.IconAlternative,\n [AvatarIconSeverity.Info]: IconColor.InfoDefault,\n [AvatarIconSeverity.Success]: IconColor.SuccessDefault,\n [AvatarIconSeverity.Error]: IconColor.ErrorDefault,\n [AvatarIconSeverity.Warning]: IconColor.WarningDefault,\n};\n"]}
@@ -1,4 +1,4 @@
1
- import { AvatarIconSize, AvatarIconSeverity } from "../../types/index.cjs";
1
+ import { AvatarIconSeverity, AvatarIconSize } from "@metamask/design-system-shared";
2
2
  import { IconSize, IconColor } from "../Icon/index.cjs";
3
3
  export declare const MAP_AVATARICON_SIZE_ICONSIZE: Record<AvatarIconSize, IconSize>;
4
4
  export declare const TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR: Record<AvatarIconSeverity, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.constants.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAE9C,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,CAMzE,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,MAAM,CACjE,kBAAkB,EAClB,MAAM,CAOP,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,kBAAkB,EAClB,SAAS,CAOV,CAAC"}
1
+ {"version":3,"file":"AvatarIcon.constants.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,uCAAuC;AAExC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAE9C,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,CAMzE,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,MAAM,CACjE,kBAAkB,EAClB,MAAM,CAOP,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,kBAAkB,EAClB,SAAS,CAOV,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AvatarIconSize, AvatarIconSeverity } from "../../types/index.mjs";
1
+ import { AvatarIconSeverity, AvatarIconSize } from "@metamask/design-system-shared";
2
2
  import { IconSize, IconColor } from "../Icon/index.mjs";
3
3
  export declare const MAP_AVATARICON_SIZE_ICONSIZE: Record<AvatarIconSize, IconSize>;
4
4
  export declare const TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR: Record<AvatarIconSeverity, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.constants.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAE9C,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,CAMzE,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,MAAM,CACjE,kBAAkB,EAClB,MAAM,CAOP,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,kBAAkB,EAClB,SAAS,CAOV,CAAC"}
1
+ {"version":3,"file":"AvatarIcon.constants.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,uCAAuC;AAExC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAE9C,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,cAAc,EAAE,QAAQ,CAMzE,CAAC;AAEF,eAAO,MAAM,8CAA8C,EAAE,MAAM,CACjE,kBAAkB,EAClB,MAAM,CAOP,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CACpD,kBAAkB,EAClB,SAAS,CAOV,CAAC"}
@@ -1,4 +1,4 @@
1
- import { AvatarIconSize, AvatarIconSeverity } from "../../types/index.mjs";
1
+ import { AvatarIconSeverity, AvatarIconSize } from "@metamask/design-system-shared";
2
2
  import { IconSize, IconColor } from "../Icon/index.mjs";
3
3
  export const MAP_AVATARICON_SIZE_ICONSIZE = {
4
4
  [AvatarIconSize.Xs]: IconSize.Xs,
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.constants.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAE9C,MAAM,CAAC,MAAM,4BAA4B,GAAqC;IAC5E,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,2BAA2B;CAC9D,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAGvD;IACF,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,UAAU;IACxC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,eAAe;IAC1C,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;IAChD,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB;IAC5C,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAG1C;IACF,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,eAAe;IACvD,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW;IAChD,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IACtD,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY;IAClD,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;CACvD,CAAC","sourcesContent":["import { AvatarIconSize, AvatarIconSeverity } from '../../types';\nimport { IconSize, IconColor } from '../Icon';\n\nexport const MAP_AVATARICON_SIZE_ICONSIZE: Record<AvatarIconSize, IconSize> = {\n [AvatarIconSize.Xs]: IconSize.Xs, // 16px avatar -> 12px icon\n [AvatarIconSize.Sm]: IconSize.Sm, // 24px avatar -> 16px icon\n [AvatarIconSize.Md]: IconSize.Md, // 32px avatar -> 20px icon\n [AvatarIconSize.Lg]: IconSize.Lg, // 40px avatar -> 24px icon\n [AvatarIconSize.Xl]: IconSize.Xl, // 48px avatar -> 32px icon\n};\n\nexport const TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR: Record<\n AvatarIconSeverity,\n string\n> = {\n [AvatarIconSeverity.Neutral]: 'bg-muted',\n [AvatarIconSeverity.Info]: 'bg-info-muted',\n [AvatarIconSeverity.Success]: 'bg-success-muted',\n [AvatarIconSeverity.Error]: 'bg-error-muted',\n [AvatarIconSeverity.Warning]: 'bg-warning-muted',\n};\n\nexport const MAP_AVATARICON_SEVERITY_ICONCOLOR: Record<\n AvatarIconSeverity,\n IconColor\n> = {\n [AvatarIconSeverity.Neutral]: IconColor.IconAlternative,\n [AvatarIconSeverity.Info]: IconColor.InfoDefault,\n [AvatarIconSeverity.Success]: IconColor.SuccessDefault,\n [AvatarIconSeverity.Error]: IconColor.ErrorDefault,\n [AvatarIconSeverity.Warning]: IconColor.WarningDefault,\n};\n"]}
1
+ {"version":3,"file":"AvatarIcon.constants.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,uCAAuC;AAExC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAE9C,MAAM,CAAC,MAAM,4BAA4B,GAAqC;IAC5E,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE;IAChC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,2BAA2B;CAC9D,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAGvD;IACF,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,UAAU;IACxC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,eAAe;IAC1C,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;IAChD,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,gBAAgB;IAC5C,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,kBAAkB;CACjD,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAG1C;IACF,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,eAAe;IACvD,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,WAAW;IAChD,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;IACtD,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,YAAY;IAClD,CAAC,kBAAkB,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC,cAAc;CACvD,CAAC","sourcesContent":["import {\n AvatarIconSeverity,\n AvatarIconSize,\n} from '@metamask/design-system-shared';\n\nimport { IconSize, IconColor } from '../Icon';\n\nexport const MAP_AVATARICON_SIZE_ICONSIZE: Record<AvatarIconSize, IconSize> = {\n [AvatarIconSize.Xs]: IconSize.Xs, // 16px avatar -> 12px icon\n [AvatarIconSize.Sm]: IconSize.Sm, // 24px avatar -> 16px icon\n [AvatarIconSize.Md]: IconSize.Md, // 32px avatar -> 20px icon\n [AvatarIconSize.Lg]: IconSize.Lg, // 40px avatar -> 24px icon\n [AvatarIconSize.Xl]: IconSize.Xl, // 48px avatar -> 32px icon\n};\n\nexport const TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR: Record<\n AvatarIconSeverity,\n string\n> = {\n [AvatarIconSeverity.Neutral]: 'bg-muted',\n [AvatarIconSeverity.Info]: 'bg-info-muted',\n [AvatarIconSeverity.Success]: 'bg-success-muted',\n [AvatarIconSeverity.Error]: 'bg-error-muted',\n [AvatarIconSeverity.Warning]: 'bg-warning-muted',\n};\n\nexport const MAP_AVATARICON_SEVERITY_ICONCOLOR: Record<\n AvatarIconSeverity,\n IconColor\n> = {\n [AvatarIconSeverity.Neutral]: IconColor.IconAlternative,\n [AvatarIconSeverity.Info]: IconColor.InfoDefault,\n [AvatarIconSeverity.Success]: IconColor.SuccessDefault,\n [AvatarIconSeverity.Error]: IconColor.ErrorDefault,\n [AvatarIconSeverity.Warning]: IconColor.WarningDefault,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAY1C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,qGAgCtB,CAAC"}
1
+ {"version":3,"file":"AvatarIcon.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,cAAc;AAW1C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,qGAgCtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAY1C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,qGAgCtB,CAAC"}
1
+ {"version":3,"file":"AvatarIcon.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,cAAc;AAW1C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,qGAgCtB,CAAC"}
@@ -4,9 +4,9 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { AvatarIconSeverity, AvatarIconSize } from "@metamask/design-system-shared";
7
8
  import $React, { forwardRef } from "react";
8
9
  const React = $importDefault($React);
9
- import { AvatarIconSize, AvatarIconSeverity } from "../../types/index.mjs";
10
10
  import { twMerge } from "../../utils/tw-merge.mjs";
11
11
  import { AvatarBase, AvatarBaseShape } from "../AvatarBase/index.mjs";
12
12
  import { Icon } from "../Icon/index.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,gCAAsB;AAC5D,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAE/B,OAAO,EACL,4BAA4B,EAC5B,8CAA8C,EAC9C,iCAAiC,EAClC,mCAA+B;AAGhC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,QAAQ,GAAG,kBAAkB,CAAC,OAAO,EACrC,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CAAC,CACH,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,OAAO,CAChB,8CAA8C,CAAC,QAAQ,CAAC,EACxD,SAAS,CACV,KACG,KAAK,IAER,QAAQ,IAAI,CACX,oBAAC,IAAI,IACH,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACxC,KAAK,EAAE,iCAAiC,CAAC,QAAQ,CAAC,KAC9C,SAAS,GACb,CACH,CACU,CACd,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { AvatarIconSize, AvatarIconSeverity } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { AvatarBase, AvatarBaseShape } from '../AvatarBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_AVATARICON_SIZE_ICONSIZE,\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,\n MAP_AVATARICON_SEVERITY_ICONCOLOR,\n} from './AvatarIcon.constants';\nimport type { AvatarIconProps } from './AvatarIcon.types';\n\nexport const AvatarIcon = forwardRef<HTMLDivElement, AvatarIconProps>(\n (\n {\n iconName,\n iconProps,\n size = AvatarIconSize.Md,\n severity = AvatarIconSeverity.Neutral,\n className,\n ...props\n },\n ref,\n ) => (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={twMerge(\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR[severity],\n className,\n )}\n {...props}\n >\n {iconName && (\n <Icon\n name={iconName}\n size={MAP_AVATARICON_SIZE_ICONSIZE[size]}\n color={MAP_AVATARICON_SEVERITY_ICONCOLOR[severity]}\n {...iconProps}\n />\n )}\n </AvatarBase>\n ),\n);\n\nAvatarIcon.displayName = 'AvatarIcon';\n"]}
1
+ {"version":3,"file":"AvatarIcon.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,uCAAuC;AACxC,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,gCAAsB;AAC5D,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAE/B,OAAO,EACL,4BAA4B,EAC5B,8CAA8C,EAC9C,iCAAiC,EAClC,mCAA+B;AAGhC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,QAAQ,GAAG,kBAAkB,CAAC,OAAO,EACrC,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CAAC,CACH,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,eAAe,CAAC,MAAM,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,OAAO,CAChB,8CAA8C,CAAC,QAAQ,CAAC,EACxD,SAAS,CACV,KACG,KAAK,IAER,QAAQ,IAAI,CACX,oBAAC,IAAI,IACH,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,4BAA4B,CAAC,IAAI,CAAC,EACxC,KAAK,EAAE,iCAAiC,CAAC,QAAQ,CAAC,KAC9C,SAAS,GACb,CACH,CACU,CACd,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n AvatarIconSeverity,\n AvatarIconSize,\n} from '@metamask/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { AvatarBase, AvatarBaseShape } from '../AvatarBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_AVATARICON_SIZE_ICONSIZE,\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR,\n MAP_AVATARICON_SEVERITY_ICONCOLOR,\n} from './AvatarIcon.constants';\nimport type { AvatarIconProps } from './AvatarIcon.types';\n\nexport const AvatarIcon = forwardRef<HTMLDivElement, AvatarIconProps>(\n (\n {\n iconName,\n iconProps,\n size = AvatarIconSize.Md,\n severity = AvatarIconSeverity.Neutral,\n className,\n ...props\n },\n ref,\n ) => (\n <AvatarBase\n ref={ref}\n shape={AvatarBaseShape.Circle}\n size={size}\n className={twMerge(\n TWCLASSMAP_AVATARICON_SEVERITY_BACKGROUNDCOLOR[severity],\n className,\n )}\n {...props}\n >\n {iconName && (\n <Icon\n name={iconName}\n size={MAP_AVATARICON_SIZE_ICONSIZE[size]}\n color={MAP_AVATARICON_SEVERITY_ICONCOLOR[severity]}\n {...iconProps}\n />\n )}\n </AvatarBase>\n ),\n);\n\nAvatarIcon.displayName = 'AvatarIcon';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarIconSize, AvatarIconSeverity } from '../../types';\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { IconName, IconProps } from '../Icon';\n\nexport type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> & {\n /**\n * Required icon name from the icon set\n */\n iconName: IconName;\n /**\n * Optional props to be passed to the Icon component\n */\n iconProps?: Omit<IconProps, 'name'>;\n /**\n * Optional prop to control the size of the avatar\n *\n * @default AvatarIconSize.Md\n */\n size?: AvatarIconSize;\n /**\n * Optional prop to control the severity of the avatar\n *\n * @default AvatarIconSeverity.Neutral\n */\n severity?: AvatarIconSeverity;\n};\n"]}
1
+ {"version":3,"file":"AvatarIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarIconPropsShared } from '@metamask/design-system-shared';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { IconProps } from '../Icon';\n\nexport type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> &\n AvatarIconPropsShared & {\n /**\n * Optional props to be passed to the Icon component\n */\n iconProps?: Omit<IconProps, 'name'>;\n };\n"]}
@@ -1,26 +1,10 @@
1
- import type { AvatarIconSize, AvatarIconSeverity } from "../../types/index.cjs";
1
+ import type { AvatarIconPropsShared } from "@metamask/design-system-shared";
2
2
  import type { AvatarBaseProps } from "../AvatarBase/index.cjs";
3
- import type { IconName, IconProps } from "../Icon/index.cjs";
4
- export type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> & {
5
- /**
6
- * Required icon name from the icon set
7
- */
8
- iconName: IconName;
3
+ import type { IconProps } from "../Icon/index.cjs";
4
+ export type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> & AvatarIconPropsShared & {
9
5
  /**
10
6
  * Optional props to be passed to the Icon component
11
7
  */
12
8
  iconProps?: Omit<IconProps, 'name'>;
13
- /**
14
- * Optional prop to control the size of the avatar
15
- *
16
- * @default AvatarIconSize.Md
17
- */
18
- size?: AvatarIconSize;
19
- /**
20
- * Optional prop to control the severity of the avatar
21
- *
22
- * @default AvatarIconSeverity.Neutral
23
- */
24
- severity?: AvatarIconSeverity;
25
9
  };
26
10
  //# sourceMappingURL=AvatarIcon.types.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAEnD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IACzE;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"AvatarIcon.types.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GACtE,qBAAqB,GAAG;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC"}
@@ -1,26 +1,10 @@
1
- import type { AvatarIconSize, AvatarIconSeverity } from "../../types/index.mjs";
1
+ import type { AvatarIconPropsShared } from "@metamask/design-system-shared";
2
2
  import type { AvatarBaseProps } from "../AvatarBase/index.mjs";
3
- import type { IconName, IconProps } from "../Icon/index.mjs";
4
- export type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> & {
5
- /**
6
- * Required icon name from the icon set
7
- */
8
- iconName: IconName;
3
+ import type { IconProps } from "../Icon/index.mjs";
4
+ export type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> & AvatarIconPropsShared & {
9
5
  /**
10
6
  * Optional props to be passed to the Icon component
11
7
  */
12
8
  iconProps?: Omit<IconProps, 'name'>;
13
- /**
14
- * Optional prop to control the size of the avatar
15
- *
16
- * @default AvatarIconSize.Md
17
- */
18
- size?: AvatarIconSize;
19
- /**
20
- * Optional prop to control the severity of the avatar
21
- *
22
- * @default AvatarIconSeverity.Neutral
23
- */
24
- severity?: AvatarIconSeverity;
25
9
  };
26
10
  //# sourceMappingURL=AvatarIcon.types.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAEnD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG;IACzE;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC"}
1
+ {"version":3,"file":"AvatarIcon.types.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,uCAAuC;AAE5E,OAAO,KAAK,EAAE,eAAe,EAAE,gCAAsB;AACrD,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,MAAM,CAAC,GACtE,qBAAqB,GAAG;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarIconSize, AvatarIconSeverity } from '../../types';\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { IconName, IconProps } from '../Icon';\n\nexport type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> & {\n /**\n * Required icon name from the icon set\n */\n iconName: IconName;\n /**\n * Optional props to be passed to the Icon component\n */\n iconProps?: Omit<IconProps, 'name'>;\n /**\n * Optional prop to control the size of the avatar\n *\n * @default AvatarIconSize.Md\n */\n size?: AvatarIconSize;\n /**\n * Optional prop to control the severity of the avatar\n *\n * @default AvatarIconSeverity.Neutral\n */\n severity?: AvatarIconSeverity;\n};\n"]}
1
+ {"version":3,"file":"AvatarIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/AvatarIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { AvatarIconPropsShared } from '@metamask/design-system-shared';\n\nimport type { AvatarBaseProps } from '../AvatarBase';\nimport type { IconProps } from '../Icon';\n\nexport type AvatarIconProps = Omit<AvatarBaseProps, 'children' | 'size'> &\n AvatarIconPropsShared & {\n /**\n * Optional props to be passed to the Icon component\n */\n iconProps?: Omit<IconProps, 'name'>;\n };\n"]}
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AvatarIcon = exports.AvatarIconSeverity = exports.AvatarIconSize = void 0;
4
- var types_1 = require("../../types/index.cjs");
5
- Object.defineProperty(exports, "AvatarIconSize", { enumerable: true, get: function () { return types_1.AvatarIconSize; } });
6
- Object.defineProperty(exports, "AvatarIconSeverity", { enumerable: true, get: function () { return types_1.AvatarIconSeverity; } });
3
+ exports.AvatarIcon = exports.AvatarIconSize = exports.AvatarIconSeverity = void 0;
4
+ var design_system_shared_1 = require("@metamask/design-system-shared");
5
+ Object.defineProperty(exports, "AvatarIconSeverity", { enumerable: true, get: function () { return design_system_shared_1.AvatarIconSeverity; } });
6
+ Object.defineProperty(exports, "AvatarIconSize", { enumerable: true, get: function () { return design_system_shared_1.AvatarIconSize; } });
7
7
  var AvatarIcon_1 = require("./AvatarIcon.cjs");
8
8
  Object.defineProperty(exports, "AvatarIcon", { enumerable: true, get: function () { return AvatarIcon_1.AvatarIcon; } });
9
9
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":";;;AAAA,+CAAiE;AAAxD,uGAAA,cAAc,OAAA;AAAE,2GAAA,kBAAkB,OAAA;AAC3C,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { AvatarIconSize, AvatarIconSeverity } from '../../types';\nexport { AvatarIcon } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon.types';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":";;;AAAA,uEAGwC;AAFtC,0HAAA,kBAAkB,OAAA;AAClB,sHAAA,cAAc,OAAA;AAEhB,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export {\n AvatarIconSeverity,\n AvatarIconSize,\n} from '@metamask/design-system-shared';\nexport { AvatarIcon } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon.types';\n"]}
@@ -1,4 +1,4 @@
1
- export { AvatarIconSize, AvatarIconSeverity } from "../../types/index.cjs";
1
+ export { AvatarIconSeverity, AvatarIconSize, } from "@metamask/design-system-shared";
2
2
  export { AvatarIcon } from "./AvatarIcon.cjs";
3
3
  export type { AvatarIconProps } from "./AvatarIcon.types.cjs";
4
4
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,GACf,uCAAuC;AACxC,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -1,4 +1,4 @@
1
- export { AvatarIconSize, AvatarIconSeverity } from "../../types/index.mjs";
1
+ export { AvatarIconSeverity, AvatarIconSize, } from "@metamask/design-system-shared";
2
2
  export { AvatarIcon } from "./AvatarIcon.mjs";
3
3
  export type { AvatarIconProps } from "./AvatarIcon.types.mjs";
4
4
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,GACf,uCAAuC;AACxC,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
@@ -1,3 +1,3 @@
1
- export { AvatarIconSize, AvatarIconSeverity } from "../../types/index.mjs";
1
+ export { AvatarIconSeverity, AvatarIconSize } from "@metamask/design-system-shared";
2
2
  export { AvatarIcon } from "./AvatarIcon.mjs";
3
3
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,8BAAoB;AACjE,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { AvatarIconSize, AvatarIconSeverity } from '../../types';\nexport { AvatarIcon } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon.types';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/AvatarIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,uCAAuC;AACxC,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export {\n AvatarIconSeverity,\n AvatarIconSize,\n} from '@metamask/design-system-shared';\nexport { AvatarIcon } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon.types';\n"]}
@@ -24,13 +24,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.BadgeIcon = void 0;
27
+ const design_system_shared_1 = require("@metamask/design-system-shared");
27
28
  const react_1 = __importStar(require("react"));
28
29
  const tw_merge_1 = require("../../utils/tw-merge.cjs");
29
30
  const Icon_1 = require("../Icon/index.cjs");
30
31
  exports.BadgeIcon = (0, react_1.forwardRef)(({ iconName, iconProps, className = '', style, ...props }, ref) => {
31
32
  const mergedClassName = (0, tw_merge_1.twMerge)('inline-flex size-4 items-center justify-center rounded-full bg-icon-default', className);
32
33
  return (react_1.default.createElement("div", { ref: ref, className: mergedClassName, style: style, ...props },
33
- react_1.default.createElement(Icon_1.Icon, { size: Icon_1.IconSize.Xs, name: iconName, ...iconProps, className: (0, tw_merge_1.twMerge)(iconProps?.color ? '' : 'text-background-default', // if color is provided, use it, otherwise use background default
34
+ react_1.default.createElement(Icon_1.Icon, { size: design_system_shared_1.IconSize.Xs, name: iconName, ...iconProps, className: (0, tw_merge_1.twMerge)(iconProps?.color ? '' : 'text-background-default', // if color is provided, use it, otherwise use background default
34
35
  iconProps?.className) })));
35
36
  });
36
37
  exports.BadgeIcon.displayName = 'BadgeIcon';
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.cjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,uDAA+C;AAC/C,4CAAyC;AAI5B,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChE,MAAM,eAAe,GAAG,IAAA,kBAAO,EAC7B,6EAA6E,EAC7E,SAAS,CACV,CAAC;IAEF,OAAO,CACL,uCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK;QAChE,8BAAC,WAAI,IACH,IAAI,EAAE,eAAQ,CAAC,EAAE,EACjB,IAAI,EAAE,QAAQ,KACV,SAAS,EACb,SAAS,EAAE,IAAA,kBAAO,EAChB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,yBAAyB,EAAE,iEAAiE;YACpH,SAAS,EAAE,SAAS,CACrB,GACD,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Icon, IconSize } from '../Icon';\n\nimport type { BadgeIconProps } from './BadgeIcon.types';\n\nexport const BadgeIcon = forwardRef<HTMLDivElement, BadgeIconProps>(\n ({ iconName, iconProps, className = '', style, ...props }, ref) => {\n const mergedClassName = twMerge(\n 'inline-flex size-4 items-center justify-center rounded-full bg-icon-default',\n className,\n );\n\n return (\n <div ref={ref} className={mergedClassName} style={style} {...props}>\n <Icon\n size={IconSize.Xs}\n name={iconName}\n {...iconProps}\n className={twMerge(\n iconProps?.color ? '' : 'text-background-default', // if color is provided, use it, otherwise use background default\n iconProps?.className,\n )}\n />\n </div>\n );\n },\n);\n\nBadgeIcon.displayName = 'BadgeIcon';\n"]}
1
+ {"version":3,"file":"BadgeIcon.cjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAA0D;AAC1D,+CAA0C;AAE1C,uDAA+C;AAC/C,4CAA+B;AAIlB,QAAA,SAAS,GAAG,IAAA,kBAAU,EACjC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChE,MAAM,eAAe,GAAG,IAAA,kBAAO,EAC7B,6EAA6E,EAC7E,SAAS,CACV,CAAC;IAEF,OAAO,CACL,uCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK;QAChE,8BAAC,WAAI,IACH,IAAI,EAAE,+BAAQ,CAAC,EAAE,EACjB,IAAI,EAAE,QAAQ,KACV,SAAS,EACb,SAAS,EAAE,IAAA,kBAAO,EAChB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,yBAAyB,EAAE,iEAAiE;YACpH,SAAS,EAAE,SAAS,CACrB,GACD,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { IconSize } from '@metamask/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Icon } from '../Icon';\n\nimport type { BadgeIconProps } from './BadgeIcon.types';\n\nexport const BadgeIcon = forwardRef<HTMLDivElement, BadgeIconProps>(\n ({ iconName, iconProps, className = '', style, ...props }, ref) => {\n const mergedClassName = twMerge(\n 'inline-flex size-4 items-center justify-center rounded-full bg-icon-default',\n className,\n );\n\n return (\n <div ref={ref} className={mergedClassName} style={style} {...props}>\n <Icon\n size={IconSize.Xs}\n name={iconName}\n {...iconProps}\n className={twMerge(\n iconProps?.color ? '' : 'text-background-default', // if color is provided, use it, otherwise use background default\n iconProps?.className,\n )}\n />\n </div>\n );\n },\n);\n\nBadgeIcon.displayName = 'BadgeIcon';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAK1C,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS,oGAqBrB,CAAC"}
1
+ {"version":3,"file":"BadgeIcon.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,cAAc;AAK1C,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS,oGAqBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,cAAc;AAK1C,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS,oGAqBrB,CAAC"}
1
+ {"version":3,"file":"BadgeIcon.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,cAAc;AAK1C,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS,oGAqBrB,CAAC"}
@@ -4,10 +4,11 @@ function $importDefault(module) {
4
4
  }
5
5
  return module;
6
6
  }
7
+ import { IconSize } from "@metamask/design-system-shared";
7
8
  import $React, { forwardRef } from "react";
8
9
  const React = $importDefault($React);
9
10
  import { twMerge } from "../../utils/tw-merge.mjs";
10
- import { Icon, IconSize } from "../Icon/index.mjs";
11
+ import { Icon } from "../Icon/index.mjs";
11
12
  export const BadgeIcon = forwardRef(({ iconName, iconProps, className = '', style, ...props }, ref) => {
12
13
  const mergedClassName = twMerge('inline-flex size-4 items-center justify-center rounded-full bg-icon-default', className);
13
14
  return (React.createElement("div", { ref: ref, className: mergedClassName, style: style, ...props },
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.mjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,0BAAgB;AAIzC,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChE,MAAM,eAAe,GAAG,OAAO,CAC7B,6EAA6E,EAC7E,SAAS,CACV,CAAC;IAEF,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK;QAChE,oBAAC,IAAI,IACH,IAAI,EAAE,QAAQ,CAAC,EAAE,EACjB,IAAI,EAAE,QAAQ,KACV,SAAS,EACb,SAAS,EAAE,OAAO,CAChB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,yBAAyB,EAAE,iEAAiE;YACpH,SAAS,EAAE,SAAS,CACrB,GACD,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Icon, IconSize } from '../Icon';\n\nimport type { BadgeIconProps } from './BadgeIcon.types';\n\nexport const BadgeIcon = forwardRef<HTMLDivElement, BadgeIconProps>(\n ({ iconName, iconProps, className = '', style, ...props }, ref) => {\n const mergedClassName = twMerge(\n 'inline-flex size-4 items-center justify-center rounded-full bg-icon-default',\n className,\n );\n\n return (\n <div ref={ref} className={mergedClassName} style={style} {...props}>\n <Icon\n size={IconSize.Xs}\n name={iconName}\n {...iconProps}\n className={twMerge(\n iconProps?.color ? '' : 'text-background-default', // if color is provided, use it, otherwise use background default\n iconProps?.className,\n )}\n />\n </div>\n );\n },\n);\n\nBadgeIcon.displayName = 'BadgeIcon';\n"]}
1
+ {"version":3,"file":"BadgeIcon.mjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,uCAAuC;AAC1D,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CACjC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChE,MAAM,eAAe,GAAG,OAAO,CAC7B,6EAA6E,EAC7E,SAAS,CACV,CAAC;IAEF,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK;QAChE,oBAAC,IAAI,IACH,IAAI,EAAE,QAAQ,CAAC,EAAE,EACjB,IAAI,EAAE,QAAQ,KACV,SAAS,EACb,SAAS,EAAE,OAAO,CAChB,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,yBAAyB,EAAE,iEAAiE;YACpH,SAAS,EAAE,SAAS,CACrB,GACD,CACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import { IconSize } from '@metamask/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Icon } from '../Icon';\n\nimport type { BadgeIconProps } from './BadgeIcon.types';\n\nexport const BadgeIcon = forwardRef<HTMLDivElement, BadgeIconProps>(\n ({ iconName, iconProps, className = '', style, ...props }, ref) => {\n const mergedClassName = twMerge(\n 'inline-flex size-4 items-center justify-center rounded-full bg-icon-default',\n className,\n );\n\n return (\n <div ref={ref} className={mergedClassName} style={style} {...props}>\n <Icon\n size={IconSize.Xs}\n name={iconName}\n {...iconProps}\n className={twMerge(\n iconProps?.color ? '' : 'text-background-default', // if color is provided, use it, otherwise use background default\n iconProps?.className,\n )}\n />\n </div>\n );\n },\n);\n\nBadgeIcon.displayName = 'BadgeIcon';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { IconName, IconProps } from '../Icon';\n\n/**\n * BadgeIcon component props.\n */\nexport type BadgeIconProps = ComponentProps<'div'> & {\n /**\n * Required prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Omit<IconProps, 'name'>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeIcon component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n};\n"]}
1
+ {"version":3,"file":"BadgeIcon.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeIconPropsShared } from '@metamask/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { IconProps } from '../Icon';\n\n/**\n * BadgeIcon component props (React platform-specific)\n * Extends shared props from @metamask/design-system-shared with React-specific platform concerns\n */\nexport type BadgeIconProps = ComponentProps<'div'> &\n BadgeIconPropsShared & {\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Omit<IconProps, 'name'>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeIcon component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n };\n"]}
@@ -1,13 +1,11 @@
1
+ import type { BadgeIconPropsShared } from "@metamask/design-system-shared";
1
2
  import type { ComponentProps } from "react";
2
- import type { IconName, IconProps } from "../Icon/index.cjs";
3
+ import type { IconProps } from "../Icon/index.cjs";
3
4
  /**
4
- * BadgeIcon component props.
5
+ * BadgeIcon component props (React platform-specific)
6
+ * Extends shared props from @metamask/design-system-shared with React-specific platform concerns
5
7
  */
6
- export type BadgeIconProps = ComponentProps<'div'> & {
7
- /**
8
- * Required prop to specify an icon to show
9
- */
10
- iconName: IconName;
8
+ export type BadgeIconProps = ComponentProps<'div'> & BadgeIconPropsShared & {
11
9
  /**
12
10
  * Optional prop to pass additional properties to the icon
13
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAEnD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"BadgeIcon.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uCAAuC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAChD,oBAAoB,GAAG;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
@@ -1,13 +1,11 @@
1
+ import type { BadgeIconPropsShared } from "@metamask/design-system-shared";
1
2
  import type { ComponentProps } from "react";
2
- import type { IconName, IconProps } from "../Icon/index.mjs";
3
+ import type { IconProps } from "../Icon/index.mjs";
3
4
  /**
4
- * BadgeIcon component props.
5
+ * BadgeIcon component props (React platform-specific)
6
+ * Extends shared props from @metamask/design-system-shared with React-specific platform concerns
5
7
  */
6
- export type BadgeIconProps = ComponentProps<'div'> & {
7
- /**
8
- * Required prop to specify an icon to show
9
- */
10
- iconName: IconName;
8
+ export type BadgeIconProps = ComponentProps<'div'> & BadgeIconPropsShared & {
11
9
  /**
12
10
  * Optional prop to pass additional properties to the icon
13
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,0BAAgB;AAEnD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACnD;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
1
+ {"version":3,"file":"BadgeIcon.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uCAAuC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,KAAK,CAAC,GAChD,oBAAoB,GAAG;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"BadgeIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { IconName, IconProps } from '../Icon';\n\n/**\n * BadgeIcon component props.\n */\nexport type BadgeIconProps = ComponentProps<'div'> & {\n /**\n * Required prop to specify an icon to show\n */\n iconName: IconName;\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Omit<IconProps, 'name'>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeIcon component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n};\n"]}
1
+ {"version":3,"file":"BadgeIcon.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeIcon/BadgeIcon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeIconPropsShared } from '@metamask/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { IconProps } from '../Icon';\n\n/**\n * BadgeIcon component props (React platform-specific)\n * Extends shared props from @metamask/design-system-shared with React-specific platform concerns\n */\nexport type BadgeIconProps = ComponentProps<'div'> &\n BadgeIconPropsShared & {\n /**\n * Optional prop to pass additional properties to the icon\n */\n iconProps?: Omit<IconProps, 'name'>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeIcon component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n };\n"]}
@@ -42,7 +42,7 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
42
42
  nonce?: string | undefined;
43
43
  tabIndex?: number | undefined;
44
44
  disabled?: boolean | undefined;
45
- size?: import("../../types/index.cjs").ButtonBaseSize | undefined;
45
+ size?: import("@metamask/design-system-shared").ButtonBaseSize | undefined;
46
46
  formAction?: string | undefined;
47
47
  formEncType?: string | undefined;
48
48
  formMethod?: string | undefined;
@@ -293,9 +293,10 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
293
293
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
294
294
  asChild?: boolean | undefined;
295
295
  textProps?: Partial<import("../index.cjs").TextProps> | undefined;
296
- isFullWidth?: boolean | undefined;
297
296
  isLoading?: boolean | undefined;
298
297
  loadingText?: string | undefined;
298
+ isDisabled?: boolean | undefined;
299
+ isFullWidth?: boolean | undefined;
299
300
  loadingTextProps?: Partial<import("../index.cjs").TextProps> | undefined;
300
301
  startIconName?: import("@metamask/design-system-shared").IconName | undefined;
301
302
  startIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
@@ -303,7 +304,6 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
303
304
  endIconName?: import("@metamask/design-system-shared").IconName | undefined;
304
305
  endIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
305
306
  endAccessory?: React.ReactNode;
306
- isDisabled?: boolean | undefined;
307
307
  loadingIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
308
308
  isDanger?: boolean | undefined;
309
309
  isInverse?: boolean | undefined;
@@ -352,7 +352,7 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
352
352
  nonce?: string | undefined;
353
353
  tabIndex?: number | undefined;
354
354
  disabled?: boolean | undefined;
355
- size?: import("../../types/index.cjs").ButtonBaseSize | undefined;
355
+ size?: import("@metamask/design-system-shared").ButtonBaseSize | undefined;
356
356
  formAction?: string | undefined;
357
357
  formEncType?: string | undefined;
358
358
  formMethod?: string | undefined;
@@ -603,9 +603,10 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
603
603
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
604
604
  asChild?: boolean | undefined;
605
605
  textProps?: Partial<import("../index.cjs").TextProps> | undefined;
606
- isFullWidth?: boolean | undefined;
607
606
  isLoading?: boolean | undefined;
608
607
  loadingText?: string | undefined;
608
+ isDisabled?: boolean | undefined;
609
+ isFullWidth?: boolean | undefined;
609
610
  loadingTextProps?: Partial<import("../index.cjs").TextProps> | undefined;
610
611
  startIconName?: import("@metamask/design-system-shared").IconName | undefined;
611
612
  startIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
@@ -613,7 +614,6 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
613
614
  endIconName?: import("@metamask/design-system-shared").IconName | undefined;
614
615
  endIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
615
616
  endAccessory?: React.ReactNode;
616
- isDisabled?: boolean | undefined;
617
617
  loadingIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
618
618
  isDanger?: boolean | undefined;
619
619
  isInverse?: boolean | undefined;