@alfalab/core-components-base-modal 5.0.3 → 5.0.4
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/Component.js +2 -2
- package/cssm/Component.js +1 -1
- package/esm/Component.js +2 -2
- package/esm/index.css +13 -13
- package/index.css +13 -13
- package/modern/Component.js +2 -2
- package/modern/index.css +13 -13
- package/package.json +2 -2
package/Component.js
CHANGED
|
@@ -49,7 +49,7 @@ var __assign = function () {
|
|
|
49
49
|
return __assign.apply(this, arguments);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
var styles = {"component":"base-
|
|
52
|
+
var styles = {"component":"base-modal__component_pnet3","wrapper":"base-modal__wrapper_pnet3","content":"base-modal__content_pnet3","hidden":"base-modal__hidden_pnet3","backdrop":"base-modal__backdrop_pnet3","appear":"base-modal__appear_pnet3","enter":"base-modal__enter_pnet3","appearActive":"base-modal__appearActive_pnet3","enterActive":"base-modal__enterActive_pnet3","exit":"base-modal__exit_pnet3","exitActive":"base-modal__exitActive_pnet3","exitDone":"base-modal__exitDone_pnet3"};
|
|
53
53
|
require('./index.css')
|
|
54
54
|
|
|
55
55
|
var BaseModalContext = React__default['default'].createContext({
|
|
@@ -260,7 +260,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
260
260
|
return null;
|
|
261
261
|
return (React__default['default'].createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) {
|
|
262
262
|
var _a;
|
|
263
|
-
return (React__default['default'].createElement(coreComponentsPortal.Portal, { getPortalContainer: container },
|
|
263
|
+
return (React__default['default'].createElement(coreComponentsPortal.Portal, { getPortalContainer: container, immediateMount: true },
|
|
264
264
|
React__default['default'].createElement(BaseModalContext.Provider, { value: contextValue },
|
|
265
265
|
React__default['default'].createElement(FocusLock__default['default'], { autoFocus: !disableAutoFocus, disabled: disableFocusLock || !open, returnFocus: !disableRestoreFocus },
|
|
266
266
|
Backdrop && (React__default['default'].createElement(Backdrop, __assign({}, backdropProps, { className: cn__default['default'](backdropProps.className, styles.backdrop), open: open, style: {
|
package/cssm/Component.js
CHANGED
|
@@ -259,7 +259,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
259
259
|
return null;
|
|
260
260
|
return (React__default['default'].createElement(coreComponentsStack.Stack, { value: zIndex }, function (computedZIndex) {
|
|
261
261
|
var _a;
|
|
262
|
-
return (React__default['default'].createElement(coreComponentsPortal.Portal, { getPortalContainer: container },
|
|
262
|
+
return (React__default['default'].createElement(coreComponentsPortal.Portal, { getPortalContainer: container, immediateMount: true },
|
|
263
263
|
React__default['default'].createElement(BaseModalContext.Provider, { value: contextValue },
|
|
264
264
|
React__default['default'].createElement(FocusLock__default['default'], { autoFocus: !disableAutoFocus, disabled: disableFocusLock || !open, returnFocus: !disableRestoreFocus },
|
|
265
265
|
Backdrop && (React__default['default'].createElement(Backdrop, __assign({}, backdropProps, { className: cn__default['default'](backdropProps.className, styles__default['default'].backdrop), open: open, style: {
|
package/esm/Component.js
CHANGED
|
@@ -38,7 +38,7 @@ var __assign = function () {
|
|
|
38
38
|
return __assign.apply(this, arguments);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
var styles = {"component":"base-
|
|
41
|
+
var styles = {"component":"base-modal__component_pnet3","wrapper":"base-modal__wrapper_pnet3","content":"base-modal__content_pnet3","hidden":"base-modal__hidden_pnet3","backdrop":"base-modal__backdrop_pnet3","appear":"base-modal__appear_pnet3","enter":"base-modal__enter_pnet3","appearActive":"base-modal__appearActive_pnet3","enterActive":"base-modal__enterActive_pnet3","exit":"base-modal__exit_pnet3","exitActive":"base-modal__exitActive_pnet3","exitDone":"base-modal__exitDone_pnet3"};
|
|
42
42
|
require('./index.css')
|
|
43
43
|
|
|
44
44
|
var BaseModalContext = React.createContext({
|
|
@@ -249,7 +249,7 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
249
249
|
return null;
|
|
250
250
|
return (React.createElement(Stack, { value: zIndex }, function (computedZIndex) {
|
|
251
251
|
var _a;
|
|
252
|
-
return (React.createElement(Portal, { getPortalContainer: container },
|
|
252
|
+
return (React.createElement(Portal, { getPortalContainer: container, immediateMount: true },
|
|
253
253
|
React.createElement(BaseModalContext.Provider, { value: contextValue },
|
|
254
254
|
React.createElement(FocusLock, { autoFocus: !disableAutoFocus, disabled: disableFocusLock || !open, returnFocus: !disableRestoreFocus },
|
|
255
255
|
Backdrop$1 && (React.createElement(Backdrop$1, __assign({}, backdropProps, { className: cn(backdropProps.className, styles.backdrop), open: open, style: {
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1kbo0 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.base-
|
|
13
|
+
.base-modal__component_pnet3 {
|
|
14
14
|
position: relative;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
background: var(--color-light-bg-primary);
|
|
17
17
|
margin: auto;
|
|
18
18
|
flex-shrink: 0;
|
|
19
19
|
}
|
|
20
|
-
.base-
|
|
20
|
+
.base-modal__wrapper_pnet3 {
|
|
21
21
|
position: fixed;
|
|
22
22
|
top: 0;
|
|
23
23
|
left: 0;
|
|
@@ -30,33 +30,33 @@
|
|
|
30
30
|
align-items: center;
|
|
31
31
|
outline: 0;
|
|
32
32
|
}
|
|
33
|
-
.base-
|
|
33
|
+
.base-modal__content_pnet3 {
|
|
34
34
|
width: 100%;
|
|
35
35
|
height: 100%;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
flex: 1;
|
|
39
39
|
}
|
|
40
|
-
.base-
|
|
40
|
+
.base-modal__hidden_pnet3 {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_pnet3 {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_pnet3,
|
|
47
|
+
.base-modal__enter_pnet3 {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_pnet3,
|
|
51
|
+
.base-modal__enterActive_pnet3 {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_pnet3 {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_pnet3,
|
|
59
|
+
.base-modal__exitDone_pnet3 {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1kbo0 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.base-
|
|
13
|
+
.base-modal__component_pnet3 {
|
|
14
14
|
position: relative;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
background: var(--color-light-bg-primary);
|
|
17
17
|
margin: auto;
|
|
18
18
|
flex-shrink: 0;
|
|
19
19
|
}
|
|
20
|
-
.base-
|
|
20
|
+
.base-modal__wrapper_pnet3 {
|
|
21
21
|
position: fixed;
|
|
22
22
|
top: 0;
|
|
23
23
|
left: 0;
|
|
@@ -30,33 +30,33 @@
|
|
|
30
30
|
align-items: center;
|
|
31
31
|
outline: 0;
|
|
32
32
|
}
|
|
33
|
-
.base-
|
|
33
|
+
.base-modal__content_pnet3 {
|
|
34
34
|
width: 100%;
|
|
35
35
|
height: 100%;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
flex: 1;
|
|
39
39
|
}
|
|
40
|
-
.base-
|
|
40
|
+
.base-modal__hidden_pnet3 {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_pnet3 {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_pnet3,
|
|
47
|
+
.base-modal__enter_pnet3 {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_pnet3,
|
|
51
|
+
.base-modal__enterActive_pnet3 {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_pnet3 {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_pnet3,
|
|
59
|
+
.base-modal__exitDone_pnet3 {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/modern/Component.js
CHANGED
|
@@ -11,7 +11,7 @@ import { stackingOrder, Stack } from '@alfalab/core-components-stack/modern';
|
|
|
11
11
|
import '@alfalab/core-components-global-store/modern';
|
|
12
12
|
import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerStyles, hasScrollbar, getScrollbarSize } from './utils.js';
|
|
13
13
|
|
|
14
|
-
var styles = {"component":"base-
|
|
14
|
+
var styles = {"component":"base-modal__component_pnet3","wrapper":"base-modal__wrapper_pnet3","content":"base-modal__content_pnet3","hidden":"base-modal__hidden_pnet3","backdrop":"base-modal__backdrop_pnet3","appear":"base-modal__appear_pnet3","enter":"base-modal__enter_pnet3","appearActive":"base-modal__appearActive_pnet3","enterActive":"base-modal__enterActive_pnet3","exit":"base-modal__exit_pnet3","exitActive":"base-modal__exitActive_pnet3","exitDone":"base-modal__exitDone_pnet3"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
@@ -219,7 +219,7 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
219
219
|
]);
|
|
220
220
|
if (!shouldRender)
|
|
221
221
|
return null;
|
|
222
|
-
return (React.createElement(Stack, { value: zIndex }, computedZIndex => (React.createElement(Portal, { getPortalContainer: container },
|
|
222
|
+
return (React.createElement(Stack, { value: zIndex }, computedZIndex => (React.createElement(Portal, { getPortalContainer: container, immediateMount: true },
|
|
223
223
|
React.createElement(BaseModalContext.Provider, { value: contextValue },
|
|
224
224
|
React.createElement(FocusLock, { autoFocus: !disableAutoFocus, disabled: disableFocusLock || !open, returnFocus: !disableRestoreFocus },
|
|
225
225
|
Backdrop$1 && (React.createElement(Backdrop$1, Object.assign({}, backdropProps, { className: cn(backdropProps.className, styles.backdrop), open: open, style: {
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1kbo0 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
|
-
.base-
|
|
13
|
+
.base-modal__component_pnet3 {
|
|
14
14
|
position: relative;
|
|
15
15
|
box-sizing: border-box;
|
|
16
16
|
background: var(--color-light-bg-primary);
|
|
17
17
|
margin: auto;
|
|
18
18
|
flex-shrink: 0;
|
|
19
19
|
}
|
|
20
|
-
.base-
|
|
20
|
+
.base-modal__wrapper_pnet3 {
|
|
21
21
|
position: fixed;
|
|
22
22
|
top: 0;
|
|
23
23
|
left: 0;
|
|
@@ -30,33 +30,33 @@
|
|
|
30
30
|
align-items: center;
|
|
31
31
|
outline: 0;
|
|
32
32
|
}
|
|
33
|
-
.base-
|
|
33
|
+
.base-modal__content_pnet3 {
|
|
34
34
|
width: 100%;
|
|
35
35
|
height: 100%;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
38
38
|
flex: 1;
|
|
39
39
|
}
|
|
40
|
-
.base-
|
|
40
|
+
.base-modal__hidden_pnet3 {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_pnet3 {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_pnet3,
|
|
47
|
+
.base-modal__enter_pnet3 {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_pnet3,
|
|
51
|
+
.base-modal__enterActive_pnet3 {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_pnet3 {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_pnet3,
|
|
59
|
+
.base-modal__exitDone_pnet3 {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-base-modal",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "BaseModal component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@alfalab/core-components-backdrop": "^3.0.1",
|
|
17
17
|
"@alfalab/core-components-global-store": "^2.0.1",
|
|
18
|
-
"@alfalab/core-components-portal": "^3.0
|
|
18
|
+
"@alfalab/core-components-portal": "^3.1.0",
|
|
19
19
|
"@alfalab/core-components-stack": "^4.0.1",
|
|
20
20
|
"@juggle/resize-observer": "^3.3.1",
|
|
21
21
|
"classnames": "^2.3.1",
|