@hh.ru/magritte-ui-modal-deprecated 1.0.39 → 1.0.41
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 +2 -2
- package/Modal.js +255 -189
- package/Modal.js.map +1 -1
- package/ModalContentWithHeader-CxF78N1S.js +243 -0
- package/{ModalContentWithHeader-B7tpHFBW.js.map → ModalContentWithHeader-CxF78N1S.js.map} +1 -1
- package/ModalContentWithHeader.d.ts +1 -1
- package/ModalContentWithHeader.js +1 -1
- package/ModalHeader.d.ts +1 -1
- package/ModalHeader.js +105 -29
- package/ModalHeader.js.map +1 -1
- package/index.css +123 -123
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/index.mock.js +7 -3
- package/index.mock.js.map +1 -1
- package/package.json +12 -12
- package/useModalOrder.js +69 -76
- package/useModalOrder.js.map +1 -1
- package/ModalContentWithHeader-B7tpHFBW.js +0 -150
package/Modal.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { ModalHeaderProps } from '
|
|
2
|
+
import { ModalHeaderProps } from './types';
|
|
3
3
|
/** @deprecated Компонент устарел. Используйте `Modal` из `@hh.ru/magritte-ui-modal` */
|
|
4
|
-
export declare const Modal: import("react").ForwardRefExoticComponent<import("
|
|
4
|
+
export declare const Modal: import("react").ForwardRefExoticComponent<import("./types").ModalBaseProps & ModalHeaderProps & Omit<HTMLAttributes<HTMLDivElement>, "aria-labeledby" | "className" | "role" | "tabindex" | keyof import("./types").ModalBaseProps | keyof ModalHeaderProps> & import("react").RefAttributes<HTMLDivElement>>;
|
package/Modal.js
CHANGED
|
@@ -13,7 +13,7 @@ import { useNoBubbling } from '@hh.ru/magritte-common-use-no-bubbling';
|
|
|
13
13
|
import { isActionBarComponent } from '@hh.ru/magritte-ui-action-bar';
|
|
14
14
|
import { Breakpoint, useBreakpoint } from '@hh.ru/magritte-ui-breakpoint';
|
|
15
15
|
import { Layer } from '@hh.ru/magritte-ui-layer';
|
|
16
|
-
import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-
|
|
16
|
+
import { s as styles, M as ModalContentWithHeader } from './ModalContentWithHeader-CxF78N1S.js';
|
|
17
17
|
import { useModalOrder } from './useModalOrder.js';
|
|
18
18
|
import { isProgressBarComponent } from '@hh.ru/magritte-ui-progress-bar';
|
|
19
19
|
import { ThemeWrapper } from '@hh.ru/magritte-ui-theme-wrapper';
|
|
@@ -30,40 +30,75 @@ import '@hh.ru/magritte-common-dom-storage';
|
|
|
30
30
|
|
|
31
31
|
const DEFAULT_ACTION_BAR_PADDING = 24;
|
|
32
32
|
const DEFAULT_PAGE_HEADER_PADDING = 72;
|
|
33
|
-
const noop = () =>
|
|
33
|
+
const noop = () => void 0;
|
|
34
34
|
const toNumber = (value) => {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const result = parseInt(value, 10);
|
|
36
|
+
return Number.isInteger(result) ? result : 0;
|
|
37
37
|
};
|
|
38
38
|
const CSS_CLASSES = {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
39
|
+
center: {
|
|
40
|
+
appear: styles.animationEnterCenter,
|
|
41
|
+
appearActive: styles.animationEnterCenterActive,
|
|
42
|
+
enter: styles.animationEnterCenter,
|
|
43
|
+
enterActive: styles.animationEnterCenterActive,
|
|
44
|
+
exit: styles.animationExitCenter,
|
|
45
|
+
exitActive: styles.animationExitCenterActive
|
|
46
|
+
},
|
|
47
|
+
left: {
|
|
48
|
+
appear: styles.animationEnterLeft,
|
|
49
|
+
appearActive: styles.animationEnterLeftActive,
|
|
50
|
+
enter: styles.animationEnterLeft,
|
|
51
|
+
enterActive: styles.animationEnterLeftActive,
|
|
52
|
+
exit: styles.animationExitLeft,
|
|
53
|
+
exitActive: styles.animationExitLeftActive
|
|
54
|
+
},
|
|
55
|
+
right: {
|
|
56
|
+
appear: styles.animationEnterRight,
|
|
57
|
+
appearActive: styles.animationEnterRightActive,
|
|
58
|
+
enter: styles.animationEnterRight,
|
|
59
|
+
enterActive: styles.animationEnterRightActive,
|
|
60
|
+
exit: styles.animationExitRight,
|
|
61
|
+
exitActive: styles.animationExitRightActive
|
|
62
|
+
}
|
|
63
63
|
};
|
|
64
64
|
const INVISIBLE_FOR_BREAKPOINTS = [Breakpoint.XS, Breakpoint.S];
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const Modal = forwardRef(
|
|
66
|
+
({
|
|
67
|
+
visible,
|
|
68
|
+
size = "medium",
|
|
69
|
+
title,
|
|
70
|
+
titleAlignment = "left",
|
|
71
|
+
titleSize = "large",
|
|
72
|
+
titleMaxLines,
|
|
73
|
+
titleElement = "h2",
|
|
74
|
+
titleDescription,
|
|
75
|
+
titleDescriptionMaxLines,
|
|
76
|
+
titleStyle,
|
|
77
|
+
titleDescriptionStyle,
|
|
78
|
+
children,
|
|
79
|
+
onClose = noop,
|
|
80
|
+
headerImageUrl,
|
|
81
|
+
headerImage,
|
|
82
|
+
headerHeight,
|
|
83
|
+
host,
|
|
84
|
+
options,
|
|
85
|
+
actions,
|
|
86
|
+
actionLink,
|
|
87
|
+
footer,
|
|
88
|
+
disableVerticalPaddings = false,
|
|
89
|
+
disableHorizontalPaddings = false,
|
|
90
|
+
closeByClickOutside = true,
|
|
91
|
+
onAppear,
|
|
92
|
+
onBeforeExit,
|
|
93
|
+
onAfterExit,
|
|
94
|
+
position = "center",
|
|
95
|
+
height = position === "center" ? "content" : "full-screen",
|
|
96
|
+
minHeight,
|
|
97
|
+
showOverlay: _showOverlay = true,
|
|
98
|
+
pageHeaderPadding = DEFAULT_PAGE_HEADER_PADDING,
|
|
99
|
+
returnFocusOnClose,
|
|
100
|
+
...rest
|
|
101
|
+
}, ref) => {
|
|
67
102
|
const isServerEnv = useServerEnv();
|
|
68
103
|
const enableScrollRef = useRef();
|
|
69
104
|
const onAfterExitRef = useRef(onAfterExit);
|
|
@@ -71,203 +106,234 @@ const Modal = forwardRef(({ visible, size = 'medium', title, titleAlignment = 'l
|
|
|
71
106
|
onAfterExitRef.current = onAfterExit;
|
|
72
107
|
onBeforeExitRef.current = onBeforeExit;
|
|
73
108
|
const [animationTimeout, setAnimationTimeout] = useState({
|
|
74
|
-
|
|
75
|
-
|
|
109
|
+
enter: 0,
|
|
110
|
+
exit: 0
|
|
76
111
|
});
|
|
77
112
|
const animationTimeoutExitRef = useRef(animationTimeout.exit);
|
|
78
113
|
animationTimeoutExitRef.current = animationTimeout.exit;
|
|
79
114
|
const labelId = useId();
|
|
80
115
|
const additionalProps = {};
|
|
81
116
|
if (title) {
|
|
82
|
-
|
|
117
|
+
additionalProps["aria-labelledby"] = labelId;
|
|
83
118
|
}
|
|
84
119
|
const modalRef = useRef(null);
|
|
85
120
|
const overlayRef = useRef(null);
|
|
86
|
-
const keyboardNavigationRef = useKeyboardNavigation({ enabled: visible && !isServerEnv, mode:
|
|
121
|
+
const keyboardNavigationRef = useKeyboardNavigation({ enabled: visible && !isServerEnv, mode: "loop" });
|
|
87
122
|
const modalRefCallback = useMultipleRefs(ref, modalRef, keyboardNavigationRef);
|
|
88
|
-
const isPaddingsDisableAllowed = !title &&
|
|
89
|
-
!headerImageUrl &&
|
|
90
|
-
!headerImage &&
|
|
91
|
-
!titleDescription &&
|
|
92
|
-
!footer &&
|
|
93
|
-
!options &&
|
|
94
|
-
!actionLink &&
|
|
95
|
-
!actions;
|
|
123
|
+
const isPaddingsDisableAllowed = !title && !headerImageUrl && !headerImage && !titleDescription && !footer && !options && !actionLink && !actions;
|
|
96
124
|
const isVerticalPaddingsDisabled = disableVerticalPaddings && isPaddingsDisableAllowed;
|
|
97
125
|
const isHorizontalPaddingsDisabled = disableHorizontalPaddings && isPaddingsDisableAllowed;
|
|
98
|
-
const showOverlay = position ===
|
|
126
|
+
const showOverlay = position === "center" || _showOverlay;
|
|
99
127
|
const activatorRef = useRef(null);
|
|
100
128
|
const onEntering = useCallback(() => {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
129
|
+
if (returnFocusOnClose && document.activeElement instanceof HTMLElement) {
|
|
130
|
+
activatorRef.current = document.activeElement;
|
|
131
|
+
}
|
|
132
|
+
if (!enableScrollRef.current && showOverlay) {
|
|
133
|
+
enableScrollRef.current = disableScroll();
|
|
134
|
+
}
|
|
135
|
+
if (modalRef.current && !modalRef.current.contains(document.activeElement)) {
|
|
136
|
+
modalRef.current.focus();
|
|
137
|
+
}
|
|
110
138
|
}, [returnFocusOnClose, showOverlay]);
|
|
111
139
|
const onEntered = useCallback(() => {
|
|
112
|
-
|
|
140
|
+
onAppear?.();
|
|
113
141
|
}, [onAppear]);
|
|
114
142
|
const onExit = useCallback(() => {
|
|
115
|
-
|
|
143
|
+
onBeforeExitRef.current?.();
|
|
116
144
|
}, []);
|
|
117
145
|
const onExited = useCallback(() => {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
activatorRef.current = null;
|
|
126
|
-
}
|
|
146
|
+
enableScrollRef.current?.();
|
|
147
|
+
enableScrollRef.current = void 0;
|
|
148
|
+
onAfterExitRef.current?.();
|
|
149
|
+
if (activatorRef.current !== null && document.contains(activatorRef.current)) {
|
|
150
|
+
activatorRef.current?.focus();
|
|
151
|
+
activatorRef.current = null;
|
|
152
|
+
}
|
|
127
153
|
}, []);
|
|
128
154
|
useModalOrder(!!visible && !isServerEnv, modalRef);
|
|
129
155
|
const { breakpoint } = useBreakpoint();
|
|
130
156
|
useEffect(() => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
// visible не должно быть в зависимостях, т.к. этот эффект обрабатывает только изменение брейкпоинта
|
|
142
|
-
// visible обрабатывается CSSTransition
|
|
143
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
157
|
+
if (!visible) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const currentBreakpointVisible = !INVISIBLE_FOR_BREAKPOINTS.includes(breakpoint);
|
|
161
|
+
if (!currentBreakpointVisible) {
|
|
162
|
+
onExit();
|
|
163
|
+
onExited();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
onEntering();
|
|
144
167
|
}, [breakpoint, onEntering, onExited, onExit]);
|
|
145
168
|
useEffect(() => {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
169
|
+
return () => {
|
|
170
|
+
enableScrollRef.current?.(animationTimeoutExitRef.current);
|
|
171
|
+
enableScrollRef.current = void 0;
|
|
172
|
+
};
|
|
150
173
|
}, [visible]);
|
|
151
174
|
useLayoutEffect(() => {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
175
|
+
const animationTimeoutElement = document.createElement("div");
|
|
176
|
+
animationTimeoutElement.classList.add(styles.animationTimeout);
|
|
177
|
+
document.body.appendChild(animationTimeoutElement);
|
|
178
|
+
const style = window.getComputedStyle(animationTimeoutElement);
|
|
179
|
+
setAnimationTimeout({
|
|
180
|
+
enter: toNumber(style.getPropertyValue("--enter-animation-duration")),
|
|
181
|
+
exit: toNumber(style.getPropertyValue("--exit-animation-duration"))
|
|
182
|
+
});
|
|
183
|
+
document.body.removeChild(animationTimeoutElement);
|
|
161
184
|
}, [setAnimationTimeout]);
|
|
162
185
|
useEffect(() => {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
};
|
|
186
|
+
if (showOverlay || !pageHeaderPadding || !visible) {
|
|
187
|
+
return void 0;
|
|
188
|
+
}
|
|
189
|
+
const hasScrollTimeline = "ScrollTimeline" in window;
|
|
190
|
+
const overlay = overlayRef.current;
|
|
191
|
+
if (!overlay) {
|
|
192
|
+
return void 0;
|
|
193
|
+
}
|
|
194
|
+
let animation;
|
|
195
|
+
const abortController = new AbortController();
|
|
196
|
+
const keyframes = { top: [`${pageHeaderPadding}px`, "0px"] };
|
|
197
|
+
if (hasScrollTimeline) {
|
|
198
|
+
const timeline = new ScrollTimeline({ source: document.documentElement, axis: "y" });
|
|
199
|
+
animation = overlay.animate(keyframes, {
|
|
200
|
+
timeline,
|
|
201
|
+
rangeStart: "0px",
|
|
202
|
+
// calc нужен для устранения бага https://issues.chromium.org/issues/40929569
|
|
203
|
+
rangeEnd: `calc(0% + ${pageHeaderPadding}px)`
|
|
204
|
+
});
|
|
205
|
+
} else {
|
|
206
|
+
animation = overlay.animate(keyframes, { duration: 1e3, fill: "forwards" });
|
|
207
|
+
animation.pause();
|
|
208
|
+
window.addEventListener(
|
|
209
|
+
"scroll",
|
|
210
|
+
() => {
|
|
211
|
+
animation.currentTime = Math.min(document.documentElement.scrollTop, pageHeaderPadding) / pageHeaderPadding * 1e3;
|
|
212
|
+
},
|
|
213
|
+
{ signal: abortController.signal }
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
return () => {
|
|
217
|
+
abortController.abort();
|
|
218
|
+
};
|
|
197
219
|
}, [showOverlay, pageHeaderPadding, visible]);
|
|
198
220
|
const overlayEventHandlers = useNoBubbling({
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
221
|
+
onKeyDown: (event) => {
|
|
222
|
+
if (keyboardMatch(event.nativeEvent, keyboardKeys.Escape)) {
|
|
223
|
+
onClose(event);
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
onMouseDown: (event) => {
|
|
227
|
+
if (!closeByClickOutside || modalRef.current?.contains(event.target)) {
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
onClose(event);
|
|
231
|
+
}
|
|
210
232
|
});
|
|
211
|
-
const overlayProps = showOverlay
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
},
|
|
219
|
-
};
|
|
233
|
+
const overlayProps = showOverlay ? overlayEventHandlers : {
|
|
234
|
+
onKeyDown: (event) => {
|
|
235
|
+
if (keyboardMatch(event.nativeEvent, keyboardKeys.Escape)) {
|
|
236
|
+
onClose(event);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
220
240
|
if (INVISIBLE_FOR_BREAKPOINTS.includes(breakpoint) || isServerEnv) {
|
|
221
|
-
|
|
241
|
+
return null;
|
|
222
242
|
}
|
|
223
243
|
const modalHeaderProps = {
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
244
|
+
title,
|
|
245
|
+
titleElement,
|
|
246
|
+
titleAlignment,
|
|
247
|
+
titleSize,
|
|
248
|
+
titleMaxLines,
|
|
249
|
+
titleDescription,
|
|
250
|
+
titleDescriptionMaxLines,
|
|
251
|
+
titleStyle,
|
|
252
|
+
titleDescriptionStyle,
|
|
253
|
+
headerImageUrl,
|
|
254
|
+
headerImage,
|
|
255
|
+
headerHeight,
|
|
256
|
+
options,
|
|
257
|
+
actions,
|
|
258
|
+
actionLink
|
|
239
259
|
};
|
|
240
260
|
const isTreeSelectorChild = Children.toArray(children).some(isValidTreeSelectorWrapper);
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
261
|
+
const isActionBarHaveProgressBar = !!footer && isActionBarComponent(footer) && Boolean(footer.props.showProgress) && isProgressBarComponent(footer.props.showProgress);
|
|
262
|
+
return createPortal(
|
|
263
|
+
/* @__PURE__ */ jsx(
|
|
264
|
+
CSSTransition,
|
|
265
|
+
{
|
|
266
|
+
appear: true,
|
|
267
|
+
in: visible && !isServerEnv,
|
|
268
|
+
nodeRef: overlayRef,
|
|
269
|
+
onEntering,
|
|
270
|
+
onEntered,
|
|
271
|
+
onExit,
|
|
272
|
+
onExited,
|
|
273
|
+
classNames: CSS_CLASSES[position],
|
|
274
|
+
timeout: animationTimeout,
|
|
275
|
+
unmountOnExit: true,
|
|
276
|
+
children: /* @__PURE__ */ jsx(ThemeWrapper, { children: (themeClass) => /* @__PURE__ */ jsx(Layer, { layer: "modal", children: /* @__PURE__ */ jsx(
|
|
277
|
+
"div",
|
|
278
|
+
{
|
|
279
|
+
...overlayProps,
|
|
280
|
+
ref: overlayRef,
|
|
281
|
+
className: classnames(styles.modalOverlay, themeClass, {
|
|
282
|
+
[styles.modalOverlayWithBackground]: showOverlay,
|
|
283
|
+
[styles.modalOverlayLeft]: position === "left",
|
|
284
|
+
[styles.modalOverlayRight]: position === "right"
|
|
285
|
+
}),
|
|
286
|
+
"data-qa": "modal-overlay",
|
|
287
|
+
children: /* @__PURE__ */ jsx(CloseByClickOutsideContext.Provider, { value: overlayRef, children: /* @__PURE__ */ jsxs(
|
|
288
|
+
"div",
|
|
289
|
+
{
|
|
290
|
+
...rest,
|
|
291
|
+
...additionalProps,
|
|
292
|
+
"aria-modal": visible && showOverlay && !isServerEnv,
|
|
293
|
+
role: "dialog",
|
|
294
|
+
className: classnames(styles.modal, {
|
|
295
|
+
[styles.sizeSmall]: size === "small",
|
|
296
|
+
[styles.sizeMedium]: size === "medium",
|
|
297
|
+
[styles.modalFullHeight]: height === "full-screen" || isTreeSelectorChild,
|
|
298
|
+
[styles.noVerticalPaddings]: isVerticalPaddingsDisabled,
|
|
299
|
+
[styles.noHorizontalPaddings]: isHorizontalPaddingsDisabled,
|
|
300
|
+
[styles.modalWithBorder]: !showOverlay
|
|
301
|
+
}),
|
|
302
|
+
ref: modalRefCallback,
|
|
303
|
+
tabIndex: -1,
|
|
304
|
+
style: {
|
|
305
|
+
height: typeof height === "number" ? `${height}px` : void 0,
|
|
306
|
+
minHeight: typeof minHeight === "number" ? `min(calc(100vh - 12px * 2), ${minHeight}px)` : void 0
|
|
307
|
+
},
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ jsx(
|
|
310
|
+
ModalContentWithHeader,
|
|
311
|
+
{
|
|
312
|
+
...modalHeaderProps,
|
|
313
|
+
labelId,
|
|
314
|
+
isTreeSelectorChild,
|
|
315
|
+
height,
|
|
316
|
+
showDivider: !isActionBarHaveProgressBar,
|
|
317
|
+
children
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
!!footer && /* @__PURE__ */ jsx("div", { className: styles.modalFooter, "data-qa": "modal-footer", children: isActionBarComponent(footer) ? cloneElement(footer, {
|
|
321
|
+
type: footer.props.type || "auto",
|
|
322
|
+
padding: footer.props.padding || DEFAULT_ACTION_BAR_PADDING,
|
|
323
|
+
showDivider: false
|
|
324
|
+
}) : footer })
|
|
325
|
+
]
|
|
326
|
+
}
|
|
327
|
+
) })
|
|
328
|
+
}
|
|
329
|
+
) }) })
|
|
330
|
+
}
|
|
331
|
+
),
|
|
332
|
+
host || document.body
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
Modal.displayName = "Modal";
|
|
271
337
|
|
|
272
338
|
export { Modal };
|
|
273
339
|
//# sourceMappingURL=Modal.js.map
|