@metamask/design-system-react 0.32.0 → 0.34.0
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 +20 -1
- package/dist/components/BannerAlert/BannerAlert.d.cts +4 -4
- package/dist/components/BannerAlert/BannerAlert.d.mts +4 -4
- package/dist/components/BannerBase/BannerBase.cjs +8 -5
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts +4 -4
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts +4 -4
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +9 -6
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/BannerBase/index.cjs +3 -1
- package/dist/components/BannerBase/index.cjs.map +1 -1
- package/dist/components/BannerBase/index.d.cts +1 -0
- package/dist/components/BannerBase/index.d.cts.map +1 -1
- package/dist/components/BannerBase/index.d.mts +1 -0
- package/dist/components/BannerBase/index.d.mts.map +1 -1
- package/dist/components/BannerBase/index.mjs +1 -0
- package/dist/components/BannerBase/index.mjs.map +1 -1
- package/dist/components/HelpText/HelpText.cjs +11 -1
- package/dist/components/HelpText/HelpText.cjs.map +1 -1
- package/dist/components/HelpText/HelpText.d.cts.map +1 -1
- package/dist/components/HelpText/HelpText.d.mts.map +1 -1
- package/dist/components/HelpText/HelpText.mjs +12 -2
- package/dist/components/HelpText/HelpText.mjs.map +1 -1
- package/dist/components/IconAlert/IconAlert.cjs +16 -0
- package/dist/components/IconAlert/IconAlert.cjs.map +1 -0
- package/dist/components/IconAlert/IconAlert.constants.cjs +23 -0
- package/dist/components/IconAlert/IconAlert.constants.cjs.map +1 -0
- package/dist/components/IconAlert/IconAlert.constants.d.cts +6 -0
- package/dist/components/IconAlert/IconAlert.constants.d.cts.map +1 -0
- package/dist/components/IconAlert/IconAlert.constants.d.mts +6 -0
- package/dist/components/IconAlert/IconAlert.constants.d.mts.map +1 -0
- package/dist/components/IconAlert/IconAlert.constants.mjs +20 -0
- package/dist/components/IconAlert/IconAlert.constants.mjs.map +1 -0
- package/dist/components/IconAlert/IconAlert.d.cts +7 -0
- package/dist/components/IconAlert/IconAlert.d.cts.map +1 -0
- package/dist/components/IconAlert/IconAlert.d.mts +7 -0
- package/dist/components/IconAlert/IconAlert.d.mts.map +1 -0
- package/dist/components/IconAlert/IconAlert.mjs +16 -0
- package/dist/components/IconAlert/IconAlert.mjs.map +1 -0
- package/dist/components/IconAlert/IconAlert.types.cjs +3 -0
- package/dist/components/IconAlert/IconAlert.types.cjs.map +1 -0
- package/dist/components/IconAlert/IconAlert.types.d.cts +4 -0
- package/dist/components/IconAlert/IconAlert.types.d.cts.map +1 -0
- package/dist/components/IconAlert/IconAlert.types.d.mts +4 -0
- package/dist/components/IconAlert/IconAlert.types.d.mts.map +1 -0
- package/dist/components/IconAlert/IconAlert.types.mjs +2 -0
- package/dist/components/IconAlert/IconAlert.types.mjs.map +1 -0
- package/dist/components/IconAlert/index.cjs +8 -0
- package/dist/components/IconAlert/index.cjs.map +1 -0
- package/dist/components/IconAlert/index.d.cts +4 -0
- package/dist/components/IconAlert/index.d.cts.map +1 -0
- package/dist/components/IconAlert/index.d.mts +4 -0
- package/dist/components/IconAlert/index.d.mts.map +1 -0
- package/dist/components/IconAlert/index.mjs +3 -0
- package/dist/components/IconAlert/index.mjs.map +1 -0
- package/dist/components/index.cjs +7 -3
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +3 -1
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +3 -1
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +2 -1
- package/dist/components/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.34.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added `IconAlert` for severity-mapped icon glyphs aligned with the React Native primitive ([#1409](https://github.com/MetaMask/metamask-design-system/pull/1409))
|
|
15
|
+
- Added `showIcon` to `HelpText` (default `false`) to render a leading `IconAlert` when `severity` is set ([#1409](https://github.com/MetaMask/metamask-design-system/pull/1409))
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- Updated `BannerBase` spacing (padding, title/description gap, action button margin, and close button offset) to match Figma; inherited by `BannerAlert` and `Toast` ([#1394](https://github.com/MetaMask/metamask-design-system/pull/1394))
|
|
20
|
+
|
|
21
|
+
## [0.33.0]
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Added `actionButtonLayout` to `BannerBase` (inherited by `BannerAlert`) with `BannerBaseActionButtonLayout.Below` (default) and `BannerBaseActionButtonLayout.End` to place the action button beside the body, left of close ([#1386](https://github.com/MetaMask/metamask-design-system/pull/1386))
|
|
26
|
+
|
|
10
27
|
## [0.32.0]
|
|
11
28
|
|
|
12
29
|
### Added
|
|
@@ -420,7 +437,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
420
437
|
- Full TypeScript support with type definitions and enums
|
|
421
438
|
- Tailwind CSS integration with design token support
|
|
422
439
|
|
|
423
|
-
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.
|
|
440
|
+
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.34.0...HEAD
|
|
441
|
+
[0.34.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.33.0...@metamask/design-system-react@0.34.0
|
|
442
|
+
[0.33.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.32.0...@metamask/design-system-react@0.33.0
|
|
424
443
|
[0.32.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.31.0...@metamask/design-system-react@0.32.0
|
|
425
444
|
[0.31.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.30.0...@metamask/design-system-react@0.31.0
|
|
426
445
|
[0.30.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react@0.29.0...@metamask/design-system-react@0.30.0
|
|
@@ -304,6 +304,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
304
304
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
305
305
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
306
306
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
307
|
+
startAccessory?: React.ReactNode;
|
|
308
|
+
endAccessory?: React.ReactNode;
|
|
307
309
|
isDisabled?: boolean | undefined;
|
|
308
310
|
asChild?: boolean | undefined;
|
|
309
311
|
textProps?: Partial<import("../index.cjs").TextProps> | undefined;
|
|
@@ -313,10 +315,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
313
315
|
loadingTextProps?: Partial<import("../index.cjs").TextProps> | undefined;
|
|
314
316
|
startIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
315
317
|
startIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
|
|
316
|
-
startAccessory?: React.ReactNode;
|
|
317
318
|
endIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
318
319
|
endIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
|
|
319
|
-
endAccessory?: React.ReactNode;
|
|
320
320
|
loadingIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
|
|
321
321
|
isDanger?: boolean | undefined;
|
|
322
322
|
isInverse?: boolean | undefined;
|
|
@@ -627,6 +627,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
627
627
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
628
628
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
629
629
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
630
|
+
startAccessory?: React.ReactNode;
|
|
631
|
+
endAccessory?: React.ReactNode;
|
|
630
632
|
isDisabled?: boolean | undefined;
|
|
631
633
|
asChild?: boolean | undefined;
|
|
632
634
|
textProps?: Partial<import("../index.cjs").TextProps> | undefined;
|
|
@@ -636,10 +638,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
636
638
|
loadingTextProps?: Partial<import("../index.cjs").TextProps> | undefined;
|
|
637
639
|
startIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
638
640
|
startIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
|
|
639
|
-
startAccessory?: React.ReactNode;
|
|
640
641
|
endIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
641
642
|
endIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
|
|
642
|
-
endAccessory?: React.ReactNode;
|
|
643
643
|
loadingIconProps?: Partial<import("../Icon/index.cjs").IconProps> | undefined;
|
|
644
644
|
isDanger?: boolean | undefined;
|
|
645
645
|
isInverse?: boolean | undefined;
|
|
@@ -304,6 +304,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
304
304
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
305
305
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
306
306
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
307
|
+
startAccessory?: React.ReactNode;
|
|
308
|
+
endAccessory?: React.ReactNode;
|
|
307
309
|
isDisabled?: boolean | undefined;
|
|
308
310
|
asChild?: boolean | undefined;
|
|
309
311
|
textProps?: Partial<import("../index.mjs").TextProps> | undefined;
|
|
@@ -313,10 +315,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
313
315
|
loadingTextProps?: Partial<import("../index.mjs").TextProps> | undefined;
|
|
314
316
|
startIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
315
317
|
startIconProps?: Partial<import("../Icon/index.mjs").IconProps> | undefined;
|
|
316
|
-
startAccessory?: React.ReactNode;
|
|
317
318
|
endIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
318
319
|
endIconProps?: Partial<import("../Icon/index.mjs").IconProps> | undefined;
|
|
319
|
-
endAccessory?: React.ReactNode;
|
|
320
320
|
loadingIconProps?: Partial<import("../Icon/index.mjs").IconProps> | undefined;
|
|
321
321
|
isDanger?: boolean | undefined;
|
|
322
322
|
isInverse?: boolean | undefined;
|
|
@@ -627,6 +627,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
627
627
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
628
628
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
629
629
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
630
|
+
startAccessory?: React.ReactNode;
|
|
631
|
+
endAccessory?: React.ReactNode;
|
|
630
632
|
isDisabled?: boolean | undefined;
|
|
631
633
|
asChild?: boolean | undefined;
|
|
632
634
|
textProps?: Partial<import("../index.mjs").TextProps> | undefined;
|
|
@@ -636,10 +638,8 @@ export declare const BannerAlert: React.ForwardRefExoticComponent<(Omit<import("
|
|
|
636
638
|
loadingTextProps?: Partial<import("../index.mjs").TextProps> | undefined;
|
|
637
639
|
startIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
638
640
|
startIconProps?: Partial<import("../Icon/index.mjs").IconProps> | undefined;
|
|
639
|
-
startAccessory?: React.ReactNode;
|
|
640
641
|
endIconName?: import("@metamask/design-system-shared").IconName | undefined;
|
|
641
642
|
endIconProps?: Partial<import("../Icon/index.mjs").IconProps> | undefined;
|
|
642
|
-
endAccessory?: React.ReactNode;
|
|
643
643
|
loadingIconProps?: Partial<import("../Icon/index.mjs").IconProps> | undefined;
|
|
644
644
|
isDanger?: boolean | undefined;
|
|
645
645
|
isInverse?: boolean | undefined;
|
|
@@ -33,21 +33,24 @@ const ButtonIcon_1 = require("../ButtonIcon/index.cjs");
|
|
|
33
33
|
const Text_1 = require("../Text/index.cjs");
|
|
34
34
|
const isTextContent = (content) => typeof content === 'string' || typeof content === 'number';
|
|
35
35
|
const hasContent = (content) => content !== null && content !== undefined;
|
|
36
|
-
exports.BannerBase = (0, react_1.forwardRef)(({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnClick, actionButtonProps, startAccessory, onClose, closeButtonProps, className, ...props }, ref) => {
|
|
36
|
+
exports.BannerBase = (0, react_1.forwardRef)(({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnClick, actionButtonProps, actionButtonLayout = design_system_shared_1.BannerBaseActionButtonLayout.Below, startAccessory, onClose, closeButtonProps, className, ...props }, ref) => {
|
|
37
37
|
const resolvedActionButtonProps = actionButtonProps ?? {};
|
|
38
38
|
const { ariaLabel: closeButtonAriaLabel = 'Close banner', className: closeButtonClassName, ...resolvedCloseButtonProps } = closeButtonProps ?? {};
|
|
39
39
|
const shouldShowCloseButton = Boolean(onClose);
|
|
40
40
|
const shouldShowActionButton = Boolean(actionButtonOnClick);
|
|
41
|
-
|
|
41
|
+
const isActionButtonLayoutEnd = actionButtonLayout === design_system_shared_1.BannerBaseActionButtonLayout.End;
|
|
42
|
+
const hasActionButtonBelow = shouldShowActionButton && !isActionButtonLayoutEnd;
|
|
43
|
+
const actionButton = shouldShowActionButton ? (react_1.default.createElement(Button_1.Button, { size: design_system_shared_1.ButtonSize.Md, onClick: actionButtonOnClick, ...resolvedActionButtonProps, variant: design_system_shared_1.ButtonVariant.Secondary }, actionButtonLabel)) : null;
|
|
44
|
+
return (react_1.default.createElement(Box_1.Box, { ref: ref, flexDirection: design_system_shared_1.BoxFlexDirection.Row, alignItems: design_system_shared_1.BoxAlignItems.Start, gap: 4, backgroundColor: design_system_shared_1.BoxBackgroundColor.BackgroundDefault, paddingTop: 3, paddingBottom: hasActionButtonBelow ? 4 : 3, paddingLeft: 4, paddingRight: shouldShowCloseButton ? 2 : 4, className: (0, tw_merge_1.twMerge)('rounded-xl', className), ...props },
|
|
42
45
|
startAccessory,
|
|
43
46
|
react_1.default.createElement(Box_1.Box, { className: "min-w-0 flex-1" },
|
|
44
47
|
hasContent(title) &&
|
|
45
48
|
(isTextContent(title) ? (react_1.default.createElement(Text_1.Text, { variant: design_system_shared_1.TextVariant.BodyMd, fontWeight: design_system_shared_1.FontWeight.Medium, ...titleProps }, title)) : (title)),
|
|
46
|
-
hasContent(description) && (react_1.default.createElement(Box_1.Box,
|
|
49
|
+
hasContent(description) && (react_1.default.createElement(Box_1.Box, { className: hasContent(title) ? 'mt-0.5' : undefined }, isTextContent(description) ? (react_1.default.createElement(Text_1.Text, { variant: design_system_shared_1.TextVariant.BodySm, ...descriptionProps }, description)) : (description))),
|
|
47
50
|
hasContent(children) &&
|
|
48
51
|
(isTextContent(children) ? (react_1.default.createElement(Text_1.Text, { variant: design_system_shared_1.TextVariant.BodyMd, ...childrenWrapperProps }, children)) : (children)),
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
hasActionButtonBelow && react_1.default.createElement(Box_1.Box, { className: "mt-2" }, actionButton)),
|
|
53
|
+
shouldShowActionButton && isActionButtonLayoutEnd && actionButton,
|
|
51
54
|
shouldShowCloseButton && (react_1.default.createElement(ButtonIcon_1.ButtonIcon, { className: (0, tw_merge_1.twMerge)('-mt-1', closeButtonClassName), iconName: design_system_shared_1.IconName.Close, size: design_system_shared_1.ButtonIconSize.Md, ariaLabel: closeButtonAriaLabel, onClick: onClose, ...resolvedCloseButtonProps }))));
|
|
52
55
|
});
|
|
53
56
|
exports.BannerBase.displayName = 'BannerBase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"BannerBase.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAWwC;AACxC,+CAA0C;AAE1C,uDAA+C;AAC/C,0CAA6B;AAC7B,gDAAmC;AACnC,wDAA2C;AAC3C,4CAA+B;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC;AAE7D,MAAM,UAAU,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC9C,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AAE/B,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CACE,EACE,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,GAAG,mDAA4B,CAAC,KAAK,EACvD,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,SAAS,EAAE,oBAAoB,GAAG,cAAc,EAChD,SAAS,EAAE,oBAAoB,EAC/B,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,IAAI,EAAE,CAAC;IAE3B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/C,MAAM,sBAA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8BAAC,SAAG,IAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,IACrD,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAC5B,8BAAC,WAAI,IAAC,OAAO,EAAE,kCAAW,CAAC,MAAM,KAAM,gBAAgB,IACpD,WAAW,CACP,CACR,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,CACG,CACP;YAEA,UAAU,CAAC,QAAQ,CAAC;gBACnB,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CACzB,8BAAC,WAAI,IAAC,OAAO,EAAE,kCAAW,CAAC,MAAM,KAAM,oBAAoB,IACxD,QAAQ,CACJ,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAC;YAEH,oBAAoB,IAAI,8BAAC,SAAG,IAAC,SAAS,EAAC,MAAM,IAAE,YAAY,CAAO,CAC/D;QAEL,sBAAsB,IAAI,uBAAuB,IAAI,YAAY;QAEjE,qBAAqB,IAAI,CACxB,8BAAC,uBAAU,IACT,SAAS,EAAE,IAAA,kBAAO,EAAC,OAAO,EAAE,oBAAoB,CAAC,EACjD,QAAQ,EAAE,+BAAQ,CAAC,KAAK,EACxB,IAAI,EAAE,qCAAc,CAAC,EAAE,EACvB,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,OAAO,KACZ,wBAAwB,GAC5B,CACH,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC","sourcesContent":["import {\n BannerBaseActionButtonLayout,\n BoxAlignItems,\n BoxBackgroundColor,\n BoxFlexDirection,\n ButtonIconSize,\n ButtonSize,\n ButtonVariant,\n FontWeight,\n IconName,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase = forwardRef<HTMLDivElement, BannerBaseProps>(\n (\n {\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnClick,\n actionButtonProps,\n actionButtonLayout = BannerBaseActionButtonLayout.Below,\n startAccessory,\n onClose,\n closeButtonProps,\n className,\n ...props\n },\n ref,\n ) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n ariaLabel: closeButtonAriaLabel = 'Close banner',\n className: closeButtonClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose);\n const shouldShowActionButton = Boolean(actionButtonOnClick);\n const isActionButtonLayoutEnd =\n actionButtonLayout === BannerBaseActionButtonLayout.End;\n const hasActionButtonBelow =\n shouldShowActionButton && !isActionButtonLayoutEnd;\n\n const actionButton = shouldShowActionButton ? (\n <Button\n size={ButtonSize.Md}\n onClick={actionButtonOnClick}\n {...resolvedActionButtonProps}\n variant={ButtonVariant.Secondary}\n >\n {actionButtonLabel}\n </Button>\n ) : null;\n\n return (\n <Box\n ref={ref}\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={4}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n paddingTop={3}\n paddingBottom={hasActionButtonBelow ? 4 : 3}\n paddingLeft={4}\n paddingRight={shouldShowCloseButton ? 2 : 4}\n className={twMerge('rounded-xl', className)}\n {...props}\n >\n {startAccessory}\n\n <Box className=\"min-w-0 flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box className={hasContent(title) ? 'mt-0.5' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {hasActionButtonBelow && <Box className=\"mt-2\">{actionButton}</Box>}\n </Box>\n\n {shouldShowActionButton && isActionButtonLayoutEnd && actionButton}\n\n {shouldShowCloseButton && (\n <ButtonIcon\n className={twMerge('-mt-1', closeButtonClassName)}\n iconName={IconName.Close}\n size={ButtonIconSize.Md}\n ariaLabel={closeButtonAriaLabel}\n onClick={onClose}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n },\n);\n\nBannerBase.displayName = 'BannerBase';\n"]}
|
|
@@ -302,6 +302,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
302
302
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
303
303
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
304
304
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
305
|
+
startAccessory?: React.ReactNode;
|
|
306
|
+
endAccessory?: React.ReactNode;
|
|
305
307
|
isDisabled?: boolean | undefined;
|
|
306
308
|
asChild?: boolean | undefined;
|
|
307
309
|
textProps?: Partial<import("../Text/index.cjs").TextProps> | undefined;
|
|
@@ -311,10 +313,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
311
313
|
loadingTextProps?: Partial<import("../Text/index.cjs").TextProps> | undefined;
|
|
312
314
|
startIconName?: IconName | undefined;
|
|
313
315
|
startIconProps?: Partial<import("../index.cjs").IconProps> | undefined;
|
|
314
|
-
startAccessory?: React.ReactNode;
|
|
315
316
|
endIconName?: IconName | undefined;
|
|
316
317
|
endIconProps?: Partial<import("../index.cjs").IconProps> | undefined;
|
|
317
|
-
endAccessory?: React.ReactNode;
|
|
318
318
|
loadingIconProps?: Partial<import("../index.cjs").IconProps> | undefined;
|
|
319
319
|
isDanger?: boolean | undefined;
|
|
320
320
|
isInverse?: boolean | undefined;
|
|
@@ -621,6 +621,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
621
621
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
622
622
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
623
623
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
624
|
+
startAccessory?: React.ReactNode;
|
|
625
|
+
endAccessory?: React.ReactNode;
|
|
624
626
|
isDisabled?: boolean | undefined;
|
|
625
627
|
asChild?: boolean | undefined;
|
|
626
628
|
textProps?: Partial<import("../Text/index.cjs").TextProps> | undefined;
|
|
@@ -630,10 +632,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
630
632
|
loadingTextProps?: Partial<import("../Text/index.cjs").TextProps> | undefined;
|
|
631
633
|
startIconName?: IconName | undefined;
|
|
632
634
|
startIconProps?: Partial<import("../index.cjs").IconProps> | undefined;
|
|
633
|
-
startAccessory?: React.ReactNode;
|
|
634
635
|
endIconName?: IconName | undefined;
|
|
635
636
|
endIconProps?: Partial<import("../index.cjs").IconProps> | undefined;
|
|
636
|
-
endAccessory?: React.ReactNode;
|
|
637
637
|
loadingIconProps?: Partial<import("../index.cjs").IconProps> | undefined;
|
|
638
638
|
isDanger?: boolean | undefined;
|
|
639
639
|
isInverse?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,QAAQ,EAET,uCAAuC;AACxC,OAAO,KAAqB,cAAc;AAgB1C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAoHtB,CAAC"}
|
|
@@ -302,6 +302,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
302
302
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
303
303
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
304
304
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
305
|
+
startAccessory?: React.ReactNode;
|
|
306
|
+
endAccessory?: React.ReactNode;
|
|
305
307
|
isDisabled?: boolean | undefined;
|
|
306
308
|
asChild?: boolean | undefined;
|
|
307
309
|
textProps?: Partial<import("../Text/index.mjs").TextProps> | undefined;
|
|
@@ -311,10 +313,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
311
313
|
loadingTextProps?: Partial<import("../Text/index.mjs").TextProps> | undefined;
|
|
312
314
|
startIconName?: IconName | undefined;
|
|
313
315
|
startIconProps?: Partial<import("../index.mjs").IconProps> | undefined;
|
|
314
|
-
startAccessory?: React.ReactNode;
|
|
315
316
|
endIconName?: IconName | undefined;
|
|
316
317
|
endIconProps?: Partial<import("../index.mjs").IconProps> | undefined;
|
|
317
|
-
endAccessory?: React.ReactNode;
|
|
318
318
|
loadingIconProps?: Partial<import("../index.mjs").IconProps> | undefined;
|
|
319
319
|
isDanger?: boolean | undefined;
|
|
320
320
|
isInverse?: boolean | undefined;
|
|
@@ -621,6 +621,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
621
621
|
onTransitionRunCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
622
622
|
onTransitionStart?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
623
623
|
onTransitionStartCapture?: React.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
624
|
+
startAccessory?: React.ReactNode;
|
|
625
|
+
endAccessory?: React.ReactNode;
|
|
624
626
|
isDisabled?: boolean | undefined;
|
|
625
627
|
asChild?: boolean | undefined;
|
|
626
628
|
textProps?: Partial<import("../Text/index.mjs").TextProps> | undefined;
|
|
@@ -630,10 +632,8 @@ export declare const BannerBase: React.ForwardRefExoticComponent<(Omit<import("@
|
|
|
630
632
|
loadingTextProps?: Partial<import("../Text/index.mjs").TextProps> | undefined;
|
|
631
633
|
startIconName?: IconName | undefined;
|
|
632
634
|
startIconProps?: Partial<import("../index.mjs").IconProps> | undefined;
|
|
633
|
-
startAccessory?: React.ReactNode;
|
|
634
635
|
endIconName?: IconName | undefined;
|
|
635
636
|
endIconProps?: Partial<import("../index.mjs").IconProps> | undefined;
|
|
636
|
-
endAccessory?: React.ReactNode;
|
|
637
637
|
loadingIconProps?: Partial<import("../index.mjs").IconProps> | undefined;
|
|
638
638
|
isDanger?: boolean | undefined;
|
|
639
639
|
isInverse?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,QAAQ,EAET,uCAAuC;AACxC,OAAO,KAAqB,cAAc;AAgB1C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iDAoHtB,CAAC"}
|
|
@@ -4,7 +4,7 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { BoxAlignItems, BoxBackgroundColor, BoxFlexDirection, ButtonIconSize, ButtonSize, ButtonVariant, FontWeight, IconName, TextVariant } from "@metamask/design-system-shared";
|
|
7
|
+
import { BannerBaseActionButtonLayout, BoxAlignItems, BoxBackgroundColor, BoxFlexDirection, ButtonIconSize, ButtonSize, ButtonVariant, FontWeight, IconName, TextVariant } from "@metamask/design-system-shared";
|
|
8
8
|
import $React, { forwardRef } from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
10
|
import { twMerge } from "../../utils/tw-merge.mjs";
|
|
@@ -14,21 +14,24 @@ import { ButtonIcon } from "../ButtonIcon/index.mjs";
|
|
|
14
14
|
import { Text } from "../Text/index.mjs";
|
|
15
15
|
const isTextContent = (content) => typeof content === 'string' || typeof content === 'number';
|
|
16
16
|
const hasContent = (content) => content !== null && content !== undefined;
|
|
17
|
-
export const BannerBase = forwardRef(({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnClick, actionButtonProps, startAccessory, onClose, closeButtonProps, className, ...props }, ref) => {
|
|
17
|
+
export const BannerBase = forwardRef(({ title, titleProps, description, descriptionProps, children, childrenWrapperProps, actionButtonLabel, actionButtonOnClick, actionButtonProps, actionButtonLayout = BannerBaseActionButtonLayout.Below, startAccessory, onClose, closeButtonProps, className, ...props }, ref) => {
|
|
18
18
|
const resolvedActionButtonProps = actionButtonProps ?? {};
|
|
19
19
|
const { ariaLabel: closeButtonAriaLabel = 'Close banner', className: closeButtonClassName, ...resolvedCloseButtonProps } = closeButtonProps ?? {};
|
|
20
20
|
const shouldShowCloseButton = Boolean(onClose);
|
|
21
21
|
const shouldShowActionButton = Boolean(actionButtonOnClick);
|
|
22
|
-
|
|
22
|
+
const isActionButtonLayoutEnd = actionButtonLayout === BannerBaseActionButtonLayout.End;
|
|
23
|
+
const hasActionButtonBelow = shouldShowActionButton && !isActionButtonLayoutEnd;
|
|
24
|
+
const actionButton = shouldShowActionButton ? (React.createElement(Button, { size: ButtonSize.Md, onClick: actionButtonOnClick, ...resolvedActionButtonProps, variant: ButtonVariant.Secondary }, actionButtonLabel)) : null;
|
|
25
|
+
return (React.createElement(Box, { ref: ref, flexDirection: BoxFlexDirection.Row, alignItems: BoxAlignItems.Start, gap: 4, backgroundColor: BoxBackgroundColor.BackgroundDefault, paddingTop: 3, paddingBottom: hasActionButtonBelow ? 4 : 3, paddingLeft: 4, paddingRight: shouldShowCloseButton ? 2 : 4, className: twMerge('rounded-xl', className), ...props },
|
|
23
26
|
startAccessory,
|
|
24
27
|
React.createElement(Box, { className: "min-w-0 flex-1" },
|
|
25
28
|
hasContent(title) &&
|
|
26
29
|
(isTextContent(title) ? (React.createElement(Text, { variant: TextVariant.BodyMd, fontWeight: FontWeight.Medium, ...titleProps }, title)) : (title)),
|
|
27
|
-
hasContent(description) && (React.createElement(Box,
|
|
30
|
+
hasContent(description) && (React.createElement(Box, { className: hasContent(title) ? 'mt-0.5' : undefined }, isTextContent(description) ? (React.createElement(Text, { variant: TextVariant.BodySm, ...descriptionProps }, description)) : (description))),
|
|
28
31
|
hasContent(children) &&
|
|
29
32
|
(isTextContent(children) ? (React.createElement(Text, { variant: TextVariant.BodyMd, ...childrenWrapperProps }, children)) : (children)),
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
hasActionButtonBelow && React.createElement(Box, { className: "mt-2" }, actionButton)),
|
|
34
|
+
shouldShowActionButton && isActionButtonLayoutEnd && actionButton,
|
|
32
35
|
shouldShowCloseButton && (React.createElement(ButtonIcon, { className: twMerge('-mt-1', closeButtonClassName), iconName: IconName.Close, size: ButtonIconSize.Md, ariaLabel: closeButtonAriaLabel, onClick: onClose, ...resolvedCloseButtonProps }))));
|
|
33
36
|
});
|
|
34
37
|
BannerBase.displayName = 'BannerBase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,aAAa,EACb,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,uCAAuC;AACxC,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,iCAA6B;AAC/C,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,MAAM,EAAE,4BAAkB;AACnC,OAAO,EAAE,UAAU,EAAE,gCAAsB;AAC3C,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAI/B,MAAM,aAAa,GAAG,CAAC,OAAwB,EAA8B,EAAE,CAC7E,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,CAAC;AAE7D,MAAM,UAAU,GAAG,CAAC,OAAwB,EAAE,EAAE,CAC9C,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,CAAC;AAE5C,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,SAAS,EAAE,oBAAoB,GAAG,cAAc,EAChD,SAAS,EAAE,oBAAoB,EAC/B,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,IAAI,E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ize,\n ButtonVariant,\n FontWeight,\n IconName,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../utils/tw-merge';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { ButtonIcon } from '../ButtonIcon';\nimport { Text } from '../Text';\n\nimport type { BannerBaseProps } from './BannerBase.types';\n\nconst isTextContent = (content: React.ReactNode): content is string | number =>\n typeof content === 'string' || typeof content === 'number';\n\nconst hasContent = (content: React.ReactNode) =>\n content !== null && content !== undefined;\n\nexport const BannerBase = forwardRef<HTMLDivElement, BannerBaseProps>(\n (\n {\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnClick,\n actionButtonProps,\n actionButtonLayout = BannerBaseActionButtonLayout.Below,\n startAccessory,\n onClose,\n closeButtonProps,\n className,\n ...props\n },\n ref,\n ) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n ariaLabel: closeButtonAriaLabel = 'Close banner',\n className: closeButtonClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose);\n const shouldShowActionButton = Boolean(actionButtonOnClick);\n const isActionButtonLayoutEnd =\n actionButtonLayout === BannerBaseActionButtonLayout.End;\n const hasActionButtonBelow =\n shouldShowActionButton && !isActionButtonLayoutEnd;\n\n const actionButton = shouldShowActionButton ? (\n <Button\n size={ButtonSize.Md}\n onClick={actionButtonOnClick}\n {...resolvedActionButtonProps}\n variant={ButtonVariant.Secondary}\n >\n {actionButtonLabel}\n </Button>\n ) : null;\n\n return (\n <Box\n ref={ref}\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={4}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n paddingTop={3}\n paddingBottom={hasActionButtonBelow ? 4 : 3}\n paddingLeft={4}\n paddingRight={shouldShowCloseButton ? 2 : 4}\n className={twMerge('rounded-xl', className)}\n {...props}\n >\n {startAccessory}\n\n <Box className=\"min-w-0 flex-1\">\n {hasContent(title) &&\n (isTextContent(title) ? (\n <Text\n variant={TextVariant.BodyMd}\n fontWeight={FontWeight.Medium}\n {...titleProps}\n >\n {title}\n </Text>\n ) : (\n title\n ))}\n\n {hasContent(description) && (\n <Box className={hasContent(title) ? 'mt-0.5' : undefined}>\n {isTextContent(description) ? (\n <Text variant={TextVariant.BodySm} {...descriptionProps}>\n {description}\n </Text>\n ) : (\n description\n )}\n </Box>\n )}\n\n {hasContent(children) &&\n (isTextContent(children) ? (\n <Text variant={TextVariant.BodyMd} {...childrenWrapperProps}>\n {children}\n </Text>\n ) : (\n children\n ))}\n\n {hasActionButtonBelow && <Box className=\"mt-2\">{actionButton}</Box>}\n </Box>\n\n {shouldShowActionButton && isActionButtonLayoutEnd && actionButton}\n\n {shouldShowCloseButton && (\n <ButtonIcon\n className={twMerge('-mt-1', closeButtonClassName)}\n iconName={IconName.Close}\n size={ButtonIconSize.Md}\n ariaLabel={closeButtonAriaLabel}\n onClick={onClose}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n },\n);\n\nBannerBase.displayName = 'BannerBase';\n"]}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BannerBase = void 0;
|
|
3
|
+
exports.BannerBase = exports.BannerBaseActionButtonLayout = void 0;
|
|
4
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "BannerBaseActionButtonLayout", { enumerable: true, get: function () { return design_system_shared_1.BannerBaseActionButtonLayout; } });
|
|
4
6
|
var BannerBase_1 = require("./BannerBase.cjs");
|
|
5
7
|
Object.defineProperty(exports, "BannerBase", { enumerable: true, get: function () { return BannerBase_1.BannerBase; } });
|
|
6
8
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":";;;AAAA,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":";;;AAAA,uEAA8E;AAArE,oIAAA,4BAA4B,OAAA;AAErC,+CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export { BannerBaseActionButtonLayout } from '@metamask/design-system-shared';\n\nexport { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,uCAAuC;AAE9E,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,uCAAuC;AAE9E,OAAO,EAAE,UAAU,EAAE,yBAAqB;AAC1C,YAAY,EAAE,eAAe,EAAE,+BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,uCAAuC;AAE9E,OAAO,EAAE,UAAU,EAAE,yBAAqB","sourcesContent":["export { BannerBaseActionButtonLayout } from '@metamask/design-system-shared';\n\nexport { BannerBase } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase.types';\n"]}
|
|
@@ -6,8 +6,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.HelpText = void 0;
|
|
7
7
|
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const Box_1 = require("../Box/index.cjs");
|
|
10
|
+
const IconAlert_1 = require("../IconAlert/index.cjs");
|
|
9
11
|
const Text_1 = require("../Text/index.cjs");
|
|
10
12
|
const HelpText_constants_1 = require("./HelpText.constants.cjs");
|
|
11
|
-
const HelpText = ({ severity, color = design_system_shared_1.TextColor.TextDefault, className, children, ...props }) =>
|
|
13
|
+
const HelpText = ({ severity, showIcon = false, color = design_system_shared_1.TextColor.TextDefault, className, children, ...props }) => {
|
|
14
|
+
const textColor = severity ? HelpText_constants_1.MAP_HELPTEXT_SEVERITY_COLOR[severity] : color;
|
|
15
|
+
if (!(showIcon && severity)) {
|
|
16
|
+
return (react_1.default.createElement(Text_1.Text, { variant: design_system_shared_1.TextVariant.BodySm, color: textColor, className: className, ...props }, children));
|
|
17
|
+
}
|
|
18
|
+
return (react_1.default.createElement(Box_1.Box, { flexDirection: design_system_shared_1.BoxFlexDirection.Row, alignItems: design_system_shared_1.BoxAlignItems.Center, gap: 1, className: className },
|
|
19
|
+
react_1.default.createElement(IconAlert_1.IconAlert, { severity: severity, size: design_system_shared_1.IconSize.Sm, "data-testid": "help-text-icon" }),
|
|
20
|
+
react_1.default.createElement(Text_1.Text, { variant: design_system_shared_1.TextVariant.BodySm, color: textColor, ...props }, children)));
|
|
21
|
+
};
|
|
12
22
|
exports.HelpText = HelpText;
|
|
13
23
|
//# sourceMappingURL=HelpText.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpText.cjs","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":";;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"HelpText.cjs","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":";;;;;;AAAA,yEAMwC;AACxC,kDAA0B;AAE1B,0CAA6B;AAC7B,sDAAyC;AACzC,4CAA+B;AAE/B,iEAAmE;AAG5D,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,gCAAS,CAAC,WAAW,EAC7B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,gDAA2B,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAE3E,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE;QAC3B,OAAO,CACL,8BAAC,WAAI,IACH,OAAO,EAAE,kCAAW,CAAC,MAAM,EAC3B,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,QAAQ,CACJ,CACR,CAAC;KACH;IAED,OAAO,CACL,8BAAC,SAAG,IACF,aAAa,EAAE,uCAAgB,CAAC,GAAG,EACnC,UAAU,EAAE,oCAAa,CAAC,MAAM,EAChC,GAAG,EAAE,CAAC,EACN,SAAS,EAAE,SAAS;QAEpB,8BAAC,qBAAS,IACR,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,+BAAQ,CAAC,EAAE,iBACL,gBAAgB,GAC5B;QACF,8BAAC,WAAI,IAAC,OAAO,EAAE,kCAAW,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,KAAM,KAAK,IAC3D,QAAQ,CACJ,CACH,CACP,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,QAAQ,YAwCnB","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { IconAlert } from '../IconAlert';\nimport { Text } from '../Text';\n\nimport { MAP_HELPTEXT_SEVERITY_COLOR } from './HelpText.constants';\nimport type { HelpTextProps } from './HelpText.types';\n\nexport const HelpText: React.FC<HelpTextProps> = ({\n severity,\n showIcon = false,\n color = TextColor.TextDefault,\n className,\n children,\n ...props\n}) => {\n const textColor = severity ? MAP_HELPTEXT_SEVERITY_COLOR[severity] : color;\n\n if (!(showIcon && severity)) {\n return (\n <Text\n variant={TextVariant.BodySm}\n color={textColor}\n className={className}\n {...props}\n >\n {children}\n </Text>\n );\n }\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n className={className}\n >\n <IconAlert\n severity={severity}\n size={IconSize.Sm}\n data-testid=\"help-text-icon\"\n />\n <Text variant={TextVariant.BodySm} color={textColor} {...props}>\n {children}\n </Text>\n </Box>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpText.d.cts","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HelpText.d.cts","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpText.d.mts","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HelpText.d.mts","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,cAAc;AAO1B,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwC5C,CAAC"}
|
|
@@ -4,10 +4,20 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import { TextColor, TextVariant } from "@metamask/design-system-shared";
|
|
7
|
+
import { BoxAlignItems, BoxFlexDirection, IconSize, TextColor, TextVariant } from "@metamask/design-system-shared";
|
|
8
8
|
import $React from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
|
+
import { Box } from "../Box/index.mjs";
|
|
11
|
+
import { IconAlert } from "../IconAlert/index.mjs";
|
|
10
12
|
import { Text } from "../Text/index.mjs";
|
|
11
13
|
import { MAP_HELPTEXT_SEVERITY_COLOR } from "./HelpText.constants.mjs";
|
|
12
|
-
export const HelpText = ({ severity, color = TextColor.TextDefault, className, children, ...props }) =>
|
|
14
|
+
export const HelpText = ({ severity, showIcon = false, color = TextColor.TextDefault, className, children, ...props }) => {
|
|
15
|
+
const textColor = severity ? MAP_HELPTEXT_SEVERITY_COLOR[severity] : color;
|
|
16
|
+
if (!(showIcon && severity)) {
|
|
17
|
+
return (React.createElement(Text, { variant: TextVariant.BodySm, color: textColor, className: className, ...props }, children));
|
|
18
|
+
}
|
|
19
|
+
return (React.createElement(Box, { flexDirection: BoxFlexDirection.Row, alignItems: BoxAlignItems.Center, gap: 1, className: className },
|
|
20
|
+
React.createElement(IconAlert, { severity: severity, size: IconSize.Sm, "data-testid": "help-text-icon" }),
|
|
21
|
+
React.createElement(Text, { variant: TextVariant.BodySm, color: textColor, ...props }, children)));
|
|
22
|
+
};
|
|
13
23
|
//# sourceMappingURL=HelpText.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpText.mjs","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"HelpText.mjs","sourceRoot":"","sources":["../../../src/components/HelpText/HelpText.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,SAAS,EACT,WAAW,EACZ,uCAAuC;AACxC,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,GAAG,EAAE,yBAAe;AAC7B,OAAO,EAAE,SAAS,EAAE,+BAAqB;AACzC,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAE/B,OAAO,EAAE,2BAA2B,EAAE,iCAA6B;AAGnE,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,KAAK,GAAG,SAAS,CAAC,WAAW,EAC7B,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAE3E,IAAI,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,EAAE;QAC3B,OAAO,CACL,oBAAC,IAAI,IACH,OAAO,EAAE,WAAW,CAAC,MAAM,EAC3B,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,SAAS,KAChB,KAAK,IAER,QAAQ,CACJ,CACR,CAAC;KACH;IAED,OAAO,CACL,oBAAC,GAAG,IACF,aAAa,EAAE,gBAAgB,CAAC,GAAG,EACnC,UAAU,EAAE,aAAa,CAAC,MAAM,EAChC,GAAG,EAAE,CAAC,EACN,SAAS,EAAE,SAAS;QAEpB,oBAAC,SAAS,IACR,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,QAAQ,CAAC,EAAE,iBACL,gBAAgB,GAC5B;QACF,oBAAC,IAAI,IAAC,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,SAAS,KAAM,KAAK,IAC3D,QAAQ,CACJ,CACH,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxFlexDirection,\n IconSize,\n TextColor,\n TextVariant,\n} from '@metamask/design-system-shared';\nimport React from 'react';\n\nimport { Box } from '../Box';\nimport { IconAlert } from '../IconAlert';\nimport { Text } from '../Text';\n\nimport { MAP_HELPTEXT_SEVERITY_COLOR } from './HelpText.constants';\nimport type { HelpTextProps } from './HelpText.types';\n\nexport const HelpText: React.FC<HelpTextProps> = ({\n severity,\n showIcon = false,\n color = TextColor.TextDefault,\n className,\n children,\n ...props\n}) => {\n const textColor = severity ? MAP_HELPTEXT_SEVERITY_COLOR[severity] : color;\n\n if (!(showIcon && severity)) {\n return (\n <Text\n variant={TextVariant.BodySm}\n color={textColor}\n className={className}\n {...props}\n >\n {children}\n </Text>\n );\n }\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Center}\n gap={1}\n className={className}\n >\n <IconAlert\n severity={severity}\n size={IconSize.Sm}\n data-testid=\"help-text-icon\"\n />\n <Text variant={TextVariant.BodySm} color={textColor} {...props}>\n {children}\n </Text>\n </Box>\n );\n};\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.IconAlert = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const Icon_1 = require("../Icon/index.cjs");
|
|
9
|
+
const IconAlert_constants_1 = require("./IconAlert.constants.cjs");
|
|
10
|
+
const IconAlert = ({ severity, ...props }) => {
|
|
11
|
+
const { name, color } = IconAlert_constants_1.ICON_ALERT_SEVERITY_MAP[severity];
|
|
12
|
+
return react_1.default.createElement(Icon_1.Icon, { ...props, color: color, name: name });
|
|
13
|
+
};
|
|
14
|
+
exports.IconAlert = IconAlert;
|
|
15
|
+
exports.IconAlert.displayName = 'IconAlert';
|
|
16
|
+
//# sourceMappingURL=IconAlert.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,4CAA+B;AAE/B,mEAAgE;AAGzD,MAAM,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB,EAAE,EAAE;IAClE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,6CAAuB,CAAC,QAAQ,CAAC,CAAC;IAC1D,OAAO,8BAAC,WAAI,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;AACvD,CAAC,CAAC;AAHW,QAAA,SAAS,aAGpB;AAEF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import React from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { ICON_ALERT_SEVERITY_MAP } from './IconAlert.constants';\nimport type { IconAlertProps } from './IconAlert.types';\n\nexport const IconAlert = ({ severity, ...props }: IconAlertProps) => {\n const { name, color } = ICON_ALERT_SEVERITY_MAP[severity];\n return <Icon {...props} color={color} name={name} />;\n};\n\nIconAlert.displayName = 'IconAlert';\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ICON_ALERT_SEVERITY_MAP = void 0;
|
|
4
|
+
const design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
exports.ICON_ALERT_SEVERITY_MAP = {
|
|
6
|
+
[design_system_shared_1.IconAlertSeverity.Info]: {
|
|
7
|
+
name: design_system_shared_1.IconName.Info,
|
|
8
|
+
color: design_system_shared_1.IconColor.PrimaryDefault,
|
|
9
|
+
},
|
|
10
|
+
[design_system_shared_1.IconAlertSeverity.Success]: {
|
|
11
|
+
name: design_system_shared_1.IconName.Confirmation,
|
|
12
|
+
color: design_system_shared_1.IconColor.SuccessDefault,
|
|
13
|
+
},
|
|
14
|
+
[design_system_shared_1.IconAlertSeverity.Warning]: {
|
|
15
|
+
name: design_system_shared_1.IconName.Danger,
|
|
16
|
+
color: design_system_shared_1.IconColor.WarningDefault,
|
|
17
|
+
},
|
|
18
|
+
[design_system_shared_1.IconAlertSeverity.Danger]: {
|
|
19
|
+
name: design_system_shared_1.IconName.Error,
|
|
20
|
+
color: design_system_shared_1.IconColor.ErrorDefault,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=IconAlert.constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":";;;AAAA,yEAIwC;AAE3B,QAAA,uBAAuB,GAGhC;IACF,CAAC,wCAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,+BAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,+BAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,gCAAS,CAAC,cAAc;KAChC;IACD,CAAC,wCAAiB,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,EAAE,+BAAQ,CAAC,KAAK;QACpB,KAAK,EAAE,gCAAS,CAAC,YAAY;KAC9B;CACF,CAAC","sourcesContent":["import {\n IconAlertSeverity,\n IconColor,\n IconName,\n} from '@metamask/design-system-shared';\n\nexport const ICON_ALERT_SEVERITY_MAP: Record<\n IconAlertSeverity,\n { name: IconName; color: IconColor }\n> = {\n [IconAlertSeverity.Info]: {\n name: IconName.Info,\n color: IconColor.PrimaryDefault,\n },\n [IconAlertSeverity.Success]: {\n name: IconName.Confirmation,\n color: IconColor.SuccessDefault,\n },\n [IconAlertSeverity.Warning]: {\n name: IconName.Danger,\n color: IconColor.WarningDefault,\n },\n [IconAlertSeverity.Danger]: {\n name: IconName.Error,\n color: IconColor.ErrorDefault,\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.d.cts","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,uCAAuC;AAExC,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,iBAAiB,EACjB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAkBrC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.d.mts","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,uCAAuC;AAExC,eAAO,MAAM,uBAAuB,EAAE,MAAM,CAC1C,iBAAiB,EACjB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAkBrC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IconAlertSeverity, IconColor, IconName } from "@metamask/design-system-shared";
|
|
2
|
+
export const ICON_ALERT_SEVERITY_MAP = {
|
|
3
|
+
[IconAlertSeverity.Info]: {
|
|
4
|
+
name: IconName.Info,
|
|
5
|
+
color: IconColor.PrimaryDefault,
|
|
6
|
+
},
|
|
7
|
+
[IconAlertSeverity.Success]: {
|
|
8
|
+
name: IconName.Confirmation,
|
|
9
|
+
color: IconColor.SuccessDefault,
|
|
10
|
+
},
|
|
11
|
+
[IconAlertSeverity.Warning]: {
|
|
12
|
+
name: IconName.Danger,
|
|
13
|
+
color: IconColor.WarningDefault,
|
|
14
|
+
},
|
|
15
|
+
[IconAlertSeverity.Danger]: {
|
|
16
|
+
name: IconName.Error,
|
|
17
|
+
color: IconColor.ErrorDefault,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=IconAlert.constants.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACT,uCAAuC;AAExC,MAAM,CAAC,MAAM,uBAAuB,GAGhC;IACF,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE;QACxB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,YAAY;QAC3B,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,EAAE,QAAQ,CAAC,MAAM;QACrB,KAAK,EAAE,SAAS,CAAC,cAAc;KAChC;IACD,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE;QAC1B,IAAI,EAAE,QAAQ,CAAC,KAAK;QACpB,KAAK,EAAE,SAAS,CAAC,YAAY;KAC9B;CACF,CAAC","sourcesContent":["import {\n IconAlertSeverity,\n IconColor,\n IconName,\n} from '@metamask/design-system-shared';\n\nexport const ICON_ALERT_SEVERITY_MAP: Record<\n IconAlertSeverity,\n { name: IconName; color: IconColor }\n> = {\n [IconAlertSeverity.Info]: {\n name: IconName.Info,\n color: IconColor.PrimaryDefault,\n },\n [IconAlertSeverity.Success]: {\n name: IconName.Confirmation,\n color: IconColor.SuccessDefault,\n },\n [IconAlertSeverity.Warning]: {\n name: IconName.Danger,\n color: IconColor.WarningDefault,\n },\n [IconAlertSeverity.Danger]: {\n name: IconName.Error,\n color: IconColor.ErrorDefault,\n },\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.d.cts","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS;6BAA4B,cAAc;;CAG/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.d.mts","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc;AAK1B,OAAO,KAAK,EAAE,cAAc,EAAE,8BAA0B;AAExD,eAAO,MAAM,SAAS;6BAA4B,cAAc;;CAG/D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function $importDefault(module) {
|
|
2
|
+
if (module?.__esModule) {
|
|
3
|
+
return module.default;
|
|
4
|
+
}
|
|
5
|
+
return module;
|
|
6
|
+
}
|
|
7
|
+
import $React from "react";
|
|
8
|
+
const React = $importDefault($React);
|
|
9
|
+
import { Icon } from "../Icon/index.mjs";
|
|
10
|
+
import { ICON_ALERT_SEVERITY_MAP } from "./IconAlert.constants.mjs";
|
|
11
|
+
export const IconAlert = ({ severity, ...props }) => {
|
|
12
|
+
const { name, color } = ICON_ALERT_SEVERITY_MAP[severity];
|
|
13
|
+
return React.createElement(Icon, { ...props, color: color, name: name });
|
|
14
|
+
};
|
|
15
|
+
IconAlert.displayName = 'IconAlert';
|
|
16
|
+
//# sourceMappingURL=IconAlert.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,MAAK,cAAc;;AAE1B,OAAO,EAAE,IAAI,EAAE,0BAAgB;AAE/B,OAAO,EAAE,uBAAuB,EAAE,kCAA8B;AAGhE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAkB,EAAE,EAAE;IAClE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC1D,OAAO,oBAAC,IAAI,OAAK,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,CAAC;AACvD,CAAC,CAAC;AAEF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC","sourcesContent":["import React from 'react';\n\nimport { Icon } from '../Icon';\n\nimport { ICON_ALERT_SEVERITY_MAP } from './IconAlert.constants';\nimport type { IconAlertProps } from './IconAlert.types';\n\nexport const IconAlert = ({ severity, ...props }: IconAlertProps) => {\n const { name, color } = ICON_ALERT_SEVERITY_MAP[severity];\n return <Icon {...props} color={color} name={name} />;\n};\n\nIconAlert.displayName = 'IconAlert';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.types.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { IconAlertPropsShared } from '@metamask/design-system-shared';\n\nimport type { IconProps } from '../Icon';\n\nexport type IconAlertProps = IconAlertPropsShared &\n Omit<IconProps, 'name' | 'color' | keyof IconAlertPropsShared>;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IconAlertPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { IconProps } from "../Icon/index.cjs";
|
|
3
|
+
export type IconAlertProps = IconAlertPropsShared & Omit<IconProps, 'name' | 'color' | keyof IconAlertPropsShared>;
|
|
4
|
+
//# sourceMappingURL=IconAlert.types.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.types.d.cts","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uCAAuC;AAE3E,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IconAlertPropsShared } from "@metamask/design-system-shared";
|
|
2
|
+
import type { IconProps } from "../Icon/index.mjs";
|
|
3
|
+
export type IconAlertProps = IconAlertPropsShared & Omit<IconProps, 'name' | 'color' | keyof IconAlertPropsShared>;
|
|
4
|
+
//# sourceMappingURL=IconAlert.types.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.types.d.mts","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,uCAAuC;AAE3E,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAC/C,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,oBAAoB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconAlert.types.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/IconAlert.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { IconAlertPropsShared } from '@metamask/design-system-shared';\n\nimport type { IconProps } from '../Icon';\n\nexport type IconAlertProps = IconAlertPropsShared &\n Omit<IconProps, 'name' | 'color' | keyof IconAlertPropsShared>;\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IconAlert = exports.IconAlertSeverity = void 0;
|
|
4
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "IconAlertSeverity", { enumerable: true, get: function () { return design_system_shared_1.IconAlertSeverity; } });
|
|
6
|
+
var IconAlert_1 = require("./IconAlert.cjs");
|
|
7
|
+
Object.defineProperty(exports, "IconAlert", { enumerable: true, get: function () { return IconAlert_1.IconAlert; } });
|
|
8
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/IconAlert/index.ts"],"names":[],"mappings":";;;AAAA,uEAAmE;AAA1D,yHAAA,iBAAiB,OAAA;AAC1B,6CAAwC;AAA/B,sGAAA,SAAS,OAAA","sourcesContent":["export { IconAlertSeverity } from '@metamask/design-system-shared';\nexport { IconAlert } from './IconAlert';\nexport type { IconAlertProps } from './IconAlert.types';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/IconAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AACnE,OAAO,EAAE,SAAS,EAAE,wBAAoB;AACxC,YAAY,EAAE,cAAc,EAAE,8BAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/IconAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AACnE,OAAO,EAAE,SAAS,EAAE,wBAAoB;AACxC,YAAY,EAAE,cAAc,EAAE,8BAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/IconAlert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,uCAAuC;AACnE,OAAO,EAAE,SAAS,EAAE,wBAAoB","sourcesContent":["export { IconAlertSeverity } from '@metamask/design-system-shared';\nexport { IconAlert } from './IconAlert';\nexport type { IconAlertProps } from './IconAlert.types';\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.usePureBlack = exports.PureBlackProvider = exports.ToastSeverity = exports.toast = exports.Toaster = exports.Toast = void 0;
|
|
3
|
+
exports.HelpTextSeverity = exports.HelpText = exports.HeaderBase = exports.Checkbox = exports.ButtonIconVariant = exports.ButtonIconSize = exports.ButtonIcon = exports.ButtonBaseSize = exports.ButtonBase = exports.ButtonVariant = exports.ButtonSize = exports.Button = exports.Box = exports.BoxBorderColor = exports.BoxBackgroundColor = exports.BoxJustifyContent = exports.BoxAlignItems = exports.BoxFlexWrap = exports.BoxFlexDirection = exports.Blockies = exports.BannerBaseActionButtonLayout = exports.BannerBase = exports.BadgeWrapperPositionAnchorShape = exports.BadgeWrapperPosition = exports.BadgeWrapper = exports.BadgeStatusSize = exports.BadgeStatusStatus = exports.BadgeStatus = exports.BadgeNetwork = exports.BadgeIcon = exports.BadgeCountSize = exports.BadgeCount = exports.AvatarTokenSize = exports.AvatarToken = exports.AvatarNetworkSize = exports.AvatarNetwork = exports.AvatarIconSeverity = exports.AvatarIconSize = exports.AvatarIcon = exports.AvatarGroupVariant = exports.AvatarGroupSize = exports.AvatarGroup = exports.AvatarFaviconSize = exports.AvatarFavicon = exports.AvatarBaseShape = exports.AvatarBaseSize = exports.AvatarBase = exports.AvatarAccountVariant = exports.AvatarAccountSize = exports.AvatarAccount = void 0;
|
|
4
|
+
exports.TagSeverity = exports.Tag = exports.BannerAlertSeverity = exports.BannerAlert = exports.TextFieldSearch = exports.FormTextField = exports.TextFieldType = exports.TextFieldSize = exports.TextField = exports.TextButtonSize = exports.TextButton = exports.TextAreaResize = exports.TextArea = exports.OverflowWrap = exports.TextTransform = exports.FontStyle = exports.FontFamily = exports.FontWeight = exports.TextAlign = exports.TextColor = exports.TextVariant = exports.Text = exports.PopoverRole = exports.PopoverPosition = exports.Popover = exports.PopoverHeader = exports.SensitiveTextLength = exports.SensitiveText = exports.Skeleton = exports.MODAL_CONTENT_IGNORE_OUTSIDE_CLICK_ATTR = exports.ModalContentSize = exports.ModalContent = exports.useModalContext = exports.Modal = exports.ModalHeader = exports.ModalFooter = exports.ButtonsAlignment = exports.ModalFocus = exports.ModalBody = exports.ModalOverlay = exports.Maskicon = exports.Label = exports.Jazzicon = exports.Input = exports.IconAlertSeverity = exports.IconAlert = exports.IconColor = exports.IconSize = exports.IconName = exports.Icon = void 0;
|
|
5
|
+
exports.usePureBlack = exports.PureBlackProvider = exports.ToastSeverity = exports.toast = exports.Toaster = exports.Toast = exports.ButtonFilter = exports.ButtonHeroSize = exports.ButtonHero = void 0;
|
|
6
6
|
var AvatarAccount_1 = require("./AvatarAccount/index.cjs");
|
|
7
7
|
Object.defineProperty(exports, "AvatarAccount", { enumerable: true, get: function () { return AvatarAccount_1.AvatarAccount; } });
|
|
8
8
|
Object.defineProperty(exports, "AvatarAccountSize", { enumerable: true, get: function () { return AvatarAccount_1.AvatarAccountSize; } });
|
|
@@ -48,6 +48,7 @@ Object.defineProperty(exports, "BadgeWrapperPosition", { enumerable: true, get:
|
|
|
48
48
|
Object.defineProperty(exports, "BadgeWrapperPositionAnchorShape", { enumerable: true, get: function () { return BadgeWrapper_2.BadgeWrapperPositionAnchorShape; } });
|
|
49
49
|
var BannerBase_1 = require("./BannerBase/index.cjs");
|
|
50
50
|
Object.defineProperty(exports, "BannerBase", { enumerable: true, get: function () { return BannerBase_1.BannerBase; } });
|
|
51
|
+
Object.defineProperty(exports, "BannerBaseActionButtonLayout", { enumerable: true, get: function () { return BannerBase_1.BannerBaseActionButtonLayout; } });
|
|
51
52
|
var Blockies_1 = require("./temp-components/Blockies/index.cjs");
|
|
52
53
|
Object.defineProperty(exports, "Blockies", { enumerable: true, get: function () { return Blockies_1.Blockies; } });
|
|
53
54
|
var Box_1 = require("./Box/index.cjs");
|
|
@@ -83,6 +84,9 @@ var Icon_2 = require("./Icon/index.cjs");
|
|
|
83
84
|
Object.defineProperty(exports, "IconName", { enumerable: true, get: function () { return Icon_2.IconName; } });
|
|
84
85
|
Object.defineProperty(exports, "IconSize", { enumerable: true, get: function () { return Icon_2.IconSize; } });
|
|
85
86
|
Object.defineProperty(exports, "IconColor", { enumerable: true, get: function () { return Icon_2.IconColor; } });
|
|
87
|
+
var IconAlert_1 = require("./IconAlert/index.cjs");
|
|
88
|
+
Object.defineProperty(exports, "IconAlert", { enumerable: true, get: function () { return IconAlert_1.IconAlert; } });
|
|
89
|
+
Object.defineProperty(exports, "IconAlertSeverity", { enumerable: true, get: function () { return IconAlert_1.IconAlertSeverity; } });
|
|
86
90
|
var Input_1 = require("./Input/index.cjs");
|
|
87
91
|
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return Input_1.Input; } });
|
|
88
92
|
var Jazzicon_1 = require("./temp-components/Jazzicon/index.cjs");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;AAAA,2DAIyB;AAHvB,8GAAA,aAAa,OAAA;AACb,kHAAA,iBAAiB,OAAA;AACjB,qHAAA,oBAAoB,OAAA;AAItB,qDAA2E;AAAlE,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA;AAAE,6GAAA,eAAe,OAAA;AAGpD,2DAAmE;AAA1D,8GAAA,aAAa,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAGzC,uDAIuB;AAHrB,0GAAA,WAAW,OAAA;AACX,8GAAA,eAAe,OAAA;AACf,iHAAA,kBAAkB,OAAA;AAIpB,qDAA8E;AAArE,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AAGvD,2DAAmE;AAA1D,8GAAA,aAAa,OAAA;AAAE,kHAAA,iBAAiB,OAAA;AAGzC,uDAA6D;AAApD,0GAAA,WAAW,OAAA;AAAE,8GAAA,eAAe,OAAA;AAGrC,qDAA0C;AAAjC,wGAAA,UAAU,OAAA;AAEnB,qDAA8C;AAArC,4GAAA,cAAc,OAAA;AAEvB,mDAAwC;AAA/B,sGAAA,SAAS,OAAA;AAGlB,yDAA8C;AAArC,4GAAA,YAAY,OAAA;AAGrB,uDAA4C;AAAnC,0GAAA,WAAW,OAAA;AAEpB,uDAAmE;AAA1D,gHAAA,iBAAiB,OAAA;AAAE,8GAAA,eAAe,OAAA;AAE3C,yDAA8C;AAArC,4GAAA,YAAY,OAAA;AAErB,yDAGwB;AAFtB,oHAAA,oBAAoB,OAAA;AACpB,+HAAA,+BAA+B,OAAA;AAIjC,
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":";;;;;AAAA,2DAIyB;AAHvB,8GAAA,aAAa,OAAA;AACb,kHAAA,iBAAiB,OAAA;AACjB,qHAAA,oBAAoB,OAAA;AAItB,qDAA2E;AAAlE,wGAAA,UAAU,OAAA;A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AvC,8GAAA,aAAa,OAAA;AAGtB,+CAAkE;AAAzD,kGAAA,OAAO,OAAA;AAAE,0GAAA,eAAe,OAAA;AAAE,sGAAA,WAAW,OAAA;AAG9C,yCAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,yCASgB;AARd,mGAAA,WAAW,OAAA;AACX,iGAAA,SAAS,OAAA;AACT,iGAAA,SAAS,OAAA;AACT,kGAAA,UAAU,OAAA;AACV,kGAAA,UAAU,OAAA;AACV,iGAAA,SAAS,OAAA;AACT,qGAAA,aAAa,OAAA;AACb,oGAAA,YAAY,OAAA;AAId,iDAAsD;AAA7C,oGAAA,QAAQ,OAAA;AAAE,0GAAA,cAAc,OAAA;AAGjC,qDAA0D;AAAjD,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA;AAGnC,mDAAsE;AAA7D,sGAAA,SAAS,OAAA;AAAE,0GAAA,aAAa,OAAA;AAAE,0GAAA,aAAa,OAAA;AAGhD,2DAAgD;AAAvC,8GAAA,aAAa,OAAA;AAGtB,+DAAoD;AAA3C,kHAAA,eAAe,OAAA;AAGxB,uDAAiE;AAAxD,0GAAA,WAAW,OAAA;AAAE,kHAAA,mBAAmB,OAAA;AAGzC,uCAAyC;AAAhC,0FAAA,GAAG,OAAA;AAAE,kGAAA,WAAW,OAAA;AAGzB,qDAA0D;AAAjD,wGAAA,UAAU,OAAA;AAAE,4GAAA,cAAc,OAAA;AAGnC,yDAA8C;AAArC,4GAAA,YAAY,OAAA;AAGrB,2CAA+D;AAAtD,8FAAA,KAAK,OAAA;AAAE,gGAAA,OAAO,OAAA;AAAE,8FAAA,KAAK,OAAA;AAAE,sGAAA,aAAa,OAAA;AAG7C,mEAAsE;AAA7D,sHAAA,iBAAiB,OAAA;AAAE,iHAAA,YAAY,OAAA","sourcesContent":["export {\n AvatarAccount,\n AvatarAccountSize,\n AvatarAccountVariant,\n} from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount';\n\nexport { AvatarBase, AvatarBaseSize, AvatarBaseShape } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase';\n\nexport { AvatarFavicon, AvatarFaviconSize } from './AvatarFavicon';\nexport type { AvatarFaviconProps } from './AvatarFavicon';\n\nexport {\n AvatarGroup,\n AvatarGroupSize,\n AvatarGroupVariant,\n} from './AvatarGroup';\nexport type { AvatarGroupProps } from './AvatarGroup';\n\nexport { AvatarIcon, AvatarIconSize, AvatarIconSeverity } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon';\n\nexport { AvatarNetwork, AvatarNetworkSize } from './AvatarNetwork';\nexport type { AvatarNetworkProps } from './AvatarNetwork';\n\nexport { AvatarToken, AvatarTokenSize } from './AvatarToken';\nexport type { AvatarTokenProps } from './AvatarToken';\n\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount';\nexport { BadgeCountSize } from './BadgeCount';\n\nexport { BadgeIcon } from './BadgeIcon';\nexport type { BadgeIconProps } from './BadgeIcon';\n\nexport { BadgeNetwork } from './BadgeNetwork';\nexport type { BadgeNetworkProps } from './BadgeNetwork';\n\nexport { BadgeStatus } from './BadgeStatus';\nexport type { BadgeStatusProps } from './BadgeStatus';\nexport { BadgeStatusStatus, BadgeStatusSize } from './BadgeStatus';\n\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper';\nexport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from './BadgeWrapper';\nexport type { BadgeWrapperCustomPosition } from './BadgeWrapper';\n\nexport { BannerBase, BannerBaseActionButtonLayout } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase';\n\nexport { Blockies } from './temp-components/Blockies';\nexport type { BlockiesProps } from './temp-components/Blockies';\n\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n Box,\n} from './Box';\nexport type { BoxSpacing, BoxProps, BoxBorderWidth } from './Box';\n\nexport { Button, ButtonSize, ButtonVariant } from './Button';\nexport type { ButtonProps } from './Button';\n\nexport { ButtonBase } from './ButtonBase';\nexport type { ButtonBaseProps } from './ButtonBase';\nexport { ButtonBaseSize } from './ButtonBase';\n\nexport { ButtonIcon, ButtonIconSize, ButtonIconVariant } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon';\n\nexport { Checkbox } from './Checkbox';\nexport type { CheckboxProps } from './Checkbox';\n\nexport { HeaderBase } from './HeaderBase';\nexport type { HeaderBaseProps } from './HeaderBase';\n\nexport { HelpText, HelpTextSeverity } from './HelpText';\nexport type { HelpTextProps } from './HelpText';\n\nexport { Icon } from './Icon';\nexport { IconName, IconSize, IconColor } from './Icon';\nexport type { IconProps } from './Icon';\n\nexport { IconAlert, IconAlertSeverity } from './IconAlert';\nexport type { IconAlertProps } from './IconAlert';\n\nexport { Input } from './Input';\nexport type { InputProps } from './Input';\n\nexport { Jazzicon } from './temp-components/Jazzicon';\nexport type { JazziconProps } from './temp-components/Jazzicon';\n\nexport { Label } from './Label';\nexport type { LabelProps } from './Label';\n\nexport { Maskicon } from './temp-components/Maskicon';\nexport type { MaskiconProps } from './temp-components/Maskicon';\n\nexport { ModalOverlay } from './ModalOverlay';\nexport type { ModalOverlayProps } from './ModalOverlay';\nexport { ModalBody } from './ModalBody';\nexport type { ModalBodyProps } from './ModalBody';\nexport { ModalFocus } from './ModalFocus';\nexport type { FocusableElement, ModalFocusProps } from './ModalFocus';\nexport { ButtonsAlignment, ModalFooter } from './ModalFooter';\nexport type { ModalFooterButtonProps, ModalFooterProps } from './ModalFooter';\nexport { ModalHeader } from './ModalHeader';\nexport type { ModalHeaderProps } from './ModalHeader';\nexport { Modal, useModalContext } from './Modal';\nexport type { ModalContextType, ModalProps } from './Modal';\nexport {\n ModalContent,\n ModalContentSize,\n MODAL_CONTENT_IGNORE_OUTSIDE_CLICK_ATTR,\n} from './ModalContent';\nexport type { ModalContentProps } from './ModalContent';\n\nexport { Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton';\n\nexport { SensitiveText, SensitiveTextLength } from './SensitiveText';\nexport type { SensitiveTextProps } from './SensitiveText';\n\nexport { PopoverHeader } from './PopoverHeader';\nexport type { PopoverHeaderProps } from './PopoverHeader';\n\nexport { Popover, PopoverPosition, PopoverRole } from './Popover';\nexport type { PopoverProps } from './Popover';\n\nexport { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontFamily,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text';\nexport type { TextProps } from './Text';\n\nexport { TextArea, TextAreaResize } from './TextArea';\nexport type { TextAreaProps } from './TextArea';\n\nexport { TextButton, TextButtonSize } from './TextButton';\nexport type { TextButtonProps } from './TextButton';\n\nexport { TextField, TextFieldSize, TextFieldType } from './TextField';\nexport type { TextFieldProps } from './TextField';\n\nexport { FormTextField } from './FormTextField';\nexport type { FormTextFieldProps } from './FormTextField';\n\nexport { TextFieldSearch } from './TextFieldSearch';\nexport type { TextFieldSearchProps } from './TextFieldSearch';\n\nexport { BannerAlert, BannerAlertSeverity } from './BannerAlert';\nexport type { BannerAlertProps } from './BannerAlert';\n\nexport { Tag, TagSeverity } from './Tag';\nexport type { TagProps } from './Tag';\n\nexport { ButtonHero, ButtonHeroSize } from './ButtonHero';\nexport type { ButtonHeroProps } from './ButtonHero';\n\nexport { ButtonFilter } from './ButtonFilter';\nexport type { ButtonFilterProps } from './ButtonFilter';\n\nexport { Toast, Toaster, toast, ToastSeverity } from './Toast';\nexport type { ToastOptions, ToastProps, ToasterProps } from './Toast';\n\nexport { PureBlackProvider, usePureBlack } from './PureBlackProvider';\n"]}
|
|
@@ -26,7 +26,7 @@ export { BadgeWrapper } from "./BadgeWrapper/index.cjs";
|
|
|
26
26
|
export type { BadgeWrapperProps } from "./BadgeWrapper/index.cjs";
|
|
27
27
|
export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, } from "./BadgeWrapper/index.cjs";
|
|
28
28
|
export type { BadgeWrapperCustomPosition } from "./BadgeWrapper/index.cjs";
|
|
29
|
-
export { BannerBase } from "./BannerBase/index.cjs";
|
|
29
|
+
export { BannerBase, BannerBaseActionButtonLayout } from "./BannerBase/index.cjs";
|
|
30
30
|
export type { BannerBaseProps } from "./BannerBase/index.cjs";
|
|
31
31
|
export { Blockies } from "./temp-components/Blockies/index.cjs";
|
|
32
32
|
export type { BlockiesProps } from "./temp-components/Blockies/index.cjs";
|
|
@@ -48,6 +48,8 @@ export type { HelpTextProps } from "./HelpText/index.cjs";
|
|
|
48
48
|
export { Icon } from "./Icon/index.cjs";
|
|
49
49
|
export { IconName, IconSize, IconColor } from "./Icon/index.cjs";
|
|
50
50
|
export type { IconProps } from "./Icon/index.cjs";
|
|
51
|
+
export { IconAlert, IconAlertSeverity } from "./IconAlert/index.cjs";
|
|
52
|
+
export type { IconAlertProps } from "./IconAlert/index.cjs";
|
|
51
53
|
export { Input } from "./Input/index.cjs";
|
|
52
54
|
export type { InputProps } from "./Input/index.cjs";
|
|
53
55
|
export { Jazzicon } from "./temp-components/Jazzicon/index.cjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,kCAAwB;AACzB,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAC3E,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AACnE,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,GACnB,gCAAsB;AACvB,YAAY,EAAE,gBAAgB,EAAE,gCAAsB;AAEtD,OAAO,EAAE,UAAU,EAAE,cAAc,EA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AO,EAAE,QAAQ,EAAE,cAAc,EAAE,6BAAmB;AACtD,YAAY,EAAE,aAAa,EAAE,6BAAmB;AAEhD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAC1D,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,8BAAoB;AACtE,YAAY,EAAE,cAAc,EAAE,8BAAoB;AAElD,OAAO,EAAE,aAAa,EAAE,kCAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,eAAe,EAAE,oCAA0B;AACpD,YAAY,EAAE,oBAAoB,EAAE,oCAA0B;AAE9D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,gCAAsB;AACjE,YAAY,EAAE,gBAAgB,EAAE,gCAAsB;AAEtD,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,wBAAc;AACzC,YAAY,EAAE,QAAQ,EAAE,wBAAc;AAEtC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAC1D,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAAuB;AAExD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,0BAAgB;AAC/D,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAgB;AAEtE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,sCAA4B"}
|
|
@@ -26,7 +26,7 @@ export { BadgeWrapper } from "./BadgeWrapper/index.mjs";
|
|
|
26
26
|
export type { BadgeWrapperProps } from "./BadgeWrapper/index.mjs";
|
|
27
27
|
export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape, } from "./BadgeWrapper/index.mjs";
|
|
28
28
|
export type { BadgeWrapperCustomPosition } from "./BadgeWrapper/index.mjs";
|
|
29
|
-
export { BannerBase } from "./BannerBase/index.mjs";
|
|
29
|
+
export { BannerBase, BannerBaseActionButtonLayout } from "./BannerBase/index.mjs";
|
|
30
30
|
export type { BannerBaseProps } from "./BannerBase/index.mjs";
|
|
31
31
|
export { Blockies } from "./temp-components/Blockies/index.mjs";
|
|
32
32
|
export type { BlockiesProps } from "./temp-components/Blockies/index.mjs";
|
|
@@ -48,6 +48,8 @@ export type { HelpTextProps } from "./HelpText/index.mjs";
|
|
|
48
48
|
export { Icon } from "./Icon/index.mjs";
|
|
49
49
|
export { IconName, IconSize, IconColor } from "./Icon/index.mjs";
|
|
50
50
|
export type { IconProps } from "./Icon/index.mjs";
|
|
51
|
+
export { IconAlert, IconAlertSeverity } from "./IconAlert/index.mjs";
|
|
52
|
+
export type { IconAlertProps } from "./IconAlert/index.mjs";
|
|
51
53
|
export { Input } from "./Input/index.mjs";
|
|
52
54
|
export type { InputProps } from "./Input/index.mjs";
|
|
53
55
|
export { Jazzicon } from "./temp-components/Jazzicon/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,kCAAwB;AACzB,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAC3E,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AACnE,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,GACnB,gCAAsB;AACvB,YAAY,EAAE,gBAAgB,EAAE,gCAAsB;AAEtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,+BAAqB;AAC9E,YAAY,EAAE,eA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,YAAY,EAAE,aAAa,EAAE,6BAAmB;AAEhD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAC1D,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,8BAAoB;AACtE,YAAY,EAAE,cAAc,EAAE,8BAAoB;AAElD,OAAO,EAAE,aAAa,EAAE,kCAAwB;AAChD,YAAY,EAAE,kBAAkB,EAAE,kCAAwB;AAE1D,OAAO,EAAE,eAAe,EAAE,oCAA0B;AACpD,YAAY,EAAE,oBAAoB,EAAE,oCAA0B;AAE9D,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,gCAAsB;AACjE,YAAY,EAAE,gBAAgB,EAAE,gCAAsB;AAEtD,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,wBAAc;AACzC,YAAY,EAAE,QAAQ,EAAE,wBAAc;AAEtC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAC1D,YAAY,EAAE,eAAe,EAAE,+BAAqB;AAEpD,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAC9C,YAAY,EAAE,iBAAiB,EAAE,iCAAuB;AAExD,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,0BAAgB;AAC/D,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,0BAAgB;AAEtE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,sCAA4B"}
|
|
@@ -13,7 +13,7 @@ export { BadgeStatus } from "./BadgeStatus/index.mjs";
|
|
|
13
13
|
export { BadgeStatusStatus, BadgeStatusSize } from "./BadgeStatus/index.mjs";
|
|
14
14
|
export { BadgeWrapper } from "./BadgeWrapper/index.mjs";
|
|
15
15
|
export { BadgeWrapperPosition, BadgeWrapperPositionAnchorShape } from "./BadgeWrapper/index.mjs";
|
|
16
|
-
export { BannerBase } from "./BannerBase/index.mjs";
|
|
16
|
+
export { BannerBase, BannerBaseActionButtonLayout } from "./BannerBase/index.mjs";
|
|
17
17
|
export { Blockies } from "./temp-components/Blockies/index.mjs";
|
|
18
18
|
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, Box } from "./Box/index.mjs";
|
|
19
19
|
export { Button, ButtonSize, ButtonVariant } from "./Button/index.mjs";
|
|
@@ -25,6 +25,7 @@ export { HeaderBase } from "./HeaderBase/index.mjs";
|
|
|
25
25
|
export { HelpText, HelpTextSeverity } from "./HelpText/index.mjs";
|
|
26
26
|
export { Icon } from "./Icon/index.mjs";
|
|
27
27
|
export { IconName, IconSize, IconColor } from "./Icon/index.mjs";
|
|
28
|
+
export { IconAlert, IconAlertSeverity } from "./IconAlert/index.mjs";
|
|
28
29
|
export { Input } from "./Input/index.mjs";
|
|
29
30
|
export { Jazzicon } from "./temp-components/Jazzicon/index.mjs";
|
|
30
31
|
export { Label } from "./Label/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACrB,kCAAwB;AAGzB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,+BAAqB;AAG3E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AAGnE,OAAO,EACL,WAAW,EACX,eAAe,EACf,kBAAkB,EACnB,gCAAsB;AAGvB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,kBAAkB,EAAE,+BAAqB;AAG9E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,kCAAwB;AAGnE,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,gCAAsB;AAG7D,OAAO,EAAE,UAAU,EAAE,+BAAqB;AAE1C,OAAO,EAAE,cAAc,EAAE,+BAAqB;AAE9C,OAAO,EAAE,SAAS,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hD,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,4BAAkB;AAGlE,OAAO,EAAE,IAAI,EAAE,yBAAe;AAC9B,OAAO,EACL,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,UAAU,EACV,SAAS,EACT,aAAa,EACb,YAAY,EACb,yBAAe;AAGhB,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,6BAAmB;AAGtD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAG1D,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,8BAAoB;AAGtE,OAAO,EAAE,aAAa,EAAE,kCAAwB;AAGhD,OAAO,EAAE,eAAe,EAAE,oCAA0B;AAGpD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,gCAAsB;AAGjE,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,wBAAc;AAGzC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,+BAAqB;AAG1D,OAAO,EAAE,YAAY,EAAE,iCAAuB;AAG9C,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,0BAAgB;AAG/D,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,sCAA4B","sourcesContent":["export {\n AvatarAccount,\n AvatarAccountSize,\n AvatarAccountVariant,\n} from './AvatarAccount';\nexport type { AvatarAccountProps } from './AvatarAccount';\n\nexport { AvatarBase, AvatarBaseSize, AvatarBaseShape } from './AvatarBase';\nexport type { AvatarBaseProps } from './AvatarBase';\n\nexport { AvatarFavicon, AvatarFaviconSize } from './AvatarFavicon';\nexport type { AvatarFaviconProps } from './AvatarFavicon';\n\nexport {\n AvatarGroup,\n AvatarGroupSize,\n AvatarGroupVariant,\n} from './AvatarGroup';\nexport type { AvatarGroupProps } from './AvatarGroup';\n\nexport { AvatarIcon, AvatarIconSize, AvatarIconSeverity } from './AvatarIcon';\nexport type { AvatarIconProps } from './AvatarIcon';\n\nexport { AvatarNetwork, AvatarNetworkSize } from './AvatarNetwork';\nexport type { AvatarNetworkProps } from './AvatarNetwork';\n\nexport { AvatarToken, AvatarTokenSize } from './AvatarToken';\nexport type { AvatarTokenProps } from './AvatarToken';\n\nexport { BadgeCount } from './BadgeCount';\nexport type { BadgeCountProps } from './BadgeCount';\nexport { BadgeCountSize } from './BadgeCount';\n\nexport { BadgeIcon } from './BadgeIcon';\nexport type { BadgeIconProps } from './BadgeIcon';\n\nexport { BadgeNetwork } from './BadgeNetwork';\nexport type { BadgeNetworkProps } from './BadgeNetwork';\n\nexport { BadgeStatus } from './BadgeStatus';\nexport type { BadgeStatusProps } from './BadgeStatus';\nexport { BadgeStatusStatus, BadgeStatusSize } from './BadgeStatus';\n\nexport { BadgeWrapper } from './BadgeWrapper';\nexport type { BadgeWrapperProps } from './BadgeWrapper';\nexport {\n BadgeWrapperPosition,\n BadgeWrapperPositionAnchorShape,\n} from './BadgeWrapper';\nexport type { BadgeWrapperCustomPosition } from './BadgeWrapper';\n\nexport { BannerBase, BannerBaseActionButtonLayout } from './BannerBase';\nexport type { BannerBaseProps } from './BannerBase';\n\nexport { Blockies } from './temp-components/Blockies';\nexport type { BlockiesProps } from './temp-components/Blockies';\n\nexport {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n Box,\n} from './Box';\nexport type { BoxSpacing, BoxProps, BoxBorderWidth } from './Box';\n\nexport { Button, ButtonSize, ButtonVariant } from './Button';\nexport type { ButtonProps } from './Button';\n\nexport { ButtonBase } from './ButtonBase';\nexport type { ButtonBaseProps } from './ButtonBase';\nexport { ButtonBaseSize } from './ButtonBase';\n\nexport { ButtonIcon, ButtonIconSize, ButtonIconVariant } from './ButtonIcon';\nexport type { ButtonIconProps } from './ButtonIcon';\n\nexport { Checkbox } from './Checkbox';\nexport type { CheckboxProps } from './Checkbox';\n\nexport { HeaderBase } from './HeaderBase';\nexport type { HeaderBaseProps } from './HeaderBase';\n\nexport { HelpText, HelpTextSeverity } from './HelpText';\nexport type { HelpTextProps } from './HelpText';\n\nexport { Icon } from './Icon';\nexport { IconName, IconSize, IconColor } from './Icon';\nexport type { IconProps } from './Icon';\n\nexport { IconAlert, IconAlertSeverity } from './IconAlert';\nexport type { IconAlertProps } from './IconAlert';\n\nexport { Input } from './Input';\nexport type { InputProps } from './Input';\n\nexport { Jazzicon } from './temp-components/Jazzicon';\nexport type { JazziconProps } from './temp-components/Jazzicon';\n\nexport { Label } from './Label';\nexport type { LabelProps } from './Label';\n\nexport { Maskicon } from './temp-components/Maskicon';\nexport type { MaskiconProps } from './temp-components/Maskicon';\n\nexport { ModalOverlay } from './ModalOverlay';\nexport type { ModalOverlayProps } from './ModalOverlay';\nexport { ModalBody } from './ModalBody';\nexport type { ModalBodyProps } from './ModalBody';\nexport { ModalFocus } from './ModalFocus';\nexport type { FocusableElement, ModalFocusProps } from './ModalFocus';\nexport { ButtonsAlignment, ModalFooter } from './ModalFooter';\nexport type { ModalFooterButtonProps, ModalFooterProps } from './ModalFooter';\nexport { ModalHeader } from './ModalHeader';\nexport type { ModalHeaderProps } from './ModalHeader';\nexport { Modal, useModalContext } from './Modal';\nexport type { ModalContextType, ModalProps } from './Modal';\nexport {\n ModalContent,\n ModalContentSize,\n MODAL_CONTENT_IGNORE_OUTSIDE_CLICK_ATTR,\n} from './ModalContent';\nexport type { ModalContentProps } from './ModalContent';\n\nexport { Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton';\n\nexport { SensitiveText, SensitiveTextLength } from './SensitiveText';\nexport type { SensitiveTextProps } from './SensitiveText';\n\nexport { PopoverHeader } from './PopoverHeader';\nexport type { PopoverHeaderProps } from './PopoverHeader';\n\nexport { Popover, PopoverPosition, PopoverRole } from './Popover';\nexport type { PopoverProps } from './Popover';\n\nexport { Text } from './Text';\nexport {\n TextVariant,\n TextColor,\n TextAlign,\n FontWeight,\n FontFamily,\n FontStyle,\n TextTransform,\n OverflowWrap,\n} from './Text';\nexport type { TextProps } from './Text';\n\nexport { TextArea, TextAreaResize } from './TextArea';\nexport type { TextAreaProps } from './TextArea';\n\nexport { TextButton, TextButtonSize } from './TextButton';\nexport type { TextButtonProps } from './TextButton';\n\nexport { TextField, TextFieldSize, TextFieldType } from './TextField';\nexport type { TextFieldProps } from './TextField';\n\nexport { FormTextField } from './FormTextField';\nexport type { FormTextFieldProps } from './FormTextField';\n\nexport { TextFieldSearch } from './TextFieldSearch';\nexport type { TextFieldSearchProps } from './TextFieldSearch';\n\nexport { BannerAlert, BannerAlertSeverity } from './BannerAlert';\nexport type { BannerAlertProps } from './BannerAlert';\n\nexport { Tag, TagSeverity } from './Tag';\nexport type { TagProps } from './Tag';\n\nexport { ButtonHero, ButtonHeroSize } from './ButtonHero';\nexport type { ButtonHeroProps } from './ButtonHero';\n\nexport { ButtonFilter } from './ButtonFilter';\nexport type { ButtonFilterProps } from './ButtonFilter';\n\nexport { Toast, Toaster, toast, ToastSeverity } from './Toast';\nexport type { ToastOptions, ToastProps, ToasterProps } from './Toast';\n\nexport { PureBlackProvider, usePureBlack } from './PureBlackProvider';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@metamask/design-system-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.0",
|
|
4
4
|
"description": "Design system react ui components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"MetaMask",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@floating-ui/react-dom": "^2.1.2",
|
|
51
|
-
"@metamask/design-system-shared": "^0.
|
|
51
|
+
"@metamask/design-system-shared": "^0.31.0",
|
|
52
52
|
"@metamask/jazzicon": "^2.0.0",
|
|
53
53
|
"@radix-ui/react-slot": "^1.1.0",
|
|
54
54
|
"blo": "^2.0.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"tailwind-merge": "^2.0.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@figma/code-connect": "^1.4.
|
|
59
|
+
"@figma/code-connect": "^1.4.9",
|
|
60
60
|
"@jest/globals": "^29.7.0",
|
|
61
61
|
"@metamask/auto-changelog": "^6.1.1",
|
|
62
62
|
"@metamask/design-system-tailwind-preset": "^0.10.0",
|