carbon-react 106.6.0 → 106.6.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.
@@ -16,15 +16,14 @@ const Popover = ({
16
16
  modifiers,
17
17
  disableBackgroundUI
18
18
  }) => {
19
+ var _reference$current;
20
+
19
21
  const elementDOM = useRef();
20
22
  const {
21
23
  isInModal
22
24
  } = useContext(ModalContext);
23
- let mountNode = document.body;
24
-
25
- if (isInModal && reference.current) {
26
- mountNode = reference.current.closest("[role='dialog']");
27
- }
25
+ const candidateNode = (_reference$current = reference.current) === null || _reference$current === void 0 ? void 0 : _reference$current.closest("[role='dialog']");
26
+ const mountNode = isInModal && candidateNode ? candidateNode : document.body;
28
27
 
29
28
  if (!elementDOM.current && !disablePortal) {
30
29
  elementDOM.current = document.createElement("div");
@@ -18,7 +18,7 @@ const StyledSelect = styled.div`
18
18
  position: relative;
19
19
 
20
20
  ${StyledInput} {
21
- cursor: "text";
21
+ cursor: text;
22
22
 
23
23
  ${disabled && css`
24
24
  cursor: not-allowed;
@@ -36,15 +36,14 @@ const Popover = ({
36
36
  modifiers,
37
37
  disableBackgroundUI
38
38
  }) => {
39
+ var _reference$current;
40
+
39
41
  const elementDOM = (0, _react.useRef)();
40
42
  const {
41
43
  isInModal
42
44
  } = (0, _react.useContext)(_modal.ModalContext);
43
- let mountNode = document.body;
44
-
45
- if (isInModal && reference.current) {
46
- mountNode = reference.current.closest("[role='dialog']");
47
- }
45
+ const candidateNode = (_reference$current = reference.current) === null || _reference$current === void 0 ? void 0 : _reference$current.closest("[role='dialog']");
46
+ const mountNode = isInModal && candidateNode ? candidateNode : document.body;
48
47
 
49
48
  if (!elementDOM.current && !disablePortal) {
50
49
  elementDOM.current = document.createElement("div");
@@ -37,7 +37,7 @@ const StyledSelect = _styledComponents.default.div`
37
37
  position: relative;
38
38
 
39
39
  ${_input.default} {
40
- cursor: "text";
40
+ cursor: text;
41
41
 
42
42
  ${disabled && (0, _styledComponents.css)`
43
43
  cursor: not-allowed;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "106.6.0",
3
+ "version": "106.6.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "engineStrict": true,
6
6
  "engines": {