@alfalab/core-components-base-modal 5.0.2 → 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 -3
- package/cssm/Component.js +4 -2
- package/cssm/index.js +1 -1
- package/cssm/matches-polyfill.d.ts +1 -0
- package/cssm/matches-polyfill.js +20 -0
- package/esm/Component.js +5 -3
- package/esm/index.css +13 -13
- package/esm/index.js +1 -1
- package/esm/matches-polyfill.d.ts +1 -0
- package/esm/matches-polyfill.js +18 -0
- package/index.css +13 -13
- package/index.js +1 -1
- package/matches-polyfill.d.ts +1 -0
- package/matches-polyfill.js +20 -0
- package/modern/Component.js +5 -3
- package/modern/index.css +13 -13
- package/modern/index.js +1 -1
- package/modern/matches-polyfill.d.ts +1 -0
- package/modern/matches-polyfill.js +18 -0
- package/package.json +2 -3
package/Component.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
require('element-matches-polyfill');
|
|
7
6
|
var cn = require('classnames');
|
|
8
7
|
var mergeRefs = require('react-merge-refs');
|
|
9
8
|
var resizeObserver = require('@juggle/resize-observer');
|
|
10
9
|
var reactTransitionGroup = require('react-transition-group');
|
|
11
10
|
var FocusLock = require('react-focus-lock');
|
|
11
|
+
require('./matches-polyfill.js');
|
|
12
12
|
var coreComponentsPortal = require('@alfalab/core-components-portal');
|
|
13
13
|
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
|
|
14
14
|
var coreComponentsStack = require('@alfalab/core-components-stack');
|
|
@@ -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_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"};
|
|
53
53
|
require('./index.css')
|
|
54
54
|
|
|
55
55
|
var BaseModalContext = React__default['default'].createContext({
|
|
@@ -268,7 +268,9 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
268
268
|
} }))),
|
|
269
269
|
React__default['default'].createElement("div", { role: 'dialog', className: cn__default['default'](styles.wrapper, wrapperClassName, (_a = {},
|
|
270
270
|
_a[styles.hidden] = !open && isExited,
|
|
271
|
-
_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: {
|
|
272
274
|
zIndex: computedZIndex,
|
|
273
275
|
} },
|
|
274
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
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
require('element-matches-polyfill');
|
|
7
6
|
var cn = require('classnames');
|
|
8
7
|
var mergeRefs = require('react-merge-refs');
|
|
9
8
|
var resizeObserver = require('@juggle/resize-observer');
|
|
10
9
|
var reactTransitionGroup = require('react-transition-group');
|
|
11
10
|
var FocusLock = require('react-focus-lock');
|
|
11
|
+
require('./matches-polyfill.js');
|
|
12
12
|
var coreComponentsPortal = require('@alfalab/core-components-portal/cssm');
|
|
13
13
|
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop/cssm');
|
|
14
14
|
var coreComponentsStack = require('@alfalab/core-components-stack/cssm');
|
|
@@ -267,7 +267,9 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
267
267
|
} }))),
|
|
268
268
|
React__default['default'].createElement("div", { role: 'dialog', className: cn__default['default'](styles__default['default'].wrapper, wrapperClassName, (_a = {},
|
|
269
269
|
_a[styles__default['default'].hidden] = !open && isExited,
|
|
270
|
-
_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: {
|
|
271
273
|
zIndex: computedZIndex,
|
|
272
274
|
} },
|
|
273
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
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var Component = require('./Component.js');
|
|
6
6
|
require('react');
|
|
7
|
-
require('element-matches-polyfill');
|
|
8
7
|
require('classnames');
|
|
9
8
|
require('react-merge-refs');
|
|
10
9
|
require('@juggle/resize-observer');
|
|
11
10
|
require('react-transition-group');
|
|
12
11
|
require('react-focus-lock');
|
|
12
|
+
require('./matches-polyfill.js');
|
|
13
13
|
require('@alfalab/core-components-portal/cssm');
|
|
14
14
|
require('@alfalab/core-components-backdrop/cssm');
|
|
15
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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
2
|
-
import 'element-matches-polyfill';
|
|
3
2
|
import cn from 'classnames';
|
|
4
3
|
import mergeRefs from 'react-merge-refs';
|
|
5
4
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
6
5
|
import { CSSTransition } from 'react-transition-group';
|
|
7
6
|
import FocusLock from 'react-focus-lock';
|
|
7
|
+
import './matches-polyfill.js';
|
|
8
8
|
import { Portal } from '@alfalab/core-components-portal/esm';
|
|
9
9
|
import { Backdrop } from '@alfalab/core-components-backdrop/esm';
|
|
10
10
|
import { stackingOrder, Stack } from '@alfalab/core-components-stack/esm';
|
|
@@ -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_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"};
|
|
42
42
|
require('./index.css')
|
|
43
43
|
|
|
44
44
|
var BaseModalContext = React.createContext({
|
|
@@ -257,7 +257,9 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
257
257
|
} }))),
|
|
258
258
|
React.createElement("div", { role: 'dialog', className: cn(styles.wrapper, wrapperClassName, (_a = {},
|
|
259
259
|
_a[styles.hidden] = !open && isExited,
|
|
260
|
-
_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: {
|
|
261
263
|
zIndex: computedZIndex,
|
|
262
264
|
} },
|
|
263
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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { BaseModal, BaseModalContext } from './Component.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import 'element-matches-polyfill';
|
|
4
3
|
import 'classnames';
|
|
5
4
|
import 'react-merge-refs';
|
|
6
5
|
import '@juggle/resize-observer';
|
|
7
6
|
import 'react-transition-group';
|
|
8
7
|
import 'react-focus-lock';
|
|
8
|
+
import './matches-polyfill.js';
|
|
9
9
|
import '@alfalab/core-components-portal/esm';
|
|
10
10
|
import '@alfalab/core-components-backdrop/esm';
|
|
11
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
|
@@ -4,12 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var Component = require('./Component.js');
|
|
6
6
|
require('react');
|
|
7
|
-
require('element-matches-polyfill');
|
|
8
7
|
require('classnames');
|
|
9
8
|
require('react-merge-refs');
|
|
10
9
|
require('@juggle/resize-observer');
|
|
11
10
|
require('react-transition-group');
|
|
12
11
|
require('react-focus-lock');
|
|
12
|
+
require('./matches-polyfill.js');
|
|
13
13
|
require('@alfalab/core-components-portal');
|
|
14
14
|
require('@alfalab/core-components-backdrop');
|
|
15
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
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useRef, useCallback, useEffect, useMemo } from 'react';
|
|
2
|
-
import 'element-matches-polyfill';
|
|
3
2
|
import cn from 'classnames';
|
|
4
3
|
import mergeRefs from 'react-merge-refs';
|
|
5
4
|
import { ResizeObserver } from '@juggle/resize-observer';
|
|
6
5
|
import { CSSTransition } from 'react-transition-group';
|
|
7
6
|
import FocusLock from 'react-focus-lock';
|
|
7
|
+
import './matches-polyfill.js';
|
|
8
8
|
import { Portal } from '@alfalab/core-components-portal/modern';
|
|
9
9
|
import { Backdrop } from '@alfalab/core-components-backdrop/modern';
|
|
10
10
|
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_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"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
@@ -227,7 +227,9 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
227
227
|
} }))),
|
|
228
228
|
React.createElement("div", { role: 'dialog', className: cn(styles.wrapper, wrapperClassName, {
|
|
229
229
|
[styles.hidden]: !open && isExited,
|
|
230
|
-
}), 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: {
|
|
231
233
|
zIndex: computedZIndex,
|
|
232
234
|
} },
|
|
233
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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import 'element-matches-polyfill';
|
|
3
2
|
import 'classnames';
|
|
4
3
|
import 'react-merge-refs';
|
|
5
4
|
import '@juggle/resize-observer';
|
|
6
5
|
import 'react-transition-group';
|
|
7
6
|
import 'react-focus-lock';
|
|
7
|
+
import './matches-polyfill.js';
|
|
8
8
|
import '@alfalab/core-components-portal/modern';
|
|
9
9
|
import '@alfalab/core-components-backdrop/modern';
|
|
10
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",
|
|
@@ -19,8 +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
|
-
"
|
|
23
|
-
"react-focus-lock": "^2.5.0",
|
|
22
|
+
"react-focus-lock": "^2.9.1",
|
|
24
23
|
"react-merge-refs": "^1.1.0",
|
|
25
24
|
"react-transition-group": "^4.4.1"
|
|
26
25
|
},
|