@alfalab/core-components-base-modal 5.0.5 → 5.0.6
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 +1 -1
- package/cssm/utils.js +3 -1
- package/esm/Component.js +1 -1
- package/esm/index.css +13 -13
- package/esm/utils.js +3 -1
- package/index.css +13 -13
- package/modern/Component.js +1 -1
- package/modern/index.css +13 -13
- package/modern/utils.js +2 -2
- package/package.json +2 -2
- package/send-stats.js +1 -1
- package/utils.js +3 -1
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_isi5p","wrapper":"base-modal__wrapper_isi5p","content":"base-modal__content_isi5p","hidden":"base-modal__hidden_isi5p","backdrop":"base-modal__backdrop_isi5p","appear":"base-modal__appear_isi5p","enter":"base-modal__enter_isi5p","appearActive":"base-modal__appearActive_isi5p","enterActive":"base-modal__enterActive_isi5p","exit":"base-modal__exit_isi5p","exitActive":"base-modal__exitActive_isi5p","exitDone":"base-modal__exitDone_isi5p"};
|
|
53
53
|
require('./index.css')
|
|
54
54
|
|
|
55
55
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
package/cssm/utils.js
CHANGED
|
@@ -37,7 +37,9 @@ var isOverflowing = function (container) {
|
|
|
37
37
|
}
|
|
38
38
|
return container.scrollHeight > container.clientHeight;
|
|
39
39
|
};
|
|
40
|
-
var getPaddingRight = function (node) {
|
|
40
|
+
var getPaddingRight = function (node) {
|
|
41
|
+
return parseInt(window.getComputedStyle(node).paddingRight, 10) || 0;
|
|
42
|
+
};
|
|
41
43
|
var restoreContainerStyles = function (container) {
|
|
42
44
|
var modalRestoreStyles = coreComponentsGlobalStore.getModalStore().getRestoreStyles();
|
|
43
45
|
var index = modalRestoreStyles.findIndex(function (s) { return s.container === container; });
|
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_isi5p","wrapper":"base-modal__wrapper_isi5p","content":"base-modal__content_isi5p","hidden":"base-modal__hidden_isi5p","backdrop":"base-modal__backdrop_isi5p","appear":"base-modal__appear_isi5p","enter":"base-modal__enter_isi5p","appearActive":"base-modal__appearActive_isi5p","enterActive":"base-modal__enterActive_isi5p","exit":"base-modal__exit_isi5p","exitActive":"base-modal__exitActive_isi5p","exitDone":"base-modal__exitDone_isi5p"};
|
|
42
42
|
require('./index.css')
|
|
43
43
|
|
|
44
44
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vxwwx */
|
|
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_isi5p {
|
|
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_isi5p {
|
|
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_isi5p {
|
|
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_isi5p {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_isi5p {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_isi5p,
|
|
47
|
+
.base-modal__enter_isi5p {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_isi5p,
|
|
51
|
+
.base-modal__enterActive_isi5p {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_isi5p {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_isi5p,
|
|
59
|
+
.base-modal__exitDone_isi5p {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/esm/utils.js
CHANGED
|
@@ -33,7 +33,9 @@ var isOverflowing = function (container) {
|
|
|
33
33
|
}
|
|
34
34
|
return container.scrollHeight > container.clientHeight;
|
|
35
35
|
};
|
|
36
|
-
var getPaddingRight = function (node) {
|
|
36
|
+
var getPaddingRight = function (node) {
|
|
37
|
+
return parseInt(window.getComputedStyle(node).paddingRight, 10) || 0;
|
|
38
|
+
};
|
|
37
39
|
var restoreContainerStyles = function (container) {
|
|
38
40
|
var modalRestoreStyles = getModalStore().getRestoreStyles();
|
|
39
41
|
var index = modalRestoreStyles.findIndex(function (s) { return s.container === container; });
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vxwwx */
|
|
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_isi5p {
|
|
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_isi5p {
|
|
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_isi5p {
|
|
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_isi5p {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_isi5p {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_isi5p,
|
|
47
|
+
.base-modal__enter_isi5p {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_isi5p,
|
|
51
|
+
.base-modal__enterActive_isi5p {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_isi5p {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_isi5p,
|
|
59
|
+
.base-modal__exitDone_isi5p {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/modern/Component.js
CHANGED
|
@@ -11,7 +11,7 @@ import '@alfalab/core-components-global-store/modern';
|
|
|
11
11
|
import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerStyles, hasScrollbar, getScrollbarSize } from './utils.js';
|
|
12
12
|
import './matches-polyfill.js';
|
|
13
13
|
|
|
14
|
-
var styles = {"component":"base-
|
|
14
|
+
var styles = {"component":"base-modal__component_isi5p","wrapper":"base-modal__wrapper_isi5p","content":"base-modal__content_isi5p","hidden":"base-modal__hidden_isi5p","backdrop":"base-modal__backdrop_isi5p","appear":"base-modal__appear_isi5p","enter":"base-modal__enter_isi5p","appearActive":"base-modal__appearActive_isi5p","enterActive":"base-modal__enterActive_isi5p","exit":"base-modal__exit_isi5p","exitActive":"base-modal__exitActive_isi5p","exitDone":"base-modal__exitDone_isi5p"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: vxwwx */
|
|
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_isi5p {
|
|
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_isi5p {
|
|
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_isi5p {
|
|
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_isi5p {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_isi5p {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_isi5p,
|
|
47
|
+
.base-modal__enter_isi5p {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_isi5p,
|
|
51
|
+
.base-modal__enterActive_isi5p {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_isi5p {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_isi5p,
|
|
59
|
+
.base-modal__exitDone_isi5p {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/modern/utils.js
CHANGED
|
@@ -36,7 +36,7 @@ const isOverflowing = (container) => {
|
|
|
36
36
|
const getPaddingRight = (node) => parseInt(window.getComputedStyle(node).paddingRight, 10) || 0;
|
|
37
37
|
const restoreContainerStyles = (container) => {
|
|
38
38
|
const modalRestoreStyles = getModalStore().getRestoreStyles();
|
|
39
|
-
const index = modalRestoreStyles.findIndex(s => s.container === container);
|
|
39
|
+
const index = modalRestoreStyles.findIndex((s) => s.container === container);
|
|
40
40
|
const existingStyles = modalRestoreStyles[index];
|
|
41
41
|
if (!existingStyles)
|
|
42
42
|
return;
|
|
@@ -57,7 +57,7 @@ const handleContainer = (container) => {
|
|
|
57
57
|
if (!container)
|
|
58
58
|
return;
|
|
59
59
|
const modalRestoreStyles = getModalStore().getRestoreStyles();
|
|
60
|
-
const existingStyles = modalRestoreStyles.find(s => s.container === container);
|
|
60
|
+
const existingStyles = modalRestoreStyles.find((s) => s.container === container);
|
|
61
61
|
if (existingStyles) {
|
|
62
62
|
existingStyles.modals += 1;
|
|
63
63
|
return;
|
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.6",
|
|
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.2",
|
|
18
|
-
"@alfalab/core-components-portal": "^3.1.
|
|
18
|
+
"@alfalab/core-components-portal": "^3.1.1",
|
|
19
19
|
"@alfalab/core-components-stack": "^4.0.1",
|
|
20
20
|
"@juggle/resize-observer": "^3.3.1",
|
|
21
21
|
"classnames": "^2.3.1",
|
package/send-stats.js
CHANGED
package/utils.js
CHANGED
|
@@ -37,7 +37,9 @@ var isOverflowing = function (container) {
|
|
|
37
37
|
}
|
|
38
38
|
return container.scrollHeight > container.clientHeight;
|
|
39
39
|
};
|
|
40
|
-
var getPaddingRight = function (node) {
|
|
40
|
+
var getPaddingRight = function (node) {
|
|
41
|
+
return parseInt(window.getComputedStyle(node).paddingRight, 10) || 0;
|
|
42
|
+
};
|
|
41
43
|
var restoreContainerStyles = function (container) {
|
|
42
44
|
var modalRestoreStyles = coreComponentsGlobalStore.getModalStore().getRestoreStyles();
|
|
43
45
|
var index = modalRestoreStyles.findIndex(function (s) { return s.container === container; });
|