@gustavo-valsechi/client 1.4.194 → 1.4.196
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.
|
@@ -50,6 +50,7 @@ const Container = import_styled_components.default.div`
|
|
|
50
50
|
width: 100%;
|
|
51
51
|
height: 100%;
|
|
52
52
|
background: rgb(0, 0, 0, 0.3);
|
|
53
|
+
animation: backAnimation ease .3s;
|
|
53
54
|
opacity: ${(props) => props.toggle ? "1" : "0"};
|
|
54
55
|
transition: ease 0.3s;
|
|
55
56
|
position: absolute;
|
|
@@ -68,7 +69,8 @@ const Container = import_styled_components.default.div`
|
|
|
68
69
|
opacity: ${(props) => props.position === "center" && !props.toggle ? "0" : "1"};
|
|
69
70
|
transition: ease 0.3s;
|
|
70
71
|
position: absolute;
|
|
71
|
-
|
|
72
|
+
animation: containerAnimation ease .3s;
|
|
73
|
+
|
|
72
74
|
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 50%;"}
|
|
73
75
|
|
|
74
76
|
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
@@ -76,7 +78,7 @@ const Container = import_styled_components.default.div`
|
|
|
76
78
|
width: ${(props) => props.position !== "center" ? "18rem" : "100%"};
|
|
77
79
|
max-width: 100%;
|
|
78
80
|
padding-bottom: 3rem !important;
|
|
79
|
-
|
|
81
|
+
animation: containerMobileAnimation ease .3s;
|
|
80
82
|
transform: ${(props) => props.toggle ? props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(0)" : props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(50%)"};
|
|
81
83
|
|
|
82
84
|
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 0;"}
|
|
@@ -161,6 +163,37 @@ const Container = import_styled_components.default.div`
|
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
}
|
|
166
|
+
|
|
167
|
+
@keyframes backAnimation {
|
|
168
|
+
0% {
|
|
169
|
+
opacity: 0;
|
|
170
|
+
}
|
|
171
|
+
100% {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@keyframes containerAnimation {
|
|
177
|
+
0% {
|
|
178
|
+
transform: ${(props) => props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(43%)"};
|
|
179
|
+
opacity: ${(props) => props.position === "center" ? "0" : "1"};
|
|
180
|
+
}
|
|
181
|
+
100% {
|
|
182
|
+
transform: ${(props) => props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(50%)"};
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@keyframes containerMobileAnimation {
|
|
188
|
+
0% {
|
|
189
|
+
transform: ${(props) => props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(50%)"};
|
|
190
|
+
opacity: ${(props) => props.position === "center" ? "0" : "1"};
|
|
191
|
+
}
|
|
192
|
+
100% {
|
|
193
|
+
transform: ${(props) => props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(0)"};
|
|
194
|
+
opacity: 1;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
164
197
|
`;
|
|
165
198
|
// Annotate the CommonJS export names for ESM import in node:
|
|
166
199
|
0 && (module.exports = {
|
|
@@ -17,6 +17,7 @@ const Container = styled.div`
|
|
|
17
17
|
width: 100%;
|
|
18
18
|
height: 100%;
|
|
19
19
|
background: rgb(0, 0, 0, 0.3);
|
|
20
|
+
animation: backAnimation ease .3s;
|
|
20
21
|
opacity: ${(props) => props.toggle ? "1" : "0"};
|
|
21
22
|
transition: ease 0.3s;
|
|
22
23
|
position: absolute;
|
|
@@ -35,7 +36,8 @@ const Container = styled.div`
|
|
|
35
36
|
opacity: ${(props) => props.position === "center" && !props.toggle ? "0" : "1"};
|
|
36
37
|
transition: ease 0.3s;
|
|
37
38
|
position: absolute;
|
|
38
|
-
|
|
39
|
+
animation: containerAnimation ease .3s;
|
|
40
|
+
|
|
39
41
|
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 50%;"}
|
|
40
42
|
|
|
41
43
|
@media(max-width: ${({ theme }) => theme.mobileMaxWidth}) {
|
|
@@ -43,7 +45,7 @@ const Container = styled.div`
|
|
|
43
45
|
width: ${(props) => props.position !== "center" ? "18rem" : "100%"};
|
|
44
46
|
max-width: 100%;
|
|
45
47
|
padding-bottom: 3rem !important;
|
|
46
|
-
|
|
48
|
+
animation: containerMobileAnimation ease .3s;
|
|
47
49
|
transform: ${(props) => props.toggle ? props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(0)" : props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(50%)"};
|
|
48
50
|
|
|
49
51
|
${(props) => props.position === "right" ? "right: 0;" : props.position === "left" ? "left: 0;" : "left: 50%; bottom: 0;"}
|
|
@@ -128,6 +130,37 @@ const Container = styled.div`
|
|
|
128
130
|
}
|
|
129
131
|
}
|
|
130
132
|
}
|
|
133
|
+
|
|
134
|
+
@keyframes backAnimation {
|
|
135
|
+
0% {
|
|
136
|
+
opacity: 0;
|
|
137
|
+
}
|
|
138
|
+
100% {
|
|
139
|
+
opacity: 1;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
@keyframes containerAnimation {
|
|
144
|
+
0% {
|
|
145
|
+
transform: ${(props) => props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(43%)"};
|
|
146
|
+
opacity: ${(props) => props.position === "center" ? "0" : "1"};
|
|
147
|
+
}
|
|
148
|
+
100% {
|
|
149
|
+
transform: ${(props) => props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(50%)"};
|
|
150
|
+
opacity: 1;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@keyframes containerMobileAnimation {
|
|
155
|
+
0% {
|
|
156
|
+
transform: ${(props) => props.position === "right" ? "translateX(18rem)" : props.position === "left" ? "translateX(-18rem)" : "translateX(-50%) translateY(50%)"};
|
|
157
|
+
opacity: ${(props) => props.position === "center" ? "0" : "1"};
|
|
158
|
+
}
|
|
159
|
+
100% {
|
|
160
|
+
transform: ${(props) => props.position === "right" || props.position === "left" ? "translateX(0rem)" : "translateX(-50%) translateY(0)"};
|
|
161
|
+
opacity: 1;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
131
164
|
`;
|
|
132
165
|
export {
|
|
133
166
|
Container
|
|
@@ -83,7 +83,7 @@ const ModalProviderContainer = ({ children }) => {
|
|
|
83
83
|
var _a;
|
|
84
84
|
const content = import_lodash.default.find(memory, (modal) => modal.name === modalName);
|
|
85
85
|
if (!content) return;
|
|
86
|
-
setProps(modalName, { toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle) });
|
|
86
|
+
setProps(modalName, { toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle), content: {} });
|
|
87
87
|
};
|
|
88
88
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
89
89
|
ModalContext.Provider,
|
|
@@ -49,7 +49,7 @@ const ModalProviderContainer = ({ children }) => {
|
|
|
49
49
|
var _a;
|
|
50
50
|
const content = _.find(memory, (modal) => modal.name === modalName);
|
|
51
51
|
if (!content) return;
|
|
52
|
-
setProps(modalName, { toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle) });
|
|
52
|
+
setProps(modalName, { toggle: !((_a = content == null ? void 0 : content.props) == null ? void 0 : _a.toggle), content: {} });
|
|
53
53
|
};
|
|
54
54
|
return /* @__PURE__ */ jsxs(
|
|
55
55
|
ModalContext.Provider,
|