@alfalab/core-components-base-modal 5.0.0 → 5.0.3
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 +5 -2
- package/cssm/Component.js +4 -1
- package/cssm/index.js +1 -0
- package/cssm/matches-polyfill.d.ts +1 -0
- package/cssm/matches-polyfill.js +20 -0
- package/esm/Component.js +5 -2
- package/esm/index.css +13 -13
- package/esm/index.js +1 -0
- package/esm/matches-polyfill.d.ts +1 -0
- package/esm/matches-polyfill.js +18 -0
- package/index.css +13 -13
- package/index.js +1 -0
- package/matches-polyfill.d.ts +1 -0
- package/matches-polyfill.js +20 -0
- package/modern/Component.js +5 -2
- package/modern/index.css +13 -13
- package/modern/index.js +1 -0
- package/modern/matches-polyfill.d.ts +1 -0
- package/modern/matches-polyfill.js +18 -0
- package/package.json +6 -6
package/Component.js
CHANGED
|
@@ -8,6 +8,7 @@ var mergeRefs = require('react-merge-refs');
|
|
|
8
8
|
var resizeObserver = require('@juggle/resize-observer');
|
|
9
9
|
var reactTransitionGroup = require('react-transition-group');
|
|
10
10
|
var FocusLock = require('react-focus-lock');
|
|
11
|
+
require('./matches-polyfill.js');
|
|
11
12
|
var coreComponentsPortal = require('@alfalab/core-components-portal');
|
|
12
13
|
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
|
|
13
14
|
var coreComponentsStack = require('@alfalab/core-components-stack');
|
|
@@ -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_1q1ro","wrapper":"base-modal__wrapper_1q1ro","content":"base-modal__content_1q1ro","hidden":"base-modal__hidden_1q1ro","backdrop":"base-modal__backdrop_1q1ro","appear":"base-modal__appear_1q1ro","enter":"base-modal__enter_1q1ro","appearActive":"base-modal__appearActive_1q1ro","enterActive":"base-modal__enterActive_1q1ro","exit":"base-modal__exit_1q1ro","exitActive":"base-modal__exitActive_1q1ro","exitDone":"base-modal__exitDone_1q1ro"};
|
|
52
53
|
require('./index.css')
|
|
53
54
|
|
|
54
55
|
var BaseModalContext = React__default['default'].createContext({
|
|
@@ -267,7 +268,9 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
267
268
|
} }))),
|
|
268
269
|
React__default['default'].createElement("div", { role: 'dialog', className: cn__default['default'](styles.wrapper, wrapperClassName, (_a = {},
|
|
269
270
|
_a[styles.hidden] = !open && isExited,
|
|
270
|
-
_a)), ref: mergeRefs__default['default']([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
271
|
+
_a)), ref: mergeRefs__default['default']([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
272
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
273
|
+
tabIndex: 0, "data-test-id": dataTestId, style: {
|
|
271
274
|
zIndex: computedZIndex,
|
|
272
275
|
} },
|
|
273
276
|
React__default['default'].createElement(reactTransitionGroup.CSSTransition, __assign({ appear: true, timeout: 200, classNames: styles }, transitionProps, { in: open, onEntered: handleEntered, onExited: handleExited }),
|
package/cssm/Component.js
CHANGED
|
@@ -8,6 +8,7 @@ var mergeRefs = require('react-merge-refs');
|
|
|
8
8
|
var resizeObserver = require('@juggle/resize-observer');
|
|
9
9
|
var reactTransitionGroup = require('react-transition-group');
|
|
10
10
|
var FocusLock = require('react-focus-lock');
|
|
11
|
+
require('./matches-polyfill.js');
|
|
11
12
|
var coreComponentsPortal = require('@alfalab/core-components-portal/cssm');
|
|
12
13
|
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop/cssm');
|
|
13
14
|
var coreComponentsStack = require('@alfalab/core-components-stack/cssm');
|
|
@@ -266,7 +267,9 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
266
267
|
} }))),
|
|
267
268
|
React__default['default'].createElement("div", { role: 'dialog', className: cn__default['default'](styles__default['default'].wrapper, wrapperClassName, (_a = {},
|
|
268
269
|
_a[styles__default['default'].hidden] = !open && isExited,
|
|
269
|
-
_a)), ref: mergeRefs__default['default']([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
270
|
+
_a)), ref: mergeRefs__default['default']([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
271
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
272
|
+
tabIndex: 0, "data-test-id": dataTestId, style: {
|
|
270
273
|
zIndex: computedZIndex,
|
|
271
274
|
} },
|
|
272
275
|
React__default['default'].createElement(reactTransitionGroup.CSSTransition, __assign({ appear: true, timeout: 200, classNames: styles__default['default'] }, transitionProps, { in: open, onEntered: handleEntered, onExited: handleExited }),
|
package/cssm/index.js
CHANGED
|
@@ -9,6 +9,7 @@ require('react-merge-refs');
|
|
|
9
9
|
require('@juggle/resize-observer');
|
|
10
10
|
require('react-transition-group');
|
|
11
11
|
require('react-focus-lock');
|
|
12
|
+
require('./matches-polyfill.js');
|
|
12
13
|
require('@alfalab/core-components-portal/cssm');
|
|
13
14
|
require('@alfalab/core-components-backdrop/cssm');
|
|
14
15
|
require('@alfalab/core-components-stack/cssm');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
if (typeof window !== 'undefined') {
|
|
6
|
+
if (Element && !Element.prototype.matches) {
|
|
7
|
+
Element.prototype.matches =
|
|
8
|
+
Element.prototype.matchesSelector ||
|
|
9
|
+
Element.prototype.mozMatchesSelector ||
|
|
10
|
+
Element.prototype.msMatchesSelector ||
|
|
11
|
+
Element.prototype.oMatchesSelector ||
|
|
12
|
+
Element.prototype.webkitMatchesSelector ||
|
|
13
|
+
function (s) {
|
|
14
|
+
var matches = (this.document || this.ownerDocument).querySelectorAll(s);
|
|
15
|
+
var i = matches.length;
|
|
16
|
+
while (--i >= 0 && matches.item(i) !== this) { }
|
|
17
|
+
return i > -1;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
package/esm/Component.js
CHANGED
|
@@ -4,6 +4,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
4
4
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
5
5
|
import { CSSTransition } from 'react-transition-group';
|
|
6
6
|
import FocusLock from 'react-focus-lock';
|
|
7
|
+
import './matches-polyfill.js';
|
|
7
8
|
import { Portal } from '@alfalab/core-components-portal/esm';
|
|
8
9
|
import { Backdrop } from '@alfalab/core-components-backdrop/esm';
|
|
9
10
|
import { stackingOrder, Stack } from '@alfalab/core-components-stack/esm';
|
|
@@ -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_1q1ro","wrapper":"base-modal__wrapper_1q1ro","content":"base-modal__content_1q1ro","hidden":"base-modal__hidden_1q1ro","backdrop":"base-modal__backdrop_1q1ro","appear":"base-modal__appear_1q1ro","enter":"base-modal__enter_1q1ro","appearActive":"base-modal__appearActive_1q1ro","enterActive":"base-modal__enterActive_1q1ro","exit":"base-modal__exit_1q1ro","exitActive":"base-modal__exitActive_1q1ro","exitDone":"base-modal__exitDone_1q1ro"};
|
|
41
42
|
require('./index.css')
|
|
42
43
|
|
|
43
44
|
var BaseModalContext = React.createContext({
|
|
@@ -256,7 +257,9 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
256
257
|
} }))),
|
|
257
258
|
React.createElement("div", { role: 'dialog', className: cn(styles.wrapper, wrapperClassName, (_a = {},
|
|
258
259
|
_a[styles.hidden] = !open && isExited,
|
|
259
|
-
_a)), ref: mergeRefs([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
260
|
+
_a)), ref: mergeRefs([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
261
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
262
|
+
tabIndex: 0, "data-test-id": dataTestId, style: {
|
|
260
263
|
zIndex: computedZIndex,
|
|
261
264
|
} },
|
|
262
265
|
React.createElement(CSSTransition, __assign({ appear: true, timeout: 200, classNames: styles }, transitionProps, { in: open, onEntered: handleEntered, onExited: handleExited }),
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: pfi1g */
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_1q1ro {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_1q1ro,
|
|
47
|
+
.base-modal__enter_1q1ro {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_1q1ro,
|
|
51
|
+
.base-modal__enterActive_1q1ro {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_1q1ro {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_1q1ro,
|
|
59
|
+
.base-modal__exitDone_1q1ro {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/esm/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import 'react-merge-refs';
|
|
|
5
5
|
import '@juggle/resize-observer';
|
|
6
6
|
import 'react-transition-group';
|
|
7
7
|
import 'react-focus-lock';
|
|
8
|
+
import './matches-polyfill.js';
|
|
8
9
|
import '@alfalab/core-components-portal/esm';
|
|
9
10
|
import '@alfalab/core-components-backdrop/esm';
|
|
10
11
|
import '@alfalab/core-components-stack/esm';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
if (typeof window !== 'undefined') {
|
|
4
|
+
if (Element && !Element.prototype.matches) {
|
|
5
|
+
Element.prototype.matches =
|
|
6
|
+
Element.prototype.matchesSelector ||
|
|
7
|
+
Element.prototype.mozMatchesSelector ||
|
|
8
|
+
Element.prototype.msMatchesSelector ||
|
|
9
|
+
Element.prototype.oMatchesSelector ||
|
|
10
|
+
Element.prototype.webkitMatchesSelector ||
|
|
11
|
+
function (s) {
|
|
12
|
+
var matches = (this.document || this.ownerDocument).querySelectorAll(s);
|
|
13
|
+
var i = matches.length;
|
|
14
|
+
while (--i >= 0 && matches.item(i) !== this) { }
|
|
15
|
+
return i > -1;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: pfi1g */
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_1q1ro {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_1q1ro,
|
|
47
|
+
.base-modal__enter_1q1ro {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_1q1ro,
|
|
51
|
+
.base-modal__enterActive_1q1ro {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_1q1ro {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_1q1ro,
|
|
59
|
+
.base-modal__exitDone_1q1ro {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/index.js
CHANGED
|
@@ -9,6 +9,7 @@ require('react-merge-refs');
|
|
|
9
9
|
require('@juggle/resize-observer');
|
|
10
10
|
require('react-transition-group');
|
|
11
11
|
require('react-focus-lock');
|
|
12
|
+
require('./matches-polyfill.js');
|
|
12
13
|
require('@alfalab/core-components-portal');
|
|
13
14
|
require('@alfalab/core-components-backdrop');
|
|
14
15
|
require('@alfalab/core-components-stack');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
if (typeof window !== 'undefined') {
|
|
6
|
+
if (Element && !Element.prototype.matches) {
|
|
7
|
+
Element.prototype.matches =
|
|
8
|
+
Element.prototype.matchesSelector ||
|
|
9
|
+
Element.prototype.mozMatchesSelector ||
|
|
10
|
+
Element.prototype.msMatchesSelector ||
|
|
11
|
+
Element.prototype.oMatchesSelector ||
|
|
12
|
+
Element.prototype.webkitMatchesSelector ||
|
|
13
|
+
function (s) {
|
|
14
|
+
var matches = (this.document || this.ownerDocument).querySelectorAll(s);
|
|
15
|
+
var i = matches.length;
|
|
16
|
+
while (--i >= 0 && matches.item(i) !== this) { }
|
|
17
|
+
return i > -1;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
package/modern/Component.js
CHANGED
|
@@ -4,13 +4,14 @@ import mergeRefs from 'react-merge-refs';
|
|
|
4
4
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
5
5
|
import { CSSTransition } from 'react-transition-group';
|
|
6
6
|
import FocusLock from 'react-focus-lock';
|
|
7
|
+
import './matches-polyfill.js';
|
|
7
8
|
import { Portal } from '@alfalab/core-components-portal/modern';
|
|
8
9
|
import { Backdrop } from '@alfalab/core-components-backdrop/modern';
|
|
9
10
|
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_1q1ro","wrapper":"base-modal__wrapper_1q1ro","content":"base-modal__content_1q1ro","hidden":"base-modal__hidden_1q1ro","backdrop":"base-modal__backdrop_1q1ro","appear":"base-modal__appear_1q1ro","enter":"base-modal__enter_1q1ro","appearActive":"base-modal__appearActive_1q1ro","enterActive":"base-modal__enterActive_1q1ro","exit":"base-modal__exit_1q1ro","exitActive":"base-modal__exitActive_1q1ro","exitDone":"base-modal__exitDone_1q1ro"};
|
|
14
15
|
require('./index.css')
|
|
15
16
|
|
|
16
17
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
@@ -226,7 +227,9 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
226
227
|
} }))),
|
|
227
228
|
React.createElement("div", { role: 'dialog', className: cn(styles.wrapper, wrapperClassName, {
|
|
228
229
|
[styles.hidden]: !open && isExited,
|
|
229
|
-
}), ref: mergeRefs([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
230
|
+
}), ref: mergeRefs([ref, wrapperRef]), onKeyDown: handleKeyDown, onMouseDown: handleBackdropMouseDown, onMouseUp: handleBackdropMouseUp,
|
|
231
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
232
|
+
tabIndex: 0, "data-test-id": dataTestId, style: {
|
|
230
233
|
zIndex: computedZIndex,
|
|
231
234
|
} },
|
|
232
235
|
React.createElement(CSSTransition, Object.assign({ appear: true, timeout: 200, classNames: styles }, transitionProps, { in: open, onEntered: handleEntered, onExited: handleExited }),
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: pfi1g */
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
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_1q1ro {
|
|
41
41
|
display: none;
|
|
42
42
|
}
|
|
43
|
-
.base-
|
|
43
|
+
.base-modal__backdrop_1q1ro {
|
|
44
44
|
z-index: 0;
|
|
45
45
|
}
|
|
46
|
-
.base-
|
|
47
|
-
.base-
|
|
46
|
+
.base-modal__appear_1q1ro,
|
|
47
|
+
.base-modal__enter_1q1ro {
|
|
48
48
|
opacity: 0;
|
|
49
49
|
}
|
|
50
|
-
.base-
|
|
51
|
-
.base-
|
|
50
|
+
.base-modal__appearActive_1q1ro,
|
|
51
|
+
.base-modal__enterActive_1q1ro {
|
|
52
52
|
opacity: 1;
|
|
53
53
|
transition: opacity 200ms ease-in;
|
|
54
54
|
}
|
|
55
|
-
.base-
|
|
55
|
+
.base-modal__exit_1q1ro {
|
|
56
56
|
opacity: 1;
|
|
57
57
|
}
|
|
58
|
-
.base-
|
|
59
|
-
.base-
|
|
58
|
+
.base-modal__exitActive_1q1ro,
|
|
59
|
+
.base-modal__exitDone_1q1ro {
|
|
60
60
|
opacity: 0;
|
|
61
61
|
transition: opacity 200ms ease-out;
|
|
62
62
|
}
|
package/modern/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import 'react-merge-refs';
|
|
|
4
4
|
import '@juggle/resize-observer';
|
|
5
5
|
import 'react-transition-group';
|
|
6
6
|
import 'react-focus-lock';
|
|
7
|
+
import './matches-polyfill.js';
|
|
7
8
|
import '@alfalab/core-components-portal/modern';
|
|
8
9
|
import '@alfalab/core-components-backdrop/modern';
|
|
9
10
|
import '@alfalab/core-components-stack/modern';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
if (typeof window !== 'undefined') {
|
|
4
|
+
if (Element && !Element.prototype.matches) {
|
|
5
|
+
Element.prototype.matches =
|
|
6
|
+
Element.prototype.matchesSelector ||
|
|
7
|
+
Element.prototype.mozMatchesSelector ||
|
|
8
|
+
Element.prototype.msMatchesSelector ||
|
|
9
|
+
Element.prototype.oMatchesSelector ||
|
|
10
|
+
Element.prototype.webkitMatchesSelector ||
|
|
11
|
+
function (s) {
|
|
12
|
+
const matches = (this.document || this.ownerDocument).querySelectorAll(s);
|
|
13
|
+
let i = matches.length;
|
|
14
|
+
while (--i >= 0 && matches.item(i) !== this) { }
|
|
15
|
+
return i > -1;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
}
|
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.3",
|
|
4
4
|
"description": "BaseModal component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"directory": "dist"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@alfalab/core-components-backdrop": "^3.0.
|
|
17
|
-
"@alfalab/core-components-global-store": "^2.0.
|
|
18
|
-
"@alfalab/core-components-portal": "^3.0.
|
|
19
|
-
"@alfalab/core-components-stack": "^4.0.
|
|
16
|
+
"@alfalab/core-components-backdrop": "^3.0.1",
|
|
17
|
+
"@alfalab/core-components-global-store": "^2.0.1",
|
|
18
|
+
"@alfalab/core-components-portal": "^3.0.1",
|
|
19
|
+
"@alfalab/core-components-stack": "^4.0.1",
|
|
20
20
|
"@juggle/resize-observer": "^3.3.1",
|
|
21
21
|
"classnames": "^2.3.1",
|
|
22
|
-
"react-focus-lock": "^2.
|
|
22
|
+
"react-focus-lock": "^2.9.1",
|
|
23
23
|
"react-merge-refs": "^1.1.0",
|
|
24
24
|
"react-transition-group": "^4.4.1"
|
|
25
25
|
},
|