@astral/ui 4.120.0 → 4.121.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/DataGrid/Cell/useLogic/useLogic.js +8 -2
- package/components/DataGrid/types.d.ts +1 -1
- package/components/DataGrid/utils/getGridTemplateColumns/getGridTemplateColumns.js +1 -1
- package/components/Dialog/Dialog.d.ts +1 -1
- package/components/Dialog/Dialog.js +20 -4
- package/components/Dialog/constants.d.ts +7 -0
- package/components/Dialog/constants.js +7 -0
- package/components/Dialog/styles.d.ts +0 -4
- package/components/Dialog/styles.js +48 -9
- package/components/Dialog/types.d.ts +9 -1
- package/components/Dialog/useLogic/useLogic.d.ts +6 -3
- package/components/Dialog/useLogic/useLogic.js +9 -1
- package/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +2 -0
- package/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +0 -4
- package/components/TreeAsyncAutocomplete/OptionsModal/styles.js +3 -27
- package/components/TreeAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/components/TreeAutocomplete/OptionsModal/styles.d.ts +2 -4
- package/components/TreeAutocomplete/OptionsModal/styles.js +25 -10
- package/components/TreeAutocomplete/index.d.ts +1 -0
- package/components/TreeAutocomplete/index.js +1 -0
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +0 -4
- package/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +7 -23
- package/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +0 -4
- package/components/TreeLikeAutocomplete/OptionsModal/styles.js +3 -27
- package/components/fileUploading/services/MimeTypeRegistry/constants.js +1 -1
- package/components/utils/getCssSize/getCssSize.d.ts +4 -0
- package/components/utils/getCssSize/getCssSize.js +4 -0
- package/components/utils/getCssSize/index.d.ts +1 -0
- package/components/utils/getCssSize/index.js +1 -0
- package/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +2 -0
- package/node/components/DataGrid/Cell/useLogic/useLogic.js +8 -2
- package/node/components/DataGrid/types.d.ts +1 -1
- package/node/components/DataGrid/utils/getGridTemplateColumns/getGridTemplateColumns.js +1 -1
- package/node/components/Dialog/Dialog.d.ts +1 -1
- package/node/components/Dialog/Dialog.js +20 -4
- package/node/components/Dialog/constants.d.ts +7 -0
- package/node/components/Dialog/constants.js +7 -0
- package/node/components/Dialog/styles.d.ts +0 -4
- package/node/components/Dialog/styles.js +48 -9
- package/node/components/Dialog/types.d.ts +9 -1
- package/node/components/Dialog/useLogic/useLogic.d.ts +6 -3
- package/node/components/Dialog/useLogic/useLogic.js +9 -1
- package/node/components/Onboarding/ui/StepStrategy/steps/StandaloneStep/styles.d.ts +2 -0
- package/node/components/TreeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.d.ts +0 -4
- package/node/components/TreeAsyncAutocomplete/OptionsModal/styles.js +3 -27
- package/node/components/TreeAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/node/components/TreeAutocomplete/OptionsModal/styles.d.ts +2 -4
- package/node/components/TreeAutocomplete/OptionsModal/styles.js +25 -9
- package/node/components/TreeAutocomplete/index.d.ts +1 -0
- package/node/components/TreeAutocomplete/index.js +3 -1
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.d.ts +0 -4
- package/node/components/TreeLikeAsyncAutocomplete/OptionsModal/styles.js +6 -22
- package/node/components/TreeLikeAutocomplete/OptionsModal/OptionsModal.js +1 -1
- package/node/components/TreeLikeAutocomplete/OptionsModal/styles.d.ts +0 -4
- package/node/components/TreeLikeAutocomplete/OptionsModal/styles.js +3 -27
- package/node/components/fileUploading/services/MimeTypeRegistry/constants.js +1 -1
- package/node/components/utils/getCssSize/getCssSize.d.ts +4 -0
- package/node/components/utils/getCssSize/getCssSize.js +8 -0
- package/node/components/utils/getCssSize/index.d.ts +1 -0
- package/node/components/utils/getCssSize/index.js +5 -0
- package/node/hook-form/FormFilters/FormFiltersDialog/styles.d.ts +2 -0
- package/package.json +1 -1
|
@@ -13,8 +13,14 @@ const useLogic = ({ row, href, target, cell, emptyCellValue, startAdornment, })
|
|
|
13
13
|
return Boolean(value) || value === 0;
|
|
14
14
|
};
|
|
15
15
|
const formattedValue = (0, react_1.useMemo)(() => {
|
|
16
|
-
if (format
|
|
17
|
-
|
|
16
|
+
if (format) {
|
|
17
|
+
const value = format(row);
|
|
18
|
+
if (isValidValue(value)) {
|
|
19
|
+
return value;
|
|
20
|
+
}
|
|
21
|
+
if (field && typeof row[field] === 'object') {
|
|
22
|
+
return emptyCellValue;
|
|
23
|
+
}
|
|
18
24
|
}
|
|
19
25
|
if (field && isValidValue(row[field])) {
|
|
20
26
|
return row[field];
|
|
@@ -332,7 +332,7 @@ export type DataGridSingleColumn<TData extends Record<string, CellValue>> = {
|
|
|
332
332
|
align?: AlignVariant;
|
|
333
333
|
/**
|
|
334
334
|
* @example {width: '100%'}
|
|
335
|
-
* Ширина
|
|
335
|
+
* Ширина ячейки. Допустимые значения: число (преобразуется в px) или строка с единицами px, %, fr
|
|
336
336
|
*/
|
|
337
337
|
width?: CSSProperties['width'];
|
|
338
338
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getGridTemplateColumns = void 0;
|
|
4
4
|
const getGridTemplateColumns = (columns) => {
|
|
5
5
|
const columnsWidth = columns.map(({ width, minWidth }) => {
|
|
6
|
-
const maxWidth = width || '1fr';
|
|
6
|
+
const maxWidth = typeof width === 'number' ? `${width}px` : width || '1fr';
|
|
7
7
|
if (minWidth) {
|
|
8
8
|
return `minmax(${minWidth}, ${maxWidth})`;
|
|
9
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { DialogProps } from './types';
|
|
2
|
-
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, size, headerContent, className, classes, disableMobileDrawer, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Dialog: ({ children, title, disableBackdropClick, onClose, size, headerContent, className, classes, disableMobileDrawer, height, width, style, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -11,21 +11,37 @@ const styles_1 = require("./styles");
|
|
|
11
11
|
const useLogic_1 = require("./useLogic");
|
|
12
12
|
const dialogCva = (0, cva_1.cva)(constants_1.dialogClassnames.root, {
|
|
13
13
|
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
xs: constants_1.dialogClassnames.sizeXs,
|
|
16
|
+
sm: constants_1.dialogClassnames.sizeSm,
|
|
17
|
+
md: constants_1.dialogClassnames.sizeMd,
|
|
18
|
+
lg: constants_1.dialogClassnames.sizeLg,
|
|
19
|
+
xl: constants_1.dialogClassnames.sizeXl,
|
|
20
|
+
},
|
|
21
|
+
hasCustomWidth: { true: constants_1.dialogClassnames.withCustomWidth },
|
|
22
|
+
hasCustomHeight: { true: constants_1.dialogClassnames.withCustomHeight },
|
|
14
23
|
withoutTitle: {
|
|
15
24
|
true: constants_1.dialogClassnames.withoutTitle,
|
|
16
25
|
},
|
|
17
26
|
},
|
|
18
27
|
});
|
|
19
|
-
const Dialog = ({ children, title, disableBackdropClick, onClose, size = 'md', headerContent, className, classes, disableMobileDrawer, ...props }) => {
|
|
20
|
-
const { handleClose, shouldRenderDrawer, dialogClasses } = (0, useLogic_1.useLogic)({
|
|
28
|
+
const Dialog = ({ children, title, disableBackdropClick, onClose, size = 'md', headerContent, className, classes, disableMobileDrawer, height, width, style, ...props }) => {
|
|
29
|
+
const { handleClose, shouldRenderDrawer, dialogClasses, dialogCssVars, hasCustomWidth, hasCustomHeight, } = (0, useLogic_1.useLogic)({
|
|
21
30
|
onClose,
|
|
22
31
|
disableBackdropClick,
|
|
23
32
|
classes,
|
|
24
33
|
disableMobileDrawer,
|
|
34
|
+
height,
|
|
35
|
+
width,
|
|
25
36
|
});
|
|
26
37
|
if (shouldRenderDrawer) {
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { onClose: handleClose, title: title, headerContent: headerContent, className: className, ...props, children: children }));
|
|
38
|
+
return ((0, jsx_runtime_1.jsx)(BottomDrawer_1.BottomDrawer, { onClose: handleClose, title: title, headerContent: headerContent, className: className, style: style, ...props, children: children }));
|
|
28
39
|
}
|
|
29
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.StyledDialog, {
|
|
40
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.StyledDialog, { onClose: handleClose, className: (0, cn_1.cn)(dialogCva({
|
|
41
|
+
withoutTitle: !title,
|
|
42
|
+
size,
|
|
43
|
+
hasCustomWidth,
|
|
44
|
+
hasCustomHeight,
|
|
45
|
+
}), className), classes: dialogClasses, ...props, style: { ...dialogCssVars, ...style }, children: [title && ((0, jsx_runtime_1.jsx)(DialogTitle_1.DialogTitle, { onClose: onClose, headerContent: headerContent, children: title })), children] }));
|
|
30
46
|
};
|
|
31
47
|
exports.Dialog = Dialog;
|
|
@@ -24,4 +24,11 @@ export declare const dialogClassnames: {
|
|
|
24
24
|
root: string;
|
|
25
25
|
withoutTitle: string;
|
|
26
26
|
paper: string;
|
|
27
|
+
sizeXs: string;
|
|
28
|
+
sizeSm: string;
|
|
29
|
+
sizeMd: string;
|
|
30
|
+
sizeLg: string;
|
|
31
|
+
sizeXl: string;
|
|
32
|
+
withCustomWidth: string;
|
|
33
|
+
withCustomHeight: string;
|
|
27
34
|
};
|
|
@@ -13,4 +13,11 @@ exports.dialogClassnames = {
|
|
|
13
13
|
root: (0, createUIKitClassname_1.createUIKitClassname)('dialog'),
|
|
14
14
|
withoutTitle: (0, createUIKitClassname_1.createUIKitClassname)('dialog_without-title'),
|
|
15
15
|
paper: (0, createUIKitClassname_1.createUIKitClassname)('dialog__paper'),
|
|
16
|
+
sizeXs: (0, createUIKitClassname_1.createUIKitClassname)('dialog_size-xs'),
|
|
17
|
+
sizeSm: (0, createUIKitClassname_1.createUIKitClassname)('dialog_size-sm'),
|
|
18
|
+
sizeMd: (0, createUIKitClassname_1.createUIKitClassname)('dialog_size-md'),
|
|
19
|
+
sizeLg: (0, createUIKitClassname_1.createUIKitClassname)('dialog_size-lg'),
|
|
20
|
+
sizeXl: (0, createUIKitClassname_1.createUIKitClassname)('dialog_size-xl'),
|
|
21
|
+
withCustomWidth: (0, createUIKitClassname_1.createUIKitClassname)('dialog_with-custom-width'),
|
|
22
|
+
withCustomHeight: (0, createUIKitClassname_1.createUIKitClassname)('dialog_with-custom-height'),
|
|
16
23
|
};
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
2
1
|
export declare const StyledDialog: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("@mui/material/Dialog").DialogProps & {
|
|
3
2
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
} & {
|
|
5
|
-
$size: DialogSize;
|
|
6
3
|
}, {}, {}>;
|
|
7
|
-
export {};
|
|
@@ -10,12 +10,37 @@ const DialogActions_1 = require("../DialogActions");
|
|
|
10
10
|
const DialogContent_1 = require("../DialogContent");
|
|
11
11
|
const styled_1 = require("../styled");
|
|
12
12
|
const constants_1 = require("./constants");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
exports.StyledDialog = (0, styled_1.styled)(Dialog_1.default) `
|
|
14
|
+
--dialog-width: auto;
|
|
15
|
+
--dialog-height: auto;
|
|
16
|
+
--dialog-min-width: ${constants_1.DIALOG_SIZES.md.minWidth};
|
|
17
|
+
--dialog-max-width: ${constants_1.DIALOG_SIZES.md.maxWidth};
|
|
18
|
+
|
|
19
|
+
&.${constants_1.dialogClassnames.sizeXs} {
|
|
20
|
+
--dialog-min-width: ${constants_1.DIALOG_SIZES.xs.minWidth};
|
|
21
|
+
--dialog-max-width: ${constants_1.DIALOG_SIZES.xs.maxWidth};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.${constants_1.dialogClassnames.sizeSm} {
|
|
25
|
+
--dialog-min-width: ${constants_1.DIALOG_SIZES.sm.minWidth};
|
|
26
|
+
--dialog-max-width: ${constants_1.DIALOG_SIZES.sm.maxWidth};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.${constants_1.dialogClassnames.sizeMd} {
|
|
30
|
+
--dialog-min-width: ${constants_1.DIALOG_SIZES.md.minWidth};
|
|
31
|
+
--dialog-max-width: ${constants_1.DIALOG_SIZES.md.maxWidth};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.${constants_1.dialogClassnames.sizeLg} {
|
|
35
|
+
--dialog-min-width: ${constants_1.DIALOG_SIZES.lg.minWidth};
|
|
36
|
+
--dialog-max-width: ${constants_1.DIALOG_SIZES.lg.maxWidth};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.${constants_1.dialogClassnames.sizeXl} {
|
|
40
|
+
--dialog-min-width: ${constants_1.DIALOG_SIZES.xl.minWidth};
|
|
41
|
+
--dialog-max-width: ${constants_1.DIALOG_SIZES.xl.maxWidth};
|
|
42
|
+
}
|
|
43
|
+
|
|
19
44
|
&.${constants_1.dialogClassnames.root} .${Backdrop_1.backdropClasses.root} {
|
|
20
45
|
background-color: ${({ theme }) => theme.palette.background.modalShadow};
|
|
21
46
|
}
|
|
@@ -27,8 +52,8 @@ exports.StyledDialog = (0, styled_1.styled)(Dialog_1.default, {
|
|
|
27
52
|
}
|
|
28
53
|
|
|
29
54
|
.${constants_1.dialogClassnames.paper} {
|
|
30
|
-
min-width:
|
|
31
|
-
max-width:
|
|
55
|
+
min-width: var(--dialog-min-width);
|
|
56
|
+
max-width: var(--dialog-max-width);
|
|
32
57
|
|
|
33
58
|
border-radius: calc(${({ theme }) => theme.shape.medium} * 2);
|
|
34
59
|
box-shadow: ${({ theme }) => theme.elevation[300]};
|
|
@@ -42,9 +67,23 @@ exports.StyledDialog = (0, styled_1.styled)(Dialog_1.default, {
|
|
|
42
67
|
}
|
|
43
68
|
}
|
|
44
69
|
|
|
70
|
+
&.${constants_1.dialogClassnames.withCustomWidth} .${constants_1.dialogClassnames.paper} {
|
|
71
|
+
${({ theme }) => theme.breakpoints.up('mobile')} {
|
|
72
|
+
width: var(--dialog-width);
|
|
73
|
+
min-width: auto;
|
|
74
|
+
max-width: calc(100% - ${({ theme }) => theme.spacing(16)});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&.${constants_1.dialogClassnames.withCustomHeight} .${constants_1.dialogClassnames.paper} {
|
|
79
|
+
${({ theme }) => theme.breakpoints.up('mobile')} {
|
|
80
|
+
height: var(--dialog-height);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
45
84
|
/* Причина игнора: Не критично для отображения */
|
|
46
85
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
47
86
|
&:not(:has(.${DialogActions_1.dialogActionsClassnames.root})) .${DialogContent_1.dialogContentClassnames.root} {
|
|
48
|
-
padding-bottom:
|
|
87
|
+
padding-bottom: ${({ theme }) => theme.spacing(6)};
|
|
49
88
|
}
|
|
50
89
|
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DialogProps as MuiDialogProps } from '@mui/material/Dialog';
|
|
2
|
-
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import { type CSSProperties, type ReactElement, type ReactNode } from 'react';
|
|
3
3
|
import { type WithoutEmotionSpecific } from '../types/WithoutEmotionSpecific';
|
|
4
4
|
export type DialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
5
5
|
export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title' | 'maxWidth'>> & {
|
|
@@ -16,6 +16,14 @@ export type DialogProps = WithoutEmotionSpecific<Omit<MuiDialogProps, 'title' |
|
|
|
16
16
|
* @default md
|
|
17
17
|
*/
|
|
18
18
|
size?: DialogSize;
|
|
19
|
+
/**
|
|
20
|
+
* Высота всего окна, включая заголовок и действия: число в px или CSS-значение.
|
|
21
|
+
*/
|
|
22
|
+
height?: CSSProperties['height'];
|
|
23
|
+
/**
|
|
24
|
+
* Ширина всего окна: число в px или CSS-значение. Переопределяет size.
|
|
25
|
+
*/
|
|
26
|
+
width?: CSSProperties['width'];
|
|
19
27
|
/**
|
|
20
28
|
* Дополнительный контент хедера
|
|
21
29
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { type MouseEvent } from 'react';
|
|
1
|
+
import { type CSSProperties, type MouseEvent } from 'react';
|
|
2
2
|
import { type DialogProps } from '../types';
|
|
3
|
-
type UseLogicParams = Pick<DialogProps, 'onClose' | 'disableBackdropClick' | 'classes' | 'disableMobileDrawer'>;
|
|
4
|
-
export declare const useLogic: ({ onClose, disableBackdropClick, classes, disableMobileDrawer, }: UseLogicParams) => {
|
|
3
|
+
type UseLogicParams = Pick<DialogProps, 'onClose' | 'disableBackdropClick' | 'classes' | 'disableMobileDrawer' | 'height' | 'width'>;
|
|
4
|
+
export declare const useLogic: ({ onClose, disableBackdropClick, classes, disableMobileDrawer, height, width, }: UseLogicParams) => {
|
|
5
|
+
dialogCssVars: CSSProperties;
|
|
5
6
|
handleClose: ((event: MouseEvent<HTMLButtonElement>, reason: 'backdropClick' | 'escapeKeyDown') => void) | undefined;
|
|
6
7
|
shouldRenderDrawer: boolean;
|
|
7
8
|
dialogClasses: {
|
|
@@ -21,5 +22,7 @@ export declare const useLogic: ({ onClose, disableBackdropClick, classes, disabl
|
|
|
21
22
|
paperFullScreen?: string | undefined;
|
|
22
23
|
paper: string;
|
|
23
24
|
};
|
|
25
|
+
hasCustomWidth: boolean;
|
|
26
|
+
hasCustomHeight: boolean;
|
|
24
27
|
};
|
|
25
28
|
export {};
|
|
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useLogic = void 0;
|
|
4
4
|
const useViewportType_1 = require("../../useViewportType");
|
|
5
5
|
const cn_1 = require("../../utils/cn");
|
|
6
|
+
const getCssSize_1 = require("../../utils/getCssSize");
|
|
6
7
|
const constants_1 = require("../constants");
|
|
7
|
-
const useLogic = ({ onClose, disableBackdropClick, classes, disableMobileDrawer, }) => {
|
|
8
|
+
const useLogic = ({ onClose, disableBackdropClick, classes, disableMobileDrawer, height, width, }) => {
|
|
8
9
|
const { isMobile } = (0, useViewportType_1.useViewportType)();
|
|
9
10
|
const handleClose = onClose &&
|
|
10
11
|
((event, reason) => {
|
|
@@ -18,10 +19,17 @@ const useLogic = ({ onClose, disableBackdropClick, classes, disableMobileDrawer,
|
|
|
18
19
|
paper: (0, cn_1.cn)(constants_1.dialogClassnames.paper, paper),
|
|
19
20
|
...restClasses,
|
|
20
21
|
};
|
|
22
|
+
const dialogCssVars = {
|
|
23
|
+
'--dialog-width': (0, getCssSize_1.getCssSize)(width),
|
|
24
|
+
'--dialog-height': (0, getCssSize_1.getCssSize)(height),
|
|
25
|
+
};
|
|
21
26
|
return {
|
|
27
|
+
dialogCssVars,
|
|
22
28
|
handleClose,
|
|
23
29
|
shouldRenderDrawer: isMobile && !disableMobileDrawer,
|
|
24
30
|
dialogClasses,
|
|
31
|
+
hasCustomWidth: width !== undefined,
|
|
32
|
+
hasCustomHeight: height !== undefined,
|
|
25
33
|
};
|
|
26
34
|
};
|
|
27
35
|
exports.useLogic = useLogic;
|
|
@@ -3,6 +3,8 @@ export declare const StepDialog: import("@emotion/styled/dist/declarations/src/t
|
|
|
3
3
|
title?: string | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>[] | undefined;
|
|
4
4
|
disableBackdropClick?: boolean | undefined;
|
|
5
5
|
size?: import("../../../../../Dialog").DialogSize | undefined;
|
|
6
|
+
height?: import("csstype").Property.Height<string | number> | undefined;
|
|
7
|
+
width?: import("csstype").Property.Width<string | number> | undefined;
|
|
6
8
|
headerContent?: import("react").ReactNode;
|
|
7
9
|
disableMobileDrawer?: boolean | undefined;
|
|
8
10
|
} & {
|
|
@@ -31,6 +31,6 @@ const OptionsModal = (props) => {
|
|
|
31
31
|
}
|
|
32
32
|
return ((0, jsx_runtime_1.jsx)(Tree_1.TreeList, { ...treeProps, ...treeListProps }));
|
|
33
33
|
};
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...modalProps, children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, {
|
|
34
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...modalProps, children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(styles_1.SearchFieldWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledSearchField, { fullWidth: true, ...searchFieldProps, isLoading: isShowSearchFieldLoader, helperText: constants_1.SEARCH_FIELD_HELPER_TEXT }) }), (0, jsx_runtime_1.jsx)(styles_1.StyledPaper, { variant: "outlined", children: (0, jsx_runtime_1.jsxs)(styles_1.TreeListWrapper, { children: [renderComponent(), isShowUserHint && ((0, jsx_runtime_1.jsx)(styles_1.UserHintWrapper, { children: (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: "\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u043B\u0443\u0447\u0448\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430" }) }))] }) })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(styles_1.CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
|
|
35
35
|
};
|
|
36
36
|
exports.OptionsModal = OptionsModal;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
2
|
export declare const StyledDialogContent: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../DialogContent").DialogContentProps & {
|
|
4
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$size: Size;
|
|
7
4
|
}, {}, {}>;
|
|
8
5
|
export declare const TreeListWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
9
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -33,4 +30,3 @@ export declare const UserHintWrapper: import("@emotion/styled/dist/declarations/
|
|
|
33
30
|
theme?: import("@emotion/react").Theme | undefined;
|
|
34
31
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
35
32
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
36
|
-
export {};
|
|
@@ -4,9 +4,7 @@ exports.UserHintWrapper = exports.CancelButton = exports.StyledPaper = exports.S
|
|
|
4
4
|
const FormHelperText_1 = require("@mui/material/FormHelperText");
|
|
5
5
|
const InputBase_1 = require("@mui/material/InputBase");
|
|
6
6
|
const Paper_1 = require("@mui/material/Paper");
|
|
7
|
-
const BottomDrawer_1 = require("../../BottomDrawer");
|
|
8
7
|
const Button_1 = require("../../Button");
|
|
9
|
-
const Dialog_1 = require("../../Dialog");
|
|
10
8
|
const DialogContent_1 = require("../../DialogContent");
|
|
11
9
|
const Loader_1 = require("../../Loader");
|
|
12
10
|
const Paper_2 = require("../../Paper");
|
|
@@ -14,31 +12,9 @@ const SearchField_1 = require("../../SearchField");
|
|
|
14
12
|
const SvgIcon_1 = require("../../SvgIcon");
|
|
15
13
|
const styled_1 = require("../../styled");
|
|
16
14
|
const Tree_1 = require("../../Tree");
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
20
|
-
display: grid;
|
|
21
|
-
grid-template-columns: 100%;
|
|
22
|
-
grid-template-rows: max-content 1fr;
|
|
23
|
-
gap: ${({ theme }) => theme.spacing(4)};
|
|
24
|
-
|
|
25
|
-
width: ${({ $size }) => Dialog_1.DIALOG_SIZES[$size].minWidth};
|
|
26
|
-
height: ${({ $size }) => Dialog_1.DIALOG_SIZES[$size].minWidth};
|
|
27
|
-
|
|
28
|
-
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
29
|
-
gap: ${({ theme }) => theme.spacing(3)};
|
|
30
|
-
|
|
31
|
-
width: auto;
|
|
32
|
-
height: calc(100vh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
33
|
-
padding: 0;
|
|
34
|
-
|
|
35
|
-
/* Причина игнора: Прогрессивное улучшение */
|
|
36
|
-
/* stylelint-disable plugin/no-unsupported-browser-features */
|
|
37
|
-
@supports (height: 100dvh) {
|
|
38
|
-
height: calc(100dvh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
39
|
-
}
|
|
40
|
-
/* stylelint-enable plugin/no-unsupported-browser-features */
|
|
41
|
-
}
|
|
15
|
+
const TreeAutocomplete_1 = require("../../TreeAutocomplete");
|
|
16
|
+
exports.StyledDialogContent = (0, styled_1.styled)(DialogContent_1.DialogContent) `
|
|
17
|
+
${({ theme }) => (0, TreeAutocomplete_1.getOptionsModalContentStyles)(theme)};
|
|
42
18
|
`;
|
|
43
19
|
exports.TreeListWrapper = styled_1.styled.div `
|
|
44
20
|
overflow: auto;
|
|
@@ -27,6 +27,6 @@ const OptionsModal = (props) => {
|
|
|
27
27
|
}
|
|
28
28
|
return (0, jsx_runtime_1.jsx)(Tree_1.TreeList, { ...treeProps, ...treeListProps });
|
|
29
29
|
};
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, {
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(styles_1.SearchFieldWrapper, { children: (0, jsx_runtime_1.jsx)(SearchField_1.SearchField, { fullWidth: true, ...searchFieldProps }) }), (0, jsx_runtime_1.jsx)(styles_1.StyledPaper, { variant: "outlined", children: (0, jsx_runtime_1.jsx)(styles_1.TreeListWrapper, { children: renderComponent() }) })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(styles_1.CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
|
|
31
31
|
};
|
|
32
32
|
exports.OptionsModal = OptionsModal;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type
|
|
2
|
+
import type { Theme } from '../../theme/types';
|
|
3
|
+
export declare const getOptionsModalContentStyles: (theme: Theme) => import("@emotion/utils").SerializedStyles;
|
|
3
4
|
export declare const StyledDialogContent: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../DialogContent").DialogContentProps & {
|
|
4
5
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$size: Size;
|
|
7
6
|
}, {}, {}>;
|
|
8
7
|
export declare const TreeListWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
9
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -26,4 +25,3 @@ export declare const CancelButton: import("@emotion/styled/dist/declarations/src
|
|
|
26
25
|
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
27
26
|
theme?: import("@emotion/react").Theme | undefined;
|
|
28
27
|
}, {}, {}>;
|
|
29
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CancelButton = exports.StyledPaper = exports.SearchFieldWrapper = exports.TreeListWrapper = exports.StyledDialogContent = void 0;
|
|
3
|
+
exports.CancelButton = exports.StyledPaper = exports.SearchFieldWrapper = exports.TreeListWrapper = exports.StyledDialogContent = exports.getOptionsModalContentStyles = void 0;
|
|
4
4
|
const Paper_1 = require("@mui/material/Paper");
|
|
5
5
|
const BottomDrawer_1 = require("../../BottomDrawer");
|
|
6
6
|
const Button_1 = require("../../Button");
|
|
@@ -8,19 +8,17 @@ const Dialog_1 = require("../../Dialog");
|
|
|
8
8
|
const DialogContent_1 = require("../../DialogContent");
|
|
9
9
|
const Paper_2 = require("../../Paper");
|
|
10
10
|
const styled_1 = require("../../styled");
|
|
11
|
-
|
|
12
|
-
shouldForwardProp: (prop) => !['$size'].includes(prop),
|
|
13
|
-
}) `
|
|
11
|
+
const getOptionsModalContentStyles = (theme) => (0, styled_1.css) `
|
|
14
12
|
display: grid;
|
|
15
13
|
grid-template-columns: 100%;
|
|
16
14
|
grid-template-rows: max-content 1fr;
|
|
17
|
-
gap: ${
|
|
15
|
+
gap: ${theme.spacing(4)};
|
|
18
16
|
|
|
19
|
-
width:
|
|
20
|
-
height:
|
|
17
|
+
width: var(--dialog-min-width);
|
|
18
|
+
height: var(--dialog-min-width);
|
|
21
19
|
|
|
22
|
-
${
|
|
23
|
-
gap: ${
|
|
20
|
+
${theme.breakpoints.down('mobile')} {
|
|
21
|
+
gap: ${theme.spacing(3)};
|
|
24
22
|
|
|
25
23
|
width: auto;
|
|
26
24
|
height: calc(100vh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
@@ -33,6 +31,24 @@ exports.StyledDialogContent = (0, styled_1.styled)(DialogContent_1.DialogContent
|
|
|
33
31
|
}
|
|
34
32
|
/* stylelint-enable plugin/no-unsupported-browser-features */
|
|
35
33
|
}
|
|
34
|
+
|
|
35
|
+
${theme.breakpoints.up('mobile')} {
|
|
36
|
+
.${Dialog_1.dialogClassnames.withCustomWidth} & {
|
|
37
|
+
width: auto;
|
|
38
|
+
min-width: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.${Dialog_1.dialogClassnames.withCustomHeight} & {
|
|
42
|
+
grid-template-rows: max-content minmax(0, 1fr);
|
|
43
|
+
|
|
44
|
+
height: auto;
|
|
45
|
+
min-height: 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
exports.getOptionsModalContentStyles = getOptionsModalContentStyles;
|
|
50
|
+
exports.StyledDialogContent = (0, styled_1.styled)(DialogContent_1.DialogContent) `
|
|
51
|
+
${({ theme }) => (0, exports.getOptionsModalContentStyles)(theme)};
|
|
36
52
|
`;
|
|
37
53
|
exports.TreeListWrapper = styled_1.styled.div `
|
|
38
54
|
overflow: auto;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TreeAutocomplete = void 0;
|
|
3
|
+
exports.TreeAutocomplete = exports.getOptionsModalContentStyles = void 0;
|
|
4
|
+
var styles_1 = require("./OptionsModal/styles");
|
|
5
|
+
Object.defineProperty(exports, "getOptionsModalContentStyles", { enumerable: true, get: function () { return styles_1.getOptionsModalContentStyles; } });
|
|
4
6
|
var TreeAutocomplete_1 = require("./TreeAutocomplete");
|
|
5
7
|
Object.defineProperty(exports, "TreeAutocomplete", { enumerable: true, get: function () { return TreeAutocomplete_1.TreeAutocomplete; } });
|
|
@@ -33,6 +33,6 @@ const OptionsModal = (props) => {
|
|
|
33
33
|
}
|
|
34
34
|
return ((0, jsx_runtime_1.jsx)(styles_1.TreeViewSlot, { children: (0, jsx_runtime_1.jsx)(TreeLikeList_1.TreeLikeList, { ...treeProps, ...(isShowSelectedTree ? selectedTreeProps : treeListProps) }, isShowSelectedTree ? 'selected-tree' : 'options-tree') }));
|
|
35
35
|
};
|
|
36
|
-
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...modalProps, headerContent: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.ResetButton, { variant: "text", color: "primary", ...resetButtonProps, children: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C" }), modalProps.headerContent] }), children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, {
|
|
36
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...modalProps, headerContent: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.ResetButton, { variant: "text", color: "primary", ...resetButtonProps, children: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C" }), modalProps.headerContent] }), children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(styles_1.SearchFieldWrapper, { children: (0, jsx_runtime_1.jsx)(styles_1.StyledSearchField, { fullWidth: true, ...searchFieldProps, isLoading: isShowSearchFieldLoader, helperText: constants_1.SEARCH_FIELD_HELPER_TEXT }) }), (0, jsx_runtime_1.jsx)(styles_1.CheckableTagWrapper, { children: (0, jsx_runtime_1.jsx)(CheckableTag_1.CheckableTag, { ...checkableTagProps, endAddon: (badgeProps) => ((0, jsx_runtime_1.jsx)(TagBadge_1.TagBadge, { ...badgeProps, badgeContent: badgeContent, showZero: true })) }) }), (0, jsx_runtime_1.jsx)(styles_1.StyledPaper, { variant: "outlined", children: (0, jsx_runtime_1.jsxs)(styles_1.TreeListWrapper, { children: [renderComponent(), isShowUserHint && ((0, jsx_runtime_1.jsx)(styles_1.UserHintWrapper, { children: (0, jsx_runtime_1.jsx)(Typography_1.Typography, { variant: "caption", color: "grey", colorIntensity: "600", children: "\u0423\u0442\u043E\u0447\u043D\u0438\u0442\u0435 \u0437\u0430\u043F\u0440\u043E\u0441 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u043B\u0443\u0447\u0448\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430" }) }))] }) })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(styles_1.CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
|
|
37
37
|
};
|
|
38
38
|
exports.OptionsModal = OptionsModal;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
2
|
export declare const StyledDialogContent: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../DialogContent").DialogContentProps & {
|
|
4
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$size: Size;
|
|
7
4
|
}, {}, {}>;
|
|
8
5
|
export declare const TreeListWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
9
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -51,4 +48,3 @@ export declare const UserHintWrapper: import("@emotion/styled/dist/declarations/
|
|
|
51
48
|
theme?: import("@emotion/react").Theme | undefined;
|
|
52
49
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
53
50
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
54
|
-
export {};
|
|
@@ -4,7 +4,6 @@ exports.UserHintWrapper = exports.ResetButton = exports.CancelButton = exports.S
|
|
|
4
4
|
const FormHelperText_1 = require("@mui/material/FormHelperText");
|
|
5
5
|
const InputBase_1 = require("@mui/material/InputBase");
|
|
6
6
|
const Paper_1 = require("@mui/material/Paper");
|
|
7
|
-
const BottomDrawer_1 = require("../../BottomDrawer");
|
|
8
7
|
const Button_1 = require("../../Button");
|
|
9
8
|
const Dialog_1 = require("../../Dialog");
|
|
10
9
|
const DialogContent_1 = require("../../DialogContent");
|
|
@@ -15,30 +14,15 @@ const SvgIcon_1 = require("../../SvgIcon");
|
|
|
15
14
|
const styled_1 = require("../../styled");
|
|
16
15
|
const Tag_1 = require("../../Tag");
|
|
17
16
|
const Tree_1 = require("../../Tree");
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
display: grid;
|
|
22
|
-
grid-template-columns: 100%;
|
|
17
|
+
const TreeAutocomplete_1 = require("../../TreeAutocomplete");
|
|
18
|
+
exports.StyledDialogContent = (0, styled_1.styled)(DialogContent_1.DialogContent) `
|
|
19
|
+
${({ theme }) => (0, TreeAutocomplete_1.getOptionsModalContentStyles)(theme)};
|
|
23
20
|
grid-template-rows: max-content 32px 1fr;
|
|
24
|
-
gap: ${({ theme }) => theme.spacing(4)};
|
|
25
21
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
30
|
-
gap: ${({ theme }) => theme.spacing(3)};
|
|
31
|
-
|
|
32
|
-
width: auto;
|
|
33
|
-
height: calc(100vh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
34
|
-
padding: 0;
|
|
35
|
-
|
|
36
|
-
/* Причина игнора: Прогрессивное улучшение */
|
|
37
|
-
/* stylelint-disable plugin/no-unsupported-browser-features */
|
|
38
|
-
@supports (height: 100dvh) {
|
|
39
|
-
height: calc(100dvh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
22
|
+
${({ theme }) => theme.breakpoints.up('mobile')} {
|
|
23
|
+
.${Dialog_1.dialogClassnames.withCustomHeight} & {
|
|
24
|
+
grid-template-rows: max-content 32px minmax(0, 1fr);
|
|
40
25
|
}
|
|
41
|
-
/* stylelint-enable plugin/no-unsupported-browser-features */
|
|
42
26
|
}
|
|
43
27
|
`;
|
|
44
28
|
exports.TreeListWrapper = styled_1.styled.div `
|
|
@@ -27,6 +27,6 @@ const OptionsModal = (props) => {
|
|
|
27
27
|
}
|
|
28
28
|
return ((0, jsx_runtime_1.jsx)(TreeLikeList_1.TreeLikeList, { isConfirmChildrenSelection: isConfirmChildrenSelection, ...treeProps, ...treeLikeListProps }));
|
|
29
29
|
};
|
|
30
|
-
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, headerContent: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.ResetButton, { variant: "text", color: "primary", ...resetButtonProps, children: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C" }), headerContent] }), children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, {
|
|
30
|
+
return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, { ...externalDialogProps, disableRestoreFocus: true, open: isOpen, ...modalProps, headerContent: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.ResetButton, { variant: "text", color: "primary", ...resetButtonProps, children: "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C" }), headerContent] }), children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledDialogContent, { children: [(0, jsx_runtime_1.jsx)(styles_1.SearchFieldWrapper, { children: (0, jsx_runtime_1.jsx)(SearchField_1.SearchField, { fullWidth: true, ...searchFieldProps }) }), (0, jsx_runtime_1.jsx)(styles_1.StyledPaper, { variant: "outlined", children: (0, jsx_runtime_1.jsx)(styles_1.TreeListWrapper, { children: renderComponent() }) })] }), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [(0, jsx_runtime_1.jsx)(styles_1.CancelButton, { variant: "text", ...cancelButtonProps, children: "\u041E\u0442\u043C\u0435\u043D\u0430" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { ...confirmButtonProps, children: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C" })] })] }));
|
|
31
31
|
};
|
|
32
32
|
exports.OptionsModal = OptionsModal;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
2
|
export declare const StyledDialogContent: import("@emotion/styled/dist/declarations/src/types").StyledComponent<import("../../DialogContent").DialogContentProps & {
|
|
4
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
$size: Size;
|
|
7
4
|
}, {}, {}>;
|
|
8
5
|
export declare const TreeListWrapper: import("@emotion/styled/dist/declarations/src/types").StyledComponent<{
|
|
9
6
|
theme?: import("@emotion/react").Theme | undefined;
|
|
@@ -36,4 +33,3 @@ export declare const ResetButton: import("@emotion/styled/dist/declarations/src/
|
|
|
36
33
|
} & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, ""> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
37
34
|
theme?: import("@emotion/react").Theme | undefined;
|
|
38
35
|
}, {}, {}>;
|
|
39
|
-
export {};
|
|
@@ -2,37 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ResetButton = exports.CancelButton = exports.StyledPaper = exports.SearchFieldWrapper = exports.TreeListWrapper = exports.StyledDialogContent = void 0;
|
|
4
4
|
const Paper_1 = require("@mui/material/Paper");
|
|
5
|
-
const BottomDrawer_1 = require("../../BottomDrawer");
|
|
6
5
|
const Button_1 = require("../../Button");
|
|
7
|
-
const Dialog_1 = require("../../Dialog");
|
|
8
6
|
const DialogContent_1 = require("../../DialogContent");
|
|
9
7
|
const Paper_2 = require("../../Paper");
|
|
10
8
|
const styled_1 = require("../../styled");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
})
|
|
14
|
-
display: grid;
|
|
15
|
-
grid-template-columns: 100%;
|
|
16
|
-
grid-template-rows: max-content 1fr;
|
|
17
|
-
gap: ${({ theme }) => theme.spacing(4)};
|
|
18
|
-
|
|
19
|
-
width: ${({ $size }) => Dialog_1.DIALOG_SIZES[$size].minWidth};
|
|
20
|
-
height: ${({ $size }) => Dialog_1.DIALOG_SIZES[$size].minWidth};
|
|
21
|
-
|
|
22
|
-
${({ theme }) => theme.breakpoints.down('mobile')} {
|
|
23
|
-
gap: ${({ theme }) => theme.spacing(3)};
|
|
24
|
-
|
|
25
|
-
width: auto;
|
|
26
|
-
height: calc(100vh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
27
|
-
padding: 0;
|
|
28
|
-
|
|
29
|
-
/* Причина игнора: Прогрессивное улучшение */
|
|
30
|
-
/* stylelint-disable plugin/no-unsupported-browser-features */
|
|
31
|
-
@supports (height: 100dvh) {
|
|
32
|
-
height: calc(100dvh - ${BottomDrawer_1.OFFSET_TOP_SCREEN} - ${BottomDrawer_1.DEFAULT_HEADER_HEIGHT}px - 72px);
|
|
33
|
-
}
|
|
34
|
-
/* stylelint-enable plugin/no-unsupported-browser-features */
|
|
35
|
-
}
|
|
9
|
+
const TreeAutocomplete_1 = require("../../TreeAutocomplete");
|
|
10
|
+
exports.StyledDialogContent = (0, styled_1.styled)(DialogContent_1.DialogContent) `
|
|
11
|
+
${({ theme }) => (0, TreeAutocomplete_1.getOptionsModalContentStyles)(theme)};
|
|
36
12
|
`;
|
|
37
13
|
exports.TreeListWrapper = styled_1.styled.div `
|
|
38
14
|
overflow: auto;
|
|
@@ -350,7 +350,7 @@ const getMimeTypesMap = () => ({
|
|
|
350
350
|
'video/webm': ['webm'],
|
|
351
351
|
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ['xlsx'],
|
|
352
352
|
'application/vnd.ms-excel': ['xls', 'csv'],
|
|
353
|
-
'application/x-x509-ca-cert': ['cer'],
|
|
353
|
+
'application/x-x509-ca-cert': ['cer', 'crt'],
|
|
354
354
|
'application/x-pkcs7-certificates': ['p7b'],
|
|
355
355
|
'application/sig': ['sig'],
|
|
356
356
|
});
|