@metamask/design-system-react 0.17.0 → 0.18.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 +29 -11
- 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/BannerAlert/BannerAlert.d.cts +4 -4
- package/dist/components/BannerAlert/BannerAlert.d.mts +4 -4
- package/dist/components/BannerBase/BannerBase.cjs +1 -1
- 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 +2 -106
- package/dist/components/Box/Box.types.d.cts.map +1 -1
- package/dist/components/Box/Box.types.d.mts +2 -106
- 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/Button/variants/ButtonTertiary/ButtonTertiary.cjs +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.cjs.map +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs +1 -1
- package/dist/components/Button/variants/ButtonTertiary/ButtonTertiary.mjs.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts +3 -4
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.cts.map +1 -1
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts +3 -4
- package/dist/components/ButtonIcon/ButtonIcon.constants.d.mts.map +1 -1
- package/dist/components/Checkbox/Checkbox.types.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.types.d.cts +2 -28
- package/dist/components/Checkbox/Checkbox.types.d.cts.map +1 -1
- package/dist/components/Checkbox/Checkbox.types.d.mts +2 -28
- package/dist/components/Checkbox/Checkbox.types.d.mts.map +1 -1
- package/dist/components/Checkbox/Checkbox.types.mjs.map +1 -1
- package/dist/components/Icon/Icon.types.cjs.map +1 -1
- package/dist/components/Icon/Icon.types.d.cts +2 -19
- package/dist/components/Icon/Icon.types.d.cts.map +1 -1
- package/dist/components/Icon/Icon.types.d.mts +2 -19
- package/dist/components/Icon/Icon.types.d.mts.map +1 -1
- package/dist/components/Icon/Icon.types.mjs.map +1 -1
- package/dist/components/Icon/icons/index.cjs +76 -76
- package/dist/components/Icon/icons/index.cjs.map +1 -1
- package/dist/components/Icon/icons/index.d.cts +38 -38
- package/dist/components/Icon/icons/index.d.cts.map +1 -1
- package/dist/components/Icon/icons/index.d.mts +38 -38
- package/dist/components/Icon/icons/index.d.mts.map +1 -1
- package/dist/components/Icon/icons/index.mjs +76 -76
- package/dist/components/Icon/icons/index.mjs.map +1 -1
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +1 -1
- package/dist/components/index.d.cts.map +1 -1
- package/dist/components/index.d.mts +1 -1
- package/dist/components/index.d.mts.map +1 -1
- package/dist/components/index.mjs.map +1 -1
- package/dist/types/index.cjs +12 -520
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +4 -512
- package/dist/types/index.d.cts.map +1 -1
- package/dist/types/index.d.mts +4 -512
- package/dist/types/index.d.mts.map +1 -1
- package/dist/types/index.mjs +4 -515
- package/dist/types/index.mjs.map +1 -1
- package/package.json +6 -9
|
@@ -1,110 +1,6 @@
|
|
|
1
|
+
import type { BoxPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export type BoxProps = ComponentProps<'div'> & {
|
|
4
|
-
/**
|
|
5
|
-
* The flex-direction style of the component.
|
|
6
|
-
*/
|
|
7
|
-
flexDirection?: BoxFlexDirection;
|
|
8
|
-
/**
|
|
9
|
-
* The flex-wrap style of the component.
|
|
10
|
-
*/
|
|
11
|
-
flexWrap?: BoxFlexWrap;
|
|
12
|
-
/**
|
|
13
|
-
* The gap between the component's children.
|
|
14
|
-
* Use 0-12 for a gap of 0px-48px.
|
|
15
|
-
*/
|
|
16
|
-
gap?: BoxSpacing;
|
|
17
|
-
/**
|
|
18
|
-
* The align-items style of the component.
|
|
19
|
-
*/
|
|
20
|
-
alignItems?: BoxAlignItems;
|
|
21
|
-
/**
|
|
22
|
-
* The justify-content style of the component.
|
|
23
|
-
*/
|
|
24
|
-
justifyContent?: BoxJustifyContent;
|
|
25
|
-
/**
|
|
26
|
-
* The margin of the component.
|
|
27
|
-
* Use 0-12 for margin of 0px-48px.
|
|
28
|
-
*/
|
|
29
|
-
margin?: BoxSpacing;
|
|
30
|
-
/**
|
|
31
|
-
* The top margin of the component.
|
|
32
|
-
* Use 0-12 for margin of 0px-48px.
|
|
33
|
-
*/
|
|
34
|
-
marginTop?: BoxSpacing;
|
|
35
|
-
/**
|
|
36
|
-
* The right margin of the component.
|
|
37
|
-
* Use 0-12 for margin of 0px-48px.
|
|
38
|
-
*/
|
|
39
|
-
marginRight?: BoxSpacing;
|
|
40
|
-
/**
|
|
41
|
-
* The bottom margin of the component.
|
|
42
|
-
* Use 0-12 for margin of 0px-48px.
|
|
43
|
-
*/
|
|
44
|
-
marginBottom?: BoxSpacing;
|
|
45
|
-
/**
|
|
46
|
-
* The left margin of the component.
|
|
47
|
-
* Use 0-12 for margin of 0px-48px.
|
|
48
|
-
*/
|
|
49
|
-
marginLeft?: BoxSpacing;
|
|
50
|
-
/**
|
|
51
|
-
* The horizontal margin of the component.
|
|
52
|
-
* Use 0-12 for margin of 0px-48px.
|
|
53
|
-
*/
|
|
54
|
-
marginHorizontal?: BoxSpacing;
|
|
55
|
-
/**
|
|
56
|
-
* The vertical margin of the component.
|
|
57
|
-
* Use 0-12 for margin of 0px-48px.
|
|
58
|
-
*/
|
|
59
|
-
marginVertical?: BoxSpacing;
|
|
60
|
-
/**
|
|
61
|
-
* The padding of the component.
|
|
62
|
-
* Use 0-12 for padding of 0px-48px.
|
|
63
|
-
*/
|
|
64
|
-
padding?: BoxSpacing;
|
|
65
|
-
/**
|
|
66
|
-
* The top padding of the component.
|
|
67
|
-
* Use 0-12 for padding of 0px-48px.
|
|
68
|
-
*/
|
|
69
|
-
paddingTop?: BoxSpacing;
|
|
70
|
-
/**
|
|
71
|
-
* The right padding of the component.
|
|
72
|
-
* Use 0-12 for padding of 0px-48px.
|
|
73
|
-
*/
|
|
74
|
-
paddingRight?: BoxSpacing;
|
|
75
|
-
/**
|
|
76
|
-
* The bottom padding of the component.
|
|
77
|
-
* Use 0-12 for padding of 0px-48px.
|
|
78
|
-
*/
|
|
79
|
-
paddingBottom?: BoxSpacing;
|
|
80
|
-
/**
|
|
81
|
-
* The left padding of the component.
|
|
82
|
-
* Use 0-12 for padding of 0px-48px.
|
|
83
|
-
*/
|
|
84
|
-
paddingLeft?: BoxSpacing;
|
|
85
|
-
/**
|
|
86
|
-
* The horizontal padding of the component.
|
|
87
|
-
* Use 0-12 for padding of 0px-48px.
|
|
88
|
-
*/
|
|
89
|
-
paddingHorizontal?: BoxSpacing;
|
|
90
|
-
/**
|
|
91
|
-
* The vertical padding of the component.
|
|
92
|
-
* Use 0-12 for padding of 0px-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 = ComponentProps<'div'> & BoxPropsShared & {
|
|
108
4
|
/**
|
|
109
5
|
* Optional prop for additional CSS classes to be applied to the Box component.
|
|
110
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.d.cts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,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,uCAAuC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,GAC1C,cAAc,GAAG;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -1,110 +1,6 @@
|
|
|
1
|
+
import type { BoxPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
2
|
-
|
|
3
|
-
export type BoxProps = ComponentProps<'div'> & {
|
|
4
|
-
/**
|
|
5
|
-
* The flex-direction style of the component.
|
|
6
|
-
*/
|
|
7
|
-
flexDirection?: BoxFlexDirection;
|
|
8
|
-
/**
|
|
9
|
-
* The flex-wrap style of the component.
|
|
10
|
-
*/
|
|
11
|
-
flexWrap?: BoxFlexWrap;
|
|
12
|
-
/**
|
|
13
|
-
* The gap between the component's children.
|
|
14
|
-
* Use 0-12 for a gap of 0px-48px.
|
|
15
|
-
*/
|
|
16
|
-
gap?: BoxSpacing;
|
|
17
|
-
/**
|
|
18
|
-
* The align-items style of the component.
|
|
19
|
-
*/
|
|
20
|
-
alignItems?: BoxAlignItems;
|
|
21
|
-
/**
|
|
22
|
-
* The justify-content style of the component.
|
|
23
|
-
*/
|
|
24
|
-
justifyContent?: BoxJustifyContent;
|
|
25
|
-
/**
|
|
26
|
-
* The margin of the component.
|
|
27
|
-
* Use 0-12 for margin of 0px-48px.
|
|
28
|
-
*/
|
|
29
|
-
margin?: BoxSpacing;
|
|
30
|
-
/**
|
|
31
|
-
* The top margin of the component.
|
|
32
|
-
* Use 0-12 for margin of 0px-48px.
|
|
33
|
-
*/
|
|
34
|
-
marginTop?: BoxSpacing;
|
|
35
|
-
/**
|
|
36
|
-
* The right margin of the component.
|
|
37
|
-
* Use 0-12 for margin of 0px-48px.
|
|
38
|
-
*/
|
|
39
|
-
marginRight?: BoxSpacing;
|
|
40
|
-
/**
|
|
41
|
-
* The bottom margin of the component.
|
|
42
|
-
* Use 0-12 for margin of 0px-48px.
|
|
43
|
-
*/
|
|
44
|
-
marginBottom?: BoxSpacing;
|
|
45
|
-
/**
|
|
46
|
-
* The left margin of the component.
|
|
47
|
-
* Use 0-12 for margin of 0px-48px.
|
|
48
|
-
*/
|
|
49
|
-
marginLeft?: BoxSpacing;
|
|
50
|
-
/**
|
|
51
|
-
* The horizontal margin of the component.
|
|
52
|
-
* Use 0-12 for margin of 0px-48px.
|
|
53
|
-
*/
|
|
54
|
-
marginHorizontal?: BoxSpacing;
|
|
55
|
-
/**
|
|
56
|
-
* The vertical margin of the component.
|
|
57
|
-
* Use 0-12 for margin of 0px-48px.
|
|
58
|
-
*/
|
|
59
|
-
marginVertical?: BoxSpacing;
|
|
60
|
-
/**
|
|
61
|
-
* The padding of the component.
|
|
62
|
-
* Use 0-12 for padding of 0px-48px.
|
|
63
|
-
*/
|
|
64
|
-
padding?: BoxSpacing;
|
|
65
|
-
/**
|
|
66
|
-
* The top padding of the component.
|
|
67
|
-
* Use 0-12 for padding of 0px-48px.
|
|
68
|
-
*/
|
|
69
|
-
paddingTop?: BoxSpacing;
|
|
70
|
-
/**
|
|
71
|
-
* The right padding of the component.
|
|
72
|
-
* Use 0-12 for padding of 0px-48px.
|
|
73
|
-
*/
|
|
74
|
-
paddingRight?: BoxSpacing;
|
|
75
|
-
/**
|
|
76
|
-
* The bottom padding of the component.
|
|
77
|
-
* Use 0-12 for padding of 0px-48px.
|
|
78
|
-
*/
|
|
79
|
-
paddingBottom?: BoxSpacing;
|
|
80
|
-
/**
|
|
81
|
-
* The left padding of the component.
|
|
82
|
-
* Use 0-12 for padding of 0px-48px.
|
|
83
|
-
*/
|
|
84
|
-
paddingLeft?: BoxSpacing;
|
|
85
|
-
/**
|
|
86
|
-
* The horizontal padding of the component.
|
|
87
|
-
* Use 0-12 for padding of 0px-48px.
|
|
88
|
-
*/
|
|
89
|
-
paddingHorizontal?: BoxSpacing;
|
|
90
|
-
/**
|
|
91
|
-
* The vertical padding of the component.
|
|
92
|
-
* Use 0-12 for padding of 0px-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 = ComponentProps<'div'> & BoxPropsShared & {
|
|
108
4
|
/**
|
|
109
5
|
* Optional prop for additional CSS classes to be applied to the Box component.
|
|
110
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.d.mts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"Box.types.d.mts","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,uCAAuC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,GAC1C,cAAc,GAAG;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.types.mjs","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Box.types.mjs","sourceRoot":"","sources":["../../../src/components/Box/Box.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BoxPropsShared } from '@metamask/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nexport type BoxProps = ComponentProps<'div'> &\n BoxPropsShared & {\n /**\n * Optional prop for additional CSS classes to be applied to the Box component.\n */\n className?: string;\n /**\n * Optional boolean that determines if the component should merge its props onto its immediate child\n * instead of rendering a div element\n *\n * @default false\n */\n asChild?: boolean;\n };\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Box = exports.BoxBorderColor = exports.BoxBackgroundColor = exports.BoxJustifyContent = exports.BoxAlignItems = exports.BoxFlexWrap = exports.BoxFlexDirection = void 0;
|
|
4
|
-
var
|
|
5
|
-
Object.defineProperty(exports, "BoxFlexDirection", { enumerable: true, get: function () { return
|
|
6
|
-
Object.defineProperty(exports, "BoxFlexWrap", { enumerable: true, get: function () { return
|
|
7
|
-
Object.defineProperty(exports, "BoxAlignItems", { enumerable: true, get: function () { return
|
|
8
|
-
Object.defineProperty(exports, "BoxJustifyContent", { enumerable: true, get: function () { return
|
|
9
|
-
Object.defineProperty(exports, "BoxBackgroundColor", { enumerable: true, get: function () { return
|
|
10
|
-
Object.defineProperty(exports, "BoxBorderColor", { enumerable: true, get: function () { return
|
|
4
|
+
var design_system_shared_1 = require("@metamask/design-system-shared");
|
|
5
|
+
Object.defineProperty(exports, "BoxFlexDirection", { enumerable: true, get: function () { return design_system_shared_1.BoxFlexDirection; } });
|
|
6
|
+
Object.defineProperty(exports, "BoxFlexWrap", { enumerable: true, get: function () { return design_system_shared_1.BoxFlexWrap; } });
|
|
7
|
+
Object.defineProperty(exports, "BoxAlignItems", { enumerable: true, get: function () { return design_system_shared_1.BoxAlignItems; } });
|
|
8
|
+
Object.defineProperty(exports, "BoxJustifyContent", { enumerable: true, get: function () { return design_system_shared_1.BoxJustifyContent; } });
|
|
9
|
+
Object.defineProperty(exports, "BoxBackgroundColor", { enumerable: true, get: function () { return design_system_shared_1.BoxBackgroundColor; } });
|
|
10
|
+
Object.defineProperty(exports, "BoxBorderColor", { enumerable: true, get: function () { return design_system_shared_1.BoxBorderColor; } });
|
|
11
11
|
var Box_1 = require("./Box.cjs");
|
|
12
12
|
Object.defineProperty(exports, "Box", { enumerable: true, get: function () { return Box_1.Box; } });
|
|
13
13
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":";;;AAAA,uEASwC;AARtC,wHAAA,gBAAgB,OAAA;AAChB,mHAAA,WAAW,OAAA;AACX,qHAAA,aAAa,OAAA;AACb,yHAAA,iBAAiB,OAAA;AACjB,0HAAA,kBAAkB,OAAA;AAClB,sHAAA,cAAc,OAAA;AAIhB,iCAA4B;AAAnB,0FAAA,GAAG,OAAA","sourcesContent":["export {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n type BoxSpacing,\n type BoxBorderWidth,\n} from '@metamask/design-system-shared';\nexport { Box } from './Box';\nexport type { BoxProps } from './Box.types';\n"]}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, } from "
|
|
2
|
-
export type { BoxSpacing } from "../../types/index.cjs";
|
|
1
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, type BoxSpacing, type BoxBorderWidth, } from "@metamask/design-system-shared";
|
|
3
2
|
export { Box } from "./Box.cjs";
|
|
4
3
|
export type { BoxProps } from "./Box.types.cjs";
|
|
5
4
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,cAAc,GACpB,uCAAuC;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,YAAY,EAAE,QAAQ,EAAE,wBAAoB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, } from "
|
|
2
|
-
export type { BoxSpacing } from "../../types/index.mjs";
|
|
1
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor, type BoxSpacing, type BoxBorderWidth, } from "@metamask/design-system-shared";
|
|
3
2
|
export { Box } from "./Box.mjs";
|
|
4
3
|
export type { BoxProps } from "./Box.types.mjs";
|
|
5
4
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,KAAK,UAAU,EACf,KAAK,cAAc,GACpB,uCAAuC;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAc;AAC5B,YAAY,EAAE,QAAQ,EAAE,wBAAoB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor } from "
|
|
1
|
+
export { BoxFlexDirection, BoxFlexWrap, BoxAlignItems, BoxJustifyContent, BoxBackgroundColor, BoxBorderColor } from "@metamask/design-system-shared";
|
|
2
2
|
export { Box } from "./Box.mjs";
|
|
3
3
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/Box/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EAGf,uCAAuC;AACxC,OAAO,EAAE,GAAG,EAAE,kBAAc","sourcesContent":["export {\n BoxFlexDirection,\n BoxFlexWrap,\n BoxAlignItems,\n BoxJustifyContent,\n BoxBackgroundColor,\n BoxBorderColor,\n type BoxSpacing,\n type BoxBorderWidth,\n} from '@metamask/design-system-shared';\nexport { Box } from './Box';\nexport type { BoxProps } from './Box.types';\n"]}
|
|
@@ -33,7 +33,7 @@ exports.ButtonTertiary = (0, react_1.forwardRef)(({ className, isDanger, isInver
|
|
|
33
33
|
// Default tertiary styles
|
|
34
34
|
!isDanger &&
|
|
35
35
|
!isInverse && [
|
|
36
|
-
'bg-transparent text-
|
|
36
|
+
'bg-transparent text-default',
|
|
37
37
|
// Loading state uses pressed color
|
|
38
38
|
isLoading && 'bg-pressed',
|
|
39
39
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.cjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,6DAAqD;AACrD,8DAAiD;AAIpC,QAAA,cAAc,GAAG,IAAA,kBAAU,EAItC,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACnE,GAAG,EACH,EAAE;IACF,MAAM,aAAa,GAAG,CAAC,CAAC,UAAU,IAAI,SAAS,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,IAAA,kBAAO;IAC7B,0BAA0B;IAC1B,CAAC,QAAQ;QACP,CAAC,SAAS,IAAI;QACZ,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.cjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA0C;AAE1C,6DAAqD;AACrD,8DAAiD;AAIpC,QAAA,cAAc,GAAG,IAAA,kBAAU,EAItC,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACnE,GAAG,EACH,EAAE;IACF,MAAM,aAAa,GAAG,CAAC,CAAC,UAAU,IAAI,SAAS,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,IAAA,kBAAO;IAC7B,0BAA0B;IAC1B,CAAC,QAAQ;QACP,CAAC,SAAS,IAAI;QACZ,6BAA6B;QAC7B,mCAAmC;QACnC,SAAS,IAAI,YAAY;KAC1B;IACH,gBAAgB;IAChB,QAAQ;QACN,CAAC,SAAS,IAAI;QACZ,mCAAmC;QACnC,+CAA+C;QAC/C,SAAS,IAAI,mDAAmD;KACjE;IACH,iBAAiB;IACjB,SAAS;QACP,CAAC,QAAQ,IAAI;QACX,qCAAqC;QACrC,mCAAmC;QACnC,SAAS,IAAI,YAAY;KAC1B;IACH,wBAAwB;IACxB,SAAS;QACP,QAAQ,IAAI;QACV,+BAA+B;QAC/B,mCAAmC;QACnC,SAAS,IAAI,oBAAoB;KAClC;IACH,sDAAsD;IACtD,aAAa,IAAI;QACf,gBAAgB;QAChB,mBAAmB;QACnB,SAAS;YACP,QAAQ,IAAI,CAAC,wBAAwB,EAAE,2BAA2B,CAAC;QACrE,QAAQ;YACN,CAAC,SAAS,IAAI;YACZ,4BAA4B;YAC5B,+BAA+B;SAChC;KACJ,EACD,iDAAiD,EACjD,SAAS;QACP,CAAC,CAAC,uHAAuH;QACzH,CAAC,CAAC,oHAAoH;IACxH,iBAAiB;IACjB,SAAS,IAAI,oBAAoB;IACjC,oCAAoC;IACpC,UAAU,IAAI,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAChE,SAAS,CACV,CAAC;IAEF,OAAO,CACL,8BAAC,uBAAU,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../../../utils/tw-merge';\nimport { ButtonBase } from '../../../ButtonBase';\n\nimport type { ButtonTertiaryProps } from './ButtonTertiary.types';\n\nexport const ButtonTertiary = forwardRef<\n HTMLButtonElement,\n ButtonTertiaryProps\n>(\n (\n { className, isDanger, isInverse, isDisabled, isLoading, ...props },\n ref,\n ) => {\n const isInteractive = !(isDisabled ?? isLoading);\n\n const mergedClassName = twMerge(\n // Default tertiary styles\n !isDanger &&\n !isInverse && [\n 'bg-transparent text-default',\n // Loading state uses pressed color\n isLoading && 'bg-pressed',\n ],\n // Danger styles\n isDanger &&\n !isInverse && [\n 'bg-transparent text-error-default',\n // Loading state uses error muted pressed color\n isLoading && 'bg-error-muted-pressed text-error-default-pressed',\n ],\n // Inverse styles\n isInverse &&\n !isDanger && [\n 'bg-transparent text-primary-inverse',\n // Loading state uses pressed color\n isLoading && 'bg-pressed',\n ],\n // Inverse danger styles\n isInverse &&\n isDanger && [\n 'bg-default text-error-default',\n // Loading state uses pressed color\n isLoading && 'bg-default-pressed',\n ],\n // Hover/Active states - only applied when interactive\n isInteractive && [\n 'hover:bg-hover',\n 'active:bg-pressed',\n isInverse &&\n isDanger && ['hover:bg-default-hover', 'active:bg-default-pressed'],\n isDanger &&\n !isInverse && [\n 'hover:bg-error-muted-hover',\n 'active:bg-error-muted-pressed',\n ],\n ],\n 'focus-visible:outline-none focus-visible:ring-0',\n isInverse\n ? 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-background-default'\n : 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-default',\n // Loading styles\n isLoading && 'cursor-not-allowed',\n // Disabled styles (but not loading)\n isDisabled && !isLoading && ['opacity-50', 'cursor-not-allowed'],\n className,\n );\n\n return (\n <ButtonBase\n ref={ref}\n className={mergedClassName}\n isDisabled={isDisabled}\n isLoading={isLoading}\n {...props}\n />\n );\n },\n);\n\nButtonTertiary.displayName = 'ButtonTertiary';\n"]}
|
|
@@ -14,7 +14,7 @@ export const ButtonTertiary = forwardRef(({ className, isDanger, isInverse, isDi
|
|
|
14
14
|
// Default tertiary styles
|
|
15
15
|
!isDanger &&
|
|
16
16
|
!isInverse && [
|
|
17
|
-
'bg-transparent text-
|
|
17
|
+
'bg-transparent text-default',
|
|
18
18
|
// Loading state uses pressed color
|
|
19
19
|
isLoading && 'bg-pressed',
|
|
20
20
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonTertiary.mjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,uCAAmC;AACrD,OAAO,EAAE,UAAU,EAAE,sCAA4B;AAIjD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAItC,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACnE,GAAG,EACH,EAAE;IACF,MAAM,aAAa,GAAG,CAAC,CAAC,UAAU,IAAI,SAAS,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,OAAO;IAC7B,0BAA0B;IAC1B,CAAC,QAAQ;QACP,CAAC,SAAS,IAAI;QACZ,
|
|
1
|
+
{"version":3,"file":"ButtonTertiary.mjs","sourceRoot":"","sources":["../../../../../src/components/Button/variants/ButtonTertiary/ButtonTertiary.tsx"],"names":[],"mappings":";;;;;;AAAA,OAAO,QAAO,EAAE,UAAU,EAAE,cAAc;;AAE1C,OAAO,EAAE,OAAO,EAAE,uCAAmC;AACrD,OAAO,EAAE,UAAU,EAAE,sCAA4B;AAIjD,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAItC,CACE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EACnE,GAAG,EACH,EAAE;IACF,MAAM,aAAa,GAAG,CAAC,CAAC,UAAU,IAAI,SAAS,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,OAAO;IAC7B,0BAA0B;IAC1B,CAAC,QAAQ;QACP,CAAC,SAAS,IAAI;QACZ,6BAA6B;QAC7B,mCAAmC;QACnC,SAAS,IAAI,YAAY;KAC1B;IACH,gBAAgB;IAChB,QAAQ;QACN,CAAC,SAAS,IAAI;QACZ,mCAAmC;QACnC,+CAA+C;QAC/C,SAAS,IAAI,mDAAmD;KACjE;IACH,iBAAiB;IACjB,SAAS;QACP,CAAC,QAAQ,IAAI;QACX,qCAAqC;QACrC,mCAAmC;QACnC,SAAS,IAAI,YAAY;KAC1B;IACH,wBAAwB;IACxB,SAAS;QACP,QAAQ,IAAI;QACV,+BAA+B;QAC/B,mCAAmC;QACnC,SAAS,IAAI,oBAAoB;KAClC;IACH,sDAAsD;IACtD,aAAa,IAAI;QACf,gBAAgB;QAChB,mBAAmB;QACnB,SAAS;YACP,QAAQ,IAAI,CAAC,wBAAwB,EAAE,2BAA2B,CAAC;QACrE,QAAQ;YACN,CAAC,SAAS,IAAI;YACZ,4BAA4B;YAC5B,+BAA+B;SAChC;KACJ,EACD,iDAAiD,EACjD,SAAS;QACP,CAAC,CAAC,uHAAuH;QACzH,CAAC,CAAC,oHAAoH;IACxH,iBAAiB;IACjB,SAAS,IAAI,oBAAoB;IACjC,oCAAoC;IACpC,UAAU,IAAI,CAAC,SAAS,IAAI,CAAC,YAAY,EAAE,oBAAoB,CAAC,EAChE,SAAS,CACV,CAAC;IAEF,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,eAAe,EAC1B,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC","sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { twMerge } from '../../../../utils/tw-merge';\nimport { ButtonBase } from '../../../ButtonBase';\n\nimport type { ButtonTertiaryProps } from './ButtonTertiary.types';\n\nexport const ButtonTertiary = forwardRef<\n HTMLButtonElement,\n ButtonTertiaryProps\n>(\n (\n { className, isDanger, isInverse, isDisabled, isLoading, ...props },\n ref,\n ) => {\n const isInteractive = !(isDisabled ?? isLoading);\n\n const mergedClassName = twMerge(\n // Default tertiary styles\n !isDanger &&\n !isInverse && [\n 'bg-transparent text-default',\n // Loading state uses pressed color\n isLoading && 'bg-pressed',\n ],\n // Danger styles\n isDanger &&\n !isInverse && [\n 'bg-transparent text-error-default',\n // Loading state uses error muted pressed color\n isLoading && 'bg-error-muted-pressed text-error-default-pressed',\n ],\n // Inverse styles\n isInverse &&\n !isDanger && [\n 'bg-transparent text-primary-inverse',\n // Loading state uses pressed color\n isLoading && 'bg-pressed',\n ],\n // Inverse danger styles\n isInverse &&\n isDanger && [\n 'bg-default text-error-default',\n // Loading state uses pressed color\n isLoading && 'bg-default-pressed',\n ],\n // Hover/Active states - only applied when interactive\n isInteractive && [\n 'hover:bg-hover',\n 'active:bg-pressed',\n isInverse &&\n isDanger && ['hover:bg-default-hover', 'active:bg-default-pressed'],\n isDanger &&\n !isInverse && [\n 'hover:bg-error-muted-hover',\n 'active:bg-error-muted-pressed',\n ],\n ],\n 'focus-visible:outline-none focus-visible:ring-0',\n isInverse\n ? 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-background-default'\n : 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-default',\n // Loading styles\n isLoading && 'cursor-not-allowed',\n // Disabled styles (but not loading)\n isDisabled && !isLoading && ['opacity-50', 'cursor-not-allowed'],\n className,\n );\n\n return (\n <ButtonBase\n ref={ref}\n className={mergedClassName}\n isDisabled={isDisabled}\n isLoading={isLoading}\n {...props}\n />\n );\n },\n);\n\nButtonTertiary.displayName = 'ButtonTertiary';\n"]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { IconSize } from "../Icon/index.cjs";
|
|
2
1
|
export declare const TWCLASSMAP_BUTTONICON_SIZE_DIMENSION: {
|
|
3
2
|
readonly sm: "h-6 w-6";
|
|
4
3
|
readonly md: "h-8 w-8";
|
|
5
4
|
readonly lg: "h-10 w-10";
|
|
6
5
|
};
|
|
7
6
|
export declare const MAP_BUTTONICON_SIZE_ICONSIZE: {
|
|
8
|
-
readonly sm:
|
|
9
|
-
readonly md:
|
|
10
|
-
readonly lg:
|
|
7
|
+
readonly sm: "md";
|
|
8
|
+
readonly md: "lg";
|
|
9
|
+
readonly lg: "xl";
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=ButtonIcon.constants.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.constants.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonIcon.constants.d.cts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oCAAoC;;;;CAIvC,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;CAI/B,CAAC"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { IconSize } from "../Icon/index.mjs";
|
|
2
1
|
export declare const TWCLASSMAP_BUTTONICON_SIZE_DIMENSION: {
|
|
3
2
|
readonly sm: "h-6 w-6";
|
|
4
3
|
readonly md: "h-8 w-8";
|
|
5
4
|
readonly lg: "h-10 w-10";
|
|
6
5
|
};
|
|
7
6
|
export declare const MAP_BUTTONICON_SIZE_ICONSIZE: {
|
|
8
|
-
readonly sm:
|
|
9
|
-
readonly md:
|
|
10
|
-
readonly lg:
|
|
7
|
+
readonly sm: "md";
|
|
8
|
+
readonly md: "lg";
|
|
9
|
+
readonly lg: "xl";
|
|
11
10
|
};
|
|
12
11
|
//# sourceMappingURL=ButtonIcon.constants.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonIcon.constants.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.constants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ButtonIcon.constants.d.mts","sourceRoot":"","sources":["../../../src/components/ButtonIcon/ButtonIcon.constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,oCAAoC;;;;CAIvC,CAAC;AAEX,eAAO,MAAM,4BAA4B;;;;CAI/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.types.cjs","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text';\n\nexport type CheckboxProps = Omit<\n ComponentProps<'label'>,\n 'style' | 'className' | 'children' | 'htmlFor'\n> & {\n
|
|
1
|
+
{"version":3,"file":"Checkbox.types.cjs","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CheckboxPropsShared } from '@metamask/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text';\n\nexport type CheckboxProps = Omit<\n ComponentProps<'label'>,\n 'style' | 'className' | 'children' | 'htmlFor'\n> &\n CheckboxPropsShared & {\n /**\n * Required unique identifier for the checkbox input element.\n * This is used for the input's ID and the label's htmlFor attributes.\n */\n id: string;\n\n /**\n * Optional props to be passed to the label's Text component\n */\n labelProps?: Omit<Partial<TextProps>, 'children'>;\n\n /**\n * Optional props passed to the input element.\n */\n inputProps?: Omit<\n ComponentProps<'input'>,\n 'type' | 'checked' | 'onChange' | 'disabled'\n > & {\n [key: `data-${string}`]: string;\n };\n\n /**\n * Optional props passed to the container div wrapping the checkbox icon.\n */\n checkboxContainerProps?: (Omit<ComponentProps<'div'>, 'children'> & {\n className?: string;\n }) &\n Record<string, unknown>;\n\n /**\n * Optional props to be passed to the check Icon component\n */\n checkedIconProps?: Partial<IconProps>;\n /**\n * Optional prop for additional CSS classes to be applied to the Checkbox component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles for the outer container.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -1,43 +1,17 @@
|
|
|
1
|
+
import type { CheckboxPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
2
3
|
import type { IconProps } from "../Icon/index.cjs";
|
|
3
4
|
import type { TextProps } from "../Text/index.cjs";
|
|
4
|
-
export type CheckboxProps = Omit<ComponentProps<'label'>, 'style' | 'className' | 'children' | 'htmlFor'> & {
|
|
5
|
+
export type CheckboxProps = Omit<ComponentProps<'label'>, 'style' | 'className' | 'children' | 'htmlFor'> & CheckboxPropsShared & {
|
|
5
6
|
/**
|
|
6
7
|
* Required unique identifier for the checkbox input element.
|
|
7
8
|
* This is used for the input's ID and the label's htmlFor attributes.
|
|
8
9
|
*/
|
|
9
10
|
id: string;
|
|
10
|
-
/**
|
|
11
|
-
* Required prop to determine whether the checkbox is currently selected.
|
|
12
|
-
* This component is fully controlled, so you must manage this state
|
|
13
|
-
* in your parent component.
|
|
14
|
-
*/
|
|
15
|
-
isSelected: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Optional prop that when true, disables the checkbox.
|
|
18
|
-
*
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
isDisabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Optional prop that when true, displays the invalid/error state of the checkbox.
|
|
24
|
-
*
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
isInvalid?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Optional label prop that renders text or a React node as a label beside the checkbox.
|
|
30
|
-
*/
|
|
31
|
-
label?: React.ReactNode | string;
|
|
32
11
|
/**
|
|
33
12
|
* Optional props to be passed to the label's Text component
|
|
34
13
|
*/
|
|
35
14
|
labelProps?: Omit<Partial<TextProps>, 'children'>;
|
|
36
|
-
/**
|
|
37
|
-
* Required callback for when the checked state changes.
|
|
38
|
-
* Use this to update your state.
|
|
39
|
-
*/
|
|
40
|
-
onChange: (isSelected: boolean) => void;
|
|
41
15
|
/**
|
|
42
16
|
* Optional props passed to the input element.
|
|
43
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.types.d.cts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,OAAO,CAAC,EACvB,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAC/C,GAAG;
|
|
1
|
+
{"version":3,"file":"Checkbox.types.d.cts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,OAAO,CAAC,EACvB,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAC/C,GACC,mBAAmB,GAAG;IACpB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAElD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CACf,cAAc,CAAC,OAAO,CAAC,EACvB,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAC7C,GAAG;QACF,CAAC,GAAG,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,CAAC;KACjC,CAAC;IAEF;;OAEG;IACH,sBAAsB,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;QAClE,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,GACA,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1,43 +1,17 @@
|
|
|
1
|
+
import type { CheckboxPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { ComponentProps } from "react";
|
|
2
3
|
import type { IconProps } from "../Icon/index.mjs";
|
|
3
4
|
import type { TextProps } from "../Text/index.mjs";
|
|
4
|
-
export type CheckboxProps = Omit<ComponentProps<'label'>, 'style' | 'className' | 'children' | 'htmlFor'> & {
|
|
5
|
+
export type CheckboxProps = Omit<ComponentProps<'label'>, 'style' | 'className' | 'children' | 'htmlFor'> & CheckboxPropsShared & {
|
|
5
6
|
/**
|
|
6
7
|
* Required unique identifier for the checkbox input element.
|
|
7
8
|
* This is used for the input's ID and the label's htmlFor attributes.
|
|
8
9
|
*/
|
|
9
10
|
id: string;
|
|
10
|
-
/**
|
|
11
|
-
* Required prop to determine whether the checkbox is currently selected.
|
|
12
|
-
* This component is fully controlled, so you must manage this state
|
|
13
|
-
* in your parent component.
|
|
14
|
-
*/
|
|
15
|
-
isSelected: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Optional prop that when true, disables the checkbox.
|
|
18
|
-
*
|
|
19
|
-
* @default false
|
|
20
|
-
*/
|
|
21
|
-
isDisabled?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Optional prop that when true, displays the invalid/error state of the checkbox.
|
|
24
|
-
*
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
isInvalid?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Optional label prop that renders text or a React node as a label beside the checkbox.
|
|
30
|
-
*/
|
|
31
|
-
label?: React.ReactNode | string;
|
|
32
11
|
/**
|
|
33
12
|
* Optional props to be passed to the label's Text component
|
|
34
13
|
*/
|
|
35
14
|
labelProps?: Omit<Partial<TextProps>, 'children'>;
|
|
36
|
-
/**
|
|
37
|
-
* Required callback for when the checked state changes.
|
|
38
|
-
* Use this to update your state.
|
|
39
|
-
*/
|
|
40
|
-
onChange: (isSelected: boolean) => void;
|
|
41
15
|
/**
|
|
42
16
|
* Optional props passed to the input element.
|
|
43
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.types.d.mts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,OAAO,CAAC,EACvB,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAC/C,GAAG;
|
|
1
|
+
{"version":3,"file":"Checkbox.types.d.mts","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,uCAAuC;AAC1E,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc;AAE5C,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,cAAc,CAAC,OAAO,CAAC,EACvB,OAAO,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAC/C,GACC,mBAAmB,GAAG;IACpB;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAElD;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CACf,cAAc,CAAC,OAAO,CAAC,EACvB,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAC7C,GAAG;QACF,CAAC,GAAG,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,CAAC;KACjC,CAAC;IAEF;;OAEG;IACH,sBAAsB,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;QAClE,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,GACA,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE1B;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.types.mjs","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps } from 'react';\n\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text';\n\nexport type CheckboxProps = Omit<\n ComponentProps<'label'>,\n 'style' | 'className' | 'children' | 'htmlFor'\n> & {\n
|
|
1
|
+
{"version":3,"file":"Checkbox.types.mjs","sourceRoot":"","sources":["../../../src/components/Checkbox/Checkbox.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CheckboxPropsShared } from '@metamask/design-system-shared';\nimport type { ComponentProps } from 'react';\n\nimport type { IconProps } from '../Icon';\nimport type { TextProps } from '../Text';\n\nexport type CheckboxProps = Omit<\n ComponentProps<'label'>,\n 'style' | 'className' | 'children' | 'htmlFor'\n> &\n CheckboxPropsShared & {\n /**\n * Required unique identifier for the checkbox input element.\n * This is used for the input's ID and the label's htmlFor attributes.\n */\n id: string;\n\n /**\n * Optional props to be passed to the label's Text component\n */\n labelProps?: Omit<Partial<TextProps>, 'children'>;\n\n /**\n * Optional props passed to the input element.\n */\n inputProps?: Omit<\n ComponentProps<'input'>,\n 'type' | 'checked' | 'onChange' | 'disabled'\n > & {\n [key: `data-${string}`]: string;\n };\n\n /**\n * Optional props passed to the container div wrapping the checkbox icon.\n */\n checkboxContainerProps?: (Omit<ComponentProps<'div'>, 'children'> & {\n className?: string;\n }) &\n Record<string, unknown>;\n\n /**\n * Optional props to be passed to the check Icon component\n */\n checkedIconProps?: Partial<IconProps>;\n /**\n * Optional prop for additional CSS classes to be applied to the Checkbox component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles for the outer container.\n */\n style?: React.CSSProperties;\n };\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.types.cjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"Icon.types.cjs","sourceRoot":"","sources":["../../../src/components/Icon/Icon.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { IconPropsShared } from '@metamask/design-system-shared';\nimport type { SVGProps, ComponentPropsWithoutRef } from 'react';\n\n// Use ComponentPropsWithoutRef to get SVG element props without relying on global SVGElement\ntype SVGElementProps = ComponentPropsWithoutRef<'svg'>;\n\nexport type IconProps = SVGProps<SVGElementProps> &\n IconPropsShared & {\n /**\n * Additional CSS classes to be added to the component.\n * These classes will be merged with the component's default classes using twMerge.\n */\n className?: string;\n /**\n * Optional CSS styles to be applied to the component.\n * Should be used sparingly and only for dynamic styles that can't be achieved with className.\n */\n style?: React.CSSProperties;\n /**\n * Optional prop to add a test id to the icon\n */\n 'data-testid'?: string;\n };\n"]}
|
|
@@ -1,24 +1,7 @@
|
|
|
1
|
+
import type { IconPropsShared } from "@metamask/design-system-shared";
|
|
1
2
|
import type { SVGProps, ComponentPropsWithoutRef } from "react";
|
|
2
|
-
import type { IconName, IconSize, IconColor } from "../../types/index.cjs";
|
|
3
3
|
type SVGElementProps = ComponentPropsWithoutRef<'svg'>;
|
|
4
|
-
export type IconProps = SVGProps<SVGElementProps> & {
|
|
5
|
-
/**
|
|
6
|
-
* Required prop to specify which icon to render from the icon set
|
|
7
|
-
*/
|
|
8
|
-
name: IconName;
|
|
9
|
-
/**
|
|
10
|
-
* Optional prop to control the size of the icon
|
|
11
|
-
* Different sizes map to specific pixel dimensions
|
|
12
|
-
*
|
|
13
|
-
* @default IconSize.Md
|
|
14
|
-
*/
|
|
15
|
-
size?: IconSize;
|
|
16
|
-
/**
|
|
17
|
-
* Optional prop that sets the color of the icon using predefined theme colors
|
|
18
|
-
*
|
|
19
|
-
* @default IconColor.IconDefault
|
|
20
|
-
*/
|
|
21
|
-
color?: IconColor;
|
|
4
|
+
export type IconProps = SVGProps<SVGElementProps> & IconPropsShared & {
|
|
22
5
|
/**
|
|
23
6
|
* Additional CSS classes to be added to the component.
|
|
24
7
|
* These classes will be merged with the component's default classes using twMerge.
|