@alfalab/core-components-base-modal 5.1.0 → 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 CHANGED
@@ -120,6 +120,7 @@ type BaseModalProps = {
120
120
  };
121
121
  type BaseModalContext = {
122
122
  parentRef: React.RefObject<HTMLDivElement>;
123
+ componentRef: React.RefObject<HTMLDivElement>;
123
124
  hasFooter?: boolean;
124
125
  hasHeader?: boolean;
125
126
  hasScroll?: boolean;
package/Component.js CHANGED
@@ -21,12 +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-modal__component_11i04","wrapper":"base-modal__wrapper_11i04","content":"base-modal__content_11i04","hidden":"base-modal__hidden_11i04","backdrop":"base-modal__backdrop_11i04","appear":"base-modal__appear_11i04","enter":"base-modal__enter_11i04","appearActive":"base-modal__appearActive_11i04","enterActive":"base-modal__enterActive_11i04","exit":"base-modal__exit_11i04","exitActive":"base-modal__exitActive_11i04","exitDone":"base-modal__exitDone_11i04"};
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
29
  parentRef: { current: null },
30
+ componentRef: { current: null },
30
31
  hasFooter: false,
31
32
  hasHeader: false,
32
33
  hasScroll: false,
@@ -207,6 +208,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
207
208
  }, []);
208
209
  var contextValue = React.useMemo(function () { return ({
209
210
  parentRef: wrapperRef,
211
+ componentRef: componentNodeRef,
210
212
  hasHeader: hasHeader,
211
213
  hasFooter: hasFooter,
212
214
  hasScroll: hasScroll,
@@ -120,6 +120,7 @@ type BaseModalProps = {
120
120
  };
121
121
  type BaseModalContext = {
122
122
  parentRef: React.RefObject<HTMLDivElement>;
123
+ componentRef: React.RefObject<HTMLDivElement>;
123
124
  hasFooter?: boolean;
124
125
  hasHeader?: boolean;
125
126
  hasScroll?: boolean;
package/cssm/Component.js CHANGED
@@ -26,6 +26,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
26
26
  // eslint-disable-next-line @typescript-eslint/no-redeclare
27
27
  var BaseModalContext = React__default.default.createContext({
28
28
  parentRef: { current: null },
29
+ componentRef: { current: null },
29
30
  hasFooter: false,
30
31
  hasHeader: false,
31
32
  hasScroll: false,
@@ -206,6 +207,7 @@ var BaseModal = React.forwardRef(function (_a, ref) {
206
207
  }, []);
207
208
  var contextValue = React.useMemo(function () { return ({
208
209
  parentRef: wrapperRef,
210
+ componentRef: componentNodeRef,
209
211
  hasHeader: hasHeader,
210
212
  hasFooter: hasFooter,
211
213
  hasScroll: hasScroll,
@@ -120,6 +120,7 @@ type BaseModalProps = {
120
120
  };
121
121
  type BaseModalContext = {
122
122
  parentRef: React.RefObject<HTMLDivElement>;
123
+ componentRef: React.RefObject<HTMLDivElement>;
123
124
  hasFooter?: boolean;
124
125
  hasHeader?: boolean;
125
126
  hasScroll?: boolean;
package/esm/Component.js CHANGED
@@ -12,12 +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-modal__component_11i04","wrapper":"base-modal__wrapper_11i04","content":"base-modal__content_11i04","hidden":"base-modal__hidden_11i04","backdrop":"base-modal__backdrop_11i04","appear":"base-modal__appear_11i04","enter":"base-modal__enter_11i04","appearActive":"base-modal__appearActive_11i04","enterActive":"base-modal__enterActive_11i04","exit":"base-modal__exit_11i04","exitActive":"base-modal__exitActive_11i04","exitDone":"base-modal__exitDone_11i04"};
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
20
  parentRef: { current: null },
21
+ componentRef: { current: null },
21
22
  hasFooter: false,
22
23
  hasHeader: false,
23
24
  hasScroll: false,
@@ -198,6 +199,7 @@ var BaseModal = forwardRef(function (_a, ref) {
198
199
  }, []);
199
200
  var contextValue = useMemo(function () { return ({
200
201
  parentRef: wrapperRef,
202
+ componentRef: componentNodeRef,
201
203
  hasHeader: hasHeader,
202
204
  hasFooter: hasFooter,
203
205
  hasScroll: hasScroll,
package/esm/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: n3prj */
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-modal__component_11i04 {
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-modal__wrapper_11i04 {
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-modal__content_11i04 {
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-modal__hidden_11i04 {
42
+ } .base-modal__hidden_1f6ip {
43
43
  display: none;
44
- } .base-modal__backdrop_11i04 {
44
+ } .base-modal__backdrop_1f6ip {
45
45
  z-index: 0;
46
- } .base-modal__appear_11i04,
47
- .base-modal__enter_11i04 {
46
+ } .base-modal__appear_1f6ip,
47
+ .base-modal__enter_1f6ip {
48
48
  opacity: 0;
49
- } .base-modal__appearActive_11i04,
50
- .base-modal__enterActive_11i04 {
49
+ } .base-modal__appearActive_1f6ip,
50
+ .base-modal__enterActive_1f6ip {
51
51
  opacity: 1;
52
52
  transition: opacity 200ms ease-in;
53
- } .base-modal__exit_11i04 {
53
+ } .base-modal__exit_1f6ip {
54
54
  opacity: 1;
55
- } .base-modal__exitActive_11i04,
56
- .base-modal__exitDone_11i04 {
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: n3prj */
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-modal__component_11i04 {
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-modal__wrapper_11i04 {
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-modal__content_11i04 {
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-modal__hidden_11i04 {
42
+ } .base-modal__hidden_1f6ip {
43
43
  display: none;
44
- } .base-modal__backdrop_11i04 {
44
+ } .base-modal__backdrop_1f6ip {
45
45
  z-index: 0;
46
- } .base-modal__appear_11i04,
47
- .base-modal__enter_11i04 {
46
+ } .base-modal__appear_1f6ip,
47
+ .base-modal__enter_1f6ip {
48
48
  opacity: 0;
49
- } .base-modal__appearActive_11i04,
50
- .base-modal__enterActive_11i04 {
49
+ } .base-modal__appearActive_1f6ip,
50
+ .base-modal__enterActive_1f6ip {
51
51
  opacity: 1;
52
52
  transition: opacity 200ms ease-in;
53
- } .base-modal__exit_11i04 {
53
+ } .base-modal__exit_1f6ip {
54
54
  opacity: 1;
55
- } .base-modal__exitActive_11i04,
56
- .base-modal__exitDone_11i04 {
55
+ } .base-modal__exitActive_1f6ip,
56
+ .base-modal__exitDone_1f6ip {
57
57
  opacity: 0;
58
58
  transition: opacity 200ms ease-out;
59
59
  }
@@ -120,6 +120,7 @@ type BaseModalProps = {
120
120
  };
121
121
  type BaseModalContext = {
122
122
  parentRef: React.RefObject<HTMLDivElement>;
123
+ componentRef: React.RefObject<HTMLDivElement>;
123
124
  hasFooter?: boolean;
124
125
  hasHeader?: boolean;
125
126
  hasScroll?: boolean;
@@ -11,13 +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-modal__component_11i04","wrapper":"base-modal__wrapper_11i04","content":"base-modal__content_11i04","hidden":"base-modal__hidden_11i04","backdrop":"base-modal__backdrop_11i04","appear":"base-modal__appear_11i04","enter":"base-modal__enter_11i04","appearActive":"base-modal__appearActive_11i04","enterActive":"base-modal__enterActive_11i04","exit":"base-modal__exit_11i04","exitActive":"base-modal__exitActive_11i04","exitDone":"base-modal__exitDone_11i04"};
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
20
  parentRef: { current: null },
21
+ componentRef: { current: null },
21
22
  hasFooter: false,
22
23
  hasHeader: false,
23
24
  hasScroll: false,
@@ -196,6 +197,7 @@ const BaseModal = forwardRef(({ open, container, children, scrollHandler = 'wrap
196
197
  }, []);
197
198
  const contextValue = useMemo(() => ({
198
199
  parentRef: wrapperRef,
200
+ componentRef: componentNodeRef,
199
201
  hasHeader,
200
202
  hasFooter,
201
203
  hasScroll,
package/modern/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /* hash: n3prj */
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-modal__component_11i04 {
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-modal__wrapper_11i04 {
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-modal__content_11i04 {
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-modal__hidden_11i04 {
42
+ } .base-modal__hidden_1f6ip {
43
43
  display: none;
44
- } .base-modal__backdrop_11i04 {
44
+ } .base-modal__backdrop_1f6ip {
45
45
  z-index: 0;
46
- } .base-modal__appear_11i04,
47
- .base-modal__enter_11i04 {
46
+ } .base-modal__appear_1f6ip,
47
+ .base-modal__enter_1f6ip {
48
48
  opacity: 0;
49
- } .base-modal__appearActive_11i04,
50
- .base-modal__enterActive_11i04 {
49
+ } .base-modal__appearActive_1f6ip,
50
+ .base-modal__enterActive_1f6ip {
51
51
  opacity: 1;
52
52
  transition: opacity 200ms ease-in;
53
- } .base-modal__exit_11i04 {
53
+ } .base-modal__exit_1f6ip {
54
54
  opacity: 1;
55
- } .base-modal__exitActive_11i04,
56
- .base-modal__exitDone_11i04 {
55
+ } .base-modal__exitActive_1f6ip,
56
+ .base-modal__exitDone_1f6ip {
57
57
  opacity: 0;
58
58
  transition: opacity 200ms ease-out;
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-base-modal",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "BaseModal component",
5
5
  "keywords": [],
6
6
  "license": "MIT",