@astral/ui 4.92.0 → 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/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/PageHeader/HeaderContent/HeaderContent.js +2 -2
- package/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
- package/components/PageHeader/PageHeader.js +3 -3
- package/components/PageLayout/PageLayout.js +2 -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/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/PageHeader/HeaderContent/HeaderContent.js +2 -2
- package/node/components/PageHeader/PageActions/useLogic/useLogic.js +3 -3
- package/node/components/PageHeader/PageHeader.js +3 -3
- package/node/components/PageLayout/PageLayout.js +2 -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
|
@@ -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;
|
|
@@ -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
|
|
@@ -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;
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Tabs = 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 Tabs = ({ className, ...tabsProps }) => {
|
|
10
10
|
const { containerRef } = (0, useScrollToActiveElement_1.useScrollToActiveElement)();
|
|
11
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.Container, { children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledTabs, { ...tabsProps, ref: containerRef, className: (0,
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.Container, { children: (0, jsx_runtime_1.jsxs)(styles_1.Wrapper, { children: [(0, jsx_runtime_1.jsx)(styles_1.StyledTabs, { ...tabsProps, ref: containerRef, className: (0, cn_1.cn)(className, constants_1.tabsClassnames.root) }), (0, jsx_runtime_1.jsx)(styles_1.Divider, {})] }) }));
|
|
12
12
|
};
|
|
13
13
|
exports.Tabs = Tabs;
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const
|
|
5
|
+
const cn_1 = require("../../utils/cn");
|
|
6
6
|
const constants_1 = require("../constants");
|
|
7
7
|
const useLogic = ({ onDelete, variant, disabled, size, className, }) => {
|
|
8
8
|
const handleDelete = (event) => {
|
|
9
9
|
event.stopPropagation();
|
|
10
10
|
onDelete?.(event);
|
|
11
11
|
};
|
|
12
|
-
const classnames = (0, react_1.useMemo)(() => (0,
|
|
12
|
+
const classnames = (0, react_1.useMemo)(() => (0, cn_1.cn)(constants_1.tagClassnames.root, {
|
|
13
13
|
[constants_1.tagClassnames.variantText]: variant === 'text',
|
|
14
14
|
[constants_1.tagClassnames.variantContained]: variant === 'contained',
|
|
15
15
|
[constants_1.tagClassnames.variantLight]: variant === 'light',
|
|
@@ -5,13 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Tag_1 = require("../Tag");
|
|
7
7
|
const TagContext_1 = require("../Tag/TagContext");
|
|
8
|
-
const
|
|
8
|
+
const cn_1 = require("../utils/cn");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
10
10
|
/**
|
|
11
11
|
* Badge для использования внутри компонента Tag
|
|
12
12
|
*/
|
|
13
13
|
const TagBadge = ({ color = 'primary', checked, disabled, checkedColor, className, ...props }) => {
|
|
14
14
|
const { variant } = (0, react_1.useContext)(TagContext_1.TagContext);
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { withBorder: false, color: "white", "$color": color, "$variant": variant, "$isChecked": checked, "$isDisabled": disabled, className: (0,
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledBadge, { withBorder: false, color: "white", "$color": color, "$variant": variant, "$isChecked": checked, "$isDisabled": disabled, className: (0, cn_1.cn)(className, Tag_1.tagClassnames.badge), ...props }));
|
|
16
16
|
};
|
|
17
17
|
exports.TagBadge = TagBadge;
|
|
@@ -4,7 +4,7 @@ exports.TextField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const FormHelperText_1 = require("../FormHelperText");
|
|
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
|
exports.TextField = (0, react_1.forwardRef)(({ success, error, helperText: helperTextProp, fullWidth = false, startAdornment, endAdornment, inputProps, InputProps, maxLength, trimmed = true, onBlur, hideHelperText = false, className, disabled, ...props }, ref) => {
|
|
@@ -40,7 +40,7 @@ exports.TextField = (0, react_1.forwardRef)(({ success, error, helperText: helpe
|
|
|
40
40
|
}
|
|
41
41
|
onBlur?.(event);
|
|
42
42
|
};
|
|
43
|
-
const classnames = (0, react_1.useMemo)(() => (0,
|
|
43
|
+
const classnames = (0, react_1.useMemo)(() => (0, cn_1.cn)(className, {
|
|
44
44
|
[constants_1.textFieldClassnames.hideHelperText]: hideHelperText,
|
|
45
45
|
[constants_1.textFieldClassnames.disabled]: disabled,
|
|
46
46
|
}), [className, hideHelperText, disabled]);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Tooltip = 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");
|
|
@@ -17,5 +17,5 @@ const tooltipCva = (0, cva_1.cva)(constants_1.tooltipClassnames.root, {
|
|
|
17
17
|
});
|
|
18
18
|
exports.Tooltip = (0, react_1.forwardRef)((props, ref) => {
|
|
19
19
|
const { title, placement = 'top', size = 'medium', withoutContainer = true, children, className, tooltipStyle, width, ...restProps } = (0, useLogic_1.useLogic)(props);
|
|
20
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: (0,
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledTooltip, { ref: ref, title: title, size: size, placement: placement, arrow: true, className: (0, cn_1.cn)(className, tooltipCva({ withoutMaxWidth: Boolean(width) })), style: tooltipStyle, ...restProps, children: withoutContainer ? (children) : ((0, jsx_runtime_1.jsx)(styles_1.ContentWrapper, { className: constants_1.tooltipClassnames.contentWrapper, children: children })) }));
|
|
21
21
|
});
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const personalDataSecurity_1 = require("../../personalDataSecurity");
|
|
5
|
-
const
|
|
5
|
+
const cn_1 = require("../../utils/cn");
|
|
6
6
|
const useLogic = (props) => {
|
|
7
7
|
const { children, className: propClassName, width, style, ...restProps } = props;
|
|
8
8
|
const hidePersonalDataClassName = (0, personalDataSecurity_1.useHidePersonalData)({
|
|
9
9
|
type: 'container',
|
|
10
10
|
});
|
|
11
|
-
const className = (0,
|
|
11
|
+
const className = (0, cn_1.cn)(propClassName, {
|
|
12
12
|
[hidePersonalDataClassName]: children.props.className?.includes(hidePersonalDataClassName),
|
|
13
13
|
});
|
|
14
14
|
const tooltipStyle = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TreeList = 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 TreeItem_1 = require("./TreeItem");
|
|
@@ -11,6 +11,6 @@ const INITIAL_LEVEL = 0;
|
|
|
11
11
|
const TreeList = (props) => {
|
|
12
12
|
const { listProps, itemProps } = (0, useLogic_1.useLogic)(props);
|
|
13
13
|
const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0,
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0, cn_1.cn)(className, constants_1.treeListClassnames.list), ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
|
|
15
15
|
};
|
|
16
16
|
exports.TreeList = TreeList;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TreeLikeList = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Tree_1 = require("../Tree");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../utils/cn");
|
|
7
7
|
const styles_1 = require("./styles");
|
|
8
8
|
const TreeItem_1 = require("./TreeItem");
|
|
9
9
|
const useLogic_1 = require("./useLogic");
|
|
@@ -11,6 +11,6 @@ const INITIAL_LEVEL = 0;
|
|
|
11
11
|
const TreeLikeList = (props) => {
|
|
12
12
|
const { listProps, itemProps } = (0, useLogic_1.useLogic)(props);
|
|
13
13
|
const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
|
|
14
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0,
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: (0, cn_1.cn)(className, Tree_1.treeListClassnames.list), ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
|
|
15
15
|
};
|
|
16
16
|
exports.TreeLikeList = TreeLikeList;
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Typography = 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 hooks_1 = require("./hooks");
|
|
@@ -20,5 +20,5 @@ const typographyCva = (0, cva_1.cva)(constants_1.typographyClassnames.root, {
|
|
|
20
20
|
});
|
|
21
21
|
exports.Typography = (0, react_1.forwardRef)(({ children, color, colorIntensity = '800', component, withoutCalt, className, isTabularNums, ...props }, ref) => {
|
|
22
22
|
const typographyColor = (0, hooks_1.useTypographyColor)({ color, colorIntensity });
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.TypographyWrapper, { ref: ref, ...props, component: component, color: typographyColor, className: (0,
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.TypographyWrapper, { ref: ref, ...props, component: component, color: typographyColor, className: (0, cn_1.cn)(typographyCva({ isTabularNums, withoutCalt }), className), children: children }));
|
|
24
24
|
});
|
|
@@ -4,7 +4,7 @@ exports.LoadingPlaceholder = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Loader_1 = require("../../Loader");
|
|
6
6
|
const Typography_1 = require("../../Typography");
|
|
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
|
/**
|
|
@@ -12,11 +12,11 @@ const styles_1 = require("./styles");
|
|
|
12
12
|
*/
|
|
13
13
|
const LoadingPlaceholder = ({ title, content, isShowLoader = true, className, }) => {
|
|
14
14
|
if (!isShowLoader) {
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0,
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, cn_1.cn)(constants_1.loadingPlaceholderClassnames.root, className) }));
|
|
16
16
|
}
|
|
17
17
|
if (content) {
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0,
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.LoadingContainer, { className: (0, cn_1.cn)(constants_1.loadingPlaceholderClassnames.root, className), children: content }));
|
|
19
19
|
}
|
|
20
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.LoadingContainer, { className: (0,
|
|
20
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.LoadingContainer, { className: (0, cn_1.cn)(constants_1.loadingPlaceholderClassnames.root, className), children: [(0, jsx_runtime_1.jsx)(Loader_1.Loader, {}), title && (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "h4", children: title })] }));
|
|
21
21
|
};
|
|
22
22
|
exports.LoadingPlaceholder = LoadingPlaceholder;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as classNames } from '
|
|
1
|
+
export { default as classNames } from 'clsx';
|
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.classNames = void 0;
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "classNames", { enumerable: true, get: function () { return __importDefault(
|
|
7
|
+
var clsx_1 = require("clsx");
|
|
8
|
+
Object.defineProperty(exports, "classNames", { enumerable: true, get: function () { return __importDefault(clsx_1).default; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as cn } from 'clsx';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.cn = void 0;
|
|
7
|
+
var clsx_1 = require("clsx");
|
|
8
|
+
Object.defineProperty(exports, "cn", { enumerable: true, get: function () { return __importDefault(clsx_1).default; } });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cn';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cn"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cn';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cn"), exports);
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.EditableText = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Tooltip_1 = require("../../components/Tooltip");
|
|
6
|
-
const
|
|
6
|
+
const cn_1 = require("../../components/utils/cn");
|
|
7
7
|
const constants_1 = require("./constants");
|
|
8
8
|
const EditingForm_1 = require("./EditingForm");
|
|
9
9
|
const styles_1 = require("./styles");
|
|
@@ -26,7 +26,7 @@ const EditableText = (props) => {
|
|
|
26
26
|
if (showEditIconMode === 'none') {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.StyledEditIcon, { "$iconPosition": iconPosition, className: (0,
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.StyledEditIcon, { "$iconPosition": iconPosition, className: (0, cn_1.cn)({
|
|
30
30
|
[constants_1.editableTextClassnames.showIconOnHover]: showEditIconMode === 'onHover',
|
|
31
31
|
}) }));
|
|
32
32
|
};
|
|
@@ -4,7 +4,7 @@ exports.useLogic = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const react_hook_form_1 = require("react-hook-form");
|
|
6
6
|
const useViewportType_1 = require("../../../../components/useViewportType");
|
|
7
|
-
const
|
|
7
|
+
const cn_1 = require("../../../../components/utils/cn");
|
|
8
8
|
const constants_1 = require("../../../FormFiltersSearchField/constants");
|
|
9
9
|
const constants_2 = require("../../../FormQuickFilters/constants");
|
|
10
10
|
const constants_3 = require("../../constants");
|
|
@@ -37,7 +37,7 @@ const useLogic = ({ form, onOpenModal, hasMainFilters, hasSecondaryFilters, hasS
|
|
|
37
37
|
return (filledValuesCount - (searchValue ? 1 : 0) - (quickFiltersValue ? 1 : 0));
|
|
38
38
|
};
|
|
39
39
|
const allFiltersButtonClassName = (0, react_1.useMemo)(() => {
|
|
40
|
-
return (0,
|
|
40
|
+
return (0, cn_1.cn)({
|
|
41
41
|
[constants_3.formFiltersClassnames.showAllFiltersButtonOnDesktop]: hasSecondaryFilters,
|
|
42
42
|
[constants_3.formFiltersClassnames.showAllFiltersButtonOnLaptop]: hasMainFilters || hasSecondaryFilters,
|
|
43
43
|
[constants_3.formFiltersClassnames.showAllFiltersButtonOnMobile]: hasMainFilters || hasSecondaryFilters,
|