react-jupiter 5.11.6 → 5.11.8
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/display/index.style.js +7 -1
- package/modal/index.js +49 -10
- package/modal/theme.js +2 -1
- package/package.json +1 -1
package/display/index.style.js
CHANGED
|
@@ -17,7 +17,7 @@ Block=exports.Block=_styledComponents.default.div(_templateObject2||(_templateOb
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
DisplayStyle=exports.DisplayStyle=_styledComponents.default.div(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n ","\n ","\n ","\n\n ","\n\n ","\n ","\n\n ","\n ","\n ","\n ","\n"])),
|
|
20
|
+
DisplayStyle=exports.DisplayStyle=_styledComponents.default.div(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n ","\n ","\n ","\n\n ","\n\n ","\n ","\n ","\n\n ","\n ","\n ","\n ","\n"])),
|
|
21
21
|
(a)=>{let{display:b}=a;return b?"display: ".concat(
|
|
22
22
|
b,";"):
|
|
23
23
|
""},
|
|
@@ -42,6 +42,12 @@ b,";\n }"):
|
|
|
42
42
|
b,";"):
|
|
43
43
|
""},
|
|
44
44
|
|
|
45
|
+
(a)=>{let{alignItemsMobile:b}=a;return b?"@media only screen and (max-width: ".concat(
|
|
46
|
+
_themes.default.breakpoints.sm,"px) {\n align-items: ").concat(
|
|
47
|
+
b,";\n }"):
|
|
48
|
+
|
|
49
|
+
""},
|
|
50
|
+
|
|
45
51
|
(a)=>{let{flexDirection:b}=a;return b?"flex-direction: ".concat(
|
|
46
52
|
b,";"):
|
|
47
53
|
""},
|
package/modal/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_reactModal=_interopRequireDefault(require("react-modal")),_globalStyle=_interopRequireDefault(require("../globalStyle")),_index=require("./index.style"),_icon=_interopRequireDefault(require("../icon")),_theme=_interopRequireDefault(require("./theme"));function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _getRequireWildcardCache(a){if("function"!=typeof WeakMap)return null;var b=new WeakMap,c=new WeakMap;return(_getRequireWildcardCache=function(a){return a?c:b})(a)}function _interopRequireWildcard(b,c){if(!c&&b&&b.__esModule)return b;if(null===b||"object"!=typeof b&&"function"!=typeof b)return{default:b};var d=_getRequireWildcardCache(c);if(d&&d.has(b))return d.get(b);var e={__proto__:null},f=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in b)if("default"!=a&&Object.prototype.hasOwnProperty.call(b,a)){var g=f?Object.getOwnPropertyDescriptor(b,a):null;g&&(g.get||g.set)?Object.defineProperty(e,a,g):e[a]=b[a]}return e.default=b,d&&d.set(b,e),e}
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -31,15 +31,54 @@ function JupiterModal(a)
|
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
{let{onRequestClose:d=()=>{},onAfterOpen:e=()=>{},hasCloseButton:f=!0,disabledClose:g=!1,modalWidth:h="80%",modalWidthMobile:i="100%",fullHeight:j=!1,isOpen:b,children:c}=a;
|
|
34
|
+
const[k,l]=(0,_react.useState)(window.matchMedia("(max-width: 600px)").matches);
|
|
35
|
+
(0,_react.useEffect)(()=>{const
|
|
36
|
+
a=window.matchMedia("(max-width: 600px)"),
|
|
37
|
+
b=(a)=>l(a.matches);
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
return a.addEventListener("change",b),()=>a.removeEventListener("change",b)
|
|
41
|
+
},[]);
|
|
42
|
+
|
|
43
|
+
const m={
|
|
44
|
+
overlay:{
|
|
45
|
+
position:"fixed",
|
|
46
|
+
top:0,
|
|
47
|
+
left:0,
|
|
48
|
+
right:0,
|
|
49
|
+
bottom:0,
|
|
50
|
+
backgroundColor:"rgba(0, 0, 0, 0.75)"
|
|
51
|
+
},
|
|
52
|
+
content:{
|
|
53
|
+
position:"absolute",
|
|
54
|
+
top:"50%",
|
|
55
|
+
left:"50%",
|
|
56
|
+
right:"auto",
|
|
57
|
+
bottom:"auto",
|
|
58
|
+
marginRight:"-50%",
|
|
59
|
+
transform:"translate(-50%, -50%)",
|
|
60
|
+
width:k?i:h,
|
|
61
|
+
maxWidth:"990px",
|
|
62
|
+
padding:"20px",
|
|
63
|
+
backgroundColor:"white",
|
|
64
|
+
height:j?"100%":"auto",
|
|
65
|
+
display:"flex",
|
|
66
|
+
flexDirection:"column",
|
|
67
|
+
pointerEvents:"auto",
|
|
68
|
+
backgroundClip:"padding-box",
|
|
69
|
+
border:"1px solid rgba(0,0,0,.2)",
|
|
70
|
+
borderRadius:".2rem"
|
|
71
|
+
}
|
|
72
|
+
};
|
|
34
73
|
return/*#__PURE__*/(
|
|
35
74
|
_react.default.createElement(_reactModal.default,{
|
|
36
75
|
isOpen:b,
|
|
37
76
|
onAfterOpen:e,
|
|
38
77
|
onRequestClose:d,
|
|
39
|
-
contentLabel:"Example Modal",
|
|
40
78
|
shouldCloseOnOverlayClick:!g,
|
|
41
79
|
overlayClassName:"modal",
|
|
42
|
-
className:"
|
|
80
|
+
className:"content",
|
|
81
|
+
style:m},/*#__PURE__*/
|
|
43
82
|
|
|
44
83
|
_react.default.createElement(_globalStyle.default,null),/*#__PURE__*/
|
|
45
84
|
_react.default.createElement(_index.StyledWrapper,null,
|
|
@@ -49,8 +88,13 @@ _react.default.createElement(_icon.default,{name:"close",size:"md"})
|
|
|
49
88
|
),
|
|
50
89
|
|
|
51
90
|
c
|
|
52
|
-
)
|
|
53
|
-
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
54
98
|
|
|
55
99
|
|
|
56
100
|
|
|
@@ -59,16 +103,12 @@ _react.default.createElement("style",null,"\n .modal {\n pos
|
|
|
59
103
|
|
|
60
104
|
|
|
61
105
|
|
|
62
|
-
h,";\n height: ").concat(
|
|
63
|
-
j?"100%":"auto",";\n }\n @media(max-width: 767px){\n .modal {\n width: ").concat(
|
|
64
106
|
|
|
65
107
|
|
|
66
108
|
|
|
67
|
-
i,";\n }\n }\n .overlay {\n background: ").concat(
|
|
68
109
|
|
|
69
110
|
|
|
70
111
|
|
|
71
|
-
_theme.default.overlayColor,";\n position: relative;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n width: 100%;\n pointer-events: auto;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid rgba(0,0,0,.2);\n border-radius: .2rem;\n outline: 0;\n padding: 5px;\n }\n ")
|
|
72
112
|
|
|
73
113
|
|
|
74
114
|
|
|
@@ -87,7 +127,6 @@ _theme.default.overlayColor,";\n position: relative;\n dis
|
|
|
87
127
|
|
|
88
128
|
|
|
89
129
|
|
|
90
|
-
)
|
|
91
130
|
))
|
|
92
131
|
|
|
93
132
|
}var _default=exports.default=
|
package/modal/theme.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const theme={
|
|
4
4
|
borderRadius:_themes.default.borderRadius.low,
|
|
5
|
-
overlayColor:_themes.default.colors.
|
|
5
|
+
overlayColor:_themes.default.colors.gray00,
|
|
6
|
+
white:_themes.default.colors.white,
|
|
6
7
|
defaultColor:_themes.default.colors.riverBedDark,
|
|
7
8
|
modalShadow:_themes.default.shadows[5]
|
|
8
9
|
};var _default=exports.default=
|