@astral/ui 1.16.0 → 1.16.1
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/styles.js
CHANGED
|
@@ -8,11 +8,18 @@ exports.LoadingButtonWrapper = void 0;
|
|
|
8
8
|
var lab_1 = require("@mui/lab");
|
|
9
9
|
var styles_1 = require("../styles");
|
|
10
10
|
var styles_2 = require("../ButtonBase/styles");
|
|
11
|
+
var ButtonBase_1 = require("../ButtonBase");
|
|
11
12
|
exports.LoadingButtonWrapper = (0, styles_1.styled)(lab_1.LoadingButton, {
|
|
12
13
|
shouldForwardProp: function (prop) {
|
|
13
14
|
return prop !== 'customColor' && prop !== 'customVariant';
|
|
14
15
|
},
|
|
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
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-width: ", ";\n padding: ", ";\n\n ", " {\n height: ", ";\n padding: ", ";\n\n white-space: nowrap;\n }\n"], ["\n min-width: ", ";\n padding: ", ";\n\n ", " {\n height: ", ";\n padding: ", ";\n\n white-space: nowrap;\n }\n"])), function (_a) {
|
|
17
|
+
var variant = _a.variant;
|
|
18
|
+
return variant === ButtonBase_1.ButtonVariants.Link ? 'auto' : '';
|
|
19
|
+
}, function (_a) {
|
|
20
|
+
var variant = _a.variant;
|
|
21
|
+
return (variant === ButtonBase_1.ButtonVariants.Link ? 0 : '');
|
|
22
|
+
}, function (_a) {
|
|
16
23
|
var theme = _a.theme;
|
|
17
24
|
return theme.breakpoints.down('sm');
|
|
18
25
|
}, styles_2.getButtonHeightMobile, styles_2.getButtonPaddingMobile);
|
package/ButtonBase/styles.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export declare type ButtonBaseWrapperProps = Omit<BaseButtonProps, 'color' | 'va
|
|
|
6
6
|
customVariant?: ButtonVariant;
|
|
7
7
|
};
|
|
8
8
|
export declare type ButtonBaseWrapperThemeProps = {
|
|
9
|
+
variant?: ButtonVariant;
|
|
9
10
|
customColor?: ButtonColor;
|
|
10
11
|
customVariant?: ButtonVariant;
|
|
11
12
|
selected?: boolean;
|
|
@@ -21,7 +22,7 @@ export declare const getBgColor: ({ selected, customColor, customVariant, button
|
|
|
21
22
|
export declare const getButtonHeight: ({ size, }: ButtonBaseWrapperThemeProps) => string;
|
|
22
23
|
export declare const getButtonPadding: ({ size, theme, }: ButtonBaseWrapperThemeProps) => string;
|
|
23
24
|
export declare const getDisabledBgColor: ({ theme, customVariant, }: ButtonBaseWrapperThemeProps) => string;
|
|
24
|
-
export declare const getButtonPaddingMobile: ({ size, theme, }: ButtonBaseWrapperThemeProps) => string;
|
|
25
|
+
export declare const getButtonPaddingMobile: ({ size, theme, variant, }: ButtonBaseWrapperThemeProps) => string;
|
|
25
26
|
export declare const getButtonHeightMobile: ({ size, }: ButtonBaseWrapperThemeProps) => string;
|
|
26
27
|
export declare const ButtonBaseWrapper: import("@emotion/styled").StyledComponent<Pick<import("@mui/base/ButtonUnstyled").ButtonUnstyledOwnProps & Omit<any, keyof import("@mui/base/ButtonUnstyled").ButtonUnstyledOwnProps> & {
|
|
27
28
|
component?: import("react").ElementType<any> | undefined;
|
package/ButtonBase/styles.js
CHANGED
|
@@ -218,7 +218,10 @@ var getDisabledBgColor = function (_a) {
|
|
|
218
218
|
};
|
|
219
219
|
exports.getDisabledBgColor = getDisabledBgColor;
|
|
220
220
|
var getButtonPaddingMobile = function (_a) {
|
|
221
|
-
var size = _a.size, theme = _a.theme;
|
|
221
|
+
var size = _a.size, theme = _a.theme, variant = _a.variant;
|
|
222
|
+
if (variant === enums_1.ButtonVariants.Link) {
|
|
223
|
+
return '0';
|
|
224
|
+
}
|
|
222
225
|
if (size === enums_1.ButtonSizes.Small) {
|
|
223
226
|
return theme.spacing(2, 3);
|
|
224
227
|
}
|
package/esm/Button/styles.js
CHANGED
|
@@ -5,11 +5,18 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
5
5
|
import { LoadingButton } from '@mui/lab';
|
|
6
6
|
import { styled } from '../styles';
|
|
7
7
|
import { getButtonHeightMobile, getButtonPaddingMobile, } from '../ButtonBase/styles';
|
|
8
|
+
import { ButtonVariants } from '../ButtonBase';
|
|
8
9
|
export var LoadingButtonWrapper = styled(LoadingButton, {
|
|
9
10
|
shouldForwardProp: function (prop) {
|
|
10
11
|
return prop !== 'customColor' && prop !== 'customVariant';
|
|
11
12
|
},
|
|
12
|
-
})(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) {
|
|
13
|
+
})(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n min-width: ", ";\n padding: ", ";\n\n ", " {\n height: ", ";\n padding: ", ";\n\n white-space: nowrap;\n }\n"], ["\n min-width: ", ";\n padding: ", ";\n\n ", " {\n height: ", ";\n padding: ", ";\n\n white-space: nowrap;\n }\n"])), function (_a) {
|
|
14
|
+
var variant = _a.variant;
|
|
15
|
+
return variant === ButtonVariants.Link ? 'auto' : '';
|
|
16
|
+
}, function (_a) {
|
|
17
|
+
var variant = _a.variant;
|
|
18
|
+
return (variant === ButtonVariants.Link ? 0 : '');
|
|
19
|
+
}, function (_a) {
|
|
13
20
|
var theme = _a.theme;
|
|
14
21
|
return theme.breakpoints.down('sm');
|
|
15
22
|
}, getButtonHeightMobile, getButtonPaddingMobile);
|
|
@@ -6,6 +6,7 @@ export declare type ButtonBaseWrapperProps = Omit<BaseButtonProps, 'color' | 'va
|
|
|
6
6
|
customVariant?: ButtonVariant;
|
|
7
7
|
};
|
|
8
8
|
export declare type ButtonBaseWrapperThemeProps = {
|
|
9
|
+
variant?: ButtonVariant;
|
|
9
10
|
customColor?: ButtonColor;
|
|
10
11
|
customVariant?: ButtonVariant;
|
|
11
12
|
selected?: boolean;
|
|
@@ -21,7 +22,7 @@ export declare const getBgColor: ({ selected, customColor, customVariant, button
|
|
|
21
22
|
export declare const getButtonHeight: ({ size, }: ButtonBaseWrapperThemeProps) => string;
|
|
22
23
|
export declare const getButtonPadding: ({ size, theme, }: ButtonBaseWrapperThemeProps) => string;
|
|
23
24
|
export declare const getDisabledBgColor: ({ theme, customVariant, }: ButtonBaseWrapperThemeProps) => string;
|
|
24
|
-
export declare const getButtonPaddingMobile: ({ size, theme, }: ButtonBaseWrapperThemeProps) => string;
|
|
25
|
+
export declare const getButtonPaddingMobile: ({ size, theme, variant, }: ButtonBaseWrapperThemeProps) => string;
|
|
25
26
|
export declare const getButtonHeightMobile: ({ size, }: ButtonBaseWrapperThemeProps) => string;
|
|
26
27
|
export declare const ButtonBaseWrapper: import("@emotion/styled").StyledComponent<Pick<import("@mui/base/ButtonUnstyled").ButtonUnstyledOwnProps & Omit<any, keyof import("@mui/base/ButtonUnstyled").ButtonUnstyledOwnProps> & {
|
|
27
28
|
component?: import("react").ElementType<any> | undefined;
|
package/esm/ButtonBase/styles.js
CHANGED
|
@@ -187,7 +187,10 @@ export var getDisabledBgColor = function (_a) {
|
|
|
187
187
|
return theme.palette.grey['100'];
|
|
188
188
|
};
|
|
189
189
|
export var getButtonPaddingMobile = function (_a) {
|
|
190
|
-
var size = _a.size, theme = _a.theme;
|
|
190
|
+
var size = _a.size, theme = _a.theme, variant = _a.variant;
|
|
191
|
+
if (variant === ButtonVariants.Link) {
|
|
192
|
+
return '0';
|
|
193
|
+
}
|
|
191
194
|
if (size === ButtonSizes.Small) {
|
|
192
195
|
return theme.spacing(2, 3);
|
|
193
196
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@astral/ui",
|
|
3
3
|
"browser": "./src/index.ts",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@astral/icons": "^1.16.
|
|
5
|
+
"@astral/icons": "^1.16.1",
|
|
6
6
|
"@emotion/cache": "11.7.1",
|
|
7
7
|
"@emotion/react": "11.9.0",
|
|
8
8
|
"@emotion/server": "11.4.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"require": "./server/index.js"
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
"version": "1.16.
|
|
34
|
+
"version": "1.16.1",
|
|
35
35
|
"author": "Astral.Soft",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"repository": {
|