@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.
- package/components/Alert/Alert.js +2 -2
- package/components/Autocomplete/Autocomplete.js +2 -2
- package/components/Autocomplete/useLogic/useLogic.js +2 -2
- package/components/Badge/Badge.js +2 -2
- package/components/BulletList/BulletList.js +2 -2
- package/components/BulletListItem/BulletListItem.js +2 -2
- package/components/Button/useLogic/useLogic.js +2 -2
- package/components/Checkbox/Icon/Icon.js +2 -2
- package/components/Checkbox/useLogic/useLogic.js +2 -2
- package/components/Chip/ChipStatusIcon/ChipStatusIcon.js +2 -2
- package/components/Chip/useLogic/useLogic.js +2 -2
- package/components/ConfirmDialog/ConfirmDialog.js +2 -2
- package/components/CopyTypography/CopyTypography.js +3 -3
- package/components/DashboardAlert/DashboardAlert.js +2 -2
- package/components/DashboardLayout/DashboardSidebar/useLogic/useLogic.js +2 -2
- package/components/DashboardLayout/Header/styles.js +8 -0
- package/components/DashboardLayout/Main/styles.js +8 -0
- package/components/DashboardSidebarSkeleton/DashboardSidebarSkeleton.js +2 -2
- package/components/DataGrid/Body/Body.js +2 -2
- package/components/DataGrid/Cell/Cell.js +2 -2
- package/components/DataGrid/DataGrid.js +2 -2
- package/components/DataGrid/HeadCell/HeadCell.js +2 -2
- package/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +2 -2
- package/components/DataGrid/Row/Row.js +3 -3
- package/components/DataGrid/RowBase/RowBase.js +2 -2
- package/components/DataGridInfinite/DataGridInfinite.js +2 -2
- package/components/DataGridPaginationContainer/DataGridPaginationContainer.js +2 -2
- package/components/DescriptionCell/useLogic/useLogic.js +2 -2
- package/components/Dialog/Dialog.js +2 -2
- package/components/Dialog/useLogic/useLogic.js +2 -2
- package/components/DialogActions/DialogActions.js +2 -2
- package/components/DialogContent/DialogContent.js +2 -2
- package/components/DonutChart/DonutChart.js +2 -2
- package/components/EmailField/EmailField.js +2 -2
- package/components/EmailOrPhoneField/EmailOrPhoneField.js +2 -2
- package/components/Filename/Filename.js +2 -2
- package/components/GuidTypography/GuidTypography.js +5 -5
- package/components/HintPopover/HintPopover.js +2 -2
- package/components/IconButton/IconButton.js +2 -2
- package/components/Loader/Loader.js +2 -2
- package/components/MenuItem/MenuItem.js +2 -2
- package/components/MinimalisticPagination/MinimalisticPagination.js +2 -2
- package/components/NewPopover/NewPopover.js +2 -2
- package/components/NewStepper/NewStepper.js +2 -2
- package/components/NewStepper/Step/Step.js +3 -3
- package/components/Notification/NotificationStackContainer/NotificationStackContainer.js +3 -3
- package/components/PageAside/PageAside.js +2 -2
- package/components/PageAsideNavigation/PageAsideNavigation.js +2 -2
- package/components/PageContent/PageContent.js +2 -2
- package/components/PageContent/styles.js +1 -1
- package/components/PageHeader/HeaderContent/HeaderContent.js +2 -2
- package/components/PageHeader/HeaderContent/styles.js +12 -0
- package/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
- package/components/PageHeader/PageHeader.js +3 -3
- package/components/PageHeader/styles.js +16 -4
- package/components/PageLayout/PageLayout.js +2 -2
- package/components/PageLayout/styles.js +14 -2
- package/components/PageLayoutContainer/PageLayoutContainer.js +2 -2
- package/components/PageLayoutSection/PageLayoutSection.js +2 -2
- package/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js +2 -2
- package/components/PagePinnableAside/PagePinnableAside.js +2 -2
- package/components/PasswordField/PasswordField.js +2 -2
- package/components/PdfViewer/PdfDocument/PdfDocument.js +2 -2
- package/components/PinButton/PinButton.js +2 -2
- package/components/Radio/useLogic/useLogic.js +2 -2
- package/components/RadioCard/RadioCard.js +2 -2
- package/components/SearchField/SearchField.js +2 -2
- package/components/StaticCalendar/StaticDaysCalendar/StaticDaysCalendar.js +2 -2
- package/components/SvgIcon/SvgIcon.js +2 -2
- package/components/Tabs/Tabs.js +2 -2
- package/components/Tag/useLogic/useLogic.js +2 -2
- package/components/TagBadge/TagBadge.js +2 -2
- package/components/TextField/TextField.js +2 -2
- package/components/Tooltip/Tooltip.js +2 -2
- package/components/Tooltip/useLogic/useLogic.js +2 -2
- package/components/Tree/TreeList/TreeList.js +2 -2
- package/components/TreeLikeList/TreeLikeList.js +2 -2
- package/components/Typography/Typography.js +2 -2
- package/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -4
- package/components/utils/classNames/classNames.d.ts +1 -1
- package/components/utils/classNames/classNames.js +1 -1
- package/components/utils/cn/cn.d.ts +1 -0
- package/components/utils/cn/cn.js +1 -0
- package/components/utils/cn/index.d.ts +1 -0
- package/components/utils/cn/index.js +1 -0
- package/components/utils/cn/public.d.ts +1 -0
- package/components/utils/cn/public.js +1 -0
- package/hook-form/EditableText/EditableText.js +2 -2
- package/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +2 -2
- package/hook-form/FormMobilePhoneField/FormMobilePhoneField.js +2 -2
- package/hook-form/FormPageLayout/FormPageLayout.js +2 -2
- package/hook-form/FormPageLayoutBase/FormPageLayoutBase.js +2 -2
- package/hook-form/FormWizardPageLayout/FormWizardPageLayout.js +2 -2
- package/node/components/Alert/Alert.js +2 -2
- package/node/components/Autocomplete/Autocomplete.js +2 -2
- package/node/components/Autocomplete/useLogic/useLogic.js +2 -2
- package/node/components/Badge/Badge.js +2 -2
- package/node/components/BulletList/BulletList.js +2 -2
- package/node/components/BulletListItem/BulletListItem.js +2 -2
- package/node/components/Button/useLogic/useLogic.js +2 -2
- package/node/components/Checkbox/Icon/Icon.js +2 -2
- package/node/components/Checkbox/useLogic/useLogic.js +2 -2
- package/node/components/Chip/ChipStatusIcon/ChipStatusIcon.js +2 -2
- package/node/components/Chip/useLogic/useLogic.js +2 -2
- package/node/components/ConfirmDialog/ConfirmDialog.js +2 -2
- package/node/components/CopyTypography/CopyTypography.js +3 -3
- package/node/components/DashboardAlert/DashboardAlert.js +2 -2
- package/node/components/DashboardLayout/DashboardSidebar/useLogic/useLogic.js +2 -2
- package/node/components/DashboardLayout/Header/styles.js +8 -0
- package/node/components/DashboardLayout/Main/styles.js +8 -0
- package/node/components/DashboardSidebarSkeleton/DashboardSidebarSkeleton.js +2 -2
- package/node/components/DataGrid/Body/Body.js +2 -2
- package/node/components/DataGrid/Cell/Cell.js +2 -2
- package/node/components/DataGrid/DataGrid.js +2 -2
- package/node/components/DataGrid/HeadCell/HeadCell.js +2 -2
- package/node/components/DataGrid/PinnedSections/Section/useLogic/useLogic.js +2 -2
- package/node/components/DataGrid/Row/Row.js +3 -3
- package/node/components/DataGrid/RowBase/RowBase.js +2 -2
- package/node/components/DataGridInfinite/DataGridInfinite.js +2 -2
- package/node/components/DataGridPaginationContainer/DataGridPaginationContainer.js +2 -2
- package/node/components/DescriptionCell/useLogic/useLogic.js +2 -2
- package/node/components/Dialog/Dialog.js +2 -2
- package/node/components/Dialog/useLogic/useLogic.js +2 -2
- package/node/components/DialogActions/DialogActions.js +2 -2
- package/node/components/DialogContent/DialogContent.js +2 -2
- package/node/components/DonutChart/DonutChart.js +2 -2
- package/node/components/EmailField/EmailField.js +2 -2
- package/node/components/EmailOrPhoneField/EmailOrPhoneField.js +2 -2
- package/node/components/Filename/Filename.js +2 -2
- package/node/components/GuidTypography/GuidTypography.js +5 -5
- package/node/components/HintPopover/HintPopover.js +2 -2
- package/node/components/IconButton/IconButton.js +2 -2
- package/node/components/Loader/Loader.js +2 -2
- package/node/components/MenuItem/MenuItem.js +2 -2
- package/node/components/MinimalisticPagination/MinimalisticPagination.js +2 -2
- package/node/components/NewPopover/NewPopover.js +2 -2
- package/node/components/NewStepper/NewStepper.js +2 -2
- package/node/components/NewStepper/Step/Step.js +3 -3
- package/node/components/Notification/NotificationStackContainer/NotificationStackContainer.js +3 -3
- package/node/components/PageAside/PageAside.js +2 -2
- package/node/components/PageAsideNavigation/PageAsideNavigation.js +2 -2
- package/node/components/PageContent/PageContent.js +2 -2
- package/node/components/PageContent/styles.js +11 -11
- package/node/components/PageHeader/HeaderContent/HeaderContent.js +2 -2
- package/node/components/PageHeader/HeaderContent/styles.js +12 -0
- package/node/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
- package/node/components/PageHeader/PageHeader.js +3 -3
- package/node/components/PageHeader/styles.js +16 -4
- package/node/components/PageLayout/PageLayout.js +2 -2
- package/node/components/PageLayout/styles.js +14 -2
- package/node/components/PageLayoutContainer/PageLayoutContainer.js +2 -2
- package/node/components/PageLayoutSection/PageLayoutSection.js +2 -2
- package/node/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js +2 -2
- package/node/components/PagePinnableAside/PagePinnableAside.js +2 -2
- package/node/components/PasswordField/PasswordField.js +2 -2
- package/node/components/PdfViewer/PdfDocument/PdfDocument.js +2 -2
- package/node/components/PinButton/PinButton.js +2 -2
- package/node/components/Radio/useLogic/useLogic.js +2 -2
- package/node/components/RadioCard/RadioCard.js +2 -2
- package/node/components/SearchField/SearchField.js +2 -2
- package/node/components/StaticCalendar/StaticDaysCalendar/StaticDaysCalendar.js +2 -2
- package/node/components/SvgIcon/SvgIcon.js +2 -2
- package/node/components/Tabs/Tabs.js +2 -2
- package/node/components/Tag/useLogic/useLogic.js +2 -2
- package/node/components/TagBadge/TagBadge.js +2 -2
- package/node/components/TextField/TextField.js +2 -2
- package/node/components/Tooltip/Tooltip.js +2 -2
- package/node/components/Tooltip/useLogic/useLogic.js +2 -2
- package/node/components/Tree/TreeList/TreeList.js +2 -2
- package/node/components/TreeLikeList/TreeLikeList.js +2 -2
- package/node/components/Typography/Typography.js +2 -2
- package/node/components/placeholders/LoadingPlaceholder/LoadingPlaceholder.js +4 -4
- package/node/components/utils/classNames/classNames.d.ts +1 -1
- package/node/components/utils/classNames/classNames.js +2 -2
- package/node/components/utils/cn/cn.d.ts +1 -0
- package/node/components/utils/cn/cn.js +8 -0
- package/node/components/utils/cn/index.d.ts +1 -0
- package/node/components/utils/cn/index.js +17 -0
- package/node/components/utils/cn/public.d.ts +1 -0
- package/node/components/utils/cn/public.js +17 -0
- package/node/hook-form/EditableText/EditableText.js +2 -2
- package/node/hook-form/FormFilters/AllFiltersButton/useLogic/useLogic.js +2 -2
- package/node/hook-form/FormMobilePhoneField/FormMobilePhoneField.js +2 -2
- package/node/hook-form/FormPageLayout/FormPageLayout.js +2 -2
- package/node/hook-form/FormPageLayoutBase/FormPageLayoutBase.js +2 -2
- package/node/hook-form/FormWizardPageLayout/FormWizardPageLayout.js +2 -2
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Step = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const cn_1 = require("../../utils/cn");
|
|
6
6
|
const cva_1 = require("../../utils/cva");
|
|
7
7
|
const StepIcon_1 = require("../StepIcon");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
@@ -58,7 +58,7 @@ const connector = (0, cva_1.cva)(constants_1.stepClassnames.connector, {
|
|
|
58
58
|
const Step = (props) => {
|
|
59
59
|
const { isCompletedStep, isRenderButton, handleClick, connectorVariant, alternativeLabel, orientation, children, isError, isWarning, icon, className, label, isRenderVerticalLineConnector, isRenderHorizontalLineConnector, isDisabled, isActiveStep, } = (0, useLogic_1.useLogic)(props);
|
|
60
60
|
const StepContent = isRenderButton ? styles_1.StyledButton : styles_1.StepContentWrapper;
|
|
61
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "data-active-step": isActiveStep, className: (0,
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { "data-active-step": isActiveStep, className: (0, cn_1.cn)(step({
|
|
62
62
|
isError,
|
|
63
63
|
isCompleted: isCompletedStep,
|
|
64
64
|
connector: connectorVariant,
|
|
@@ -66,7 +66,7 @@ const Step = (props) => {
|
|
|
66
66
|
alternativeLabel,
|
|
67
67
|
orientation,
|
|
68
68
|
isDisabled,
|
|
69
|
-
}), className), children: [(0, jsx_runtime_1.jsxs)(StepContent, { variant: "text", onClick: handleClick, disabled: isDisabled, className: (0,
|
|
69
|
+
}), className), children: [(0, jsx_runtime_1.jsxs)(StepContent, { variant: "text", onClick: handleClick, disabled: isDisabled, className: (0, cn_1.cn)(constants_1.stepClassnames.content, {
|
|
70
70
|
[constants_1.stepClassnames.active]: isActiveStep,
|
|
71
71
|
}), children: [(0, jsx_runtime_1.jsxs)(styles_1.LabelWrapper, { className: constants_1.stepClassnames.labelContainer, children: [(0, jsx_runtime_1.jsx)(styles_1.IconWrapper, { className: constants_1.stepClassnames.iconContainer, children: (0, jsx_runtime_1.jsx)(StepIcon_1.StepIcon, { icon: icon, isActive: isActiveStep, isCompleted: isCompletedStep, isError: isError, isWarning: isWarning }) }), (0, jsx_runtime_1.jsx)(Label_1.Label, { label: label, isActiveStep: isActiveStep }), connectorVariant === 'arrow' && ((0, jsx_runtime_1.jsx)(styles_1.ArrowConnector, { className: connector({
|
|
72
72
|
connector: connectorVariant,
|
package/node/components/Notification/NotificationStackContainer/NotificationStackContainer.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.NotificationStackContainer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const inject_style_1 = require("react-toastify-next/dist/inject-style");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../../utils/cn");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
const styles_1 = require("./styles");
|
|
9
9
|
const useLogic_1 = require("./useLogic");
|
|
@@ -14,9 +14,9 @@ const NotificationStackContainer = ({ containerId = constants_1.NOTIFY_CONTAINER
|
|
|
14
14
|
const { isVisibleCloseButton, isStackExpanded, isStartedClosingNotify, closeAll, } = (0, useLogic_1.useLogic)({
|
|
15
15
|
containerId,
|
|
16
16
|
});
|
|
17
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0,
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, cn_1.cn)({
|
|
18
18
|
[constants_1.notifyClassnames.container]: isStackExpanded,
|
|
19
|
-
}), children: [(0, jsx_runtime_1.jsx)("div", { className: constants_1.notifyClassnames.stackHost, children: (0, jsx_runtime_1.jsx)(styles_1.Inner, { ...props, className: (0,
|
|
19
|
+
}), children: [(0, jsx_runtime_1.jsx)("div", { className: constants_1.notifyClassnames.stackHost, children: (0, jsx_runtime_1.jsx)(styles_1.Inner, { ...props, className: (0, cn_1.cn)(constants_1.notifyClassnames.stack, props.className), ...{ stacked: true }, containerId: containerId, pauseOnFocusLoss: true, position: constants_1.NOTIFY_POSITIONS.BOTTOM_RIGHT, newestOnTop: false, closeOnClick: false, draggable: false, rtl: false, closeButton: false, bodyClassName: `${constants_1.notifyClassnames.body}`, toastClassName: constants_1.notifyClassnames.root, progressClassName: `${constants_1.notifyClassnames.progress}` }) }), isVisibleCloseButton && ((0, jsx_runtime_1.jsx)(styles_1.CloseButton, { variant: "light", color: "grey", className: (0, cn_1.cn)({
|
|
20
20
|
[constants_1.notifyClassnames.closeButtonAnimationOut]: isStartedClosingNotify,
|
|
21
21
|
}), onClick: closeAll, children: "\u0421\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0435" })), (0, jsx_runtime_1.jsx)(styles_1.StaticInner, { containerId: staticContainerId, position: constants_1.NOTIFY_POSITIONS.BOTTOM_RIGHT, newestOnTop: false, closeOnClick: false, draggable: false, rtl: false, closeButton: false, bodyClassName: `${constants_1.notifyClassnames.body}`, toastClassName: constants_1.notifyClassnames.root, progressClassName: `${constants_1.notifyClassnames.progress}` }), bannerContainer] }));
|
|
22
22
|
};
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageAside = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_dom_1 = require("react-dom");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../utils/cn");
|
|
7
7
|
const cva_1 = require("../utils/cva");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
const hooks_1 = require("./hooks");
|
|
@@ -21,6 +21,6 @@ const PageAside = ({ children, className, header, navigation, }) => {
|
|
|
21
21
|
navigation,
|
|
22
22
|
});
|
|
23
23
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isMobileNavigationVisible &&
|
|
24
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(styles_1.MobileAsideNavigation, { className: constants_1.pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && (0, jsx_runtime_1.jsx)(styles_1.MobileAsideHeader, { children: header }), (0, jsx_runtime_1.jsx)(MobileAsideButton_1.MobileAsideButton, { content: children }), (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0,
|
|
24
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(styles_1.MobileAsideNavigation, { className: constants_1.pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && (0, jsx_runtime_1.jsx)(styles_1.MobileAsideHeader, { children: header }), (0, jsx_runtime_1.jsx)(MobileAsideButton_1.MobileAsideButton, { content: children }), (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, cn_1.cn)(className, asideCva({ withHeader: Boolean(header) })), children: [header && ((0, jsx_runtime_1.jsxs)(styles_1.AsideHeader, { children: [header, (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] })), navigation, children] })] }));
|
|
25
25
|
};
|
|
26
26
|
exports.PageAside = PageAside;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageAsideNavigation = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const useScrollToActiveElement_1 = require("../useScrollToActiveElement");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../utils/cn");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const styles_1 = require("./styles");
|
|
9
9
|
const PageAsideNavigation = ({ addonNavigation, children, className, addonNavigationPosition = 'start', }) => {
|
|
10
10
|
const { containerRef } = (0, useScrollToActiveElement_1.useScrollToActiveElement)();
|
|
11
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0,
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, cn_1.cn)(constants_1.pageAsideNavigationClassnames.root, className), children: [addonNavigationPosition === 'start' && addonNavigation && ((0, jsx_runtime_1.jsx)(styles_1.AddonNavigationWrapper, { children: addonNavigation })), (0, jsx_runtime_1.jsx)(styles_1.NavigationList, { ref: containerRef, children: children }), addonNavigationPosition === 'end' && addonNavigation && ((0, jsx_runtime_1.jsx)(styles_1.AddonNavigationWrapper, { children: addonNavigation }))] }));
|
|
12
12
|
};
|
|
13
13
|
exports.PageAsideNavigation = PageAsideNavigation;
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const PageContext_1 = require("../PageContext");
|
|
7
7
|
const PageLayoutFooter_1 = require("../PageLayoutFooter");
|
|
8
|
-
const
|
|
8
|
+
const cn_1 = require("../utils/cn");
|
|
9
9
|
const cva_1 = require("../utils/cva");
|
|
10
10
|
const constants_1 = require("./constants");
|
|
11
11
|
const styles_1 = require("./styles");
|
|
@@ -25,7 +25,7 @@ const contentCva = (0, cva_1.cva)(constants_1.pageContentClassnames.content, {
|
|
|
25
25
|
exports.PageContent = (0, react_1.forwardRef)((props, forwardedRef) => {
|
|
26
26
|
const { hasAside } = (0, react_1.useContext)(PageContext_1.PageContext);
|
|
27
27
|
const { className, children, isFullHeight = true, footer, scrollRef, header, isUnconstrained = false, } = props;
|
|
28
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0,
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, cn_1.cn)(className, constants_1.pageContentClassnames.pageContent), ref: forwardedRef, "$isFullHeight": isFullHeight, "$isSeparatorShown": hasAside || Boolean(header), children: [header && header, (0, jsx_runtime_1.jsx)(styles_1.Content, { ref: scrollRef, className: contentCva({
|
|
29
29
|
isUnconstrained,
|
|
30
30
|
hasHeader: Boolean(header),
|
|
31
31
|
hasAside,
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Content = exports.Wrapper = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
|
-
const
|
|
5
|
+
const constants_2 = require("../PdfViewer/constants");
|
|
6
6
|
const styled_1 = require("../styled");
|
|
7
|
-
const
|
|
7
|
+
const constants_3 = require("./constants");
|
|
8
8
|
exports.Wrapper = (0, styled_1.styled)('article', {
|
|
9
9
|
shouldForwardProp: (prop) => !['$isFullHeight', '$isSeparatorShown'].includes(prop),
|
|
10
10
|
}) `
|
|
@@ -31,7 +31,7 @@ exports.Wrapper = (0, styled_1.styled)('article', {
|
|
|
31
31
|
border-top: none;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
@keyframes ${
|
|
34
|
+
@keyframes ${constants_3.PAGE_CONTENT_ANIMATION} {
|
|
35
35
|
0% {
|
|
36
36
|
display: none;
|
|
37
37
|
|
|
@@ -49,8 +49,8 @@ exports.Wrapper = (0, styled_1.styled)('article', {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
&.${
|
|
53
|
-
animation: ${({ theme }) => `${
|
|
52
|
+
&.${constants_3.pageContentClassnames.animation} > * {
|
|
53
|
+
animation: ${({ theme }) => `${constants_3.PAGE_CONTENT_ANIMATION} ${theme.transitions.duration.complex * 2}ms`};
|
|
54
54
|
}
|
|
55
55
|
`;
|
|
56
56
|
exports.Content = styled_1.styled.div `
|
|
@@ -62,7 +62,7 @@ exports.Content = styled_1.styled.div `
|
|
|
62
62
|
|
|
63
63
|
padding: ${({ theme }) => theme.spacing(0, 6, 4)};
|
|
64
64
|
|
|
65
|
-
&.${
|
|
65
|
+
&.${constants_3.pageContentClassnames.contentHasHeader}, &.${constants_3.pageContentClassnames.hasAside} {
|
|
66
66
|
padding: ${({ theme }) => theme.spacing(4, 6, 4)};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -71,7 +71,7 @@ exports.Content = styled_1.styled.div `
|
|
|
71
71
|
padding-bottom: ${({ theme }) => theme.spacing(3)};
|
|
72
72
|
padding-left: ${({ theme }) => theme.spacing(4)};
|
|
73
73
|
|
|
74
|
-
&.${
|
|
74
|
+
&.${constants_3.pageContentClassnames.contentHasHeader}, &.${constants_3.pageContentClassnames.hasAside} {
|
|
75
75
|
padding: ${({ theme }) => theme.spacing(4, 4, 3)};
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -88,14 +88,14 @@ exports.Content = styled_1.styled.div `
|
|
|
88
88
|
border: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
89
89
|
border-radius: ${({ theme }) => theme.shape.medium};
|
|
90
90
|
|
|
91
|
-
&.${
|
|
91
|
+
&.${constants_3.pageContentClassnames.contentHasHeader} {
|
|
92
92
|
border-top-left-radius: 0;
|
|
93
93
|
border-top-right-radius: 0;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
/* Причина игнора: Не критично для отображения */
|
|
97
97
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
98
|
-
&.${
|
|
98
|
+
&.${constants_3.pageContentClassnames.isUnconstrained}, &:has(> .${constants_1.selfContainedClassname}) {
|
|
99
99
|
margin: 0;
|
|
100
100
|
padding: 0;
|
|
101
101
|
|
|
@@ -107,7 +107,7 @@ exports.Content = styled_1.styled.div `
|
|
|
107
107
|
|
|
108
108
|
/* Причина игнора: Не критично для отображения */
|
|
109
109
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
110
|
-
&:has(.${
|
|
110
|
+
&:has(.${constants_2.pdfViewerClassnames.document}.${constants_2.pdfViewerClassnames.zoom}) {
|
|
111
111
|
scroll-behavior: auto;
|
|
112
112
|
scrollbar-gutter: auto;
|
|
113
113
|
|
|
@@ -123,7 +123,7 @@ exports.Content = styled_1.styled.div `
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
126
|
-
&&.${
|
|
126
|
+
&&.${constants_3.pageContentClassnames.withPdfViewer} {
|
|
127
127
|
margin: 0;
|
|
128
128
|
padding-top: 0;
|
|
129
129
|
padding-right: 0;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.HeaderContent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Breadcrumbs_1 = require("../../Breadcrumbs");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../../utils/cn");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
const PageActions_1 = require("../PageActions");
|
|
9
9
|
const Title_1 = require("../Title");
|
|
@@ -17,6 +17,6 @@ const HeaderContent = ({ backButton, description, subheader, breadcrumbs, tabs,
|
|
|
17
17
|
}
|
|
18
18
|
return ((0, jsx_runtime_1.jsx)(styles_1.BreadcrumbsWrapper, { children: Array.isArray(breadcrumbs) ? ((0, jsx_runtime_1.jsx)(Breadcrumbs_1.Breadcrumbs, { children: breadcrumbs })) : (breadcrumbs) }));
|
|
19
19
|
};
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderBreadcrumbs(), (0, jsx_runtime_1.jsx)(styles_1.DesktopTitleWrapper, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description, isLoading: isLoading }), actions && ((0, jsx_runtime_1.jsx)(PageActions_1.PageActions, { className: (0,
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [renderBreadcrumbs(), (0, jsx_runtime_1.jsx)(styles_1.DesktopTitleWrapper, { children: (0, jsx_runtime_1.jsx)(Title_1.Title, { backButton: backButton, title: title, isLoading: isLoading, hasDescription: Boolean(description), hasBreadcrumbs: Boolean(breadcrumbs) }) }), (0, jsx_runtime_1.jsx)(Description_1.Description, { description: description, isLoading: isLoading }), actions && ((0, jsx_runtime_1.jsx)(PageActions_1.PageActions, { className: (0, cn_1.cn)(constants_1.pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, size: "medium", withCollapseOnLaptop: Boolean(filters), ...actions })), filters && ((0, jsx_runtime_1.jsx)(FormFiltersProvider_1.FormFiltersProvider, { filtersClassName: constants_1.pageHeaderClassnames.filters, quickFiltersClassName: constants_1.pageHeaderClassnames.quickFilters, children: filters })), tabs && (0, jsx_runtime_1.jsx)(styles_1.TabsWrapper, { children: tabs }), subheader && ((0, jsx_runtime_1.jsx)(styles_1.PageSubheader, { className: constants_1.pageHeaderClassnames.subheader, children: subheader }))] }));
|
|
21
21
|
};
|
|
22
22
|
exports.HeaderContent = HeaderContent;
|
|
@@ -9,6 +9,10 @@ exports.BreadcrumbsWrapper = styled_1.styled.div `
|
|
|
9
9
|
|
|
10
10
|
margin-bottom: ${({ theme }) => theme.spacing(1)};
|
|
11
11
|
|
|
12
|
+
&:empty {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
|
|
12
16
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
13
17
|
display: none;
|
|
14
18
|
}
|
|
@@ -19,6 +23,10 @@ exports.TabsWrapper = styled_1.styled.div `
|
|
|
19
23
|
|
|
20
24
|
padding-top: ${({ theme }) => theme.spacing(4)};
|
|
21
25
|
|
|
26
|
+
&:empty {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
22
30
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
23
31
|
padding: ${({ theme }) => theme.spacing(0, 0, 4, 0)};
|
|
24
32
|
|
|
@@ -33,6 +41,10 @@ exports.PageSubheader = styled_1.styled.div `
|
|
|
33
41
|
|
|
34
42
|
padding-top: ${({ theme }) => theme.spacing(4)};
|
|
35
43
|
|
|
44
|
+
&:empty {
|
|
45
|
+
display: none;
|
|
46
|
+
}
|
|
47
|
+
|
|
36
48
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
37
49
|
padding: ${({ theme }) => theme.spacing(0, 4, 4, 4)};
|
|
38
50
|
}
|
|
@@ -5,13 +5,13 @@ const react_1 = require("react");
|
|
|
5
5
|
const ActionGroup_1 = require("../../../ActionGroup");
|
|
6
6
|
const NextFeatureFlagsContext_1 = require("../../../ConfigProvider/NextFeatureFlagsContext");
|
|
7
7
|
const DashboardContext_1 = require("../../../DashboardContext");
|
|
8
|
-
const
|
|
8
|
+
const cn_1 = require("../../../utils/cn");
|
|
9
9
|
const constants_1 = require("../constants");
|
|
10
10
|
const useLogic = ({ main, secondary, secondaryVisible, withCollapseOnLaptop = false, }) => {
|
|
11
11
|
const { showFocusModeButtonOnDesktop, showFocusModeButtonOnLaptop } = (0, react_1.useContext)(NextFeatureFlagsContext_1.NextFeatureFlagsContext);
|
|
12
12
|
const { setFocusedMode, isFocusedMode } = (0, react_1.useContext)(DashboardContext_1.DashboardContext);
|
|
13
13
|
const { disabledAction } = (0, ActionGroup_1.useActionsState)({ main, secondary });
|
|
14
|
-
const buttonClassnames = (0, react_1.useMemo)(() => (0,
|
|
14
|
+
const buttonClassnames = (0, react_1.useMemo)(() => (0, cn_1.cn)({
|
|
15
15
|
[constants_1.focusModeButtonClassnames.isShowOnDesktop]: showFocusModeButtonOnDesktop,
|
|
16
16
|
[constants_1.focusModeButtonClassnames.isShowOnLaptop]: showFocusModeButtonOnLaptop,
|
|
17
17
|
}), [showFocusModeButtonOnDesktop, showFocusModeButtonOnLaptop]);
|
|
@@ -55,7 +55,7 @@ const useLogic = ({ main, secondary, secondaryVisible, withCollapseOnLaptop = fa
|
|
|
55
55
|
return allActions;
|
|
56
56
|
}, [main, secondary, secondaryVisible, disabledAction]);
|
|
57
57
|
const classnames = (0, react_1.useMemo)(() => {
|
|
58
|
-
return (0,
|
|
58
|
+
return (0, cn_1.cn)({
|
|
59
59
|
[constants_1.actionsClassnames.withCollapseOnLaptop]: withCollapseOnLaptop && collapsedActions.length > 0,
|
|
60
60
|
});
|
|
61
61
|
}, [withCollapseOnLaptop]);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PageHeader = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const cn_1 = require("../utils/cn");
|
|
6
6
|
const cva_1 = require("../utils/cva");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const HeaderContent_1 = require("./HeaderContent");
|
|
@@ -39,10 +39,10 @@ const PageHeader = (props) => {
|
|
|
39
39
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(styles_1.MobileTitleWrapper, { className: mobilePageHeaderCva({
|
|
40
40
|
hasTitle: Boolean(title) || isLoading,
|
|
41
41
|
hasBackButton: Boolean(backButton),
|
|
42
|
-
}), children: [(0, jsx_runtime_1.jsx)(Title_1.Title, { backButton: backButton, title: title, isLoading: isLoading }), mobileTitleActions && mobileTitleActions] }), (0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: (0,
|
|
42
|
+
}), children: [(0, jsx_runtime_1.jsx)(Title_1.Title, { backButton: backButton, title: title, isLoading: isLoading }), mobileTitleActions && mobileTitleActions] }), (0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: (0, cn_1.cn)(rootCva({
|
|
43
43
|
hasActions: Boolean(actions),
|
|
44
44
|
hasSubheader: Boolean(subheader),
|
|
45
45
|
hasFilters: Boolean(filters),
|
|
46
|
-
}), className), children: (0, jsx_runtime_1.jsx)(HeaderContent_1.HeaderContent, { breadcrumbs: breadcrumbs, backButton: backButton, title: title, description: description, actions: actions, subheader: subheader, tabs: tabs, filters: filters, isLoading: isLoading }) }), isShowMobileActions && ((0, jsx_runtime_1.jsx)(MobilePageActions_1.MobilePageActions, { className: (0,
|
|
46
|
+
}), className), children: (0, jsx_runtime_1.jsx)(HeaderContent_1.HeaderContent, { breadcrumbs: breadcrumbs, backButton: backButton, title: title, description: description, actions: actions, subheader: subheader, tabs: tabs, filters: filters, isLoading: isLoading }) }), isShowMobileActions && ((0, jsx_runtime_1.jsx)(MobilePageActions_1.MobilePageActions, { className: (0, cn_1.cn)(constants_1.pageHeaderClassnames.pageHeaderActions), isLoading: isLoading, ...actions }))] }));
|
|
47
47
|
};
|
|
48
48
|
exports.PageHeader = PageHeader;
|
|
@@ -34,8 +34,20 @@ exports.Wrapper = styled_1.styled.header `
|
|
|
34
34
|
|
|
35
35
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
/*
|
|
38
|
+
* Два правила, а не список через запятую: невалидный :has()
|
|
39
|
+
* отбросил бы и границу под фильтрами.
|
|
40
|
+
*/
|
|
41
|
+
&.${constants_2.pageHeaderClassnames.hasFilters} {
|
|
42
|
+
border-bottom: 1px solid
|
|
43
|
+
${({ theme }) => theme.palette.components.border.default};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Причина игнора: прогрессивное улучшение */
|
|
47
|
+
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
48
|
+
&:has(.${constants_2.pageHeaderClassnames.subheader}:not(:empty)) {
|
|
49
|
+
border-bottom: 1px solid
|
|
50
|
+
${({ theme }) => theme.palette.components.border.default};
|
|
39
51
|
}
|
|
40
52
|
}
|
|
41
53
|
|
|
@@ -81,8 +93,8 @@ exports.MobileTitleWrapper = styled_1.styled.div `
|
|
|
81
93
|
/* stylelint-disable plugin/no-unsupported-browser-features */
|
|
82
94
|
&:not(:has(+ .${constants_2.pageHeaderClassnames.root} :is(
|
|
83
95
|
.${constants_2.pageHeaderClassnames.filters},
|
|
84
|
-
.${constants_2.pageHeaderClassnames.subheader},
|
|
85
|
-
.${constants_1.pageAsideClassnames.mobileNavigation}
|
|
96
|
+
.${constants_2.pageHeaderClassnames.subheader}:not(:empty),
|
|
97
|
+
.${constants_1.pageAsideClassnames.mobileNavigation}:not(:empty)
|
|
86
98
|
))) {
|
|
87
99
|
border-bottom: 1px solid ${({ theme }) => theme.palette.components.border.default};
|
|
88
100
|
}
|
|
@@ -9,13 +9,13 @@ const PageContext_1 = require("../PageContext");
|
|
|
9
9
|
const PageHeader_1 = require("../PageHeader");
|
|
10
10
|
const PageLayoutContainer_1 = require("../PageLayoutContainer");
|
|
11
11
|
const LoadingPlaceholder_1 = require("../placeholders/LoadingPlaceholder");
|
|
12
|
-
const
|
|
12
|
+
const cn_1 = require("../utils/cn");
|
|
13
13
|
const styles_1 = require("./styles");
|
|
14
14
|
const useLogic_1 = require("./useLogic");
|
|
15
15
|
const PageLayout = (props) => {
|
|
16
16
|
const { header, content, aside, footer, className, alert, isLoading } = props;
|
|
17
17
|
const { hasAside, ref } = (0, useLogic_1.useLogic)(props);
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)(PageContext_1.PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.DesktopAlertWrapper, { children: alert }), (0, jsx_runtime_1.jsxs)(PageLayoutContainer_1.PageLayoutContainer, { className: (0,
|
|
18
|
+
return ((0, jsx_runtime_1.jsxs)(PageContext_1.PageContextProvider, { hasAside: hasAside, isLoading: isLoading, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.DesktopAlertWrapper, { children: alert }), (0, jsx_runtime_1.jsxs)(PageLayoutContainer_1.PageLayoutContainer, { className: (0, cn_1.cn)(className, {
|
|
19
19
|
[PageLayoutContainer_1.pageLayoutClassnames.withoutHeader]: !header,
|
|
20
20
|
}), ref: ref, children: [alert && (0, jsx_runtime_1.jsx)(styles_1.MobileAlertWrapper, { children: alert }), (0, react_1.isValidElement)(header)
|
|
21
21
|
? header
|
|
@@ -5,18 +5,30 @@ const styled_1 = require("../styled");
|
|
|
5
5
|
exports.MobileAlertWrapper = styled_1.styled.div `
|
|
6
6
|
display: none;
|
|
7
7
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
8
|
-
display:
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: ${({ theme }) => theme.spacing(2)};
|
|
9
11
|
|
|
10
12
|
margin: ${({ theme }) => theme.spacing(3, 4, 0, 4)};
|
|
11
13
|
|
|
12
14
|
background-color: ${({ theme }) => theme.palette.background.default};
|
|
15
|
+
|
|
16
|
+
&:empty {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
13
19
|
}
|
|
14
20
|
`;
|
|
15
21
|
exports.DesktopAlertWrapper = styled_1.styled.div `
|
|
16
|
-
display:
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
gap: ${({ theme }) => theme.spacing(2)};
|
|
17
25
|
|
|
18
26
|
margin-bottom: ${({ theme }) => theme.spacing(4)};
|
|
19
27
|
|
|
28
|
+
&:empty {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
20
32
|
${({ theme }) => theme.breakpoints.down('sm')} {
|
|
21
33
|
display: none;
|
|
22
34
|
}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageLayoutContainer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../utils/cn");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const styles_1 = require("./styles");
|
|
9
9
|
exports.PageLayoutContainer = (0, react_1.forwardRef)(({ children, className }, forwardedRef) => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledPaper, { variant: "outlined", children: (0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: (0,
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledPaper, { variant: "outlined", children: (0, jsx_runtime_1.jsx)(styles_1.Wrapper, { className: (0, cn_1.cn)(className, constants_1.pageLayoutClassnames.root), ref: forwardedRef, children: children }) }));
|
|
11
11
|
});
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PageLayoutSection = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../utils/cn");
|
|
7
7
|
const cva_1 = require("../utils/cva");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
@@ -27,5 +27,5 @@ const sectionWrapperCva = (0, cva_1.cva)(constants_1.pageLayoutSectionClassnames
|
|
|
27
27
|
* } />
|
|
28
28
|
*/
|
|
29
29
|
exports.PageLayoutSection = (0, react_1.forwardRef)(({ children, className, isNoMobileSidePadding = false }, ref) => {
|
|
30
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.Section, { className: (0,
|
|
30
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Section, { className: (0, cn_1.cn)(className, constants_1.pageLayoutSectionClassnames.root), ref: ref, children: (0, jsx_runtime_1.jsx)(styles_1.SectionWrapper, { className: sectionWrapperCva({ isNoMobileSidePadding }), children: children }) }));
|
|
31
31
|
});
|
package/node/components/PageLayoutSection/PageLayoutSectionContainer/PageLayoutSectionContainer.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.PageLayoutSectionContainer = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const PageContext_1 = require("../../PageContext");
|
|
7
|
-
const
|
|
7
|
+
const cn_1 = require("../../utils/cn");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
10
10
|
/**
|
|
@@ -22,7 +22,7 @@ const styles_1 = require("./styles");
|
|
|
22
22
|
const PageLayoutSectionContainer = ({ children, className, isShowDivider = false, }) => {
|
|
23
23
|
const { hasAside } = (0, react_1.useContext)(PageContext_1.PageContext);
|
|
24
24
|
const classes = (0, react_1.useMemo)(() => {
|
|
25
|
-
return (0,
|
|
25
|
+
return (0, cn_1.cn)(className, {
|
|
26
26
|
[constants_1.pageLayoutSectionContainerClassnames.withAside]: hasAside,
|
|
27
27
|
[constants_1.pageLayoutSectionContainerClassnames.withDivider]: isShowDivider,
|
|
28
28
|
});
|
|
@@ -7,7 +7,7 @@ const MenuOnOutlineMd_1 = require("../../icons/MenuOnOutlineMd");
|
|
|
7
7
|
const PageAside_1 = require("../PageAside");
|
|
8
8
|
const styles_1 = require("../PageAside/styles");
|
|
9
9
|
const PinButton_1 = require("../PinButton");
|
|
10
|
-
const
|
|
10
|
+
const cn_1 = require("../utils/cn");
|
|
11
11
|
const cva_1 = require("../utils/cva");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
13
|
const styles_2 = require("./styles");
|
|
@@ -25,6 +25,6 @@ const asideCva = (0, cva_1.cva)(constants_1.pinnableAsideClassnames.root, {
|
|
|
25
25
|
const PagePinnableAside = ({ header, children, className, navigation, ...restProps }) => {
|
|
26
26
|
const { isPinned, togglePin, pageHeaderContainer, isMobileNavigationVisible, } = (0, useLogic_1.useLogic)({ navigation, ...restProps });
|
|
27
27
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isMobileNavigationVisible &&
|
|
28
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(styles_1.MobileAsideNavigation, { className: PageAside_1.pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && (0, jsx_runtime_1.jsx)(styles_1.MobileAsideHeader, { children: header }), (0, jsx_runtime_1.jsx)(PageAside_1.MobileAsideButton, { content: children }), (0, jsx_runtime_1.jsxs)(styles_2.Aside, { "$isPinned": isPinned, className: asideCva({ withHeader: Boolean(header) }), children: [(0, jsx_runtime_1.jsx)(styles_2.Dummy, { "$isPinned": isPinned, children: (0, jsx_runtime_1.jsx)(MenuOnOutlineMd_1.MenuOnOutlineMd, {}) }), (0, jsx_runtime_1.jsxs)(styles_2.Content, { "$isPinned": isPinned, className: (0,
|
|
28
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(styles_1.MobileAsideNavigation, { className: PageAside_1.pageAsideClassnames.mobileNavigation, children: navigation }), pageHeaderContainer), header && (0, jsx_runtime_1.jsx)(styles_1.MobileAsideHeader, { children: header }), (0, jsx_runtime_1.jsx)(PageAside_1.MobileAsideButton, { content: children }), (0, jsx_runtime_1.jsxs)(styles_2.Aside, { "$isPinned": isPinned, className: asideCva({ withHeader: Boolean(header) }), children: [(0, jsx_runtime_1.jsx)(styles_2.Dummy, { "$isPinned": isPinned, children: (0, jsx_runtime_1.jsx)(MenuOnOutlineMd_1.MenuOnOutlineMd, {}) }), (0, jsx_runtime_1.jsxs)(styles_2.Content, { "$isPinned": isPinned, className: (0, cn_1.cn)(className, constants_1.pinnableAsideClassnames.content), children: [(0, jsx_runtime_1.jsxs)(styles_2.ChildrenWrapper, { children: [header && ((0, jsx_runtime_1.jsxs)(styles_1.AsideHeader, { children: [header, (0, jsx_runtime_1.jsx)(styles_1.StyledDivider, {})] })), navigation, children] }), (0, jsx_runtime_1.jsx)(styles_2.Footer, { children: (0, jsx_runtime_1.jsx)(PinButton_1.PinButton, { isPinned: isPinned, isUseCollapse: false, onClick: togglePin }) })] })] })] }));
|
|
29
29
|
};
|
|
30
30
|
exports.PagePinnableAside = PagePinnableAside;
|
|
@@ -8,7 +8,7 @@ const EyeOutlineMd_1 = require("../../icons/EyeOutlineMd");
|
|
|
8
8
|
const IconButton_1 = require("../IconButton");
|
|
9
9
|
const personalDataSecurity_1 = require("../personalDataSecurity");
|
|
10
10
|
const TextField_1 = require("../TextField");
|
|
11
|
-
const
|
|
11
|
+
const cn_1 = require("../utils/cn");
|
|
12
12
|
exports.PasswordField = (0, react_1.forwardRef)(({ label, disabled = false, showSymbols = false, isHidePersonalData, inputProps, ...props }, ref) => {
|
|
13
13
|
const [showPassword, setShowPassword] = (0, react_1.useState)(showSymbols);
|
|
14
14
|
const handleClickShowPassword = () => setShowPassword((show) => !show);
|
|
@@ -21,7 +21,7 @@ exports.PasswordField = (0, react_1.forwardRef)(({ label, disabled = false, show
|
|
|
21
21
|
});
|
|
22
22
|
return ((0, jsx_runtime_1.jsx)(TextField_1.TextField, { inputProps: {
|
|
23
23
|
...inputProps,
|
|
24
|
-
className: (0,
|
|
24
|
+
className: (0, cn_1.cn)(inputProps?.className, hidePersonalDataClassname),
|
|
25
25
|
}, ref: ref, label: label, type: showPassword ? 'text' : 'password', disabled: disabled, InputProps: {
|
|
26
26
|
endAdornment: ((0, jsx_runtime_1.jsx)(IconButton_1.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 ? ((0, jsx_runtime_1.jsx)(EyeCrossedOutlineMd_1.EyeCrossedOutlineMd, { id: "visibility-off" })) : ((0, jsx_runtime_1.jsx)(EyeOutlineMd_1.EyeOutlineMd, { id: "visibility-on" })) })),
|
|
27
27
|
}, ...props }));
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PDFDocument = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const cn_1 = require("../../utils/cn");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const styles_1 = require("./styles");
|
|
8
8
|
const useLogic_1 = require("./useLogic");
|
|
9
9
|
const PDFDocument = (props) => {
|
|
10
10
|
const { documentRef, onAnimationEnd, isLoading } = (0, useLogic_1.useLogic)(props);
|
|
11
11
|
const { enabledZoom, isCentered, ...restProps } = props;
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledDocument, { ...restProps, "$isLoading": isLoading, className: (0,
|
|
12
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledDocument, { ...restProps, "$isLoading": isLoading, className: (0, cn_1.cn)(constants_1.pdfViewerClassnames.document, {
|
|
13
13
|
[constants_1.pdfViewerClassnames.zoom]: enabledZoom,
|
|
14
14
|
[constants_1.pdfViewerClassnames.centered]: isCentered,
|
|
15
15
|
}), inputRef: documentRef, onAnimationEnd: onAnimationEnd }));
|
|
@@ -5,12 +5,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const PinOutlineMd_1 = require("../../icons/PinOutlineMd");
|
|
6
6
|
const UnpinOutlineMd_1 = require("../../icons/UnpinOutlineMd");
|
|
7
7
|
const Collapse_1 = require("../Collapse");
|
|
8
|
-
const
|
|
8
|
+
const cn_1 = require("../utils/cn");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
10
|
const styles_1 = require("./styles");
|
|
11
11
|
const PinButton = (props) => {
|
|
12
12
|
const { isPinned, collapsedIn, isUseCollapse = true, className, ...restProps } = props;
|
|
13
13
|
const PinIcon = isPinned ? UnpinOutlineMd_1.UnpinOutlineMd : PinOutlineMd_1.PinOutlineMd;
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.TogglerButton, { startIcon: (0, jsx_runtime_1.jsx)(PinIcon, {}), variant: "text", className: (0,
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.TogglerButton, { startIcon: (0, jsx_runtime_1.jsx)(PinIcon, {}), variant: "text", className: (0, cn_1.cn)(className, constants_1.pinButtonClassnames.root), ...restProps, children: isUseCollapse ? ((0, jsx_runtime_1.jsx)(Collapse_1.Collapse, { in: collapsedIn, orientation: "horizontal", children: (0, jsx_runtime_1.jsx)(styles_1.Content, { children: isPinned ? 'Открепить меню' : 'Закрепить меню' }) })) : ((0, jsx_runtime_1.jsx)(styles_1.Content, { children: isPinned ? 'Открепить меню' : 'Закрепить меню' })) }));
|
|
15
15
|
};
|
|
16
16
|
exports.PinButton = PinButton;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const useUpdateEffect_1 = require("../../useUpdateEffect");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../../utils/cn");
|
|
7
7
|
const constants_1 = require("../constants");
|
|
8
8
|
const useLogic = ({ checked = false, disabled = false, isError = false, onChange: propsOnChange, className: propClassNames, name, style, inputRef, value, id, ...restProps }) => {
|
|
9
9
|
const [isChecked, setIsChecked] = (0, react_1.useState)(checked);
|
|
@@ -14,7 +14,7 @@ const useLogic = ({ checked = false, disabled = false, isError = false, onChange
|
|
|
14
14
|
propsOnChange?.(event, event.target.checked);
|
|
15
15
|
setIsChecked(event.target.checked);
|
|
16
16
|
};
|
|
17
|
-
const className = (0, react_1.useMemo)(() => (0,
|
|
17
|
+
const className = (0, react_1.useMemo)(() => (0, cn_1.cn)(constants_1.radioClassnames.root, isChecked ? constants_1.radioClassnames.checked : '', disabled ? constants_1.radioClassnames.disabled : '', propClassNames), [isChecked, disabled, propClassNames]);
|
|
18
18
|
return {
|
|
19
19
|
onChange,
|
|
20
20
|
isChecked,
|
|
@@ -4,11 +4,11 @@ exports.RadioCard = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const RadioGroup_1 = require("../RadioGroup");
|
|
7
|
-
const
|
|
7
|
+
const cn_1 = require("../utils/cn");
|
|
8
8
|
const constants_1 = require("./constants");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
10
10
|
const RadioCard = ({ id, disabled: propsIsDisabled, className, header, children, value, ...props }) => {
|
|
11
11
|
const { isError, value: groupValue, name, onChange, disabled, } = (0, react_1.useContext)(RadioGroup_1.RadioGroupContext);
|
|
12
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0,
|
|
12
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { className: (0, cn_1.cn)(className, constants_1.radioCardClassnames.root), "$isError": isError, "$isChecked": groupValue === value, "$isDisabled": disabled || propsIsDisabled, children: [(0, jsx_runtime_1.jsx)(styles_1.StyledRadio, { disabled: disabled || propsIsDisabled, checked: groupValue === value, name: name, onChange: (event) => onChange?.(event, event.target.value), value: value, ...props }), (0, jsx_runtime_1.jsxs)(styles_1.Content, { className: constants_1.radioCardClassnames.content, children: [(0, jsx_runtime_1.jsx)("div", { children: header }), (0, jsx_runtime_1.jsx)("div", { children: children })] })] }));
|
|
13
13
|
};
|
|
14
14
|
exports.RadioCard = RadioCard;
|
|
@@ -5,14 +5,14 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const CrossOutlineMd_1 = require("../../icons/CrossOutlineMd");
|
|
7
7
|
const TextField_1 = require("../TextField");
|
|
8
|
-
const
|
|
8
|
+
const cn_1 = require("../utils/cn");
|
|
9
9
|
const constants_1 = require("./constants");
|
|
10
10
|
const styles_1 = require("./styles");
|
|
11
11
|
const useLogic_1 = require("./useLogic");
|
|
12
12
|
exports.SearchField = (0, react_1.forwardRef)((props, ref) => {
|
|
13
13
|
const { onChange, onClearValue, restProps, isLoading, inputRef, value, disabled, isClearButtonDisabled, onBlur, fullWidth, inputComponent, placeholder, hideHelperText, } = (0, useLogic_1.useLogic)(props);
|
|
14
14
|
const RenderComponent = inputComponent || TextField_1.TextField;
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.TextFieldRoot, { "$isFullWidth": fullWidth, children: (0, jsx_runtime_1.jsx)(RenderComponent, { type: "search", placeholder: placeholder, startAdornment: (0, jsx_runtime_1.jsx)(styles_1.SearchIcon, {}), disabled: disabled, hideHelperText: hideHelperText, endAdornment: (0, jsx_runtime_1.jsx)(styles_1.EndAdornmentWrapper, { className: (0,
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.TextFieldRoot, { "$isFullWidth": fullWidth, children: (0, jsx_runtime_1.jsx)(RenderComponent, { type: "search", placeholder: placeholder, startAdornment: (0, jsx_runtime_1.jsx)(styles_1.SearchIcon, {}), disabled: disabled, hideHelperText: hideHelperText, endAdornment: (0, jsx_runtime_1.jsx)(styles_1.EndAdornmentWrapper, { className: (0, cn_1.cn)({
|
|
16
16
|
[constants_1.searchFieldClassnames.endAdornmentVisible]: !isClearButtonDisabled,
|
|
17
17
|
}), children: isLoading ? ((0, jsx_runtime_1.jsx)(styles_1.LoaderWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledLoader, {}) })) : ((0, jsx_runtime_1.jsx)(styles_1.StyledIconButton, { variant: "text", onClick: onClearValue, disabled: isClearButtonDisabled, "$isActive": !isClearButtonDisabled, children: (0, jsx_runtime_1.jsx)(CrossOutlineMd_1.CrossOutlineMd, {}) })) }), onChange: onChange, value: value, ref: ref, inputRef: inputRef, trimmed: false, onBlur: onBlur, fullWidth: fullWidth, ...restProps }) }));
|
|
18
18
|
});
|
|
@@ -5,7 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const useId_1 = require("../../useId");
|
|
7
7
|
const checkIsDeepEqual_1 = require("../../utils/checkIsDeepEqual");
|
|
8
|
-
const
|
|
8
|
+
const cn_1 = require("../../utils/cn");
|
|
9
9
|
const date_1 = require("../../utils/date");
|
|
10
10
|
const constants_1 = require("./constants");
|
|
11
11
|
const DayButton_1 = require("./DayButton");
|
|
@@ -33,7 +33,7 @@ const StaticDaysCalendarInner = (0, react_1.memo)(({ minDate, maxDate, selectedD
|
|
|
33
33
|
productionCalendarStorage,
|
|
34
34
|
]);
|
|
35
35
|
const checkRenderRequirements = (0, react_1.useCallback)((item) => hideOutOfAvailableRangeElements ? !item.isOutOfAvailableRange : true, [hideOutOfAvailableRangeElements]);
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)("article", { className: (0,
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)("article", { className: (0, cn_1.cn)(className, constants_1.staticDaysCalendarClassnames.container), children: [(0, jsx_runtime_1.jsx)(Head_1.Head, { className: constants_1.staticDaysCalendarClassnames.head, isMondayFirst: isMondayFirst, hasHolidays: Boolean(productionCalendarStorage) }), (0, jsx_runtime_1.jsx)(styles_1.Body, { role: "grid", className: constants_1.staticDaysCalendarClassnames.grid, children: grid.map((item, index) => checkRenderRequirements(item) ? ((0, jsx_runtime_1.jsx)(DayButton_1.DayButton, { className: constants_1.staticDaysCalendarClassnames.button, isPreviousItemInSelectedRange: grid[index - 1]?.isInSelectedRange, isNextItemInSelectedRange: grid[index + 1]?.isInSelectedRange, isPreviousItemInHoveredRange: grid[index - 1]?.isInHoveredRange, isNextItemInHoveredRange: grid[index + 1]?.isInHoveredRange, ...item, onClick: onChange, onDayHover: onDayHover, renderDayTooltipTitle: renderDayTooltipTitle, disableTooltipInteractive: checkDisableTooltipInteractive?.(item), renderDayContent: renderDayContent, dragAndDropProps: dragAndDropProps, checkTooltipActive: checkTooltipActive }, item.date.toString())) : (
|
|
37
37
|
// biome-ignore lint/suspicious/noArrayIndexKey: Используется вместе с keyId
|
|
38
38
|
(0, jsx_runtime_1.jsx)("div", {}, `${id}_${index}`))) })] }));
|
|
39
39
|
}, (prev, next) => (0, checkIsDeepEqual_1.checkIsDeepEqual)({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SvgIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const
|
|
5
|
+
const cn_1 = require("../utils/cn");
|
|
6
6
|
const cva_1 = require("../utils/cva");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const styles_1 = require("./styles");
|
|
@@ -17,6 +17,6 @@ const svgCva = (0, cva_1.cva)(constants_1.svgIconClassnames.root, {
|
|
|
17
17
|
});
|
|
18
18
|
const SvgIcon = (props) => {
|
|
19
19
|
const { children, color = 'inherit', titleAccess, size, width, height, viewBox = '0 0 24 24', xmlns = 'http://www.w3.org/2000/svg', className, ...restProps } = props;
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.StyledSvg, { className: (0,
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.StyledSvg, { className: (0, cn_1.cn)(className, svgCva({ size })), viewBox: viewBox, "aria-hidden": titleAccess ? undefined : true, role: titleAccess ? 'img' : undefined, xmlns: xmlns, color: color, width: constants_1.SIZES[size] || width || '1em', height: constants_1.SIZES[size] || height || '1em', ...restProps, children: [children, titleAccess ? (0, jsx_runtime_1.jsx)("title", { children: titleAccess }) : null] }));
|
|
21
21
|
};
|
|
22
22
|
exports.SvgIcon = SvgIcon;
|