@astral/ui 1.9.1 → 1.11.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/Button/Button.js +4 -4
- package/Button/styles.d.ts +72 -0
- package/Button/styles.js +19 -0
- package/ButtonBase/ButtonBase.js +4 -4
- package/ButtonBase/enums.d.ts +23 -0
- package/ButtonBase/{constants.js → enums.js} +15 -14
- package/ButtonBase/index.d.ts +1 -1
- package/ButtonBase/index.js +1 -1
- package/{esm/ButtonBase/styled.d.ts → ButtonBase/styles.d.ts} +10 -8
- package/ButtonBase/{styled.js → styles.js} +43 -24
- package/ButtonBase/types.d.ts +1 -1
- package/Description/styles.js +4 -1
- package/GlobalStyles/GlobalStyles.js +8 -3
- package/IconButton/IconButton.js +1 -1
- package/IconButton/styles.d.ts +4 -3
- package/IconButton/styles.js +18 -7
- package/esm/Button/Button.js +4 -4
- package/esm/Button/styles.d.ts +72 -0
- package/esm/Button/styles.js +16 -0
- package/esm/ButtonBase/ButtonBase.js +4 -4
- package/esm/ButtonBase/enums.d.ts +23 -0
- package/esm/ButtonBase/enums.js +27 -0
- package/esm/ButtonBase/index.d.ts +1 -1
- package/esm/ButtonBase/index.js +1 -1
- package/{ButtonBase/styled.d.ts → esm/ButtonBase/styles.d.ts} +10 -8
- package/esm/ButtonBase/{styled.js → styles.js} +40 -23
- package/esm/ButtonBase/types.d.ts +1 -1
- package/esm/Description/styles.js +4 -1
- package/esm/GlobalStyles/GlobalStyles.js +8 -3
- package/esm/IconButton/IconButton.js +2 -2
- package/esm/IconButton/styles.d.ts +4 -3
- package/esm/IconButton/styles.js +15 -5
- package/esm/theme/components/MuiButton.js +9 -9
- package/esm/theme/components/MuiLoadingButton.js +2 -2
- package/package.json +2 -2
- package/theme/components/MuiButton.js +20 -20
- package/theme/components/MuiLoadingButton.js +3 -3
- package/ButtonBase/constants.d.ts +0 -22
- package/esm/ButtonBase/constants.d.ts +0 -22
- package/esm/ButtonBase/constants.js +0 -26
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MuiButton = void 0;
|
|
4
4
|
var ButtonBase_1 = require("../../ButtonBase");
|
|
5
|
-
var
|
|
5
|
+
var styles_1 = require("../../ButtonBase/styles");
|
|
6
6
|
exports.MuiButton = {
|
|
7
7
|
defaultProps: {
|
|
8
8
|
disableRipple: true,
|
|
@@ -16,25 +16,25 @@ exports.MuiButton = {
|
|
|
16
16
|
return {
|
|
17
17
|
display: 'inline-flex',
|
|
18
18
|
gap: theme.spacing(1),
|
|
19
|
-
color: (0,
|
|
19
|
+
color: (0, styles_1.getColor)({
|
|
20
20
|
selected: selected,
|
|
21
21
|
theme: theme,
|
|
22
22
|
customVariant: customVariant,
|
|
23
23
|
customColor: customColor,
|
|
24
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
24
|
+
buttonState: ButtonBase_1.ButtonStates.Default,
|
|
25
25
|
}),
|
|
26
|
-
backgroundColor: (0,
|
|
26
|
+
backgroundColor: (0, styles_1.getBgColor)({
|
|
27
27
|
selected: selected,
|
|
28
28
|
customColor: customColor,
|
|
29
29
|
customVariant: customVariant,
|
|
30
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
30
|
+
buttonState: ButtonBase_1.ButtonStates.Default,
|
|
31
31
|
theme: theme,
|
|
32
32
|
}),
|
|
33
|
-
height: (0,
|
|
33
|
+
height: (0, styles_1.getButtonHeight)({
|
|
34
34
|
theme: theme,
|
|
35
35
|
size: ownerState.size,
|
|
36
36
|
}),
|
|
37
|
-
padding: (0,
|
|
37
|
+
padding: (0, styles_1.getButtonPadding)({
|
|
38
38
|
theme: theme,
|
|
39
39
|
size: ownerState.size,
|
|
40
40
|
}),
|
|
@@ -45,60 +45,60 @@ exports.MuiButton = {
|
|
|
45
45
|
textTransform: 'none',
|
|
46
46
|
boxShadow: 'none',
|
|
47
47
|
'&:hover': {
|
|
48
|
-
color: (0,
|
|
48
|
+
color: (0, styles_1.getColor)({
|
|
49
49
|
selected: selected,
|
|
50
50
|
theme: theme,
|
|
51
51
|
customVariant: customVariant,
|
|
52
52
|
customColor: customColor,
|
|
53
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
53
|
+
buttonState: ButtonBase_1.ButtonStates.Hover,
|
|
54
54
|
}),
|
|
55
|
-
backgroundColor: (0,
|
|
55
|
+
backgroundColor: (0, styles_1.getBgColor)({
|
|
56
56
|
selected: selected,
|
|
57
57
|
customColor: customColor,
|
|
58
58
|
customVariant: customVariant,
|
|
59
59
|
theme: theme,
|
|
60
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
60
|
+
buttonState: ButtonBase_1.ButtonStates.Hover,
|
|
61
61
|
}),
|
|
62
62
|
boxShadow: 'none',
|
|
63
63
|
},
|
|
64
64
|
'&:active': {
|
|
65
|
-
color: (0,
|
|
65
|
+
color: (0, styles_1.getColor)({
|
|
66
66
|
selected: selected,
|
|
67
67
|
customColor: customColor,
|
|
68
68
|
customVariant: customVariant,
|
|
69
69
|
theme: theme,
|
|
70
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
70
|
+
buttonState: ButtonBase_1.ButtonStates.Active,
|
|
71
71
|
}),
|
|
72
|
-
backgroundColor: (0,
|
|
72
|
+
backgroundColor: (0, styles_1.getBgColor)({
|
|
73
73
|
selected: selected,
|
|
74
74
|
customColor: customColor,
|
|
75
75
|
customVariant: customVariant,
|
|
76
76
|
theme: theme,
|
|
77
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
77
|
+
buttonState: ButtonBase_1.ButtonStates.Active,
|
|
78
78
|
}),
|
|
79
79
|
outline: 'none',
|
|
80
80
|
},
|
|
81
81
|
'&.Mui-disabled': {
|
|
82
82
|
color: theme.palette.grey['500'],
|
|
83
|
-
backgroundColor: (0,
|
|
83
|
+
backgroundColor: (0, styles_1.getDisabledBgColor)({
|
|
84
84
|
theme: theme,
|
|
85
85
|
customVariant: customVariant,
|
|
86
86
|
}),
|
|
87
87
|
},
|
|
88
88
|
'&.Mui-focusVisible': {
|
|
89
|
-
color: (0,
|
|
89
|
+
color: (0, styles_1.getColor)({
|
|
90
90
|
selected: selected,
|
|
91
91
|
theme: theme,
|
|
92
92
|
customVariant: customVariant,
|
|
93
93
|
customColor: customColor,
|
|
94
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
94
|
+
buttonState: ButtonBase_1.ButtonStates.Focus,
|
|
95
95
|
}),
|
|
96
|
-
backgroundColor: (0,
|
|
96
|
+
backgroundColor: (0, styles_1.getBgColor)({
|
|
97
97
|
selected: selected,
|
|
98
98
|
customColor: customColor,
|
|
99
99
|
customVariant: customVariant,
|
|
100
100
|
theme: theme,
|
|
101
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
101
|
+
buttonState: ButtonBase_1.ButtonStates.Focus,
|
|
102
102
|
}),
|
|
103
103
|
outline: "2px solid ".concat(theme.palette.primary['400']),
|
|
104
104
|
boxShadow: 'none',
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MuiLoadingButton = void 0;
|
|
4
4
|
var lab_1 = require("@mui/lab");
|
|
5
5
|
var ButtonBase_1 = require("../../ButtonBase");
|
|
6
|
-
var
|
|
6
|
+
var styles_1 = require("../../ButtonBase/styles");
|
|
7
7
|
exports.MuiLoadingButton = {
|
|
8
8
|
defaultProps: {
|
|
9
9
|
disableRipple: true,
|
|
@@ -16,11 +16,11 @@ exports.MuiLoadingButton = {
|
|
|
16
16
|
var customColor = ownerState.color;
|
|
17
17
|
return _b = {},
|
|
18
18
|
_b["&.".concat(lab_1.loadingButtonClasses.loading)] = {
|
|
19
|
-
backgroundColor: (0,
|
|
19
|
+
backgroundColor: (0, styles_1.getBgColor)({
|
|
20
20
|
customColor: customColor,
|
|
21
21
|
customVariant: customVariant,
|
|
22
22
|
theme: theme,
|
|
23
|
-
buttonState: ButtonBase_1.ButtonStates.
|
|
23
|
+
buttonState: ButtonBase_1.ButtonStates.Default,
|
|
24
24
|
}),
|
|
25
25
|
},
|
|
26
26
|
_b;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare enum ButtonColors {
|
|
2
|
-
ERROR = "error",
|
|
3
|
-
SUCCESS = "success",
|
|
4
|
-
WARNING = "warning",
|
|
5
|
-
PRIMARY = "primary"
|
|
6
|
-
}
|
|
7
|
-
export declare enum ButtonVariants {
|
|
8
|
-
CONTAINED = "contained",
|
|
9
|
-
LIGHT = "light",
|
|
10
|
-
TEXT = "text",
|
|
11
|
-
LINK = "link"
|
|
12
|
-
}
|
|
13
|
-
export declare enum ButtonSizes {
|
|
14
|
-
MEDIUM = "medium",
|
|
15
|
-
LARGE = "large"
|
|
16
|
-
}
|
|
17
|
-
export declare enum ButtonStates {
|
|
18
|
-
DEFAULT = "default",
|
|
19
|
-
ACTIVE = "active",
|
|
20
|
-
FOCUS = "focus",
|
|
21
|
-
HOVER = "hover"
|
|
22
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare enum ButtonColors {
|
|
2
|
-
ERROR = "error",
|
|
3
|
-
SUCCESS = "success",
|
|
4
|
-
WARNING = "warning",
|
|
5
|
-
PRIMARY = "primary"
|
|
6
|
-
}
|
|
7
|
-
export declare enum ButtonVariants {
|
|
8
|
-
CONTAINED = "contained",
|
|
9
|
-
LIGHT = "light",
|
|
10
|
-
TEXT = "text",
|
|
11
|
-
LINK = "link"
|
|
12
|
-
}
|
|
13
|
-
export declare enum ButtonSizes {
|
|
14
|
-
MEDIUM = "medium",
|
|
15
|
-
LARGE = "large"
|
|
16
|
-
}
|
|
17
|
-
export declare enum ButtonStates {
|
|
18
|
-
DEFAULT = "default",
|
|
19
|
-
ACTIVE = "active",
|
|
20
|
-
FOCUS = "focus",
|
|
21
|
-
HOVER = "hover"
|
|
22
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export var ButtonColors;
|
|
2
|
-
(function (ButtonColors) {
|
|
3
|
-
ButtonColors["ERROR"] = "error";
|
|
4
|
-
ButtonColors["SUCCESS"] = "success";
|
|
5
|
-
ButtonColors["WARNING"] = "warning";
|
|
6
|
-
ButtonColors["PRIMARY"] = "primary";
|
|
7
|
-
})(ButtonColors || (ButtonColors = {}));
|
|
8
|
-
export var ButtonVariants;
|
|
9
|
-
(function (ButtonVariants) {
|
|
10
|
-
ButtonVariants["CONTAINED"] = "contained";
|
|
11
|
-
ButtonVariants["LIGHT"] = "light";
|
|
12
|
-
ButtonVariants["TEXT"] = "text";
|
|
13
|
-
ButtonVariants["LINK"] = "link";
|
|
14
|
-
})(ButtonVariants || (ButtonVariants = {}));
|
|
15
|
-
export var ButtonSizes;
|
|
16
|
-
(function (ButtonSizes) {
|
|
17
|
-
ButtonSizes["MEDIUM"] = "medium";
|
|
18
|
-
ButtonSizes["LARGE"] = "large";
|
|
19
|
-
})(ButtonSizes || (ButtonSizes = {}));
|
|
20
|
-
export var ButtonStates;
|
|
21
|
-
(function (ButtonStates) {
|
|
22
|
-
ButtonStates["DEFAULT"] = "default";
|
|
23
|
-
ButtonStates["ACTIVE"] = "active";
|
|
24
|
-
ButtonStates["FOCUS"] = "focus";
|
|
25
|
-
ButtonStates["HOVER"] = "hover";
|
|
26
|
-
})(ButtonStates || (ButtonStates = {}));
|