@metamask-previews/design-system-shared 0.6.0-preview.69c659c → 0.6.0-preview.b4e6ece

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 (49) hide show
  1. package/dist/index.cjs +7 -9
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.d.cts +2 -1
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.mts +2 -1
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +3 -2
  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/utils/isReactNodeRenderable.cjs +20 -0
  26. package/dist/utils/isReactNodeRenderable.cjs.map +1 -0
  27. package/dist/utils/isReactNodeRenderable.d.cts +15 -0
  28. package/dist/utils/isReactNodeRenderable.d.cts.map +1 -0
  29. package/dist/utils/isReactNodeRenderable.d.mts +15 -0
  30. package/dist/utils/isReactNodeRenderable.d.mts.map +1 -0
  31. package/dist/utils/isReactNodeRenderable.mjs +16 -0
  32. package/dist/utils/isReactNodeRenderable.mjs.map +1 -0
  33. package/package.json +7 -2
  34. package/dist/types/Box/Box.types.cjs +0 -176
  35. package/dist/types/Box/Box.types.cjs.map +0 -1
  36. package/dist/types/Box/Box.types.d.cts +0 -297
  37. package/dist/types/Box/Box.types.d.cts.map +0 -1
  38. package/dist/types/Box/Box.types.d.mts +0 -297
  39. package/dist/types/Box/Box.types.d.mts.map +0 -1
  40. package/dist/types/Box/Box.types.mjs +0 -173
  41. package/dist/types/Box/Box.types.mjs.map +0 -1
  42. package/dist/types/Box/index.cjs +0 -11
  43. package/dist/types/Box/index.cjs.map +0 -1
  44. package/dist/types/Box/index.d.cts +0 -2
  45. package/dist/types/Box/index.d.cts.map +0 -1
  46. package/dist/types/Box/index.d.mts +0 -2
  47. package/dist/types/Box/index.d.mts.map +0 -1
  48. package/dist/types/Box/index.mjs +0 -2
  49. package/dist/types/Box/index.mjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BoxBorderColor = exports.BoxBackgroundColor = exports.BoxJustifyContent = exports.BoxAlignItems = exports.BoxFlexWrap = exports.BoxFlexDirection = exports.BadgeWrapperPosition = exports.BadgeWrapperPositionAnchorShape = exports.BannerAlertSeverity = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeCountSize = exports.generateIconSeed = exports.isEthereumAddress = exports.generateSeedNonEthereum = exports.generateSeedEthereum = exports.extractAccountAddress = void 0;
3
+ exports.BadgeWrapperPosition = exports.BadgeWrapperPositionAnchorShape = exports.BannerAlertSeverity = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeCountSize = exports.AvatarBaseShape = exports.AvatarBaseSize = exports.isReactNodeRenderable = 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
+ var isReactNodeRenderable_1 = require("./utils/isReactNodeRenderable.cjs");
11
+ Object.defineProperty(exports, "isReactNodeRenderable", { enumerable: true, get: function () { return isReactNodeRenderable_1.isReactNodeRenderable; } });
12
+ // AvatarBase types (ADR-0003 + ADR-0004)
13
+ var AvatarBase_1 = require("./types/AvatarBase/index.cjs");
14
+ Object.defineProperty(exports, "AvatarBaseSize", { enumerable: true, get: function () { return AvatarBase_1.AvatarBaseSize; } });
15
+ Object.defineProperty(exports, "AvatarBaseShape", { enumerable: true, get: function () { return AvatarBase_1.AvatarBaseShape; } });
10
16
  // BadgeCount types (ADR-0003 + ADR-0004)
11
17
  var BadgeCount_1 = require("./types/BadgeCount/index.cjs");
12
18
  Object.defineProperty(exports, "BadgeCountSize", { enumerable: true, get: function () { return BadgeCount_1.BadgeCountSize; } });
@@ -21,12 +27,4 @@ Object.defineProperty(exports, "BannerAlertSeverity", { enumerable: true, get: f
21
27
  var BadgeWrapper_1 = require("./types/BadgeWrapper/index.cjs");
22
28
  Object.defineProperty(exports, "BadgeWrapperPositionAnchorShape", { enumerable: true, get: function () { return BadgeWrapper_1.BadgeWrapperPositionAnchorShape; } });
23
29
  Object.defineProperty(exports, "BadgeWrapperPosition", { enumerable: true, get: function () { return BadgeWrapper_1.BadgeWrapperPosition; } });
24
- // Box types (ADR-0003 + ADR-0004)
25
- var Box_1 = require("./types/Box/index.cjs");
26
- Object.defineProperty(exports, "BoxFlexDirection", { enumerable: true, get: function () { return Box_1.BoxFlexDirection; } });
27
- Object.defineProperty(exports, "BoxFlexWrap", { enumerable: true, get: function () { return Box_1.BoxFlexWrap; } });
28
- Object.defineProperty(exports, "BoxAlignItems", { enumerable: true, get: function () { return Box_1.BoxAlignItems; } });
29
- Object.defineProperty(exports, "BoxJustifyContent", { enumerable: true, get: function () { return Box_1.BoxJustifyContent; } });
30
- Object.defineProperty(exports, "BoxBackgroundColor", { enumerable: true, get: function () { return Box_1.BoxBackgroundColor; } });
31
- Object.defineProperty(exports, "BoxBorderColor", { enumerable: true, get: function () { return Box_1.BoxBorderColor; } });
32
30
  //# sourceMappingURL=index.cjs.map
@@ -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;AAsBjB,0CAA0C;AAC1C,6DAG6B;AAF3B,kHAAA,mBAAmB,OAAA;AAIrB,2CAA2C;AAC3C,+DAK8B;AAJ5B,+HAAA,+BAA+B,OAAA;AAC/B,oHAAA,oBAAoB,OAAA;AAKtB,kCAAkC;AAClC,6CAUqB;AATnB,uGAAA,gBAAgB,OAAA;AAChB,kGAAA,WAAW,OAAA;AACX,oGAAA,aAAa,OAAA;AACb,wGAAA,iBAAiB,OAAA;AACjB,yGAAA,kBAAkB,OAAA;AAClB,qGAAA,cAAc,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// TextOrChildren types (ADR-0004)\nexport { type TextOrChildrenPropsShared } from './types/TextOrChildren';\n\n// BoxHorizontal types (ADR-0004)\nexport { type BoxHorizontalPropsShared } from './types/BoxHorizontal';\n\n// BoxVertical types (ADR-0004)\nexport { type BoxVerticalPropsShared } from './types/BoxVertical';\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\n// BadgeWrapper types (ADR-0003 + ADR-0004)\nexport {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './types/BadgeWrapper';\n\n// Box types (ADR-0003 + ADR-0004)\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n type BoxSpacing,\n type BoxBorderWidth,\n type BoxPropsShared,\n} from './types/Box';\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,2EAAsE;AAA7D,8HAAA,qBAAqB,OAAA;AAE9B,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;AAsBjB,0CAA0C;AAC1C,6DAG6B;AAF3B,kHAAA,mBAAmB,OAAA;AAIrB,2CAA2C;AAC3C,+DAK8B;AAJ5B,+HAAA,+BAA+B,OAAA;AAC/B,oHAAA,oBAAoB,OAAA","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\nexport { isReactNodeRenderable } from './utils/isReactNodeRenderable';\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// TextOrChildren types (ADR-0004)\nexport { type TextOrChildrenPropsShared } from './types/TextOrChildren';\n\n// BoxHorizontal types (ADR-0004)\nexport { type BoxHorizontalPropsShared } from './types/BoxHorizontal';\n\n// BoxVertical types (ADR-0004)\nexport { type BoxVerticalPropsShared } from './types/BoxVertical';\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\n// BadgeWrapper types (ADR-0003 + ADR-0004)\nexport {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './types/BadgeWrapper';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,6 @@
1
1
  export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed, } from "./utils/caip-address.cjs";
2
+ export { isReactNodeRenderable } from "./utils/isReactNodeRenderable.cjs";
3
+ export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./types/AvatarBase/index.cjs";
2
4
  export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.cjs";
3
5
  export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.cjs";
4
6
  export { type BannerBasePropsShared } from "./types/BannerBase/index.cjs";
@@ -9,5 +11,4 @@ export { type ButtonFilterPropsShared } from "./types/ButtonFilter/index.cjs";
9
11
  export { type AvatarNetworkPropsShared } from "./types/AvatarNetwork/index.cjs";
10
12
  export { BannerAlertSeverity, type BannerAlertPropsShared, } from "./types/BannerAlert/index.cjs";
11
13
  export { BadgeWrapperPositionAnchorShape, BadgeWrapperPosition, type BadgeWrapperCustomPosition, type BadgeWrapperPropsShared, } from "./types/BadgeWrapper/index.cjs";
12
- export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, type BoxSpacing, type BoxBorderWidth, type BoxPropsShared, } from "./types/Box/index.cjs";
13
14
  //# 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,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EAAE,KAAK,sBAAsB,EAAE,sCAA4B;AAGlE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,uCAA6B;AAG9B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,8BAAoB"}
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;AAE9B,OAAO,EAAE,qBAAqB,EAAE,0CAAsC;AAGtE,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,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EAAE,KAAK,sBAAsB,EAAE,sCAA4B;AAGlE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,uCAA6B"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,6 @@
1
1
  export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed, } from "./utils/caip-address.mjs";
2
+ export { isReactNodeRenderable } from "./utils/isReactNodeRenderable.mjs";
3
+ export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./types/AvatarBase/index.mjs";
2
4
  export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.mjs";
3
5
  export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.mjs";
4
6
  export { type BannerBasePropsShared } from "./types/BannerBase/index.mjs";
@@ -9,5 +11,4 @@ export { type ButtonFilterPropsShared } from "./types/ButtonFilter/index.mjs";
9
11
  export { type AvatarNetworkPropsShared } from "./types/AvatarNetwork/index.mjs";
10
12
  export { BannerAlertSeverity, type BannerAlertPropsShared, } from "./types/BannerAlert/index.mjs";
11
13
  export { BadgeWrapperPositionAnchorShape, BadgeWrapperPosition, type BadgeWrapperCustomPosition, type BadgeWrapperPropsShared, } from "./types/BadgeWrapper/index.mjs";
12
- export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, type BoxSpacing, type BoxBorderWidth, type BoxPropsShared, } from "./types/Box/index.mjs";
13
14
  //# 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,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EAAE,KAAK,sBAAsB,EAAE,sCAA4B;AAGlE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,uCAA6B;AAG9B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,8BAAoB"}
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;AAE9B,OAAO,EAAE,qBAAqB,EAAE,0CAAsC;AAGtE,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,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EAAE,KAAK,sBAAsB,EAAE,sCAA4B;AAGlE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,uCAA6B"}
package/dist/index.mjs CHANGED
@@ -1,4 +1,7 @@
1
1
  export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed } from "./utils/caip-address.mjs";
2
+ export { isReactNodeRenderable } from "./utils/isReactNodeRenderable.mjs";
3
+ // AvatarBase types (ADR-0003 + ADR-0004)
4
+ export { AvatarBaseSize, AvatarBaseShape } from "./types/AvatarBase/index.mjs";
2
5
  // BadgeCount types (ADR-0003 + ADR-0004)
3
6
  export { BadgeCountSize } from "./types/BadgeCount/index.mjs";
4
7
  // BadgeStatus types (ADR-0003 + ADR-0004)
@@ -7,6 +10,4 @@ export { BadgeStatusStatus, BadgeStatusSize } from "./types/BadgeStatus/index.mj
7
10
  export { BannerAlertSeverity } from "./types/BannerAlert/index.mjs";
8
11
  // BadgeWrapper types (ADR-0003 + ADR-0004)
9
12
  export { BadgeWrapperPositionAnchorShape, BadgeWrapperPosition } from "./types/BadgeWrapper/index.mjs";
10
- // Box types (ADR-0003 + ADR-0004)
11
- export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor } from "./types/Box/index.mjs";
12
13
  //# sourceMappingURL=index.mjs.map
@@ -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;AAoB7B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EAEpB,sCAA4B;AAE7B,2CAA2C;AAC3C,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EAGrB,uCAA6B;AAE9B,kCAAkC;AAClC,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EAIf,8BAAoB","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// TextOrChildren types (ADR-0004)\nexport { type TextOrChildrenPropsShared } from './types/TextOrChildren';\n\n// BoxHorizontal types (ADR-0004)\nexport { type BoxHorizontalPropsShared } from './types/BoxHorizontal';\n\n// BoxVertical types (ADR-0004)\nexport { type BoxVerticalPropsShared } from './types/BoxVertical';\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\n// BadgeWrapper types (ADR-0003 + ADR-0004)\nexport {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './types/BadgeWrapper';\n\n// Box types (ADR-0003 + ADR-0004)\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n type BoxSpacing,\n type BoxBorderWidth,\n type BoxPropsShared,\n} from './types/Box';\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,OAAO,EAAE,qBAAqB,EAAE,0CAAsC;AAEtE,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;AAoB7B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EAEpB,sCAA4B;AAE7B,2CAA2C;AAC3C,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EAGrB,uCAA6B","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\nexport { isReactNodeRenderable } from './utils/isReactNodeRenderable';\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// TextOrChildren types (ADR-0004)\nexport { type TextOrChildrenPropsShared } from './types/TextOrChildren';\n\n// BoxHorizontal types (ADR-0004)\nexport { type BoxHorizontalPropsShared } from './types/BoxHorizontal';\n\n// BoxVertical types (ADR-0004)\nexport { type BoxVerticalPropsShared } from './types/BoxVertical';\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\n// BadgeWrapper types (ADR-0003 + ADR-0004)\nexport {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './types/BadgeWrapper';\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,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isReactNodeRenderable = void 0;
4
+ /**
5
+ * Returns whether a React child value should be treated as renderable content for
6
+ * conditional slots (for example `children`, optional `title`).
7
+ *
8
+ * `null`, `undefined`, and booleans are treated as non-renderable so patterns like
9
+ * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean
10
+ * or spurious layout when the condition is false. React does not render `true` or
11
+ * `false` as visible output.
12
+ *
13
+ * @param node - A React child value (for example `children` or an optional slot prop).
14
+ * @returns `true` when the value should be treated as renderable; otherwise `false`.
15
+ */
16
+ function isReactNodeRenderable(node) {
17
+ return node !== null && node !== undefined && typeof node !== 'boolean';
18
+ }
19
+ exports.isReactNodeRenderable = isReactNodeRenderable;
20
+ //# sourceMappingURL=isReactNodeRenderable.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isReactNodeRenderable.cjs","sourceRoot":"","sources":["../../src/utils/isReactNodeRenderable.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;GAWG;AACH,SAAgB,qBAAqB,CAAC,IAAe;IACnD,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC;AAFD,sDAEC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Returns whether a React child value should be treated as renderable content for\n * conditional slots (for example `children`, optional `title`).\n *\n * `null`, `undefined`, and booleans are treated as non-renderable so patterns like\n * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean\n * or spurious layout when the condition is false. React does not render `true` or\n * `false` as visible output.\n *\n * @param node - A React child value (for example `children` or an optional slot prop).\n * @returns `true` when the value should be treated as renderable; otherwise `false`.\n */\nexport function isReactNodeRenderable(node: ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== 'boolean';\n}\n"]}
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * Returns whether a React child value should be treated as renderable content for
4
+ * conditional slots (for example `children`, optional `title`).
5
+ *
6
+ * `null`, `undefined`, and booleans are treated as non-renderable so patterns like
7
+ * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean
8
+ * or spurious layout when the condition is false. React does not render `true` or
9
+ * `false` as visible output.
10
+ *
11
+ * @param node - A React child value (for example `children` or an optional slot prop).
12
+ * @returns `true` when the value should be treated as renderable; otherwise `false`.
13
+ */
14
+ export declare function isReactNodeRenderable(node: ReactNode): boolean;
15
+ //# sourceMappingURL=isReactNodeRenderable.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isReactNodeRenderable.d.cts","sourceRoot":"","sources":["../../src/utils/isReactNodeRenderable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAE9D"}
@@ -0,0 +1,15 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * Returns whether a React child value should be treated as renderable content for
4
+ * conditional slots (for example `children`, optional `title`).
5
+ *
6
+ * `null`, `undefined`, and booleans are treated as non-renderable so patterns like
7
+ * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean
8
+ * or spurious layout when the condition is false. React does not render `true` or
9
+ * `false` as visible output.
10
+ *
11
+ * @param node - A React child value (for example `children` or an optional slot prop).
12
+ * @returns `true` when the value should be treated as renderable; otherwise `false`.
13
+ */
14
+ export declare function isReactNodeRenderable(node: ReactNode): boolean;
15
+ //# sourceMappingURL=isReactNodeRenderable.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isReactNodeRenderable.d.mts","sourceRoot":"","sources":["../../src/utils/isReactNodeRenderable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAE9D"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Returns whether a React child value should be treated as renderable content for
3
+ * conditional slots (for example `children`, optional `title`).
4
+ *
5
+ * `null`, `undefined`, and booleans are treated as non-renderable so patterns like
6
+ * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean
7
+ * or spurious layout when the condition is false. React does not render `true` or
8
+ * `false` as visible output.
9
+ *
10
+ * @param node - A React child value (for example `children` or an optional slot prop).
11
+ * @returns `true` when the value should be treated as renderable; otherwise `false`.
12
+ */
13
+ export function isReactNodeRenderable(node) {
14
+ return node !== null && node !== undefined && typeof node !== 'boolean';
15
+ }
16
+ //# sourceMappingURL=isReactNodeRenderable.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isReactNodeRenderable.mjs","sourceRoot":"","sources":["../../src/utils/isReactNodeRenderable.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAe;IACnD,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,OAAO,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Returns whether a React child value should be treated as renderable content for\n * conditional slots (for example `children`, optional `title`).\n *\n * `null`, `undefined`, and booleans are treated as non-renderable so patterns like\n * `{condition && <Component />}` and `{condition && 'Label'}` do not leave a boolean\n * or spurious layout when the condition is false. React does not render `true` or\n * `false` as visible output.\n *\n * @param node - A React child value (for example `children` or an optional slot prop).\n * @returns `true` when the value should be treated as renderable; otherwise `false`.\n */\nexport function isReactNodeRenderable(node: ReactNode): boolean {\n return node !== null && node !== undefined && typeof node !== 'boolean';\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/design-system-shared",
3
- "version": "0.6.0-preview.69c659c",
3
+ "version": "0.6.0-preview.b4e6ece",
4
4
  "description": "Shared types for design system libraries",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -46,17 +46,22 @@
46
46
  "publish:preview": "yarn npm publish --tag preview"
47
47
  },
48
48
  "dependencies": {
49
- "@metamask/utils": "^11.10.0"
49
+ "@metamask/utils": "^11.11.0"
50
50
  },
51
51
  "devDependencies": {
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",
55
56
  "deepmerge": "^4.2.2",
56
57
  "jest": "^29.7.0",
58
+ "react": "^18.2.0",
57
59
  "ts-jest": "^29.2.5",
58
60
  "typescript": "~5.2.2"
59
61
  },
62
+ "peerDependencies": {
63
+ "react": "^17.0.0 || ^18.0.0"
64
+ },
60
65
  "engines": {
61
66
  "node": "^18.18 || >=20"
62
67
  },