@astral/ui 1.9.1 → 1.10.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/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/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
package/Button/Button.js
CHANGED
|
@@ -24,19 +24,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.Button = void 0;
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
-
var lab_1 = require("@mui/lab");
|
|
28
27
|
var react_1 = require("react");
|
|
29
28
|
var ButtonBase_1 = require("../ButtonBase");
|
|
30
29
|
var CircularProgress_1 = require("../CircularProgress");
|
|
31
30
|
var constants_1 = require("../CircularProgress/constants");
|
|
31
|
+
var styles_1 = require("./styles");
|
|
32
32
|
exports.Button = (0, react_1.forwardRef)(function (props, ref) {
|
|
33
|
-
var _a = props.variant, variant = _a === void 0 ? ButtonBase_1.ButtonVariants.
|
|
33
|
+
var _a = props.variant, variant = _a === void 0 ? ButtonBase_1.ButtonVariants.Contained : _a, _b = props.color, color = _b === void 0 ? ButtonBase_1.ButtonColors.Primary : _b, restProps = __rest(props, ["variant", "color"]);
|
|
34
34
|
var loadingIndicatorColor = (0, react_1.useMemo)(function () {
|
|
35
|
-
if (variant !== ButtonBase_1.ButtonVariants.
|
|
35
|
+
if (variant !== ButtonBase_1.ButtonVariants.Contained) {
|
|
36
36
|
return constants_1.CircularProgressColors.PRIMARY;
|
|
37
37
|
}
|
|
38
38
|
return constants_1.CircularProgressColors.INVERTED;
|
|
39
39
|
}, [variant]);
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
40
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingButtonWrapper, __assign({ ref: ref }, restProps, { variant: variant, color: color, loadingIndicator: (0, jsx_runtime_1.jsx)(CircularProgress_1.CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
|
|
41
41
|
});
|
|
42
42
|
exports.default = exports.Button;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const LoadingButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
classes?: (Partial<import("@mui/material").ButtonClasses> & {
|
|
4
|
+
root?: string | undefined;
|
|
5
|
+
loading?: string | undefined;
|
|
6
|
+
loadingIndicator?: string | undefined;
|
|
7
|
+
loadingIndicatorCenter?: string | undefined;
|
|
8
|
+
loadingIndicatorStart?: string | undefined;
|
|
9
|
+
loadingIndicatorEnd?: string | undefined;
|
|
10
|
+
endIconLoadingEnd?: string | undefined;
|
|
11
|
+
startIconLoadingStart?: string | undefined;
|
|
12
|
+
}) | undefined;
|
|
13
|
+
loading?: boolean | undefined;
|
|
14
|
+
loadingIndicator?: import("react").ReactNode;
|
|
15
|
+
loadingPosition?: "center" | "end" | "start" | undefined;
|
|
16
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
17
|
+
} & Omit<{
|
|
18
|
+
children?: import("react").ReactNode;
|
|
19
|
+
classes?: Partial<import("@mui/material").ButtonClasses> | undefined;
|
|
20
|
+
color?: "inherit" | "primary" | "secondary" | "error" | "warning" | "info" | "success" | undefined;
|
|
21
|
+
disabled?: boolean | undefined;
|
|
22
|
+
disableElevation?: boolean | undefined;
|
|
23
|
+
disableFocusRipple?: boolean | undefined;
|
|
24
|
+
endIcon?: import("react").ReactNode;
|
|
25
|
+
fullWidth?: boolean | undefined;
|
|
26
|
+
href?: string | undefined;
|
|
27
|
+
size?: "large" | "medium" | "small" | undefined;
|
|
28
|
+
startIcon?: import("react").ReactNode;
|
|
29
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
30
|
+
variant?: "link" | "light" | "outlined" | "text" | "contained" | undefined;
|
|
31
|
+
} & Omit<{
|
|
32
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
33
|
+
centerRipple?: boolean | undefined;
|
|
34
|
+
children?: import("react").ReactNode;
|
|
35
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
36
|
+
disabled?: boolean | undefined;
|
|
37
|
+
disableRipple?: boolean | undefined;
|
|
38
|
+
disableTouchRipple?: boolean | undefined;
|
|
39
|
+
focusRipple?: boolean | undefined;
|
|
40
|
+
focusVisibleClassName?: string | undefined;
|
|
41
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
42
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
43
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
44
|
+
tabIndex?: number | undefined;
|
|
45
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
46
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
47
|
+
}, "classes">, "classes"> & Omit<{
|
|
48
|
+
action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
|
|
49
|
+
centerRipple?: boolean | undefined;
|
|
50
|
+
children?: import("react").ReactNode;
|
|
51
|
+
classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
|
|
52
|
+
disabled?: boolean | undefined;
|
|
53
|
+
disableRipple?: boolean | undefined;
|
|
54
|
+
disableTouchRipple?: boolean | undefined;
|
|
55
|
+
focusRipple?: boolean | undefined;
|
|
56
|
+
focusVisibleClassName?: string | undefined;
|
|
57
|
+
LinkComponent?: import("react").ElementType<any> | undefined;
|
|
58
|
+
onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
|
|
59
|
+
sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
|
|
60
|
+
tabIndex?: number | undefined;
|
|
61
|
+
TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
|
|
62
|
+
touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
|
|
63
|
+
}, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | "css" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
64
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
65
|
+
}, "disabled" | "action" | "color" | "href" | "onFocusVisible" | "tabIndex" | "children" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & {
|
|
66
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
67
|
+
} & Omit<import("@mui/lab").LoadingButtonProps<"button", {}>, "color" | "variant"> & {
|
|
68
|
+
variant?: "link" | "light" | "text" | "contained" | undefined;
|
|
69
|
+
color?: "primary" | "error" | "warning" | "success" | undefined;
|
|
70
|
+
component?: import("react").ElementType<any> | undefined;
|
|
71
|
+
selected?: boolean | undefined;
|
|
72
|
+
}, {}, {}>;
|
package/Button/styles.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.LoadingButtonWrapper = void 0;
|
|
8
|
+
var lab_1 = require("@mui/lab");
|
|
9
|
+
var styles_1 = require("../styles");
|
|
10
|
+
var styles_2 = require("../ButtonBase/styles");
|
|
11
|
+
exports.LoadingButtonWrapper = (0, styles_1.styled)(lab_1.LoadingButton, {
|
|
12
|
+
shouldForwardProp: function (prop) {
|
|
13
|
+
return prop !== 'customColor' && prop !== 'customVariant';
|
|
14
|
+
},
|
|
15
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", " {\n height: ", ";\n padding: ", ";\n\n white-space: nowrap;\n }\n"], ["\n ", " {\n height: ", ";\n padding: ", ";\n\n white-space: nowrap;\n }\n"])), function (_a) {
|
|
16
|
+
var theme = _a.theme;
|
|
17
|
+
return theme.breakpoints.down('sm');
|
|
18
|
+
}, styles_2.getButtonHeightMobile, styles_2.getButtonPaddingMobile);
|
|
19
|
+
var templateObject_1;
|
package/ButtonBase/ButtonBase.js
CHANGED
|
@@ -25,9 +25,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
exports.ButtonBase = void 0;
|
|
26
26
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
27
|
var react_1 = require("react");
|
|
28
|
-
var
|
|
29
|
-
var
|
|
28
|
+
var enums_1 = require("./enums");
|
|
29
|
+
var styles_1 = require("./styles");
|
|
30
30
|
exports.ButtonBase = (0, react_1.forwardRef)(function (_a, ref) {
|
|
31
|
-
var children = _a.children, _b = _a.variant, variant = _b === void 0 ?
|
|
32
|
-
return ((0, jsx_runtime_1.jsx)(
|
|
31
|
+
var children = _a.children, _b = _a.variant, variant = _b === void 0 ? enums_1.ButtonVariants.Contained : _b, _c = _a.color, color = _c === void 0 ? enums_1.ButtonColors.Primary : _c, props = __rest(_a, ["children", "variant", "color"]);
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ButtonBaseWrapper, __assign({ ref: ref }, props, { customColor: color, customVariant: variant }, { children: children })));
|
|
33
33
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
Small = "small",
|
|
15
|
+
Medium = "medium",
|
|
16
|
+
Large = "large"
|
|
17
|
+
}
|
|
18
|
+
export declare enum ButtonStates {
|
|
19
|
+
Default = "default",
|
|
20
|
+
Active = "active",
|
|
21
|
+
Focus = "focus",
|
|
22
|
+
Hover = "hover"
|
|
23
|
+
}
|
|
@@ -3,27 +3,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ButtonStates = exports.ButtonSizes = exports.ButtonVariants = exports.ButtonColors = void 0;
|
|
4
4
|
var ButtonColors;
|
|
5
5
|
(function (ButtonColors) {
|
|
6
|
-
ButtonColors["
|
|
7
|
-
ButtonColors["
|
|
8
|
-
ButtonColors["
|
|
9
|
-
ButtonColors["
|
|
6
|
+
ButtonColors["Error"] = "error";
|
|
7
|
+
ButtonColors["Success"] = "success";
|
|
8
|
+
ButtonColors["Warning"] = "warning";
|
|
9
|
+
ButtonColors["Primary"] = "primary";
|
|
10
10
|
})(ButtonColors = exports.ButtonColors || (exports.ButtonColors = {}));
|
|
11
11
|
var ButtonVariants;
|
|
12
12
|
(function (ButtonVariants) {
|
|
13
|
-
ButtonVariants["
|
|
14
|
-
ButtonVariants["
|
|
15
|
-
ButtonVariants["
|
|
16
|
-
ButtonVariants["
|
|
13
|
+
ButtonVariants["Contained"] = "contained";
|
|
14
|
+
ButtonVariants["Light"] = "light";
|
|
15
|
+
ButtonVariants["Text"] = "text";
|
|
16
|
+
ButtonVariants["Link"] = "link";
|
|
17
17
|
})(ButtonVariants = exports.ButtonVariants || (exports.ButtonVariants = {}));
|
|
18
18
|
var ButtonSizes;
|
|
19
19
|
(function (ButtonSizes) {
|
|
20
|
-
ButtonSizes["
|
|
21
|
-
ButtonSizes["
|
|
20
|
+
ButtonSizes["Small"] = "small";
|
|
21
|
+
ButtonSizes["Medium"] = "medium";
|
|
22
|
+
ButtonSizes["Large"] = "large";
|
|
22
23
|
})(ButtonSizes = exports.ButtonSizes || (exports.ButtonSizes = {}));
|
|
23
24
|
var ButtonStates;
|
|
24
25
|
(function (ButtonStates) {
|
|
25
|
-
ButtonStates["
|
|
26
|
-
ButtonStates["
|
|
27
|
-
ButtonStates["
|
|
28
|
-
ButtonStates["
|
|
26
|
+
ButtonStates["Default"] = "default";
|
|
27
|
+
ButtonStates["Active"] = "active";
|
|
28
|
+
ButtonStates["Focus"] = "focus";
|
|
29
|
+
ButtonStates["Hover"] = "hover";
|
|
29
30
|
})(ButtonStates = exports.ButtonStates || (exports.ButtonStates = {}));
|
package/ButtonBase/index.d.ts
CHANGED
package/ButtonBase/index.js
CHANGED
|
@@ -15,5 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ButtonBase"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./enums"), exports);
|
|
19
19
|
__exportStar(require("./types"), exports);
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Theme } from '../theme';
|
|
3
3
|
import { BaseButtonProps, ButtonColor, ButtonSize, ButtonState, ButtonVariant } from './types';
|
|
4
|
-
export declare type
|
|
4
|
+
export declare type ButtonBaseWrapperProps = Omit<BaseButtonProps, 'color' | 'variant'> & {
|
|
5
5
|
customColor?: ButtonColor;
|
|
6
6
|
customVariant?: ButtonVariant;
|
|
7
7
|
};
|
|
8
|
-
export declare type
|
|
8
|
+
export declare type ButtonBaseWrapperThemeProps = {
|
|
9
9
|
customColor?: ButtonColor;
|
|
10
10
|
customVariant?: ButtonVariant;
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
size?: ButtonSize;
|
|
13
13
|
theme: Theme;
|
|
14
14
|
};
|
|
15
|
-
export declare const getColor: ({ theme, customVariant, customColor, buttonState, selected, }:
|
|
15
|
+
export declare const getColor: ({ theme, customVariant, customColor, buttonState, selected, }: ButtonBaseWrapperThemeProps & {
|
|
16
16
|
buttonState: ButtonState;
|
|
17
17
|
}) => string;
|
|
18
|
-
export declare const getBgColor: ({ selected, customColor, customVariant, buttonState, theme, }:
|
|
18
|
+
export declare const getBgColor: ({ selected, customColor, customVariant, buttonState, theme, }: ButtonBaseWrapperThemeProps & {
|
|
19
19
|
buttonState: ButtonState;
|
|
20
20
|
}) => string;
|
|
21
|
-
export declare const getButtonHeight: ({ size, }:
|
|
22
|
-
export declare const getButtonPadding: ({ size, theme, }:
|
|
23
|
-
export declare const getDisabledBgColor: ({ theme, customVariant, }:
|
|
24
|
-
export declare const
|
|
21
|
+
export declare const getButtonHeight: ({ size, }: ButtonBaseWrapperThemeProps) => string;
|
|
22
|
+
export declare const getButtonPadding: ({ size, theme, }: ButtonBaseWrapperThemeProps) => string;
|
|
23
|
+
export declare const getDisabledBgColor: ({ theme, customVariant, }: ButtonBaseWrapperThemeProps) => string;
|
|
24
|
+
export declare const getButtonPaddingMobile: ({ size, theme, }: ButtonBaseWrapperThemeProps) => string;
|
|
25
|
+
export declare const getButtonHeightMobile: ({ size, }: ButtonBaseWrapperThemeProps) => string;
|
|
26
|
+
export declare const ButtonBaseWrapper: import("@emotion/styled").StyledComponent<Pick<import("@mui/base/ButtonUnstyled").ButtonUnstyledOwnProps & Omit<any, keyof import("@mui/base/ButtonUnstyled").ButtonUnstyledOwnProps> & {
|
|
25
27
|
component?: import("react").ElementType<any> | undefined;
|
|
26
28
|
}, string | number | symbol> & import("react").RefAttributes<any> & {
|
|
27
29
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -38,10 +38,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
38
38
|
return result;
|
|
39
39
|
};
|
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.
|
|
41
|
+
exports.ButtonBaseWrapper = exports.getButtonHeightMobile = exports.getButtonPaddingMobile = exports.getDisabledBgColor = exports.getButtonPadding = exports.getButtonHeight = exports.getBgColor = exports.getColor = void 0;
|
|
42
42
|
var ButtonUnstyled_1 = __importStar(require("@mui/base/ButtonUnstyled"));
|
|
43
43
|
var styles_1 = require("../styles");
|
|
44
|
-
var
|
|
44
|
+
var enums_1 = require("./enums");
|
|
45
45
|
var getColor = function (_a) {
|
|
46
46
|
var theme = _a.theme, customVariant = _a.customVariant, customColor = _a.customColor, buttonState = _a.buttonState, selected = _a.selected;
|
|
47
47
|
var textColorVariants = {
|
|
@@ -92,17 +92,17 @@ var getColor = function (_a) {
|
|
|
92
92
|
},
|
|
93
93
|
};
|
|
94
94
|
if (selected) {
|
|
95
|
-
return customVariant !==
|
|
95
|
+
return customVariant !== enums_1.ButtonVariants.Link
|
|
96
96
|
? theme.palette.primary.contrastText
|
|
97
97
|
: textColorVariants.selected[buttonState];
|
|
98
98
|
}
|
|
99
|
-
if (customVariant ===
|
|
99
|
+
if (customVariant === enums_1.ButtonVariants.Contained) {
|
|
100
100
|
return textColorVariants.contained;
|
|
101
101
|
}
|
|
102
|
-
if (customVariant ===
|
|
102
|
+
if (customVariant === enums_1.ButtonVariants.Light && customColor) {
|
|
103
103
|
return textColorVariants.light[customColor][buttonState];
|
|
104
104
|
}
|
|
105
|
-
if (customVariant ===
|
|
105
|
+
if (customVariant === enums_1.ButtonVariants.Text) {
|
|
106
106
|
return textColorVariants.text[buttonState];
|
|
107
107
|
}
|
|
108
108
|
return textColorVariants.link[buttonState];
|
|
@@ -177,16 +177,16 @@ var getBgColor = function (_a) {
|
|
|
177
177
|
},
|
|
178
178
|
link: 'transparent',
|
|
179
179
|
};
|
|
180
|
-
if (selected && customVariant !==
|
|
180
|
+
if (selected && customVariant !== enums_1.ButtonVariants.Link) {
|
|
181
181
|
return bgColorVariants.selected[buttonState];
|
|
182
182
|
}
|
|
183
|
-
if (customVariant ===
|
|
183
|
+
if (customVariant === enums_1.ButtonVariants.Light && customColor) {
|
|
184
184
|
return bgColorVariants.light[customColor][buttonState];
|
|
185
185
|
}
|
|
186
|
-
if (customVariant ===
|
|
186
|
+
if (customVariant === enums_1.ButtonVariants.Contained && customColor) {
|
|
187
187
|
return bgColorVariants.contained[customColor][buttonState];
|
|
188
188
|
}
|
|
189
|
-
if (customVariant ===
|
|
189
|
+
if (customVariant === enums_1.ButtonVariants.Text) {
|
|
190
190
|
return bgColorVariants.text[buttonState];
|
|
191
191
|
}
|
|
192
192
|
return bgColorVariants.link;
|
|
@@ -194,7 +194,7 @@ var getBgColor = function (_a) {
|
|
|
194
194
|
exports.getBgColor = getBgColor;
|
|
195
195
|
var getButtonHeight = function (_a) {
|
|
196
196
|
var size = _a.size;
|
|
197
|
-
if (size ===
|
|
197
|
+
if (size === enums_1.ButtonSizes.Large) {
|
|
198
198
|
return '40px';
|
|
199
199
|
}
|
|
200
200
|
return '32px';
|
|
@@ -202,7 +202,7 @@ var getButtonHeight = function (_a) {
|
|
|
202
202
|
exports.getButtonHeight = getButtonHeight;
|
|
203
203
|
var getButtonPadding = function (_a) {
|
|
204
204
|
var size = _a.size, theme = _a.theme;
|
|
205
|
-
if (size ===
|
|
205
|
+
if (size === enums_1.ButtonSizes.Large) {
|
|
206
206
|
return theme.spacing(2, 4, 2, 4);
|
|
207
207
|
}
|
|
208
208
|
return theme.spacing(1, 3, 1, 3);
|
|
@@ -210,19 +210,38 @@ var getButtonPadding = function (_a) {
|
|
|
210
210
|
exports.getButtonPadding = getButtonPadding;
|
|
211
211
|
var getDisabledBgColor = function (_a) {
|
|
212
212
|
var theme = _a.theme, customVariant = _a.customVariant;
|
|
213
|
-
if (customVariant ===
|
|
214
|
-
customVariant ===
|
|
213
|
+
if (customVariant === enums_1.ButtonVariants.Link ||
|
|
214
|
+
customVariant === enums_1.ButtonVariants.Text) {
|
|
215
215
|
return 'transparent';
|
|
216
216
|
}
|
|
217
217
|
return theme.palette.grey['100'];
|
|
218
218
|
};
|
|
219
219
|
exports.getDisabledBgColor = getDisabledBgColor;
|
|
220
|
-
|
|
220
|
+
var getButtonPaddingMobile = function (_a) {
|
|
221
|
+
var size = _a.size, theme = _a.theme;
|
|
222
|
+
if (size === enums_1.ButtonSizes.Small) {
|
|
223
|
+
return theme.spacing(2, 3);
|
|
224
|
+
}
|
|
225
|
+
return theme.spacing(4, 3);
|
|
226
|
+
};
|
|
227
|
+
exports.getButtonPaddingMobile = getButtonPaddingMobile;
|
|
228
|
+
var getButtonHeightMobile = function (_a) {
|
|
229
|
+
var size = _a.size;
|
|
230
|
+
if (size === enums_1.ButtonSizes.Small) {
|
|
231
|
+
return '32px';
|
|
232
|
+
}
|
|
233
|
+
return '48px';
|
|
234
|
+
};
|
|
235
|
+
exports.getButtonHeightMobile = getButtonHeightMobile;
|
|
236
|
+
exports.ButtonBaseWrapper = (0, styles_1.styled)(ButtonUnstyled_1.default, {
|
|
221
237
|
shouldForwardProp: function (prop) {
|
|
222
238
|
return prop !== 'customColor' && prop !== 'customVariant';
|
|
223
239
|
},
|
|
224
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: ", ";\n padding: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-family: Ubuntu, serif;\n\n background-color: ", ";\n border: none;\n border-radius: ", ";\n cursor: pointer;\n\n &:hover {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:focus {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:active {\n color: ", ";\n\n background-color: ", ";\n outline: none;\n }\n\n &.", " {\n color: ", ";\n\n background-color: ", ";\n cursor: unset;\n }\n\n &.", " {\n outline: 2px solid ", ";\n }\n"], ["\n position: relative;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: ", ";\n padding: ", ";\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-family: Ubuntu, serif;\n\n background-color: ", ";\n border: none;\n border-radius: ", ";\n cursor: pointer;\n\n &:hover {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:focus {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:active {\n color: ", ";\n\n background-color: ", ";\n outline: none;\n }\n\n &.", " {\n color: ", ";\n\n background-color: ", ";\n cursor: unset;\n }\n\n &.", " {\n outline: 2px solid ", ";\n }\n"])), exports.getButtonHeight, exports.getButtonPadding, function (
|
|
225
|
-
|
|
240
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: ", ";\n padding: ", ";\n\n ", " {\n height: ", ";\n padding: ", ";\n }\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-family: Ubuntu, serif;\n\n background-color: ", ";\n\n border: none;\n border-radius: ", ";\n cursor: pointer;\n\n &:hover {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:focus {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:active {\n color: ", ";\n\n background-color: ", ";\n outline: none;\n }\n\n &.", " {\n color: ", ";\n\n background-color: ", ";\n cursor: unset;\n }\n\n &.", " {\n outline: 2px solid ", ";\n }\n"], ["\n position: relative;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: ", ";\n padding: ", ";\n\n ", " {\n height: ", ";\n padding: ", ";\n }\n\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n font-family: Ubuntu, serif;\n\n background-color: ", ";\n\n border: none;\n border-radius: ", ";\n cursor: pointer;\n\n &:hover {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:focus {\n color: ", ";\n\n background-color: ", ";\n }\n\n &:active {\n color: ", ";\n\n background-color: ", ";\n outline: none;\n }\n\n &.", " {\n color: ", ";\n\n background-color: ", ";\n cursor: unset;\n }\n\n &.", " {\n outline: 2px solid ", ";\n }\n"])), exports.getButtonHeight, exports.getButtonPadding, function (_a) {
|
|
241
|
+
var theme = _a.theme;
|
|
242
|
+
return theme.breakpoints.down('sm');
|
|
243
|
+
}, exports.getButtonHeightMobile, exports.getButtonPaddingMobile, function (props) {
|
|
244
|
+
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Default }));
|
|
226
245
|
}, function (_a) {
|
|
227
246
|
var theme = _a.theme;
|
|
228
247
|
return theme.typography.button.fontWeight;
|
|
@@ -230,22 +249,22 @@ exports.StyledButtonBase = (0, styles_1.styled)(ButtonUnstyled_1.default, {
|
|
|
230
249
|
var theme = _a.theme;
|
|
231
250
|
return theme.typography.button.fontSize;
|
|
232
251
|
}, function (props) {
|
|
233
|
-
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState:
|
|
252
|
+
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Default }));
|
|
234
253
|
}, function (_a) {
|
|
235
254
|
var theme = _a.theme;
|
|
236
255
|
return theme.shape.small;
|
|
237
256
|
}, function (props) {
|
|
238
|
-
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState:
|
|
257
|
+
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Hover }));
|
|
239
258
|
}, function (props) {
|
|
240
|
-
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState:
|
|
259
|
+
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Hover }));
|
|
241
260
|
}, function (props) {
|
|
242
|
-
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState:
|
|
261
|
+
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Focus }));
|
|
243
262
|
}, function (props) {
|
|
244
|
-
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState:
|
|
263
|
+
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Focus }));
|
|
245
264
|
}, function (props) {
|
|
246
|
-
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState:
|
|
265
|
+
return (0, exports.getColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Active }));
|
|
247
266
|
}, function (props) {
|
|
248
|
-
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState:
|
|
267
|
+
return (0, exports.getBgColor)(__assign(__assign({}, props), { buttonState: enums_1.ButtonStates.Active }));
|
|
249
268
|
}, ButtonUnstyled_1.buttonUnstyledClasses.disabled, function (_a) {
|
|
250
269
|
var theme = _a.theme;
|
|
251
270
|
return theme.palette.grey['500'];
|
package/ButtonBase/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonUnstyledProps } from '@mui/base/ButtonUnstyled';
|
|
2
|
-
import { ButtonColors, ButtonSizes, ButtonStates, ButtonVariants } from './
|
|
2
|
+
import { ButtonColors, ButtonSizes, ButtonStates, ButtonVariants } from './enums';
|
|
3
3
|
export declare type ButtonColor = `${ButtonColors}`;
|
|
4
4
|
export declare type ButtonVariant = `${ButtonVariants}`;
|
|
5
5
|
export declare type ButtonSize = `${ButtonSizes}`;
|
|
@@ -28,12 +28,17 @@ var react_1 = require("@emotion/react");
|
|
|
28
28
|
var material_1 = require("@mui/material");
|
|
29
29
|
var theme_1 = require("../theme");
|
|
30
30
|
var GlobalStyles = function (_a) {
|
|
31
|
+
var _b;
|
|
31
32
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
32
33
|
var theme = (0, theme_1.useTheme)();
|
|
33
34
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.CssBaseline, __assign({}, props, { children: children })), (0, jsx_runtime_1.jsx)(react_1.Global, { styles: {
|
|
34
|
-
html: {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
html: (_b = {
|
|
36
|
+
fontSize: theme.typography.htmlFontSize
|
|
37
|
+
},
|
|
38
|
+
_b[theme.breakpoints.down('sm')] = {
|
|
39
|
+
fontSize: 16,
|
|
40
|
+
},
|
|
41
|
+
_b),
|
|
37
42
|
'*': {
|
|
38
43
|
scrollbarWidth: 'thin',
|
|
39
44
|
},
|
package/IconButton/IconButton.js
CHANGED
|
@@ -28,5 +28,5 @@ var react_1 = require("react");
|
|
|
28
28
|
var styles_1 = require("./styles");
|
|
29
29
|
exports.IconButton = (0, react_1.forwardRef)(function (_a, ref) {
|
|
30
30
|
var children = _a.children, props = __rest(_a, ["children"]);
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.IconButtonWrapper, __assign({}, props, { ref: ref }, { children: children })));
|
|
32
32
|
});
|
package/IconButton/styles.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Theme } from '../theme';
|
|
3
3
|
import { ButtonProps } from '../Button';
|
|
4
|
-
declare type
|
|
4
|
+
declare type IconButtonWrapperThemeProps = ButtonProps & {
|
|
5
5
|
theme: Theme;
|
|
6
6
|
};
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const getButtonSize: ({ size, }: IconButtonWrapperThemeProps) => string;
|
|
8
|
+
export declare const getButtonSizeMobile: ({ size, }: IconButtonWrapperThemeProps) => string;
|
|
9
|
+
export declare const IconButtonWrapper: import("@emotion/styled").StyledComponent<Pick<import("../ButtonBase").BaseButtonProps, "color" | "translate" | keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "component" | "selected"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
9
10
|
theme?: import("@emotion/react").Theme | undefined;
|
|
10
11
|
} & Omit<import("@mui/lab").LoadingButtonProps<"button", {}>, "color" | "variant"> & {
|
|
11
12
|
variant?: "link" | "light" | "text" | "contained" | undefined;
|
package/IconButton/styles.js
CHANGED
|
@@ -4,23 +4,34 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
return cooked;
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.
|
|
7
|
+
exports.IconButtonWrapper = exports.getButtonSizeMobile = exports.getButtonSize = void 0;
|
|
8
8
|
var styles_1 = require("../styles");
|
|
9
9
|
var ButtonBase_1 = require("../ButtonBase");
|
|
10
|
-
var
|
|
10
|
+
var getButtonSize = function (_a) {
|
|
11
11
|
var size = _a.size;
|
|
12
|
-
if (size === ButtonBase_1.ButtonSizes.
|
|
12
|
+
if (size === ButtonBase_1.ButtonSizes.Large) {
|
|
13
13
|
return '40px';
|
|
14
14
|
}
|
|
15
15
|
return '32px';
|
|
16
16
|
};
|
|
17
|
-
exports.
|
|
18
|
-
|
|
17
|
+
exports.getButtonSize = getButtonSize;
|
|
18
|
+
var getButtonSizeMobile = function (_a) {
|
|
19
|
+
var size = _a.size;
|
|
20
|
+
if (size === ButtonBase_1.ButtonSizes.Small) {
|
|
21
|
+
return '36px';
|
|
22
|
+
}
|
|
23
|
+
return '48px';
|
|
24
|
+
};
|
|
25
|
+
exports.getButtonSizeMobile = getButtonSizeMobile;
|
|
26
|
+
exports.IconButtonWrapper = (0, styles_1.styled)(ButtonBase_1.ButtonBase, {
|
|
19
27
|
shouldForwardProp: function (prop) {
|
|
20
28
|
return prop !== 'startIcon' && prop !== 'endIcon' && prop !== 'loading';
|
|
21
29
|
},
|
|
22
|
-
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n padding: ", ";\n"], ["\n width: ", ";\n height: ", ";\n padding: ", ";\n"])), exports.
|
|
30
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n padding: ", ";\n\n ", " {\n width: ", ";\n height: ", ";\n }\n"], ["\n width: ", ";\n height: ", ";\n padding: ", ";\n\n ", " {\n width: ", ";\n height: ", ";\n }\n"])), exports.getButtonSize, exports.getButtonSize, function (_a) {
|
|
23
31
|
var theme = _a.theme;
|
|
24
32
|
return theme.spacing(1);
|
|
25
|
-
})
|
|
33
|
+
}, function (_a) {
|
|
34
|
+
var theme = _a.theme;
|
|
35
|
+
return theme.breakpoints.down('sm');
|
|
36
|
+
}, exports.getButtonSizeMobile, exports.getButtonSizeMobile);
|
|
26
37
|
var templateObject_1;
|
package/esm/Button/Button.js
CHANGED
|
@@ -21,19 +21,19 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
-
import { LoadingButton } from '@mui/lab';
|
|
25
24
|
import { forwardRef, useMemo } from 'react';
|
|
26
25
|
import { ButtonColors, ButtonVariants } from '../ButtonBase';
|
|
27
26
|
import { CircularProgress } from '../CircularProgress';
|
|
28
27
|
import { CircularProgressColors } from '../CircularProgress/constants';
|
|
28
|
+
import { LoadingButtonWrapper } from './styles';
|
|
29
29
|
export var Button = forwardRef(function (props, ref) {
|
|
30
|
-
var _a = props.variant, variant = _a === void 0 ? ButtonVariants.
|
|
30
|
+
var _a = props.variant, variant = _a === void 0 ? ButtonVariants.Contained : _a, _b = props.color, color = _b === void 0 ? ButtonColors.Primary : _b, restProps = __rest(props, ["variant", "color"]);
|
|
31
31
|
var loadingIndicatorColor = useMemo(function () {
|
|
32
|
-
if (variant !== ButtonVariants.
|
|
32
|
+
if (variant !== ButtonVariants.Contained) {
|
|
33
33
|
return CircularProgressColors.PRIMARY;
|
|
34
34
|
}
|
|
35
35
|
return CircularProgressColors.INVERTED;
|
|
36
36
|
}, [variant]);
|
|
37
|
-
return (_jsx(
|
|
37
|
+
return (_jsx(LoadingButtonWrapper, __assign({ ref: ref }, restProps, { variant: variant, color: color, loadingIndicator: _jsx(CircularProgress, { color: loadingIndicatorColor, size: "small" }) })));
|
|
38
38
|
});
|
|
39
39
|
export default Button;
|