@alfalab/core-components-base-modal 5.0.1 → 5.0.2
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 -1
- package/cssm/Component.js +1 -0
- package/cssm/index.js +1 -0
- package/esm/Component.js +2 -1
- package/esm/index.css +13 -13
- package/esm/index.js +1 -0
- package/index.css +13 -13
- package/index.js +1 -0
- package/modern/Component.js +2 -1
- package/modern/index.css +13 -13
- package/modern/index.js +1 -0
- package/package.json +2 -1
package/Component.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
require('element-matches-polyfill');
|
|
6
7
|
var cn = require('classnames');
|
|
7
8
|
var mergeRefs = require('react-merge-refs');
|
|
8
9
|
var resizeObserver = require('@juggle/resize-observer');
|
|
@@ -48,7 +49,7 @@ var __assign = function () {
|
|
|
48
49
|
return __assign.apply(this, arguments);
|
|
49
50
|
};
|
|
50
51
|
|
|
51
|
-
var styles = {"component":"base-
|
|
52
|
+
var styles = {"component":"base-modal__component_jk0n1","wrapper":"base-modal__wrapper_jk0n1","content":"base-modal__content_jk0n1","hidden":"base-modal__hidden_jk0n1","backdrop":"base-modal__backdrop_jk0n1","appear":"base-modal__appear_jk0n1","enter":"base-modal__enter_jk0n1","appearActive":"base-modal__appearActive_jk0n1","enterActive":"base-modal__enterActive_jk0n1","exit":"base-modal__exit_jk0n1","exitActive":"base-modal__exitActive_jk0n1","exitDone":"base-modal__exitDone_jk0n1"};
|
|
52
53
|
require('./index.css')
|
|
53
54
|
|
|
54
55
|
var BaseModalContext = React__default['default'].createContext({
|
package/cssm/Component.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
+
require('element-matches-polyfill');
|
|
6
7
|
var cn = require('classnames');
|
|
7
8
|
var mergeRefs = require('react-merge-refs');
|
|
8
9
|
var resizeObserver = require('@juggle/resize-observer');
|
package/cssm/index.js
CHANGED
package/esm/Component.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
2
|
+
import 'element-matches-polyfill';
|
|
2
3
|
import cn from 'classnames';
|
|
3
4
|
import mergeRefs from 'react-merge-refs';
|
|
4
5
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
@@ -37,7 +38,7 @@ var __assign = function () {
|
|
|
37
38
|
return __assign.apply(this, arguments);
|
|
38
39
|
};
|
|
39
40
|
|
|
40
|
-
var styles = {"component":"base-
|
|
41
|
+
var styles = {"component":"base-modal__component_jk0n1","wrapper":"base-modal__wrapper_jk0n1","content":"base-modal__content_jk0n1","hidden":"base-modal__hidden_jk0n1","backdrop":"base-modal__backdrop_jk0n1","appear":"base-modal__appear_jk0n1","enter":"base-modal__enter_jk0n1","appearActive":"base-modal__appearActive_jk0n1","enterActive":"base-modal__enterActive_jk0n1","exit":"base-modal__exit_jk0n1","exitActive":"base-modal__exitActive_jk0n1","exitDone":"base-modal__exitDone_jk0n1"};
|
|
41
42
|
require('./index.css')
|
|
42
43
|
|
|
43
44
|
var BaseModalContext = React.createContext({
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: negt7 */
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_jk0n1 {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_jk0n1,
|
|
47
|
+
.base-modal__enter_jk0n1 {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_jk0n1,
|
|
51
|
+
.base-modal__enterActive_jk0n1 {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_jk0n1 {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_jk0n1,
|
|
59
|
+
.base-modal__exitDone_jk0n1 {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/esm/index.js
CHANGED
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: negt7 */
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_jk0n1 {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_jk0n1,
|
|
47
|
+
.base-modal__enter_jk0n1 {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_jk0n1,
|
|
51
|
+
.base-modal__enterActive_jk0n1 {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_jk0n1 {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_jk0n1,
|
|
59
|
+
.base-modal__exitDone_jk0n1 {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/index.js
CHANGED
package/modern/Component.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
2
|
+
import 'element-matches-polyfill';
|
|
2
3
|
import cn from 'classnames';
|
|
3
4
|
import mergeRefs from 'react-merge-refs';
|
|
4
5
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
@@ -10,7 +11,7 @@ import { stackingOrder, Stack } from '@alfalab/core-components-stack/modern';
|
|
|
10
11
|
import '@alfalab/core-components-global-store/modern';
|
|
11
12
|
import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerStyles, hasScrollbar, getScrollbarSize } from './utils.js';
|
|
12
13
|
|
|
13
|
-
var styles = {"component":"base-
|
|
14
|
+
var styles = {"component":"base-modal__component_jk0n1","wrapper":"base-modal__wrapper_jk0n1","content":"base-modal__content_jk0n1","hidden":"base-modal__hidden_jk0n1","backdrop":"base-modal__backdrop_jk0n1","appear":"base-modal__appear_jk0n1","enter":"base-modal__enter_jk0n1","appearActive":"base-modal__appearActive_jk0n1","enterActive":"base-modal__enterActive_jk0n1","exit":"base-modal__exit_jk0n1","exitActive":"base-modal__exitActive_jk0n1","exitDone":"base-modal__exitDone_jk0n1"};
|
|
14
15
|
require('./index.css')
|
|
15
16
|
|
|
16
17
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: negt7 */
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
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_jk0n1 {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_jk0n1 {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_jk0n1,
|
|
47
|
+
.base-modal__enter_jk0n1 {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_jk0n1,
|
|
51
|
+
.base-modal__enterActive_jk0n1 {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_jk0n1 {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_jk0n1,
|
|
59
|
+
.base-modal__exitDone_jk0n1 {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/modern/index.js
CHANGED
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.2",
|
|
4
4
|
"description": "BaseModal component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@alfalab/core-components-stack": "^4.0.1",
|
|
20
20
|
"@juggle/resize-observer": "^3.3.1",
|
|
21
21
|
"classnames": "^2.3.1",
|
|
22
|
+
"element-matches-polyfill": "^1.0.0",
|
|
22
23
|
"react-focus-lock": "^2.5.0",
|
|
23
24
|
"react-merge-refs": "^1.1.0",
|
|
24
25
|
"react-transition-group": "^4.4.1"
|