@astral/ui 4.34.2 → 4.35.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.
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { OverflowTypography } from '../OverflowTypography';
3
3
  import { Typography } from '../Typography';
4
- import { useId } from '../useId';
5
4
  import { EmptyIcon, Inner, Item, RejectIcon, StyledLoader, SuccessIcon, Wrapper, } from './styles';
6
5
  const ICON_BY_STATUS = {
7
6
  default: _jsx(EmptyIcon, {}),
@@ -10,6 +9,7 @@ const ICON_BY_STATUS = {
10
9
  loading: _jsx(StyledLoader, {}),
11
10
  };
12
11
  export const ComplianceStatus = ({ title, itemsList, children, subtitle, backgroundColor = 'grey', variant = 'contained', }) => {
13
- const id = useId();
14
- return (_jsxs(Wrapper, { "$background": backgroundColor, "$variant": variant, children: [title && (_jsx(OverflowTypography, { variant: "h6", component: "h4", children: title })), subtitle, _jsx(Inner, { children: itemsList.map(({ text, status }) => (_jsxs(Item, { children: [ICON_BY_STATUS[status], _jsx(Typography, { children: text })] }, id))) }), children] }));
12
+ return (_jsxs(Wrapper, { "$background": backgroundColor, "$variant": variant, children: [title && (_jsx(OverflowTypography, { variant: "h6", component: "h4", children: title })), subtitle, _jsx(Inner, { children: itemsList.map(({ text, status }, index) => (
13
+ // biome-ignore lint/suspicious/noArrayIndexKey: Элементы статичны
14
+ _jsxs(Item, { children: [ICON_BY_STATUS[status], _jsx(Typography, { children: text })] }, index))) }), children] }));
15
15
  };
@@ -39,6 +39,10 @@ export const Wrapper = styled.header `
39
39
 
40
40
  margin-top: ${({ theme }) => theme.spacing(4)};
41
41
 
42
+ ${({ theme }) => theme.breakpoints.down('laptop')} {
43
+ margin-top: ${({ theme }) => theme.spacing(3)};
44
+ }
45
+
42
46
  ${({ theme }) => theme.breakpoints.down('sm')} {
43
47
  display: none;
44
48
  }
@@ -4,7 +4,6 @@ exports.ComplianceStatus = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const OverflowTypography_1 = require("../OverflowTypography");
6
6
  const Typography_1 = require("../Typography");
7
- const useId_1 = require("../useId");
8
7
  const styles_1 = require("./styles");
9
8
  const ICON_BY_STATUS = {
10
9
  default: (0, jsx_runtime_1.jsx)(styles_1.EmptyIcon, {}),
@@ -13,7 +12,8 @@ const ICON_BY_STATUS = {
13
12
  loading: (0, jsx_runtime_1.jsx)(styles_1.StyledLoader, {}),
14
13
  };
15
14
  const ComplianceStatus = ({ title, itemsList, children, subtitle, backgroundColor = 'grey', variant = 'contained', }) => {
16
- const id = (0, useId_1.useId)();
17
- return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$background": backgroundColor, "$variant": variant, children: [title && ((0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { variant: "h6", component: "h4", children: title })), subtitle, (0, jsx_runtime_1.jsx)(styles_1.Inner, { children: itemsList.map(({ text, status }) => ((0, jsx_runtime_1.jsxs)(styles_1.Item, { children: [ICON_BY_STATUS[status], (0, jsx_runtime_1.jsx)(Typography_1.Typography, { children: text })] }, id))) }), children] }));
15
+ return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "$background": backgroundColor, "$variant": variant, children: [title && ((0, jsx_runtime_1.jsx)(OverflowTypography_1.OverflowTypography, { variant: "h6", component: "h4", children: title })), subtitle, (0, jsx_runtime_1.jsx)(styles_1.Inner, { children: itemsList.map(({ text, status }, index) => (
16
+ // biome-ignore lint/suspicious/noArrayIndexKey: Элементы статичны
17
+ (0, jsx_runtime_1.jsxs)(styles_1.Item, { children: [ICON_BY_STATUS[status], (0, jsx_runtime_1.jsx)(Typography_1.Typography, { children: text })] }, index))) }), children] }));
18
18
  };
19
19
  exports.ComplianceStatus = ComplianceStatus;
@@ -42,6 +42,10 @@ exports.Wrapper = styled_1.styled.header `
42
42
 
43
43
  margin-top: ${({ theme }) => theme.spacing(4)};
44
44
 
45
+ ${({ theme }) => theme.breakpoints.down('laptop')} {
46
+ margin-top: ${({ theme }) => theme.spacing(3)};
47
+ }
48
+
45
49
  ${({ theme }) => theme.breakpoints.down('sm')} {
46
50
  display: none;
47
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.34.2",
3
+ "version": "4.35.1",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {