@astral/ui 4.26.1 → 4.27.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.
Files changed (85) hide show
  1. package/components/ConfigProvider/NextFeatureFlagsContext/NextFeatureFlagsContext.d.ts +10 -1
  2. package/components/ConfigProvider/NextFeatureFlagsContext/NextFeatureFlagsContext.js +4 -1
  3. package/components/DashboardContext/DashboardContext.d.ts +1 -0
  4. package/components/DashboardContext/DashboardContext.js +1 -0
  5. package/components/DashboardContext/DashboardContextProvider/DashboardContextProvider.js +8 -1
  6. package/components/DashboardLayout/DashboardLayout.js +3 -5
  7. package/components/DashboardLayout/DashboardWrapper/DashboardWrapper.d.ts +6 -0
  8. package/components/DashboardLayout/DashboardWrapper/DashboardWrapper.js +10 -0
  9. package/components/DashboardLayout/DashboardWrapper/index.d.ts +1 -0
  10. package/components/DashboardLayout/DashboardWrapper/index.js +1 -0
  11. package/components/DashboardLayout/{styles.d.ts → DashboardWrapper/styles.d.ts} +3 -3
  12. package/components/DashboardLayout/{styles.js → DashboardWrapper/styles.js} +10 -7
  13. package/components/DashboardLayout/Header/styles.js +7 -3
  14. package/components/DashboardLayout/constants.d.ts +2 -1
  15. package/components/DashboardLayout/constants.js +2 -1
  16. package/components/DashboardLayoutSkeleton/DashboardLayoutSkeleton.js +1 -1
  17. package/components/DashboardSidebar/styles.js +6 -1
  18. package/components/DataGrid/Row/Row.js +1 -1
  19. package/components/DataGridPaginationContainer/styles.js +4 -0
  20. package/components/PageContent/styles.js +5 -0
  21. package/components/PageHeader/PageActions/PageActions.d.ts +1 -20
  22. package/components/PageHeader/PageActions/PageActions.js +10 -4
  23. package/components/PageHeader/PageActions/constants.d.ts +4 -0
  24. package/components/PageHeader/PageActions/constants.js +5 -0
  25. package/components/PageHeader/PageActions/index.d.ts +1 -0
  26. package/components/PageHeader/PageActions/styles.d.ts +9 -0
  27. package/components/PageHeader/PageActions/styles.js +17 -0
  28. package/components/PageHeader/PageActions/types.d.ts +14 -0
  29. package/components/PageHeader/PageActions/types.js +1 -0
  30. package/components/PageHeader/PageActions/useLogic/index.d.ts +1 -0
  31. package/components/PageHeader/PageActions/useLogic/index.js +1 -0
  32. package/components/PageHeader/PageActions/useLogic/useLogic.d.ts +11 -0
  33. package/components/PageHeader/PageActions/useLogic/useLogic.js +28 -0
  34. package/components/PageHeader/styles.js +4 -0
  35. package/components/PageLayoutContainer/styles.js +4 -0
  36. package/components/PageLayoutFooter/styles.js +2 -1
  37. package/components/PagePinnableAside/styles.js +6 -1
  38. package/components/constants/footer.d.ts +2 -0
  39. package/components/constants/footer.js +2 -0
  40. package/components/constants/index.d.ts +1 -0
  41. package/components/constants/index.js +1 -0
  42. package/components/useFeatureFlags/useFeatureFlags.d.ts +4 -1
  43. package/node/components/ConfigProvider/NextFeatureFlagsContext/NextFeatureFlagsContext.d.ts +10 -1
  44. package/node/components/ConfigProvider/NextFeatureFlagsContext/NextFeatureFlagsContext.js +4 -1
  45. package/node/components/DashboardContext/DashboardContext.d.ts +1 -0
  46. package/node/components/DashboardContext/DashboardContext.js +1 -0
  47. package/node/components/DashboardContext/DashboardContextProvider/DashboardContextProvider.js +8 -1
  48. package/node/components/DashboardLayout/DashboardLayout.js +2 -4
  49. package/node/components/DashboardLayout/DashboardWrapper/DashboardWrapper.d.ts +6 -0
  50. package/node/components/DashboardLayout/DashboardWrapper/DashboardWrapper.js +14 -0
  51. package/node/components/DashboardLayout/DashboardWrapper/index.d.ts +1 -0
  52. package/node/components/DashboardLayout/DashboardWrapper/index.js +17 -0
  53. package/node/components/DashboardLayout/{styles.js → DashboardWrapper/styles.js} +10 -7
  54. package/node/components/DashboardLayout/Header/styles.js +6 -2
  55. package/node/components/DashboardLayout/constants.d.ts +2 -1
  56. package/node/components/DashboardLayout/constants.js +3 -2
  57. package/node/components/DashboardLayoutSkeleton/DashboardLayoutSkeleton.js +1 -1
  58. package/node/components/DashboardSidebar/styles.js +14 -9
  59. package/node/components/DataGrid/Row/Row.js +1 -1
  60. package/node/components/DataGridPaginationContainer/styles.js +4 -0
  61. package/node/components/PageContent/styles.js +5 -0
  62. package/node/components/PageHeader/PageActions/PageActions.d.ts +1 -20
  63. package/node/components/PageHeader/PageActions/PageActions.js +9 -3
  64. package/node/components/PageHeader/PageActions/constants.d.ts +4 -0
  65. package/node/components/PageHeader/PageActions/constants.js +8 -0
  66. package/node/components/PageHeader/PageActions/index.d.ts +1 -0
  67. package/node/components/PageHeader/PageActions/styles.d.ts +9 -0
  68. package/node/components/PageHeader/PageActions/styles.js +18 -1
  69. package/node/components/PageHeader/PageActions/types.d.ts +14 -0
  70. package/node/components/PageHeader/PageActions/types.js +2 -0
  71. package/node/components/PageHeader/PageActions/useLogic/index.d.ts +1 -0
  72. package/node/components/PageHeader/PageActions/useLogic/index.js +17 -0
  73. package/node/components/PageHeader/PageActions/useLogic/useLogic.d.ts +11 -0
  74. package/node/components/PageHeader/PageActions/useLogic/useLogic.js +32 -0
  75. package/node/components/PageHeader/styles.js +4 -0
  76. package/node/components/PageLayoutContainer/styles.js +4 -0
  77. package/node/components/PageLayoutFooter/styles.js +2 -1
  78. package/node/components/PagePinnableAside/styles.js +8 -3
  79. package/node/components/constants/footer.d.ts +2 -0
  80. package/node/components/constants/footer.js +5 -0
  81. package/node/components/constants/index.d.ts +1 -0
  82. package/node/components/constants/index.js +1 -0
  83. package/node/components/useFeatureFlags/useFeatureFlags.d.ts +4 -1
  84. package/package.json +1 -1
  85. /package/node/components/DashboardLayout/{styles.d.ts → DashboardWrapper/styles.d.ts} +0 -0
@@ -7,7 +7,13 @@ const DashboardContext_1 = require("../DashboardContext");
7
7
  const DashboardContextProvider = ({ children, isFocusedMode, isLoading, }) => {
8
8
  const [alertElement, setAlertElement] = (0, react_1.useState)(null);
9
9
  const [alertHeight, setAlertHeight] = (0, react_1.useState)(0);
10
+ const [isFocusedModeInternal, setFocusedMode] = (0, react_1.useState)(isFocusedMode);
10
11
  const hasMenuOrganizationRef = (0, react_1.useRef)(false);
12
+ (0, react_1.useEffect)(() => {
13
+ if (isFocusedMode !== isFocusedModeInternal) {
14
+ setFocusedMode(isFocusedMode);
15
+ }
16
+ }, [isFocusedMode]);
11
17
  (0, react_1.useEffect)(() => {
12
18
  if (!alertElement) {
13
19
  setAlertHeight(0);
@@ -23,11 +29,12 @@ const DashboardContextProvider = ({ children, isFocusedMode, isLoading, }) => {
23
29
  return () => resizeObserver.disconnect();
24
30
  }, [alertElement]);
25
31
  return ((0, jsx_runtime_1.jsx)(DashboardContext_1.DashboardContext.Provider, { value: {
26
- isFocusedMode,
32
+ isFocusedMode: isFocusedModeInternal,
27
33
  setAlertElement,
28
34
  alertHeight,
29
35
  isLoading,
30
36
  hasMenuOrganizationRef,
37
+ setFocusedMode,
31
38
  }, children: children }));
32
39
  };
33
40
  exports.DashboardContextProvider = DashboardContextProvider;
@@ -4,16 +4,14 @@ exports.DashboardLayout = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const DashboardContext_1 = require("../DashboardContext");
6
6
  const DashboardSidebar_1 = require("../DashboardSidebar");
7
- const DashboardSidebarProvider_1 = require("../DashboardSidebarProvider");
8
- const constants_1 = require("./constants");
7
+ const DashboardWrapper_1 = require("./DashboardWrapper");
9
8
  const Header_1 = require("./Header");
10
9
  const Main_1 = require("./Main");
11
- const styles_1 = require("./styles");
12
10
  /**
13
11
  * Общий Layout приложения
14
12
  */
15
13
  const DashboardLayout = ({ children, isFocusedMode = false, isLoading = false, }) => {
16
- return ((0, jsx_runtime_1.jsx)(DashboardContext_1.DashboardContextProvider, { isFocusedMode: isFocusedMode, isLoading: isLoading, children: (0, jsx_runtime_1.jsx)(DashboardSidebarProvider_1.DashboardSidebarProvider, { isFocusedMode: isFocusedMode, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: constants_1.dashboardLayoutClassnames.root, children: [(0, jsx_runtime_1.jsx)(styles_1.DecorativeHeaderBackground, { role: "presentation", "$isFocusedMode": isFocusedMode }), (0, jsx_runtime_1.jsx)(styles_1.LayoutContent, { "$isFocusedMode": isFocusedMode, children: children })] }) }) }));
14
+ return ((0, jsx_runtime_1.jsx)(DashboardContext_1.DashboardContextProvider, { isFocusedMode: isFocusedMode, isLoading: isLoading, children: (0, jsx_runtime_1.jsx)(DashboardWrapper_1.DashboardWrapper, { children: children }) }));
17
15
  };
18
16
  exports.DashboardLayout = DashboardLayout;
19
17
  exports.DashboardLayout.Header = Header_1.Header;
@@ -0,0 +1,6 @@
1
+ import { type ReactNode } from 'react';
2
+ type Props = {
3
+ children: ReactNode;
4
+ };
5
+ export declare const DashboardWrapper: ({ children }: Props) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DashboardWrapper = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const DashboardContext_1 = require("../../DashboardContext");
7
+ const DashboardSidebarProvider_1 = require("../../DashboardSidebarProvider");
8
+ const constants_1 = require("../constants");
9
+ const styles_1 = require("./styles");
10
+ const DashboardWrapper = ({ children }) => {
11
+ const { isFocusedMode } = (0, react_1.useContext)(DashboardContext_1.DashboardContext);
12
+ return ((0, jsx_runtime_1.jsx)(DashboardSidebarProvider_1.DashboardSidebarProvider, { isFocusedMode: isFocusedMode, children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: constants_1.dashboardLayoutClassnames.root, children: [(0, jsx_runtime_1.jsx)(styles_1.DecorativeHeaderBackground, { role: "presentation", "$isFocusedMode": isFocusedMode }), (0, jsx_runtime_1.jsx)(styles_1.LayoutContent, { "$isFocusedMode": isFocusedMode, children: children })] }) }));
13
+ };
14
+ exports.DashboardWrapper = DashboardWrapper;
@@ -0,0 +1 @@
1
+ export * from './DashboardWrapper';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./DashboardWrapper"), exports);
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LayoutContent = exports.DecorativeHeaderBackground = exports.Wrapper = void 0;
4
- const constants_1 = require("../DashboardSidebar/constants");
5
- const styled_1 = require("../styled");
6
- const constants_2 = require("./constants");
4
+ const constants_1 = require("../../DashboardSidebar/constants");
5
+ const styled_1 = require("../../styled");
6
+ const constants_2 = require("../constants");
7
7
  exports.Wrapper = (0, styled_1.styled)('div') `
8
8
  display: flex;
9
9
  justify-content: center;
@@ -12,9 +12,7 @@ exports.Wrapper = (0, styled_1.styled)('div') `
12
12
 
13
13
  background-color: ${({ theme }) => theme.palette.background.body};
14
14
  `;
15
- exports.DecorativeHeaderBackground = (0, styled_1.styled)('div', {
16
- shouldForwardProp: (prop) => !['$isFocusedMode'].includes(prop),
17
- }) `
15
+ exports.DecorativeHeaderBackground = styled_1.styled.div `
18
16
  position: absolute;
19
17
 
20
18
  /* Header находится над декоративным элементом */
@@ -22,7 +20,7 @@ exports.DecorativeHeaderBackground = (0, styled_1.styled)('div', {
22
20
  left: 0;
23
21
 
24
22
  width: 100%;
25
- height: ${({ $isFocusedMode }) => ($isFocusedMode ? 0 : constants_2.HEADER_HEIGHT)};
23
+ height: ${({ $isFocusedMode }) => ($isFocusedMode ? 0 : constants_2.HEADER_HEIGHT_DESKTOP)};
26
24
 
27
25
  background-color: ${({ theme }) => theme.palette.background.default};
28
26
  border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
@@ -32,6 +30,11 @@ exports.DecorativeHeaderBackground = (0, styled_1.styled)('div', {
32
30
  duration: theme.transitions.duration.complex,
33
31
  });
34
32
  }};
33
+
34
+ ${({ theme }) => theme.breakpoints.down('lg')} {
35
+ height: ${({ $isFocusedMode }) => ($isFocusedMode ? 0 : constants_2.HEADER_HEIGHT_LAPTOP)}
36
+ }
37
+
35
38
  ${({ theme }) => theme.breakpoints.down('sm')} {
36
39
  display: none;
37
40
  }
@@ -21,8 +21,8 @@ exports.HeaderRoot = (0, styled_1.styled)('header', {
21
21
  justify-content: space-between;
22
22
 
23
23
  width: 100%;
24
- height: ${constants_4.HEADER_HEIGHT};
25
- margin-top: ${({ $isFocusedMode }) => $isFocusedMode ? `-${constants_4.HEADER_HEIGHT}` : 0};
24
+ height: ${constants_4.HEADER_HEIGHT_DESKTOP};
25
+ margin-top: ${({ $isFocusedMode }) => $isFocusedMode ? `-${constants_4.HEADER_HEIGHT_DESKTOP}` : 0};
26
26
  margin-bottom: ${({ theme }) => theme.spacing(4)};
27
27
 
28
28
  transition: ${({ theme }) => {
@@ -31,6 +31,10 @@ exports.HeaderRoot = (0, styled_1.styled)('header', {
31
31
  });
32
32
  }};
33
33
 
34
+ ${({ theme }) => theme.breakpoints.down('lg')} {
35
+ height: ${constants_4.HEADER_HEIGHT_LAPTOP};
36
+ }
37
+
34
38
  ${({ theme }) => theme.breakpoints.down('sm')} {
35
39
  grid-row: 2;
36
40
  justify-content: flex-start;
@@ -1,4 +1,5 @@
1
- export declare const HEADER_HEIGHT = "60px";
1
+ export declare const HEADER_HEIGHT_DESKTOP = "60px";
2
+ export declare const HEADER_HEIGHT_LAPTOP = "56px";
2
3
  export declare const HEADER_HEIGHT_MOBILE = "48px";
3
4
  export declare const dashboardLayoutClassnames: {
4
5
  root: string;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dashboardLayoutClassnames = exports.HEADER_HEIGHT_MOBILE = exports.HEADER_HEIGHT = void 0;
3
+ exports.dashboardLayoutClassnames = exports.HEADER_HEIGHT_MOBILE = exports.HEADER_HEIGHT_LAPTOP = exports.HEADER_HEIGHT_DESKTOP = void 0;
4
4
  const createUIKitClassname_1 = require("../utils/createUIKitClassname");
5
- exports.HEADER_HEIGHT = '60px';
5
+ exports.HEADER_HEIGHT_DESKTOP = '60px';
6
+ exports.HEADER_HEIGHT_LAPTOP = '56px';
6
7
  exports.HEADER_HEIGHT_MOBILE = '48px';
7
8
  exports.dashboardLayoutClassnames = {
8
9
  root: (0, createUIKitClassname_1.createUIKitClassname)('dashboard-layout'),
@@ -4,8 +4,8 @@ exports.DashboardLayoutSkeleton = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const constants_1 = require("../DashboardLayout/constants");
6
6
  const DashboardLayout_1 = require("../DashboardLayout/DashboardLayout");
7
+ const styles_1 = require("../DashboardLayout/DashboardWrapper/styles");
7
8
  const Header_1 = require("../DashboardLayout/Header");
8
- const styles_1 = require("../DashboardLayout/styles");
9
9
  const DashboardSidebarSkeleton_1 = require("../DashboardSidebarSkeleton");
10
10
  const MenuOrganization_1 = require("../MenuOrganization");
11
11
  const LoadingPlaceholder_1 = require("../placeholders/LoadingPlaceholder");
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Footer = exports.SidebarContent = exports.SidebarHeader = exports.SidebarRoot = exports.StyledPaper = exports.Wrapper = void 0;
4
- const constants_1 = require("../DashboardLayout/constants");
5
- const constants_2 = require("../MenuOrganization/constants");
4
+ const constants_1 = require("../constants");
5
+ const constants_2 = require("../DashboardLayout/constants");
6
+ const constants_3 = require("../MenuOrganization/constants");
6
7
  const OrganizationButton_1 = require("../MenuOrganization/OrganizationButton");
7
8
  const Paper_1 = require("../Paper");
8
9
  const PinButton_1 = require("../PinButton");
9
10
  const styled_1 = require("../styled");
10
- const constants_3 = require("./constants");
11
+ const constants_4 = require("./constants");
11
12
  exports.Wrapper = (0, styled_1.styled)('div', {
12
13
  shouldForwardProp: (prop) => !['$isPinned', '$alertHeight'].includes(prop),
13
14
  }) `
@@ -21,7 +22,7 @@ exports.Wrapper = (0, styled_1.styled)('div', {
21
22
  ${({ theme }) => theme.breakpoints.down('sm')} {
22
23
  position: absolute;
23
24
  z-index: ${({ theme }) => theme.zIndex.appBar - 1};
24
- top: ${({ $alertHeight }) => `calc(${$alertHeight}px + ${constants_1.HEADER_HEIGHT_MOBILE}) `};
25
+ top: ${({ $alertHeight }) => `calc(${$alertHeight}px + ${constants_2.HEADER_HEIGHT_MOBILE}) `};
25
26
  bottom: 0;
26
27
  transform: ${({ $isPinned }) => $isPinned ? 'translateX(0px)' : 'translateX(-100vw)'};
27
28
 
@@ -36,8 +37,8 @@ exports.Wrapper = (0, styled_1.styled)('div', {
36
37
  });
37
38
  }};
38
39
 
39
- &.${constants_3.dashboardSidebarClassnames.hasMenuOrganization} {
40
- top: ${({ $alertHeight }) => `calc(${$alertHeight}px + ${constants_1.HEADER_HEIGHT_MOBILE} + ${OrganizationButton_1.MOBILE_BUTTON_HEIGHT}) `};
40
+ &.${constants_4.dashboardSidebarClassnames.hasMenuOrganization} {
41
+ top: ${({ $alertHeight }) => `calc(${$alertHeight}px + ${constants_2.HEADER_HEIGHT_MOBILE} + ${OrganizationButton_1.MOBILE_BUTTON_HEIGHT}) `};
41
42
  }
42
43
  }
43
44
  `;
@@ -88,11 +89,11 @@ exports.SidebarHeader = styled_1.styled.header `
88
89
 
89
90
  border-bottom: 1px solid ${({ theme }) => theme.palette.grey[300]};
90
91
 
91
- &:has(.${constants_2.menuOrganizationClassnames.button}) {
92
+ &:has(.${constants_3.menuOrganizationClassnames.button}) {
92
93
  padding: 0;
93
94
  }
94
95
 
95
- & .${constants_2.menuOrganizationClassnames.button} {
96
+ & .${constants_3.menuOrganizationClassnames.button} {
96
97
  height: ${OrganizationButton_1.MOBILE_BUTTON_HEIGHT};
97
98
  padding: ${({ theme }) => theme.spacing(3, 4)};
98
99
  }
@@ -125,7 +126,7 @@ exports.Footer = styled_1.styled.footer `
125
126
  flex-shrink: 0;
126
127
 
127
128
  box-sizing: content-box;
128
- height: 64px;
129
+ height: ${constants_1.FOOTER_DESKTOP_HEIGHT};
129
130
  margin-top: auto;
130
131
 
131
132
  background-color: ${({ theme }) => theme.palette.background.default};
@@ -140,4 +141,8 @@ exports.Footer = styled_1.styled.footer `
140
141
  ${({ theme }) => theme.breakpoints.down('sm')} {
141
142
  display: none;
142
143
  }
144
+
145
+ ${({ theme }) => theme.breakpoints.down('lg')} {
146
+ height: ${constants_1.FOOTER_LAPTOP_HEIGHT};
147
+ }
143
148
  `;
@@ -37,7 +37,7 @@ const RowComponent = (props) => {
37
37
  const isFirstCell = !index;
38
38
  return ((0, jsx_runtime_1.jsx)(styles_1.CellStyled, { "$level": isFirstCell ? level : 0, row: row, cell: cell, emptyCellValue: emptyCellValue, startAdornment: isFirstCell && renderStartAdornment(), isDisabled: isDisabledCell, className: cell.isHidePersonalData ? hidePersonalDataClassname : '' }, cellId));
39
39
  });
40
- }, [isOpen, columns, disabled]);
40
+ }, [isOpen, columns, disabled, checkboxProps.checked]);
41
41
  const renderRow = (0, react_1.useCallback)(({ key, ...nestedRowProps }) => ((0, jsx_runtime_1.jsx)(exports.Row, { keyId: keyId, ...nestedRowProps, variant: variant, isSelectable: isSelectable, selectedRows: selectedRows, gridColumns: gridColumns, isInitialExpanded: isInitialExpanded, expandedLevel: expandedLevel, initialVisibleChildrenCount: initialVisibleChildrenCount, moreButtonColumnPosition: moreButtonColumnPosition, isVisibleCollapseButton: isVisibleCollapseButton, activeRowId: activeRowId, columns: childrenColumns, onSelectRow: onSelectRow, onRowClick: onRowClick }, key)), [
42
42
  keyId,
43
43
  variant,
@@ -27,6 +27,10 @@ exports.PaginationWrapper = styled_1.styled.div `
27
27
  margin: 0 ${({ theme }) => theme.spacing(2)};
28
28
  padding-top: ${({ theme }) => theme.spacing(4)};
29
29
 
30
+ ${({ theme }) => theme.breakpoints.down('lg')} {
31
+ padding-top: ${({ theme }) => theme.spacing(2)};
32
+ }
33
+
30
34
  ${({ theme }) => theme.breakpoints.down('sm')} {
31
35
  height: 56px;
32
36
  padding: ${({ theme }) => theme.spacing(3, 4)};
@@ -62,6 +62,11 @@ exports.Content = styled_1.styled.div `
62
62
 
63
63
  padding: ${({ theme, $hasAside }) => getPaddingContent(theme, $hasAside)};
64
64
 
65
+ ${({ theme }) => theme.breakpoints.down('lg')} {
66
+ padding-right: ${({ theme }) => theme.spacing(4)};
67
+ padding-left: ${({ theme }) => theme.spacing(4)};
68
+ }
69
+
65
70
  ${({ theme }) => theme.breakpoints.down('sm')} {
66
71
  scrollbar-gutter: unset;
67
72
 
@@ -1,25 +1,6 @@
1
1
  import { type ElementType } from 'react';
2
- import { type ActionGroupProps } from '../../ActionGroup';
3
- import { type ButtonSize } from '../../Button';
4
- export type PageActionsProps<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = ActionGroupProps<TMainActionComponent, TSecondaryActionComponent> & {
5
- /**
6
- * Если true, отображается skeleton
7
- */
8
- isLoading?: boolean;
9
- size?: ButtonSize;
10
- /**
11
- * Отступ между действиями
12
- */
13
- spacing?: number;
14
- };
15
- export declare const PageActions: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>(props: ActionGroupProps<TMainActionComponent, TSecondaryActionComponent> & {
16
- /**
17
- * Если true, отображается skeleton
18
- */
2
+ export declare const PageActions: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>(props: import("../..").ActionGroupProps<TMainActionComponent, TSecondaryActionComponent> & {
19
3
  isLoading?: boolean | undefined;
20
4
  size?: "large" | "medium" | undefined;
21
- /**
22
- * Отступ между действиями
23
- */
24
5
  spacing?: number | undefined;
25
6
  } & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
@@ -2,20 +2,26 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PageActions = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
- const ActionGroup_1 = require("../../ActionGroup");
5
+ const FullSizeOutlineMd_1 = require("../../../icons/FullSizeOutlineMd");
6
+ const MinimizeOutlineMd_1 = require("../../../icons/MinimizeOutlineMd");
6
7
  const forwardRefWithGeneric_1 = require("../../forwardRefWithGeneric");
8
+ const Tooltip_1 = require("../../Tooltip");
7
9
  const MainActions_1 = require("./MainActions");
8
10
  const PageActionSkeleton_1 = require("./PageActionSkeleton");
9
11
  const SecondaryActions_1 = require("./SecondaryActions");
10
12
  const SecondaryVisibleActions_1 = require("./SecondaryVisibleActions");
11
13
  const styles_1 = require("./styles");
14
+ const useLogic_1 = require("./useLogic");
12
15
  const PageActionsInner = (props, ref) => {
13
16
  const { secondary, secondaryVisible, main, className, isLoading, size = 'medium', spacing = 2, } = props;
14
- const { disabledAction } = (0, ActionGroup_1.useActionsState)({ main, secondary });
17
+ const { disabledAction, buttonClassnames, isFocusedMode, handleClick, tooltipTitle, } = (0, useLogic_1.useLogic)({
18
+ main,
19
+ secondary,
20
+ });
15
21
  const renderSecondaryActions = () => ((0, jsx_runtime_1.jsxs)(styles_1.SecondaryWrapper, { "$spacing": spacing, children: [secondaryVisible && ((0, jsx_runtime_1.jsx)(SecondaryVisibleActions_1.SecondaryVisibleActions, { actions: secondaryVisible, size: size })), secondary && ((0, jsx_runtime_1.jsx)(SecondaryActions_1.SecondaryActions, { isDisabled: disabledAction, actions: secondary, size: size }))] }));
16
22
  if (isLoading) {
17
23
  return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { children: (0, jsx_runtime_1.jsx)(PageActionSkeleton_1.PageActionSkeleton, { size: size }) }));
18
24
  }
19
- return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className, ref: ref, children: (0, jsx_runtime_1.jsxs)(styles_1.ActionWrapper, { "$spacing": spacing, children: [(0, jsx_runtime_1.jsx)(MainActions_1.MainActions, { isDisabled: disabledAction, actions: main, size: size, spacing: spacing }), renderSecondaryActions()] }) }));
25
+ return ((0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: className, ref: ref, children: (0, jsx_runtime_1.jsxs)(styles_1.ActionWrapper, { "$spacing": spacing, children: [(0, jsx_runtime_1.jsx)(Tooltip_1.Tooltip, { title: tooltipTitle, enterDelay: 400, enterNextDelay: 400, placement: "bottom-end", children: (0, jsx_runtime_1.jsx)(styles_1.FocusModeButton, { className: buttonClassnames, variant: "outlined", onClick: handleClick, "aria-label": tooltipTitle, color: "grey", children: isFocusedMode ? (0, jsx_runtime_1.jsx)(MinimizeOutlineMd_1.MinimizeOutlineMd, {}) : (0, jsx_runtime_1.jsx)(FullSizeOutlineMd_1.FullSizeOutlineMd, {}) }) }), (0, jsx_runtime_1.jsx)(MainActions_1.MainActions, { isDisabled: disabledAction, actions: main, size: size, spacing: spacing }), renderSecondaryActions()] }) }));
20
26
  };
21
27
  exports.PageActions = (0, forwardRefWithGeneric_1.forwardRefWithGeneric)(PageActionsInner);
@@ -0,0 +1,4 @@
1
+ export declare const focusModeButtonClassnames: {
2
+ isShowOnDesktop: string;
3
+ isShowOnLaptop: string;
4
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.focusModeButtonClassnames = void 0;
4
+ const createUIKitClassname_1 = require("../../utils/createUIKitClassname");
5
+ exports.focusModeButtonClassnames = {
6
+ isShowOnDesktop: (0, createUIKitClassname_1.createUIKitClassname)('focus-mode-button__show-desktop'),
7
+ isShowOnLaptop: (0, createUIKitClassname_1.createUIKitClassname)('focus-mode-button__show-laptop'),
8
+ };
@@ -1,5 +1,6 @@
1
1
  export * from './MainActions';
2
2
  export * from './PageActionSkeleton';
3
3
  export * from './PageActions';
4
+ export type { PageActionsProps } from './types';
4
5
  export * from './SecondaryActions';
5
6
  export * from './SecondaryVisibleActions';
@@ -15,3 +15,12 @@ export declare const ActionWrapper: import("@emotion/styled/dist/declarations/sr
15
15
  } & {
16
16
  $spacing: number;
17
17
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
18
+ export declare const FocusModeButton: import("@emotion/styled/dist/declarations/src/types").StyledComponent<Omit<import("../..").WithoutEmotionSpecific<import("@mui/material").ButtonProps>, "color" | "component" | "variant" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
19
+ variant?: "light" | "link" | "text" | "contained" | "outlined" | undefined;
20
+ loading?: boolean | undefined;
21
+ color?: "primary" | "success" | "warning" | "error" | "grey" | undefined;
22
+ component?: import("react").ElementType | undefined;
23
+ selected?: boolean | undefined;
24
+ } & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
25
+ theme?: import("@emotion/react").Theme | undefined;
26
+ }, {}, {}>;
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ActionWrapper = exports.SecondaryWrapper = exports.Wrapper = void 0;
3
+ exports.FocusModeButton = exports.ActionWrapper = exports.SecondaryWrapper = exports.Wrapper = void 0;
4
+ const IconButton_1 = require("../../IconButton");
4
5
  const styled_1 = require("../../styled");
6
+ const constants_1 = require("./constants");
5
7
  exports.Wrapper = styled_1.styled.div `
6
8
  display: flex;
7
9
  grid-column: 3;
@@ -30,3 +32,18 @@ exports.ActionWrapper = styled_1.styled.div `
30
32
  gap: ${({ theme }) => theme.spacing(2)};
31
33
  }
32
34
  `;
35
+ exports.FocusModeButton = (0, styled_1.styled)(IconButton_1.IconButton) `
36
+ display: none;
37
+
38
+ ${({ theme }) => theme.breakpoints.down('lg')} {
39
+ &.${constants_1.focusModeButtonClassnames.isShowOnLaptop} {
40
+ display: inline-flex;
41
+ }
42
+ }
43
+
44
+ ${({ theme }) => theme.breakpoints.up('lg')} {
45
+ &.${constants_1.focusModeButtonClassnames.isShowOnDesktop} {
46
+ display: inline-flex;
47
+ }
48
+ }
49
+ `;
@@ -0,0 +1,14 @@
1
+ import type { ElementType } from 'react';
2
+ import type { ActionGroupProps } from '../../ActionGroup';
3
+ import type { ButtonSize } from '../../Button';
4
+ export type PageActionsProps<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = ActionGroupProps<TMainActionComponent, TSecondaryActionComponent> & {
5
+ /**
6
+ * Если true, отображается skeleton
7
+ */
8
+ isLoading?: boolean;
9
+ size?: ButtonSize;
10
+ /**
11
+ * Отступ между действиями
12
+ */
13
+ spacing?: number;
14
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export * from './useLogic';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./useLogic"), exports);
@@ -0,0 +1,11 @@
1
+ import { type ElementType } from 'react';
2
+ import type { PageActionsProps } from '../types';
3
+ type UseLogicParams<TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType> = Pick<PageActionsProps<TMainActionComponent, TSecondaryActionComponent>, 'main' | 'secondary'>;
4
+ export declare const useLogic: <TMainActionComponent extends ElementType = ElementType, TSecondaryActionComponent extends ElementType = ElementType>({ main, secondary, }: UseLogicParams<TMainActionComponent, TSecondaryActionComponent>) => {
5
+ disabledAction: boolean;
6
+ buttonClassnames: string;
7
+ isFocusedMode: boolean;
8
+ handleClick: () => void;
9
+ tooltipTitle: string;
10
+ };
11
+ export {};
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useLogic = void 0;
4
+ const react_1 = require("react");
5
+ const ActionGroup_1 = require("../../../ActionGroup");
6
+ const NextFeatureFlagsContext_1 = require("../../../ConfigProvider/NextFeatureFlagsContext");
7
+ const DashboardContext_1 = require("../../../DashboardContext");
8
+ const classNames_1 = require("../../../utils/classNames");
9
+ const constants_1 = require("../constants");
10
+ const useLogic = ({ main, secondary, }) => {
11
+ const { showFocusModeButtonOnDesktop, showFocusModeButtonOnLaptop } = (0, react_1.useContext)(NextFeatureFlagsContext_1.NextFeatureFlagsContext);
12
+ const { setFocusedMode, isFocusedMode } = (0, react_1.useContext)(DashboardContext_1.DashboardContext);
13
+ const { disabledAction } = (0, ActionGroup_1.useActionsState)({ main, secondary });
14
+ const buttonClassnames = (0, react_1.useMemo)(() => (0, classNames_1.classNames)({
15
+ [constants_1.focusModeButtonClassnames.isShowOnDesktop]: showFocusModeButtonOnDesktop,
16
+ [constants_1.focusModeButtonClassnames.isShowOnLaptop]: showFocusModeButtonOnLaptop,
17
+ }), [showFocusModeButtonOnDesktop, showFocusModeButtonOnLaptop]);
18
+ const handleClick = () => {
19
+ setFocusedMode(!isFocusedMode);
20
+ };
21
+ const tooltipTitle = isFocusedMode
22
+ ? 'Свернуть и вернуть шапку сервиса'
23
+ : 'Раскрыть на весь экран';
24
+ return {
25
+ disabledAction,
26
+ buttonClassnames,
27
+ isFocusedMode,
28
+ handleClick,
29
+ tooltipTitle,
30
+ };
31
+ };
32
+ exports.useLogic = useLogic;
@@ -13,6 +13,10 @@ exports.Wrapper = styled_1.styled.header `
13
13
 
14
14
  padding: ${({ theme }) => theme.spacing(0, 6)};
15
15
 
16
+ ${({ theme }) => theme.breakpoints.down('lg')} {
17
+ padding: ${({ theme }) => theme.spacing(0, 4)};
18
+ }
19
+
16
20
  ${({ theme }) => theme.breakpoints.down('sm')} {
17
21
  display: block;
18
22
 
@@ -16,6 +16,10 @@ exports.Wrapper = styled_1.styled.div `
16
16
 
17
17
  background-color: ${({ theme }) => theme.palette.common.white};
18
18
 
19
+ ${({ theme }) => theme.breakpoints.down('lg')} {
20
+ grid-row-gap: 0;
21
+ }
22
+
19
23
  ${({ theme }) => theme.breakpoints.down('sm')} {
20
24
  scroll-behavior: smooth;
21
25
 
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Wrapper = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const styled_1 = require("../styled");
5
6
  exports.Wrapper = styled_1.styled.footer `
6
7
  display: flex;
@@ -8,7 +9,7 @@ exports.Wrapper = styled_1.styled.footer `
8
9
  align-items: center;
9
10
  justify-content: flex-end;
10
11
 
11
- min-height: 64px;
12
+ min-height: ${constants_1.FOOTER_DESKTOP_HEIGHT};
12
13
  padding: ${({ theme }) => theme.spacing(0, 6)};
13
14
 
14
15
  background-color: ${({ theme }) => theme.palette.background.default};
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Footer = exports.ChildrenWrapper = exports.Content = exports.Dummy = exports.Aside = void 0;
4
+ const constants_1 = require("../constants");
4
5
  const PageAside_1 = require("../PageAside");
5
6
  const styled_1 = require("../styled");
6
- const constants_1 = require("./constants");
7
+ const constants_2 = require("./constants");
7
8
  exports.Aside = (0, styled_1.styled)('aside', {
8
9
  shouldForwardProp: (prop) => !['$isPinned'].includes(prop),
9
10
  }) `
@@ -18,7 +19,7 @@ exports.Aside = (0, styled_1.styled)('aside', {
18
19
  border-bottom-right-radius: ${({ theme }) => theme.shape.medium};
19
20
 
20
21
  &:hover {
21
- .${constants_1.pinnableAsideClassnames.content} {
22
+ .${constants_2.pinnableAsideClassnames.content} {
22
23
  transform: translateX(0);
23
24
  }
24
25
  }
@@ -123,7 +124,7 @@ exports.Footer = styled_1.styled.footer `
123
124
  flex-shrink: 0;
124
125
 
125
126
  box-sizing: content-box;
126
- height: 64px;
127
+ height: ${constants_1.FOOTER_DESKTOP_HEIGHT};
127
128
  margin-top: auto;
128
129
 
129
130
  background-color: ${({ theme }) => theme.palette.background.default};
@@ -132,4 +133,8 @@ exports.Footer = styled_1.styled.footer `
132
133
  ${({ theme }) => theme.breakpoints.down('sm')} {
133
134
  display: none;
134
135
  }
136
+
137
+ ${({ theme }) => theme.breakpoints.down('lg')} {
138
+ height: ${constants_1.FOOTER_LAPTOP_HEIGHT};
139
+ }
135
140
  `;
@@ -0,0 +1,2 @@
1
+ export declare const FOOTER_DESKTOP_HEIGHT = "64px";
2
+ export declare const FOOTER_LAPTOP_HEIGHT = "56px";
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FOOTER_LAPTOP_HEIGHT = exports.FOOTER_DESKTOP_HEIGHT = void 0;
4
+ exports.FOOTER_DESKTOP_HEIGHT = '64px';
5
+ exports.FOOTER_LAPTOP_HEIGHT = '56px';
@@ -1,2 +1,3 @@
1
1
  export * from './date';
2
2
  export * from './scrollbar';
3
+ export * from './footer';
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./date"), exports);
18
18
  __exportStar(require("./scrollbar"), exports);
19
+ __exportStar(require("./footer"), exports);
@@ -17,5 +17,8 @@ type UseFeatureFlagsParams<TFlag extends keyof NextFeatureFlagsContextProps> = {
17
17
  * @param componentName - Название компонента, для которого нужно получить флаги.
18
18
  * @param localFlags - Локальные флаги, переданные через пропсы.
19
19
  */
20
- export declare const useFeatureFlags: <TFlag extends never>({ localFlags, }: UseFeatureFlagsParams<TFlag>) => {};
20
+ export declare const useFeatureFlags: <TFlag extends keyof {
21
+ showFocusModeButtonOnLaptop?: boolean | undefined;
22
+ showFocusModeButtonOnDesktop?: boolean | undefined;
23
+ }>({ localFlags, }: UseFeatureFlagsParams<TFlag>) => {};
21
24
  export {};