@astral/ui 1.15.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);
@@ -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;
@@ -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
  }
@@ -15,20 +15,65 @@ exports.PlaceholderRoot = styles_1.styled.div(templateObject_1 || (templateObjec
15
15
  return theme.palette.background.paper;
16
16
  });
17
17
  exports.PlaceholderInnerContainer = styles_1.styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 384px;\n"], ["\n max-width: 384px;\n"])));
18
- exports.PlaceholderImage = styles_1.styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n"])), function (_a) {
18
+ exports.PlaceholderImage = styles_1.styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
19
+ var theme = _a.theme;
20
+ return theme.spacing(6);
21
+ }, function (_a) {
22
+ var theme = _a.theme;
23
+ return theme.breakpoints.up('sm');
24
+ }, function (_a) {
19
25
  var theme = _a.theme;
20
26
  return theme.spacing(8);
27
+ }, function (_a) {
28
+ var theme = _a.theme;
29
+ return theme.palette.grey[900];
21
30
  });
22
- exports.PlaceholderTitle = (0, styles_1.styled)(Typography_1.Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: ", ";\n\n text-align: center;\n"], ["\n margin-bottom: ", ";\n\n text-align: center;\n"])), function (_a) {
31
+ exports.PlaceholderTitle = (0, styles_1.styled)(Typography_1.Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n\n text-align: center;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n }\n"], ["\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n\n text-align: center;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n }\n"])), function (_a) {
32
+ var theme = _a.theme;
33
+ return theme.spacing(6);
34
+ }, function (_a) {
35
+ var theme = _a.theme;
36
+ return theme.palette.grey[700];
37
+ }, function (_a) {
38
+ var theme = _a.theme;
39
+ return theme.typography.fontWeightRegular;
40
+ }, function (_a) {
41
+ var theme = _a.theme;
42
+ return theme.breakpoints.up('sm');
43
+ }, function (_a) {
23
44
  var theme = _a.theme;
24
45
  return theme.spacing(4);
46
+ }, function (_a) {
47
+ var theme = _a.theme;
48
+ return theme.palette.grey[900];
49
+ }, function (_a) {
50
+ var theme = _a.theme;
51
+ return theme.typography.fontWeightMedium;
25
52
  });
26
- exports.PlaceholderDescription = (0, styles_1.styled)(Typography_1.Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n\n text-align: center;\n"], ["\n display: block;\n\n text-align: center;\n"])));
27
- exports.PlaceholderActions = styles_1.styled.footer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n"], ["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n"])), function (_a) {
53
+ exports.PlaceholderDescription = (0, styles_1.styled)(Typography_1.Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n\n color: ", ";\n\n text-align: center;\n\n ", " {\n color: ", ";\n }\n"], ["\n display: block;\n\n color: ", ";\n\n text-align: center;\n\n ", " {\n color: ", ";\n }\n"])), function (_a) {
54
+ var theme = _a.theme;
55
+ return theme.palette.grey[700];
56
+ }, function (_a) {
57
+ var theme = _a.theme;
58
+ return theme.breakpoints.up('sm');
59
+ }, function (_a) {
60
+ var theme = _a.theme;
61
+ return theme.palette.grey[900];
62
+ });
63
+ exports.PlaceholderActions = styles_1.styled.footer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
28
64
  var theme = _a.theme;
29
65
  return theme.spacing(1);
66
+ }, function (_a) {
67
+ var theme = _a.theme;
68
+ return theme.spacing(6);
69
+ }, function (_a) {
70
+ var theme = _a.theme;
71
+ return theme.breakpoints.up('sm');
30
72
  }, function (_a) {
31
73
  var theme = _a.theme;
32
74
  return theme.spacing(5);
75
+ }, function (_a) {
76
+ var theme = _a.theme;
77
+ return theme.palette.grey[900];
33
78
  });
34
79
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
@@ -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;
@@ -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
  }
@@ -12,20 +12,65 @@ export var PlaceholderRoot = styled.div(templateObject_1 || (templateObject_1 =
12
12
  return theme.palette.background.paper;
13
13
  });
14
14
  export var PlaceholderInnerContainer = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 384px;\n"], ["\n max-width: 384px;\n"])));
15
- export var PlaceholderImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n"])), function (_a) {
15
+ export var PlaceholderImage = styled.img(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: block;\n width: 100%;\n height: 162px;\n margin: auto auto ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
16
+ var theme = _a.theme;
17
+ return theme.spacing(6);
18
+ }, function (_a) {
19
+ var theme = _a.theme;
20
+ return theme.breakpoints.up('sm');
21
+ }, function (_a) {
16
22
  var theme = _a.theme;
17
23
  return theme.spacing(8);
24
+ }, function (_a) {
25
+ var theme = _a.theme;
26
+ return theme.palette.grey[900];
18
27
  });
19
- export var PlaceholderTitle = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: ", ";\n\n text-align: center;\n"], ["\n margin-bottom: ", ";\n\n text-align: center;\n"])), function (_a) {
28
+ export var PlaceholderTitle = styled(Typography)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n\n text-align: center;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n }\n"], ["\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n\n text-align: center;\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n font-weight: ", ";\n }\n"])), function (_a) {
29
+ var theme = _a.theme;
30
+ return theme.spacing(6);
31
+ }, function (_a) {
32
+ var theme = _a.theme;
33
+ return theme.palette.grey[700];
34
+ }, function (_a) {
35
+ var theme = _a.theme;
36
+ return theme.typography.fontWeightRegular;
37
+ }, function (_a) {
38
+ var theme = _a.theme;
39
+ return theme.breakpoints.up('sm');
40
+ }, function (_a) {
20
41
  var theme = _a.theme;
21
42
  return theme.spacing(4);
43
+ }, function (_a) {
44
+ var theme = _a.theme;
45
+ return theme.palette.grey[900];
46
+ }, function (_a) {
47
+ var theme = _a.theme;
48
+ return theme.typography.fontWeightMedium;
22
49
  });
23
- export var PlaceholderDescription = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n\n text-align: center;\n"], ["\n display: block;\n\n text-align: center;\n"])));
24
- export var PlaceholderActions = styled.footer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n"], ["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n"])), function (_a) {
50
+ export var PlaceholderDescription = styled(Typography)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: block;\n\n color: ", ";\n\n text-align: center;\n\n ", " {\n color: ", ";\n }\n"], ["\n display: block;\n\n color: ", ";\n\n text-align: center;\n\n ", " {\n color: ", ";\n }\n"])), function (_a) {
51
+ var theme = _a.theme;
52
+ return theme.palette.grey[700];
53
+ }, function (_a) {
54
+ var theme = _a.theme;
55
+ return theme.breakpoints.up('sm');
56
+ }, function (_a) {
57
+ var theme = _a.theme;
58
+ return theme.palette.grey[900];
59
+ });
60
+ export var PlaceholderActions = styled.footer(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"], ["\n display: flex;\n flex-wrap: wrap;\n\n gap: ", ";\n justify-content: center;\n\n margin-top: ", ";\n\n ", " {\n margin-bottom: ", ";\n\n color: ", ";\n }\n"])), function (_a) {
25
61
  var theme = _a.theme;
26
62
  return theme.spacing(1);
63
+ }, function (_a) {
64
+ var theme = _a.theme;
65
+ return theme.spacing(6);
66
+ }, function (_a) {
67
+ var theme = _a.theme;
68
+ return theme.breakpoints.up('sm');
27
69
  }, function (_a) {
28
70
  var theme = _a.theme;
29
71
  return theme.spacing(5);
72
+ }, function (_a) {
73
+ var theme = _a.theme;
74
+ return theme.palette.grey[900];
30
75
  });
31
76
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
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.15.0",
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.15.0",
34
+ "version": "1.16.1",
35
35
  "author": "Astral.Soft",
36
36
  "license": "MIT",
37
37
  "repository": {