@astral/ui 4.0.0-alpha.30 → 4.0.0-alpha.31

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.
@@ -1,7 +1,17 @@
1
1
  import { CircleErrorFillSm, DotOutlineSm, SuccessFillSm } from '../../icons';
2
2
  import { Loader } from '../Loader';
3
- import { styled } from '../styles';
3
+ import { keyframes, styled } from '../styles';
4
4
  import { listContainer } from '../styles/mixins';
5
+ const iconAppearAnimation = keyframes `
6
+ from {
7
+ transform: scale(0);
8
+ opacity: 0;
9
+ }
10
+ to {
11
+ transform: scale(1);
12
+ opacity: 1;
13
+ }
14
+ `;
5
15
  export const Wrapper = styled('article') `
6
16
  display: grid;
7
17
  grid-gap: ${({ theme }) => theme.spacing(2)};
@@ -9,11 +19,11 @@ export const Wrapper = styled('article') `
9
19
  padding: ${({ theme, $variant }) => $variant === 'contained' ? theme.spacing(3) : 0};
10
20
 
11
21
  background-color: ${({ theme, $background, $variant }) => $variant === 'contained' ? theme.palette[$background][100] : 'inherit'};
12
- border-radius: ${({ theme }) => theme.shape.small};
22
+ border-radius: ${({ theme }) => theme.shape.medium};
13
23
  `;
14
24
  export const Inner = styled('ul') `
15
25
  display: grid;
16
- grid-gap: ${({ theme }) => theme.spacing(3)};
26
+ grid-gap: ${({ theme }) => theme.spacing(2)};
17
27
 
18
28
  ${listContainer};
19
29
  `;
@@ -33,14 +43,20 @@ export const EmptyIcon = styled(DefaultIcon) `
33
43
  color: ${({ theme }) => theme.palette.grey[800]};
34
44
  `.withComponent(DotOutlineSm);
35
45
  export const RejectIcon = styled(DefaultIcon) `
36
- color: ${({ theme }) => theme.palette.error[900]};
46
+ color: ${({ theme }) => theme.palette.error[800]};
47
+
48
+ animation: ${iconAppearAnimation} ${({ theme }) => theme.transitions.duration.short}ms ease-out;
37
49
  `.withComponent(CircleErrorFillSm);
38
50
  export const SuccessIcon = styled(DefaultIcon) `
39
- color: ${({ theme }) => theme.palette.success[900]};
51
+ color: ${({ theme }) => theme.palette.success[800]};
52
+
53
+ animation: ${iconAppearAnimation} ${({ theme }) => theme.transitions.duration.short}ms ease-out;
40
54
  `.withComponent(SuccessFillSm);
41
55
  export const StyledLoader = styled(Loader) `
42
56
  align-self: center;
43
57
 
44
- width: 14px;
45
- height: 14px;
58
+ width: 12px;
59
+ height: 12px;
60
+ margin-right: ${({ theme }) => theme.microSpacing(1)};
61
+ margin-left: ${({ theme }) => theme.microSpacing(1)};
46
62
  `;
@@ -1,4 +1,4 @@
1
- import { LinearProgress } from '@mui/material';
1
+ import { LinearProgress, linearProgressClasses } from '@mui/material';
2
2
  import { Divider } from '../../Divider';
3
3
  import { styled } from '../../styles';
4
4
  export const Backdrop = styled.div `
@@ -19,4 +19,8 @@ export const LoaderWrapper = styled.div `
19
19
  `;
20
20
  export const StyledLinearProgress = styled(LinearProgress) `
21
21
  height: 2px;
22
+
23
+ .${linearProgressClasses.barColorPrimary} {
24
+ background-color: ${({ theme }) => theme.palette.primary[800]};
25
+ }
22
26
  `;
@@ -6,7 +6,7 @@ const calcMarginStyles = (theme, gutterBottom) => {
6
6
  // для этого повышаем приоритет свойства
7
7
  if (gutterBottom) {
8
8
  return css `
9
- margin-bottom: ${theme.spacing(6)} !important;
9
+ margin-bottom: ${theme.spacing(8)} !important;
10
10
 
11
11
  ${theme.breakpoints.down('sm')} {
12
12
  margin-bottom: ${theme.spacing(4)} !important;
@@ -18,7 +18,7 @@ const calcMarginStyles = (theme, gutterBottom) => {
18
18
  `;
19
19
  }
20
20
  return css `
21
- margin-bottom: ${theme.spacing(6)};
21
+ margin-bottom: ${theme.spacing(8)};
22
22
 
23
23
  ${theme.breakpoints.down('sm')} {
24
24
  margin-bottom: ${theme.spacing(4)};
@@ -1,5 +1,6 @@
1
1
  import { Button } from '../Button';
2
2
  import { Grid } from '../Grid';
3
+ import { loaderClassnames } from '../Loader';
3
4
  import { styled } from '../styles';
4
5
  import { Typography } from '../Typography';
5
6
  export const StyledButton = styled(Button) `
@@ -16,6 +17,10 @@ export const StyledButton = styled(Button) `
16
17
  ${({ theme: { breakpoints } }) => breakpoints.down('sm')} {
17
18
  padding: ${({ theme: { spacing } }) => spacing(4, 5)};
18
19
  }
20
+
21
+ &:has(.${loaderClassnames.root}) {
22
+ justify-content: center;
23
+ }
19
24
  `;
20
25
  export const TargetTextWrapper = styled(Typography) `
21
26
  margin-bottom: ${({ theme: { spacing } }) => spacing(1)};
@@ -19,6 +19,7 @@ export const Header = styled(Typography) `
19
19
  }
20
20
  `;
21
21
  export const Subheader = styled(Typography) `
22
+ margin-top: ${({ theme }) => theme.spacing(-2)};
22
23
  margin-bottom: ${({ theme }) => theme.spacing(2)};
23
24
  ${({ theme }) => theme.breakpoints.down('sm')} {
24
25
  font-size: ${({ theme }) => theme.typography.subtitle1.fontSize};
@@ -9,7 +9,7 @@ export const MuiLinearProgress = {
9
9
  },
10
10
  barColorPrimary({ theme }) {
11
11
  return {
12
- backgroundColor: theme.palette.primary['800'],
12
+ backgroundColor: theme.palette.success['600'],
13
13
  };
14
14
  },
15
15
  },
@@ -5,6 +5,16 @@ const icons_1 = require("../../icons");
5
5
  const Loader_1 = require("../Loader");
6
6
  const styles_1 = require("../styles");
7
7
  const mixins_1 = require("../styles/mixins");
8
+ const iconAppearAnimation = (0, styles_1.keyframes) `
9
+ from {
10
+ transform: scale(0);
11
+ opacity: 0;
12
+ }
13
+ to {
14
+ transform: scale(1);
15
+ opacity: 1;
16
+ }
17
+ `;
8
18
  exports.Wrapper = (0, styles_1.styled)('article') `
9
19
  display: grid;
10
20
  grid-gap: ${({ theme }) => theme.spacing(2)};
@@ -12,11 +22,11 @@ exports.Wrapper = (0, styles_1.styled)('article') `
12
22
  padding: ${({ theme, $variant }) => $variant === 'contained' ? theme.spacing(3) : 0};
13
23
 
14
24
  background-color: ${({ theme, $background, $variant }) => $variant === 'contained' ? theme.palette[$background][100] : 'inherit'};
15
- border-radius: ${({ theme }) => theme.shape.small};
25
+ border-radius: ${({ theme }) => theme.shape.medium};
16
26
  `;
17
27
  exports.Inner = (0, styles_1.styled)('ul') `
18
28
  display: grid;
19
- grid-gap: ${({ theme }) => theme.spacing(3)};
29
+ grid-gap: ${({ theme }) => theme.spacing(2)};
20
30
 
21
31
  ${mixins_1.listContainer};
22
32
  `;
@@ -36,14 +46,20 @@ exports.EmptyIcon = (0, styles_1.styled)(DefaultIcon) `
36
46
  color: ${({ theme }) => theme.palette.grey[800]};
37
47
  `.withComponent(icons_1.DotOutlineSm);
38
48
  exports.RejectIcon = (0, styles_1.styled)(DefaultIcon) `
39
- color: ${({ theme }) => theme.palette.error[900]};
49
+ color: ${({ theme }) => theme.palette.error[800]};
50
+
51
+ animation: ${iconAppearAnimation} ${({ theme }) => theme.transitions.duration.short}ms ease-out;
40
52
  `.withComponent(icons_1.CircleErrorFillSm);
41
53
  exports.SuccessIcon = (0, styles_1.styled)(DefaultIcon) `
42
- color: ${({ theme }) => theme.palette.success[900]};
54
+ color: ${({ theme }) => theme.palette.success[800]};
55
+
56
+ animation: ${iconAppearAnimation} ${({ theme }) => theme.transitions.duration.short}ms ease-out;
43
57
  `.withComponent(icons_1.SuccessFillSm);
44
58
  exports.StyledLoader = (0, styles_1.styled)(Loader_1.Loader) `
45
59
  align-self: center;
46
60
 
47
- width: 14px;
48
- height: 14px;
61
+ width: 12px;
62
+ height: 12px;
63
+ margin-right: ${({ theme }) => theme.microSpacing(1)};
64
+ margin-left: ${({ theme }) => theme.microSpacing(1)};
49
65
  `;
@@ -22,4 +22,8 @@ exports.LoaderWrapper = styles_1.styled.div `
22
22
  `;
23
23
  exports.StyledLinearProgress = (0, styles_1.styled)(material_1.LinearProgress) `
24
24
  height: 2px;
25
+
26
+ .${material_1.linearProgressClasses.barColorPrimary} {
27
+ background-color: ${({ theme }) => theme.palette.primary[800]};
28
+ }
25
29
  `;
@@ -9,7 +9,7 @@ const calcMarginStyles = (theme, gutterBottom) => {
9
9
  // для этого повышаем приоритет свойства
10
10
  if (gutterBottom) {
11
11
  return (0, styles_1.css) `
12
- margin-bottom: ${theme.spacing(6)} !important;
12
+ margin-bottom: ${theme.spacing(8)} !important;
13
13
 
14
14
  ${theme.breakpoints.down('sm')} {
15
15
  margin-bottom: ${theme.spacing(4)} !important;
@@ -21,7 +21,7 @@ const calcMarginStyles = (theme, gutterBottom) => {
21
21
  `;
22
22
  }
23
23
  return (0, styles_1.css) `
24
- margin-bottom: ${theme.spacing(6)};
24
+ margin-bottom: ${theme.spacing(8)};
25
25
 
26
26
  ${theme.breakpoints.down('sm')} {
27
27
  margin-bottom: ${theme.spacing(4)};
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StyledGrid = exports.TargetTextWrapper = exports.StyledButton = void 0;
4
4
  const Button_1 = require("../Button");
5
5
  const Grid_1 = require("../Grid");
6
+ const Loader_1 = require("../Loader");
6
7
  const styles_1 = require("../styles");
7
8
  const Typography_1 = require("../Typography");
8
9
  exports.StyledButton = (0, styles_1.styled)(Button_1.Button) `
@@ -19,6 +20,10 @@ exports.StyledButton = (0, styles_1.styled)(Button_1.Button) `
19
20
  ${({ theme: { breakpoints } }) => breakpoints.down('sm')} {
20
21
  padding: ${({ theme: { spacing } }) => spacing(4, 5)};
21
22
  }
23
+
24
+ &:has(.${Loader_1.loaderClassnames.root}) {
25
+ justify-content: center;
26
+ }
22
27
  `;
23
28
  exports.TargetTextWrapper = (0, styles_1.styled)(Typography_1.Typography) `
24
29
  margin-bottom: ${({ theme: { spacing } }) => spacing(1)};
@@ -22,6 +22,7 @@ exports.Header = (0, styles_1.styled)(Typography_1.Typography) `
22
22
  }
23
23
  `;
24
24
  exports.Subheader = (0, styles_1.styled)(Typography_1.Typography) `
25
+ margin-top: ${({ theme }) => theme.spacing(-2)};
25
26
  margin-bottom: ${({ theme }) => theme.spacing(2)};
26
27
  ${({ theme }) => theme.breakpoints.down('sm')} {
27
28
  font-size: ${({ theme }) => theme.typography.subtitle1.fontSize};
@@ -12,7 +12,7 @@ exports.MuiLinearProgress = {
12
12
  },
13
13
  barColorPrimary({ theme }) {
14
14
  return {
15
- backgroundColor: theme.palette.primary['800'],
15
+ backgroundColor: theme.palette.success['600'],
16
16
  };
17
17
  },
18
18
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.0.0-alpha.30",
3
+ "version": "4.0.0-alpha.31",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {