@metamask-previews/design-system-react 0.7.0-preview.3dc70e1 → 0.11.0-preview.3aca0bd
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 +58 -1
- package/dist/components/BadgeCount/BadgeCount.cjs +2 -2
- package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.cjs +5 -5
- package/dist/components/BadgeCount/BadgeCount.constants.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.d.cts +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.d.mts +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.constants.mjs +3 -3
- package/dist/components/BadgeCount/BadgeCount.constants.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.mjs +1 -1
- package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.cjs.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.d.cts +4 -21
- package/dist/components/BadgeCount/BadgeCount.types.d.cts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.d.mts +4 -21
- package/dist/components/BadgeCount/BadgeCount.types.d.mts.map +1 -1
- package/dist/components/BadgeCount/BadgeCount.types.mjs.map +1 -1
- package/dist/components/BadgeCount/index.cjs +2 -2
- package/dist/components/BadgeCount/index.cjs.map +1 -1
- package/dist/components/BadgeCount/index.d.cts +1 -1
- package/dist/components/BadgeCount/index.d.cts.map +1 -1
- package/dist/components/BadgeCount/index.d.mts +1 -1
- package/dist/components/BadgeCount/index.d.mts.map +1 -1
- package/dist/components/BadgeCount/index.mjs +1 -1
- package/dist/components/BadgeCount/index.mjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.cjs.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.cts +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.cts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.mts +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.d.mts.map +1 -1
- package/dist/components/BadgeStatus/BadgeStatus.types.mjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.cjs +43 -0
- package/dist/components/BannerAlert/BannerAlert.cjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.cjs +30 -0
- package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts +7 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts +7 -0
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.constants.mjs +27 -0
- package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.d.cts +624 -0
- package/dist/components/BannerAlert/BannerAlert.d.cts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.d.mts +624 -0
- package/dist/components/BannerAlert/BannerAlert.d.mts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.mjs +24 -0
- package/dist/components/BannerAlert/BannerAlert.mjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.cjs +3 -0
- package/dist/components/BannerAlert/BannerAlert.types.cjs.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.cts +10 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.cts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.mts +10 -0
- package/dist/components/BannerAlert/BannerAlert.types.d.mts.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.types.mjs +2 -0
- package/dist/components/BannerAlert/BannerAlert.types.mjs.map +1 -0
- package/dist/components/BannerAlert/index.cjs +8 -0
- package/dist/components/BannerAlert/index.cjs.map +1 -0
- package/dist/components/BannerAlert/index.d.cts +4 -0
- package/dist/components/BannerAlert/index.d.cts.map +1 -0
- package/dist/components/BannerAlert/index.d.mts +4 -0
- package/dist/components/BannerAlert/index.d.mts.map +1 -0
- package/dist/components/BannerAlert/index.mjs +3 -0
- package/dist/components/BannerAlert/index.mjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.cjs +54 -0
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.d.cts +616 -0
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -0
- package/dist/components/BannerBase/BannerBase.d.mts +616 -0
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -0
- package/dist/components/BannerBase/BannerBase.mjs +35 -0
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.cjs +3 -0
- package/dist/components/BannerBase/BannerBase.types.cjs.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.d.cts +54 -0
- package/dist/components/BannerBase/BannerBase.types.d.cts.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.d.mts +54 -0
- package/dist/components/BannerBase/BannerBase.types.d.mts.map +1 -0
- package/dist/components/BannerBase/BannerBase.types.mjs +2 -0
- package/dist/components/BannerBase/BannerBase.types.mjs.map +1 -0
- package/dist/components/BannerBase/index.cjs +6 -0
- package/dist/components/BannerBase/index.cjs.map +1 -0
- package/dist/components/BannerBase/index.d.cts +3 -0
- package/dist/components/BannerBase/index.d.cts.map +1 -0
- package/dist/components/BannerBase/index.d.mts +3 -0
- package/dist/components/BannerBase/index.d.mts.map +1 -0
- package/dist/components/BannerBase/index.mjs +2 -0
- package/dist/components/BannerBase/index.mjs.map +1 -0
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs +3 -3
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs +3 -3
- package/dist/components/Button/variants/ButtonPrimary/ButtonPrimary.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs +3 -3
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs +3 -3
- package/dist/components/Button/variants/ButtonSecondary/ButtonSecondary.mjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs +3 -3
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +3 -3
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
- package/dist/components/ButtonFilter/ButtonFilter.cjs +37 -0
- package/dist/components/ButtonFilter/ButtonFilter.cjs.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.cts +4 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.cts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.mts +4 -0
- package/dist/components/ButtonFilter/ButtonFilter.d.mts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.mjs +18 -0
- package/dist/components/ButtonFilter/ButtonFilter.mjs.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.cjs +3 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.cjs.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.cts +4 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.cts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.mts +4 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.d.mts.map +1 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.mjs +2 -0
- package/dist/components/ButtonFilter/ButtonFilter.types.mjs.map +1 -0
- package/dist/components/ButtonFilter/index.cjs +6 -0
- package/dist/components/ButtonFilter/index.cjs.map +1 -0
- package/dist/components/ButtonFilter/index.d.cts +3 -0
- package/dist/components/ButtonFilter/index.d.cts.map +1 -0
- package/dist/components/ButtonFilter/index.d.mts +3 -0
- package/dist/components/ButtonFilter/index.d.mts.map +1 -0
- package/dist/components/ButtonFilter/index.mjs +2 -0
- package/dist/components/ButtonFilter/index.mjs.map +1 -0
- package/dist/components/ButtonHero/ButtonHero.cjs +1 -1
- package/dist/components/ButtonHero/ButtonHero.cjs.map +1 -1
- package/dist/components/ButtonHero/ButtonHero.mjs +1 -1
- package/dist/components/ButtonHero/ButtonHero.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.cjs +11 -12
- package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.mjs +12 -13
- package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.cjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.d.cts +4 -10
- package/dist/components/ButtonIcon/ButtonIcon.types.d.cts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.d.mts +4 -10
- package/dist/components/ButtonIcon/ButtonIcon.types.d.mts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.types.mjs.map +1 -1
- package/dist/components/ButtonIcon/index.cjs +2 -1
- package/dist/components/ButtonIcon/index.cjs.map +1 -1
- package/dist/components/ButtonIcon/index.d.cts +1 -1
- package/dist/components/ButtonIcon/index.d.cts.map +1 -1
- package/dist/components/ButtonIcon/index.d.mts +1 -1
- package/dist/components/ButtonIcon/index.d.mts.map +1 -1
- package/dist/components/ButtonIcon/index.mjs +1 -1
- package/dist/components/ButtonIcon/index.mjs.map +1 -1
- package/dist/components/Icon/icons/Ai.cjs +1 -1
- package/dist/components/Icon/icons/Ai.cjs.map +1 -1
- package/dist/components/Icon/icons/Ai.mjs +1 -1
- package/dist/components/Icon/icons/Ai.mjs.map +1 -1
- package/dist/components/Icon/icons/CorporateFare.cjs +32 -0
- package/dist/components/Icon/icons/CorporateFare.cjs.map +1 -0
- package/dist/components/Icon/icons/CorporateFare.d.cts +4 -0
- package/dist/components/Icon/icons/CorporateFare.d.cts.map +1 -0
- package/dist/components/Icon/icons/CorporateFare.d.mts +4 -0
- package/dist/components/Icon/icons/CorporateFare.d.mts.map +1 -0
- package/dist/components/Icon/icons/CorporateFare.mjs +7 -0
- package/dist/components/Icon/icons/CorporateFare.mjs.map +1 -0
- package/dist/components/Icon/icons/index.cjs +2 -0
- package/dist/components/Icon/icons/index.cjs.map +1 -1
- package/dist/components/Icon/icons/index.d.cts +1 -0
- package/dist/components/Icon/icons/index.d.cts.map +1 -1
- package/dist/components/Icon/icons/index.d.mts +1 -0
- package/dist/components/Icon/icons/index.d.mts.map +1 -1
- package/dist/components/Icon/icons/index.mjs +2 -0
- package/dist/components/Icon/icons/index.mjs.map +1 -1
- package/dist/components/Input/Input.cjs +36 -0
- package/dist/components/Input/Input.cjs.map +1 -0
- package/dist/components/Input/Input.d.cts +10 -0
- package/dist/components/Input/Input.d.cts.map +1 -0
- package/dist/components/Input/Input.d.mts +10 -0
- package/dist/components/Input/Input.d.mts.map +1 -0
- package/dist/components/Input/Input.mjs +17 -0
- package/dist/components/Input/Input.mjs.map +1 -0
- package/dist/components/Input/Input.types.cjs +3 -0
- package/dist/components/Input/Input.types.cjs.map +1 -0
- package/dist/components/Input/Input.types.d.cts +31 -0
- package/dist/components/Input/Input.types.d.cts.map +1 -0
- package/dist/components/Input/Input.types.d.mts +31 -0
- package/dist/components/Input/Input.types.d.mts.map +1 -0
- package/dist/components/Input/Input.types.mjs +2 -0
- package/dist/components/Input/Input.types.mjs.map +1 -0
- package/dist/components/Input/index.cjs +6 -0
- package/dist/components/Input/index.cjs.map +1 -0
- package/dist/components/Input/index.d.cts +3 -0
- package/dist/components/Input/index.d.cts.map +1 -0
- package/dist/components/Input/index.d.mts +3 -0
- package/dist/components/Input/index.d.mts.map +1 -0
- package/dist/components/Input/index.mjs +2 -0
- package/dist/components/Input/index.mjs.map +1 -0
- package/dist/components/index.cjs +12 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +9 -1
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +9 -1
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +5 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/types/index.cjs +11 -15
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +9 -13
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +9 -13
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +10 -14
- package/dist/types/index.mjs.map +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.11.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added `ButtonFilter` component for filter button functionality ([#964](https://github.com/MetaMask/metamask-design-system/pull/964))
|
|
15
|
+
- Added `BannerBase` component for creating custom banner notifications ([#961](https://github.com/MetaMask/metamask-design-system/pull/961))
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **BREAKING:** Updated `ButtonIcon` API to use `variant` prop instead of `isInverse` and `isFloating` boolean props ([#948](https://github.com/MetaMask/metamask-design-system/pull/948))
|
|
20
|
+
- Removed `isInverse` and `isFloating` props
|
|
21
|
+
- Added `variant` prop with three options: `ButtonIconVariant.Default` (default), `ButtonIconVariant.Filled` (new muted background with rounded corners), and `ButtonIconVariant.Floating` (replaces `isFloating` behavior)
|
|
22
|
+
- Migration: Replace `isFloating={true}` with `variant={ButtonIconVariant.Floating}`, and use `variant={ButtonIconVariant.Default}` for standard transparent background
|
|
23
|
+
- See [Migration Guide](./MIGRATION.md#from-version-0100-to-0110) for complete migration instructions
|
|
24
|
+
- Updated `Ai` icon to filled version for visual consistency ([#970](https://github.com/MetaMask/metamask-design-system/pull/970))
|
|
25
|
+
|
|
26
|
+
## [0.10.0]
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **BREAKING:** Updated `BadgeCount` type exports to use the ADR-0003/ADR-0004 const-object + string-union pattern instead of TypeScript enums ([#942](https://github.com/MetaMask/metamask-design-system/pull/942))
|
|
31
|
+
- `BadgeCountSize` is now provided as a const object with a derived union type rather than an enum
|
|
32
|
+
- `BadgeCount` shared prop types are now sourced from `@metamask/design-system-shared`
|
|
33
|
+
- Migration: update any enum-specific usage to const-object/union usage, while continuing to import from `@metamask/design-system-react`
|
|
34
|
+
|
|
35
|
+
## [0.9.0]
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **BREAKING:** Migrated `BadgeStatus` component from TypeScript enums to string union types with const objects ([#912](https://github.com/MetaMask/metamask-design-system/pull/912))
|
|
40
|
+
- `BadgeStatusStatus` and `BadgeStatusSize` enums replaced with const objects and derived string union types
|
|
41
|
+
- **No migration required** - continue importing from `@metamask/design-system-react` as usual
|
|
42
|
+
- Const object values remain the same (e.g., `BadgeStatusStatus.Active` still works)
|
|
43
|
+
- String literals now also accepted thanks to structural typing (e.g., `'active'` works where `BadgeStatusStatus.Active` is expected)
|
|
44
|
+
- We are still evaluating best practices for const objects vs string literals - use whichever approach works best for your codebase
|
|
45
|
+
- This change implements [ADR-0003](https://github.com/MetaMask/decisions/blob/main/decisions/design-system/0003-enum-to-string-union-migration.md) and [ADR-0004](https://github.com/MetaMask/decisions/blob/main/decisions/design-system/0004-centralized-types-architecture.md)
|
|
46
|
+
|
|
47
|
+
## [0.8.0]
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- Added `CorporateFare` icon to represent stocks ([#920](https://github.com/MetaMask/metamask-design-system/pull/920))
|
|
52
|
+
- Added `Input` component for text input fields ([#909](https://github.com/MetaMask/metamask-design-system/pull/909))
|
|
53
|
+
|
|
54
|
+
### Changed
|
|
55
|
+
|
|
56
|
+
- **BREAKING:** Standardized non-icon enum runtime values to use kebab-case format ([#894](https://github.com/MetaMask/metamask-design-system/pull/894))
|
|
57
|
+
- Enum values now use lowercase/kebab-case (e.g., `'primary'` instead of `'Primary'`, `'top-right'` instead of `'TopRight'`)
|
|
58
|
+
- **Migration likely not needed** - continue using enum constants (e.g., `ButtonVariant.Primary`)
|
|
59
|
+
- **Migration needed** only if your app persists or transmits these enum values (localStorage, databases, APIs)
|
|
60
|
+
- This prepares for migration from enums to string union types per ADR #127
|
|
61
|
+
- Updated `@metamask/utils` peer dependency from 11.9.0 to 11.10.0 ([#903](https://github.com/MetaMask/metamask-design-system/pull/903))
|
|
62
|
+
|
|
10
63
|
## [0.7.0]
|
|
11
64
|
|
|
12
65
|
### Added
|
|
@@ -129,7 +182,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
129
182
|
- Full TypeScript support with type definitions and enums
|
|
130
183
|
- Tailwind CSS integration with design token support
|
|
131
184
|
|
|
132
|
-
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.
|
|
185
|
+
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.11.0...HEAD
|
|
186
|
+
[0.11.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.10.0...@metamask/design-system-react@0.11.0
|
|
187
|
+
[0.10.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.9.0...@metamask/design-system-react@0.10.0
|
|
188
|
+
[0.9.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.8.0...@metamask/design-system-react@0.9.0
|
|
189
|
+
[0.8.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.7.0...@metamask/design-system-react@0.8.0
|
|
133
190
|
[0.7.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.6.1...@metamask/design-system-react@0.7.0
|
|
134
191
|
[0.6.1]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.6.0...@metamask/design-system-react@0.6.1
|
|
135
192
|
[0.6.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.5.0...@metamask/design-system-react@0.6.0
|
|
@@ -24,12 +24,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.BadgeCount = void 0;
|
|
27
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
27
28
|
const react_1 = __importStar(require("react"));
|
|
28
|
-
const types_1 = require("../../types/index.cjs");
|
|
29
29
|
const tw_merge_1 = require("../../utils/tw-merge.cjs");
|
|
30
30
|
const Text_1 = require("../Text/index.cjs");
|
|
31
31
|
const BadgeCount_constants_1 = require("./BadgeCount.constants.cjs");
|
|
32
|
-
exports.BadgeCount = (0, react_1.forwardRef)(({ size =
|
|
32
|
+
exports.BadgeCount = (0, react_1.forwardRef)(({ size = design_system_shared_1.BadgeCountSize.Md, count, max = 99, textProps, className = '', style, ...props }, ref) => {
|
|
33
33
|
const mergedClassName = (0, tw_merge_1.twMerge)(
|
|
34
34
|
// Base styles
|
|
35
35
|
'inline-flex items-center justify-center self-start rounded-lg bg-error-default', BadgeCount_constants_1.TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER[size], className);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,
|
|
1
|
+
{"version":3,"file":"BadgeCount.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAAyE;AACzE,+CAA0C;AAE1C,uDAA+C;AAC/C,4CAAsD;AAEtD,qEAGgC;AAGnB,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EACE,IAAI,GAAG,qCAAc,CAAC,EAAE,EACxB,KAAK,EACL,GAAG,GAAG,EAAE,EACR,SAAS,EACT,SAAS,GAAG,EAAE,EACd,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GAAG,IAAA,kBAAO;IAC7B,cAAc;IACd,gFAAgF,EAChF,2DAAoC,CAAC,IAAI,CAAC,EAC1C,SAAS,CACV,CAAC;IAEF,OAAO,CACL,uCAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK;QAChE,8BAAC,WAAI,IACH,OAAO,EAAE,sDAA+B,CAAC,IAAI,CAAC,EAC9C,KAAK,EAAE,gBAAS,CAAC,YAAY,EAC7B,UAAU,EAAE,iBAAU,CAAC,MAAM,KACzB,SAAS,EACb,SAAS,EAAE,GAAG,SAAS,EAAE,SAAS,IAAI,EAAE,EAAE,EAC1C,OAAO;YAEP,4CAAO,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAQ,CAC9C,CACH,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import { BadgeCountSize } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Text, TextColor, FontWeight } from '../Text';\n\nimport {\n MAP_BADGECOUNT_SIZE_TEXTVARIANT,\n TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER,\n} from './BadgeCount.constants';\nimport type { BadgeCountProps } from './BadgeCount.types';\n\nexport const BadgeCount = forwardRef<HTMLDivElement, BadgeCountProps>(\n (\n {\n size = BadgeCountSize.Md,\n count,\n max = 99,\n textProps,\n className = '',\n style,\n ...props\n },\n ref,\n ) => {\n const mergedClassName = twMerge(\n // Base styles\n 'inline-flex items-center justify-center self-start rounded-lg bg-error-default',\n TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER[size],\n className,\n );\n\n return (\n <div ref={ref} className={mergedClassName} style={style} {...props}>\n <Text\n variant={MAP_BADGECOUNT_SIZE_TEXTVARIANT[size]}\n color={TextColor.ErrorInverse}\n fontWeight={FontWeight.Medium}\n {...textProps}\n className={`${textProps?.className || ''}`}\n asChild\n >\n <span>{count > max ? `${max}+` : `${count}`}</span>\n </Text>\n </div>\n );\n },\n);\n\nBadgeCount.displayName = 'BadgeCount';\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER = exports.MAP_BADGECOUNT_SIZE_TEXTVARIANT = void 0;
|
|
4
|
-
const
|
|
4
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
5
|
const Text_1 = require("../Text/index.cjs");
|
|
6
6
|
// Mappings
|
|
7
7
|
exports.MAP_BADGECOUNT_SIZE_TEXTVARIANT = {
|
|
8
|
-
[
|
|
9
|
-
[
|
|
8
|
+
[design_system_shared_1.BadgeCountSize.Md]: Text_1.TextVariant.BodyXs,
|
|
9
|
+
[design_system_shared_1.BadgeCountSize.Lg]: Text_1.TextVariant.BodySm,
|
|
10
10
|
};
|
|
11
11
|
exports.TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER = {
|
|
12
|
-
[
|
|
13
|
-
[
|
|
12
|
+
[design_system_shared_1.BadgeCountSize.Md]: 'min-w-4 h-4 px-1',
|
|
13
|
+
[design_system_shared_1.BadgeCountSize.Lg]: 'min-w-6 h- px-1.5', // min-width 24px, height 20px, padding-horizontal 6
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=BadgeCount.constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.constants.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"BadgeCount.constants.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":";;;AAAA,kFAAyE;AAEzE,4CAAsC;AAEtC,WAAW;AACE,QAAA,+BAA+B,GAGxC;IACF,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,kBAAW,CAAC,MAAM;IACvC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,kBAAW,CAAC,MAAM;CACxC,CAAC;AAEW,QAAA,oCAAoC,GAG7C;IACF,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,kBAAkB;IACvC,CAAC,qCAAc,CAAC,EAAE,CAAC,EAAE,mBAAmB,EAAE,oDAAoD;CAC/F,CAAC","sourcesContent":["import { BadgeCountSize } from '@metamask-previews/design-system-shared';\n\nimport { TextVariant } from '../Text';\n\n// Mappings\nexport const MAP_BADGECOUNT_SIZE_TEXTVARIANT: Record<\n BadgeCountSize,\n TextVariant\n> = {\n [BadgeCountSize.Md]: TextVariant.BodyXs,\n [BadgeCountSize.Lg]: TextVariant.BodySm,\n};\n\nexport const TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER: Record<\n BadgeCountSize,\n string\n> = {\n [BadgeCountSize.Md]: 'min-w-4 h-4 px-1', // min-width 16px, height 14px, padding-horizontal 4\n [BadgeCountSize.Lg]: 'min-w-6 h- px-1.5', // min-width 24px, height 20px, padding-horizontal 6\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BadgeCountSize } from "
|
|
1
|
+
import { BadgeCountSize } from "@metamask-previews/design-system-shared";
|
|
2
2
|
import { TextVariant } from "../Text/index.cjs";
|
|
3
3
|
export declare const MAP_BADGECOUNT_SIZE_TEXTVARIANT: Record<BadgeCountSize, TextVariant>;
|
|
4
4
|
export declare const TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER: Record<BadgeCountSize, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"BadgeCount.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AAEzE,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAGtC,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,cAAc,EACd,WAAW,CAIZ,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,cAAc,EACd,MAAM,CAIP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BadgeCountSize } from "
|
|
1
|
+
import { BadgeCountSize } from "@metamask-previews/design-system-shared";
|
|
2
2
|
import { TextVariant } from "../Text/index.mjs";
|
|
3
3
|
export declare const MAP_BADGECOUNT_SIZE_TEXTVARIANT: Record<BadgeCountSize, TextVariant>;
|
|
4
4
|
export declare const TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER: Record<BadgeCountSize, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"BadgeCount.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AAEzE,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAGtC,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAClD,cAAc,EACd,WAAW,CAIZ,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,cAAc,EACd,MAAM,CAIP,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BadgeCountSize } from "
|
|
1
|
+
import { BadgeCountSize } from "@metamask-previews/design-system-shared";
|
|
2
2
|
import { TextVariant } from "../Text/index.mjs";
|
|
3
3
|
// Mappings
|
|
4
4
|
export const MAP_BADGECOUNT_SIZE_TEXTVARIANT = {
|
|
@@ -6,7 +6,7 @@ export const MAP_BADGECOUNT_SIZE_TEXTVARIANT = {
|
|
|
6
6
|
[BadgeCountSize.Lg]: TextVariant.BodySm,
|
|
7
7
|
};
|
|
8
8
|
export const TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER = {
|
|
9
|
-
[BadgeCountSize.Md]: 'min-w-4 h-
|
|
10
|
-
[BadgeCountSize.Lg]: 'min-w-6 h-
|
|
9
|
+
[BadgeCountSize.Md]: 'min-w-4 h-4 px-1',
|
|
10
|
+
[BadgeCountSize.Lg]: 'min-w-6 h- px-1.5', // min-width 24px, height 20px, padding-horizontal 6
|
|
11
11
|
};
|
|
12
12
|
//# sourceMappingURL=BadgeCount.constants.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.constants.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"BadgeCount.constants.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AAEzE,OAAO,EAAE,WAAW,EAAE,0BAAgB;AAEtC,WAAW;AACX,MAAM,CAAC,MAAM,+BAA+B,GAGxC;IACF,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM;IACvC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,MAAM;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAG7C;IACF,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,kBAAkB;IACvC,CAAC,cAAc,CAAC,EAAE,CAAC,EAAE,mBAAmB,EAAE,oDAAoD;CAC/F,CAAC","sourcesContent":["import { BadgeCountSize } from '@metamask-previews/design-system-shared';\n\nimport { TextVariant } from '../Text';\n\n// Mappings\nexport const MAP_BADGECOUNT_SIZE_TEXTVARIANT: Record<\n BadgeCountSize,\n TextVariant\n> = {\n [BadgeCountSize.Md]: TextVariant.BodyXs,\n [BadgeCountSize.Lg]: TextVariant.BodySm,\n};\n\nexport const TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER: Record<\n BadgeCountSize,\n string\n> = {\n [BadgeCountSize.Md]: 'min-w-4 h-4 px-1', // min-width 16px, height 14px, padding-horizontal 4\n [BadgeCountSize.Lg]: 'min-w-6 h- px-1.5', // min-width 24px, height 20px, padding-horizontal 6\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeCount.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,cAAc;AAS1C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,qGAmCtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeCount.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":"AACA,OAAO,KAAqB,cAAc;AAS1C,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAE1D,eAAO,MAAM,UAAU,qGAmCtB,CAAC"}
|
|
@@ -4,9 +4,9 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
+
import { BadgeCountSize } from "@metamask-previews/design-system-shared";
|
|
7
8
|
import $React, { forwardRef } from "react";
|
|
8
9
|
const React = $importDefault($React);
|
|
9
|
-
import { BadgeCountSize } from "../../types/index.mjs";
|
|
10
10
|
import { twMerge } from "../../utils/tw-merge.mjs";
|
|
11
11
|
import { Text, TextColor, FontWeight } from "../Text/index.mjs";
|
|
12
12
|
import { MAP_BADGECOUNT_SIZE_TEXTVARIANT, TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER } from "./BadgeCount.constants.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BadgeCount.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AACzE,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,0BAAgB;AAEtD,OAAO,EACL,+BAA+B,EAC/B,oCAAoC,EACrC,mCAA+B;AAGhC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,IAAI,GAAG,cAAc,CAAC,EAAE,EACxB,KAAK,EACL,GAAG,GAAG,EAAE,EACR,SAAS,EACT,SAAS,GAAG,EAAE,EACd,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GAAG,OAAO;IAC7B,cAAc;IACd,gFAAgF,EAChF,oCAAoC,CAAC,IAAI,CAAC,EAC1C,SAAS,CACV,CAAC;IAEF,OAAO,CACL,6BAAK,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK,KAAM,KAAK;QAChE,oBAAC,IAAI,IACH,OAAO,EAAE,+BAA+B,CAAC,IAAI,CAAC,EAC9C,KAAK,EAAE,SAAS,CAAC,YAAY,EAC7B,UAAU,EAAE,UAAU,CAAC,MAAM,KACzB,SAAS,EACb,SAAS,EAAE,GAAG,SAAS,EAAE,SAAS,IAAI,EAAE,EAAE,EAC1C,OAAO;YAEP,kCAAO,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAQ,CAC9C,CACH,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import { BadgeCountSize } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Text, TextColor, FontWeight } from '../Text';\n\nimport {\n MAP_BADGECOUNT_SIZE_TEXTVARIANT,\n TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER,\n} from './BadgeCount.constants';\nimport type { BadgeCountProps } from './BadgeCount.types';\n\nexport const BadgeCount = forwardRef<HTMLDivElement, BadgeCountProps>(\n (\n {\n size = BadgeCountSize.Md,\n count,\n max = 99,\n textProps,\n className = '',\n style,\n ...props\n },\n ref,\n ) => {\n const mergedClassName = twMerge(\n // Base styles\n 'inline-flex items-center justify-center self-start rounded-lg bg-error-default',\n TWCLASSMAP_BADGECOUNT_SIZE_CONTAINER[size],\n className,\n );\n\n return (\n <div ref={ref} className={mergedClassName} style={style} {...props}>\n <Text\n variant={MAP_BADGECOUNT_SIZE_TEXTVARIANT[size]}\n color={TextColor.ErrorInverse}\n fontWeight={FontWeight.Medium}\n {...textProps}\n className={`${textProps?.className || ''}`}\n asChild\n >\n <span>{count > max ? `${max}+` : `${count}`}</span>\n </Text>\n </div>\n );\n },\n);\n\nBadgeCount.displayName = 'BadgeCount';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"BadgeCount.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"","sourcesContent":["// Import shared type for extension\nimport type { BadgeCountPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { TextProps } from '../Text';\n\n/**\n * BadgeCount component props (React platform-specific)\n * Extends shared props with React-specific platform concerns\n */\nexport type BadgeCountProps = ComponentProps<'div'> &\n BadgeCountPropsShared & {\n /**\n * Optional props to be passed to the Text component used by count\n */\n textProps?: Partial<TextProps>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeCount component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -1,28 +1,11 @@
|
|
|
1
|
+
import type { BadgeCountPropsShared } from "@metamask-previews/design-system-shared";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
2
|
-
import type { BadgeCountSize } from "../../types/index.cjs";
|
|
3
3
|
import type { TextProps } from "../Text/index.cjs";
|
|
4
4
|
/**
|
|
5
|
-
* BadgeCount component props
|
|
5
|
+
* BadgeCount component props (React platform-specific)
|
|
6
|
+
* Extends shared props with React-specific platform concerns
|
|
6
7
|
*/
|
|
7
|
-
export type BadgeCountProps = ComponentProps<'div'> & {
|
|
8
|
-
/**
|
|
9
|
-
* Optional prop to control the size of the BadgeCount
|
|
10
|
-
* Different sizes map to specific height
|
|
11
|
-
*
|
|
12
|
-
* @default IconSize.Md
|
|
13
|
-
*/
|
|
14
|
-
size?: BadgeCountSize;
|
|
15
|
-
/**
|
|
16
|
-
* Required prop to show the count number
|
|
17
|
-
*/
|
|
18
|
-
count: number;
|
|
19
|
-
/**
|
|
20
|
-
* Optional prop to determine the max the count can go up to.
|
|
21
|
-
* If count > max, the count will be shown as "max+"
|
|
22
|
-
*
|
|
23
|
-
* @default 99
|
|
24
|
-
*/
|
|
25
|
-
max?: number;
|
|
8
|
+
export type BadgeCountProps = ComponentProps<'div'> & BadgeCountPropsShared & {
|
|
26
9
|
/**
|
|
27
10
|
* Optional props to be passed to the Text component used by count
|
|
28
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeCount.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAAgD;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,GACjD,qBAAqB,GAAG;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1,28 +1,11 @@
|
|
|
1
|
+
import type { BadgeCountPropsShared } from "@metamask-previews/design-system-shared";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
2
|
-
import type { BadgeCountSize } from "../../types/index.mjs";
|
|
3
3
|
import type { TextProps } from "../Text/index.mjs";
|
|
4
4
|
/**
|
|
5
|
-
* BadgeCount component props
|
|
5
|
+
* BadgeCount component props (React platform-specific)
|
|
6
|
+
* Extends shared props with React-specific platform concerns
|
|
6
7
|
*/
|
|
7
|
-
export type BadgeCountProps = ComponentProps<'div'> & {
|
|
8
|
-
/**
|
|
9
|
-
* Optional prop to control the size of the BadgeCount
|
|
10
|
-
* Different sizes map to specific height
|
|
11
|
-
*
|
|
12
|
-
* @default IconSize.Md
|
|
13
|
-
*/
|
|
14
|
-
size?: BadgeCountSize;
|
|
15
|
-
/**
|
|
16
|
-
* Required prop to show the count number
|
|
17
|
-
*/
|
|
18
|
-
count: number;
|
|
19
|
-
/**
|
|
20
|
-
* Optional prop to determine the max the count can go up to.
|
|
21
|
-
* If count > max, the count will be shown as "max+"
|
|
22
|
-
*
|
|
23
|
-
* @default 99
|
|
24
|
-
*/
|
|
25
|
-
max?: number;
|
|
8
|
+
export type BadgeCountProps = ComponentProps<'div'> & BadgeCountPropsShared & {
|
|
26
9
|
/**
|
|
27
10
|
* Optional props to be passed to the Text component used by count
|
|
28
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeCount.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,gDAAgD;AACrF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,KAAK,CAAC,GACjD,qBAAqB,GAAG;IACtB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeCount.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"BadgeCount.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/BadgeCount.types.ts"],"names":[],"mappings":"","sourcesContent":["// Import shared type for extension\nimport type { BadgeCountPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { TextProps } from '../Text';\n\n/**\n * BadgeCount component props (React platform-specific)\n * Extends shared props with React-specific platform concerns\n */\nexport type BadgeCountProps = ComponentProps<'div'> &\n BadgeCountPropsShared & {\n /**\n * Optional props to be passed to the Text component used by count\n */\n textProps?: Partial<TextProps>;\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeCount component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BadgeCount = exports.BadgeCountSize = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "BadgeCountSize", { enumerable: true, get: function () { return
|
|
4
|
+
var design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "BadgeCountSize", { enumerable: true, get: function () { return design_system_shared_1.BadgeCountSize; } });
|
|
6
6
|
var BadgeCount_1 = require("./BadgeCount.cjs");
|
|
7
7
|
Object.defineProperty(exports, "BadgeCount", { enumerable: true, get: function () { return BadgeCount_1.BadgeCount; } });
|
|
8
8
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":";;;AAAA,gFAAyE;AAAhE,sHAAA,cAAc,OAAA;AACvB,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { BadgeCountSize } from '@metamask-previews/design-system-shared';\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount.types';\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BadgeCountSize } from "
|
|
1
|
+
export { BadgeCountSize } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export { BadgeCount } from "./BadgeCount.cjs";
|
|
3
3
|
export type { BadgeCountProps } from "./BadgeCount.types.cjs";
|
|
4
4
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AACzE,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { BadgeCountSize } from "
|
|
1
|
+
export { BadgeCountSize } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export { BadgeCount } from "./BadgeCount.mjs";
|
|
3
3
|
export type { BadgeCountProps } from "./BadgeCount.types.mjs";
|
|
4
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AACzE,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BadgeCount/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gDAAgD;AACzE,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { BadgeCountSize } from '@metamask-previews/design-system-shared';\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount.types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeStatus.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"BadgeStatus.types.cjs","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeStatusPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ComponentProps } from 'react';\n\n/**\n * BadgeStatus component props (React platform-specific)\n * Extends shared props from @metamask-previews/design-system-shared with React-specific platform concerns\n */\nexport type BadgeStatusProps = ComponentProps<'div'> &\n BadgeStatusPropsShared & {\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeStatus component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -2,7 +2,7 @@ import type { BadgeStatusPropsShared } from "@metamask-previews/design-system-sh
|
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* BadgeStatus component props (React platform-specific)
|
|
5
|
-
* Extends shared props with React-specific platform concerns
|
|
5
|
+
* Extends shared props from @metamask-previews/design-system-shared with React-specific platform concerns
|
|
6
6
|
*/
|
|
7
7
|
export type BadgeStatusProps = ComponentProps<'div'> & BadgeStatusPropsShared & {
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeStatus.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeStatus.types.d.cts","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAClD,sBAAsB,GAAG;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { BadgeStatusPropsShared } from "@metamask-previews/design-system-sh
|
|
|
2
2
|
import type { ComponentProps } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* BadgeStatus component props (React platform-specific)
|
|
5
|
-
* Extends shared props with React-specific platform concerns
|
|
5
|
+
* Extends shared props from @metamask-previews/design-system-shared with React-specific platform concerns
|
|
6
6
|
*/
|
|
7
7
|
export type BadgeStatusProps = ComponentProps<'div'> & BadgeStatusPropsShared & {
|
|
8
8
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeStatus.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BadgeStatus.types.d.mts","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,gDAAgD;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAClD,sBAAsB,GAAG;IACvB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BadgeStatus.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"BadgeStatus.types.mjs","sourceRoot":"","sources":["../../../src/components/BadgeStatus/BadgeStatus.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BadgeStatusPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ComponentProps } from 'react';\n\n/**\n * BadgeStatus component props (React platform-specific)\n * Extends shared props from @metamask-previews/design-system-shared with React-specific platform concerns\n */\nexport type BadgeStatusProps = ComponentProps<'div'> &\n BadgeStatusPropsShared & {\n /**\n * Optional prop for additional CSS classes to be applied to the BadgeStatus component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.BannerAlert = void 0;
|
|
27
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
28
|
+
const react_1 = __importStar(require("react"));
|
|
29
|
+
const types_1 = require("../../types/index.cjs");
|
|
30
|
+
const tw_merge_1 = require("../../utils/tw-merge.cjs");
|
|
31
|
+
const BannerBase_1 = require("../BannerBase/index.cjs");
|
|
32
|
+
const Icon_1 = require("../Icon/index.cjs");
|
|
33
|
+
const BannerAlert_constants_1 = require("./BannerAlert.constants.cjs");
|
|
34
|
+
exports.BannerAlert = (0, react_1.forwardRef)(({ severity = design_system_shared_1.BannerAlertSeverity.Info, iconProps, className, ...props }, ref) => {
|
|
35
|
+
const iconName = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];
|
|
36
|
+
const iconColor = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];
|
|
37
|
+
const backgroundColor = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];
|
|
38
|
+
const borderColorClass = BannerAlert_constants_1.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity];
|
|
39
|
+
const mergedClassName = (0, tw_merge_1.twMerge)('border-l-4', borderColorClass, className);
|
|
40
|
+
return (react_1.default.createElement(BannerBase_1.BannerBase, { ref: ref, startAccessory: react_1.default.createElement(Icon_1.Icon, { name: iconName, color: iconColor, size: types_1.IconSize.Lg, ...iconProps }), backgroundColor: backgroundColor, paddingLeft: 2, className: mergedClassName, ...props }));
|
|
41
|
+
});
|
|
42
|
+
exports.BannerAlert.displayName = 'BannerAlert';
|
|
43
|
+
//# sourceMappingURL=BannerAlert.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kFAA8E;AAC9E,+CAA0C;AAE1C,iDAAuC;AACvC,uDAA+C;AAC/C,wDAA2C;AAC3C,4CAA+B;AAE/B,uEAKiC;AAGpB,QAAA,WAAW,GAAG,IAAA,kBAAU,EACnC,CACE,EAAE,QAAQ,GAAG,0CAAmB,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACvE,GAAG,EACH,EAAE;IACF,MAAM,QAAQ,GAAG,2DAAmC,CAAC,QAAQ,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,4DAAoC,CAAC,QAAQ,CAAC,CAAC;IACjE,MAAM,eAAe,GACnB,kEAA0C,CAAC,QAAQ,CAAC,CAAC;IACvD,MAAM,gBAAgB,GAAG,8DAAsC,CAAC,QAAQ,CAAC,CAAC;IAC1E,MAAM,eAAe,GAAG,IAAA,kBAAO,EAAC,YAAY,EAAE,gBAAgB,EAAE,SAAS,CAAC,CAAC;IAE3E,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,cAAc,EACZ,8BAAC,WAAI,IACH,IAAI,EAAE,QAAQ,EACd,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,gBAAQ,CAAC,EAAE,KACb,SAAS,GACb,EAEJ,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,CAAC,EACd,SAAS,EAAE,eAAe,KACtB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC","sourcesContent":["import { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { IconSize } from '../../types';\nimport { twMerge } from '../../utils/tw-merge';\nimport { BannerBase } from '../BannerBase';\nimport { Icon } from '../Icon';\n\nimport {\n MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR,\n MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR,\n MAP_BANNER_ALERT_SEVERITY_ICON_COLOR,\n MAP_BANNER_ALERT_SEVERITY_ICON_NAME,\n} from './BannerAlert.constants';\nimport type { BannerAlertProps } from './BannerAlert.types';\n\nexport const BannerAlert = forwardRef<HTMLDivElement, BannerAlertProps>(\n (\n { severity = BannerAlertSeverity.Info, iconProps, className, ...props },\n ref,\n ) => {\n const iconName = MAP_BANNER_ALERT_SEVERITY_ICON_NAME[severity];\n const iconColor = MAP_BANNER_ALERT_SEVERITY_ICON_COLOR[severity];\n const backgroundColor =\n MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR[severity];\n const borderColorClass = MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR[severity];\n const mergedClassName = twMerge('border-l-4', borderColorClass, className);\n\n return (\n <BannerBase\n ref={ref}\n startAccessory={\n <Icon\n name={iconName}\n color={iconColor}\n size={IconSize.Lg}\n {...iconProps}\n />\n }\n backgroundColor={backgroundColor}\n paddingLeft={2}\n className={mergedClassName}\n {...props}\n />\n );\n },\n);\n\nBannerAlert.displayName = 'BannerAlert';\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = exports.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = exports.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = exports.MAP_BANNER_ALERT_SEVERITY_ICON_NAME = void 0;
|
|
4
|
+
const design_system_shared_1 = require("@metamask-previews/design-system-shared");
|
|
5
|
+
const types_1 = require("../../types/index.cjs");
|
|
6
|
+
exports.MAP_BANNER_ALERT_SEVERITY_ICON_NAME = {
|
|
7
|
+
info: types_1.IconName.Info,
|
|
8
|
+
success: types_1.IconName.Confirmation,
|
|
9
|
+
warning: types_1.IconName.Danger,
|
|
10
|
+
danger: types_1.IconName.Danger,
|
|
11
|
+
};
|
|
12
|
+
exports.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = {
|
|
13
|
+
info: types_1.IconColor.PrimaryDefault,
|
|
14
|
+
success: types_1.IconColor.SuccessDefault,
|
|
15
|
+
warning: types_1.IconColor.WarningDefault,
|
|
16
|
+
danger: types_1.IconColor.ErrorDefault,
|
|
17
|
+
};
|
|
18
|
+
exports.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = {
|
|
19
|
+
info: types_1.BoxBackgroundColor.PrimaryMuted,
|
|
20
|
+
success: types_1.BoxBackgroundColor.SuccessMuted,
|
|
21
|
+
warning: types_1.BoxBackgroundColor.WarningMuted,
|
|
22
|
+
danger: types_1.BoxBackgroundColor.ErrorMuted,
|
|
23
|
+
};
|
|
24
|
+
exports.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = {
|
|
25
|
+
info: types_1.BoxBorderColor.PrimaryDefault,
|
|
26
|
+
success: types_1.BoxBorderColor.SuccessDefault,
|
|
27
|
+
warning: types_1.BoxBorderColor.WarningDefault,
|
|
28
|
+
danger: types_1.BoxBorderColor.ErrorDefault,
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=BannerAlert.constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":";;;AAAA,kFAA8E;AAE9E,iDAKqB;AAER,QAAA,mCAAmC,GAG5C;IACF,IAAI,EAAE,gBAAQ,CAAC,IAAI;IACnB,OAAO,EAAE,gBAAQ,CAAC,YAAY;IAC9B,OAAO,EAAE,gBAAQ,CAAC,MAAM;IACxB,MAAM,EAAE,gBAAQ,CAAC,MAAM;CACxB,CAAC;AAEW,QAAA,oCAAoC,GAG7C;IACF,IAAI,EAAE,iBAAS,CAAC,cAAc;IAC9B,OAAO,EAAE,iBAAS,CAAC,cAAc;IACjC,OAAO,EAAE,iBAAS,CAAC,cAAc;IACjC,MAAM,EAAE,iBAAS,CAAC,YAAY;CAC/B,CAAC;AAEW,QAAA,0CAA0C,GAGnD;IACF,IAAI,EAAE,0BAAkB,CAAC,YAAY;IACrC,OAAO,EAAE,0BAAkB,CAAC,YAAY;IACxC,OAAO,EAAE,0BAAkB,CAAC,YAAY;IACxC,MAAM,EAAE,0BAAkB,CAAC,UAAU;CACtC,CAAC;AAEW,QAAA,sCAAsC,GAG/C;IACF,IAAI,EAAE,sBAAc,CAAC,cAAc;IACnC,OAAO,EAAE,sBAAc,CAAC,cAAc;IACtC,OAAO,EAAE,sBAAc,CAAC,cAAc;IACtC,MAAM,EAAE,sBAAc,CAAC,YAAY;CACpC,CAAC","sourcesContent":["import { BannerAlertSeverity } from '@metamask-previews/design-system-shared';\n\nimport {\n BoxBackgroundColor,\n BoxBorderColor,\n IconColor,\n IconName,\n} from '../../types';\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconName\n> = {\n info: IconName.Info,\n success: IconName.Confirmation,\n warning: IconName.Danger,\n danger: IconName.Danger,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconColor\n> = {\n info: IconColor.PrimaryDefault,\n success: IconColor.SuccessDefault,\n warning: IconColor.WarningDefault,\n danger: IconColor.ErrorDefault,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBackgroundColor\n> = {\n info: BoxBackgroundColor.PrimaryMuted,\n success: BoxBackgroundColor.SuccessMuted,\n warning: BoxBackgroundColor.WarningMuted,\n danger: BoxBackgroundColor.ErrorMuted,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBorderColor\n> = {\n info: BoxBorderColor.PrimaryDefault,\n success: BoxBorderColor.SuccessDefault,\n warning: BoxBorderColor.WarningDefault,\n danger: BoxBorderColor.ErrorDefault,\n};\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.cjs";
|
|
3
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
|
|
4
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
|
|
5
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
|
|
6
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBorderColor>;
|
|
7
|
+
//# sourceMappingURL=BannerAlert.constants.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAE9E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,QAAQ,EACT,8BAAoB;AAErB,eAAO,MAAM,mCAAmC,EAAE,MAAM,CACtD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,QAAQ,CAMT,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,SAAS,CAMV,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAC7D,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,kBAAkB,CAMnB,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CACzD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,cAAc,CAMf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.mjs";
|
|
3
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
|
|
4
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
|
|
5
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
|
|
6
|
+
export declare const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBorderColor>;
|
|
7
|
+
//# sourceMappingURL=BannerAlert.constants.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gDAAgD;AAE9E,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,QAAQ,EACT,8BAAoB;AAErB,eAAO,MAAM,mCAAmC,EAAE,MAAM,CACtD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,QAAQ,CAMT,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,SAAS,CAMV,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAC7D,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,kBAAkB,CAMnB,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CACzD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,cAAc,CAMf,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import { BoxBackgroundColor, BoxBorderColor, IconColor, IconName } from "../../types/index.mjs";
|
|
3
|
+
export const MAP_BANNER_ALERT_SEVERITY_ICON_NAME = {
|
|
4
|
+
info: IconName.Info,
|
|
5
|
+
success: IconName.Confirmation,
|
|
6
|
+
warning: IconName.Danger,
|
|
7
|
+
danger: IconName.Danger,
|
|
8
|
+
};
|
|
9
|
+
export const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = {
|
|
10
|
+
info: IconColor.PrimaryDefault,
|
|
11
|
+
success: IconColor.SuccessDefault,
|
|
12
|
+
warning: IconColor.WarningDefault,
|
|
13
|
+
danger: IconColor.ErrorDefault,
|
|
14
|
+
};
|
|
15
|
+
export const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = {
|
|
16
|
+
info: BoxBackgroundColor.PrimaryMuted,
|
|
17
|
+
success: BoxBackgroundColor.SuccessMuted,
|
|
18
|
+
warning: BoxBackgroundColor.WarningMuted,
|
|
19
|
+
danger: BoxBackgroundColor.ErrorMuted,
|
|
20
|
+
};
|
|
21
|
+
export const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = {
|
|
22
|
+
info: BoxBorderColor.PrimaryDefault,
|
|
23
|
+
success: BoxBorderColor.SuccessDefault,
|
|
24
|
+
warning: BoxBorderColor.WarningDefault,
|
|
25
|
+
danger: BoxBorderColor.ErrorDefault,
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=BannerAlert.constants.mjs.map
|