@metamask-previews/design-system-react-native 0.14.0-preview.4ce710b → 0.15.0-preview.a73a010
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 +13 -1
- package/dist/components/BannerAlert/BannerAlert.constants.cjs +8 -8
- package/dist/components/BannerAlert/BannerAlert.constants.cjs.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.cts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.d.mts.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.constants.mjs +2 -2
- package/dist/components/BannerAlert/BannerAlert.constants.mjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.cjs +4 -4
- package/dist/components/BannerBase/BannerBase.cjs.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.cts.map +1 -1
- package/dist/components/BannerBase/BannerBase.d.mts.map +1 -1
- package/dist/components/BannerBase/BannerBase.mjs +2 -2
- package/dist/components/BannerBase/BannerBase.mjs.map +1 -1
- package/dist/components/Box/Box.constants.cjs.map +1 -1
- package/dist/components/Box/Box.constants.d.cts +1 -1
- package/dist/components/Box/Box.constants.d.cts.map +1 -1
- package/dist/components/Box/Box.constants.d.mts +1 -1
- package/dist/components/Box/Box.constants.d.mts.map +1 -1
- package/dist/components/Box/Box.constants.mjs.map +1 -1
- package/dist/components/Box/Box.types.cjs.map +1 -1
- package/dist/components/Box/Box.types.d.cts +3 -107
- package/dist/components/Box/Box.types.d.cts.map +1 -1
- package/dist/components/Box/Box.types.d.mts +3 -107
- package/dist/components/Box/Box.types.d.mts.map +1 -1
- package/dist/components/Box/Box.types.mjs.map +1 -1
- package/dist/components/Box/index.cjs +7 -7
- package/dist/components/Box/index.cjs.map +1 -1
- package/dist/components/Box/index.d.cts +1 -2
- package/dist/components/Box/index.d.cts.map +1 -1
- package/dist/components/Box/index.d.mts +1 -2
- package/dist/components/Box/index.d.mts.map +1 -1
- package/dist/components/Box/index.mjs +1 -1
- package/dist/components/Box/index.mjs.map +1 -1
- package/dist/components/BoxHorizontal/BoxHorizontal.cjs +2 -2
- package/dist/components/BoxHorizontal/BoxHorizontal.cjs.map +1 -1
- package/dist/components/BoxHorizontal/BoxHorizontal.d.cts.map +1 -1
- package/dist/components/BoxHorizontal/BoxHorizontal.d.mts.map +1 -1
- package/dist/components/BoxHorizontal/BoxHorizontal.mjs +1 -1
- package/dist/components/BoxHorizontal/BoxHorizontal.mjs.map +1 -1
- package/dist/components/BoxVertical/BoxVertical.cjs +2 -2
- package/dist/components/BoxVertical/BoxVertical.cjs.map +1 -1
- package/dist/components/BoxVertical/BoxVertical.d.cts.map +1 -1
- package/dist/components/BoxVertical/BoxVertical.d.mts.map +1 -1
- package/dist/components/BoxVertical/BoxVertical.mjs +1 -1
- package/dist/components/BoxVertical/BoxVertical.mjs.map +1 -1
- package/dist/components/Icon/Icon.assets.cjs +2 -0
- package/dist/components/Icon/Icon.assets.cjs.map +1 -1
- package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
- package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
- package/dist/components/Icon/Icon.assets.mjs +2 -0
- package/dist/components/Icon/Icon.assets.mjs.map +1 -1
- package/dist/components/Icon/assets/no-photography.svg +1 -0
- package/dist/components/Input/Input.cjs +3 -3
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.constants.cjs +15 -15
- package/dist/components/Input/Input.constants.cjs.map +1 -1
- package/dist/components/Input/Input.constants.d.cts +1 -1
- package/dist/components/Input/Input.constants.d.cts.map +1 -1
- package/dist/components/Input/Input.constants.d.mts +1 -1
- package/dist/components/Input/Input.constants.d.mts.map +1 -1
- package/dist/components/Input/Input.constants.mjs +1 -1
- package/dist/components/Input/Input.constants.mjs.map +1 -1
- package/dist/components/Input/Input.d.cts +1 -1
- package/dist/components/Input/Input.d.cts.map +1 -1
- package/dist/components/Input/Input.d.mts +1 -1
- package/dist/components/Input/Input.d.mts.map +1 -1
- package/dist/components/Input/Input.mjs +1 -1
- package/dist/components/Input/Input.mjs.map +1 -1
- package/dist/components/Input/Input.types.cjs.map +1 -1
- package/dist/components/Input/Input.types.d.cts +1 -1
- package/dist/components/Input/Input.types.d.cts.map +1 -1
- package/dist/components/Input/Input.types.d.mts +1 -1
- package/dist/components/Input/Input.types.d.mts.map +1 -1
- package/dist/components/Input/Input.types.mjs.map +1 -1
- package/dist/components/KeyValueColumn/KeyValueColumn.cjs +43 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.cjs.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.d.cts +7 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.d.cts.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.d.mts +7 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.d.mts.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs +43 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.mjs.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs +3 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.cjs.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts +17 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.d.cts.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts +17 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.d.mts.map +1 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs +2 -0
- package/dist/components/KeyValueColumn/KeyValueColumn.types.mjs.map +1 -0
- package/dist/components/KeyValueColumn/index.cjs +6 -0
- package/dist/components/KeyValueColumn/index.cjs.map +1 -0
- package/dist/components/KeyValueColumn/index.d.cts +3 -0
- package/dist/components/KeyValueColumn/index.d.cts.map +1 -0
- package/dist/components/KeyValueColumn/index.d.mts +3 -0
- package/dist/components/KeyValueColumn/index.d.mts.map +1 -0
- package/dist/components/KeyValueColumn/index.mjs +2 -0
- package/dist/components/KeyValueColumn/index.mjs.map +1 -0
- package/dist/components/Text/Text.cjs +4 -4
- package/dist/components/Text/Text.cjs.map +1 -1
- package/dist/components/Text/Text.constants.cjs +23 -18
- package/dist/components/Text/Text.constants.cjs.map +1 -1
- package/dist/components/Text/Text.constants.d.cts +1 -1
- package/dist/components/Text/Text.constants.d.cts.map +1 -1
- package/dist/components/Text/Text.constants.d.mts +1 -1
- package/dist/components/Text/Text.constants.d.mts.map +1 -1
- package/dist/components/Text/Text.constants.mjs +20 -15
- package/dist/components/Text/Text.constants.mjs.map +1 -1
- package/dist/components/Text/Text.d.cts.map +1 -1
- package/dist/components/Text/Text.d.mts.map +1 -1
- package/dist/components/Text/Text.mjs +1 -1
- package/dist/components/Text/Text.mjs.map +1 -1
- package/dist/components/Text/Text.types.cjs.map +1 -1
- package/dist/components/Text/Text.types.d.cts +35 -3
- package/dist/components/Text/Text.types.d.cts.map +1 -1
- package/dist/components/Text/Text.types.d.mts +35 -3
- package/dist/components/Text/Text.types.d.mts.map +1 -1
- package/dist/components/Text/Text.types.mjs.map +1 -1
- package/dist/components/Text/index.cjs +7 -7
- package/dist/components/Text/index.cjs.map +1 -1
- package/dist/components/Text/index.d.cts +1 -1
- package/dist/components/Text/index.d.cts.map +1 -1
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/Text/index.d.mts.map +1 -1
- package/dist/components/Text/index.mjs +1 -1
- package/dist/components/Text/index.mjs.map +1 -1
- package/dist/components/TextButton/TextButton.cjs +3 -3
- package/dist/components/TextButton/TextButton.cjs.map +1 -1
- package/dist/components/TextButton/TextButton.d.cts.map +1 -1
- package/dist/components/TextButton/TextButton.d.mts.map +1 -1
- package/dist/components/TextButton/TextButton.mjs +1 -1
- package/dist/components/TextButton/TextButton.mjs.map +1 -1
- package/dist/components/TextField/TextField.cjs +2 -2
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.d.cts.map +1 -1
- package/dist/components/TextField/TextField.d.mts.map +1 -1
- package/dist/components/TextField/TextField.mjs +1 -1
- package/dist/components/TextField/TextField.mjs.map +1 -1
- package/dist/components/index.cjs +4 -2
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +2 -0
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +2 -0
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs +1 -0
- package/dist/components/index.mjs.map +1 -1
- package/dist/types/index.cjs +109 -173
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +99 -174
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +99 -174
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +108 -172
- package/dist/types/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.15.0]
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added `NoPhotography` icon ([#1056](https://github.com/MetaMask/metamask-design-system/pull/1056))
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **BREAKING:** Updated `IconSize` underlying string values to semantic t-shirt size tokens; normal use is unaffected ([#1049](https://github.com/MetaMask/metamask-design-system/pull/1049))
|
|
19
|
+
- **BREAKING:** Updated `AvatarToken` and `AvatarAccount` exports to use shared const-object + string-union types (ADR-0003/ADR-0004); normal use is unaffected ([#1009](https://github.com/MetaMask/metamask-design-system/pull/1009), [#1015](https://github.com/MetaMask/metamask-design-system/pull/1015))
|
|
20
|
+
|
|
10
21
|
## [0.14.0]
|
|
11
22
|
|
|
12
23
|
### Added
|
|
@@ -288,7 +299,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
288
299
|
- Full TypeScript support with type definitions and enums
|
|
289
300
|
- React Native integration with TWRNC preset support
|
|
290
301
|
|
|
291
|
-
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.
|
|
302
|
+
[Unreleased]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.15.0...HEAD
|
|
303
|
+
[0.15.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.14.0...@metamask/design-system-react-native@0.15.0
|
|
292
304
|
[0.14.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.13.0...@metamask/design-system-react-native@0.14.0
|
|
293
305
|
[0.13.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.12.0...@metamask/design-system-react-native@0.13.0
|
|
294
306
|
[0.12.0]: https://github.com/MetaMask/metamask-design-system/compare/@metamask/design-system-react-native@0.11.0...@metamask/design-system-react-native@0.12.0
|
|
@@ -16,15 +16,15 @@ exports.MAP_BANNER_ALERT_SEVERITY_ICON_COLOR = {
|
|
|
16
16
|
danger: types_1.IconColor.ErrorDefault,
|
|
17
17
|
};
|
|
18
18
|
exports.MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR = {
|
|
19
|
-
info:
|
|
20
|
-
success:
|
|
21
|
-
warning:
|
|
22
|
-
danger:
|
|
19
|
+
info: design_system_shared_1.BoxBackgroundColor.PrimaryMuted,
|
|
20
|
+
success: design_system_shared_1.BoxBackgroundColor.SuccessMuted,
|
|
21
|
+
warning: design_system_shared_1.BoxBackgroundColor.WarningMuted,
|
|
22
|
+
danger: design_system_shared_1.BoxBackgroundColor.ErrorMuted,
|
|
23
23
|
};
|
|
24
24
|
exports.MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR = {
|
|
25
|
-
info:
|
|
26
|
-
success:
|
|
27
|
-
warning:
|
|
28
|
-
danger:
|
|
25
|
+
info: design_system_shared_1.BoxBorderColor.PrimaryDefault,
|
|
26
|
+
success: design_system_shared_1.BoxBorderColor.SuccessDefault,
|
|
27
|
+
warning: design_system_shared_1.BoxBorderColor.WarningDefault,
|
|
28
|
+
danger: design_system_shared_1.BoxBorderColor.ErrorDefault,
|
|
29
29
|
};
|
|
30
30
|
//# sourceMappingURL=BannerAlert.constants.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.cjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":";;;AAAA,kFAIiD;AAEjD,iDAAkD;AAErC,QAAA,mCAAmC,GAG5C;IACF,IAAI,EAAE,gBAAQ,CAAC,IAAI;IACnB,OAAO,EAAE,gBAAQ,CAAC,YAAY;IAC9B,OAAO,EAAE,gBAAQ,CAAC,MAAM;IACxB,MAAM,EAAE,gBAAQ,CAAC,MAAM;CACxB,CAAC;AAEW,QAAA,oCAAoC,GAG7C;IACF,IAAI,EAAE,iBAAS,CAAC,cAAc;IAC9B,OAAO,EAAE,iBAAS,CAAC,cAAc;IACjC,OAAO,EAAE,iBAAS,CAAC,cAAc;IACjC,MAAM,EAAE,iBAAS,CAAC,YAAY;CAC/B,CAAC;AAEW,QAAA,0CAA0C,GAGnD;IACF,IAAI,EAAE,yCAAkB,CAAC,YAAY;IACrC,OAAO,EAAE,yCAAkB,CAAC,YAAY;IACxC,OAAO,EAAE,yCAAkB,CAAC,YAAY;IACxC,MAAM,EAAE,yCAAkB,CAAC,UAAU;CACtC,CAAC;AAEW,QAAA,sCAAsC,GAG/C;IACF,IAAI,EAAE,qCAAc,CAAC,cAAc;IACnC,OAAO,EAAE,qCAAc,CAAC,cAAc;IACtC,OAAO,EAAE,qCAAc,CAAC,cAAc;IACtC,MAAM,EAAE,qCAAc,CAAC,YAAY;CACpC,CAAC","sourcesContent":["import {\n BannerAlertSeverity,\n BoxBackgroundColor,\n BoxBorderColor,\n} from '@metamask-previews/design-system-shared';\n\nimport { IconColor, IconName } from '../../types';\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconName\n> = {\n info: IconName.Info,\n success: IconName.Confirmation,\n warning: IconName.Danger,\n danger: IconName.Danger,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconColor\n> = {\n info: IconColor.PrimaryDefault,\n success: IconColor.SuccessDefault,\n warning: IconColor.WarningDefault,\n danger: IconColor.ErrorDefault,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBackgroundColor\n> = {\n info: BoxBackgroundColor.PrimaryMuted,\n success: BoxBackgroundColor.SuccessMuted,\n warning: BoxBackgroundColor.WarningMuted,\n danger: BoxBackgroundColor.ErrorMuted,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBorderColor\n> = {\n info: BoxBorderColor.PrimaryDefault,\n success: BoxBorderColor.SuccessDefault,\n warning: BoxBorderColor.WarningDefault,\n danger: BoxBorderColor.ErrorDefault,\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
|
|
2
|
-
import {
|
|
1
|
+
import { BannerAlertSeverity, BoxBackgroundColor, BoxBorderColor } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import { IconColor, IconName } from "../../types/index.cjs";
|
|
3
3
|
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
|
|
4
4
|
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
|
|
5
5
|
export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAlert.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.d.cts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACf,gDAAgD;AAEjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,8BAAoB;AAElD,eAAO,MAAM,mCAAmC,EAAE,MAAM,CACtD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,QAAQ,CAMT,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,SAAS,CAMV,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAC7D,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,kBAAkB,CAMnB,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CACzD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,cAAc,CAMf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
|
|
2
|
-
import {
|
|
1
|
+
import { BannerAlertSeverity, BoxBackgroundColor, BoxBorderColor } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import { IconColor, IconName } from "../../types/index.mjs";
|
|
3
3
|
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconName>;
|
|
4
4
|
export declare const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], IconColor>;
|
|
5
5
|
export declare const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<(typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity], BoxBackgroundColor>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAlert.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.d.mts","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACf,gDAAgD;AAEjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,8BAAoB;AAElD,eAAO,MAAM,mCAAmC,EAAE,MAAM,CACtD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,QAAQ,CAMT,CAAC;AAEF,eAAO,MAAM,oCAAoC,EAAE,MAAM,CACvD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,SAAS,CAMV,CAAC;AAEF,eAAO,MAAM,0CAA0C,EAAE,MAAM,CAC7D,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,kBAAkB,CAMnB,CAAC;AAEF,eAAO,MAAM,sCAAsC,EAAE,MAAM,CACzD,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,EAC9D,cAAc,CAMf,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BannerAlertSeverity } from "@metamask-previews/design-system-shared";
|
|
2
|
-
import {
|
|
1
|
+
import { BannerAlertSeverity, BoxBackgroundColor, BoxBorderColor } from "@metamask-previews/design-system-shared";
|
|
2
|
+
import { IconColor, IconName } from "../../types/index.mjs";
|
|
3
3
|
export const MAP_BANNER_ALERT_SEVERITY_ICON_NAME = {
|
|
4
4
|
info: IconName.Info,
|
|
5
5
|
success: IconName.Confirmation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BannerAlert.constants.mjs","sourceRoot":"","sources":["../../../src/components/BannerAlert/BannerAlert.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACf,gDAAgD;AAEjD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,8BAAoB;AAElD,MAAM,CAAC,MAAM,mCAAmC,GAG5C;IACF,IAAI,EAAE,QAAQ,CAAC,IAAI;IACnB,OAAO,EAAE,QAAQ,CAAC,YAAY;IAC9B,OAAO,EAAE,QAAQ,CAAC,MAAM;IACxB,MAAM,EAAE,QAAQ,CAAC,MAAM;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAG7C;IACF,IAAI,EAAE,SAAS,CAAC,cAAc;IAC9B,OAAO,EAAE,SAAS,CAAC,cAAc;IACjC,OAAO,EAAE,SAAS,CAAC,cAAc;IACjC,MAAM,EAAE,SAAS,CAAC,YAAY;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,0CAA0C,GAGnD;IACF,IAAI,EAAE,kBAAkB,CAAC,YAAY;IACrC,OAAO,EAAE,kBAAkB,CAAC,YAAY;IACxC,OAAO,EAAE,kBAAkB,CAAC,YAAY;IACxC,MAAM,EAAE,kBAAkB,CAAC,UAAU;CACtC,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAG/C;IACF,IAAI,EAAE,cAAc,CAAC,cAAc;IACnC,OAAO,EAAE,cAAc,CAAC,cAAc;IACtC,OAAO,EAAE,cAAc,CAAC,cAAc;IACtC,MAAM,EAAE,cAAc,CAAC,YAAY;CACpC,CAAC","sourcesContent":["import {\n BannerAlertSeverity,\n BoxBackgroundColor,\n BoxBorderColor,\n} from '@metamask-previews/design-system-shared';\n\nimport { IconColor, IconName } from '../../types';\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_NAME: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconName\n> = {\n info: IconName.Info,\n success: IconName.Confirmation,\n warning: IconName.Danger,\n danger: IconName.Danger,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_ICON_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n IconColor\n> = {\n info: IconColor.PrimaryDefault,\n success: IconColor.SuccessDefault,\n warning: IconColor.WarningDefault,\n danger: IconColor.ErrorDefault,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BACKGROUND_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBackgroundColor\n> = {\n info: BoxBackgroundColor.PrimaryMuted,\n success: BoxBackgroundColor.SuccessMuted,\n warning: BoxBackgroundColor.WarningMuted,\n danger: BoxBackgroundColor.ErrorMuted,\n};\n\nexport const MAP_BANNER_ALERT_SEVERITY_BORDER_COLOR: Record<\n (typeof BannerAlertSeverity)[keyof typeof BannerAlertSeverity],\n BoxBorderColor\n> = {\n info: BoxBorderColor.PrimaryDefault,\n success: BoxBorderColor.SuccessDefault,\n warning: BoxBorderColor.WarningDefault,\n danger: BoxBorderColor.ErrorDefault,\n};\n"]}
|
|
@@ -30,23 +30,23 @@ const BannerBase = ({ title, titleProps, description, descriptionProps, children
|
|
|
30
30
|
const mergedCloseButtonTwClassName = closeButtonTwClassName
|
|
31
31
|
? `ml-3 ${closeButtonTwClassName}`
|
|
32
32
|
: 'ml-3';
|
|
33
|
-
return (<Box_1.Box flexDirection={
|
|
33
|
+
return (<Box_1.Box flexDirection={design_system_shared_1.BoxFlexDirection.Row} alignItems={design_system_shared_1.BoxAlignItems.Start} gap={2} backgroundColor={design_system_shared_1.BoxBackgroundColor.BackgroundDefault} padding={3} twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'} {...props}>
|
|
34
34
|
{startAccessory}
|
|
35
35
|
|
|
36
36
|
<Box_1.Box twClassName="flex-1">
|
|
37
37
|
{hasContent(title) &&
|
|
38
|
-
(isTextContent(title) ? (<Text_1.Text variant={
|
|
38
|
+
(isTextContent(title) ? (<Text_1.Text variant={types_1.TextVariant.BodyMd} fontWeight={types_1.FontWeight.Medium} {...titleProps}>
|
|
39
39
|
{title}
|
|
40
40
|
</Text_1.Text>) : (title))}
|
|
41
41
|
|
|
42
42
|
{hasContent(description) && (<Box_1.Box twClassName={hasContent(title) ? 'mt-1' : undefined}>
|
|
43
|
-
{isTextContent(description) ? (<Text_1.Text variant={
|
|
43
|
+
{isTextContent(description) ? (<Text_1.Text variant={types_1.TextVariant.BodySm} {...descriptionProps}>
|
|
44
44
|
{description}
|
|
45
45
|
</Text_1.Text>) : (description)}
|
|
46
46
|
</Box_1.Box>)}
|
|
47
47
|
|
|
48
48
|
{hasContent(children) &&
|
|
49
|
-
(isTextContent(children) ? (<Text_1.Text variant={
|
|
49
|
+
(isTextContent(children) ? (<Text_1.Text variant={types_1.TextVariant.BodyMd} {...childrenWrapperProps}>
|
|
50
50
|
{children}
|
|
51
51
|
</Text_1.Text>) : (children))}
|
|
52
52
|
|
|
@@ -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,kFAIiD;AACjD,kDAA0B;AAG1B,iDAMqB;AACrB,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;AAErC,MAAM,UAAU,GAA8B,CAAC,EACpD,KAAK,EACL,UAAU,EACV,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,yBAAyB,GAAG,iBAAiB,IAAI,EAAE,CAAC;IAE1D,MAAM,EACJ,kBAAkB,EAAE,6BAA6B,GAAG,cAAc,EAClE,OAAO,EAAE,uBAAuB,EAChC,WAAW,EAAE,sBAAsB,EACnC,GAAG,wBAAwB,EAC5B,GAAG,gBAAgB,IAAI,EAAE,CAAC;IAE3B,MAAM,qBAAqB,GAAG,OAAO,CAAC,OAAO,IAAI,gBAAgB,CAAC,CAAC;IACnE,MAAM,sBAAsB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAE5D,MAAM,gBAAgB,GACpB,OAAO,IAAI,uBAAuB;QAChC,CAAC,CAAC,CAAC,KAA4B,EAAE,EAAE;YAC/B,IAAI,OAAO,EAAE;gBACX,OAAO,EAAE,CAAC;gBACV,OAAO;aACR;YACD,uBAAuB,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Color,\n BoxFlexDirection,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n IconName,\n TextVariant,\n} from '../../types';\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: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"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 twClassName={hasContent(title) ? 'mt-1' : 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 {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BannerBase.d.cts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,cAAc;AAe1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BannerBase.d.mts","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,cAAc;AAe1B,OAAO,KAAK,EAAE,eAAe,EAAE,+BAA2B;AAQ1D,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAmHhD,CAAC"}
|
|
@@ -4,10 +4,10 @@ function $importDefault(module) {
|
|
|
4
4
|
}
|
|
5
5
|
return module;
|
|
6
6
|
}
|
|
7
|
-
import {
|
|
7
|
+
import { BoxAlignItems, BoxBackgroundColor, BoxFlexDirection } from "@metamask-previews/design-system-shared";
|
|
8
8
|
import $React from "react";
|
|
9
9
|
const React = $importDefault($React);
|
|
10
|
-
import {
|
|
10
|
+
import { ButtonIconSize, ButtonSize, FontWeight, IconName, TextVariant } from "../../types/index.mjs";
|
|
11
11
|
import { Box } from "../Box/index.mjs";
|
|
12
12
|
import { Button } from "../Button/index.mjs";
|
|
13
13
|
import { ButtonIcon } from "../ButtonIcon/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"BannerBase.mjs","sourceRoot":"","sources":["../../../src/components/BannerBase/BannerBase.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EACjB,gDAAgD;AACjD,OAAO,MAAK,cAAc;;AAG1B,OAAO,EACL,cAAc,EACd,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,8BAAoB;AACrB,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,OA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,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAC1D;cAAA,CAAC,QAAQ,CACX;YAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,CACF,QAAQ,CACT,CAAC,CAEJ;;QAAA,CAAC,sBAAsB,IAAI,CACzB,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CACrB;YAAA,CAAC,MAAM,CACL,IAAI,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,CACpB,OAAO,CAAC,CAAC,mBAAmB,CAAC,CAC7B,IAAI,yBAAyB,CAAC,CAE9B;cAAA,CAAC,iBAAiB,CACpB;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,GAAG,CAEL;;MAAA,CAAC,qBAAqB,IAAI,CACxB,CAAC,UAAU,CACT,WAAW,CAAC,CAAC,4BAA4B,CAAC,CAC1C,QAAQ,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CACzB,IAAI,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,CACxB,kBAAkB,CAAC,CAAC,6BAA6B,CAAC,CAClD,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAC1B,IAAI,wBAAwB,CAAC,EAC7B,CACH,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n BoxAlignItems,\n BoxBackgroundColor,\n BoxFlexDirection,\n} from '@metamask-previews/design-system-shared';\nimport React from 'react';\nimport { GestureResponderEvent } from 'react-native';\n\nimport {\n ButtonIconSize,\n ButtonSize,\n FontWeight,\n IconName,\n TextVariant,\n} from '../../types';\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: React.FC<BannerBaseProps> = ({\n title,\n titleProps,\n description,\n descriptionProps,\n children,\n childrenWrapperProps,\n actionButtonLabel,\n actionButtonOnPress,\n actionButtonProps,\n startAccessory,\n onClose,\n closeButtonProps,\n twClassName,\n ...props\n}) => {\n const resolvedActionButtonProps = actionButtonProps ?? {};\n\n const {\n accessibilityLabel: closeButtonAccessibilityLabel = 'Close banner',\n onPress: closeButtonPropsOnPress,\n twClassName: closeButtonTwClassName,\n ...resolvedCloseButtonProps\n } = closeButtonProps ?? {};\n\n const shouldShowCloseButton = Boolean(onClose || closeButtonProps);\n const shouldShowActionButton = Boolean(actionButtonOnPress);\n\n const handleClosePress =\n onClose || closeButtonPropsOnPress\n ? (event: GestureResponderEvent) => {\n if (onClose) {\n onClose();\n return;\n }\n closeButtonPropsOnPress?.(event);\n }\n : undefined;\n\n const mergedCloseButtonTwClassName = closeButtonTwClassName\n ? `ml-3 ${closeButtonTwClassName}`\n : 'ml-3';\n\n return (\n <Box\n flexDirection={BoxFlexDirection.Row}\n alignItems={BoxAlignItems.Start}\n gap={2}\n backgroundColor={BoxBackgroundColor.BackgroundDefault}\n padding={3}\n twClassName={twClassName ? `rounded-sm ${twClassName}` : 'rounded-sm'}\n {...props}\n >\n {startAccessory}\n\n <Box twClassName=\"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 twClassName={hasContent(title) ? 'mt-1' : 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 {shouldShowActionButton && (\n <Box twClassName=\"mt-4\">\n <Button\n size={ButtonSize.Md}\n onPress={actionButtonOnPress}\n {...resolvedActionButtonProps}\n >\n {actionButtonLabel}\n </Button>\n </Box>\n )}\n </Box>\n\n {shouldShowCloseButton && (\n <ButtonIcon\n twClassName={mergedCloseButtonTwClassName}\n iconName={IconName.Close}\n size={ButtonIconSize.Sm}\n accessibilityLabel={closeButtonAccessibilityLabel}\n onPress={handleClosePress}\n {...resolvedCloseButtonProps}\n />\n )}\n </Box>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.constants.cjs","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Box.constants.cjs","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":";;;AAKa,QAAA,kBAAkB,GAA+B;IAC5D,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;CACb,CAAC;AAEW,QAAA,qBAAqB,GAA+B;IAC/D,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,MAAM;CACX,CAAC;AAEW,QAAA,yBAAyB,GAA+B;IACnE,CAAC,EAAE,MAAM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IAC3E,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;CACZ,CAAC;AAEW,QAAA,+BAA+B,GAA+B;IACzE,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;CACZ,CAAC;AAEW,QAAA,2BAA2B,GAAmC;IACzE,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;CACd,CAAC","sourcesContent":["import type {\n BoxSpacing,\n BoxBorderWidth,\n} from '@metamask-previews/design-system-shared';\n\nexport const TWCLASSMAP_BOX_GAP: Record<BoxSpacing, string> = {\n 0: 'gap-0',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3',\n 4: 'gap-4',\n 5: 'gap-5',\n 6: 'gap-6',\n 7: 'gap-7',\n 8: 'gap-8',\n 9: 'gap-9',\n 10: 'gap-10',\n 11: 'gap-11',\n 12: 'gap-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN: Record<BoxSpacing, string> = {\n 0: 'm-0',\n 1: 'm-1',\n 2: 'm-2',\n 3: 'm-3',\n 4: 'm-4',\n 5: 'm-5',\n 6: 'm-6',\n 7: 'm-7',\n 8: 'm-8',\n 9: 'm-9',\n 10: 'm-10',\n 11: 'm-11',\n 12: 'm-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_TOP: Record<BoxSpacing, string> = {\n 0: 'mt-0',\n 1: 'mt-1',\n 2: 'mt-2',\n 3: 'mt-3',\n 4: 'mt-4',\n 5: 'mt-5',\n 6: 'mt-6',\n 7: 'mt-7',\n 8: 'mt-8',\n 9: 'mt-9',\n 10: 'mt-10',\n 11: 'mt-11',\n 12: 'mt-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_RIGHT: Record<BoxSpacing, string> = {\n 0: 'mr-0',\n 1: 'mr-1',\n 2: 'mr-2',\n 3: 'mr-3',\n 4: 'mr-4',\n 5: 'mr-5',\n 6: 'mr-6',\n 7: 'mr-7',\n 8: 'mr-8',\n 9: 'mr-9',\n 10: 'mr-10',\n 11: 'mr-11',\n 12: 'mr-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_BOTTOM: Record<BoxSpacing, string> = {\n 0: 'mb-0',\n 1: 'mb-1',\n 2: 'mb-2',\n 3: 'mb-3',\n 4: 'mb-4',\n 5: 'mb-5',\n 6: 'mb-6',\n 7: 'mb-7',\n 8: 'mb-8',\n 9: 'mb-9',\n 10: 'mb-10',\n 11: 'mb-11',\n 12: 'mb-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_LEFT: Record<BoxSpacing, string> = {\n 0: 'ml-0',\n 1: 'ml-1',\n 2: 'ml-2',\n 3: 'ml-3',\n 4: 'ml-4',\n 5: 'ml-5',\n 6: 'ml-6',\n 7: 'ml-7',\n 8: 'ml-8',\n 9: 'ml-9',\n 10: 'ml-10',\n 11: 'ml-11',\n 12: 'ml-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_HORIZONTAL: Record<BoxSpacing, string> = {\n 0: 'mx-0',\n 1: 'mx-1',\n 2: 'mx-2',\n 3: 'mx-3',\n 4: 'mx-4',\n 5: 'mx-5',\n 6: 'mx-6',\n 7: 'mx-7',\n 8: 'mx-8',\n 9: 'mx-9',\n 10: 'mx-10',\n 11: 'mx-11',\n 12: 'mx-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_VERTICAL: Record<BoxSpacing, string> = {\n 0: 'my-0',\n 1: 'my-1',\n 2: 'my-2',\n 3: 'my-3',\n 4: 'my-4',\n 5: 'my-5',\n 6: 'my-6',\n 7: 'my-7',\n 8: 'my-8',\n 9: 'my-9',\n 10: 'my-10',\n 11: 'my-11',\n 12: 'my-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING: Record<BoxSpacing, string> = {\n 0: 'p-0',\n 1: 'p-1',\n 2: 'p-2',\n 3: 'p-3',\n 4: 'p-4',\n 5: 'p-5',\n 6: 'p-6',\n 7: 'p-7',\n 8: 'p-8',\n 9: 'p-9',\n 10: 'p-10',\n 11: 'p-11',\n 12: 'p-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_TOP: Record<BoxSpacing, string> = {\n 0: 'pt-0',\n 1: 'pt-1',\n 2: 'pt-2',\n 3: 'pt-3',\n 4: 'pt-4',\n 5: 'pt-5',\n 6: 'pt-6',\n 7: 'pt-7',\n 8: 'pt-8',\n 9: 'pt-9',\n 10: 'pt-10',\n 11: 'pt-11',\n 12: 'pt-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_RIGHT: Record<BoxSpacing, string> = {\n 0: 'pr-0',\n 1: 'pr-1',\n 2: 'pr-2',\n 3: 'pr-3',\n 4: 'pr-4',\n 5: 'pr-5',\n 6: 'pr-6',\n 7: 'pr-7',\n 8: 'pr-8',\n 9: 'pr-9',\n 10: 'pr-10',\n 11: 'pr-11',\n 12: 'pr-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_BOTTOM: Record<BoxSpacing, string> = {\n 0: 'pb-0',\n 1: 'pb-1',\n 2: 'pb-2',\n 3: 'pb-3',\n 4: 'pb-4',\n 5: 'pb-5',\n 6: 'pb-6',\n 7: 'pb-7',\n 8: 'pb-8',\n 9: 'pb-9',\n 10: 'pb-10',\n 11: 'pb-11',\n 12: 'pb-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_LEFT: Record<BoxSpacing, string> = {\n 0: 'pl-0',\n 1: 'pl-1',\n 2: 'pl-2',\n 3: 'pl-3',\n 4: 'pl-4',\n 5: 'pl-5',\n 6: 'pl-6',\n 7: 'pl-7',\n 8: 'pl-8',\n 9: 'pl-9',\n 10: 'pl-10',\n 11: 'pl-11',\n 12: 'pl-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_HORIZONTAL: Record<BoxSpacing, string> = {\n 0: 'px-0',\n 1: 'px-1',\n 2: 'px-2',\n 3: 'px-3',\n 4: 'px-4',\n 5: 'px-5',\n 6: 'px-6',\n 7: 'px-7',\n 8: 'px-8',\n 9: 'px-9',\n 10: 'px-10',\n 11: 'px-11',\n 12: 'px-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_VERTICAL: Record<BoxSpacing, string> = {\n 0: 'py-0',\n 1: 'py-1',\n 2: 'py-2',\n 3: 'py-3',\n 4: 'py-4',\n 5: 'py-5',\n 6: 'py-6',\n 7: 'py-7',\n 8: 'py-8',\n 9: 'py-9',\n 10: 'py-10',\n 11: 'py-11',\n 12: 'py-12',\n};\n\nexport const TWCLASSMAP_BOX_BORDER_WIDTH: Record<BoxBorderWidth, string> = {\n 0: 'border-0',\n 1: 'border',\n 2: 'border-2',\n 4: 'border-4',\n 8: 'border-8',\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BoxSpacing, BoxBorderWidth } from "
|
|
1
|
+
import type { BoxSpacing, BoxBorderWidth } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export declare const TWCLASSMAP_BOX_GAP: Record<BoxSpacing, string>;
|
|
3
3
|
export declare const TWCLASSMAP_BOX_MARGIN: Record<BoxSpacing, string>;
|
|
4
4
|
export declare const TWCLASSMAP_BOX_MARGIN_TOP: Record<BoxSpacing, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Box.constants.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,gDAAgD;AAEjD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAczD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAc5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAchE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAclE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcnE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcjE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcvE,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAc7D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcjE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcnE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcpE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAclE,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcxE,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CActE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAMtE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BoxSpacing, BoxBorderWidth } from "
|
|
1
|
+
import type { BoxSpacing, BoxBorderWidth } from "@metamask-previews/design-system-shared";
|
|
2
2
|
export declare const TWCLASSMAP_BOX_GAP: Record<BoxSpacing, string>;
|
|
3
3
|
export declare const TWCLASSMAP_BOX_MARGIN: Record<BoxSpacing, string>;
|
|
4
4
|
export declare const TWCLASSMAP_BOX_MARGIN_TOP: Record<BoxSpacing, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Box.constants.d.mts","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACf,gDAAgD;AAEjD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAczD,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAc5D,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAchE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAclE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcnE,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcjE,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcvE,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAc7D,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcjE,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcnE,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcpE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAclE,CAAC;AAEF,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAcxE,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CActE,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAMtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.constants.mjs","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Box.constants.mjs","sourceRoot":"","sources":["../../../src/components/Box/Box.constants.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,EAAE,OAAO;IACV,CAAC,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C,EAAE,MAAM;IACT,CAAC,EAAE,MAAM;IACT,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,2BAA2B,GAAmC;IACzE,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,QAAQ;IACX,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;CACd,CAAC","sourcesContent":["import type {\n BoxSpacing,\n BoxBorderWidth,\n} from '@metamask-previews/design-system-shared';\n\nexport const TWCLASSMAP_BOX_GAP: Record<BoxSpacing, string> = {\n 0: 'gap-0',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3',\n 4: 'gap-4',\n 5: 'gap-5',\n 6: 'gap-6',\n 7: 'gap-7',\n 8: 'gap-8',\n 9: 'gap-9',\n 10: 'gap-10',\n 11: 'gap-11',\n 12: 'gap-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN: Record<BoxSpacing, string> = {\n 0: 'm-0',\n 1: 'm-1',\n 2: 'm-2',\n 3: 'm-3',\n 4: 'm-4',\n 5: 'm-5',\n 6: 'm-6',\n 7: 'm-7',\n 8: 'm-8',\n 9: 'm-9',\n 10: 'm-10',\n 11: 'm-11',\n 12: 'm-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_TOP: Record<BoxSpacing, string> = {\n 0: 'mt-0',\n 1: 'mt-1',\n 2: 'mt-2',\n 3: 'mt-3',\n 4: 'mt-4',\n 5: 'mt-5',\n 6: 'mt-6',\n 7: 'mt-7',\n 8: 'mt-8',\n 9: 'mt-9',\n 10: 'mt-10',\n 11: 'mt-11',\n 12: 'mt-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_RIGHT: Record<BoxSpacing, string> = {\n 0: 'mr-0',\n 1: 'mr-1',\n 2: 'mr-2',\n 3: 'mr-3',\n 4: 'mr-4',\n 5: 'mr-5',\n 6: 'mr-6',\n 7: 'mr-7',\n 8: 'mr-8',\n 9: 'mr-9',\n 10: 'mr-10',\n 11: 'mr-11',\n 12: 'mr-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_BOTTOM: Record<BoxSpacing, string> = {\n 0: 'mb-0',\n 1: 'mb-1',\n 2: 'mb-2',\n 3: 'mb-3',\n 4: 'mb-4',\n 5: 'mb-5',\n 6: 'mb-6',\n 7: 'mb-7',\n 8: 'mb-8',\n 9: 'mb-9',\n 10: 'mb-10',\n 11: 'mb-11',\n 12: 'mb-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_LEFT: Record<BoxSpacing, string> = {\n 0: 'ml-0',\n 1: 'ml-1',\n 2: 'ml-2',\n 3: 'ml-3',\n 4: 'ml-4',\n 5: 'ml-5',\n 6: 'ml-6',\n 7: 'ml-7',\n 8: 'ml-8',\n 9: 'ml-9',\n 10: 'ml-10',\n 11: 'ml-11',\n 12: 'ml-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_HORIZONTAL: Record<BoxSpacing, string> = {\n 0: 'mx-0',\n 1: 'mx-1',\n 2: 'mx-2',\n 3: 'mx-3',\n 4: 'mx-4',\n 5: 'mx-5',\n 6: 'mx-6',\n 7: 'mx-7',\n 8: 'mx-8',\n 9: 'mx-9',\n 10: 'mx-10',\n 11: 'mx-11',\n 12: 'mx-12',\n};\n\nexport const TWCLASSMAP_BOX_MARGIN_VERTICAL: Record<BoxSpacing, string> = {\n 0: 'my-0',\n 1: 'my-1',\n 2: 'my-2',\n 3: 'my-3',\n 4: 'my-4',\n 5: 'my-5',\n 6: 'my-6',\n 7: 'my-7',\n 8: 'my-8',\n 9: 'my-9',\n 10: 'my-10',\n 11: 'my-11',\n 12: 'my-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING: Record<BoxSpacing, string> = {\n 0: 'p-0',\n 1: 'p-1',\n 2: 'p-2',\n 3: 'p-3',\n 4: 'p-4',\n 5: 'p-5',\n 6: 'p-6',\n 7: 'p-7',\n 8: 'p-8',\n 9: 'p-9',\n 10: 'p-10',\n 11: 'p-11',\n 12: 'p-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_TOP: Record<BoxSpacing, string> = {\n 0: 'pt-0',\n 1: 'pt-1',\n 2: 'pt-2',\n 3: 'pt-3',\n 4: 'pt-4',\n 5: 'pt-5',\n 6: 'pt-6',\n 7: 'pt-7',\n 8: 'pt-8',\n 9: 'pt-9',\n 10: 'pt-10',\n 11: 'pt-11',\n 12: 'pt-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_RIGHT: Record<BoxSpacing, string> = {\n 0: 'pr-0',\n 1: 'pr-1',\n 2: 'pr-2',\n 3: 'pr-3',\n 4: 'pr-4',\n 5: 'pr-5',\n 6: 'pr-6',\n 7: 'pr-7',\n 8: 'pr-8',\n 9: 'pr-9',\n 10: 'pr-10',\n 11: 'pr-11',\n 12: 'pr-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_BOTTOM: Record<BoxSpacing, string> = {\n 0: 'pb-0',\n 1: 'pb-1',\n 2: 'pb-2',\n 3: 'pb-3',\n 4: 'pb-4',\n 5: 'pb-5',\n 6: 'pb-6',\n 7: 'pb-7',\n 8: 'pb-8',\n 9: 'pb-9',\n 10: 'pb-10',\n 11: 'pb-11',\n 12: 'pb-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_LEFT: Record<BoxSpacing, string> = {\n 0: 'pl-0',\n 1: 'pl-1',\n 2: 'pl-2',\n 3: 'pl-3',\n 4: 'pl-4',\n 5: 'pl-5',\n 6: 'pl-6',\n 7: 'pl-7',\n 8: 'pl-8',\n 9: 'pl-9',\n 10: 'pl-10',\n 11: 'pl-11',\n 12: 'pl-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_HORIZONTAL: Record<BoxSpacing, string> = {\n 0: 'px-0',\n 1: 'px-1',\n 2: 'px-2',\n 3: 'px-3',\n 4: 'px-4',\n 5: 'px-5',\n 6: 'px-6',\n 7: 'px-7',\n 8: 'px-8',\n 9: 'px-9',\n 10: 'px-10',\n 11: 'px-11',\n 12: 'px-12',\n};\n\nexport const TWCLASSMAP_BOX_PADDING_VERTICAL: Record<BoxSpacing, string> = {\n 0: 'py-0',\n 1: 'py-1',\n 2: 'py-2',\n 3: 'py-3',\n 4: 'py-4',\n 5: 'py-5',\n 6: 'py-6',\n 7: 'py-7',\n 8: 'py-8',\n 9: 'py-9',\n 10: 'py-10',\n 11: 'py-11',\n 12: 'py-12',\n};\n\nexport const TWCLASSMAP_BOX_BORDER_WIDTH: Record<BoxBorderWidth, string> = {\n 0: 'border-0',\n 1: 'border',\n 2: 'border-2',\n 4: 'border-4',\n 8: 'border-8',\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.cjs","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Box.types.cjs","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxPropsShared } from '@metamask-previews/design-system-shared';\nimport type { ViewProps } from 'react-native';\n\nexport type BoxProps = BoxPropsShared &\n ViewProps & {\n /**\n * Optional prop to add twrnc overriding classNames.\n */\n twClassName?: string;\n };\n"]}
|
|
@@ -1,113 +1,9 @@
|
|
|
1
|
+
import type { BoxPropsShared } from "@metamask-previews/design-system-shared";
|
|
1
2
|
import type { ViewProps } from "react-native/index.js";
|
|
2
|
-
|
|
3
|
-
export type BoxProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The flexDirection style of the component.
|
|
6
|
-
*/
|
|
7
|
-
flexDirection?: BoxFlexDirection;
|
|
8
|
-
/**
|
|
9
|
-
* The flexWrap style of the component.
|
|
10
|
-
*/
|
|
11
|
-
flexWrap?: BoxFlexWrap;
|
|
12
|
-
/**
|
|
13
|
-
* The gap between the component's children.
|
|
14
|
-
* Use 1-12 for a gap of 4px-48px.
|
|
15
|
-
*/
|
|
16
|
-
gap?: BoxSpacing;
|
|
17
|
-
/**
|
|
18
|
-
* The alignItems style of the component.
|
|
19
|
-
*/
|
|
20
|
-
alignItems?: BoxAlignItems;
|
|
21
|
-
/**
|
|
22
|
-
* The justifyContent style of the component.
|
|
23
|
-
*/
|
|
24
|
-
justifyContent?: BoxJustifyContent;
|
|
25
|
-
/**
|
|
26
|
-
* The margin of the component.
|
|
27
|
-
* Use 1-12 for margin of 4px-48px.
|
|
28
|
-
*/
|
|
29
|
-
margin?: BoxSpacing;
|
|
30
|
-
/**
|
|
31
|
-
* The top margin of the component.
|
|
32
|
-
* Use 1-12 for margin of 4px-48px.
|
|
33
|
-
*/
|
|
34
|
-
marginTop?: BoxSpacing;
|
|
35
|
-
/**
|
|
36
|
-
* The right margin of the component.
|
|
37
|
-
* Use 1-12 for margin of 4px-48px.
|
|
38
|
-
*/
|
|
39
|
-
marginRight?: BoxSpacing;
|
|
40
|
-
/**
|
|
41
|
-
* The bottom margin of the component.
|
|
42
|
-
* Use 1-12 for margin of 4px-48px.
|
|
43
|
-
*/
|
|
44
|
-
marginBottom?: BoxSpacing;
|
|
45
|
-
/**
|
|
46
|
-
* The left margin of the component.
|
|
47
|
-
* Use 1-12 for margin of 4px-48px.
|
|
48
|
-
*/
|
|
49
|
-
marginLeft?: BoxSpacing;
|
|
50
|
-
/**
|
|
51
|
-
* The horizontal margin of the component.
|
|
52
|
-
* Use 1-12 for margin of 4px-48px.
|
|
53
|
-
*/
|
|
54
|
-
marginHorizontal?: BoxSpacing;
|
|
55
|
-
/**
|
|
56
|
-
* The vertical margin of the component.
|
|
57
|
-
* Use 1-12 for margin of 4px-48px.
|
|
58
|
-
*/
|
|
59
|
-
marginVertical?: BoxSpacing;
|
|
60
|
-
/**
|
|
61
|
-
* The padding of the component.
|
|
62
|
-
* Use 1-12 for padding of 4px-48px.
|
|
63
|
-
*/
|
|
64
|
-
padding?: BoxSpacing;
|
|
65
|
-
/**
|
|
66
|
-
* The top padding of the component.
|
|
67
|
-
* Use 1-12 for padding of 4px-48px.
|
|
68
|
-
*/
|
|
69
|
-
paddingTop?: BoxSpacing;
|
|
70
|
-
/**
|
|
71
|
-
* The right padding of the component.
|
|
72
|
-
* Use 1-12 for padding of 4px-48px.
|
|
73
|
-
*/
|
|
74
|
-
paddingRight?: BoxSpacing;
|
|
75
|
-
/**
|
|
76
|
-
* The bottom padding of the component.
|
|
77
|
-
* Use 1-12 for padding of 4px-48px.
|
|
78
|
-
*/
|
|
79
|
-
paddingBottom?: BoxSpacing;
|
|
80
|
-
/**
|
|
81
|
-
* The left padding of the component.
|
|
82
|
-
* Use 1-12 for padding of 4px-48px.
|
|
83
|
-
*/
|
|
84
|
-
paddingLeft?: BoxSpacing;
|
|
85
|
-
/**
|
|
86
|
-
* The horizontal padding of the component.
|
|
87
|
-
* Use 1-12 for padding of 4px-48px.
|
|
88
|
-
*/
|
|
89
|
-
paddingHorizontal?: BoxSpacing;
|
|
90
|
-
/**
|
|
91
|
-
* The vertical padding of the component.
|
|
92
|
-
* Use 1-12 for padding of 4px-48px.
|
|
93
|
-
*/
|
|
94
|
-
paddingVertical?: BoxSpacing;
|
|
95
|
-
/**
|
|
96
|
-
* The border width of the component.
|
|
97
|
-
* Use 0, 1, 2, 4, or 8 for border width of 0px, 1px, 2px, 4px, or 8px.
|
|
98
|
-
*/
|
|
99
|
-
borderWidth?: BoxBorderWidth;
|
|
100
|
-
/**
|
|
101
|
-
* The border color of the component.
|
|
102
|
-
*/
|
|
103
|
-
borderColor?: BoxBorderColor;
|
|
104
|
-
/**
|
|
105
|
-
* The background color of the component.
|
|
106
|
-
*/
|
|
107
|
-
backgroundColor?: BoxBackgroundColor;
|
|
3
|
+
export type BoxProps = BoxPropsShared & ViewProps & {
|
|
108
4
|
/**
|
|
109
5
|
* Optional prop to add twrnc overriding classNames.
|
|
110
6
|
*/
|
|
111
7
|
twClassName?: string;
|
|
112
|
-
}
|
|
8
|
+
};
|
|
113
9
|
//# sourceMappingURL=Box.types.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Box.types.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gDAAgD;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C,MAAM,MAAM,QAAQ,GAAG,cAAc,GACnC,SAAS,GAAG;IACV;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC"}
|