@astral/ui 4.37.2 → 4.38.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.
Files changed (31) hide show
  1. package/components/NotFoundPage/styles.js +1 -1
  2. package/components/PageAside/styles.js +2 -3
  3. package/components/PageContent/PageContentHeader/styles.js +3 -1
  4. package/components/PageContent/styles.js +8 -0
  5. package/components/PageHeader/constants.d.ts +1 -0
  6. package/components/PageHeader/constants.js +1 -0
  7. package/components/PageHeader/styles.js +12 -0
  8. package/components/PageHeader/useLogic/useLogic.d.ts +1 -1
  9. package/components/PageHeader/useLogic/useLogic.js +2 -1
  10. package/components/PageLayout/PageLayout.js +5 -2
  11. package/components/PageLayoutContainer/constants.d.ts +1 -0
  12. package/components/PageLayoutContainer/constants.js +1 -0
  13. package/components/PageLayoutContainer/styles.js +5 -0
  14. package/components/PagePinnableAside/styles.js +1 -0
  15. package/hook-form/FormPageLayoutBase/styles.js +4 -3
  16. package/node/components/NotFoundPage/styles.js +1 -1
  17. package/node/components/PageAside/styles.js +2 -3
  18. package/node/components/PageContent/PageContentHeader/styles.js +3 -1
  19. package/node/components/PageContent/styles.js +13 -5
  20. package/node/components/PageHeader/constants.d.ts +1 -0
  21. package/node/components/PageHeader/constants.js +1 -0
  22. package/node/components/PageHeader/styles.js +12 -0
  23. package/node/components/PageHeader/useLogic/useLogic.d.ts +1 -1
  24. package/node/components/PageHeader/useLogic/useLogic.js +2 -1
  25. package/node/components/PageLayout/PageLayout.js +4 -1
  26. package/node/components/PageLayoutContainer/constants.d.ts +1 -0
  27. package/node/components/PageLayoutContainer/constants.js +1 -0
  28. package/node/components/PageLayoutContainer/styles.js +5 -0
  29. package/node/components/PagePinnableAside/styles.js +1 -0
  30. package/node/hook-form/FormPageLayoutBase/styles.js +4 -3
  31. package/package.json +1 -1
@@ -37,6 +37,6 @@ export const Image = styled.img `
37
37
  `;
38
38
  export const StyledPageContent = styled(PageContent) `
39
39
  ${({ theme }) => theme.breakpoints.down('sm')} {
40
- margin: ${({ theme }) => theme.spacing(4)};
40
+ margin-top: ${({ theme }) => theme.spacing(4)};
41
41
  }
42
42
  `;
@@ -22,9 +22,8 @@ export const Wrapper = styled.aside `
22
22
  width: unset;
23
23
  margin: ${({ theme }) => theme.spacing(0, 4, 4)};
24
24
 
25
- background-color: ${({ theme }) => theme.palette.background.default};
26
- border-top: 0;
27
- border-left: 0;
25
+ background-color: ${({ theme }) => theme.palette.background.default};
26
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
28
27
  border-radius: ${({ theme }) => theme.shape.medium};
29
28
  }
30
29
  `;
@@ -8,11 +8,13 @@ export const Wrapper = styled.header `
8
8
  padding: ${({ theme }) => theme.spacing(4, 6)};
9
9
 
10
10
  border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
11
-
11
+
12
12
  ${({ theme }) => theme.breakpoints.down('sm')} {
13
13
  margin: ${({ theme }) => theme.spacing(0, 4)};
14
14
 
15
15
  background-color: ${({ theme }) => theme.palette.background.default};
16
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
17
+ border-bottom: none;
16
18
  border-top-left-radius: ${({ theme }) => theme.shape.medium};
17
19
  border-top-right-radius: ${({ theme }) => theme.shape.medium};
18
20
  }
@@ -1,3 +1,4 @@
1
+ import { cardGridClassnames } from '../CardGridInfinite/constants';
1
2
  import { pdfViewerClassnames } from '../PdfViewer';
2
3
  import { styled } from '../styled';
3
4
  import { PAGE_CONTENT_ANIMATION, pageContentClassnames } from './constants';
@@ -74,8 +75,15 @@ export const Content = styled.div `
74
75
  padding: ${({ theme }) => theme.spacing(4, 4, 3)};
75
76
 
76
77
  background-color: ${({ theme }) => theme.palette.background.default};
78
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
77
79
  border-radius: ${({ theme }) => theme.shape.medium};
78
80
 
81
+ /* Причина игнора: Не критично для отображения */
82
+ /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
83
+ &:has(.${cardGridClassnames.root}) {
84
+ border: none;
85
+ }
86
+
79
87
  &.${pageContentClassnames.contentHasHeader} {
80
88
  border-top-left-radius: 0;
81
89
  border-top-right-radius: 0;
@@ -5,5 +5,6 @@ export declare const pageHeaderClassnames: {
5
5
  hasTitle: string;
6
6
  filters: string;
7
7
  quickFilters: string;
8
+ hasFilters: string;
8
9
  };
9
10
  export declare const PAGE_HEADER_HEIGHT_MOBILE = "48px";
@@ -6,5 +6,6 @@ export const pageHeaderClassnames = {
6
6
  hasTitle: createUIKitClassname('page-header_has-title'),
7
7
  filters: createUIKitClassname('page-header__filters'),
8
8
  quickFilters: createUIKitClassname('page-header__quick-filters'),
9
+ hasFilters: createUIKitClassname('page-header_has-filters'),
9
10
  };
10
11
  export const PAGE_HEADER_HEIGHT_MOBILE = '48px';
@@ -15,6 +15,10 @@ export const Wrapper = styled.header `
15
15
  }
16
16
 
17
17
  ${({ theme }) => theme.breakpoints.down('sm')} {
18
+ position: sticky;
19
+ z-index: ${({ theme }) => theme.zIndex.fab};
20
+ top: ${PAGE_HEADER_HEIGHT_MOBILE};
21
+
18
22
  display: block;
19
23
 
20
24
  margin-bottom: ${({ theme }) => theme.spacing(4)};
@@ -31,6 +35,10 @@ export const Wrapper = styled.header `
31
35
  grid-column: 3;
32
36
  grid-row: 1 / -1;
33
37
  }
38
+
39
+ ${({ theme }) => theme.breakpoints.down('sm')} {
40
+ border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
41
+ }
34
42
  }
35
43
 
36
44
  .${pageHeaderClassnames.quickFilters} {
@@ -60,6 +68,10 @@ export const MobileTitleWrapper = styled.div `
60
68
  order: 1;
61
69
 
62
70
  background-color: ${({ theme }) => theme.palette.background.default};
71
+
72
+ &:not(.${pageHeaderClassnames.hasFilters}) {
73
+ border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
74
+ }
63
75
 
64
76
  &.${pageHeaderClassnames.hasTitle} {
65
77
  display: flex;
@@ -1,7 +1,7 @@
1
1
  import { type ElementType } from 'react';
2
2
  import type { PageHeaderProps } from '../types';
3
3
  type UseLogicParams<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType, TBackButtonComponent extends ElementType = ElementType> = PageHeaderProps<TMainActionComponent, TSecondaryActionComponent, TBackButtonComponent>;
4
- export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType, TBackButtonComponent extends ElementType = ElementType>({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent, TBackButtonComponent>) => {
4
+ export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType, TBackButtonComponent extends ElementType = ElementType>({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, filters, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent, TBackButtonComponent>) => {
5
5
  isShowMobileActions: boolean | undefined;
6
6
  isLoading: boolean | undefined;
7
7
  mobileTitleActions: import("react").ReactNode;
@@ -3,7 +3,7 @@ import { PageContext } from '../../PageContext';
3
3
  import { classNames } from '../../utils/classNames';
4
4
  import { pageHeaderClassnames } from '../constants';
5
5
  import { usePageTitle } from '../hooks/usePageTitle';
6
- export const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, }) => {
6
+ export const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, filters, }) => {
7
7
  //Переопределение Html title на title из параметров
8
8
  usePageTitle({ shouldUpdateDocumentTitle, htmlTitle, title });
9
9
  const { mobileTitleActions, isLoading } = useContext(PageContext);
@@ -11,6 +11,7 @@ export const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle,
11
11
  const mobileClassnames = useMemo(() => classNames(pageHeaderClassnames.pageHeaderMobileTitle, {
12
12
  [pageHeaderClassnames.hasTitle]: Boolean(title) || isLoading,
13
13
  [pageHeaderClassnames.hasBackButton]: Boolean(backButton),
14
+ [pageHeaderClassnames.hasFilters]: Boolean(filters),
14
15
  }), [title, backButton, isLoading]);
15
16
  return {
16
17
  isShowMobileActions,
@@ -4,14 +4,17 @@ import { PageAside } from '../PageAside';
4
4
  import { PageContent } from '../PageContent';
5
5
  import { PageContextProvider } from '../PageContext';
6
6
  import { PageHeader } from '../PageHeader';
7
- import { PageLayoutContainer } from '../PageLayoutContainer';
7
+ import { PageLayoutContainer, pageLayoutClassnames, } from '../PageLayoutContainer';
8
8
  import { LoadingPlaceholder } from '../placeholders/LoadingPlaceholder';
9
+ import { classNames } from '../utils/classNames';
9
10
  import { DesktopAlertWrapper, LoaderWrapper, MobileAlertWrapper, } from './styles';
10
11
  import { useLogic } from './useLogic';
11
12
  export const PageLayout = (props) => {
12
13
  const { header, content, aside, footer, className, alert, isLoading } = props;
13
14
  const { hasAside, ref } = useLogic(props);
14
- return (_jsxs(PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && _jsx(DesktopAlertWrapper, { children: alert }), _jsxs(PageLayoutContainer, { className: className, ref: ref, children: [alert && _jsx(MobileAlertWrapper, { children: alert }), isValidElement(header)
15
+ return (_jsxs(PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && _jsx(DesktopAlertWrapper, { children: alert }), _jsxs(PageLayoutContainer, { className: classNames(className, {
16
+ [pageLayoutClassnames.withoutHeader]: !header,
17
+ }), ref: ref, children: [alert && _jsx(MobileAlertWrapper, { children: alert }), isValidElement(header)
15
18
  ? header
16
19
  : header && _jsx(PageHeader, { ...header }), isLoading ? (_jsx(LoaderWrapper, { children: _jsx(LoadingPlaceholder, { title: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445..." }) })) : (_jsxs(_Fragment, { children: [isValidElement(content) ? (content) : (_jsx(PageContent, { ...content, footer: footer })), aside && !isValidElement(aside) && (_jsx(PageAside, { ...aside })), isValidElement(aside) && aside] }))] })] }));
17
20
  };
@@ -1,3 +1,4 @@
1
1
  export declare const pageLayoutClassnames: {
2
2
  root: string;
3
+ withoutHeader: string;
3
4
  };
@@ -1,4 +1,5 @@
1
1
  import { createUIKitClassname } from '../utils/createUIKitClassname';
2
2
  export const pageLayoutClassnames = {
3
3
  root: createUIKitClassname('page-layout'),
4
+ withoutHeader: createUIKitClassname('page-layout_without-header'),
4
5
  };
@@ -1,5 +1,6 @@
1
1
  import { Paper } from '../Paper';
2
2
  import { styled } from '../styled';
3
+ import { pageLayoutClassnames } from './constants';
3
4
  export const Wrapper = styled.div `
4
5
  display: grid;
5
6
  grid-row-gap: ${({ theme }) => theme.spacing(4)};
@@ -39,5 +40,9 @@ export const StylePaper = styled(Paper) `
39
40
 
40
41
  ${({ theme }) => theme.breakpoints.down('sm')} {
41
42
  border: unset;
43
+
44
+ .${pageLayoutClassnames.withoutHeader} {
45
+ padding-top: ${({ theme }) => theme.spacing(4)};
46
+ }
42
47
  }
43
48
  `;
@@ -31,6 +31,7 @@ export const Aside = styled('aside', {
31
31
  margin: ${({ theme }) => theme.spacing(0, 4, 4)};
32
32
 
33
33
  background-color: ${({ theme }) => theme.palette.background.default};
34
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
34
35
  border-radius: ${({ theme }) => theme.shape.medium};
35
36
  }
36
37
  `;
@@ -33,13 +33,14 @@ export const StyledPageContent = styled(PageContent) `
33
33
  }
34
34
 
35
35
  ${({ theme }) => theme.breakpoints.down('sm')} {
36
- margin-bottom: ${({ theme }) => theme.spacing(24)};
36
+ margin-bottom: ${({ theme }) => theme.spacing(20)};
37
+ padding-top: 0;
37
38
 
38
39
  &.${formPageContentClassnames.formPageContentSecondaryActions} {
39
- margin-bottom: ${({ theme }) => theme.spacing(38)};
40
+ margin-bottom: ${({ theme }) => theme.spacing(32)};
40
41
 
41
42
  &.${formPageContentClassnames.formWizardPageContentActions} {
42
- margin-bottom: ${({ theme }) => theme.spacing(52)};
43
+ margin-bottom: ${({ theme }) => theme.spacing(50)};
43
44
  }
44
45
  }
45
46
  }
@@ -40,6 +40,6 @@ exports.Image = styled_1.styled.img `
40
40
  `;
41
41
  exports.StyledPageContent = (0, styled_1.styled)(PageContent_1.PageContent) `
42
42
  ${({ theme }) => theme.breakpoints.down('sm')} {
43
- margin: ${({ theme }) => theme.spacing(4)};
43
+ margin-top: ${({ theme }) => theme.spacing(4)};
44
44
  }
45
45
  `;
@@ -25,9 +25,8 @@ exports.Wrapper = styled_1.styled.aside `
25
25
  width: unset;
26
26
  margin: ${({ theme }) => theme.spacing(0, 4, 4)};
27
27
 
28
- background-color: ${({ theme }) => theme.palette.background.default};
29
- border-top: 0;
30
- border-left: 0;
28
+ background-color: ${({ theme }) => theme.palette.background.default};
29
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
31
30
  border-radius: ${({ theme }) => theme.shape.medium};
32
31
  }
33
32
  `;
@@ -11,11 +11,13 @@ exports.Wrapper = styled_1.styled.header `
11
11
  padding: ${({ theme }) => theme.spacing(4, 6)};
12
12
 
13
13
  border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
14
-
14
+
15
15
  ${({ theme }) => theme.breakpoints.down('sm')} {
16
16
  margin: ${({ theme }) => theme.spacing(0, 4)};
17
17
 
18
18
  background-color: ${({ theme }) => theme.palette.background.default};
19
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
20
+ border-bottom: none;
19
21
  border-top-left-radius: ${({ theme }) => theme.shape.medium};
20
22
  border-top-right-radius: ${({ theme }) => theme.shape.medium};
21
23
  }
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Content = exports.Wrapper = void 0;
4
+ const constants_1 = require("../CardGridInfinite/constants");
4
5
  const PdfViewer_1 = require("../PdfViewer");
5
6
  const styled_1 = require("../styled");
6
- const constants_1 = require("./constants");
7
+ const constants_2 = require("./constants");
7
8
  const getPaddingContent = (theme, hasAside) => {
8
9
  return hasAside ? theme.spacing(4, 6, 4) : theme.spacing(0, 6, 4);
9
10
  };
@@ -31,7 +32,7 @@ exports.Wrapper = (0, styled_1.styled)('article', {
31
32
  border-top: none;
32
33
  }
33
34
 
34
- @keyframes ${constants_1.PAGE_CONTENT_ANIMATION} {
35
+ @keyframes ${constants_2.PAGE_CONTENT_ANIMATION} {
35
36
  0% {
36
37
  display: none;
37
38
 
@@ -49,8 +50,8 @@ exports.Wrapper = (0, styled_1.styled)('article', {
49
50
  }
50
51
  }
51
52
 
52
- &.${constants_1.pageContentClassnames.animation} > * {
53
- animation: ${({ theme }) => `${constants_1.PAGE_CONTENT_ANIMATION} ${theme.transitions.duration.complex * 2}ms`};
53
+ &.${constants_2.pageContentClassnames.animation} > * {
54
+ animation: ${({ theme }) => `${constants_2.PAGE_CONTENT_ANIMATION} ${theme.transitions.duration.complex * 2}ms`};
54
55
  }
55
56
  `;
56
57
  exports.Content = styled_1.styled.div `
@@ -77,9 +78,16 @@ exports.Content = styled_1.styled.div `
77
78
  padding: ${({ theme }) => theme.spacing(4, 4, 3)};
78
79
 
79
80
  background-color: ${({ theme }) => theme.palette.background.default};
81
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
80
82
  border-radius: ${({ theme }) => theme.shape.medium};
81
83
 
82
- &.${constants_1.pageContentClassnames.contentHasHeader} {
84
+ /* Причина игнора: Не критично для отображения */
85
+ /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
86
+ &:has(.${constants_1.cardGridClassnames.root}) {
87
+ border: none;
88
+ }
89
+
90
+ &.${constants_2.pageContentClassnames.contentHasHeader} {
83
91
  border-top-left-radius: 0;
84
92
  border-top-right-radius: 0;
85
93
  }
@@ -5,5 +5,6 @@ export declare const pageHeaderClassnames: {
5
5
  hasTitle: string;
6
6
  filters: string;
7
7
  quickFilters: string;
8
+ hasFilters: string;
8
9
  };
9
10
  export declare const PAGE_HEADER_HEIGHT_MOBILE = "48px";
@@ -9,5 +9,6 @@ exports.pageHeaderClassnames = {
9
9
  hasTitle: (0, createUIKitClassname_1.createUIKitClassname)('page-header_has-title'),
10
10
  filters: (0, createUIKitClassname_1.createUIKitClassname)('page-header__filters'),
11
11
  quickFilters: (0, createUIKitClassname_1.createUIKitClassname)('page-header__quick-filters'),
12
+ hasFilters: (0, createUIKitClassname_1.createUIKitClassname)('page-header_has-filters'),
12
13
  };
13
14
  exports.PAGE_HEADER_HEIGHT_MOBILE = '48px';
@@ -18,6 +18,10 @@ exports.Wrapper = styled_1.styled.header `
18
18
  }
19
19
 
20
20
  ${({ theme }) => theme.breakpoints.down('sm')} {
21
+ position: sticky;
22
+ z-index: ${({ theme }) => theme.zIndex.fab};
23
+ top: ${constants_1.PAGE_HEADER_HEIGHT_MOBILE};
24
+
21
25
  display: block;
22
26
 
23
27
  margin-bottom: ${({ theme }) => theme.spacing(4)};
@@ -34,6 +38,10 @@ exports.Wrapper = styled_1.styled.header `
34
38
  grid-column: 3;
35
39
  grid-row: 1 / -1;
36
40
  }
41
+
42
+ ${({ theme }) => theme.breakpoints.down('sm')} {
43
+ border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
44
+ }
37
45
  }
38
46
 
39
47
  .${constants_1.pageHeaderClassnames.quickFilters} {
@@ -63,6 +71,10 @@ exports.MobileTitleWrapper = styled_1.styled.div `
63
71
  order: 1;
64
72
 
65
73
  background-color: ${({ theme }) => theme.palette.background.default};
74
+
75
+ &:not(.${constants_1.pageHeaderClassnames.hasFilters}) {
76
+ border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
77
+ }
66
78
 
67
79
  &.${constants_1.pageHeaderClassnames.hasTitle} {
68
80
  display: flex;
@@ -1,7 +1,7 @@
1
1
  import { type ElementType } from 'react';
2
2
  import type { PageHeaderProps } from '../types';
3
3
  type UseLogicParams<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType, TBackButtonComponent extends ElementType = ElementType> = PageHeaderProps<TMainActionComponent, TSecondaryActionComponent, TBackButtonComponent>;
4
- export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType, TBackButtonComponent extends ElementType = ElementType>({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent, TBackButtonComponent>) => {
4
+ export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType, TBackButtonComponent extends ElementType = ElementType>({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, filters, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent, TBackButtonComponent>) => {
5
5
  isShowMobileActions: boolean | undefined;
6
6
  isLoading: boolean | undefined;
7
7
  mobileTitleActions: import("react").ReactNode;
@@ -6,7 +6,7 @@ const PageContext_1 = require("../../PageContext");
6
6
  const classNames_1 = require("../../utils/classNames");
7
7
  const constants_1 = require("../constants");
8
8
  const usePageTitle_1 = require("../hooks/usePageTitle");
9
- const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, }) => {
9
+ const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backButton, filters, }) => {
10
10
  //Переопределение Html title на title из параметров
11
11
  (0, usePageTitle_1.usePageTitle)({ shouldUpdateDocumentTitle, htmlTitle, title });
12
12
  const { mobileTitleActions, isLoading } = (0, react_1.useContext)(PageContext_1.PageContext);
@@ -14,6 +14,7 @@ const useLogic = ({ shouldUpdateDocumentTitle, title, actions, htmlTitle, backBu
14
14
  const mobileClassnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)(constants_1.pageHeaderClassnames.pageHeaderMobileTitle, {
15
15
  [constants_1.pageHeaderClassnames.hasTitle]: Boolean(title) || isLoading,
16
16
  [constants_1.pageHeaderClassnames.hasBackButton]: Boolean(backButton),
17
+ [constants_1.pageHeaderClassnames.hasFilters]: Boolean(filters),
17
18
  }), [title, backButton, isLoading]);
18
19
  return {
19
20
  isShowMobileActions,
@@ -9,12 +9,15 @@ const PageContext_1 = require("../PageContext");
9
9
  const PageHeader_1 = require("../PageHeader");
10
10
  const PageLayoutContainer_1 = require("../PageLayoutContainer");
11
11
  const LoadingPlaceholder_1 = require("../placeholders/LoadingPlaceholder");
12
+ const classNames_1 = require("../utils/classNames");
12
13
  const styles_1 = require("./styles");
13
14
  const useLogic_1 = require("./useLogic");
14
15
  const PageLayout = (props) => {
15
16
  const { header, content, aside, footer, className, alert, isLoading } = props;
16
17
  const { hasAside, ref } = (0, useLogic_1.useLogic)(props);
17
- return ((0, jsx_runtime_1.jsxs)(PageContext_1.PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.DesktopAlertWrapper, { children: alert }), (0, jsx_runtime_1.jsxs)(PageLayoutContainer_1.PageLayoutContainer, { className: className, ref: ref, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.MobileAlertWrapper, { children: alert }), (0, react_1.isValidElement)(header)
18
+ return ((0, jsx_runtime_1.jsxs)(PageContext_1.PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.DesktopAlertWrapper, { children: alert }), (0, jsx_runtime_1.jsxs)(PageLayoutContainer_1.PageLayoutContainer, { className: (0, classNames_1.classNames)(className, {
19
+ [PageLayoutContainer_1.pageLayoutClassnames.withoutHeader]: !header,
20
+ }), ref: ref, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.MobileAlertWrapper, { children: alert }), (0, react_1.isValidElement)(header)
18
21
  ? header
19
22
  : header && (0, jsx_runtime_1.jsx)(PageHeader_1.PageHeader, { ...header }), isLoading ? ((0, jsx_runtime_1.jsx)(styles_1.LoaderWrapper, { children: (0, jsx_runtime_1.jsx)(LoadingPlaceholder_1.LoadingPlaceholder, { title: "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0434\u0430\u043D\u043D\u044B\u0445..." }) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, react_1.isValidElement)(content) ? (content) : ((0, jsx_runtime_1.jsx)(PageContent_1.PageContent, { ...content, footer: footer })), aside && !(0, react_1.isValidElement)(aside) && ((0, jsx_runtime_1.jsx)(PageAside_1.PageAside, { ...aside })), (0, react_1.isValidElement)(aside) && aside] }))] })] }));
20
23
  };
@@ -1,3 +1,4 @@
1
1
  export declare const pageLayoutClassnames: {
2
2
  root: string;
3
+ withoutHeader: string;
3
4
  };
@@ -4,4 +4,5 @@ exports.pageLayoutClassnames = void 0;
4
4
  const createUIKitClassname_1 = require("../utils/createUIKitClassname");
5
5
  exports.pageLayoutClassnames = {
6
6
  root: (0, createUIKitClassname_1.createUIKitClassname)('page-layout'),
7
+ withoutHeader: (0, createUIKitClassname_1.createUIKitClassname)('page-layout_without-header'),
7
8
  };
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.StylePaper = exports.Wrapper = void 0;
4
4
  const Paper_1 = require("../Paper");
5
5
  const styled_1 = require("../styled");
6
+ const constants_1 = require("./constants");
6
7
  exports.Wrapper = styled_1.styled.div `
7
8
  display: grid;
8
9
  grid-row-gap: ${({ theme }) => theme.spacing(4)};
@@ -42,5 +43,9 @@ exports.StylePaper = (0, styled_1.styled)(Paper_1.Paper) `
42
43
 
43
44
  ${({ theme }) => theme.breakpoints.down('sm')} {
44
45
  border: unset;
46
+
47
+ .${constants_1.pageLayoutClassnames.withoutHeader} {
48
+ padding-top: ${({ theme }) => theme.spacing(4)};
49
+ }
45
50
  }
46
51
  `;
@@ -34,6 +34,7 @@ exports.Aside = (0, styled_1.styled)('aside', {
34
34
  margin: ${({ theme }) => theme.spacing(0, 4, 4)};
35
35
 
36
36
  background-color: ${({ theme }) => theme.palette.background.default};
37
+ border: 1px solid ${({ theme }) => theme.palette.grey[300]};
37
38
  border-radius: ${({ theme }) => theme.shape.medium};
38
39
  }
39
40
  `;
@@ -36,13 +36,14 @@ exports.StyledPageContent = (0, styled_1.styled)(PageContent_1.PageContent) `
36
36
  }
37
37
 
38
38
  ${({ theme }) => theme.breakpoints.down('sm')} {
39
- margin-bottom: ${({ theme }) => theme.spacing(24)};
39
+ margin-bottom: ${({ theme }) => theme.spacing(20)};
40
+ padding-top: 0;
40
41
 
41
42
  &.${constants_1.formPageContentClassnames.formPageContentSecondaryActions} {
42
- margin-bottom: ${({ theme }) => theme.spacing(38)};
43
+ margin-bottom: ${({ theme }) => theme.spacing(32)};
43
44
 
44
45
  &.${constants_1.formPageContentClassnames.formWizardPageContentActions} {
45
- margin-bottom: ${({ theme }) => theme.spacing(52)};
46
+ margin-bottom: ${({ theme }) => theme.spacing(50)};
46
47
  }
47
48
  }
48
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "4.37.2",
3
+ "version": "4.38.0",
4
4
  "browser": "./index.js",
5
5
  "main": "./node/index.js",
6
6
  "dependencies": {