@metamask-previews/design-system-shared 0.11.0-preview.9d477a9 → 0.12.0-preview.1679aa9
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.
- package/CHANGELOG.md +21 -6
- package/dist/index.cjs +4 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/dist/types/Tag/Tag.types.cjs +15 -0
- package/dist/types/Tag/Tag.types.cjs.map +1 -0
- package/dist/types/Tag/Tag.types.d.cts +39 -0
- package/dist/types/Tag/Tag.types.d.cts.map +1 -0
- package/dist/types/Tag/Tag.types.d.mts +39 -0
- package/dist/types/Tag/Tag.types.d.mts.map +1 -0
- package/dist/types/Tag/Tag.types.mjs +12 -0
- package/dist/types/Tag/Tag.types.mjs.map +1 -0
- package/dist/types/Tag/index.cjs +6 -0
- package/dist/types/Tag/index.cjs.map +1 -0
- package/dist/types/Tag/index.d.cts +2 -0
- package/dist/types/Tag/index.d.cts.map +1 -0
- package/dist/types/Tag/index.d.mts +2 -0
- package/dist/types/Tag/index.d.mts.map +1 -0
- package/dist/types/Tag/index.mjs +2 -0
- package/dist/types/Tag/index.mjs.map +1 -0
- package/dist/types/TitleHub/TitleHub.types.cjs +3 -0
- package/dist/types/TitleHub/TitleHub.types.cjs.map +1 -0
- package/dist/types/TitleHub/TitleHub.types.d.cts +46 -0
- package/dist/types/TitleHub/TitleHub.types.d.cts.map +1 -0
- package/dist/types/TitleHub/TitleHub.types.d.mts +46 -0
- package/dist/types/TitleHub/TitleHub.types.d.mts.map +1 -0
- package/dist/types/TitleHub/TitleHub.types.mjs +2 -0
- package/dist/types/TitleHub/TitleHub.types.mjs.map +1 -0
- package/dist/types/TitleHub/index.cjs +3 -0
- package/dist/types/TitleHub/index.cjs.map +1 -0
- package/dist/types/TitleHub/index.d.cts +2 -0
- package/dist/types/TitleHub/index.d.cts.map +1 -0
- package/dist/types/TitleHub/index.d.mts +2 -0
- package/dist/types/TitleHub/index.d.mts.map +1 -0
- package/dist/types/TitleHub/index.mjs +2 -0
- package/dist/types/TitleHub/index.mjs.map +1 -0
- package/package.json +5 -10
- package/dist/types/Icon/Icon.types.cjs +0 -351
- package/dist/types/Icon/Icon.types.cjs.map +0 -1
- package/dist/types/Icon/Icon.types.d.cts +0 -369
- package/dist/types/Icon/Icon.types.d.cts.map +0 -1
- package/dist/types/Icon/Icon.types.d.mts +0 -369
- package/dist/types/Icon/Icon.types.d.mts.map +0 -1
- package/dist/types/Icon/Icon.types.mjs +0 -348
- package/dist/types/Icon/Icon.types.mjs.map +0 -1
- package/dist/types/Icon/index.cjs +0 -8
- package/dist/types/Icon/index.cjs.map +0 -1
- package/dist/types/Icon/index.d.cts +0 -2
- package/dist/types/Icon/index.d.cts.map +0 -1
- package/dist/types/Icon/index.d.mts +0 -2
- package/dist/types/Icon/index.d.mts.map +0 -1
- package/dist/types/Icon/index.mjs +0 -2
- package/dist/types/Icon/index.mjs.map +0 -1
- package/dist/utils/isReactNodeRenderable.cjs +0 -20
- package/dist/utils/isReactNodeRenderable.cjs.map +0 -1
- package/dist/utils/isReactNodeRenderable.d.cts +0 -15
- package/dist/utils/isReactNodeRenderable.d.cts.map +0 -1
- package/dist/utils/isReactNodeRenderable.d.mts +0 -15
- package/dist/utils/isReactNodeRenderable.d.mts.map +0 -1
- package/dist/utils/isReactNodeRenderable.mjs +0 -16
- package/dist/utils/isReactNodeRenderable.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.12.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added `TitleHubPropsShared` and `CheckboxPropsShared` for shared cross-platform component contracts. ([#1052](https://github.com/MetaMask/metamask-design-system/pull/1052), [#1040](https://github.com/MetaMask/metamask-design-system/pull/1040))
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Expanded the `react` peer dependency range to support React 19 consumers. ([#1089](https://github.com/MetaMask/metamask-design-system/pull/1089))
|
|
19
|
+
|
|
20
|
+
### Removed
|
|
21
|
+
|
|
22
|
+
- **BREAKING:** Removed `isReactNodeRenderable` from the public API; replace imports with plain truthy checks instead. See [Migration Guide](./MIGRATION.md#from-version-0110-to-0120). ([#1076](https://github.com/MetaMask/metamask-design-system/pull/1076))
|
|
23
|
+
|
|
10
24
|
## [0.11.0]
|
|
11
25
|
|
|
12
26
|
### Added
|
|
@@ -45,19 +59,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
45
59
|
|
|
46
60
|
### Added
|
|
47
61
|
|
|
48
|
-
- Added shared types used by new React Native header components, including `HeaderRoot` contracts consumed by `@metamask/design-system-react-native` ([#1029](https://github.com/MetaMask/metamask-design-system/pull/1029))
|
|
49
|
-
- Added shared `BoxHorizontal` and `BoxVertical` utility component contracts for cross-platform layout primitives ([#1003](https://github.com/MetaMask/metamask-design-system/pull/1003))
|
|
62
|
+
- Added shared types used by new React Native header components, including `HeaderRoot` contracts consumed by `@metamask/design-system-react-native` ([#1029](https://github.com/MetaMask/metamask-design-system/pull/1029))
|
|
63
|
+
- Added shared `BoxHorizontal` and `BoxVertical` utility component contracts for cross-platform layout primitives ([#1003](https://github.com/MetaMask/metamask-design-system/pull/1003))
|
|
50
64
|
|
|
51
65
|
### Changed
|
|
52
66
|
|
|
53
|
-
- Migrated `AvatarBase` type exports from enum-based definitions to shared const-object + string-union types, keeping consumers aligned with the ADR-0003/ADR-0004 type model ([#1005](https://github.com/MetaMask/metamask-design-system/pull/1005))
|
|
54
|
-
- Updated `@metamask/utils` dependency to `^11.11.0` ([#1033](https://github.com/MetaMask/metamask-design-system/pull/1033))
|
|
67
|
+
- Migrated `AvatarBase` type exports from enum-based definitions to shared const-object + string-union types, keeping consumers aligned with the ADR-0003/ADR-0004 type model ([#1005](https://github.com/MetaMask/metamask-design-system/pull/1005))
|
|
68
|
+
- Updated `@metamask/utils` dependency to `^11.11.0` ([#1033](https://github.com/MetaMask/metamask-design-system/pull/1033))
|
|
55
69
|
|
|
56
70
|
## [0.6.0]
|
|
57
71
|
|
|
58
72
|
### Changed
|
|
59
73
|
|
|
60
|
-
- Added shared `BadgeWrapper` const objects and props (`BadgeWrapperPosition`, `BadgeWrapperPositionAnchorShape`, `BadgeWrapperCustomPosition`, `BadgeWrapperPropsShared`) so React and React Native now consume a single source of truth for the ADR-0003/ADR-0004 types; both platform packages re-export the shared definitions so existing imports keep working even as the shared package remains the canonical source. See the [design-system-react migration guide](../design-system-react/MIGRATION.md#from-version-0120-to-0130) for additional guidance ([#1014](https://github.com/MetaMask/metamask-design-system/pull/1014))
|
|
74
|
+
- Added shared `BadgeWrapper` const objects and props (`BadgeWrapperPosition`, `BadgeWrapperPositionAnchorShape`, `BadgeWrapperCustomPosition`, `BadgeWrapperPropsShared`) so React and React Native now consume a single source of truth for the ADR-0003/ADR-0004 types; both platform packages re-export the shared definitions so existing imports keep working even as the shared package remains the canonical source. See the [design-system-react migration guide](../design-system-react/MIGRATION.md#from-version-0120-to-0130) for additional guidance ([#1014](https://github.com/MetaMask/metamask-design-system/pull/1014))
|
|
61
75
|
|
|
62
76
|
## [0.5.0]
|
|
63
77
|
|
|
@@ -121,7 +135,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
121
135
|
- **Initial release** - MetaMask Design System Shared
|
|
122
136
|
- Adding CAIP-10 address utilities ([#817](https://github.com/MetaMask/metamask-design-system/pull/817))
|
|
123
137
|
|
|
124
|
-
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.
|
|
138
|
+
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.12.0...HEAD
|
|
139
|
+
[0.12.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.11.0...@metamask/design-system-shared@0.12.0
|
|
125
140
|
[0.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.10.0...@metamask/design-system-shared@0.11.0
|
|
126
141
|
[0.10.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.9.0...@metamask/design-system-shared@0.10.0
|
|
127
142
|
[0.9.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.8.0...@metamask/design-system-shared@0.9.0
|
package/dist/index.cjs
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.TagSeverity = exports.AvatarFaviconSize = exports.TextVariant = exports.TextColor = exports.FontWeight = exports.FontStyle = exports.FontFamily = exports.AvatarAccountVariant = exports.AvatarAccountSize = exports.BadgeWrapperPosition = exports.BadgeWrapperPositionAnchorShape = exports.BannerAlertSeverity = exports.AvatarTokenSize = exports.KeyValueRowVariant = exports.HeaderSearchVariant = exports.IconAlertSeverity = 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
|
-
var isReactNodeRenderable_1 = require("./utils/isReactNodeRenderable.cjs");
|
|
11
|
-
Object.defineProperty(exports, "isReactNodeRenderable", { enumerable: true, get: function () { return isReactNodeRenderable_1.isReactNodeRenderable; } });
|
|
12
10
|
// AvatarBase types (ADR-0003 + ADR-0004)
|
|
13
11
|
var AvatarBase_1 = require("./types/AvatarBase/index.cjs");
|
|
14
12
|
Object.defineProperty(exports, "AvatarBaseSize", { enumerable: true, get: function () { return AvatarBase_1.AvatarBaseSize; } });
|
|
@@ -52,9 +50,7 @@ Object.defineProperty(exports, "TextVariant", { enumerable: true, get: function
|
|
|
52
50
|
// AvatarFavicon types (ADR-0004)
|
|
53
51
|
var AvatarFavicon_1 = require("./types/AvatarFavicon/index.cjs");
|
|
54
52
|
Object.defineProperty(exports, "AvatarFaviconSize", { enumerable: true, get: function () { return AvatarFavicon_1.AvatarFaviconSize; } });
|
|
55
|
-
//
|
|
56
|
-
var
|
|
57
|
-
Object.defineProperty(exports, "
|
|
58
|
-
Object.defineProperty(exports, "IconName", { enumerable: true, get: function () { return Icon_1.IconName; } });
|
|
59
|
-
Object.defineProperty(exports, "IconSize", { enumerable: true, get: function () { return Icon_1.IconSize; } });
|
|
53
|
+
// Tag types (ADR-0003 + ADR-0004)
|
|
54
|
+
var Tag_1 = require("./types/Tag/index.cjs");
|
|
55
|
+
Object.defineProperty(exports, "TagSeverity", { enumerable: true, get: function () { return Tag_1.TagSeverity; } });
|
|
60
56
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -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,
|
|
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;AAIjB,wCAAwC;AACxC,yDAG2B;AAFzB,8GAAA,iBAAiB,OAAA;AAmBnB,2CAA2C;AAC3C,+DAK8B;AAJ5B,mHAAA,mBAAmB,OAAA;AASrB,0CAA0C;AAC1C,6DAG6B;AAF3B,iHAAA,kBAAkB,OAAA;AAUpB,0CAA0C;AAC1C,6DAG6B;AAF3B,8GAAA,eAAe,OAAA;AAIjB,0CAA0C;AAC1C,6DAG6B;AAF3B,kHAAA,mBAAmB,OAAA;AAOrB,2CAA2C;AAC3C,+DAK8B;AAJ5B,+HAAA,+BAA+B,OAAA;AAC/B,oHAAA,oBAAoB,OAAA;AAKtB,iEAI+B;AAH7B,kHAAA,iBAAiB,OAAA;AACjB,qHAAA,oBAAoB,OAAA;AAItB,mCAAmC;AACnC,+CAOsB;AANpB,kGAAA,UAAU,OAAA;AACV,iGAAA,SAAS,OAAA;AACT,kGAAA,UAAU,OAAA;AACV,iGAAA,SAAS,OAAA;AACT,mGAAA,WAAW,OAAA;AAIb,iCAAiC;AACjC,iEAG+B;AAF7B,kHAAA,iBAAiB,OAAA;AAOnB,kCAAkC;AAClC,6CAA+D;AAAtD,kGAAA,WAAW,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// IconAlert types (ADR-0003 + ADR-0004)\nexport {\n IconAlertSeverity,\n type IconAlertPropsShared,\n} from './types/IconAlert';\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// TitleHub types (ADR-0004)\nexport { type TitleHubPropsShared } from './types/TitleHub';\n\n// BoxColumn types (ADR-0004)\nexport { type BoxColumnPropsShared } from './types/BoxColumn';\n\n// BoxRow types (ADR-0004)\nexport { type BoxRowPropsShared } from './types/BoxRow';\n\n// HeaderSearch types (ADR-0003 + ADR-0004)\nexport {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from './types/HeaderSearch';\n\n// KeyValueColumn types (ADR-0004)\nexport { type KeyValueColumnPropsShared } from './types/KeyValueColumn';\n\n// KeyValueRow types (ADR-0003 + ADR-0004)\nexport {\n KeyValueRowVariant,\n type KeyValueRowPropsShared,\n} from './types/KeyValueRow';\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// AvatarToken types (ADR-0003 + ADR-0004)\nexport {\n AvatarTokenSize,\n type AvatarTokenPropsShared,\n} from './types/AvatarToken';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n\n// BadgeNetwork types (ADR-0004)\nexport { type BadgeNetworkPropsShared } from './types/BadgeNetwork';\n\n// BadgeWrapper types (ADR-0003 + ADR-0004)\nexport {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './types/BadgeWrapper';\n\nexport {\n AvatarAccountSize,\n AvatarAccountVariant,\n type AvatarAccountPropsShared,\n} from './types/AvatarAccount';\n\n// Text types (ADR-0003 + ADR-0004)\nexport {\n FontFamily,\n FontStyle,\n FontWeight,\n TextColor,\n TextVariant,\n type TextPropsShared,\n} from './types/Text';\n\n// AvatarFavicon types (ADR-0004)\nexport {\n AvatarFaviconSize,\n type AvatarFaviconPropsShared,\n} from './types/AvatarFavicon';\n\n// Checkbox types (ADR-0004)\nexport { type CheckboxPropsShared } from './types/Checkbox';\n\n// Tag types (ADR-0003 + ADR-0004)\nexport { TagSeverity, type TagPropsShared } from './types/Tag';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed, } from "./utils/caip-address.cjs";
|
|
2
|
-
export { isReactNodeRenderable } from "./utils/isReactNodeRenderable.cjs";
|
|
3
2
|
export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./types/AvatarBase/index.cjs";
|
|
4
3
|
export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.cjs";
|
|
5
4
|
export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.cjs";
|
|
6
5
|
export { IconAlertSeverity, type IconAlertPropsShared, } from "./types/IconAlert/index.cjs";
|
|
7
6
|
export { type BannerBasePropsShared } from "./types/BannerBase/index.cjs";
|
|
8
7
|
export { type TextOrChildrenPropsShared } from "./types/TextOrChildren/index.cjs";
|
|
9
|
-
export { type
|
|
8
|
+
export { type TitleHubPropsShared } from "./types/TitleHub/index.cjs";
|
|
10
9
|
export { type BoxColumnPropsShared } from "./types/BoxColumn/index.cjs";
|
|
10
|
+
export { type BoxRowPropsShared } from "./types/BoxRow/index.cjs";
|
|
11
11
|
export { HeaderSearchVariant, type HeaderSearchInlinePropsShared, type HeaderSearchPropsShared, type HeaderSearchScreenPropsShared, } from "./types/HeaderSearch/index.cjs";
|
|
12
12
|
export { type KeyValueColumnPropsShared } from "./types/KeyValueColumn/index.cjs";
|
|
13
13
|
export { KeyValueRowVariant, type KeyValueRowPropsShared, } from "./types/KeyValueRow/index.cjs";
|
|
@@ -21,5 +21,5 @@ export { AvatarAccountSize, AvatarAccountVariant, type AvatarAccountPropsShared,
|
|
|
21
21
|
export { FontFamily, FontStyle, FontWeight, TextColor, TextVariant, type TextPropsShared, } from "./types/Text/index.cjs";
|
|
22
22
|
export { AvatarFaviconSize, type AvatarFaviconPropsShared, } from "./types/AvatarFavicon/index.cjs";
|
|
23
23
|
export { type CheckboxPropsShared } from "./types/Checkbox/index.cjs";
|
|
24
|
-
export {
|
|
24
|
+
export { TagSeverity, type TagPropsShared } from "./types/Tag/index.cjs";
|
|
25
25
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -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;
|
|
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,EACL,iBAAiB,EACjB,KAAK,oBAAoB,GAC1B,oCAA0B;AAG3B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EAAE,KAAK,mBAAmB,EAAE,mCAAyB;AAG5D,OAAO,EAAE,KAAK,oBAAoB,EAAE,oCAA0B;AAG9D,OAAO,EAAE,KAAK,iBAAiB,EAAE,iCAAuB;AAGxD,OAAO,EACL,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,uCAA6B;AAG9B,OAAO,EAAE,KAAK,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EACL,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,uCAA6B;AAE9B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,wBAAwB,GAC9B,wCAA8B;AAG/B,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,KAAK,eAAe,GACrB,+BAAqB;AAGtB,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,wCAA8B;AAG/B,OAAO,EAAE,KAAK,mBAAmB,EAAE,mCAAyB;AAG5D,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,8BAAoB"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed, } from "./utils/caip-address.mjs";
|
|
2
|
-
export { isReactNodeRenderable } from "./utils/isReactNodeRenderable.mjs";
|
|
3
2
|
export { AvatarBaseSize, AvatarBaseShape, type AvatarBasePropsShared, } from "./types/AvatarBase/index.mjs";
|
|
4
3
|
export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.mjs";
|
|
5
4
|
export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.mjs";
|
|
6
5
|
export { IconAlertSeverity, type IconAlertPropsShared, } from "./types/IconAlert/index.mjs";
|
|
7
6
|
export { type BannerBasePropsShared } from "./types/BannerBase/index.mjs";
|
|
8
7
|
export { type TextOrChildrenPropsShared } from "./types/TextOrChildren/index.mjs";
|
|
9
|
-
export { type
|
|
8
|
+
export { type TitleHubPropsShared } from "./types/TitleHub/index.mjs";
|
|
10
9
|
export { type BoxColumnPropsShared } from "./types/BoxColumn/index.mjs";
|
|
10
|
+
export { type BoxRowPropsShared } from "./types/BoxRow/index.mjs";
|
|
11
11
|
export { HeaderSearchVariant, type HeaderSearchInlinePropsShared, type HeaderSearchPropsShared, type HeaderSearchScreenPropsShared, } from "./types/HeaderSearch/index.mjs";
|
|
12
12
|
export { type KeyValueColumnPropsShared } from "./types/KeyValueColumn/index.mjs";
|
|
13
13
|
export { KeyValueRowVariant, type KeyValueRowPropsShared, } from "./types/KeyValueRow/index.mjs";
|
|
@@ -21,5 +21,5 @@ export { AvatarAccountSize, AvatarAccountVariant, type AvatarAccountPropsShared,
|
|
|
21
21
|
export { FontFamily, FontStyle, FontWeight, TextColor, TextVariant, type TextPropsShared, } from "./types/Text/index.mjs";
|
|
22
22
|
export { AvatarFaviconSize, type AvatarFaviconPropsShared, } from "./types/AvatarFavicon/index.mjs";
|
|
23
23
|
export { type CheckboxPropsShared } from "./types/Checkbox/index.mjs";
|
|
24
|
-
export {
|
|
24
|
+
export { TagSeverity, type TagPropsShared } from "./types/Tag/index.mjs";
|
|
25
25
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -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;
|
|
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,EACL,iBAAiB,EACjB,KAAK,oBAAoB,GAC1B,oCAA0B;AAG3B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EAAE,KAAK,mBAAmB,EAAE,mCAAyB;AAG5D,OAAO,EAAE,KAAK,oBAAoB,EAAE,oCAA0B;AAG9D,OAAO,EAAE,KAAK,iBAAiB,EAAE,iCAAuB;AAGxD,OAAO,EACL,mBAAmB,EACnB,KAAK,6BAA6B,EAClC,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,GACnC,uCAA6B;AAG9B,OAAO,EAAE,KAAK,yBAAyB,EAAE,yCAA+B;AAGxE,OAAO,EACL,kBAAkB,EAClB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EAAE,KAAK,wBAAwB,EAAE,wCAA8B;AAGtE,OAAO,EACL,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,KAAK,0BAA0B,EAC/B,KAAK,uBAAuB,GAC7B,uCAA6B;AAE9B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,wBAAwB,GAC9B,wCAA8B;AAG/B,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EACX,KAAK,eAAe,GACrB,+BAAqB;AAGtB,OAAO,EACL,iBAAiB,EACjB,KAAK,wBAAwB,GAC9B,wCAA8B;AAG/B,OAAO,EAAE,KAAK,mBAAmB,EAAE,mCAAyB;AAG5D,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,8BAAoB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, isEthereumAddress, generateIconSeed } from "./utils/caip-address.mjs";
|
|
2
|
-
export { isReactNodeRenderable } from "./utils/isReactNodeRenderable.mjs";
|
|
3
2
|
// AvatarBase types (ADR-0003 + ADR-0004)
|
|
4
3
|
export { AvatarBaseSize, AvatarBaseShape } from "./types/AvatarBase/index.mjs";
|
|
5
4
|
// BadgeCount types (ADR-0003 + ADR-0004)
|
|
@@ -23,6 +22,6 @@ export { AvatarAccountSize, AvatarAccountVariant } from "./types/AvatarAccount/i
|
|
|
23
22
|
export { FontFamily, FontStyle, FontWeight, TextColor, TextVariant } from "./types/Text/index.mjs";
|
|
24
23
|
// AvatarFavicon types (ADR-0004)
|
|
25
24
|
export { AvatarFaviconSize } from "./types/AvatarFavicon/index.mjs";
|
|
26
|
-
//
|
|
27
|
-
export {
|
|
25
|
+
// Tag types (ADR-0003 + ADR-0004)
|
|
26
|
+
export { TagSeverity } from "./types/Tag/index.mjs";
|
|
28
27
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -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,
|
|
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;AAE7B,wCAAwC;AACxC,OAAO,EACL,iBAAiB,EAElB,oCAA0B;AAiB3B,2CAA2C;AAC3C,OAAO,EACL,mBAAmB,EAIpB,uCAA6B;AAK9B,0CAA0C;AAC1C,OAAO,EACL,kBAAkB,EAEnB,sCAA4B;AAQ7B,0CAA0C;AAC1C,OAAO,EACL,eAAe,EAEhB,sCAA4B;AAE7B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EAEpB,sCAA4B;AAK7B,2CAA2C;AAC3C,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EAGrB,uCAA6B;AAE9B,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EAErB,wCAA8B;AAE/B,mCAAmC;AACnC,OAAO,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,SAAS,EACT,WAAW,EAEZ,+BAAqB;AAEtB,iCAAiC;AACjC,OAAO,EACL,iBAAiB,EAElB,wCAA8B;AAK/B,kCAAkC;AAClC,OAAO,EAAE,WAAW,EAAuB,8BAAoB","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// IconAlert types (ADR-0003 + ADR-0004)\nexport {\n IconAlertSeverity,\n type IconAlertPropsShared,\n} from './types/IconAlert';\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// TitleHub types (ADR-0004)\nexport { type TitleHubPropsShared } from './types/TitleHub';\n\n// BoxColumn types (ADR-0004)\nexport { type BoxColumnPropsShared } from './types/BoxColumn';\n\n// BoxRow types (ADR-0004)\nexport { type BoxRowPropsShared } from './types/BoxRow';\n\n// HeaderSearch types (ADR-0003 + ADR-0004)\nexport {\n HeaderSearchVariant,\n type HeaderSearchInlinePropsShared,\n type HeaderSearchPropsShared,\n type HeaderSearchScreenPropsShared,\n} from './types/HeaderSearch';\n\n// KeyValueColumn types (ADR-0004)\nexport { type KeyValueColumnPropsShared } from './types/KeyValueColumn';\n\n// KeyValueRow types (ADR-0003 + ADR-0004)\nexport {\n KeyValueRowVariant,\n type KeyValueRowPropsShared,\n} from './types/KeyValueRow';\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// AvatarToken types (ADR-0003 + ADR-0004)\nexport {\n AvatarTokenSize,\n type AvatarTokenPropsShared,\n} from './types/AvatarToken';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n\n// BadgeNetwork types (ADR-0004)\nexport { type BadgeNetworkPropsShared } from './types/BadgeNetwork';\n\n// BadgeWrapper types (ADR-0003 + ADR-0004)\nexport {\n BadgeWrapperPositionAnchorShape,\n BadgeWrapperPosition,\n type BadgeWrapperCustomPosition,\n type BadgeWrapperPropsShared,\n} from './types/BadgeWrapper';\n\nexport {\n AvatarAccountSize,\n AvatarAccountVariant,\n type AvatarAccountPropsShared,\n} from './types/AvatarAccount';\n\n// Text types (ADR-0003 + ADR-0004)\nexport {\n FontFamily,\n FontStyle,\n FontWeight,\n TextColor,\n TextVariant,\n type TextPropsShared,\n} from './types/Text';\n\n// AvatarFavicon types (ADR-0004)\nexport {\n AvatarFaviconSize,\n type AvatarFaviconPropsShared,\n} from './types/AvatarFavicon';\n\n// Checkbox types (ADR-0004)\nexport { type CheckboxPropsShared } from './types/Checkbox';\n\n// Tag types (ADR-0003 + ADR-0004)\nexport { TagSeverity, type TagPropsShared } from './types/Tag';\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagSeverity = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Tag severity values (ADR-0003).
|
|
6
|
+
* Shared across platforms so Figma / React / React Native stay aligned.
|
|
7
|
+
*/
|
|
8
|
+
exports.TagSeverity = {
|
|
9
|
+
Neutral: 'neutral',
|
|
10
|
+
Success: 'success',
|
|
11
|
+
Error: 'error',
|
|
12
|
+
Warning: 'warning',
|
|
13
|
+
Info: 'info',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=Tag.types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.cjs","sourceRoot":"","sources":["../../../src/types/Tag/Tag.types.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Tag severity values (ADR-0003).\n * Shared across platforms so Figma / React / React Native stay aligned.\n */\nexport const TagSeverity = {\n Neutral: 'neutral',\n Success: 'success',\n Error: 'error',\n Warning: 'warning',\n Info: 'info',\n} as const;\n\nexport type TagSeverity = (typeof TagSeverity)[keyof typeof TagSeverity];\n\n/**\n * Tag component shared props (ADR-0004).\n * Platform-independent properties shared across React and React Native.\n */\nexport type TagPropsShared = {\n /**\n * Semantic severity (background, default text color for string children, and icon tint).\n * Aligns with `BannerAlert` and `IconAlert`, which use `severity` for the same class of states.\n *\n * @default TagSeverity.Neutral\n */\n severity?: TagSeverity;\n /**\n * Content inside the tag. String children are wrapped in design-system `Text` with tag typography; other nodes render unchanged.\n */\n children?: ReactNode;\n /**\n * Optional node at the start of the tag when no start icon is set (e.g. custom glyph or badge).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node at the end of the tag when no end icon is set.\n */\n endAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tag severity values (ADR-0003).
|
|
4
|
+
* Shared across platforms so Figma / React / React Native stay aligned.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TagSeverity: {
|
|
7
|
+
readonly Neutral: "neutral";
|
|
8
|
+
readonly Success: "success";
|
|
9
|
+
readonly Error: "error";
|
|
10
|
+
readonly Warning: "warning";
|
|
11
|
+
readonly Info: "info";
|
|
12
|
+
};
|
|
13
|
+
export type TagSeverity = (typeof TagSeverity)[keyof typeof TagSeverity];
|
|
14
|
+
/**
|
|
15
|
+
* Tag component shared props (ADR-0004).
|
|
16
|
+
* Platform-independent properties shared across React and React Native.
|
|
17
|
+
*/
|
|
18
|
+
export type TagPropsShared = {
|
|
19
|
+
/**
|
|
20
|
+
* Semantic severity (background, default text color for string children, and icon tint).
|
|
21
|
+
* Aligns with `BannerAlert` and `IconAlert`, which use `severity` for the same class of states.
|
|
22
|
+
*
|
|
23
|
+
* @default TagSeverity.Neutral
|
|
24
|
+
*/
|
|
25
|
+
severity?: TagSeverity;
|
|
26
|
+
/**
|
|
27
|
+
* Content inside the tag. String children are wrapped in design-system `Text` with tag typography; other nodes render unchanged.
|
|
28
|
+
*/
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Optional node at the start of the tag when no start icon is set (e.g. custom glyph or badge).
|
|
32
|
+
*/
|
|
33
|
+
startAccessory?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Optional node at the end of the tag when no end icon is set.
|
|
36
|
+
*/
|
|
37
|
+
endAccessory?: ReactNode;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=Tag.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.d.cts","sourceRoot":"","sources":["../../../src/types/Tag/Tag.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Tag severity values (ADR-0003).
|
|
4
|
+
* Shared across platforms so Figma / React / React Native stay aligned.
|
|
5
|
+
*/
|
|
6
|
+
export declare const TagSeverity: {
|
|
7
|
+
readonly Neutral: "neutral";
|
|
8
|
+
readonly Success: "success";
|
|
9
|
+
readonly Error: "error";
|
|
10
|
+
readonly Warning: "warning";
|
|
11
|
+
readonly Info: "info";
|
|
12
|
+
};
|
|
13
|
+
export type TagSeverity = (typeof TagSeverity)[keyof typeof TagSeverity];
|
|
14
|
+
/**
|
|
15
|
+
* Tag component shared props (ADR-0004).
|
|
16
|
+
* Platform-independent properties shared across React and React Native.
|
|
17
|
+
*/
|
|
18
|
+
export type TagPropsShared = {
|
|
19
|
+
/**
|
|
20
|
+
* Semantic severity (background, default text color for string children, and icon tint).
|
|
21
|
+
* Aligns with `BannerAlert` and `IconAlert`, which use `severity` for the same class of states.
|
|
22
|
+
*
|
|
23
|
+
* @default TagSeverity.Neutral
|
|
24
|
+
*/
|
|
25
|
+
severity?: TagSeverity;
|
|
26
|
+
/**
|
|
27
|
+
* Content inside the tag. String children are wrapped in design-system `Text` with tag typography; other nodes render unchanged.
|
|
28
|
+
*/
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Optional node at the start of the tag when no start icon is set (e.g. custom glyph or badge).
|
|
32
|
+
*/
|
|
33
|
+
startAccessory?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Optional node at the end of the tag when no end icon is set.
|
|
36
|
+
*/
|
|
37
|
+
endAccessory?: ReactNode;
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=Tag.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.d.mts","sourceRoot":"","sources":["../../../src/types/Tag/Tag.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;CAMd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,OAAO,WAAW,CAAC,CAAC;AAEzE;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag severity values (ADR-0003).
|
|
3
|
+
* Shared across platforms so Figma / React / React Native stay aligned.
|
|
4
|
+
*/
|
|
5
|
+
export const TagSeverity = {
|
|
6
|
+
Neutral: 'neutral',
|
|
7
|
+
Success: 'success',
|
|
8
|
+
Error: 'error',
|
|
9
|
+
Warning: 'warning',
|
|
10
|
+
Info: 'info',
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=Tag.types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.types.mjs","sourceRoot":"","sources":["../../../src/types/Tag/Tag.types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;CACJ,CAAC","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * Tag severity values (ADR-0003).\n * Shared across platforms so Figma / React / React Native stay aligned.\n */\nexport const TagSeverity = {\n Neutral: 'neutral',\n Success: 'success',\n Error: 'error',\n Warning: 'warning',\n Info: 'info',\n} as const;\n\nexport type TagSeverity = (typeof TagSeverity)[keyof typeof TagSeverity];\n\n/**\n * Tag component shared props (ADR-0004).\n * Platform-independent properties shared across React and React Native.\n */\nexport type TagPropsShared = {\n /**\n * Semantic severity (background, default text color for string children, and icon tint).\n * Aligns with `BannerAlert` and `IconAlert`, which use `severity` for the same class of states.\n *\n * @default TagSeverity.Neutral\n */\n severity?: TagSeverity;\n /**\n * Content inside the tag. String children are wrapped in design-system `Text` with tag typography; other nodes render unchanged.\n */\n children?: ReactNode;\n /**\n * Optional node at the start of the tag when no start icon is set (e.g. custom glyph or badge).\n */\n startAccessory?: ReactNode;\n /**\n * Optional node at the end of the tag when no end icon is set.\n */\n endAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TagSeverity = void 0;
|
|
4
|
+
var Tag_types_1 = require("./Tag.types.cjs");
|
|
5
|
+
Object.defineProperty(exports, "TagSeverity", { enumerable: true, get: function () { return Tag_types_1.TagSeverity; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/Tag/index.ts"],"names":[],"mappings":";;;AAAA,6CAA+D;AAAtD,wGAAA,WAAW,OAAA","sourcesContent":["export { TagSeverity, type TagPropsShared } from './Tag.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,wBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,cAAc,EAAE,wBAAoB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAuB,wBAAoB","sourcesContent":["export { TagSeverity, type TagPropsShared } from './Tag.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleHub.types.cjs","sourceRoot":"","sources":["../../../src/types/TitleHub/TitleHub.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * TitleHub component shared props (ADR-0004).\n * Platform-independent properties; platform packages extend with `ViewProps` / `className`,\n * `twClassName`, and platform `Text` prop passthroughs.\n */\nexport type TitleHubPropsShared = {\n /**\n * Optional primary amount line below the title (for example a fiat or token value).\n * When a string, platforms typically wrap with large display styles via `textProps`.\n * The amount row renders only when `amount` is renderable; `amountEndAccessory` alone does not show the row.\n */\n amount?: ReactNode;\n /**\n * Optional accessory rendered inline to the right of the amount.\n * Only shown when the amount row is shown (i.e. when `amount` is renderable).\n */\n amountEndAccessory?: ReactNode;\n /**\n * Title row above the optional amount (via platform `textProps` when a string). Required.\n * The title row renders only when `title` is renderable; `titleEndAccessory` alone does not show the row.\n */\n title: ReactNode;\n /**\n * Optional accessory rendered inline to the right of `title` in the title row.\n * Only shown when the title row is shown (i.e. when `title` is renderable).\n */\n titleEndAccessory?: ReactNode;\n /**\n * Optional custom bottom row when the bottom label row is not shown (`bottomLabel` is not renderable).\n * Mutually exclusive with the bottom label row: only one bottom row is shown.\n */\n bottomAccessory?: ReactNode;\n /**\n * Optional bottom row with secondary label styling when a string (via platform `textProps`).\n * The bottom label row renders only when `bottomLabel` is renderable; `bottomAccessory` is not used in that case.\n * `bottomLabelEndAccessory` alone does not show the row.\n */\n bottomLabel?: ReactNode;\n /**\n * Optional accessory rendered inline to the right of `bottomLabel` in the bottom label row.\n * Only shown when `bottomLabel` is renderable.\n */\n bottomLabelEndAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* TitleHub component shared props (ADR-0004).
|
|
4
|
+
* Platform-independent properties; platform packages extend with `ViewProps` / `className`,
|
|
5
|
+
* `twClassName`, and platform `Text` prop passthroughs.
|
|
6
|
+
*/
|
|
7
|
+
export type TitleHubPropsShared = {
|
|
8
|
+
/**
|
|
9
|
+
* Optional primary amount line below the title (for example a fiat or token value).
|
|
10
|
+
* When a string, platforms typically wrap with large display styles via `textProps`.
|
|
11
|
+
* The amount row renders only when `amount` is renderable; `amountEndAccessory` alone does not show the row.
|
|
12
|
+
*/
|
|
13
|
+
amount?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Optional accessory rendered inline to the right of the amount.
|
|
16
|
+
* Only shown when the amount row is shown (i.e. when `amount` is renderable).
|
|
17
|
+
*/
|
|
18
|
+
amountEndAccessory?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Title row above the optional amount (via platform `textProps` when a string). Required.
|
|
21
|
+
* The title row renders only when `title` is renderable; `titleEndAccessory` alone does not show the row.
|
|
22
|
+
*/
|
|
23
|
+
title: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Optional accessory rendered inline to the right of `title` in the title row.
|
|
26
|
+
* Only shown when the title row is shown (i.e. when `title` is renderable).
|
|
27
|
+
*/
|
|
28
|
+
titleEndAccessory?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Optional custom bottom row when the bottom label row is not shown (`bottomLabel` is not renderable).
|
|
31
|
+
* Mutually exclusive with the bottom label row: only one bottom row is shown.
|
|
32
|
+
*/
|
|
33
|
+
bottomAccessory?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Optional bottom row with secondary label styling when a string (via platform `textProps`).
|
|
36
|
+
* The bottom label row renders only when `bottomLabel` is renderable; `bottomAccessory` is not used in that case.
|
|
37
|
+
* `bottomLabelEndAccessory` alone does not show the row.
|
|
38
|
+
*/
|
|
39
|
+
bottomLabel?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Optional accessory rendered inline to the right of `bottomLabel` in the bottom label row.
|
|
42
|
+
* Only shown when `bottomLabel` is renderable.
|
|
43
|
+
*/
|
|
44
|
+
bottomLabelEndAccessory?: ReactNode;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=TitleHub.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleHub.types.d.cts","sourceRoot":"","sources":["../../../src/types/TitleHub/TitleHub.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC;CACrC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* TitleHub component shared props (ADR-0004).
|
|
4
|
+
* Platform-independent properties; platform packages extend with `ViewProps` / `className`,
|
|
5
|
+
* `twClassName`, and platform `Text` prop passthroughs.
|
|
6
|
+
*/
|
|
7
|
+
export type TitleHubPropsShared = {
|
|
8
|
+
/**
|
|
9
|
+
* Optional primary amount line below the title (for example a fiat or token value).
|
|
10
|
+
* When a string, platforms typically wrap with large display styles via `textProps`.
|
|
11
|
+
* The amount row renders only when `amount` is renderable; `amountEndAccessory` alone does not show the row.
|
|
12
|
+
*/
|
|
13
|
+
amount?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Optional accessory rendered inline to the right of the amount.
|
|
16
|
+
* Only shown when the amount row is shown (i.e. when `amount` is renderable).
|
|
17
|
+
*/
|
|
18
|
+
amountEndAccessory?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Title row above the optional amount (via platform `textProps` when a string). Required.
|
|
21
|
+
* The title row renders only when `title` is renderable; `titleEndAccessory` alone does not show the row.
|
|
22
|
+
*/
|
|
23
|
+
title: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Optional accessory rendered inline to the right of `title` in the title row.
|
|
26
|
+
* Only shown when the title row is shown (i.e. when `title` is renderable).
|
|
27
|
+
*/
|
|
28
|
+
titleEndAccessory?: ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Optional custom bottom row when the bottom label row is not shown (`bottomLabel` is not renderable).
|
|
31
|
+
* Mutually exclusive with the bottom label row: only one bottom row is shown.
|
|
32
|
+
*/
|
|
33
|
+
bottomAccessory?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Optional bottom row with secondary label styling when a string (via platform `textProps`).
|
|
36
|
+
* The bottom label row renders only when `bottomLabel` is renderable; `bottomAccessory` is not used in that case.
|
|
37
|
+
* `bottomLabelEndAccessory` alone does not show the row.
|
|
38
|
+
*/
|
|
39
|
+
bottomLabel?: ReactNode;
|
|
40
|
+
/**
|
|
41
|
+
* Optional accessory rendered inline to the right of `bottomLabel` in the bottom label row.
|
|
42
|
+
* Only shown when `bottomLabel` is renderable.
|
|
43
|
+
*/
|
|
44
|
+
bottomLabelEndAccessory?: ReactNode;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=TitleHub.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleHub.types.d.mts","sourceRoot":"","sources":["../../../src/types/TitleHub/TitleHub.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AAEvC;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B;;;OAGG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;;OAGG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC;CACrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TitleHub.types.mjs","sourceRoot":"","sources":["../../../src/types/TitleHub/TitleHub.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\n/**\n * TitleHub component shared props (ADR-0004).\n * Platform-independent properties; platform packages extend with `ViewProps` / `className`,\n * `twClassName`, and platform `Text` prop passthroughs.\n */\nexport type TitleHubPropsShared = {\n /**\n * Optional primary amount line below the title (for example a fiat or token value).\n * When a string, platforms typically wrap with large display styles via `textProps`.\n * The amount row renders only when `amount` is renderable; `amountEndAccessory` alone does not show the row.\n */\n amount?: ReactNode;\n /**\n * Optional accessory rendered inline to the right of the amount.\n * Only shown when the amount row is shown (i.e. when `amount` is renderable).\n */\n amountEndAccessory?: ReactNode;\n /**\n * Title row above the optional amount (via platform `textProps` when a string). Required.\n * The title row renders only when `title` is renderable; `titleEndAccessory` alone does not show the row.\n */\n title: ReactNode;\n /**\n * Optional accessory rendered inline to the right of `title` in the title row.\n * Only shown when the title row is shown (i.e. when `title` is renderable).\n */\n titleEndAccessory?: ReactNode;\n /**\n * Optional custom bottom row when the bottom label row is not shown (`bottomLabel` is not renderable).\n * Mutually exclusive with the bottom label row: only one bottom row is shown.\n */\n bottomAccessory?: ReactNode;\n /**\n * Optional bottom row with secondary label styling when a string (via platform `textProps`).\n * The bottom label row renders only when `bottomLabel` is renderable; `bottomAccessory` is not used in that case.\n * `bottomLabelEndAccessory` alone does not show the row.\n */\n bottomLabel?: ReactNode;\n /**\n * Optional accessory rendered inline to the right of `bottomLabel` in the bottom label row.\n * Only shown when `bottomLabel` is renderable.\n */\n bottomLabelEndAccessory?: ReactNode;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/TitleHub/index.ts"],"names":[],"mappings":"","sourcesContent":["export type { TitleHubPropsShared } from './TitleHub.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/TitleHub/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/TitleHub/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,mBAAmB,EAAE,6BAAyB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/TitleHub/index.ts"],"names":[],"mappings":"","sourcesContent":["export type { TitleHubPropsShared } from './TitleHub.types';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask-previews/design-system-shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0-preview.1679aa9",
|
|
4
4
|
"description": "Shared types for design system libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dist/"
|
|
36
36
|
],
|
|
37
37
|
"scripts": {
|
|
38
|
-
"build": "
|
|
38
|
+
"build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references",
|
|
39
39
|
"changelog:update": "../../scripts/update-changelog.sh @metamask/design-system-shared",
|
|
40
40
|
"changelog:validate": "../../scripts/validate-changelog.sh @metamask/design-system-shared",
|
|
41
41
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter",
|
|
@@ -43,29 +43,24 @@
|
|
|
43
43
|
"test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose",
|
|
44
44
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch",
|
|
45
45
|
"since-latest-release": "../../scripts/since-latest-release.sh",
|
|
46
|
-
"generate-icons": "tsx scripts/generate-icons.ts",
|
|
47
46
|
"publish:preview": "yarn npm publish --tag preview"
|
|
48
47
|
},
|
|
49
48
|
"dependencies": {
|
|
50
49
|
"@metamask/utils": "^11.11.0"
|
|
51
50
|
},
|
|
52
51
|
"devDependencies": {
|
|
53
|
-
"@metamask/auto-changelog": "^6.
|
|
54
|
-
"@svgr/core": "^8.1.0",
|
|
55
|
-
"@svgr/plugin-jsx": "^8.1.0",
|
|
56
|
-
"@svgr/plugin-svgo": "^8.1.0",
|
|
52
|
+
"@metamask/auto-changelog": "^6.1.0",
|
|
57
53
|
"@ts-bridge/cli": "^0.6.3",
|
|
58
54
|
"@types/jest": "^27.4.1",
|
|
59
55
|
"@types/react": "^18.2.0",
|
|
60
56
|
"deepmerge": "^4.2.2",
|
|
61
57
|
"jest": "^29.7.0",
|
|
62
|
-
"react": "
|
|
58
|
+
"react": "18.3.1",
|
|
63
59
|
"ts-jest": "^29.2.5",
|
|
64
|
-
"tsx": "^4.20.6",
|
|
65
60
|
"typescript": "~5.2.2"
|
|
66
61
|
},
|
|
67
62
|
"peerDependencies": {
|
|
68
|
-
"react": "^17.0.0 || ^18.0.0"
|
|
63
|
+
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
69
64
|
},
|
|
70
65
|
"engines": {
|
|
71
66
|
"node": "^18.18 || >=20"
|