@metamask-previews/design-system-shared 0.2.0-preview.694a8ed → 0.4.0-preview.fa05289
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 +22 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -1
- package/dist/types/BannerAlert/BannerAlert.types.cjs +18 -0
- package/dist/types/BannerAlert/BannerAlert.types.cjs.map +1 -0
- package/dist/types/BannerAlert/BannerAlert.types.d.cts +29 -0
- package/dist/types/BannerAlert/BannerAlert.types.d.cts.map +1 -0
- package/dist/types/BannerAlert/BannerAlert.types.d.mts +29 -0
- package/dist/types/BannerAlert/BannerAlert.types.d.mts.map +1 -0
- package/dist/types/BannerAlert/BannerAlert.types.mjs +15 -0
- package/dist/types/BannerAlert/BannerAlert.types.mjs.map +1 -0
- package/dist/types/BannerAlert/index.cjs +6 -0
- package/dist/types/BannerAlert/index.cjs.map +1 -0
- package/dist/types/BannerAlert/index.d.cts +2 -0
- package/dist/types/BannerAlert/index.d.cts.map +1 -0
- package/dist/types/BannerAlert/index.d.mts +2 -0
- package/dist/types/BannerAlert/index.d.mts.map +1 -0
- package/dist/types/BannerAlert/index.mjs +2 -0
- package/dist/types/BannerAlert/index.mjs.map +1 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.cjs +3 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.d.cts +13 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.d.mts +13 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.mjs +2 -0
- package/dist/types/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
- package/dist/types/ButtonFilter/index.cjs +3 -0
- package/dist/types/ButtonFilter/index.cjs.map +1 -0
- package/dist/types/ButtonFilter/index.d.cts +2 -0
- package/dist/types/ButtonFilter/index.d.cts.map +1 -0
- package/dist/types/ButtonFilter/index.d.mts +2 -0
- package/dist/types/ButtonFilter/index.d.mts.map +1 -0
- package/dist/types/ButtonFilter/index.mjs +2 -0
- package/dist/types/ButtonFilter/index.mjs.map +1 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added shared `ButtonFilter` types and constants for cross-package reuse ([#964](https://github.com/MetaMask/metamask-design-system/pull/964))
|
|
15
|
+
- Added `ButtonFilterVariant` const object with derived string union type (`primary`, `secondary`)
|
|
16
|
+
- Added `ButtonFilterPropsShared` as the shared base props contract used by React and React Native implementations
|
|
17
|
+
- Added shared `BannerBase` types and constants for cross-package reuse ([#955](https://github.com/MetaMask/metamask-design-system/pull/955))
|
|
18
|
+
- Added `BannerBaseSeverity` const object with derived string union type for severity variants
|
|
19
|
+
- Added `BannerBasePropsShared` as the shared base props contract used by React and React Native implementations
|
|
20
|
+
|
|
21
|
+
## [0.3.0]
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Added shared `BadgeCount` types and constants for cross-package reuse ([#942](https://github.com/MetaMask/metamask-design-system/pull/942))
|
|
26
|
+
- Added `BadgeCountSize` const object and derived `BadgeCountSize` string union type
|
|
27
|
+
- Added `BadgeCountPropsShared` as the shared base props contract used by React and React Native implementations
|
|
28
|
+
|
|
10
29
|
## [0.2.0]
|
|
11
30
|
|
|
12
31
|
### Added
|
|
@@ -43,7 +62,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
43
62
|
- **Initial release** - MetaMask Design System Shared
|
|
44
63
|
- Adding CAIP-10 address utilities ([#817](https://github.com/MetaMask/metamask-design-system/pull/817))
|
|
45
64
|
|
|
46
|
-
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.
|
|
65
|
+
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.4.0...HEAD
|
|
66
|
+
[0.4.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.3.0...@metamask/design-system-shared@0.4.0
|
|
67
|
+
[0.3.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.2.0...@metamask/design-system-shared@0.3.0
|
|
47
68
|
[0.2.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.1.3...@metamask/design-system-shared@0.2.0
|
|
48
69
|
[0.1.3]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.1.2...@metamask/design-system-shared@0.1.3
|
|
49
70
|
[0.1.2]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-shared@0.1.1...@metamask/design-system-shared@0.1.2
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeCountSize = exports.generateIconSeed = exports.isEthereumAddress = exports.generateSeedNonEthereum = exports.generateSeedEthereum = exports.extractAccountAddress = void 0;
|
|
3
|
+
exports.BannerAlertSeverity = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeCountSize = exports.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; } });
|
|
@@ -14,4 +14,7 @@ Object.defineProperty(exports, "BadgeCountSize", { enumerable: true, get: functi
|
|
|
14
14
|
var BadgeStatus_1 = require("./types/BadgeStatus/index.cjs");
|
|
15
15
|
Object.defineProperty(exports, "BadgeStatusStatus", { enumerable: true, get: function () { return BadgeStatus_1.BadgeStatusStatus; } });
|
|
16
16
|
Object.defineProperty(exports, "BadgeStatusSize", { enumerable: true, get: function () { return BadgeStatus_1.BadgeStatusSize; } });
|
|
17
|
+
// BannerAlert types (ADR-0003 + ADR-0004)
|
|
18
|
+
var BannerAlert_1 = require("./types/BannerAlert/index.cjs");
|
|
19
|
+
Object.defineProperty(exports, "BannerAlertSeverity", { enumerable: true, get: function () { return BannerAlert_1.BannerAlertSeverity; } });
|
|
17
20
|
//# 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,yCAAyC;AACzC,2DAAgF;AAAvE,4GAAA,cAAc,OAAA;AAEvB,0CAA0C;AAC1C,6DAI6B;AAH3B,gHAAA,iBAAiB,OAAA;AACjB,8GAAA,eAAe,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"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,yDAM8B;AAL5B,qHAAA,qBAAqB,OAAA;AACrB,oHAAA,oBAAoB,OAAA;AACpB,uHAAA,uBAAuB,OAAA;AACvB,iHAAA,iBAAiB,OAAA;AACjB,gHAAA,gBAAgB,OAAA;AAGlB,yCAAyC;AACzC,2DAAgF;AAAvE,4GAAA,cAAc,OAAA;AAEvB,0CAA0C;AAC1C,6DAI6B;AAH3B,gHAAA,iBAAiB,OAAA;AACjB,8GAAA,eAAe,OAAA;AAUjB,0CAA0C;AAC1C,6DAG6B;AAF3B,kHAAA,mBAAmB,OAAA","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n\n// ButtonFilter types (ADR-0004)\nexport { type ButtonFilterPropsShared } from './types/ButtonFilter';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -2,4 +2,6 @@ export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, i
|
|
|
2
2
|
export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.cjs";
|
|
3
3
|
export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.cjs";
|
|
4
4
|
export { type BannerBasePropsShared } from "./types/BannerBase/index.cjs";
|
|
5
|
+
export { type ButtonFilterPropsShared } from "./types/ButtonFilter/index.cjs";
|
|
6
|
+
export { BannerAlertSeverity, type BannerAlertPropsShared, } from "./types/BannerAlert/index.cjs";
|
|
5
7
|
//# 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;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"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,iCAA6B;AAG9B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B"}
|
package/dist/index.d.mts
CHANGED
|
@@ -2,4 +2,6 @@ export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, i
|
|
|
2
2
|
export { BadgeCountSize, type BadgeCountPropsShared } from "./types/BadgeCount/index.mjs";
|
|
3
3
|
export { BadgeStatusStatus, BadgeStatusSize, type BadgeStatusPropsShared, } from "./types/BadgeStatus/index.mjs";
|
|
4
4
|
export { type BannerBasePropsShared } from "./types/BannerBase/index.mjs";
|
|
5
|
+
export { type ButtonFilterPropsShared } from "./types/ButtonFilter/index.mjs";
|
|
6
|
+
export { BannerAlertSeverity, type BannerAlertPropsShared, } from "./types/BannerAlert/index.mjs";
|
|
5
7
|
//# 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;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"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,GACjB,iCAA6B;AAG9B,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhF,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,KAAK,sBAAsB,GAC5B,sCAA4B;AAG7B,OAAO,EAAE,KAAK,qBAAqB,EAAE,qCAA2B;AAGhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,uCAA6B;AAGpE,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,sCAA4B"}
|
package/dist/index.mjs
CHANGED
|
@@ -3,4 +3,6 @@ export { extractAccountAddress, generateSeedEthereum, generateSeedNonEthereum, i
|
|
|
3
3
|
export { BadgeCountSize } from "./types/BadgeCount/index.mjs";
|
|
4
4
|
// BadgeStatus types (ADR-0003 + ADR-0004)
|
|
5
5
|
export { BadgeStatusStatus, BadgeStatusSize } from "./types/BadgeStatus/index.mjs";
|
|
6
|
+
// BannerAlert types (ADR-0003 + ADR-0004)
|
|
7
|
+
export { BannerAlertSeverity } from "./types/BannerAlert/index.mjs";
|
|
6
8
|
//# 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,yCAAyC;AACzC,OAAO,EAAE,cAAc,EAA8B,qCAA2B;AAEhF,0CAA0C;AAC1C,OAAO,EACL,iBAAiB,EACjB,eAAe,EAEhB,sCAA4B","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n"]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,gBAAgB,EACjB,iCAA6B;AAE9B,yCAAyC;AACzC,OAAO,EAAE,cAAc,EAA8B,qCAA2B;AAEhF,0CAA0C;AAC1C,OAAO,EACL,iBAAiB,EACjB,eAAe,EAEhB,sCAA4B;AAQ7B,0CAA0C;AAC1C,OAAO,EACL,mBAAmB,EAEpB,sCAA4B","sourcesContent":["export {\n extractAccountAddress,\n generateSeedEthereum,\n generateSeedNonEthereum,\n isEthereumAddress,\n generateIconSeed,\n} from './utils/caip-address';\n\n// BadgeCount types (ADR-0003 + ADR-0004)\nexport { BadgeCountSize, type BadgeCountPropsShared } from './types/BadgeCount';\n\n// BadgeStatus types (ADR-0003 + ADR-0004)\nexport {\n BadgeStatusStatus,\n BadgeStatusSize,\n type BadgeStatusPropsShared,\n} from './types/BadgeStatus';\n\n// BannerBase types (ADR-0004)\nexport { type BannerBasePropsShared } from './types/BannerBase';\n\n// ButtonFilter types (ADR-0004)\nexport { type ButtonFilterPropsShared } from './types/ButtonFilter';\n\n// BannerAlert types (ADR-0003 + ADR-0004)\nexport {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './types/BannerAlert';\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BannerAlertSeverity = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* BannerAlert severity variants.
|
|
6
|
+
* Uses const object with derived union type (ADR-0003).
|
|
7
|
+
*/
|
|
8
|
+
exports.BannerAlertSeverity = {
|
|
9
|
+
/** Informational style. */
|
|
10
|
+
Info: 'info',
|
|
11
|
+
/** Success style. */
|
|
12
|
+
Success: 'success',
|
|
13
|
+
/** Warning style. */
|
|
14
|
+
Warning: 'warning',
|
|
15
|
+
/** Danger style. */
|
|
16
|
+
Danger: 'danger',
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=BannerAlert.types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.cjs","sourceRoot":"","sources":["../../../src/types/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACU,QAAA,mBAAmB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,MAAM;IACZ,qBAAqB;IACrB,OAAO,EAAE,SAAS;IAClB,qBAAqB;IACrB,OAAO,EAAE,SAAS;IAClB,oBAAoB;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { BannerBasePropsShared } from '../BannerBase';\n\n/**\n * BannerAlert severity variants.\n * Uses const object with derived union type (ADR-0003).\n */\nexport const BannerAlertSeverity = {\n /** Informational style. */\n Info: 'info',\n /** Success style. */\n Success: 'success',\n /** Warning style. */\n Warning: 'warning',\n /** Danger style. */\n Danger: 'danger',\n} as const;\n\nexport type BannerAlertSeverity =\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity];\n\n/**\n * BannerAlert shared props (ADR-0004).\n * Platform-independent properties shared across React and React Native.\n */\nexport type BannerAlertPropsShared = BannerBasePropsShared & {\n /**\n * Optional semantic severity.\n *\n * @default BannerAlertSeverity.Info\n */\n severity?: BannerAlertSeverity;\n};\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BannerBasePropsShared } from "../BannerBase/index.cjs";
|
|
2
|
+
/**
|
|
3
|
+
* BannerAlert severity variants.
|
|
4
|
+
* Uses const object with derived union type (ADR-0003).
|
|
5
|
+
*/
|
|
6
|
+
export declare const BannerAlertSeverity: {
|
|
7
|
+
/** Informational style. */
|
|
8
|
+
readonly Info: "info";
|
|
9
|
+
/** Success style. */
|
|
10
|
+
readonly Success: "success";
|
|
11
|
+
/** Warning style. */
|
|
12
|
+
readonly Warning: "warning";
|
|
13
|
+
/** Danger style. */
|
|
14
|
+
readonly Danger: "danger";
|
|
15
|
+
};
|
|
16
|
+
export type BannerAlertSeverity = (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity];
|
|
17
|
+
/**
|
|
18
|
+
* BannerAlert shared props (ADR-0004).
|
|
19
|
+
* Platform-independent properties shared across React and React Native.
|
|
20
|
+
*/
|
|
21
|
+
export type BannerAlertPropsShared = BannerBasePropsShared & {
|
|
22
|
+
/**
|
|
23
|
+
* Optional semantic severity.
|
|
24
|
+
*
|
|
25
|
+
* @default BannerAlertSeverity.Info
|
|
26
|
+
*/
|
|
27
|
+
severity?: BannerAlertSeverity;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=BannerAlert.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.d.cts","sourceRoot":"","sources":["../../../src/types/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gCAAsB;AAE3D;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,2BAA2B;;IAE3B,qBAAqB;;IAErB,qBAAqB;;IAErB,oBAAoB;;CAEZ,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG;IAC3D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BannerBasePropsShared } from "../BannerBase/index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* BannerAlert severity variants.
|
|
4
|
+
* Uses const object with derived union type (ADR-0003).
|
|
5
|
+
*/
|
|
6
|
+
export declare const BannerAlertSeverity: {
|
|
7
|
+
/** Informational style. */
|
|
8
|
+
readonly Info: "info";
|
|
9
|
+
/** Success style. */
|
|
10
|
+
readonly Success: "success";
|
|
11
|
+
/** Warning style. */
|
|
12
|
+
readonly Warning: "warning";
|
|
13
|
+
/** Danger style. */
|
|
14
|
+
readonly Danger: "danger";
|
|
15
|
+
};
|
|
16
|
+
export type BannerAlertSeverity = (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity];
|
|
17
|
+
/**
|
|
18
|
+
* BannerAlert shared props (ADR-0004).
|
|
19
|
+
* Platform-independent properties shared across React and React Native.
|
|
20
|
+
*/
|
|
21
|
+
export type BannerAlertPropsShared = BannerBasePropsShared & {
|
|
22
|
+
/**
|
|
23
|
+
* Optional semantic severity.
|
|
24
|
+
*
|
|
25
|
+
* @default BannerAlertSeverity.Info
|
|
26
|
+
*/
|
|
27
|
+
severity?: BannerAlertSeverity;
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=BannerAlert.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.d.mts","sourceRoot":"","sources":["../../../src/types/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gCAAsB;AAE3D;;;GAGG;AACH,eAAO,MAAM,mBAAmB;IAC9B,2BAA2B;;IAE3B,qBAAqB;;IAErB,qBAAqB;;IAErB,oBAAoB;;CAEZ,CAAC;AAEX,MAAM,MAAM,mBAAmB,GAC7B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GAAG;IAC3D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BannerAlert severity variants.
|
|
3
|
+
* Uses const object with derived union type (ADR-0003).
|
|
4
|
+
*/
|
|
5
|
+
export const BannerAlertSeverity = {
|
|
6
|
+
/** Informational style. */
|
|
7
|
+
Info: 'info',
|
|
8
|
+
/** Success style. */
|
|
9
|
+
Success: 'success',
|
|
10
|
+
/** Warning style. */
|
|
11
|
+
Warning: 'warning',
|
|
12
|
+
/** Danger style. */
|
|
13
|
+
Danger: 'danger',
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=BannerAlert.types.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.types.mjs","sourceRoot":"","sources":["../../../src/types/BannerAlert/BannerAlert.types.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,2BAA2B;IAC3B,IAAI,EAAE,MAAM;IACZ,qBAAqB;IACrB,OAAO,EAAE,SAAS;IAClB,qBAAqB;IACrB,OAAO,EAAE,SAAS;IAClB,oBAAoB;IACpB,MAAM,EAAE,QAAQ;CACR,CAAC","sourcesContent":["import type { BannerBasePropsShared } from '../BannerBase';\n\n/**\n * BannerAlert severity variants.\n * Uses const object with derived union type (ADR-0003).\n */\nexport const BannerAlertSeverity = {\n /** Informational style. */\n Info: 'info',\n /** Success style. */\n Success: 'success',\n /** Warning style. */\n Warning: 'warning',\n /** Danger style. */\n Danger: 'danger',\n} as const;\n\nexport type BannerAlertSeverity =\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity];\n\n/**\n * BannerAlert shared props (ADR-0004).\n * Platform-independent properties shared across React and React Native.\n */\nexport type BannerAlertPropsShared = BannerBasePropsShared & {\n /**\n * Optional semantic severity.\n *\n * @default BannerAlertSeverity.Info\n */\n severity?: BannerAlertSeverity;\n};\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BannerAlertSeverity = void 0;
|
|
4
|
+
var BannerAlert_types_1 = require("./BannerAlert.types.cjs");
|
|
5
|
+
Object.defineProperty(exports, "BannerAlertSeverity", { enumerable: true, get: function () { return BannerAlert_types_1.BannerAlertSeverity; } });
|
|
6
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/BannerAlert/index.ts"],"names":[],"mappings":";;;AAAA,6DAG6B;AAF3B,wHAAA,mBAAmB,OAAA","sourcesContent":["export {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './BannerAlert.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,gCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,KAAK,sBAAsB,GAC5B,gCAA4B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/BannerAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAEpB,gCAA4B","sourcesContent":["export {\n BannerAlertSeverity,\n type BannerAlertPropsShared,\n} from './BannerAlert.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.cjs","sourceRoot":"","sources":["../../../src/types/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * ButtonFilter component shared props (ADR-0004)\n * Platform-independent state shared across React and React Native.\n */\nexport type ButtonFilterPropsShared = {\n /**\n * Whether the filter button is in an active state.\n *\n * @default false\n */\n isActive?: boolean;\n};\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ButtonFilter component shared props (ADR-0004)
|
|
3
|
+
* Platform-independent state shared across React and React Native.
|
|
4
|
+
*/
|
|
5
|
+
export type ButtonFilterPropsShared = {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the filter button is in an active state.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ButtonFilter.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.d.cts","sourceRoot":"","sources":["../../../src/types/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ButtonFilter component shared props (ADR-0004)
|
|
3
|
+
* Platform-independent state shared across React and React Native.
|
|
4
|
+
*/
|
|
5
|
+
export type ButtonFilterPropsShared = {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the filter button is in an active state.
|
|
8
|
+
*
|
|
9
|
+
* @default false
|
|
10
|
+
*/
|
|
11
|
+
isActive?: boolean;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=ButtonFilter.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.d.mts","sourceRoot":"","sources":["../../../src/types/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonFilter.types.mjs","sourceRoot":"","sources":["../../../src/types/ButtonFilter/ButtonFilter.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * ButtonFilter component shared props (ADR-0004)\n * Platform-independent state shared across React and React Native.\n */\nexport type ButtonFilterPropsShared = {\n /**\n * Whether the filter button is in an active state.\n *\n * @default false\n */\n isActive?: boolean;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/types/ButtonFilter/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type ButtonFilterPropsShared } from './ButtonFilter.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/types/ButtonFilter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAE,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/types/ButtonFilter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,uBAAuB,EAAE,iCAA6B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/types/ButtonFilter/index.ts"],"names":[],"mappings":"","sourcesContent":["export { type ButtonFilterPropsShared } from './ButtonFilter.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.4.0-preview.fa05289",
|
|
4
4
|
"description": "Shared types for design system libraries",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -52,6 +52,7 @@
|
|
|
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",
|
|
57
58
|
"ts-jest": "^29.2.5",
|