glints-aries 4.0.227 → 4.0.229
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/es/@next/Modal/Modal.js
CHANGED
|
@@ -26,13 +26,18 @@ export var Modal = /*#__PURE__*/React.forwardRef(function Modal(_ref, ref) {
|
|
|
26
26
|
onBack = _ref.onBack,
|
|
27
27
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
28
28
|
useEffect(function () {
|
|
29
|
+
if (typeof window === 'undefined' || !window.document) return;
|
|
30
|
+
var enableScroll = function enableScroll() {
|
|
31
|
+
document.body.style.overflow = 'unset';
|
|
32
|
+
};
|
|
29
33
|
if (isOpen) {
|
|
30
|
-
|
|
31
|
-
document.body.style.overflow = 'hidden';
|
|
32
|
-
}
|
|
34
|
+
document.body.style.overflow = 'hidden';
|
|
33
35
|
} else {
|
|
34
|
-
|
|
36
|
+
enableScroll();
|
|
35
37
|
}
|
|
38
|
+
return function () {
|
|
39
|
+
enableScroll();
|
|
40
|
+
};
|
|
36
41
|
}, [isOpen]);
|
|
37
42
|
if (!isOpen) {
|
|
38
43
|
return null;
|
|
@@ -10,11 +10,11 @@ export var StyledModalWrapper = styled.div.withConfig({
|
|
|
10
10
|
export var StyledModalContainer = styled.div.withConfig({
|
|
11
11
|
displayName: "ModalStyle__StyledModalContainer",
|
|
12
12
|
componentId: "sc-1694up4-1"
|
|
13
|
-
})(["position:relative;background:", ";display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:0;box-shadow:0px 26px 80px rgba(0,0,0,0.2),0px 0px 1px rgba(0,0,0,0.2);border-radius:", ";min-width:320px;width:fit-content;max-width:calc(100vw - 32px);height:fit-content;max-height:calc(100vh - 96px);"], Neutral.B100, borderRadius8);
|
|
13
|
+
})(["position:relative;background:", ";display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:0;box-shadow:0px 26px 80px rgba(0,0,0,0.2),0px 0px 1px rgba(0,0,0,0.2);border-radius:", ";min-width:320px;width:fit-content;max-width:calc(100vw - 32px);height:fit-content;max-height:calc(100vh - 96px);overflow:hidden;"], Neutral.B100, borderRadius8);
|
|
14
14
|
export var StyledModalHeader = styled.div.withConfig({
|
|
15
15
|
displayName: "ModalStyle__StyledModalHeader",
|
|
16
16
|
componentId: "sc-1694up4-2"
|
|
17
|
-
})(["display:flex;flex-direction:row;align-items:center;padding:", " 20px;box-shadow:inset 0px -1px 0px ", ";border-radius:", " 0;align-self:stretch;div{flex:1;}&[data-show-border='false']{box-shadow:unset;}@media (max-width:", "){padding:", ";}"], space16, Neutral.B95, borderRadius8, Breakpoints.large, space16);
|
|
17
|
+
})(["display:flex;flex-direction:row;align-items:center;padding:", " 20px;box-shadow:inset 0px -1px 0px ", ";border-radius:", " ", " 0 0;align-self:stretch;div{flex:1;}&[data-show-border='false']{box-shadow:unset;}@media (max-width:", "){padding:", ";}"], space16, Neutral.B95, borderRadius8, borderRadius8, Breakpoints.large, space16);
|
|
18
18
|
export var StyledModalContent = styled.div.withConfig({
|
|
19
19
|
displayName: "ModalStyle__StyledModalContent",
|
|
20
20
|
componentId: "sc-1694up4-3"
|
|
@@ -22,7 +22,7 @@ export var StyledModalContent = styled.div.withConfig({
|
|
|
22
22
|
export var StyledModalActions = styled.div.withConfig({
|
|
23
23
|
displayName: "ModalStyle__StyledModalActions",
|
|
24
24
|
componentId: "sc-1694up4-4"
|
|
25
|
-
})(["display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;align-self:stretch;padding:", " 20px;gap:10px;box-shadow:inset 0px 1px 0px ", ";border-radius:0 ", ";@media (max-width:", "){padding:", ";}"], space16, Neutral.B95, borderRadius8, Breakpoints.large, space16);
|
|
25
|
+
})(["display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;align-self:stretch;padding:", " 20px;gap:10px;box-shadow:inset 0px 1px 0px ", ";border-radius:0 0 ", " ", ";@media (max-width:", "){padding:", ";}"], space16, Neutral.B95, borderRadius8, borderRadius8, Breakpoints.large, space16);
|
|
26
26
|
export var StyledButtonContainer = styled.div.withConfig({
|
|
27
27
|
displayName: "ModalStyle__StyledButtonContainer",
|
|
28
28
|
componentId: "sc-1694up4-5"
|
|
@@ -12,9 +12,6 @@ export var ModalWithProvider = function ModalWithProvider() {
|
|
|
12
12
|
rest = _objectWithoutPropertiesLoose(_useModal, _excluded);
|
|
13
13
|
var isOpen = rest.isOpen,
|
|
14
14
|
modalProps = _objectWithoutPropertiesLoose(rest, _excluded2);
|
|
15
|
-
if (!isOpen) {
|
|
16
|
-
return null;
|
|
17
|
-
}
|
|
18
15
|
return /*#__PURE__*/React.createElement(Modal, _extends({}, modalProps, {
|
|
19
16
|
isOpen: isOpen,
|
|
20
17
|
onClose: function onClose() {
|
package/lib/@next/Modal/Modal.js
CHANGED
|
@@ -33,13 +33,18 @@ var Modal = /*#__PURE__*/_react["default"].forwardRef(function Modal(_ref, ref)
|
|
|
33
33
|
onBack = _ref.onBack,
|
|
34
34
|
props = (0, _objectWithoutPropertiesLoose2["default"])(_ref, _excluded);
|
|
35
35
|
(0, _react.useEffect)(function () {
|
|
36
|
+
if (typeof window === 'undefined' || !window.document) return;
|
|
37
|
+
var enableScroll = function enableScroll() {
|
|
38
|
+
document.body.style.overflow = 'unset';
|
|
39
|
+
};
|
|
36
40
|
if (isOpen) {
|
|
37
|
-
|
|
38
|
-
document.body.style.overflow = 'hidden';
|
|
39
|
-
}
|
|
41
|
+
document.body.style.overflow = 'hidden';
|
|
40
42
|
} else {
|
|
41
|
-
|
|
43
|
+
enableScroll();
|
|
42
44
|
}
|
|
45
|
+
return function () {
|
|
46
|
+
enableScroll();
|
|
47
|
+
};
|
|
43
48
|
}, [isOpen]);
|
|
44
49
|
if (!isOpen) {
|
|
45
50
|
return null;
|
|
@@ -18,12 +18,12 @@ exports.StyledModalWrapper = StyledModalWrapper;
|
|
|
18
18
|
var StyledModalContainer = _styledComponents["default"].div.withConfig({
|
|
19
19
|
displayName: "ModalStyle__StyledModalContainer",
|
|
20
20
|
componentId: "sc-1694up4-1"
|
|
21
|
-
})(["position:relative;background:", ";display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:0;box-shadow:0px 26px 80px rgba(0,0,0,0.2),0px 0px 1px rgba(0,0,0,0.2);border-radius:", ";min-width:320px;width:fit-content;max-width:calc(100vw - 32px);height:fit-content;max-height:calc(100vh - 96px);"], _colors.Neutral.B100, _borderRadius.borderRadius8);
|
|
21
|
+
})(["position:relative;background:", ";display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;padding:0;box-shadow:0px 26px 80px rgba(0,0,0,0.2),0px 0px 1px rgba(0,0,0,0.2);border-radius:", ";min-width:320px;width:fit-content;max-width:calc(100vw - 32px);height:fit-content;max-height:calc(100vh - 96px);overflow:hidden;"], _colors.Neutral.B100, _borderRadius.borderRadius8);
|
|
22
22
|
exports.StyledModalContainer = StyledModalContainer;
|
|
23
23
|
var StyledModalHeader = _styledComponents["default"].div.withConfig({
|
|
24
24
|
displayName: "ModalStyle__StyledModalHeader",
|
|
25
25
|
componentId: "sc-1694up4-2"
|
|
26
|
-
})(["display:flex;flex-direction:row;align-items:center;padding:", " 20px;box-shadow:inset 0px -1px 0px ", ";border-radius:", " 0;align-self:stretch;div{flex:1;}&[data-show-border='false']{box-shadow:unset;}@media (max-width:", "){padding:", ";}"], _spacing.space16, _colors.Neutral.B95, _borderRadius.borderRadius8, Breakpoints.large, _spacing.space16);
|
|
26
|
+
})(["display:flex;flex-direction:row;align-items:center;padding:", " 20px;box-shadow:inset 0px -1px 0px ", ";border-radius:", " ", " 0 0;align-self:stretch;div{flex:1;}&[data-show-border='false']{box-shadow:unset;}@media (max-width:", "){padding:", ";}"], _spacing.space16, _colors.Neutral.B95, _borderRadius.borderRadius8, _borderRadius.borderRadius8, Breakpoints.large, _spacing.space16);
|
|
27
27
|
exports.StyledModalHeader = StyledModalHeader;
|
|
28
28
|
var StyledModalContent = _styledComponents["default"].div.withConfig({
|
|
29
29
|
displayName: "ModalStyle__StyledModalContent",
|
|
@@ -33,7 +33,7 @@ exports.StyledModalContent = StyledModalContent;
|
|
|
33
33
|
var StyledModalActions = _styledComponents["default"].div.withConfig({
|
|
34
34
|
displayName: "ModalStyle__StyledModalActions",
|
|
35
35
|
componentId: "sc-1694up4-4"
|
|
36
|
-
})(["display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;align-self:stretch;padding:", " 20px;gap:10px;box-shadow:inset 0px 1px 0px ", ";border-radius:0 ", ";@media (max-width:", "){padding:", ";}"], _spacing.space16, _colors.Neutral.B95, _borderRadius.borderRadius8, Breakpoints.large, _spacing.space16);
|
|
36
|
+
})(["display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-end;align-self:stretch;padding:", " 20px;gap:10px;box-shadow:inset 0px 1px 0px ", ";border-radius:0 0 ", " ", ";@media (max-width:", "){padding:", ";}"], _spacing.space16, _colors.Neutral.B95, _borderRadius.borderRadius8, _borderRadius.borderRadius8, Breakpoints.large, _spacing.space16);
|
|
37
37
|
exports.StyledModalActions = StyledModalActions;
|
|
38
38
|
var StyledButtonContainer = _styledComponents["default"].div.withConfig({
|
|
39
39
|
displayName: "ModalStyle__StyledButtonContainer",
|
|
@@ -17,9 +17,6 @@ var ModalWithProvider = function ModalWithProvider() {
|
|
|
17
17
|
rest = (0, _objectWithoutPropertiesLoose2["default"])(_useModal, _excluded);
|
|
18
18
|
var isOpen = rest.isOpen,
|
|
19
19
|
modalProps = (0, _objectWithoutPropertiesLoose2["default"])(rest, _excluded2);
|
|
20
|
-
if (!isOpen) {
|
|
21
|
-
return null;
|
|
22
|
-
}
|
|
23
20
|
return /*#__PURE__*/_react["default"].createElement(_Modal.Modal, (0, _extends2["default"])({}, modalProps, {
|
|
24
21
|
isOpen: isOpen,
|
|
25
22
|
onClose: function onClose() {
|