@alfalab/core-components-universal-modal 3.2.5 → 3.2.6-alfasans
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/Context.d.ts +1 -1
- package/Context.js +1 -1
- package/Context.js.map +1 -1
- package/components/base-content/index.css +1 -1
- package/components/base-content/index.module.css.js +1 -1
- package/components/base-footer/index.css +3 -3
- package/components/base-footer/index.module.css.js +1 -1
- package/components/base-header/index.css +4 -4
- package/components/base-header/index.module.css.js +1 -1
- package/cssm/Context.d.ts +1 -1
- package/cssm/Context.js +1 -1
- package/cssm/Context.js.map +1 -1
- package/cssm/desktop/Component.desktop.d.ts +1 -1
- package/cssm/desktop/components/center-modal/center-modal.js +2 -2
- package/cssm/desktop/components/center-modal/center-modal.js.map +1 -1
- package/cssm/desktop/components/footer/index.d.ts +2 -7
- package/cssm/desktop/components/footer/index.js.map +1 -1
- package/cssm/desktop/components/header/desktop.module.css +11 -6
- package/cssm/desktop/components/modal-content/modal-content.js +2 -9
- package/cssm/desktop/components/modal-content/modal-content.js.map +1 -1
- package/cssm/desktop/components/side-modal/side-modal.js +2 -2
- package/cssm/desktop/components/side-modal/side-modal.js.map +1 -1
- package/cssm/desktop/types/props.d.ts +1 -1
- package/cssm/mobile/components/header/index.module.css +9 -6
- package/cssm/mobile/types/props.d.ts +1 -1
- package/desktop/Component.desktop.d.ts +1 -1
- package/desktop/components/center-modal/center-modal.js +2 -2
- package/desktop/components/center-modal/center-modal.js.map +1 -1
- package/desktop/components/center-modal/index.css +1104 -1104
- package/desktop/components/center-modal/index.module.css.js +1 -1
- package/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/desktop/components/footer/desktop.css +1 -1
- package/desktop/components/footer/desktop.module.css.js +1 -1
- package/desktop/components/footer/index.d.ts +2 -7
- package/desktop/components/footer/index.js.map +1 -1
- package/desktop/components/footer/layout.css +9 -9
- package/desktop/components/footer/layout.module.css.js +1 -1
- package/desktop/components/header/desktop.css +16 -11
- package/desktop/components/header/desktop.module.css.js +1 -1
- package/desktop/components/modal-content/modal-content.css +4 -4
- package/desktop/components/modal-content/modal-content.js +2 -9
- package/desktop/components/modal-content/modal-content.js.map +1 -1
- package/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/desktop/components/side-modal/index.css +1106 -1106
- package/desktop/components/side-modal/index.module.css.js +1 -1
- package/desktop/components/side-modal/side-modal.js +2 -2
- package/desktop/components/side-modal/side-modal.js.map +1 -1
- package/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/desktop/types/props.d.ts +1 -1
- package/esm/Context.d.ts +1 -1
- package/esm/Context.js +1 -1
- package/esm/Context.js.map +1 -1
- package/esm/components/base-content/index.css +1 -1
- package/esm/components/base-content/index.module.css.js +1 -1
- package/esm/components/base-footer/index.css +3 -3
- package/esm/components/base-footer/index.module.css.js +1 -1
- package/esm/components/base-header/index.css +4 -4
- package/esm/components/base-header/index.module.css.js +1 -1
- package/esm/desktop/Component.desktop.d.ts +1 -1
- package/esm/desktop/components/center-modal/center-modal.js +2 -2
- package/esm/desktop/components/center-modal/center-modal.js.map +1 -1
- package/esm/desktop/components/center-modal/index.css +1104 -1104
- package/esm/desktop/components/center-modal/index.module.css.js +1 -1
- package/esm/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/esm/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/esm/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/esm/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/esm/desktop/components/footer/desktop.css +1 -1
- package/esm/desktop/components/footer/desktop.module.css.js +1 -1
- package/esm/desktop/components/footer/index.d.ts +2 -7
- package/esm/desktop/components/footer/index.js.map +1 -1
- package/esm/desktop/components/footer/layout.css +9 -9
- package/esm/desktop/components/footer/layout.module.css.js +1 -1
- package/esm/desktop/components/header/desktop.css +16 -11
- package/esm/desktop/components/header/desktop.module.css.js +1 -1
- package/esm/desktop/components/modal-content/modal-content.css +4 -4
- package/esm/desktop/components/modal-content/modal-content.js +2 -8
- package/esm/desktop/components/modal-content/modal-content.js.map +1 -1
- package/esm/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/esm/desktop/components/side-modal/index.css +1106 -1106
- package/esm/desktop/components/side-modal/index.module.css.js +1 -1
- package/esm/desktop/components/side-modal/side-modal.js +2 -2
- package/esm/desktop/components/side-modal/side-modal.js.map +1 -1
- package/esm/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/esm/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/esm/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/esm/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/esm/desktop/types/props.d.ts +1 -1
- package/esm/mobile/components/content/index.css +3 -3
- package/esm/mobile/components/content/index.module.css.js +1 -1
- package/esm/mobile/components/footer/index.css +2 -2
- package/esm/mobile/components/footer/index.module.css.js +1 -1
- package/esm/mobile/components/footer/layout.mobile.css +9 -9
- package/esm/mobile/components/footer/layout.mobile.module.css.js +1 -1
- package/esm/mobile/components/header/index.css +12 -9
- package/esm/mobile/components/header/index.module.css.js +1 -1
- package/esm/mobile/mobile.css +3 -3
- package/esm/mobile/mobile.module.css.js +1 -1
- package/esm/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/esm/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/esm/mobile/transitions/transitions.mobile.css +7 -7
- package/esm/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/esm/mobile/types/props.d.ts +1 -1
- package/mobile/components/content/index.css +3 -3
- package/mobile/components/content/index.module.css.js +1 -1
- package/mobile/components/footer/index.css +2 -2
- package/mobile/components/footer/index.module.css.js +1 -1
- package/mobile/components/footer/layout.mobile.css +9 -9
- package/mobile/components/footer/layout.mobile.module.css.js +1 -1
- package/mobile/components/header/index.css +12 -9
- package/mobile/components/header/index.module.css.js +1 -1
- package/mobile/mobile.css +3 -3
- package/mobile/mobile.module.css.js +1 -1
- package/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/mobile/transitions/transitions.mobile.css +7 -7
- package/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/mobile/types/props.d.ts +1 -1
- package/modern/Context.d.ts +1 -1
- package/modern/Context.js +1 -1
- package/modern/Context.js.map +1 -1
- package/modern/components/base-content/index.css +1 -1
- package/modern/components/base-content/index.module.css.js +1 -1
- package/modern/components/base-footer/index.css +3 -3
- package/modern/components/base-footer/index.module.css.js +1 -1
- package/modern/components/base-header/index.css +4 -4
- package/modern/components/base-header/index.module.css.js +1 -1
- package/modern/desktop/Component.desktop.d.ts +1 -1
- package/modern/desktop/components/center-modal/center-modal.js +2 -2
- package/modern/desktop/components/center-modal/center-modal.js.map +1 -1
- package/modern/desktop/components/center-modal/index.css +1104 -1104
- package/modern/desktop/components/center-modal/index.module.css.js +1 -1
- package/modern/desktop/components/center-modal/transitions/safari-transitions.css +7 -7
- package/modern/desktop/components/center-modal/transitions/safari-transitions.module.css.js +1 -1
- package/modern/desktop/components/center-modal/transitions/transitions.css +7 -7
- package/modern/desktop/components/center-modal/transitions/transitions.module.css.js +1 -1
- package/modern/desktop/components/footer/desktop.css +1 -1
- package/modern/desktop/components/footer/desktop.module.css.js +1 -1
- package/modern/desktop/components/footer/index.d.ts +2 -7
- package/modern/desktop/components/footer/index.js.map +1 -1
- package/modern/desktop/components/footer/layout.css +9 -9
- package/modern/desktop/components/footer/layout.module.css.js +1 -1
- package/modern/desktop/components/header/desktop.css +16 -11
- package/modern/desktop/components/header/desktop.module.css.js +1 -1
- package/modern/desktop/components/modal-content/modal-content.css +4 -4
- package/modern/desktop/components/modal-content/modal-content.js +2 -8
- package/modern/desktop/components/modal-content/modal-content.js.map +1 -1
- package/modern/desktop/components/modal-content/modal-content.module.css.js +1 -1
- package/modern/desktop/components/side-modal/index.css +1106 -1106
- package/modern/desktop/components/side-modal/index.module.css.js +1 -1
- package/modern/desktop/components/side-modal/side-modal.js +2 -2
- package/modern/desktop/components/side-modal/side-modal.js.map +1 -1
- package/modern/desktop/components/side-modal/transitions/transitions.css +71 -71
- package/modern/desktop/components/side-modal/transitions/transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.css +13 -13
- package/modern/desktop/styles/transitions/full-size-backdrop-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-bottom-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-center-transitions.module.css.js +1 -1
- package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.css +7 -7
- package/modern/desktop/styles/transitions/full-size-vertical-top-transitions.module.css.js +1 -1
- package/modern/desktop/types/props.d.ts +1 -1
- package/modern/mobile/components/content/index.css +3 -3
- package/modern/mobile/components/content/index.module.css.js +1 -1
- package/modern/mobile/components/footer/index.css +2 -2
- package/modern/mobile/components/footer/index.module.css.js +1 -1
- package/modern/mobile/components/footer/layout.mobile.css +9 -9
- package/modern/mobile/components/footer/layout.mobile.module.css.js +1 -1
- package/modern/mobile/components/header/index.css +12 -9
- package/modern/mobile/components/header/index.module.css.js +1 -1
- package/modern/mobile/mobile.css +3 -3
- package/modern/mobile/mobile.module.css.js +1 -1
- package/modern/mobile/transitions/right-side-transitions.mobile.css +7 -7
- package/modern/mobile/transitions/right-side-transitions.mobile.module.css.js +1 -1
- package/modern/mobile/transitions/transitions.mobile.css +7 -7
- package/modern/mobile/transitions/transitions.mobile.module.css.js +1 -1
- package/modern/mobile/types/props.d.ts +1 -1
- package/moderncssm/Context.d.ts +1 -1
- package/moderncssm/Context.js +1 -1
- package/moderncssm/Context.js.map +1 -1
- package/moderncssm/desktop/Component.desktop.d.ts +1 -1
- package/moderncssm/desktop/components/center-modal/center-modal.js +2 -2
- package/moderncssm/desktop/components/center-modal/center-modal.js.map +1 -1
- package/moderncssm/desktop/components/footer/index.d.ts +2 -7
- package/moderncssm/desktop/components/footer/index.js.map +1 -1
- package/moderncssm/desktop/components/header/desktop.module.css +8 -4
- package/moderncssm/desktop/components/modal-content/modal-content.js +2 -8
- package/moderncssm/desktop/components/modal-content/modal-content.js.map +1 -1
- package/moderncssm/desktop/components/side-modal/side-modal.js +2 -2
- package/moderncssm/desktop/components/side-modal/side-modal.js.map +1 -1
- package/moderncssm/desktop/types/props.d.ts +1 -1
- package/moderncssm/mobile/components/header/index.module.css +6 -4
- package/moderncssm/mobile/types/props.d.ts +1 -1
- package/package.json +9 -9
- package/src/Context.ts +1 -1
- package/src/desktop/components/center-modal/center-modal.tsx +5 -3
- package/src/desktop/components/footer/index.tsx +1 -6
- package/src/desktop/components/modal-content/modal-content.tsx +1 -9
- package/src/desktop/components/side-modal/side-modal.tsx +5 -3
- package/src/desktop/types/props.ts +1 -0
- package/src/mobile/types/props.ts +2 -0
- package/cssm/desktop/hooks/use-modal-highlighted.d.ts +0 -13
- package/cssm/desktop/hooks/use-modal-highlighted.js +0 -57
- package/cssm/desktop/hooks/use-modal-highlighted.js.map +0 -1
- package/desktop/hooks/use-modal-highlighted.d.ts +0 -13
- package/desktop/hooks/use-modal-highlighted.js +0 -57
- package/desktop/hooks/use-modal-highlighted.js.map +0 -1
- package/esm/desktop/hooks/use-modal-highlighted.d.ts +0 -13
- package/esm/desktop/hooks/use-modal-highlighted.js +0 -53
- package/esm/desktop/hooks/use-modal-highlighted.js.map +0 -1
- package/modern/desktop/hooks/use-modal-highlighted.d.ts +0 -13
- package/modern/desktop/hooks/use-modal-highlighted.js +0 -52
- package/modern/desktop/hooks/use-modal-highlighted.js.map +0 -1
- package/moderncssm/desktop/hooks/use-modal-highlighted.d.ts +0 -13
- package/moderncssm/desktop/hooks/use-modal-highlighted.js +0 -52
- package/moderncssm/desktop/hooks/use-modal-highlighted.js.map +0 -1
- package/src/desktop/hooks/use-modal-highlighted.ts +0 -75
package/esm/Context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Context.js","sources":["../src/Context.ts"],"sourcesContent":["import { BaseModalContext } from '@alfalab/core-components-base-modal';\n\n/**\n * @deprecated
|
|
1
|
+
{"version":3,"file":"Context.js","sources":["../src/Context.ts"],"sourcesContent":["import { BaseModalContext } from '@alfalab/core-components-base-modal';\n\n/**\n * @deprecated В будущем контекст будет удалён. Обрабатывайте состояния компонента самостоятельно.\n */\nexport const ModalContext = BaseModalContext;\n"],"names":[],"mappings":";;AAEA;;AAEG;AACI,IAAM,YAAY,GAAG;;;;"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
--universal-modal-footer-highlight-background: var(--color-light-modal-bg-primary);
|
|
12
12
|
--universal-modal-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-neutral-300);
|
|
13
13
|
}
|
|
14
|
-
.universal-
|
|
14
|
+
.universal-modal__footer_y2hw6 {
|
|
15
15
|
width: 100%;
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
transition:
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
background 0.2s ease;
|
|
20
20
|
padding: var(--gap-16) var(--gap-32) var(--gap-32);
|
|
21
21
|
}
|
|
22
|
-
.universal-
|
|
22
|
+
.universal-modal__sticky_y2hw6 {
|
|
23
23
|
background: var(--universal-modal-footer-background);
|
|
24
24
|
position: sticky;
|
|
25
25
|
z-index: 1;
|
|
26
26
|
}
|
|
27
|
-
.universal-
|
|
27
|
+
.universal-modal__highlighted_y2hw6 {
|
|
28
28
|
background: var(--universal-modal-footer-highlight-background);
|
|
29
29
|
box-shadow: var(--universal-modal-footer-highlight-box-shadow);
|
|
30
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"footer":"universal-
|
|
3
|
+
var styles = {"footer":"universal-modal__footer_y2hw6","sticky":"universal-modal__sticky_y2hw6","highlighted":"universal-modal__highlighted_y2hw6"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
--universal-modal-header-highlight-background: var(--color-light-modal-bg-primary);
|
|
11
11
|
--universal-modal-header-highlight-box-shadow: 0 1px 0 0 var(--color-light-neutral-300);
|
|
12
12
|
}
|
|
13
|
-
.universal-
|
|
13
|
+
.universal-modal__header_49r0q {
|
|
14
14
|
width: 100%;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
transition:
|
|
17
17
|
box-shadow 0.2s ease,
|
|
18
18
|
background 0.2s ease;
|
|
19
19
|
}
|
|
20
|
-
.universal-
|
|
20
|
+
.universal-modal__header_49r0q.universal-modal__highlighted_49r0q {
|
|
21
21
|
background: var(--universal-modal-header-highlight-background);
|
|
22
22
|
box-shadow: var(--universal-modal-header-highlight-box-shadow);
|
|
23
23
|
}
|
|
24
|
-
.universal-
|
|
24
|
+
.universal-modal__header_49r0q.universal-modal__sticky_49r0q {
|
|
25
25
|
position: sticky;
|
|
26
26
|
top: var(--gap-0);
|
|
27
27
|
z-index: 1;
|
|
28
28
|
}
|
|
29
|
-
.universal-
|
|
29
|
+
.universal-modal__header_49r0q.universal-modal__sticky_49r0q.universal-modal__hasContent_49r0q {
|
|
30
30
|
background: var(--universal-modal-header-background);
|
|
31
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"header":"universal-
|
|
3
|
+
var styles = {"header":"universal-modal__header_49r0q","highlighted":"universal-modal__highlighted_49r0q","sticky":"universal-modal__sticky_49r0q","hasContent":"universal-modal__hasContent_49r0q"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -4,5 +4,5 @@ export declare const UniversalModalDesktopComponent: React.ForwardRefExoticCompo
|
|
|
4
4
|
export declare const UniversalModalDesktop: React.ForwardRefExoticComponent<UniversalModalDesktopProps & React.RefAttributes<HTMLDivElement>> & {
|
|
5
5
|
Header: React.ForwardRefExoticComponent<import("./components/header").HeaderDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
Content: React.FC<import("../components/base-content").ContentProps>;
|
|
7
|
-
Footer: React.ForwardRefExoticComponent<import("
|
|
7
|
+
Footer: React.ForwardRefExoticComponent<import("../components/base-footer").FooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
};
|
|
@@ -21,7 +21,7 @@ import transitions from './transitions/transitions.module.css.js';
|
|
|
21
21
|
var transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;
|
|
22
22
|
var CenterModal = forwardRef(function (props, ref) {
|
|
23
23
|
var _a;
|
|
24
|
-
var dataTestId = props.dataTestId, className = props.className, open = props.open, children = props.children, _b = props.width, width = _b === void 0 ? 500 : _b, _c = props.height, height = _c === void 0 ? 'hugContent' : _c, _d = props.verticalAlign, verticalAlign = _d === void 0 ? 'center' : _d, _e = props.overlay, overlay = _e === void 0 ? true : _e, margin = props.margin, scrollableContainerRefProp = props.scrollableContainerRef, onClose = props.onClose, restProps = __rest(props, ["dataTestId", "className", "open", "children", "width", "height", "verticalAlign", "overlay", "margin", "scrollableContainerRef", "onClose"]);
|
|
24
|
+
var dataTestId = props.dataTestId, className = props.className, open = props.open, children = props.children, _b = props.width, width = _b === void 0 ? 500 : _b, _c = props.height, height = _c === void 0 ? 'hugContent' : _c, _d = props.verticalAlign, verticalAlign = _d === void 0 ? 'center' : _d, _e = props.overlay, overlay = _e === void 0 ? true : _e, margin = props.margin, scrollableContainerRefProp = props.scrollableContainerRef, onClose = props.onClose, wrapperClassName = props.wrapperClassName, restProps = __rest(props, ["dataTestId", "className", "open", "children", "width", "height", "verticalAlign", "overlay", "margin", "scrollableContainerRef", "onClose", "wrapperClassName"]);
|
|
25
25
|
var componentRef = useRef(null);
|
|
26
26
|
var _f = useScrollableContainerRef({
|
|
27
27
|
overlay: overlay,
|
|
@@ -29,7 +29,7 @@ var CenterModal = forwardRef(function (props, ref) {
|
|
|
29
29
|
}), handleWheel = _f.handleWheel, scrollableContainerRef = _f.scrollableContainerRef;
|
|
30
30
|
var _g = getFullSizeModalTransitions({ verticalAlign: verticalAlign, width: width, height: height }), isFullSizeModal = _g.isFullSizeModal, fullSizeModalContentTransitions = _g.componentTransitions, fullSizeModalBackdropTransitions = _g.backdropTransitions;
|
|
31
31
|
var withoutOverlay = !overlay;
|
|
32
|
-
return (React.createElement(BaseModal, __assign({}, restProps, { open: open, dataTestId: dataTestId, ref: ref, componentRef: componentRef, scrollHandler:
|
|
32
|
+
return (React.createElement(BaseModal, __assign({}, restProps, { open: open, dataTestId: dataTestId, ref: ref, componentRef: componentRef, scrollHandler: scrollableContainerRef, scrollContainerFillsViewport: false, disableBlockingScroll: withoutOverlay, wrapperClassName: cn(styles.baseModalContainer, wrapperClassName, (_a = {},
|
|
33
33
|
_a[styles.wrapperJustifyStart] = verticalAlign === 'top',
|
|
34
34
|
_a[styles.wrapperJustifyCenter] = verticalAlign === 'center',
|
|
35
35
|
_a[styles.wrapperJustifyEnd] = verticalAlign === 'bottom',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"center-modal.js","sources":["../../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightCapStyles } from '../../utils/get-height-cap-styles';\nimport { getHeightValue } from '../../utils/get-height-value';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthCapStyles } from '../../utils/get-width-cap-styles';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n/*\n * в safari position:sticky некорректно синхронизируется с transform:scale на предке —\n * sticky-футер \"доезжает\" при анимации, поэтому применяем немного другую анимацию\n */\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler=
|
|
1
|
+
{"version":3,"file":"center-modal.js","sources":["../../../../src/desktop/components/center-modal/center-modal.tsx"],"sourcesContent":["import React, { forwardRef, type MutableRefObject, useRef } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModal } from '@alfalab/core-components-base-modal';\nimport { isMacOS, isSafari } from '@alfalab/core-components-shared';\n\nimport { useScrollableContainerRef } from '../../hooks/use-scrollable-container-ref';\nimport { type UniversalModalDesktopProps } from '../../types/props';\nimport { getFullSizeModalTransitions } from '../../utils/get-full-size-modal-transitions';\nimport { getHeightCapStyles } from '../../utils/get-height-cap-styles';\nimport { getHeightValue } from '../../utils/get-height-value';\nimport { getMarginStyles } from '../../utils/get-margin-styles';\nimport { getWidthCapStyles } from '../../utils/get-width-cap-styles';\nimport { ModalContent } from '../modal-content/modal-content';\n\nimport styles from './index.module.css';\nimport safariTransitions from './transitions/safari-transitions.module.css';\nimport transitions from './transitions/transitions.module.css';\n\n/*\n * в safari position:sticky некорректно синхронизируется с transform:scale на предке —\n * sticky-футер \"доезжает\" при анимации, поэтому применяем немного другую анимацию\n */\nconst transitionProps = isMacOS() && isSafari() ? safariTransitions : transitions;\n\nexport const CenterModal = forwardRef<HTMLDivElement, UniversalModalDesktopProps>((props, ref) => {\n const {\n dataTestId,\n className,\n open,\n children,\n width = 500,\n height = 'hugContent',\n verticalAlign = 'center',\n overlay = true,\n margin,\n scrollableContainerRef: scrollableContainerRefProp,\n onClose,\n wrapperClassName,\n ...restProps\n } = props;\n\n const componentRef = useRef<HTMLDivElement>(null);\n const { handleWheel, scrollableContainerRef } = useScrollableContainerRef({\n overlay,\n refObject: scrollableContainerRefProp,\n });\n\n const {\n isFullSizeModal,\n componentTransitions: fullSizeModalContentTransitions,\n backdropTransitions: fullSizeModalBackdropTransitions,\n } = getFullSizeModalTransitions({ verticalAlign, width, height });\n\n const withoutOverlay = !overlay;\n\n return (\n <BaseModal\n {...restProps}\n open={open}\n dataTestId={dataTestId}\n ref={ref}\n componentRef={componentRef}\n scrollHandler={scrollableContainerRef as MutableRefObject<HTMLDivElement | null>}\n scrollContainerFillsViewport={false}\n disableBlockingScroll={withoutOverlay}\n wrapperClassName={cn(styles.baseModalContainer, wrapperClassName, {\n [styles.wrapperJustifyStart]: verticalAlign === 'top',\n [styles.wrapperJustifyCenter]: verticalAlign === 'center',\n [styles.wrapperJustifyEnd]: verticalAlign === 'bottom',\n [styles.withoutOverlay]: withoutOverlay,\n })}\n className={cn(\n styles.component,\n className,\n styles.baseModalComponent,\n getMarginStyles({ styles, margin }),\n getHeightCapStyles({ styles, margin }),\n getWidthCapStyles({ styles, margin }),\n )}\n transitionProps={{\n classNames: transitionProps,\n ...(isFullSizeModal && fullSizeModalContentTransitions),\n ...restProps.transitionProps,\n }}\n backdropProps={{\n shouldRender: overlay,\n ...(isFullSizeModal && fullSizeModalBackdropTransitions),\n ...restProps.backdropProps,\n }}\n componentDivProps={{\n style: {\n width: width === 'fullWidth' ? '100%' : width,\n height: getHeightValue(height),\n },\n }}\n onWheel={handleWheel}\n onClose={onClose}\n >\n <ModalContent height={height} scrollableContainerRef={scrollableContainerRef}>\n {children}\n </ModalContent>\n </BaseModal>\n );\n});\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAmBA;;;AAGG;AACH,IAAM,eAAe,GAAG,OAAO,EAAE,IAAI,QAAQ,EAAE,GAAG,iBAAiB,GAAG,WAAW;IAEpE,WAAW,GAAG,UAAU,CAA6C,UAAC,KAAK,EAAE,GAAG,E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