@metamask-previews/design-system-shared 0.4.0-preview.645f8b0 → 0.4.0-preview.96aaa54

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 (41) hide show
  1. package/dist/index.cjs +5 -1
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2 -0
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.mts +2 -0
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +2 -0
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/types/AvatarBase/AvatarBase.types.cjs +44 -0
  10. package/dist/types/AvatarBase/AvatarBase.types.cjs.map +1 -0
  11. package/dist/types/AvatarBase/AvatarBase.types.d.cts +78 -0
  12. package/dist/types/AvatarBase/AvatarBase.types.d.cts.map +1 -0
  13. package/dist/types/AvatarBase/AvatarBase.types.d.mts +78 -0
  14. package/dist/types/AvatarBase/AvatarBase.types.d.mts.map +1 -0
  15. package/dist/types/AvatarBase/AvatarBase.types.mjs +41 -0
  16. package/dist/types/AvatarBase/AvatarBase.types.mjs.map +1 -0
  17. package/dist/types/AvatarBase/index.cjs +7 -0
  18. package/dist/types/AvatarBase/index.cjs.map +1 -0
  19. package/dist/types/AvatarBase/index.d.cts +2 -0
  20. package/dist/types/AvatarBase/index.d.cts.map +1 -0
  21. package/dist/types/AvatarBase/index.d.mts +2 -0
  22. package/dist/types/AvatarBase/index.d.mts.map +1 -0
  23. package/dist/types/AvatarBase/index.mjs +2 -0
  24. package/dist/types/AvatarBase/index.mjs.map +1 -0
  25. package/dist/types/AvatarNetwork/AvatarNetwork.types.cjs +3 -0
  26. package/dist/types/AvatarNetwork/AvatarNetwork.types.cjs.map +1 -0
  27. package/dist/types/AvatarNetwork/AvatarNetwork.types.d.cts +20 -0
  28. package/dist/types/AvatarNetwork/AvatarNetwork.types.d.cts.map +1 -0
  29. package/dist/types/AvatarNetwork/AvatarNetwork.types.d.mts +20 -0
  30. package/dist/types/AvatarNetwork/AvatarNetwork.types.d.mts.map +1 -0
  31. package/dist/types/AvatarNetwork/AvatarNetwork.types.mjs +2 -0
  32. package/dist/types/AvatarNetwork/AvatarNetwork.types.mjs.map +1 -0
  33. package/dist/types/AvatarNetwork/index.cjs +3 -0
  34. package/dist/types/AvatarNetwork/index.cjs.map +1 -0
  35. package/dist/types/AvatarNetwork/index.d.cts +2 -0
  36. package/dist/types/AvatarNetwork/index.d.cts.map +1 -0
  37. package/dist/types/AvatarNetwork/index.d.mts +2 -0
  38. package/dist/types/AvatarNetwork/index.d.mts.map +1 -0
  39. package/dist/types/AvatarNetwork/index.mjs +2 -0
  40. package/dist/types/AvatarNetwork/index.mjs.map +1 -0
  41. package/package.json +4 -2
package/dist/index.cjs CHANGED
@@ -1,12 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BannerAlertSeverity = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeCountSize = exports.generateIconSeed = exports.isEthereumAddress = exports.generateSeedNonEthereum = exports.generateSeedEthereum = exports.extractAccountAddress = void 0;
3
+ exports.BannerAlertSeverity = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeCountSize = exports.AvatarBaseShape = exports.AvatarBaseSize = exports.generateIconSeed = exports.isEthereumAddress = exports.generateSeedNonEthereum = exports.generateSeedEthereum = exports.extractAccountAddress = void 0;
4
4
  var caip_address_1 = require("./utils/caip-address.cjs");
5
5
  Object.defineProperty(exports, "extractAccountAddress", { enumerable: true, get: function () { return caip_address_1.extractAccountAddress; } });
6
6
  Object.defineProperty(exports, "generateSeedEthereum", { enumerable: true, get: function () { return caip_address_1.generateSeedEthereum; } });
7
7
  Object.defineProperty(exports, "generateSeedNonEthereum", { enumerable: true, get: function () { return caip_address_1.generateSeedNonEthereum; } });
8
8
  Object.defineProperty(exports, "isEthereumAddress", { enumerable: true, get: function () { return caip_address_1.isEthereumAddress; } });
9
9
  Object.defineProperty(exports, "generateIconSeed", { enumerable: true, get: function () { return caip_address_1.generateIconSeed; } });
10
+ // AvatarBase types (ADR-0003 + ADR-0004)
11
+ var AvatarBase_1 = require("./types/AvatarBase/index.cjs");
12
+ Object.defineProperty(exports, "AvatarBaseSize", { enumerable: true, get: function () { return AvatarBase_1.AvatarBaseSize; } });
13
+ Object.defineProperty(exports, "AvatarBaseShape", { enumerable: true, get: function () { return AvatarBase_1.AvatarBaseShape; } });
10
14
  // BadgeCount types (ADR-0003 + ADR-0004)
11
15
  var BadgeCount_1 = require("./types/BadgeCount/index.cjs");
12
16
  Object.defineProperty(exports, "BadgeCountSize", { enumerable: true, get: function () { return BadgeCount_1.BadgeCountSize; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAM8B;AAL5B,qHAAA,qBAAqB,OAAA;AACrB,oHAAA,oBAAoB,OAAA;AACpB,uHAAA,uBAAuB,OAAA;AACvB,iHAAA,iBAAiB,OAAA;AACjB,gHAAA,gBAAgB,OAAA;AAGlB,yCAAyC;AACzC,2DAAgF;AAAvE,4GAAA,cAAc,OAAA;AAEvB,0CAA0C;AAC1C,6DAI6B;AAH3B,gHAAA,iBAAiB,OAAA;AACjB,8GAAA,eAAe,OAAA;AAUjB,0CAA0C;AAC1C,6DAG6B;AAF3B,kHAAA,mBAAmB,OAAA","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n\n// ButtonFilter types (ADR-0004)\nexport { type ButtonFilterPropsShared } from './types/ButtonFilter';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAM8B;AAL5B,qHAAA,qBAAqB,OAAA;AACrB,oHAAA,oBAAoB,OAAA;AACpB,uHAAA,uBAAuB,OAAA;AACvB,iHAAA,iBAAiB,OAAA;AACjB,gHAAA,gBAAgB,OAAA;AAGlB,yCAAyC;AACzC,2DAI4B;AAH1B,4GAAA,cAAc,OAAA;AACd,6GAAA,eAAe,OAAA;AAIjB,yCAAyC;AACzC,2DAAgF;AAAvE,4GAAA,cAAc,OAAA;AAEvB,0CAA0C;AAC1C,6DAI6B;AAH3B,gHAAA,iBAAiB,OAAA;AACjB,8GAAA,eAAe,OAAA;AAajB,0CAA0C;AAC1C,6DAG6B;AAF3B,kHAAA,mBAAmB,OAAA","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// AvatarBase types (ADR-0003 + ADR-0004)\nexport {\n AvatarBaseSize,\n AvatarBaseShape,\n type AvatarBasePropsShared,\n} from './types/AvatarBase';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n\n// ButtonFilter types (ADR-0004)\nexport { type ButtonFilterPropsShared } from './types/ButtonFilter';\n\n// AvatarNetwork types (ADR-0004)\nexport { type AvatarNetworkPropsShared } from './types/AvatarNetwork';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,7 +1,9 @@
1
1
  export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed, } from "./utils/caip-address.cjs";
2
+ export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./types/AvatarBase/index.cjs";
2
3
  export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.cjs";
3
4
  export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.cjs";
4
5
  export { type BannerBasePropsShared } from "./types/BannerBase/index.cjs";
5
6
  export { type ButtonFilterPropsShared } from "./types/ButtonFilter/index.cjs";
7
+ export { type AvatarNetworkPropsShared } from "./types/AvatarNetwork/index.cjs";
6
8
  export { BannerAlertSeverity, type BannerAlertPropsShared, } from "./types/BannerAlert/index.cjs";
7
9
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,iCAA6B;AAG9B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,iCAA6B;AAG9B,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,qBAAqB,GAC3B,qCAA2B;AAG5B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B"}
package/dist/index.d.mts CHANGED
@@ -1,7 +1,9 @@
1
1
  export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed, } from "./utils/caip-address.mjs";
2
+ export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./types/AvatarBase/index.mjs";
2
3
  export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.mjs";
3
4
  export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.mjs";
4
5
  export { type BannerBasePropsShared } from "./types/BannerBase/index.mjs";
5
6
  export { type ButtonFilterPropsShared } from "./types/ButtonFilter/index.mjs";
7
+ export { type AvatarNetworkPropsShared } from "./types/AvatarNetwork/index.mjs";
6
8
  export { BannerAlertSeverity, type BannerAlertPropsShared, } from "./types/BannerAlert/index.mjs";
7
9
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,iCAA6B;AAG9B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,iCAA6B;AAG9B,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,qBAAqB,GAC3B,qCAA2B;AAG5B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,6 @@
1
1
  export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed } from "./utils/caip-address.mjs";
2
+ // AvatarBase types (ADR-0003 + ADR-0004)
3
+ export { AvatarBaseSize, AvatarBaseShape } from "./types/AvatarBase/index.mjs";
2
4
  // BadgeCount types (ADR-0003 + ADR-0004)
3
5
  export { BadgeCountSize } from "./types/BadgeCount/index.mjs";
4
6
  // BadgeStatus types (ADR-0003 + ADR-0004)
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EACjB,iCAA6B;AAE9B,yCAAyC;AACzC,OAAO,EAAE,cAAc,EAA8B,qCAA2B;AAEhF,0CAA0C;AAC1C,OAAO,EACL,iBAAiB,EACjB,eAAe,EAEhB,sCAA4B;AAQ7B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EAEpB,sCAA4B","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n\n// ButtonFilter types (ADR-0004)\nexport { type ButtonFilterPropsShared } from './types/ButtonFilter';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EACjB,iCAA6B;AAE9B,yCAAyC;AACzC,OAAO,EACL,cAAc,EACd,eAAe,EAEhB,qCAA2B;AAE5B,yCAAyC;AACzC,OAAO,EAAE,cAAc,EAA8B,qCAA2B;AAEhF,0CAA0C;AAC1C,OAAO,EACL,iBAAiB,EACjB,eAAe,EAEhB,sCAA4B;AAW7B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EAEpB,sCAA4B","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// AvatarBase types (ADR-0003 + ADR-0004)\nexport {\n AvatarBaseSize,\n AvatarBaseShape,\n type AvatarBasePropsShared,\n} from './types/AvatarBase';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n\n// ButtonFilter types (ADR-0004)\nexport { type ButtonFilterPropsShared } from './types/ButtonFilter';\n\n// AvatarNetwork types (ADR-0004)\nexport { type AvatarNetworkPropsShared } from './types/AvatarNetwork';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n"]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AvatarBaseShape = exports.AvatarBaseSize = void 0;
4
+ /**
5
+ * AvatarBase - size
6
+ * Convert from enum to const object (ADR-0003)
7
+ */
8
+ exports.AvatarBaseSize = {
9
+ /**
10
+ * Represents an extra small avatar size (16px).
11
+ */
12
+ Xs: 'xs',
13
+ /**
14
+ * Represents a small avatar size (24px).
15
+ */
16
+ Sm: 'sm',
17
+ /**
18
+ * Represents a medium avatar size (32px).
19
+ */
20
+ Md: 'md',
21
+ /**
22
+ * Represents a large avatar size (40px).
23
+ */
24
+ Lg: 'lg',
25
+ /**
26
+ * Represents an extra large avatar size (48px).
27
+ */
28
+ Xl: 'xl',
29
+ };
30
+ /**
31
+ * AvatarBase - shape
32
+ * Convert from enum to const object (ADR-0003)
33
+ */
34
+ exports.AvatarBaseShape = {
35
+ /**
36
+ * Represents a circular Avatar.
37
+ */
38
+ Circle: 'circle',
39
+ /**
40
+ * Represents a squared Avatar.
41
+ */
42
+ Square: 'square',
43
+ };
44
+ //# sourceMappingURL=AvatarBase.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarBase.types.cjs","sourceRoot":"","sources":["../../../src/types/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,cAAc,GAAG;IAC5B;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;CACA,CAAC;AAIX;;;GAGG;AACU,QAAA,eAAe,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * AvatarBase - size\n * Convert from enum to const object (ADR-0003)\n */\nexport const AvatarBaseSize = {\n /**\n * Represents an extra small avatar size (16px).\n */\n Xs: 'xs',\n /**\n * Represents a small avatar size (24px).\n */\n Sm: 'sm',\n /**\n * Represents a medium avatar size (32px).\n */\n Md: 'md',\n /**\n * Represents a large avatar size (40px).\n */\n Lg: 'lg',\n /**\n * Represents an extra large avatar size (48px).\n */\n Xl: 'xl',\n} as const;\nexport type AvatarBaseSize =\n (typeof AvatarBaseSize)[keyof typeof AvatarBaseSize];\n\n/**\n * AvatarBase - shape\n * Convert from enum to const object (ADR-0003)\n */\nexport const AvatarBaseShape = {\n /**\n * Represents a circular Avatar.\n */\n Circle: 'circle',\n /**\n * Represents a squared Avatar.\n */\n Square: 'square',\n} as const;\nexport type AvatarBaseShape =\n (typeof AvatarBaseShape)[keyof typeof AvatarBaseShape];\n\n/**\n * AvatarBase component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type AvatarBasePropsShared = {\n /**\n * Optional content to be rendered within the AvatarBase.\n * If fallbackText is provided, fallbackText takes precedence.\n */\n children?: ReactNode;\n /**\n * Optional text to display when no children are provided.\n */\n fallbackText?: string;\n /**\n * Optional prop to control the size of the AvatarBase.\n *\n * @default AvatarBaseSize.Md\n */\n size?: AvatarBaseSize;\n /**\n * Optional prop to control the shape of the AvatarBase.\n *\n * @default AvatarBaseShape.Circle\n */\n shape?: AvatarBaseShape;\n /**\n * Optional prop to include the border with the Avatar.\n * For internal use only.\n *\n * @default false\n */\n hasBorder?: boolean;\n};\n"]}
@@ -0,0 +1,78 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * AvatarBase - size
4
+ * Convert from enum to const object (ADR-0003)
5
+ */
6
+ export declare const AvatarBaseSize: {
7
+ /**
8
+ * Represents an extra small avatar size (16px).
9
+ */
10
+ readonly Xs: "xs";
11
+ /**
12
+ * Represents a small avatar size (24px).
13
+ */
14
+ readonly Sm: "sm";
15
+ /**
16
+ * Represents a medium avatar size (32px).
17
+ */
18
+ readonly Md: "md";
19
+ /**
20
+ * Represents a large avatar size (40px).
21
+ */
22
+ readonly Lg: "lg";
23
+ /**
24
+ * Represents an extra large avatar size (48px).
25
+ */
26
+ readonly Xl: "xl";
27
+ };
28
+ export type AvatarBaseSize = (typeof AvatarBaseSize)[keyof typeof AvatarBaseSize];
29
+ /**
30
+ * AvatarBase - shape
31
+ * Convert from enum to const object (ADR-0003)
32
+ */
33
+ export declare const AvatarBaseShape: {
34
+ /**
35
+ * Represents a circular Avatar.
36
+ */
37
+ readonly Circle: "circle";
38
+ /**
39
+ * Represents a squared Avatar.
40
+ */
41
+ readonly Square: "square";
42
+ };
43
+ export type AvatarBaseShape = (typeof AvatarBaseShape)[keyof typeof AvatarBaseShape];
44
+ /**
45
+ * AvatarBase component shared props (ADR-0004)
46
+ * Platform-independent properties shared across React and React Native.
47
+ */
48
+ export type AvatarBasePropsShared = {
49
+ /**
50
+ * Optional content to be rendered within the AvatarBase.
51
+ * If fallbackText is provided, fallbackText takes precedence.
52
+ */
53
+ children?: ReactNode;
54
+ /**
55
+ * Optional text to display when no children are provided.
56
+ */
57
+ fallbackText?: string;
58
+ /**
59
+ * Optional prop to control the size of the AvatarBase.
60
+ *
61
+ * @default AvatarBaseSize.Md
62
+ */
63
+ size?: AvatarBaseSize;
64
+ /**
65
+ * Optional prop to control the shape of the AvatarBase.
66
+ *
67
+ * @default AvatarBaseShape.Circle
68
+ */
69
+ shape?: AvatarBaseShape;
70
+ /**
71
+ * Optional prop to include the border with the Avatar.
72
+ * For internal use only.
73
+ *
74
+ * @default false
75
+ */
76
+ hasBorder?: boolean;
77
+ };
78
+ //# sourceMappingURL=AvatarBase.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarBase.types.d.cts","sourceRoot":"","sources":["../../../src/types/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -0,0 +1,78 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * AvatarBase - size
4
+ * Convert from enum to const object (ADR-0003)
5
+ */
6
+ export declare const AvatarBaseSize: {
7
+ /**
8
+ * Represents an extra small avatar size (16px).
9
+ */
10
+ readonly Xs: "xs";
11
+ /**
12
+ * Represents a small avatar size (24px).
13
+ */
14
+ readonly Sm: "sm";
15
+ /**
16
+ * Represents a medium avatar size (32px).
17
+ */
18
+ readonly Md: "md";
19
+ /**
20
+ * Represents a large avatar size (40px).
21
+ */
22
+ readonly Lg: "lg";
23
+ /**
24
+ * Represents an extra large avatar size (48px).
25
+ */
26
+ readonly Xl: "xl";
27
+ };
28
+ export type AvatarBaseSize = (typeof AvatarBaseSize)[keyof typeof AvatarBaseSize];
29
+ /**
30
+ * AvatarBase - shape
31
+ * Convert from enum to const object (ADR-0003)
32
+ */
33
+ export declare const AvatarBaseShape: {
34
+ /**
35
+ * Represents a circular Avatar.
36
+ */
37
+ readonly Circle: "circle";
38
+ /**
39
+ * Represents a squared Avatar.
40
+ */
41
+ readonly Square: "square";
42
+ };
43
+ export type AvatarBaseShape = (typeof AvatarBaseShape)[keyof typeof AvatarBaseShape];
44
+ /**
45
+ * AvatarBase component shared props (ADR-0004)
46
+ * Platform-independent properties shared across React and React Native.
47
+ */
48
+ export type AvatarBasePropsShared = {
49
+ /**
50
+ * Optional content to be rendered within the AvatarBase.
51
+ * If fallbackText is provided, fallbackText takes precedence.
52
+ */
53
+ children?: ReactNode;
54
+ /**
55
+ * Optional text to display when no children are provided.
56
+ */
57
+ fallbackText?: string;
58
+ /**
59
+ * Optional prop to control the size of the AvatarBase.
60
+ *
61
+ * @default AvatarBaseSize.Md
62
+ */
63
+ size?: AvatarBaseSize;
64
+ /**
65
+ * Optional prop to control the shape of the AvatarBase.
66
+ *
67
+ * @default AvatarBaseShape.Circle
68
+ */
69
+ shape?: AvatarBaseShape;
70
+ /**
71
+ * Optional prop to include the border with the Avatar.
72
+ * For internal use only.
73
+ *
74
+ * @default false
75
+ */
76
+ hasBorder?: boolean;
77
+ };
78
+ //# sourceMappingURL=AvatarBase.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarBase.types.d.mts","sourceRoot":"","sources":["../../../src/types/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,cAAc,GACxB,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;;IAEH;;OAEG;;CAEK,CAAC;AACX,MAAM,MAAM,eAAe,GACzB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB;;;;OAIG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * AvatarBase - size
3
+ * Convert from enum to const object (ADR-0003)
4
+ */
5
+ export const AvatarBaseSize = {
6
+ /**
7
+ * Represents an extra small avatar size (16px).
8
+ */
9
+ Xs: 'xs',
10
+ /**
11
+ * Represents a small avatar size (24px).
12
+ */
13
+ Sm: 'sm',
14
+ /**
15
+ * Represents a medium avatar size (32px).
16
+ */
17
+ Md: 'md',
18
+ /**
19
+ * Represents a large avatar size (40px).
20
+ */
21
+ Lg: 'lg',
22
+ /**
23
+ * Represents an extra large avatar size (48px).
24
+ */
25
+ Xl: 'xl',
26
+ };
27
+ /**
28
+ * AvatarBase - shape
29
+ * Convert from enum to const object (ADR-0003)
30
+ */
31
+ export const AvatarBaseShape = {
32
+ /**
33
+ * Represents a circular Avatar.
34
+ */
35
+ Circle: 'circle',
36
+ /**
37
+ * Represents a squared Avatar.
38
+ */
39
+ Square: 'square',
40
+ };
41
+ //# sourceMappingURL=AvatarBase.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarBase.types.mjs","sourceRoot":"","sources":["../../../src/types/AvatarBase/AvatarBase.types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;IACR;;OAEG;IACH,EAAE,EAAE,IAAI;CACA,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * AvatarBase - size\n * Convert from enum to const object (ADR-0003)\n */\nexport const AvatarBaseSize = {\n /**\n * Represents an extra small avatar size (16px).\n */\n Xs: 'xs',\n /**\n * Represents a small avatar size (24px).\n */\n Sm: 'sm',\n /**\n * Represents a medium avatar size (32px).\n */\n Md: 'md',\n /**\n * Represents a large avatar size (40px).\n */\n Lg: 'lg',\n /**\n * Represents an extra large avatar size (48px).\n */\n Xl: 'xl',\n} as const;\nexport type AvatarBaseSize =\n (typeof AvatarBaseSize)[keyof typeof AvatarBaseSize];\n\n/**\n * AvatarBase - shape\n * Convert from enum to const object (ADR-0003)\n */\nexport const AvatarBaseShape = {\n /**\n * Represents a circular Avatar.\n */\n Circle: 'circle',\n /**\n * Represents a squared Avatar.\n */\n Square: 'square',\n} as const;\nexport type AvatarBaseShape =\n (typeof AvatarBaseShape)[keyof typeof AvatarBaseShape];\n\n/**\n * AvatarBase component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n */\nexport type AvatarBasePropsShared = {\n /**\n * Optional content to be rendered within the AvatarBase.\n * If fallbackText is provided, fallbackText takes precedence.\n */\n children?: ReactNode;\n /**\n * Optional text to display when no children are provided.\n */\n fallbackText?: string;\n /**\n * Optional prop to control the size of the AvatarBase.\n *\n * @default AvatarBaseSize.Md\n */\n size?: AvatarBaseSize;\n /**\n * Optional prop to control the shape of the AvatarBase.\n *\n * @default AvatarBaseShape.Circle\n */\n shape?: AvatarBaseShape;\n /**\n * Optional prop to include the border with the Avatar.\n * For internal use only.\n *\n * @default false\n */\n hasBorder?: boolean;\n};\n"]}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AvatarBaseShape = exports.AvatarBaseSize = void 0;
4
+ var AvatarBase_types_1 = require("./AvatarBase.types.cjs");
5
+ Object.defineProperty(exports, "AvatarBaseSize", { enumerable: true, get: function () { return AvatarBase_types_1.AvatarBaseSize; } });
6
+ Object.defineProperty(exports, "AvatarBaseShape", { enumerable: true, get: function () { return AvatarBase_types_1.AvatarBaseShape; } });
7
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/AvatarBase/index.ts"],"names":[],"mappings":";;;AAAA,2DAI4B;AAH1B,kHAAA,cAAc,OAAA;AACd,mHAAA,eAAe,OAAA","sourcesContent":["export {\n AvatarBaseSize,\n AvatarBaseShape,\n type AvatarBasePropsShared,\n} from './AvatarBase.types';\n"]}
@@ -0,0 +1,2 @@
1
+ export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./AvatarBase.types.cjs";
2
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,qBAAqB,GAC3B,+BAA2B"}
@@ -0,0 +1,2 @@
1
+ export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./AvatarBase.types.mjs";
2
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EACf,KAAK,qBAAqB,GAC3B,+BAA2B"}
@@ -0,0 +1,2 @@
1
+ export { AvatarBaseSize, AvatarBaseShape } from "./AvatarBase.types.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/AvatarBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,eAAe,EAEhB,+BAA2B","sourcesContent":["export {\n AvatarBaseSize,\n AvatarBaseShape,\n type AvatarBasePropsShared,\n} from './AvatarBase.types';\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=AvatarNetwork.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarNetwork.types.cjs","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * AvatarNetwork component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n * Note: AvatarNetworkSize is not included here because it inherits from\n * AvatarBaseSize which will be migrated separately (DSYS-473).\n */\nexport type AvatarNetworkPropsShared = {\n /**\n * Optional name of the network.\n * Used as alt text for the image, and the first letter is used as fallback\n * text when no explicit fallbackText is provided.\n */\n name?: string;\n /**\n * Optional text to display when no image is provided or when the image\n * fails to load. If not provided, the first letter of name is used.\n */\n fallbackText?: string;\n};\n"]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * AvatarNetwork component shared props (ADR-0004)
3
+ * Platform-independent properties shared across React and React Native.
4
+ * Note: AvatarNetworkSize is not included here because it inherits from
5
+ * AvatarBaseSize which will be migrated separately (DSYS-473).
6
+ */
7
+ export type AvatarNetworkPropsShared = {
8
+ /**
9
+ * Optional name of the network.
10
+ * Used as alt text for the image, and the first letter is used as fallback
11
+ * text when no explicit fallbackText is provided.
12
+ */
13
+ name?: string;
14
+ /**
15
+ * Optional text to display when no image is provided or when the image
16
+ * fails to load. If not provided, the first letter of name is used.
17
+ */
18
+ fallbackText?: string;
19
+ };
20
+ //# sourceMappingURL=AvatarNetwork.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarNetwork.types.d.cts","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * AvatarNetwork component shared props (ADR-0004)
3
+ * Platform-independent properties shared across React and React Native.
4
+ * Note: AvatarNetworkSize is not included here because it inherits from
5
+ * AvatarBaseSize which will be migrated separately (DSYS-473).
6
+ */
7
+ export type AvatarNetworkPropsShared = {
8
+ /**
9
+ * Optional name of the network.
10
+ * Used as alt text for the image, and the first letter is used as fallback
11
+ * text when no explicit fallbackText is provided.
12
+ */
13
+ name?: string;
14
+ /**
15
+ * Optional text to display when no image is provided or when the image
16
+ * fails to load. If not provided, the first letter of name is used.
17
+ */
18
+ fallbackText?: string;
19
+ };
20
+ //# sourceMappingURL=AvatarNetwork.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarNetwork.types.d.mts","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=AvatarNetwork.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarNetwork.types.mjs","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/AvatarNetwork.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * AvatarNetwork component shared props (ADR-0004)\n * Platform-independent properties shared across React and React Native.\n * Note: AvatarNetworkSize is not included here because it inherits from\n * AvatarBaseSize which will be migrated separately (DSYS-473).\n */\nexport type AvatarNetworkPropsShared = {\n /**\n * Optional name of the network.\n * Used as alt text for the image, and the first letter is used as fallback\n * text when no explicit fallbackText is provided.\n */\n name?: string;\n /**\n * Optional text to display when no image is provided or when the image\n * fails to load. If not provided, the first letter of name is used.\n */\n fallbackText?: string;\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type AvatarNetworkPropsShared } from './AvatarNetwork.types';\n"]}
@@ -0,0 +1,2 @@
1
+ export { type AvatarNetworkPropsShared } from "./AvatarNetwork.types.cjs";
2
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,kCAA8B"}
@@ -0,0 +1,2 @@
1
+ export { type AvatarNetworkPropsShared } from "./AvatarNetwork.types.mjs";
2
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,wBAAwB,EAAE,kCAA8B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/AvatarNetwork/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type AvatarNetworkPropsShared } from './AvatarNetwork.types';\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/design-system-shared",
3
- "version": "0.4.0-preview.645f8b0",
3
+ "version": "0.4.0-preview.96aaa54",
4
4
  "description": "Shared types for design system libraries",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -52,12 +52,14 @@
52
52
  "@metamask/auto-changelog": "^5.3.2",
53
53
  "@ts-bridge/cli": "^0.6.3",
54
54
  "@types/jest": "^27.4.1",
55
- "@types/react": "^18.2.0",
56
55
  "deepmerge": "^4.2.2",
57
56
  "jest": "^29.7.0",
58
57
  "ts-jest": "^29.2.5",
59
58
  "typescript": "~5.2.2"
60
59
  },
60
+ "peerDependencies": {
61
+ "react": "^17.0.0 || ^18.0.0"
62
+ },
61
63
  "engines": {
62
64
  "node": "^18.18 || >=20"
63
65
  },