@astral/ui 4.91.2 → 4.92.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 (187) hide show
  1. package/components/Alert/Alert.js +2 -2
  2. package/components/Autocomplete/Autocomplete.js +2 -2
  3. package/components/Autocomplete/useLogic/useLogic.js +2 -2
  4. package/components/Badge/Badge.js +2 -2
  5. package/components/BulletList/BulletList.js +2 -2
  6. package/components/BulletListItem/BulletListItem.js +2 -2
  7. package/components/Button/useLogic/useLogic.js +2 -2
  8. package/components/Checkbox/Icon/Icon.js +2 -2
  9. package/components/Checkbox/useLogic/useLogic.js +2 -2
  10. package/components/Chip/ChipStatusIcon/ChipStatusIcon.js +2 -2
  11. package/components/Chip/useLogic/useLogic.js +2 -2
  12. package/components/ConfirmDialog/ConfirmDialog.js +2 -2
  13. package/components/CopyTypography/CopyTypography.js +3 -3
  14. package/components/DashboardAlert/DashboardAlert.js +2 -2
  15. package/components/DashboardLayout/DashboardSidebar/useLogic/useLogic.js +2 -2
  16. package/components/DashboardLayout/Header/styles.js +8 -0
  17. package/components/DashboardLayout/Main/styles.js +8 -0
  18. package/components/DashboardSidebarSkeleton/DashboardSidebarSkeleton.js +2 -2
  19. package/components/DataGrid/Body/Body.js +2 -2
  20. package/components/DataGrid/Cell/Cell.js +2 -2
  21. package/components/DataGrid/DataGrid.js +2 -2
  22. package/components/DataGrid/HeadCell/HeadCell.js +2 -2
  23. package/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +2 -2
  24. package/components/DataGrid/Row/Row.js +3 -3
  25. package/components/DataGrid/RowBase/RowBase.js +2 -2
  26. package/components/DataGridInfinite/DataGridInfinite.js +2 -2
  27. package/components/DataGridPaginationContainer/DataGridPaginationContainer.js +2 -2
  28. package/components/DescriptionCell/useLogic/useLogic.js +2 -2
  29. package/components/Dialog/Dialog.js +2 -2
  30. package/components/Dialog/useLogic/useLogic.js +2 -2
  31. package/components/DialogActions/DialogActions.js +2 -2
  32. package/components/DialogContent/DialogContent.js +2 -2
  33. package/components/DonutChart/DonutChart.js +2 -2
  34. package/components/EmailField/EmailField.js +2 -2
  35. package/components/EmailOrPhoneField/EmailOrPhoneField.js +2 -2
  36. package/components/Filename/Filename.js +2 -2
  37. package/components/GuidTypography/GuidTypography.js +5 -5
  38. package/components/HintPopover/HintPopover.js +2 -2
  39. package/components/IconButton/IconButton.js +2 -2
  40. package/components/Loader/Loader.js +2 -2
  41. package/components/MenuItem/MenuItem.js +2 -2
  42. package/components/MinimalisticPagination/MinimalisticPagination.js +2 -2
  43. package/components/NewPopover/NewPopover.js +2 -2
  44. package/components/NewStepper/NewStepper.js +2 -2
  45. package/components/NewStepper/Step/Step.js +3 -3
  46. package/components/Notification/NotificationStackContainer/NotificationStackContainer.js +3 -3
  47. package/components/PageAside/PageAside.js +2 -2
  48. package/components/PageAsideNavigation/PageAsideNavigation.js +2 -2
  49. package/components/PageContent/PageContent.js +2 -2
  50. package/components/PageContent/styles.js +1 -1
  51. package/components/PageHeader/HeaderContent/HeaderContent.js +2 -2
  52. package/components/PageHeader/HeaderContent/styles.js +12 -0
  53. package/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
  54. package/components/PageHeader/PageHeader.js +3 -3
  55. package/components/PageHeader/styles.js +16 -4
  56. package/components/PageLayout/PageLayout.js +2 -2
  57. package/components/PageLayout/styles.js +14 -2
  58. package/components/PageLayoutContainer/PageLayoutContainer.js +2 -2
  59. package/components/PageLayoutSection/PageLayoutSection.js +2 -2
  60. package/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js +2 -2
  61. package/components/PagePinnableAside/PagePinnableAside.js +2 -2
  62. package/components/PasswordField/PasswordField.js +2 -2
  63. package/components/PdfViewer/PdfDocument/PdfDocument.js +2 -2
  64. package/components/PinButton/PinButton.js +2 -2
  65. package/components/Radio/useLogic/useLogic.js +2 -2
  66. package/components/RadioCard/RadioCard.js +2 -2
  67. package/components/SearchField/SearchField.js +2 -2
  68. package/components/StaticCalendar/StaticDaysCalendar/StaticDaysCalendar.js +2 -2
  69. package/components/SvgIcon/SvgIcon.js +2 -2
  70. package/components/Tabs/Tabs.js +2 -2
  71. package/components/Tag/useLogic/useLogic.js +2 -2
  72. package/components/TagBadge/TagBadge.js +2 -2
  73. package/components/TextField/TextField.js +2 -2
  74. package/components/Tooltip/Tooltip.js +2 -2
  75. package/components/Tooltip/useLogic/useLogic.js +2 -2
  76. package/components/Tree/TreeList/TreeList.js +2 -2
  77. package/components/TreeLikeList/TreeLikeList.js +2 -2
  78. package/components/Typography/Typography.js +2 -2
  79. package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -4
  80. package/components/utils/classNames/classNames.d.ts +1 -1
  81. package/components/utils/classNames/classNames.js +1 -1
  82. package/components/utils/cn/cn.d.ts +1 -0
  83. package/components/utils/cn/cn.js +1 -0
  84. package/components/utils/cn/index.d.ts +1 -0
  85. package/components/utils/cn/index.js +1 -0
  86. package/components/utils/cn/public.d.ts +1 -0
  87. package/components/utils/cn/public.js +1 -0
  88. package/hook-form/EditableText/EditableText.js +2 -2
  89. package/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +2 -2
  90. package/hook-form/FormMobilePhoneField/FormMobilePhoneField.js +2 -2
  91. package/hook-form/FormPageLayout/FormPageLayout.js +2 -2
  92. package/hook-form/FormPageLayoutBase/FormPageLayoutBase.js +2 -2
  93. package/hook-form/FormWizardPageLayout/FormWizardPageLayout.js +2 -2
  94. package/node/components/Alert/Alert.js +2 -2
  95. package/node/components/Autocomplete/Autocomplete.js +2 -2
  96. package/node/components/Autocomplete/useLogic/useLogic.js +2 -2
  97. package/node/components/Badge/Badge.js +2 -2
  98. package/node/components/BulletList/BulletList.js +2 -2
  99. package/node/components/BulletListItem/BulletListItem.js +2 -2
  100. package/node/components/Button/useLogic/useLogic.js +2 -2
  101. package/node/components/Checkbox/Icon/Icon.js +2 -2
  102. package/node/components/Checkbox/useLogic/useLogic.js +2 -2
  103. package/node/components/Chip/ChipStatusIcon/ChipStatusIcon.js +2 -2
  104. package/node/components/Chip/useLogic/useLogic.js +2 -2
  105. package/node/components/ConfirmDialog/ConfirmDialog.js +2 -2
  106. package/node/components/CopyTypography/CopyTypography.js +3 -3
  107. package/node/components/DashboardAlert/DashboardAlert.js +2 -2
  108. package/node/components/DashboardLayout/DashboardSidebar/useLogic/useLogic.js +2 -2
  109. package/node/components/DashboardLayout/Header/styles.js +8 -0
  110. package/node/components/DashboardLayout/Main/styles.js +8 -0
  111. package/node/components/DashboardSidebarSkeleton/DashboardSidebarSkeleton.js +2 -2
  112. package/node/components/DataGrid/Body/Body.js +2 -2
  113. package/node/components/DataGrid/Cell/Cell.js +2 -2
  114. package/node/components/DataGrid/DataGrid.js +2 -2
  115. package/node/components/DataGrid/HeadCell/HeadCell.js +2 -2
  116. package/node/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +2 -2
  117. package/node/components/DataGrid/Row/Row.js +3 -3
  118. package/node/components/DataGrid/RowBase/RowBase.js +2 -2
  119. package/node/components/DataGridInfinite/DataGridInfinite.js +2 -2
  120. package/node/components/DataGridPaginationContainer/DataGridPaginationContainer.js +2 -2
  121. package/node/components/DescriptionCell/useLogic/useLogic.js +2 -2
  122. package/node/components/Dialog/Dialog.js +2 -2
  123. package/node/components/Dialog/useLogic/useLogic.js +2 -2
  124. package/node/components/DialogActions/DialogActions.js +2 -2
  125. package/node/components/DialogContent/DialogContent.js +2 -2
  126. package/node/components/DonutChart/DonutChart.js +2 -2
  127. package/node/components/EmailField/EmailField.js +2 -2
  128. package/node/components/EmailOrPhoneField/EmailOrPhoneField.js +2 -2
  129. package/node/components/Filename/Filename.js +2 -2
  130. package/node/components/GuidTypography/GuidTypography.js +5 -5
  131. package/node/components/HintPopover/HintPopover.js +2 -2
  132. package/node/components/IconButton/IconButton.js +2 -2
  133. package/node/components/Loader/Loader.js +2 -2
  134. package/node/components/MenuItem/MenuItem.js +2 -2
  135. package/node/components/MinimalisticPagination/MinimalisticPagination.js +2 -2
  136. package/node/components/NewPopover/NewPopover.js +2 -2
  137. package/node/components/NewStepper/NewStepper.js +2 -2
  138. package/node/components/NewStepper/Step/Step.js +3 -3
  139. package/node/components/Notification/NotificationStackContainer/NotificationStackContainer.js +3 -3
  140. package/node/components/PageAside/PageAside.js +2 -2
  141. package/node/components/PageAsideNavigation/PageAsideNavigation.js +2 -2
  142. package/node/components/PageContent/PageContent.js +2 -2
  143. package/node/components/PageContent/styles.js +11 -11
  144. package/node/components/PageHeader/HeaderContent/HeaderContent.js +2 -2
  145. package/node/components/PageHeader/HeaderContent/styles.js +12 -0
  146. package/node/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
  147. package/node/components/PageHeader/PageHeader.js +3 -3
  148. package/node/components/PageHeader/styles.js +16 -4
  149. package/node/components/PageLayout/PageLayout.js +2 -2
  150. package/node/components/PageLayout/styles.js +14 -2
  151. package/node/components/PageLayoutContainer/PageLayoutContainer.js +2 -2
  152. package/node/components/PageLayoutSection/PageLayoutSection.js +2 -2
  153. package/node/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js +2 -2
  154. package/node/components/PagePinnableAside/PagePinnableAside.js +2 -2
  155. package/node/components/PasswordField/PasswordField.js +2 -2
  156. package/node/components/PdfViewer/PdfDocument/PdfDocument.js +2 -2
  157. package/node/components/PinButton/PinButton.js +2 -2
  158. package/node/components/Radio/useLogic/useLogic.js +2 -2
  159. package/node/components/RadioCard/RadioCard.js +2 -2
  160. package/node/components/SearchField/SearchField.js +2 -2
  161. package/node/components/StaticCalendar/StaticDaysCalendar/StaticDaysCalendar.js +2 -2
  162. package/node/components/SvgIcon/SvgIcon.js +2 -2
  163. package/node/components/Tabs/Tabs.js +2 -2
  164. package/node/components/Tag/useLogic/useLogic.js +2 -2
  165. package/node/components/TagBadge/TagBadge.js +2 -2
  166. package/node/components/TextField/TextField.js +2 -2
  167. package/node/components/Tooltip/Tooltip.js +2 -2
  168. package/node/components/Tooltip/useLogic/useLogic.js +2 -2
  169. package/node/components/Tree/TreeList/TreeList.js +2 -2
  170. package/node/components/TreeLikeList/TreeLikeList.js +2 -2
  171. package/node/components/Typography/Typography.js +2 -2
  172. package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -4
  173. package/node/components/utils/classNames/classNames.d.ts +1 -1
  174. package/node/components/utils/classNames/classNames.js +2 -2
  175. package/node/components/utils/cn/cn.d.ts +1 -0
  176. package/node/components/utils/cn/cn.js +8 -0
  177. package/node/components/utils/cn/index.d.ts +1 -0
  178. package/node/components/utils/cn/index.js +17 -0
  179. package/node/components/utils/cn/public.d.ts +1 -0
  180. package/node/components/utils/cn/public.js +17 -0
  181. package/node/hook-form/EditableText/EditableText.js +2 -2
  182. package/node/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +2 -2
  183. package/node/hook-form/FormMobilePhoneField/FormMobilePhoneField.js +2 -2
  184. package/node/hook-form/FormPageLayout/FormPageLayout.js +2 -2
  185. package/node/hook-form/FormPageLayoutBase/FormPageLayoutBase.js +2 -2
  186. package/node/hook-form/FormWizardPageLayout/FormWizardPageLayout.js +2 -2
  187. package/package.json +2 -2
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
3
  import { useHidePersonalData } from '../personalDataSecurity';
4
4
  import { Tooltip } from '../Tooltip';
5
- import { classNames } from '../utils/classNames';
5
+ import { cn } from '../utils/cn';
6
6
  import { FileBaseName, FileSuffix, StyledTypography } from './styles';
7
7
  import { useLogic } from './useLogic';
8
8
  export const Filename = forwardRef((props, forwardedRef) => {
@@ -14,5 +14,5 @@ export const Filename = forwardRef((props, forwardedRef) => {
14
14
  const hidePersonalDataClassname = useHidePersonalData({
15
15
  isEnabled: isHidePersonalData,
16
16
  });
17
- return (_jsx(Tooltip, { title: isOverflowed && children, disableInteractive: true, ...tooltipProps, className: classNames(tooltipProps?.className, hidePersonalDataClassname), children: _jsxs(StyledTypography, { "$align": align, variant: variant, className: classNames(className, hidePersonalDataClassname), ...restProps, children: [_jsx(FileBaseName, { ...baseNameProps }), _jsx(FileSuffix, { children: suffixWithExtension })] }) }));
17
+ return (_jsx(Tooltip, { title: isOverflowed && children, disableInteractive: true, ...tooltipProps, className: cn(tooltipProps?.className, hidePersonalDataClassname), children: _jsxs(StyledTypography, { "$align": align, variant: variant, className: cn(className, hidePersonalDataClassname), ...restProps, children: [_jsx(FileBaseName, { ...baseNameProps }), _jsx(FileSuffix, { children: suffixWithExtension })] }) }));
18
18
  });
@@ -1,18 +1,18 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { CopyTypography } from '../CopyTypography';
3
3
  import { OverflowTypography } from '../OverflowTypography';
4
- import { classNames } from '../utils/classNames';
4
+ import { cn } from '../utils/cn';
5
5
  import { useLogic } from './useLogic';
6
6
  export const GuidTypography = (props) => {
7
7
  const { className, tooltipProps, canCopy, copyParams, restProps, resolvedCopyText, hidePersonalDataClassname, } = useLogic(props);
8
8
  if (canCopy) {
9
9
  return (_jsx(CopyTypography, { isShowCopyText: true, copyText: resolvedCopyText, tooltipProps: {
10
10
  ...tooltipProps,
11
- className: classNames(tooltipProps?.className, hidePersonalDataClassname),
12
- }, ...copyParams, children: _jsx(OverflowTypography, { visibleLastSymbolsCount: 4, className: classNames(className, hidePersonalDataClassname), tooltipProps: { title: undefined }, ...restProps }) }));
11
+ className: cn(tooltipProps?.className, hidePersonalDataClassname),
12
+ }, ...copyParams, children: _jsx(OverflowTypography, { visibleLastSymbolsCount: 4, className: cn(className, hidePersonalDataClassname), tooltipProps: { title: undefined }, ...restProps }) }));
13
13
  }
14
- return (_jsx(OverflowTypography, { visibleLastSymbolsCount: 4, className: classNames(className, hidePersonalDataClassname), tooltipProps: {
14
+ return (_jsx(OverflowTypography, { visibleLastSymbolsCount: 4, className: cn(className, hidePersonalDataClassname), tooltipProps: {
15
15
  ...tooltipProps,
16
- className: classNames(tooltipProps?.className, hidePersonalDataClassname),
16
+ className: cn(tooltipProps?.className, hidePersonalDataClassname),
17
17
  }, ...restProps }));
18
18
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CrossOutlineMd } from '../../icons/CrossOutlineMd';
3
3
  import { useViewportType } from '../useViewportType';
4
- import { classNames } from '../utils/classNames';
4
+ import { cn } from '../utils/cn';
5
5
  import { cva } from '../utils/cva';
6
6
  import { hintPopoverClassnames } from './constants';
7
7
  import { ActionRow, Body, CloseButton, StyledHintPopover, Title, } from './styles';
@@ -19,5 +19,5 @@ const hintPopoverCva = cva(hintPopoverClassnames.root, {
19
19
  */
20
20
  export const HintPopover = ({ variant = 'dark', title, action, onClose, contentRef, children, className, ...restProps }) => {
21
21
  const { isMobile } = useViewportType();
22
- return (_jsx(StyledHintPopover, { ...restProps, className: classNames(className, hintPopoverCva({ variant })), hasArrow: true, disableMobileDrawer: true, onClose: onClose, children: _jsxs(Body, { ref: contentRef, tabIndex: -1, children: [_jsx(CloseButton, { variant: "text", onClick: onClose, "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: _jsx(CrossOutlineMd, {}) }), title && (_jsx(Title, { component: "div", variant: isMobile ? 'h5' : 'h4', children: title })), children, action && _jsx(ActionRow, { children: action })] }) }));
22
+ return (_jsx(StyledHintPopover, { ...restProps, className: cn(className, hintPopoverCva({ variant })), hasArrow: true, disableMobileDrawer: true, onClose: onClose, children: _jsxs(Body, { ref: contentRef, tabIndex: -1, children: [_jsx(CloseButton, { variant: "text", onClick: onClose, "aria-label": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", children: _jsx(CrossOutlineMd, {}) }), title && (_jsx(Title, { component: "div", variant: isMobile ? 'h5' : 'h4', children: title })), children, action && _jsx(ActionRow, { children: action })] }) }));
23
23
  };
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ButtonVariants } from '../Button';
3
3
  import { forwardRefWithGeneric } from '../forwardRefWithGeneric';
4
- import { classNames } from '../utils/classNames';
4
+ import { cn } from '../utils/cn';
5
5
  import { iconButtonClassnames } from './constants';
6
6
  import { StyledButton } from './styles';
7
7
  const UnwrappedIconButton = (props, ref) => {
8
8
  const { variant = ButtonVariants.Contained, children, className, ...restProps } = props;
9
- return (_jsx(StyledButton, { variant: variant, className: classNames(iconButtonClassnames.root, className), ...restProps, ref: ref, children: children }));
9
+ return (_jsx(StyledButton, { variant: variant, className: cn(iconButtonClassnames.root, className), ...restProps, ref: ref, children: children }));
10
10
  };
11
11
  export const IconButton = forwardRefWithGeneric(UnwrappedIconButton);
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from '../utils/classNames';
2
+ import { cn } from '../utils/cn';
3
3
  import { loaderClassnames } from './constants';
4
4
  import { StyledSvgIcon, Wrapper } from './styles';
5
5
  export const Loader = ({ size = 'medium', color = 'primary', className, style, }) => {
6
- return (_jsx(Wrapper, { className: classNames(className, loaderClassnames.root), "$size": size, "$color": color, "data-color": color, role: "progressbar", style: style, children: _jsx(StyledSvgIcon, { viewBox: "22 22 44 44", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: _jsx("circle", { cx: "44", cy: "44", r: "20.2", fill: "none", stroke: "currentColor", strokeWidth: "3.6", strokeDasharray: "80, 200", strokeDashoffset: "0" }) }) }));
6
+ return (_jsx(Wrapper, { className: cn(className, loaderClassnames.root), "$size": size, "$color": color, "data-color": color, role: "progressbar", style: style, children: _jsx(StyledSvgIcon, { viewBox: "22 22 44 44", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", children: _jsx("circle", { cx: "44", cy: "44", r: "20.2", fill: "none", stroke: "currentColor", strokeWidth: "3.6", strokeDasharray: "80, 200", strokeDashoffset: "0" }) }) }));
7
7
  };
@@ -2,10 +2,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import MuiMenuItem from '@mui/material/MenuItem';
3
3
  import { forwardRefWithGeneric } from '../forwardRefWithGeneric';
4
4
  import { Tooltip } from '../Tooltip';
5
- import { classNames } from '../utils/classNames';
5
+ import { cn } from '../utils/cn';
6
6
  import { menuItemClassnames } from './constants';
7
7
  const InnerMenuItem = (props, ref) => {
8
8
  const { disabledReason, disabled, component = 'div', title, tooltipPlacement = 'left', note, className, ...rest } = props;
9
- return (_jsx("li", { children: _jsx(Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: _jsx(MuiMenuItem, { className: classNames(menuItemClassnames.root, className), ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
9
+ return (_jsx("li", { children: _jsx(Tooltip, { title: disabled ? disabledReason : note, placement: tooltipPlacement, withoutContainer: !disabled, children: _jsx(MuiMenuItem, { className: cn(menuItemClassnames.root, className), ...rest, disabled: disabled, title: title, ref: ref, component: component }) }, title) }));
10
10
  };
11
11
  export const MenuItem = forwardRefWithGeneric(InnerMenuItem);
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { NextOutlineMd } from '../../icons/NextOutlineMd';
3
3
  import { PreviousOutlineMd } from '../../icons/PreviousOutlineMd';
4
4
  import { IconButton } from '../IconButton';
5
- import { classNames } from '../utils/classNames';
5
+ import { cn } from '../utils/cn';
6
6
  import { cva } from '../utils/cva';
7
7
  import { minimalisticPaginationClassnames } from './constants';
8
8
  import { PageItem, PaginationWrapper } from './styles';
@@ -17,5 +17,5 @@ const rootCva = cva(minimalisticPaginationClassnames.root, {
17
17
  export const MinimalisticPagination = (props) => {
18
18
  const { previousButtonProps, nextButtonProps } = useLogic(props);
19
19
  const { page, className, isDisabled } = props;
20
- return (_jsxs(PaginationWrapper, { className: classNames(className, rootCva({ isDisabled })), "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: [_jsx(IconButton, { "aria-label": "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443", variant: "text", ...previousButtonProps, children: _jsx(PreviousOutlineMd, {}) }), _jsx(PageItem, { component: "span", children: page }), _jsx(IconButton, { "aria-label": "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443", variant: "text", ...nextButtonProps, children: _jsx(NextOutlineMd, {}) })] }));
20
+ return (_jsxs(PaginationWrapper, { className: cn(className, rootCva({ isDisabled })), "aria-label": "\u041F\u0430\u0433\u0438\u043D\u0430\u0446\u0438\u044F", children: [_jsx(IconButton, { "aria-label": "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443", variant: "text", ...previousButtonProps, children: _jsx(PreviousOutlineMd, {}) }), _jsx(PageItem, { component: "span", children: page }), _jsx(IconButton, { "aria-label": "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443", variant: "text", ...nextButtonProps, children: _jsx(NextOutlineMd, {}) })] }));
21
21
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { BottomDrawer } from '../BottomDrawer';
3
- import { classNames } from '../utils/classNames';
3
+ import { cn } from '../utils/cn';
4
4
  import { cva } from '../utils/cva';
5
5
  import { popoverClassnames } from './constants';
6
6
  import { AnimatedWrapper, InnerContainer, PopoverArrow, StyledMuiPopper, } from './styles';
@@ -29,5 +29,5 @@ export const NewPopover = ({ children, onClose, isOpen, title, className, style,
29
29
  disableAutoFocus,
30
30
  }, children: children }));
31
31
  }
32
- return (_jsx(StyledMuiPopper, { className: classNames(popoverClassnames.root, className), style: style, open: shouldRender, placement: placement, anchorEl: anchorEl, disablePortal: disablePortal, modifiers: mergedModifiers, children: _jsxs(AnimatedWrapper, { className: animatedWrapperCva({ isOpen: isOpened, hasArrow }), style: animatedWrapperStyle, onAnimationEnd: handleAnimationEnd, children: [hasArrow && (_jsx(PopoverArrow, { ref: setArrowElement, className: popoverClassnames.arrow })), _jsx(InnerContainer, { ref: setContainerRef, tabIndex: -1, className: popoverClassnames.innerContainer, children: children })] }) }));
32
+ return (_jsx(StyledMuiPopper, { className: cn(popoverClassnames.root, className), style: style, open: shouldRender, placement: placement, anchorEl: anchorEl, disablePortal: disablePortal, modifiers: mergedModifiers, children: _jsxs(AnimatedWrapper, { className: animatedWrapperCva({ isOpen: isOpened, hasArrow }), style: animatedWrapperStyle, onAnimationEnd: handleAnimationEnd, children: [hasArrow && (_jsx(PopoverArrow, { ref: setArrowElement, className: popoverClassnames.arrow })), _jsx(InnerContainer, { ref: setContainerRef, tabIndex: -1, className: popoverClassnames.innerContainer, children: children })] }) }));
33
33
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from '../utils/classNames';
2
+ import { cn } from '../utils/cn';
3
3
  import { cva } from '../utils/cva';
4
4
  import { stepperClassnames } from './constants';
5
5
  import { StepperContextProvider } from './StepperContext';
@@ -22,7 +22,7 @@ const stepper = cva(stepperClassnames.root, {
22
22
  });
23
23
  export const NewStepper = (props) => {
24
24
  const { containerRef, stepperConnector, stepperAlternativeLabel, activeStep, onClickPrevStep, onClickStep, orientation, className, children, } = useLogic(props);
25
- return (_jsx(StepperContextProvider, { orientation: orientation, activeStep: activeStep, connector: stepperConnector, alternativeLabel: stepperAlternativeLabel, onClickPrevStep: onClickPrevStep, onClickStep: onClickStep, children: _jsx(Wrapper, { ref: containerRef, role: "group", className: classNames(stepper({
25
+ return (_jsx(StepperContextProvider, { orientation: orientation, activeStep: activeStep, connector: stepperConnector, alternativeLabel: stepperAlternativeLabel, onClickPrevStep: onClickPrevStep, onClickStep: onClickStep, children: _jsx(Wrapper, { ref: containerRef, role: "group", className: cn(stepper({
26
26
  alternativeLabel: stepperAlternativeLabel,
27
27
  connector: stepperConnector,
28
28
  orientation,
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { classNames } from '../../utils/classNames';
2
+ import { cn } from '../../utils/cn';
3
3
  import { cva } from '../../utils/cva';
4
4
  import { StepIcon } from '../StepIcon';
5
5
  import { stepClassnames } from './constants';
@@ -55,7 +55,7 @@ const connector = cva(stepClassnames.connector, {
55
55
  export const Step = (props) => {
56
56
  const { isCompletedStep, isRenderButton, handleClick, connectorVariant, alternativeLabel, orientation, children, isError, isWarning, icon, className, label, isRenderVerticalLineConnector, isRenderHorizontalLineConnector, isDisabled, isActiveStep, } = useLogic(props);
57
57
  const StepContent = isRenderButton ? StyledButton : StepContentWrapper;
58
- return (_jsxs(Wrapper, { "data-active-step": isActiveStep, className: classNames(step({
58
+ return (_jsxs(Wrapper, { "data-active-step": isActiveStep, className: cn(step({
59
59
  isError,
60
60
  isCompleted: isCompletedStep,
61
61
  connector: connectorVariant,
@@ -63,7 +63,7 @@ export const Step = (props) => {
63
63
  alternativeLabel,
64
64
  orientation,
65
65
  isDisabled,
66
- }), className), children: [_jsxs(StepContent, { variant: "text", onClick: handleClick, disabled: isDisabled, className: classNames(stepClassnames.content, {
66
+ }), className), children: [_jsxs(StepContent, { variant: "text", onClick: handleClick, disabled: isDisabled, className: cn(stepClassnames.content, {
67
67
  [stepClassnames.active]: isActiveStep,
68
68
  }), children: [_jsxs(LabelWrapper, { className: stepClassnames.labelContainer, children: [_jsx(IconWrapper, { className: stepClassnames.iconContainer, children: _jsx(StepIcon, { icon: icon, isActive: isActiveStep, isCompleted: isCompletedStep, isError: isError, isWarning: isWarning }) }), _jsx(Label, { label: label, isActiveStep: isActiveStep }), connectorVariant === 'arrow' && (_jsx(ArrowConnector, { className: connector({
69
69
  connector: connectorVariant,
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { injectStyle } from 'react-toastify-next/dist/inject-style';
3
- import { classNames } from '../../utils/classNames';
3
+ import { cn } from '../../utils/cn';
4
4
  import { NOTIFY_CONTAINER_ID, NOTIFY_POSITIONS, NOTIFY_STATIC_CONTAINER_ID, notifyClassnames, } from '../constants';
5
5
  import { CloseButton, Inner, StaticInner, Wrapper } from './styles';
6
6
  import { useLogic } from './useLogic';
@@ -11,9 +11,9 @@ export const NotificationStackContainer = ({ containerId = NOTIFY_CONTAINER_ID,
11
11
  const { isVisibleCloseButton, isStackExpanded, isStartedClosingNotify, closeAll, } = useLogic({
12
12
  containerId,
13
13
  });
14
- return (_jsxs(Wrapper, { className: classNames({
14
+ return (_jsxs(Wrapper, { className: cn({
15
15
  [notifyClassnames.container]: isStackExpanded,
16
- }), children: [_jsx("div", { className: notifyClassnames.stackHost, children: _jsx(Inner, { ...props, className: classNames(notifyClassnames.stack, props.className), ...{ stacked: true }, containerId: containerId, pauseOnFocusLoss: true, position: NOTIFY_POSITIONS.BOTTOM_RIGHT, newestOnTop: false, closeOnClick: false, draggable: false, rtl: false, closeButton: false, bodyClassName: `${notifyClassnames.body}`, toastClassName: notifyClassnames.root, progressClassName: `${notifyClassnames.progress}` }) }), isVisibleCloseButton && (_jsx(CloseButton, { variant: "light", color: "grey", className: classNames({
16
+ }), children: [_jsx("div", { className: notifyClassnames.stackHost, children: _jsx(Inner, { ...props, className: cn(notifyClassnames.stack, props.className), ...{ stacked: true }, containerId: containerId, pauseOnFocusLoss: true, position: NOTIFY_POSITIONS.BOTTOM_RIGHT, newestOnTop: false, closeOnClick: false, draggable: false, rtl: false, closeButton: false, bodyClassName: `${notifyClassnames.body}`, toastClassName: notifyClassnames.root, progressClassName: `${notifyClassnames.progress}` }) }), isVisibleCloseButton && (_jsx(CloseButton, { variant: "light", color: "grey", className: cn({
17
17
  [notifyClassnames.closeButtonAnimationOut]: isStartedClosingNotify,
18
18
  }), onClick: closeAll, children: "\u0421\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0435" })), _jsx(StaticInner, { containerId: staticContainerId, position: NOTIFY_POSITIONS.BOTTOM_RIGHT, newestOnTop: false, closeOnClick: false, draggable: false, rtl: false, closeButton: false, bodyClassName: `${notifyClassnames.body}`, toastClassName: notifyClassnames.root, progressClassName: `${notifyClassnames.progress}` }), bannerContainer] }));
19
19
  };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { createPortal } from 'react-dom';
3
- import { classNames } from '../utils/classNames';
3
+ import { cn } from '../utils/cn';
4
4
  import { cva } from '../utils/cva';
5
5
  import { pageAsideClassnames } from './constants';
6
6
  import { usePageAside } from './hooks';
@@ -18,5 +18,5 @@ export const PageAside = ({ children, className, header, navigation, }) => {
18
18
  navigation,
19
19
  });
20
20
  return (_jsxs(_Fragment, { children: [isMobileNavigationVisible &&
21
- createPortal(_jsx(MobileAsideNavigation, { className: pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && _jsx(MobileAsideHeader, { children: header }), _jsx(MobileAsideButton, { content: children }), _jsxs(Wrapper, { className: classNames(className, asideCva({ withHeader: Boolean(header) })), children: [header && (_jsxs(AsideHeader, { children: [header, _jsx(StyledDivider, {})] })), navigation, children] })] }));
21
+ createPortal(_jsx(MobileAsideNavigation, { className: pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && _jsx(MobileAsideHeader, { children: header }), _jsx(MobileAsideButton, { content: children }), _jsxs(Wrapper, { className: cn(className, asideCva({ withHeader: Boolean(header) })), children: [header && (_jsxs(AsideHeader, { children: [header, _jsx(StyledDivider, {})] })), navigation, children] })] }));
22
22
  };
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useScrollToActiveElement } from '../useScrollToActiveElement';
3
- import { classNames } from '../utils/classNames';
3
+ import { cn } from '../utils/cn';
4
4
  import { pageAsideNavigationClassnames } from './constants';
5
5
  import { AddonNavigationWrapper, NavigationList, Wrapper } from './styles';
6
6
  export const PageAsideNavigation = ({ addonNavigation, children, className, addonNavigationPosition = 'start', }) => {
7
7
  const { containerRef } = useScrollToActiveElement();
8
- return (_jsxs(Wrapper, { className: classNames(pageAsideNavigationClassnames.root, className), children: [addonNavigationPosition === 'start' && addonNavigation && (_jsx(AddonNavigationWrapper, { children: addonNavigation })), _jsx(NavigationList, { ref: containerRef, children: children }), addonNavigationPosition === 'end' && addonNavigation && (_jsx(AddonNavigationWrapper, { children: addonNavigation }))] }));
8
+ return (_jsxs(Wrapper, { className: cn(pageAsideNavigationClassnames.root, className), children: [addonNavigationPosition === 'start' && addonNavigation && (_jsx(AddonNavigationWrapper, { children: addonNavigation })), _jsx(NavigationList, { ref: containerRef, children: children }), addonNavigationPosition === 'end' && addonNavigation && (_jsx(AddonNavigationWrapper, { children: addonNavigation }))] }));
9
9
  };
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { forwardRef, isValidElement, useContext } from 'react';
3
3
  import { PageContext } from '../PageContext';
4
4
  import { PageLayoutFooter, } from '../PageLayoutFooter';
5
- import { classNames } from '../utils/classNames';
5
+ import { cn } from '../utils/cn';
6
6
  import { cva } from '../utils/cva';
7
7
  import { pageContentClassnames } from './constants';
8
8
  import { Content, Wrapper } from './styles';
@@ -22,7 +22,7 @@ const contentCva = cva(pageContentClassnames.content, {
22
22
  export const PageContent = forwardRef((props, forwardedRef) => {
23
23
  const { hasAside } = useContext(PageContext);
24
24
  const { className, children, isFullHeight = true, footer, scrollRef, header, isUnconstrained = false, } = props;
25
- return (_jsxs(Wrapper, { className: classNames(className, pageContentClassnames.pageContent), ref: forwardedRef, "$isFullHeight": isFullHeight, "$isSeparatorShown": hasAside || Boolean(header), children: [header && header, _jsx(Content, { ref: scrollRef, className: contentCva({
25
+ return (_jsxs(Wrapper, { className: cn(className, pageContentClassnames.pageContent), ref: forwardedRef, "$isFullHeight": isFullHeight, "$isSeparatorShown": hasAside || Boolean(header), children: [header && header, _jsx(Content, { ref: scrollRef, className: contentCva({
26
26
  isUnconstrained,
27
27
  hasHeader: Boolean(header),
28
28
  hasAside,
@@ -1,5 +1,5 @@
1
1
  import { selfContainedClassname } from '../constants';
2
- import { pdfViewerClassnames } from '../PdfViewer';
2
+ import { pdfViewerClassnames } from '../PdfViewer/constants';
3
3
  import { styled } from '../styled';
4
4
  import { PAGE_CONTENT_ANIMATION, pageContentClassnames } from './constants';
5
5
  export const Wrapper = styled('article', {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Breadcrumbs } from '../../Breadcrumbs';
3
- import { classNames } from '../../utils/classNames';
3
+ import { cn } from '../../utils/cn';
4
4
  import { pageHeaderClassnames } from '../constants';
5
5
  import { PageActions } from '../PageActions';
6
6
  import { Title } from '../Title';
@@ -14,5 +14,5 @@ export const HeaderContent = ({ backButton, description, subheader, breadcrumbs,
14
14
  }
15
15
  return (_jsx(BreadcrumbsWrapper, { children: Array.isArray(breadcrumbs) ? (_jsx(Breadcrumbs, { children: breadcrumbs })) : (breadcrumbs) }));
16
16
  };
17
- return (_jsxs(_Fragment, { children: [renderBreadcrumbs(), _jsx(DesktopTitleWrapper, { children: _jsx(Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), _jsx(Description, { description: description, isLoading: isLoading }), actions && (_jsx(PageActions, { className: classNames(pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", withCollapseOnLaptop: Boolean(filters), ...actions })), filters && (_jsx(FormFiltersProvider, { filtersClassName: pageHeaderClassnames.filters, quickFiltersClassName: pageHeaderClassnames.quickFilters, children: filters })), tabs && _jsx(TabsWrapper, { children: tabs }), subheader && (_jsx(PageSubheader, { className: pageHeaderClassnames.subheader, children: subheader }))] }));
17
+ return (_jsxs(_Fragment, { children: [renderBreadcrumbs(), _jsx(DesktopTitleWrapper, { children: _jsx(Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), _jsx(Description, { description: description, isLoading: isLoading }), actions && (_jsx(PageActions, { className: cn(pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", withCollapseOnLaptop: Boolean(filters), ...actions })), filters && (_jsx(FormFiltersProvider, { filtersClassName: pageHeaderClassnames.filters, quickFiltersClassName: pageHeaderClassnames.quickFilters, children: filters })), tabs && _jsx(TabsWrapper, { children: tabs }), subheader && (_jsx(PageSubheader, { className: pageHeaderClassnames.subheader, children: subheader }))] }));
18
18
  };
@@ -6,6 +6,10 @@ export const BreadcrumbsWrapper = styled.div `
6
6
 
7
7
  margin-bottom: ${({ theme }) => theme.spacing(1)};
8
8
 
9
+ &:empty {
10
+ display: none;
11
+ }
12
+
9
13
  ${({ theme }) => theme.breakpoints.down('sm')} {
10
14
  display: none;
11
15
  }
@@ -16,6 +20,10 @@ export const TabsWrapper = styled.div `
16
20
 
17
21
  padding-top: ${({ theme }) => theme.spacing(4)};
18
22
 
23
+ &:empty {
24
+ display: none;
25
+ }
26
+
19
27
  ${({ theme }) => theme.breakpoints.down('sm')} {
20
28
  padding: ${({ theme }) => theme.spacing(0, 0, 4, 0)};
21
29
 
@@ -30,6 +38,10 @@ export const PageSubheader = styled.div `
30
38
 
31
39
  padding-top: ${({ theme }) => theme.spacing(4)};
32
40
 
41
+ &:empty {
42
+ display: none;
43
+ }
44
+
33
45
  ${({ theme }) => theme.breakpoints.down('sm')} {
34
46
  padding: ${({ theme }) => theme.spacing(0, 4, 4, 4)};
35
47
  }
@@ -2,13 +2,13 @@ import { useContext, useMemo } from 'react';
2
2
  import { useActionsState } from '../../../ActionGroup';
3
3
  import { NextFeatureFlagsContext } from '../../../ConfigProvider/NextFeatureFlagsContext';
4
4
  import { DashboardContext } from '../../../DashboardContext';
5
- import { classNames } from '../../../utils/classNames';
5
+ import { cn } from '../../../utils/cn';
6
6
  import { actionsClassnames, focusModeButtonClassnames } from '../constants';
7
7
  export const useLogic = ({ main, secondary, secondaryVisible, withCollapseOnLaptop = false, }) => {
8
8
  const { showFocusModeButtonOnDesktop, showFocusModeButtonOnLaptop } = useContext(NextFeatureFlagsContext);
9
9
  const { setFocusedMode, isFocusedMode } = useContext(DashboardContext);
10
10
  const { disabledAction } = useActionsState({ main, secondary });
11
- const buttonClassnames = useMemo(() => classNames({
11
+ const buttonClassnames = useMemo(() => cn({
12
12
  [focusModeButtonClassnames.isShowOnDesktop]: showFocusModeButtonOnDesktop,
13
13
  [focusModeButtonClassnames.isShowOnLaptop]: showFocusModeButtonOnLaptop,
14
14
  }), [showFocusModeButtonOnDesktop, showFocusModeButtonOnLaptop]);
@@ -52,7 +52,7 @@ export const useLogic = ({ main, secondary, secondaryVisible, withCollapseOnLapt
52
52
  return allActions;
53
53
  }, [main, secondary, secondaryVisible, disabledAction]);
54
54
  const classnames = useMemo(() => {
55
- return classNames({
55
+ return cn({
56
56
  [actionsClassnames.withCollapseOnLaptop]: withCollapseOnLaptop && collapsedActions.length > 0,
57
57
  });
58
58
  }, [withCollapseOnLaptop]);
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { classNames } from '../utils/classNames';
2
+ import { cn } from '../utils/cn';
3
3
  import { cva } from '../utils/cva';
4
4
  import { pageHeaderClassnames } from './constants';
5
5
  import { HeaderContent } from './HeaderContent';
@@ -36,9 +36,9 @@ export const PageHeader = (props) => {
36
36
  return (_jsxs(_Fragment, { children: [_jsxs(MobileTitleWrapper, { className: mobilePageHeaderCva({
37
37
  hasTitle: Boolean(title) || isLoading,
38
38
  hasBackButton: Boolean(backButton),
39
- }), children: [_jsx(Title, { backButton: backButton, title: title, isLoading: isLoading }), mobileTitleActions && mobileTitleActions] }), _jsx(Wrapper, { className: classNames(rootCva({
39
+ }), children: [_jsx(Title, { backButton: backButton, title: title, isLoading: isLoading }), mobileTitleActions && mobileTitleActions] }), _jsx(Wrapper, { className: cn(rootCva({
40
40
  hasActions: Boolean(actions),
41
41
  hasSubheader: Boolean(subheader),
42
42
  hasFilters: Boolean(filters),
43
- }), className), children: _jsx(HeaderContent, { breadcrumbs: breadcrumbs, backButton: backButton, title: title, description: description, actions: actions, subheader: subheader, tabs: tabs, filters: filters, isLoading: isLoading }) }), isShowMobileActions && (_jsx(MobilePageActions, { className: classNames(pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, ...actions }))] }));
43
+ }), className), children: _jsx(HeaderContent, { breadcrumbs: breadcrumbs, backButton: backButton, title: title, description: description, actions: actions, subheader: subheader, tabs: tabs, filters: filters, isLoading: isLoading }) }), isShowMobileActions && (_jsx(MobilePageActions, { className: cn(pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, ...actions }))] }));
44
44
  };
@@ -31,8 +31,20 @@ export const Wrapper = styled.header `
31
31
 
32
32
  background-color: ${({ theme }) => theme.palette.background.default};
33
33
 
34
- &.${pageHeaderClassnames.hasSubheader}, &.${pageHeaderClassnames.hasFilters} {
35
- border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
34
+ /*
35
+ * Два правила, а не список через запятую: невалидный :has()
36
+ * отбросил бы и границу под фильтрами.
37
+ */
38
+ &.${pageHeaderClassnames.hasFilters} {
39
+ border-bottom: 1px solid
40
+ ${({ theme }) => theme.palette.components.border.default};
41
+ }
42
+
43
+ /* Причина игнора: прогрессивное улучшение */
44
+ /* stylelint-disable-next-line plugin/no-unsupported-browser-features */
45
+ &:has(.${pageHeaderClassnames.subheader}:not(:empty)) {
46
+ border-bottom: 1px solid
47
+ ${({ theme }) => theme.palette.components.border.default};
36
48
  }
37
49
  }
38
50
 
@@ -78,8 +90,8 @@ export const MobileTitleWrapper = styled.div `
78
90
  /* stylelint-disable plugin/no-unsupported-browser-features */
79
91
  &:not(:has(+ .${pageHeaderClassnames.root} :is(
80
92
  .${pageHeaderClassnames.filters},
81
- .${pageHeaderClassnames.subheader},
82
- .${pageAsideClassnames.mobileNavigation}
93
+ .${pageHeaderClassnames.subheader}:not(:empty),
94
+ .${pageAsideClassnames.mobileNavigation}:not(:empty)
83
95
  ))) {
84
96
  border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
85
97
  }
@@ -6,13 +6,13 @@ import { PageContextProvider } from '../PageContext';
6
6
  import { PageHeader } from '../PageHeader';
7
7
  import { PageLayoutContainer, pageLayoutClassnames, } from '../PageLayoutContainer';
8
8
  import { LoadingPlaceholder } from '../placeholders/LoadingPlaceholder';
9
- import { classNames } from '../utils/classNames';
9
+ import { cn } from '../utils/cn';
10
10
  import { DesktopAlertWrapper, LoaderWrapper, MobileAlertWrapper, } from './styles';
11
11
  import { useLogic } from './useLogic';
12
12
  export const PageLayout = (props) => {
13
13
  const { header, content, aside, footer, className, alert, isLoading } = props;
14
14
  const { hasAside, ref } = useLogic(props);
15
- return (_jsxs(PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && _jsx(DesktopAlertWrapper, { children: alert }), _jsxs(PageLayoutContainer, { className: classNames(className, {
15
+ return (_jsxs(PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && _jsx(DesktopAlertWrapper, { children: alert }), _jsxs(PageLayoutContainer, { className: cn(className, {
16
16
  [pageLayoutClassnames.withoutHeader]: !header,
17
17
  }), ref: ref, children: [alert && _jsx(MobileAlertWrapper, { children: alert }), isValidElement(header)
18
18
  ? header
@@ -2,18 +2,30 @@ import { styled } from '../styled';
2
2
  export const MobileAlertWrapper = styled.div `
3
3
  display: none;
4
4
  ${({ theme }) => theme.breakpoints.down('sm')} {
5
- display: block;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: ${({ theme }) => theme.spacing(2)};
6
8
 
7
9
  margin: ${({ theme }) => theme.spacing(3, 4, 0, 4)};
8
10
 
9
11
  background-color: ${({ theme }) => theme.palette.background.default};
12
+
13
+ &:empty {
14
+ display: none;
15
+ }
10
16
  }
11
17
  `;
12
18
  export const DesktopAlertWrapper = styled.div `
13
- display: block;
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: ${({ theme }) => theme.spacing(2)};
14
22
 
15
23
  margin-bottom: ${({ theme }) => theme.spacing(4)};
16
24
 
25
+ &:empty {
26
+ display: none;
27
+ }
28
+
17
29
  ${({ theme }) => theme.breakpoints.down('sm')} {
18
30
  display: none;
19
31
  }
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
- import { classNames } from '../utils/classNames';
3
+ import { cn } from '../utils/cn';
4
4
  import { pageLayoutClassnames } from './constants';
5
5
  import { StyledPaper, Wrapper } from './styles';
6
6
  export const PageLayoutContainer = forwardRef(({ children, className }, forwardedRef) => {
7
- return (_jsx(StyledPaper, { variant: "outlined", children: _jsx(Wrapper, { className: classNames(className, pageLayoutClassnames.root), ref: forwardedRef, children: children }) }));
7
+ return (_jsx(StyledPaper, { variant: "outlined", children: _jsx(Wrapper, { className: cn(className, pageLayoutClassnames.root), ref: forwardedRef, children: children }) }));
8
8
  });
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from 'react';
3
- import { classNames } from '../utils/classNames';
3
+ import { cn } from '../utils/cn';
4
4
  import { cva } from '../utils/cva';
5
5
  import { pageLayoutSectionClassnames } from './constants';
6
6
  import { Section, SectionWrapper } from './styles';
@@ -24,5 +24,5 @@ const sectionWrapperCva = cva(pageLayoutSectionClassnames.wrapper, {
24
24
  * } />
25
25
  */
26
26
  export const PageLayoutSection = forwardRef(({ children, className, isNoMobileSidePadding = false }, ref) => {
27
- return (_jsx(Section, { className: classNames(className, pageLayoutSectionClassnames.root), ref: ref, children: _jsx(SectionWrapper, { className: sectionWrapperCva({ isNoMobileSidePadding }), children: children }) }));
27
+ return (_jsx(Section, { className: cn(className, pageLayoutSectionClassnames.root), ref: ref, children: _jsx(SectionWrapper, { className: sectionWrapperCva({ isNoMobileSidePadding }), children: children }) }));
28
28
  });
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useContext, useMemo } from 'react';
3
3
  import { PageContext } from '../../PageContext';
4
- import { classNames } from '../../utils/classNames';
4
+ import { cn } from '../../utils/cn';
5
5
  import { pageLayoutSectionContainerClassnames } from './constants';
6
6
  import { SectionContainer } from './styles';
7
7
  /**
@@ -19,7 +19,7 @@ import { SectionContainer } from './styles';
19
19
  export const PageLayoutSectionContainer = ({ children, className, isShowDivider = false, }) => {
20
20
  const { hasAside } = useContext(PageContext);
21
21
  const classes = useMemo(() => {
22
- return classNames(className, {
22
+ return cn(className, {
23
23
  [pageLayoutSectionContainerClassnames.withAside]: hasAside,
24
24
  [pageLayoutSectionContainerClassnames.withDivider]: isShowDivider,
25
25
  });
@@ -4,7 +4,7 @@ import { MenuOnOutlineMd } from '../../icons/MenuOnOutlineMd';
4
4
  import { MobileAsideButton, pageAsideClassnames } from '../PageAside';
5
5
  import { AsideHeader, MobileAsideHeader, MobileAsideNavigation, StyledDivider, } from '../PageAside/styles';
6
6
  import { PinButton } from '../PinButton';
7
- import { classNames } from '../utils/classNames';
7
+ import { cn } from '../utils/cn';
8
8
  import { cva } from '../utils/cva';
9
9
  import { pinnableAsideClassnames } from './constants';
10
10
  import { Aside, ChildrenWrapper, Content, Dummy, Footer } from './styles';
@@ -22,5 +22,5 @@ const asideCva = cva(pinnableAsideClassnames.root, {
22
22
  export const PagePinnableAside = ({ header, children, className, navigation, ...restProps }) => {
23
23
  const { isPinned, togglePin, pageHeaderContainer, isMobileNavigationVisible, } = useLogic({ navigation, ...restProps });
24
24
  return (_jsxs(_Fragment, { children: [isMobileNavigationVisible &&
25
- createPortal(_jsx(MobileAsideNavigation, { className: pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && _jsx(MobileAsideHeader, { children: header }), _jsx(MobileAsideButton, { content: children }), _jsxs(Aside, { "$isPinned": isPinned, className: asideCva({ withHeader: Boolean(header) }), children: [_jsx(Dummy, { "$isPinned": isPinned, children: _jsx(MenuOnOutlineMd, {}) }), _jsxs(Content, { "$isPinned": isPinned, className: classNames(className, pinnableAsideClassnames.content), children: [_jsxs(ChildrenWrapper, { children: [header && (_jsxs(AsideHeader, { children: [header, _jsx(StyledDivider, {})] })), navigation, children] }), _jsx(Footer, { children: _jsx(PinButton, { isPinned: isPinned, isUseCollapse: false, onClick: togglePin }) })] })] })] }));
25
+ createPortal(_jsx(MobileAsideNavigation, { className: pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && _jsx(MobileAsideHeader, { children: header }), _jsx(MobileAsideButton, { content: children }), _jsxs(Aside, { "$isPinned": isPinned, className: asideCva({ withHeader: Boolean(header) }), children: [_jsx(Dummy, { "$isPinned": isPinned, children: _jsx(MenuOnOutlineMd, {}) }), _jsxs(Content, { "$isPinned": isPinned, className: cn(className, pinnableAsideClassnames.content), children: [_jsxs(ChildrenWrapper, { children: [header && (_jsxs(AsideHeader, { children: [header, _jsx(StyledDivider, {})] })), navigation, children] }), _jsx(Footer, { children: _jsx(PinButton, { isPinned: isPinned, isUseCollapse: false, onClick: togglePin }) })] })] })] }));
26
26
  };
@@ -5,7 +5,7 @@ import { EyeOutlineMd } from '../../icons/EyeOutlineMd';
5
5
  import { IconButton } from '../IconButton';
6
6
  import { useHidePersonalData } from '../personalDataSecurity';
7
7
  import { TextField } from '../TextField';
8
- import { classNames } from '../utils/classNames';
8
+ import { cn } from '../utils/cn';
9
9
  export const PasswordField = forwardRef(({ label, disabled = false, showSymbols = false, isHidePersonalData, inputProps, ...props }, ref) => {
10
10
  const [showPassword, setShowPassword] = useState(showSymbols);
11
11
  const handleClickShowPassword = () => setShowPassword((show) => !show);
@@ -18,7 +18,7 @@ export const PasswordField = forwardRef(({ label, disabled = false, showSymbols
18
18
  });
19
19
  return (_jsx(TextField, { inputProps: {
20
20
  ...inputProps,
21
- className: classNames(inputProps?.className, hidePersonalDataClassname),
21
+ className: cn(inputProps?.className, hidePersonalDataClassname),
22
22
  }, ref: ref, label: label, type: showPassword ? 'text' : 'password', disabled: disabled, InputProps: {
23
23
  endAdornment: (_jsx(IconButton, { variant: "text", color: "grey", disabled: disabled, "aria-label": "\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0438\u0434\u0438\u043C\u043E\u0441\u0442\u044C \u043F\u0430\u0440\u043E\u043B\u044F", onClick: handleClickShowPassword, onMouseDown: handleMouseDownPassword, children: showPassword ? (_jsx(EyeCrossedOutlineMd, { id: "visibility-off" })) : (_jsx(EyeOutlineMd, { id: "visibility-on" })) })),
24
24
  }, ...props }));
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { classNames } from '../../utils/classNames';
2
+ import { cn } from '../../utils/cn';
3
3
  import { pdfViewerClassnames } from '../constants';
4
4
  import { StyledDocument } from './styles';
5
5
  import { useLogic } from './useLogic';
6
6
  export const PDFDocument = (props) => {
7
7
  const { documentRef, onAnimationEnd, isLoading } = useLogic(props);
8
8
  const { enabledZoom, isCentered, ...restProps } = props;
9
- return (_jsx(StyledDocument, { ...restProps, "$isLoading": isLoading, className: classNames(pdfViewerClassnames.document, {
9
+ return (_jsx(StyledDocument, { ...restProps, "$isLoading": isLoading, className: cn(pdfViewerClassnames.document, {
10
10
  [pdfViewerClassnames.zoom]: enabledZoom,
11
11
  [pdfViewerClassnames.centered]: isCentered,
12
12
  }), inputRef: documentRef, onAnimationEnd: onAnimationEnd }));
@@ -2,11 +2,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { PinOutlineMd } from '../../icons/PinOutlineMd';
3
3
  import { UnpinOutlineMd } from '../../icons/UnpinOutlineMd';
4
4
  import { Collapse } from '../Collapse';
5
- import { classNames } from '../utils/classNames';
5
+ import { cn } from '../utils/cn';
6
6
  import { pinButtonClassnames } from './constants';
7
7
  import { Content, TogglerButton } from './styles';
8
8
  export const PinButton = (props) => {
9
9
  const { isPinned, collapsedIn, isUseCollapse = true, className, ...restProps } = props;
10
10
  const PinIcon = isPinned ? UnpinOutlineMd : PinOutlineMd;
11
- return (_jsx(TogglerButton, { startIcon: _jsx(PinIcon, {}), variant: "text", className: classNames(className, pinButtonClassnames.root), ...restProps, children: isUseCollapse ? (_jsx(Collapse, { in: collapsedIn, orientation: "horizontal", children: _jsx(Content, { children: isPinned ? 'Открепить меню' : 'Закрепить меню' }) })) : (_jsx(Content, { children: isPinned ? 'Открепить меню' : 'Закрепить меню' })) }));
11
+ return (_jsx(TogglerButton, { startIcon: _jsx(PinIcon, {}), variant: "text", className: cn(className, pinButtonClassnames.root), ...restProps, children: isUseCollapse ? (_jsx(Collapse, { in: collapsedIn, orientation: "horizontal", children: _jsx(Content, { children: isPinned ? 'Открепить меню' : 'Закрепить меню' }) })) : (_jsx(Content, { children: isPinned ? 'Открепить меню' : 'Закрепить меню' })) }));
12
12
  };
@@ -1,6 +1,6 @@
1
1
  import { useMemo, useState } from 'react';
2
2
  import { useUpdateEffect } from '../../useUpdateEffect';
3
- import { classNames } from '../../utils/classNames';
3
+ import { cn } from '../../utils/cn';
4
4
  import { radioClassnames } from '../constants';
5
5
  export const useLogic = ({ checked = false, disabled = false, isError = false, onChange: propsOnChange, className: propClassNames, name, style, inputRef, value, id, ...restProps }) => {
6
6
  const [isChecked, setIsChecked] = useState(checked);
@@ -11,7 +11,7 @@ export const useLogic = ({ checked = false, disabled = false, isError = false, o
11
11
  propsOnChange?.(event, event.target.checked);
12
12
  setIsChecked(event.target.checked);
13
13
  };
14
- const className = useMemo(() => classNames(radioClassnames.root, isChecked ? radioClassnames.checked : '', disabled ? radioClassnames.disabled : '', propClassNames), [isChecked, disabled, propClassNames]);
14
+ const className = useMemo(() => cn(radioClassnames.root, isChecked ? radioClassnames.checked : '', disabled ? radioClassnames.disabled : '', propClassNames), [isChecked, disabled, propClassNames]);
15
15
  return {
16
16
  onChange,
17
17
  isChecked,
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useContext } from 'react';
3
3
  import { RadioGroupContext } from '../RadioGroup';
4
- import { classNames } from '../utils/classNames';
4
+ import { cn } from '../utils/cn';
5
5
  import { radioCardClassnames } from './constants';
6
6
  import { Content, StyledRadio, Wrapper } from './styles';
7
7
  export const RadioCard = ({ id, disabled: propsIsDisabled, className, header, children, value, ...props }) => {
8
8
  const { isError, value: groupValue, name, onChange, disabled, } = useContext(RadioGroupContext);
9
- return (_jsxs(Wrapper, { className: classNames(className, radioCardClassnames.root), "$isError": isError, "$isChecked": groupValue === value, "$isDisabled": disabled || propsIsDisabled, children: [_jsx(StyledRadio, { disabled: disabled || propsIsDisabled, checked: groupValue === value, name: name, onChange: (event) => onChange?.(event, event.target.value), value: value, ...props }), _jsxs(Content, { className: radioCardClassnames.content, children: [_jsx("div", { children: header }), _jsx("div", { children: children })] })] }));
9
+ return (_jsxs(Wrapper, { className: cn(className, radioCardClassnames.root), "$isError": isError, "$isChecked": groupValue === value, "$isDisabled": disabled || propsIsDisabled, children: [_jsx(StyledRadio, { disabled: disabled || propsIsDisabled, checked: groupValue === value, name: name, onChange: (event) => onChange?.(event, event.target.value), value: value, ...props }), _jsxs(Content, { className: radioCardClassnames.content, children: [_jsx("div", { children: header }), _jsx("div", { children: children })] })] }));
10
10
  };