@hh.ru/magritte-ui-modal-deprecated 1.0.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/Modal.d.ts +4 -0
- package/Modal.js +272 -0
- package/Modal.js.map +1 -0
- package/ModalContentWithHeader-5W8yMgqD.js +150 -0
- package/ModalContentWithHeader-5W8yMgqD.js.map +1 -0
- package/ModalContentWithHeader.d.ts +8 -0
- package/ModalContentWithHeader.js +15 -0
- package/ModalContentWithHeader.js.map +1 -0
- package/ModalHeader.d.ts +6 -0
- package/ModalHeader.js +48 -0
- package/ModalHeader.js.map +1 -0
- package/index.css +397 -0
- package/index.d.ts +2 -0
- package/index.js +31 -0
- package/index.js.map +1 -0
- package/index.mock.d.ts +2 -0
- package/index.mock.js +9 -0
- package/index.mock.js.map +1 -0
- package/package.json +56 -0
- package/types.d.ts +72 -0
- package/types.js +3 -0
- package/types.js.map +1 -0
- package/useModalOrder.d.ts +2 -0
- package/useModalOrder.js +92 -0
- package/useModalOrder.js.map +1 -0
package/ModalHeader.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { forwardRef, Children, cloneElement } from 'react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import { isIconElement } from '@hh.ru/magritte-ui-icon';
|
|
6
|
+
import { Title } from '@hh.ru/magritte-ui-title';
|
|
7
|
+
|
|
8
|
+
var styles = {"content":"magritte-content___dnhh5_1-0-1","options":"magritte-options___DlTFU_1-0-1","actions":"magritte-actions___r-a0l_1-0-1","actions-with-link":"magritte-actions-with-link___y3-dV_1-0-1","actionsWithLink":"magritte-actions-with-link___y3-dV_1-0-1","content-with-image":"magritte-content-with-image___IwN4b_1-0-1","contentWithImage":"magritte-content-with-image___IwN4b_1-0-1","actions-single":"magritte-actions-single___QaDKO_1-0-1","actionsSingle":"magritte-actions-single___QaDKO_1-0-1","image-container":"magritte-image-container___2MBxK_1-0-1","imageContainer":"magritte-image-container___2MBxK_1-0-1","title-wrapper":"magritte-title-wrapper___XEFse_1-0-1","titleWrapper":"magritte-title-wrapper___XEFse_1-0-1","wrapper":"magritte-wrapper___R4t9N_1-0-1","only-actions":"magritte-only-actions___ypqS-_1-0-1","onlyActions":"magritte-only-actions___ypqS-_1-0-1"};
|
|
9
|
+
|
|
10
|
+
const ModalHeader = forwardRef(({ title, headerImageUrl, headerImage, headerHeight, titleAlignment, titleElement, titleMaxLines, titleSize, titleDescription, titleDescriptionMaxLines, titleStyle, titleDescriptionStyle, options, actions: _actions, actionLink, labelId, wrapperRef, }, ref) => {
|
|
11
|
+
const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;
|
|
12
|
+
const hasHeaderImage = !!headerImageUrl || !!headerImage;
|
|
13
|
+
if (!title && !hasHeaderImage && !actions && !actionLink && !options) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
const withTitle = title && titleElement;
|
|
17
|
+
const withActions = !!actions || !!actionLink;
|
|
18
|
+
const currentTitleStyle = titleStyle || (hasHeaderImage ? 'constant' : 'primary');
|
|
19
|
+
const currentTitleDescriptionStyle = titleDescriptionStyle || (hasHeaderImage ? 'constant' : 'primary');
|
|
20
|
+
const withContent = title || hasHeaderImage || actionLink || actions;
|
|
21
|
+
const onlyActions = !title && !hasHeaderImage && !options && (actions || actionLink);
|
|
22
|
+
return (jsxs("div", { "data-qa": "modal-header", ref: wrapperRef, className: classnames(styles.wrapper, {
|
|
23
|
+
[styles.onlyActions]: onlyActions,
|
|
24
|
+
}), style: hasHeaderImage ? { marginBottom: 24 } : {}, children: [withContent && (jsxs("div", { className: classnames(styles.content, {
|
|
25
|
+
[styles.contentWithImage]: !!hasHeaderImage,
|
|
26
|
+
}), style: hasHeaderImage ? { height: headerHeight } : {}, ref: ref, "data-qa": "modal-header-image", children: [headerImage ? (jsx("div", { className: styles.imageContainer, style: {
|
|
27
|
+
backgroundImage: title ? 'var(--modal-header-gradient)' : '',
|
|
28
|
+
height: headerHeight,
|
|
29
|
+
}, children: headerImage })) : (headerImageUrl && (jsx("div", { className: styles.imageContainer, style: {
|
|
30
|
+
backgroundImage: `${title ? 'var(--modal-header-gradient), ' : ''}url(${headerImageUrl})`,
|
|
31
|
+
height: headerHeight,
|
|
32
|
+
} }))), withTitle && (jsx("div", { className: styles.titleWrapper, children: jsx(Title, { id: labelId, Element: titleElement, alignment: titleAlignment, maxLines: titleMaxLines, size: titleSize, style: currentTitleStyle, description: titleDescription, descriptionMaxLines: titleDescriptionMaxLines, descriptionStyle: currentTitleDescriptionStyle, children: title }) })), withActions && (jsx("div", { className: classnames(styles.actions, {
|
|
33
|
+
[styles.actionsWithLink]: !actions && !!actionLink,
|
|
34
|
+
[styles.actionsSingle]: Array.isArray(actions) ? actions.length === 1 : !!actions,
|
|
35
|
+
}), children: actions
|
|
36
|
+
? Children.toArray(actions).map((item) => isIconElement(item)
|
|
37
|
+
? cloneElement(item, {
|
|
38
|
+
padding: 8,
|
|
39
|
+
borderRadius: 'halfHeight',
|
|
40
|
+
backgroundStyle: undefined,
|
|
41
|
+
})
|
|
42
|
+
: item)
|
|
43
|
+
: actionLink }))] })), options && jsx("div", { className: styles.options, children: options })] }));
|
|
44
|
+
});
|
|
45
|
+
ModalHeader.displayName = 'ModalHeader';
|
|
46
|
+
|
|
47
|
+
export { ModalHeader };
|
|
48
|
+
//# sourceMappingURL=ModalHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalHeader.js","sources":["src/ModalHeader.tsx"],"sourcesContent":["import { forwardRef, RefObject, cloneElement, Children } from 'react';\nimport classnames from 'classnames';\n\nimport { isIconElement } from '@hh.ru/magritte-ui-icon';\nimport { ModalHeaderProps } from '@hh.ru/magritte-ui-modal-deprecated/types';\nimport { Title } from '@hh.ru/magritte-ui-title';\n\nimport styles from './modal-header.less';\n\nexport const ModalHeader = forwardRef<\n HTMLDivElement,\n ModalHeaderProps & { labelId: string; wrapperRef: RefObject<HTMLDivElement> }\n>(\n (\n {\n title,\n headerImageUrl,\n headerImage,\n headerHeight,\n titleAlignment,\n titleElement,\n titleMaxLines,\n titleSize,\n titleDescription,\n titleDescriptionMaxLines,\n titleStyle,\n titleDescriptionStyle,\n options,\n actions: _actions,\n actionLink,\n labelId,\n wrapperRef,\n },\n ref\n ) => {\n const actions = Array.isArray(_actions) ? _actions.slice(0, 5) : _actions;\n const hasHeaderImage = !!headerImageUrl || !!headerImage;\n if (!title && !hasHeaderImage && !actions && !actionLink && !options) {\n return null;\n }\n const withTitle = title && titleElement;\n const withActions = !!actions || !!actionLink;\n const currentTitleStyle = titleStyle || (hasHeaderImage ? 'constant' : 'primary');\n const currentTitleDescriptionStyle = titleDescriptionStyle || (hasHeaderImage ? 'constant' : 'primary');\n const withContent = title || hasHeaderImage || actionLink || actions;\n const onlyActions = !title && !hasHeaderImage && !options && (actions || actionLink);\n\n return (\n <div\n data-qa=\"modal-header\"\n ref={wrapperRef}\n className={classnames(styles.wrapper, {\n [styles.onlyActions]: onlyActions,\n })}\n style={hasHeaderImage ? { marginBottom: 24 } : {}}\n >\n {withContent && (\n <div\n className={classnames(styles.content, {\n [styles.contentWithImage]: !!hasHeaderImage,\n })}\n style={hasHeaderImage ? { height: headerHeight } : {}}\n ref={ref}\n data-qa=\"modal-header-image\"\n >\n {headerImage ? (\n <div\n className={styles.imageContainer}\n style={{\n backgroundImage: title ? 'var(--modal-header-gradient)' : '',\n height: headerHeight,\n }}\n >\n {headerImage}\n </div>\n ) : (\n headerImageUrl && (\n <div\n className={styles.imageContainer}\n style={{\n backgroundImage: `${\n title ? 'var(--modal-header-gradient), ' : ''\n }url(${headerImageUrl})`,\n height: headerHeight,\n }}\n />\n )\n )}\n {withTitle && (\n <div className={styles.titleWrapper}>\n <Title\n id={labelId}\n Element={titleElement}\n alignment={titleAlignment}\n maxLines={titleMaxLines}\n size={titleSize}\n style={currentTitleStyle}\n description={titleDescription}\n descriptionMaxLines={titleDescriptionMaxLines}\n descriptionStyle={currentTitleDescriptionStyle}\n >\n {title}\n </Title>\n </div>\n )}\n {withActions && (\n <div\n className={classnames(styles.actions, {\n [styles.actionsWithLink]: !actions && !!actionLink,\n [styles.actionsSingle]: Array.isArray(actions) ? actions.length === 1 : !!actions,\n })}\n >\n {actions\n ? Children.toArray(actions).map((item) =>\n isIconElement(item)\n ? cloneElement(item, {\n padding: 8,\n borderRadius: 'halfHeight',\n backgroundStyle: undefined,\n })\n : item\n )\n : actionLink}\n </div>\n )}\n </div>\n )}\n {options && <div className={styles.options}>{options}</div>}\n </div>\n );\n }\n);\n\nModalHeader.displayName = 'ModalHeader';\n"],"names":["_jsxs","_jsx"],"mappings":"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"}
|
package/index.css
ADDED
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
:root{
|
|
2
|
+
--magritte-color-component-modal-background-action-v24-7-2:#20262bad;
|
|
3
|
+
--magritte-gradient-component-modal-background-fade-v24-7-2:#00000000 0%, #0000007a 100%;
|
|
4
|
+
}
|
|
5
|
+
.magritte-content___dnhh5_1-0-1{
|
|
6
|
+
display:flex;
|
|
7
|
+
align-items:flex-start;
|
|
8
|
+
}
|
|
9
|
+
.magritte-content___dnhh5_1-0-1 + .magritte-options___DlTFU_1-0-1{
|
|
10
|
+
margin-top:24px;
|
|
11
|
+
}
|
|
12
|
+
.magritte-actions___r-a0l_1-0-1{
|
|
13
|
+
position:relative;
|
|
14
|
+
z-index:1;
|
|
15
|
+
display:flex;
|
|
16
|
+
padding-left:16px;
|
|
17
|
+
gap:4px;
|
|
18
|
+
margin-left:auto;
|
|
19
|
+
--magritte-ui-link-padding-override:9px;
|
|
20
|
+
}
|
|
21
|
+
.magritte-actions-with-link___y3-dV_1-0-1{
|
|
22
|
+
padding:0 8px 0 28px;
|
|
23
|
+
}
|
|
24
|
+
.magritte-content-with-image___IwN4b_1-0-1{
|
|
25
|
+
position:relative;
|
|
26
|
+
flex-direction:column;
|
|
27
|
+
justify-content:flex-end;
|
|
28
|
+
margin:-12px -12px 0;
|
|
29
|
+
border-radius:16px;
|
|
30
|
+
overflow:hidden;
|
|
31
|
+
padding:12px 24px 24px;
|
|
32
|
+
box-sizing:border-box;
|
|
33
|
+
}
|
|
34
|
+
.magritte-content-with-image___IwN4b_1-0-1 .magritte-actions___r-a0l_1-0-1{
|
|
35
|
+
order:-1;
|
|
36
|
+
gap:0;
|
|
37
|
+
margin-right:-16px;
|
|
38
|
+
margin-top:-4px;
|
|
39
|
+
margin-bottom:auto;
|
|
40
|
+
}
|
|
41
|
+
.magritte-content-with-image___IwN4b_1-0-1 .magritte-actions___r-a0l_1-0-1:not(.magritte-actions-with-link___y3-dV_1-0-1){
|
|
42
|
+
padding:0 4px;
|
|
43
|
+
background-color:var(--magritte-color-component-modal-background-action-v24-7-2);
|
|
44
|
+
border-radius:12px;
|
|
45
|
+
}
|
|
46
|
+
.magritte-content-with-image___IwN4b_1-0-1 .magritte-actions___r-a0l_1-0-1.magritte-actions-single___QaDKO_1-0-1:not(.magritte-actions-with-link___y3-dV_1-0-1){
|
|
47
|
+
padding:0;
|
|
48
|
+
}
|
|
49
|
+
.magritte-image-container___2MBxK_1-0-1{
|
|
50
|
+
position:absolute;
|
|
51
|
+
left:0;
|
|
52
|
+
bottom:0;
|
|
53
|
+
right:0;
|
|
54
|
+
background-size:cover;
|
|
55
|
+
--modal-header-gradient:linear-gradient(180deg, var(--magritte-gradient-component-modal-background-fade-v24-7-2));
|
|
56
|
+
}
|
|
57
|
+
.magritte-title-wrapper___XEFse_1-0-1{
|
|
58
|
+
position:relative;
|
|
59
|
+
width:100%;
|
|
60
|
+
}
|
|
61
|
+
.magritte-wrapper___R4t9N_1-0-1{
|
|
62
|
+
margin-bottom:24px;
|
|
63
|
+
}
|
|
64
|
+
.magritte-only-actions___ypqS-_1-0-1 .magritte-actions___r-a0l_1-0-1{
|
|
65
|
+
padding-left:0;
|
|
66
|
+
}
|
|
67
|
+
.magritte-only-actions___ypqS-_1-0-1 .magritte-actions-with-link___y3-dV_1-0-1{
|
|
68
|
+
padding-left:12px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:root{
|
|
72
|
+
--magritte-color-background-overlay-v24-7-2:#20262bad;
|
|
73
|
+
--magritte-color-stroke-neutral-v24-7-2:#DCE3EB;
|
|
74
|
+
--magritte-color-component-modal-background-content-v24-7-2:#ffffff;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:root{
|
|
78
|
+
--magritte-semantic-animation-ease-in-out-200-timing-function-v24-7-2:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
79
|
+
--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2:200ms;
|
|
80
|
+
--magritte-semantic-animation-ease-in-out-300-timing-function-v24-7-2:cubic-bezier(0.25, 0.1, 0.25, 1);
|
|
81
|
+
--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2:300ms;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.magritte-night-theme{
|
|
85
|
+
--magritte-color-stroke-neutral-v24-7-2:#303030;
|
|
86
|
+
--magritte-color-component-modal-background-content-v24-7-2:#1B1B1B;
|
|
87
|
+
}
|
|
88
|
+
.magritte-modal-overlay___uurgp_1-0-1{
|
|
89
|
+
position:fixed;
|
|
90
|
+
top:0;
|
|
91
|
+
right:0;
|
|
92
|
+
bottom:0;
|
|
93
|
+
left:0;
|
|
94
|
+
display:flex;
|
|
95
|
+
align-items:center;
|
|
96
|
+
justify-content:center;
|
|
97
|
+
}
|
|
98
|
+
.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
99
|
+
background-color:var(--magritte-color-background-overlay-v24-7-2);
|
|
100
|
+
transition-property:opacity, transform;
|
|
101
|
+
user-select:text;
|
|
102
|
+
z-index:1;
|
|
103
|
+
}
|
|
104
|
+
.magritte-modal-overlay___uurgp_1-0-1:not(.magritte-modal-overlay-with-background___mR-T0_1-0-1){
|
|
105
|
+
pointer-events:none;
|
|
106
|
+
}
|
|
107
|
+
.magritte-modal-overlay___uurgp_1-0-1:not(.magritte-modal-overlay-with-background___mR-T0_1-0-1) .magritte-modal___2Wc4s_1-0-1{
|
|
108
|
+
pointer-events:auto;
|
|
109
|
+
}
|
|
110
|
+
.magritte-modal-overlay-left___qaiC9_1-0-1{
|
|
111
|
+
justify-content:flex-start;
|
|
112
|
+
}
|
|
113
|
+
.magritte-modal-overlay-right___-HTKs_1-0-1{
|
|
114
|
+
justify-content:flex-end;
|
|
115
|
+
}
|
|
116
|
+
.magritte-modal___2Wc4s_1-0-1{
|
|
117
|
+
display:flex;
|
|
118
|
+
box-sizing:border-box;
|
|
119
|
+
margin:0 12px;
|
|
120
|
+
padding:24px;
|
|
121
|
+
flex-direction:column;
|
|
122
|
+
max-height:calc(100% - 12px * 2);
|
|
123
|
+
max-width:calc(100vw - 12px * 2);
|
|
124
|
+
position:relative;
|
|
125
|
+
background-color:var(--magritte-color-component-modal-background-content-v24-7-2);
|
|
126
|
+
border-radius:24px;
|
|
127
|
+
overflow:hidden;
|
|
128
|
+
width:800px;
|
|
129
|
+
transition-property:opacity, transform;
|
|
130
|
+
container-type:inline-size;
|
|
131
|
+
}
|
|
132
|
+
.magritte-modal___2Wc4s_1-0-1.magritte-size-small___nSBwy_1-0-1{
|
|
133
|
+
width:480px;
|
|
134
|
+
}
|
|
135
|
+
.magritte-modal___2Wc4s_1-0-1.magritte-size-medium___Zuz-t_1-0-1{
|
|
136
|
+
width:620px;
|
|
137
|
+
}
|
|
138
|
+
.magritte-no-vertical-paddings___XgMGS_1-0-1{
|
|
139
|
+
padding-top:0;
|
|
140
|
+
padding-bottom:0;
|
|
141
|
+
}
|
|
142
|
+
.magritte-no-horizontal-paddings___MJDv4_1-0-1{
|
|
143
|
+
padding-left:0;
|
|
144
|
+
padding-right:0;
|
|
145
|
+
}
|
|
146
|
+
.magritte-modal-full-height___UThtH_1-0-1{
|
|
147
|
+
height:100%;
|
|
148
|
+
}
|
|
149
|
+
.magritte-modal-with-border___bqsql_1-0-1{
|
|
150
|
+
outline:1px solid var(--magritte-color-stroke-neutral-v24-7-2);
|
|
151
|
+
}
|
|
152
|
+
.magritte-modal-content-wrapper___-eFo3_1-0-1{
|
|
153
|
+
display:flex;
|
|
154
|
+
flex-direction:column;
|
|
155
|
+
min-height:0;
|
|
156
|
+
flex:1 1;
|
|
157
|
+
}
|
|
158
|
+
.magritte-modal-content___KY9ma_1-0-1{
|
|
159
|
+
position:relative;
|
|
160
|
+
display:flex;
|
|
161
|
+
flex-direction:column;
|
|
162
|
+
min-height:0;
|
|
163
|
+
flex:1 1;
|
|
164
|
+
padding:0 0 0 24px;
|
|
165
|
+
margin:0 -24px;
|
|
166
|
+
width:calc(100% + 24px);
|
|
167
|
+
width:calc(100cqw + 24px);
|
|
168
|
+
}
|
|
169
|
+
.magritte-modal-scroll-container___dg8jC_1-0-1{
|
|
170
|
+
display:flex;
|
|
171
|
+
flex-direction:column;
|
|
172
|
+
flex:1 1;
|
|
173
|
+
min-height:0;
|
|
174
|
+
overflow-y:auto;
|
|
175
|
+
overscroll-behavior:none;
|
|
176
|
+
scrollbar-width:none;
|
|
177
|
+
padding:0 4px;
|
|
178
|
+
margin:0 -4px;
|
|
179
|
+
}
|
|
180
|
+
.magritte-modal-scroll-container___dg8jC_1-0-1::-webkit-scrollbar{
|
|
181
|
+
display:none;
|
|
182
|
+
}
|
|
183
|
+
.magritte-modal-content-wrapper__one-line___ZkEgT_1-0-1{
|
|
184
|
+
flex-direction:row-reverse;
|
|
185
|
+
}
|
|
186
|
+
.magritte-modal-content-wrapper__one-line___ZkEgT_1-0-1 .magritte-modal-content___KY9ma_1-0-1{
|
|
187
|
+
width:auto;
|
|
188
|
+
container-type:inline-size;
|
|
189
|
+
margin-right:0;
|
|
190
|
+
}
|
|
191
|
+
.magritte-modal-content-wrapper__one-line___ZkEgT_1-0-1 .magritte-content-sticky-container___VkZxO_1-0-1{
|
|
192
|
+
max-width:calc(100% - 16px);
|
|
193
|
+
max-width:calc(100cqw - 16px);
|
|
194
|
+
}
|
|
195
|
+
.magritte-divider-container___jKyxB_1-0-1{
|
|
196
|
+
margin:0 -24px;
|
|
197
|
+
}
|
|
198
|
+
.magritte-divider-container___jKyxB_1-0-1.magritte-divider-container-hidden___20nI5_1-0-1{
|
|
199
|
+
display:none;
|
|
200
|
+
}
|
|
201
|
+
.magritte-modal-footer___TbH6x_1-0-1{
|
|
202
|
+
margin:0 -24px -24px;
|
|
203
|
+
background-color:var(--magritte-color-component-modal-background-content-v24-7-2);
|
|
204
|
+
z-index:1;
|
|
205
|
+
--magritte-ui-container-background-color-override:var(--magritte-color-component-modal-background-content-v24-7-2);
|
|
206
|
+
}
|
|
207
|
+
.magritte-modal-buttons-container___9hXUo_1-0-1{
|
|
208
|
+
display:flex;
|
|
209
|
+
gap:12px;
|
|
210
|
+
}
|
|
211
|
+
.magritte-animation-timeout___vK6nU_1-0-1{
|
|
212
|
+
--enter-animation-duration:0;
|
|
213
|
+
--exit-animation-duration:0;
|
|
214
|
+
}
|
|
215
|
+
@media (prefers-reduced-motion: no-preference){
|
|
216
|
+
.magritte-animation-timeout___vK6nU_1-0-1{
|
|
217
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
218
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
.magritte-animation-enter-center___9zWOQ_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
222
|
+
opacity:0;
|
|
223
|
+
}
|
|
224
|
+
.magritte-animation-enter-center___9zWOQ_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
225
|
+
opacity:0;
|
|
226
|
+
}
|
|
227
|
+
.magritte-animation-enter-center-active___dfICf_1-0-1{
|
|
228
|
+
--enter-animation-duration:0;
|
|
229
|
+
--exit-animation-duration:0;
|
|
230
|
+
}
|
|
231
|
+
@media (prefers-reduced-motion: no-preference){
|
|
232
|
+
.magritte-animation-enter-center-active___dfICf_1-0-1{
|
|
233
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
234
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
.magritte-animation-enter-center-active___dfICf_1-0-1 .magritte-modal___2Wc4s_1-0-1,
|
|
238
|
+
.magritte-animation-enter-center-active___dfICf_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
239
|
+
opacity:1;
|
|
240
|
+
transition-duration:var(--enter-animation-duration);
|
|
241
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v24-7-2);
|
|
242
|
+
}
|
|
243
|
+
.magritte-animation-exit-center___mrTCE_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
244
|
+
opacity:1;
|
|
245
|
+
}
|
|
246
|
+
.magritte-animation-exit-center___mrTCE_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
247
|
+
opacity:1;
|
|
248
|
+
}
|
|
249
|
+
.magritte-animation-exit-center-active___WZXYp_1-0-1{
|
|
250
|
+
--enter-animation-duration:0;
|
|
251
|
+
--exit-animation-duration:0;
|
|
252
|
+
}
|
|
253
|
+
@media (prefers-reduced-motion: no-preference){
|
|
254
|
+
.magritte-animation-exit-center-active___WZXYp_1-0-1{
|
|
255
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
256
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
.magritte-animation-exit-center-active___WZXYp_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
260
|
+
opacity:0;
|
|
261
|
+
}
|
|
262
|
+
.magritte-animation-exit-center-active___WZXYp_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
263
|
+
opacity:0;
|
|
264
|
+
}
|
|
265
|
+
.magritte-animation-exit-center-active___WZXYp_1-0-1 .magritte-modal___2Wc4s_1-0-1,
|
|
266
|
+
.magritte-animation-exit-center-active___WZXYp_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
267
|
+
transition-duration:var(--exit-animation-duration);
|
|
268
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-7-2);
|
|
269
|
+
}
|
|
270
|
+
.magritte-animation-enter-left___XiXzr_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
271
|
+
opacity:0;
|
|
272
|
+
}
|
|
273
|
+
.magritte-animation-enter-left___XiXzr_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
274
|
+
opacity:0;
|
|
275
|
+
transform:translateX(-100%);
|
|
276
|
+
}
|
|
277
|
+
.magritte-animation-enter-left-active___4Uaz6_1-0-1{
|
|
278
|
+
--enter-animation-duration:0;
|
|
279
|
+
--exit-animation-duration:0;
|
|
280
|
+
}
|
|
281
|
+
@media (prefers-reduced-motion: no-preference){
|
|
282
|
+
.magritte-animation-enter-left-active___4Uaz6_1-0-1{
|
|
283
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
284
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
.magritte-animation-enter-left-active___4Uaz6_1-0-1 .magritte-modal___2Wc4s_1-0-1,
|
|
288
|
+
.magritte-animation-enter-left-active___4Uaz6_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
289
|
+
opacity:1;
|
|
290
|
+
transition-duration:var(--enter-animation-duration);
|
|
291
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v24-7-2);
|
|
292
|
+
transform:translateX(0);
|
|
293
|
+
}
|
|
294
|
+
.magritte-animation-exit-left___NHvvO_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
295
|
+
opacity:1;
|
|
296
|
+
}
|
|
297
|
+
.magritte-animation-exit-left___NHvvO_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
298
|
+
opacity:1;
|
|
299
|
+
transform:translateX(0);
|
|
300
|
+
}
|
|
301
|
+
.magritte-animation-exit-left-active___oDszE_1-0-1{
|
|
302
|
+
--enter-animation-duration:0;
|
|
303
|
+
--exit-animation-duration:0;
|
|
304
|
+
}
|
|
305
|
+
@media (prefers-reduced-motion: no-preference){
|
|
306
|
+
.magritte-animation-exit-left-active___oDszE_1-0-1{
|
|
307
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
308
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
.magritte-animation-exit-left-active___oDszE_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
312
|
+
opacity:0;
|
|
313
|
+
}
|
|
314
|
+
.magritte-animation-exit-left-active___oDszE_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
315
|
+
opacity:0;
|
|
316
|
+
transform:translateX(-100%);
|
|
317
|
+
}
|
|
318
|
+
.magritte-animation-exit-left-active___oDszE_1-0-1 .magritte-modal___2Wc4s_1-0-1,
|
|
319
|
+
.magritte-animation-exit-left-active___oDszE_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
320
|
+
transition-duration:var(--exit-animation-duration);
|
|
321
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-7-2);
|
|
322
|
+
}
|
|
323
|
+
.magritte-animation-enter-right___1bqPX_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
324
|
+
opacity:0;
|
|
325
|
+
}
|
|
326
|
+
.magritte-animation-enter-right___1bqPX_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
327
|
+
opacity:0;
|
|
328
|
+
transform:translateX(100%);
|
|
329
|
+
}
|
|
330
|
+
.magritte-animation-enter-right-active___OR65U_1-0-1{
|
|
331
|
+
--enter-animation-duration:0;
|
|
332
|
+
--exit-animation-duration:0;
|
|
333
|
+
}
|
|
334
|
+
@media (prefers-reduced-motion: no-preference){
|
|
335
|
+
.magritte-animation-enter-right-active___OR65U_1-0-1{
|
|
336
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
337
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
.magritte-animation-enter-right-active___OR65U_1-0-1 .magritte-modal___2Wc4s_1-0-1,
|
|
341
|
+
.magritte-animation-enter-right-active___OR65U_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
342
|
+
opacity:1;
|
|
343
|
+
transition-duration:var(--enter-animation-duration);
|
|
344
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-300-timing-function-v24-7-2);
|
|
345
|
+
transform:translateX(0);
|
|
346
|
+
}
|
|
347
|
+
.magritte-animation-exit-right___hyYBh_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
348
|
+
opacity:1;
|
|
349
|
+
}
|
|
350
|
+
.magritte-animation-exit-right___hyYBh_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
351
|
+
opacity:1;
|
|
352
|
+
transform:translateX(0);
|
|
353
|
+
}
|
|
354
|
+
.magritte-animation-exit-right-active___ft6Lz_1-0-1{
|
|
355
|
+
--enter-animation-duration:0;
|
|
356
|
+
--exit-animation-duration:0;
|
|
357
|
+
}
|
|
358
|
+
@media (prefers-reduced-motion: no-preference){
|
|
359
|
+
.magritte-animation-exit-right-active___ft6Lz_1-0-1{
|
|
360
|
+
--enter-animation-duration:var(--magritte-semantic-animation-ease-in-out-300-duration-v24-7-2);
|
|
361
|
+
--exit-animation-duration:var(--magritte-semantic-animation-ease-in-out-200-duration-v24-7-2);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
.magritte-animation-exit-right-active___ft6Lz_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
365
|
+
opacity:0;
|
|
366
|
+
}
|
|
367
|
+
.magritte-animation-exit-right-active___ft6Lz_1-0-1 .magritte-modal___2Wc4s_1-0-1{
|
|
368
|
+
opacity:0;
|
|
369
|
+
transform:translateX(100%);
|
|
370
|
+
}
|
|
371
|
+
.magritte-animation-exit-right-active___ft6Lz_1-0-1 .magritte-modal___2Wc4s_1-0-1,
|
|
372
|
+
.magritte-animation-exit-right-active___ft6Lz_1-0-1.magritte-modal-overlay-with-background___mR-T0_1-0-1{
|
|
373
|
+
transition-duration:var(--exit-animation-duration);
|
|
374
|
+
transition-timing-function:var(--magritte-semantic-animation-ease-in-out-200-timing-function-v24-7-2);
|
|
375
|
+
}
|
|
376
|
+
.magritte-space-preserver___nz3Nw_1-0-1{
|
|
377
|
+
flex:0 0 auto;
|
|
378
|
+
}
|
|
379
|
+
.magritte-tree-selector-container___XZh1C_1-0-1{
|
|
380
|
+
height:100%;
|
|
381
|
+
max-width:calc(100% - 24px);
|
|
382
|
+
max-width:100cqw;
|
|
383
|
+
--magritte-ui-scrollbar-offset-right:-24px;
|
|
384
|
+
}
|
|
385
|
+
.magritte-content-sticky-container___VkZxO_1-0-1{
|
|
386
|
+
display:flex;
|
|
387
|
+
flex-direction:column;
|
|
388
|
+
position:sticky;
|
|
389
|
+
top:0;
|
|
390
|
+
min-height:100%;
|
|
391
|
+
flex:1 0 auto;
|
|
392
|
+
max-width:calc(100% - 24px);
|
|
393
|
+
max-width:100cqw;
|
|
394
|
+
}
|
|
395
|
+
.magritte-grow-limiter___SPuoT_1-0-1{
|
|
396
|
+
flex:1 0;
|
|
397
|
+
}
|
package/index.d.ts
ADDED
package/index.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
export { Modal as ModalDeprecated } from './Modal.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
import 'react-transition-group';
|
|
7
|
+
import 'classnames';
|
|
8
|
+
import '@hh.ru/magritte-common-is-server-env';
|
|
9
|
+
import '@hh.ru/magritte-common-keyboard';
|
|
10
|
+
import '@hh.ru/magritte-common-modal-helper';
|
|
11
|
+
import '@hh.ru/magritte-common-mouse/useCloseByClickOutside';
|
|
12
|
+
import '@hh.ru/magritte-common-use-multiple-refs';
|
|
13
|
+
import '@hh.ru/magritte-common-use-no-bubbling';
|
|
14
|
+
import '@hh.ru/magritte-ui-action-bar';
|
|
15
|
+
import '@hh.ru/magritte-ui-breakpoint';
|
|
16
|
+
import '@hh.ru/magritte-ui-layer';
|
|
17
|
+
import './ModalContentWithHeader-5W8yMgqD.js';
|
|
18
|
+
import '@hh.ru/magritte-common-func-utils';
|
|
19
|
+
import '@hh.ru/magritte-ui-content-overlay';
|
|
20
|
+
import '@hh.ru/magritte-ui-divider';
|
|
21
|
+
import './ModalHeader.js';
|
|
22
|
+
import '@hh.ru/magritte-ui-icon';
|
|
23
|
+
import '@hh.ru/magritte-ui-title';
|
|
24
|
+
import '@hh.ru/magritte-ui-scrollbar';
|
|
25
|
+
import '@hh.ru/magritte-ui-textarea';
|
|
26
|
+
import './useModalOrder.js';
|
|
27
|
+
import '@hh.ru/magritte-common-dom-storage';
|
|
28
|
+
import '@hh.ru/magritte-ui-progress-bar';
|
|
29
|
+
import '@hh.ru/magritte-ui-theme-wrapper';
|
|
30
|
+
import '@hh.ru/magritte-ui-tree-selector';
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.mock.d.ts
ADDED
package/index.mock.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './index.css';
|
|
2
|
+
import { mockComponent } from '@hh.ru/magritte-ui-mock-component';
|
|
3
|
+
|
|
4
|
+
const ModalDeprecated = mockComponent('ModalDeprecated', undefined, {
|
|
5
|
+
withChildren: true,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { ModalDeprecated };
|
|
9
|
+
//# sourceMappingURL=index.mock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mock.js","sources":["src/index.mock.ts"],"sourcesContent":["import { ForwardRefExoticComponent } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport const ModalDeprecated: ForwardRefExoticComponent<Record<string, unknown>> = mockComponent(\n 'ModalDeprecated',\n undefined,\n {\n withChildren: true,\n }\n);\n"],"names":[],"mappings":";;MAIa,eAAe,GAAuD,aAAa,CAC5F,iBAAiB,EACjB,SAAS,EACT;AACI,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hh.ru/magritte-ui-modal-deprecated",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"main": "index.js",
|
|
5
|
+
"types": "index.d.ts",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"index.css"
|
|
8
|
+
],
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "yarn root:build $(pwd)",
|
|
11
|
+
"build-test-branch": "yarn root:build-test-branch $(pwd)",
|
|
12
|
+
"prepack": "yarn root:prepack $(pwd)",
|
|
13
|
+
"postpublish": "yarn root:postpublish $(pwd)",
|
|
14
|
+
"stylelint-check": "yarn root:stylelint-check $(pwd)",
|
|
15
|
+
"eslint-check": "yarn root:eslint-check $(pwd)",
|
|
16
|
+
"ts-config": "yarn root:ts-config $(pwd)",
|
|
17
|
+
"ts-check": "yarn root:ts-check $(pwd)",
|
|
18
|
+
"test": "yarn root:test $(pwd)",
|
|
19
|
+
"watch": "yarn root:watch $(pwd)"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@hh.ru/magritte-common-dom-storage": "1.0.9",
|
|
23
|
+
"@hh.ru/magritte-common-func-utils": "1.3.15",
|
|
24
|
+
"@hh.ru/magritte-common-is-server-env": "1.0.8",
|
|
25
|
+
"@hh.ru/magritte-common-keyboard": "4.3.4",
|
|
26
|
+
"@hh.ru/magritte-common-modal-helper": "1.3.2",
|
|
27
|
+
"@hh.ru/magritte-common-mouse": "1.2.0",
|
|
28
|
+
"@hh.ru/magritte-common-use-multiple-refs": "1.1.11",
|
|
29
|
+
"@hh.ru/magritte-common-use-no-bubbling": "1.0.8",
|
|
30
|
+
"@hh.ru/magritte-design-tokens": "24.7.2",
|
|
31
|
+
"@hh.ru/magritte-internal-layer-name": "3.4.1",
|
|
32
|
+
"@hh.ru/magritte-ui-action-bar": "5.4.0",
|
|
33
|
+
"@hh.ru/magritte-ui-breakpoint": "6.1.1",
|
|
34
|
+
"@hh.ru/magritte-ui-content-overlay": "1.2.1",
|
|
35
|
+
"@hh.ru/magritte-ui-divider": "3.2.1",
|
|
36
|
+
"@hh.ru/magritte-ui-icon": "14.2.12",
|
|
37
|
+
"@hh.ru/magritte-ui-layer": "3.2.6",
|
|
38
|
+
"@hh.ru/magritte-ui-mock-component": "1.1.7",
|
|
39
|
+
"@hh.ru/magritte-ui-progress-bar": "5.0.26",
|
|
40
|
+
"@hh.ru/magritte-ui-scrollbar": "1.0.28",
|
|
41
|
+
"@hh.ru/magritte-ui-textarea": "3.3.31",
|
|
42
|
+
"@hh.ru/magritte-ui-theme-wrapper": "1.1.19",
|
|
43
|
+
"@hh.ru/magritte-ui-title": "8.3.3",
|
|
44
|
+
"@hh.ru/magritte-ui-tree-selector": "5.5.48"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"classnames": ">=2.3.2",
|
|
48
|
+
"react": ">=18.2.0",
|
|
49
|
+
"react-dom": ">=18.2.0",
|
|
50
|
+
"react-transition-group": ">=4.4.5"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public"
|
|
54
|
+
},
|
|
55
|
+
"gitHead": "c04d157907ffbb3a873f8cd98fb63c4034f93f69"
|
|
56
|
+
}
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { ReactNode, PropsWithChildren, SyntheticEvent } from 'react';
|
|
2
|
+
import { TitleProps } from '@hh.ru/magritte-ui-title';
|
|
3
|
+
export type ModalHeight = 'content' | 'full-screen' | number;
|
|
4
|
+
export interface ModalHeaderProps {
|
|
5
|
+
/** Текст заголовка */
|
|
6
|
+
title?: TitleProps['children'];
|
|
7
|
+
/** Размер заголовка */
|
|
8
|
+
titleSize?: TitleProps['size'];
|
|
9
|
+
/** Выравнивание заголовка */
|
|
10
|
+
titleAlignment?: TitleProps['alignment'];
|
|
11
|
+
/** Максимальное кол-во строк перед обрезкой содержимого описания многоточием */
|
|
12
|
+
titleMaxLines?: TitleProps['maxLines'];
|
|
13
|
+
/** Элемент используемый для заголовка */
|
|
14
|
+
titleElement?: TitleProps['Element'];
|
|
15
|
+
/** Текст подзаголовка */
|
|
16
|
+
titleDescription?: TitleProps['description'];
|
|
17
|
+
/** Максимальное кол-во строк перед обрезкой содержимого описания многоточием */
|
|
18
|
+
titleDescriptionMaxLines?: TitleProps['descriptionMaxLines'];
|
|
19
|
+
/** Цвет заголовка */
|
|
20
|
+
titleStyle?: TitleProps['style'];
|
|
21
|
+
titleDescriptionStyle?: TitleProps['descriptionStyle'];
|
|
22
|
+
/** URL изображения для фона заголовка. Будет проигнорирован, если передан headerImage. */
|
|
23
|
+
headerImageUrl?: string;
|
|
24
|
+
/** Произвольный контент в заголовке. Имеет приоритет перед headerImageUrl. */
|
|
25
|
+
headerImage?: ReactNode;
|
|
26
|
+
/** Высота заголовка в пикселях, если не передан проп headerImageUrl или headerImage, этот проп игнорируется */
|
|
27
|
+
headerHeight?: number;
|
|
28
|
+
/** Опциональный контент внизу хедера */
|
|
29
|
+
options?: ReactNode;
|
|
30
|
+
/** набор Icon-s внутри хедера */
|
|
31
|
+
actions?: ReactNode | ReactNode[];
|
|
32
|
+
/** Link внутри хедера */
|
|
33
|
+
actionLink?: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export interface ModalBaseProps extends PropsWithChildren {
|
|
36
|
+
/** Обработчик нажатия на кнопку закрытия */
|
|
37
|
+
onClose?: (event?: SyntheticEvent) => void;
|
|
38
|
+
/** Флаг управляющий видимостью модала */
|
|
39
|
+
visible?: boolean;
|
|
40
|
+
/** Размер */
|
|
41
|
+
size?: 'large' | 'medium' | 'small';
|
|
42
|
+
/** Хост для отрисовки модала */
|
|
43
|
+
host?: HTMLElement;
|
|
44
|
+
/** Содержимое футера, если нужно отрисовать кнопки, то должен использоваться ActionBar */
|
|
45
|
+
footer?: ReactNode;
|
|
46
|
+
/** Флаг отключающий верхний и нижний паддинги. Работает, только если все опциональные слоты отключены */
|
|
47
|
+
disableVerticalPaddings?: boolean;
|
|
48
|
+
/** Флаг отключающий левый и правый паддинги. Работает, только если все опциональные слоты отключены */
|
|
49
|
+
disableHorizontalPaddings?: boolean;
|
|
50
|
+
/** Флаг управляющий закрытием при клике вне Modal */
|
|
51
|
+
closeByClickOutside?: boolean;
|
|
52
|
+
/** Колбек, который будет вызван после завершения анимации открытия */
|
|
53
|
+
onAppear?: VoidFunction;
|
|
54
|
+
/** Колбек, который будет вызван перед началом анимации закрытия */
|
|
55
|
+
onBeforeExit?: VoidFunction;
|
|
56
|
+
/** Колбек, который будет вызван после анимации закрытия */
|
|
57
|
+
onAfterExit?: VoidFunction;
|
|
58
|
+
/** Высота (по контенту, во весь экран или фиксированная в пикселях) */
|
|
59
|
+
height?: ModalHeight;
|
|
60
|
+
/** Минимальная высота в пикселях. Имеет приоритет перед height. */
|
|
61
|
+
minHeight?: number;
|
|
62
|
+
/** Положение компонента на экране, определяет дефолтное значение пропа height */
|
|
63
|
+
position?: 'center' | 'left' | 'right';
|
|
64
|
+
/** Показывать ли оверлей, применяется только если position=left|right */
|
|
65
|
+
showOverlay?: boolean;
|
|
66
|
+
/** Отступ от верхнего края экрана под навигацию, применяется только если position=left|right и showOverlay=false */
|
|
67
|
+
pageHeaderPadding?: number;
|
|
68
|
+
/** Возвращать ли фокус на активный элемент после закрытия модала, по умолчанию `true` */
|
|
69
|
+
returnFocusOnClose?: boolean;
|
|
70
|
+
}
|
|
71
|
+
/** @deprecated Тип устарел. Используйте `ModalProps` из `@hh.ru/magritte-ui-modal` */
|
|
72
|
+
export type ModalProps = ModalBaseProps & ModalHeaderProps;
|
package/types.js
ADDED
package/types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|