@alfalab/core-components-base-modal 5.0.10 → 5.1.1
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.d.ts +2 -0
- package/Component.js +5 -1
- package/cssm/Component.d.ts +2 -0
- package/cssm/Component.js +4 -0
- package/esm/Component.d.ts +2 -0
- package/esm/Component.js +5 -1
- package/esm/index.css +13 -13
- package/index.css +13 -13
- package/modern/Component.d.ts +2 -0
- package/modern/Component.js +5 -1
- package/modern/index.css +13 -13
- package/package.json +1 -1
package/Component.d.ts
CHANGED
|
@@ -119,6 +119,8 @@ type BaseModalProps = {
|
|
|
119
119
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
120
120
|
};
|
|
121
121
|
type BaseModalContext = {
|
|
122
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
123
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
122
124
|
hasFooter?: boolean;
|
|
123
125
|
hasHeader?: boolean;
|
|
124
126
|
hasScroll?: boolean;
|
package/Component.js
CHANGED
|
@@ -21,11 +21,13 @@ var FocusLock__default = /*#__PURE__*/_interopDefaultCompat(FocusLock);
|
|
|
21
21
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
22
22
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
23
23
|
|
|
24
|
-
var styles = {"component":"base-
|
|
24
|
+
var styles = {"component":"base-modal__component_1f6ip","wrapper":"base-modal__wrapper_1f6ip","content":"base-modal__content_1f6ip","hidden":"base-modal__hidden_1f6ip","backdrop":"base-modal__backdrop_1f6ip","appear":"base-modal__appear_1f6ip","enter":"base-modal__enter_1f6ip","appearActive":"base-modal__appearActive_1f6ip","enterActive":"base-modal__enterActive_1f6ip","exit":"base-modal__exit_1f6ip","exitActive":"base-modal__exitActive_1f6ip","exitDone":"base-modal__exitDone_1f6ip"};
|
|
25
25
|
require('./index.css')
|
|
26
26
|
|
|
27
27
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
28
28
|
var BaseModalContext = React__default.default.createContext({
|
|
29
|
+
parentRef: { current: null },
|
|
30
|
+
componentRef: { current: null },
|
|
29
31
|
hasFooter: false,
|
|
30
32
|
hasHeader: false,
|
|
31
33
|
hasScroll: false,
|
|
@@ -205,6 +207,8 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
205
207
|
};
|
|
206
208
|
}, []);
|
|
207
209
|
var contextValue = React.useMemo(function () { return ({
|
|
210
|
+
parentRef: wrapperRef,
|
|
211
|
+
componentRef: componentNodeRef,
|
|
208
212
|
hasHeader: hasHeader,
|
|
209
213
|
hasFooter: hasFooter,
|
|
210
214
|
hasScroll: hasScroll,
|
package/cssm/Component.d.ts
CHANGED
|
@@ -119,6 +119,8 @@ type BaseModalProps = {
|
|
|
119
119
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
120
120
|
};
|
|
121
121
|
type BaseModalContext = {
|
|
122
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
123
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
122
124
|
hasFooter?: boolean;
|
|
123
125
|
hasHeader?: boolean;
|
|
124
126
|
hasScroll?: boolean;
|
package/cssm/Component.js
CHANGED
|
@@ -25,6 +25,8 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
25
25
|
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
27
27
|
var BaseModalContext = React__default.default.createContext({
|
|
28
|
+
parentRef: { current: null },
|
|
29
|
+
componentRef: { current: null },
|
|
28
30
|
hasFooter: false,
|
|
29
31
|
hasHeader: false,
|
|
30
32
|
hasScroll: false,
|
|
@@ -204,6 +206,8 @@ var BaseModal = React.forwardRef(function (_a, ref) {
|
|
|
204
206
|
};
|
|
205
207
|
}, []);
|
|
206
208
|
var contextValue = React.useMemo(function () { return ({
|
|
209
|
+
parentRef: wrapperRef,
|
|
210
|
+
componentRef: componentNodeRef,
|
|
207
211
|
hasHeader: hasHeader,
|
|
208
212
|
hasFooter: hasFooter,
|
|
209
213
|
hasScroll: hasScroll,
|
package/esm/Component.d.ts
CHANGED
|
@@ -119,6 +119,8 @@ type BaseModalProps = {
|
|
|
119
119
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
120
120
|
};
|
|
121
121
|
type BaseModalContext = {
|
|
122
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
123
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
122
124
|
hasFooter?: boolean;
|
|
123
125
|
hasHeader?: boolean;
|
|
124
126
|
hasScroll?: boolean;
|
package/esm/Component.js
CHANGED
|
@@ -12,11 +12,13 @@ import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerS
|
|
|
12
12
|
import './matches-polyfill.js';
|
|
13
13
|
import '@alfalab/core-components-global-store/esm';
|
|
14
14
|
|
|
15
|
-
var styles = {"component":"base-
|
|
15
|
+
var styles = {"component":"base-modal__component_1f6ip","wrapper":"base-modal__wrapper_1f6ip","content":"base-modal__content_1f6ip","hidden":"base-modal__hidden_1f6ip","backdrop":"base-modal__backdrop_1f6ip","appear":"base-modal__appear_1f6ip","enter":"base-modal__enter_1f6ip","appearActive":"base-modal__appearActive_1f6ip","enterActive":"base-modal__enterActive_1f6ip","exit":"base-modal__exit_1f6ip","exitActive":"base-modal__exitActive_1f6ip","exitDone":"base-modal__exitDone_1f6ip"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
19
19
|
var BaseModalContext = React.createContext({
|
|
20
|
+
parentRef: { current: null },
|
|
21
|
+
componentRef: { current: null },
|
|
20
22
|
hasFooter: false,
|
|
21
23
|
hasHeader: false,
|
|
22
24
|
hasScroll: false,
|
|
@@ -196,6 +198,8 @@ var BaseModal = forwardRef(function (_a, ref) {
|
|
|
196
198
|
};
|
|
197
199
|
}, []);
|
|
198
200
|
var contextValue = useMemo(function () { return ({
|
|
201
|
+
parentRef: wrapperRef,
|
|
202
|
+
componentRef: componentNodeRef,
|
|
199
203
|
hasHeader: hasHeader,
|
|
200
204
|
hasFooter: hasFooter,
|
|
201
205
|
hasScroll: hasScroll,
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: zlupk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .base-
|
|
18
|
+
} .base-modal__component_1f6ip {
|
|
19
19
|
position: relative;
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
background: var(--color-light-bg-primary);
|
|
22
22
|
margin: auto;
|
|
23
23
|
flex-shrink: 0;
|
|
24
|
-
} .base-
|
|
24
|
+
} .base-modal__wrapper_1f6ip {
|
|
25
25
|
position: fixed;
|
|
26
26
|
top: 0;
|
|
27
27
|
left: 0;
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
align-items: center;
|
|
35
35
|
outline: 0;
|
|
36
|
-
} .base-
|
|
36
|
+
} .base-modal__content_1f6ip {
|
|
37
37
|
width: 100%;
|
|
38
38
|
height: 100%;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
flex: 1;
|
|
42
|
-
} .base-
|
|
42
|
+
} .base-modal__hidden_1f6ip {
|
|
43
43
|
display: none;
|
|
44
|
-
} .base-
|
|
44
|
+
} .base-modal__backdrop_1f6ip {
|
|
45
45
|
z-index: 0;
|
|
46
|
-
} .base-
|
|
47
|
-
.base-
|
|
46
|
+
} .base-modal__appear_1f6ip,
|
|
47
|
+
.base-modal__enter_1f6ip {
|
|
48
48
|
opacity: 0;
|
|
49
|
-
} .base-
|
|
50
|
-
.base-
|
|
49
|
+
} .base-modal__appearActive_1f6ip,
|
|
50
|
+
.base-modal__enterActive_1f6ip {
|
|
51
51
|
opacity: 1;
|
|
52
52
|
transition: opacity 200ms ease-in;
|
|
53
|
-
} .base-
|
|
53
|
+
} .base-modal__exit_1f6ip {
|
|
54
54
|
opacity: 1;
|
|
55
|
-
} .base-
|
|
56
|
-
.base-
|
|
55
|
+
} .base-modal__exitActive_1f6ip,
|
|
56
|
+
.base-modal__exitDone_1f6ip {
|
|
57
57
|
opacity: 0;
|
|
58
58
|
transition: opacity 200ms ease-out;
|
|
59
59
|
}
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: zlupk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .base-
|
|
18
|
+
} .base-modal__component_1f6ip {
|
|
19
19
|
position: relative;
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
background: var(--color-light-bg-primary);
|
|
22
22
|
margin: auto;
|
|
23
23
|
flex-shrink: 0;
|
|
24
|
-
} .base-
|
|
24
|
+
} .base-modal__wrapper_1f6ip {
|
|
25
25
|
position: fixed;
|
|
26
26
|
top: 0;
|
|
27
27
|
left: 0;
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
align-items: center;
|
|
35
35
|
outline: 0;
|
|
36
|
-
} .base-
|
|
36
|
+
} .base-modal__content_1f6ip {
|
|
37
37
|
width: 100%;
|
|
38
38
|
height: 100%;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
flex: 1;
|
|
42
|
-
} .base-
|
|
42
|
+
} .base-modal__hidden_1f6ip {
|
|
43
43
|
display: none;
|
|
44
|
-
} .base-
|
|
44
|
+
} .base-modal__backdrop_1f6ip {
|
|
45
45
|
z-index: 0;
|
|
46
|
-
} .base-
|
|
47
|
-
.base-
|
|
46
|
+
} .base-modal__appear_1f6ip,
|
|
47
|
+
.base-modal__enter_1f6ip {
|
|
48
48
|
opacity: 0;
|
|
49
|
-
} .base-
|
|
50
|
-
.base-
|
|
49
|
+
} .base-modal__appearActive_1f6ip,
|
|
50
|
+
.base-modal__enterActive_1f6ip {
|
|
51
51
|
opacity: 1;
|
|
52
52
|
transition: opacity 200ms ease-in;
|
|
53
|
-
} .base-
|
|
53
|
+
} .base-modal__exit_1f6ip {
|
|
54
54
|
opacity: 1;
|
|
55
|
-
} .base-
|
|
56
|
-
.base-
|
|
55
|
+
} .base-modal__exitActive_1f6ip,
|
|
56
|
+
.base-modal__exitDone_1f6ip {
|
|
57
57
|
opacity: 0;
|
|
58
58
|
transition: opacity 200ms ease-out;
|
|
59
59
|
}
|
package/modern/Component.d.ts
CHANGED
|
@@ -119,6 +119,8 @@ type BaseModalProps = {
|
|
|
119
119
|
componentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
120
120
|
};
|
|
121
121
|
type BaseModalContext = {
|
|
122
|
+
parentRef: React.RefObject<HTMLDivElement>;
|
|
123
|
+
componentRef: React.RefObject<HTMLDivElement>;
|
|
122
124
|
hasFooter?: boolean;
|
|
123
125
|
hasHeader?: boolean;
|
|
124
126
|
hasScroll?: boolean;
|
package/modern/Component.js
CHANGED
|
@@ -11,12 +11,14 @@ import { isScrolledToTop, isScrolledToBottom, handleContainer, restoreContainerS
|
|
|
11
11
|
import './matches-polyfill.js';
|
|
12
12
|
import '@alfalab/core-components-global-store/modern';
|
|
13
13
|
|
|
14
|
-
const styles = {"component":"base-
|
|
14
|
+
const styles = {"component":"base-modal__component_1f6ip","wrapper":"base-modal__wrapper_1f6ip","content":"base-modal__content_1f6ip","hidden":"base-modal__hidden_1f6ip","backdrop":"base-modal__backdrop_1f6ip","appear":"base-modal__appear_1f6ip","enter":"base-modal__enter_1f6ip","appearActive":"base-modal__appearActive_1f6ip","enterActive":"base-modal__enterActive_1f6ip","exit":"base-modal__exit_1f6ip","exitActive":"base-modal__exitActive_1f6ip","exitDone":"base-modal__exitDone_1f6ip"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-redeclare
|
|
19
19
|
const BaseModalContext = React.createContext({
|
|
20
|
+
parentRef: { current: null },
|
|
21
|
+
componentRef: { current: null },
|
|
20
22
|
hasFooter: false,
|
|
21
23
|
hasHeader: false,
|
|
22
24
|
hasScroll: false,
|
|
@@ -194,6 +196,8 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
|
|
|
194
196
|
};
|
|
195
197
|
}, []);
|
|
196
198
|
const contextValue = useMemo(() => ({
|
|
199
|
+
parentRef: wrapperRef,
|
|
200
|
+
componentRef: componentNodeRef,
|
|
197
201
|
hasHeader,
|
|
198
202
|
hasFooter,
|
|
199
203
|
hasScroll,
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: zlupk */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .base-
|
|
18
|
+
} .base-modal__component_1f6ip {
|
|
19
19
|
position: relative;
|
|
20
20
|
box-sizing: border-box;
|
|
21
21
|
background: var(--color-light-bg-primary);
|
|
22
22
|
margin: auto;
|
|
23
23
|
flex-shrink: 0;
|
|
24
|
-
} .base-
|
|
24
|
+
} .base-modal__wrapper_1f6ip {
|
|
25
25
|
position: fixed;
|
|
26
26
|
top: 0;
|
|
27
27
|
left: 0;
|
|
@@ -33,27 +33,27 @@
|
|
|
33
33
|
flex-direction: column;
|
|
34
34
|
align-items: center;
|
|
35
35
|
outline: 0;
|
|
36
|
-
} .base-
|
|
36
|
+
} .base-modal__content_1f6ip {
|
|
37
37
|
width: 100%;
|
|
38
38
|
height: 100%;
|
|
39
39
|
display: flex;
|
|
40
40
|
flex-direction: column;
|
|
41
41
|
flex: 1;
|
|
42
|
-
} .base-
|
|
42
|
+
} .base-modal__hidden_1f6ip {
|
|
43
43
|
display: none;
|
|
44
|
-
} .base-
|
|
44
|
+
} .base-modal__backdrop_1f6ip {
|
|
45
45
|
z-index: 0;
|
|
46
|
-
} .base-
|
|
47
|
-
.base-
|
|
46
|
+
} .base-modal__appear_1f6ip,
|
|
47
|
+
.base-modal__enter_1f6ip {
|
|
48
48
|
opacity: 0;
|
|
49
|
-
} .base-
|
|
50
|
-
.base-
|
|
49
|
+
} .base-modal__appearActive_1f6ip,
|
|
50
|
+
.base-modal__enterActive_1f6ip {
|
|
51
51
|
opacity: 1;
|
|
52
52
|
transition: opacity 200ms ease-in;
|
|
53
|
-
} .base-
|
|
53
|
+
} .base-modal__exit_1f6ip {
|
|
54
54
|
opacity: 1;
|
|
55
|
-
} .base-
|
|
56
|
-
.base-
|
|
55
|
+
} .base-modal__exitActive_1f6ip,
|
|
56
|
+
.base-modal__exitDone_1f6ip {
|
|
57
57
|
opacity: 0;
|
|
58
58
|
transition: opacity 200ms ease-out;
|
|
59
59
|
}
|