@gustavo-valsechi/client 1.4.122 → 1.4.124
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.
|
@@ -54,7 +54,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
54
54
|
insideMemory.splice(import_lodash.default.findIndex(insideMemory, (i) => i === index), 1);
|
|
55
55
|
elementFocusable(targets[index], index).blur();
|
|
56
56
|
};
|
|
57
|
-
const close = (
|
|
57
|
+
const close = (index) => {
|
|
58
58
|
const element = containerRef.current[index];
|
|
59
59
|
element.style.opacity = "0";
|
|
60
60
|
element.style.zIndex = "-1";
|
|
@@ -73,7 +73,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
73
73
|
const handleScroll = () => {
|
|
74
74
|
import_lodash.default.forEach(containerRef.current, (element, index) => {
|
|
75
75
|
if (import_lodash.default.some(insideMemory, (i) => i === index)) return;
|
|
76
|
-
close(
|
|
76
|
+
close(index);
|
|
77
77
|
});
|
|
78
78
|
};
|
|
79
79
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
@@ -116,8 +116,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
116
116
|
const targetElement = containerRef.current[index];
|
|
117
117
|
element.addEventListener("click", () => {
|
|
118
118
|
const styles = window.getComputedStyle(targetElement);
|
|
119
|
-
console.log("opacity", styles.opacity);
|
|
120
|
-
console.log("target", target);
|
|
121
119
|
if (styles.opacity === "1") {
|
|
122
120
|
blur(index);
|
|
123
121
|
return;
|
|
@@ -128,8 +126,9 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
128
126
|
import_lodash.default.forEach(containerRef.current, (elementRef) => blur(index));
|
|
129
127
|
});
|
|
130
128
|
focusable.addEventListener("blur", () => {
|
|
129
|
+
console.log(insideMemory);
|
|
131
130
|
if (import_lodash.default.some(insideMemory, (i) => i === index)) return;
|
|
132
|
-
close(
|
|
131
|
+
close(index);
|
|
133
132
|
});
|
|
134
133
|
});
|
|
135
134
|
}, [targets, inputRef, containerRef]);
|
|
@@ -186,11 +185,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
186
185
|
if (import_lodash.default.some(insideMemory, (i) => i === index)) return;
|
|
187
186
|
insideMemory.push(index);
|
|
188
187
|
},
|
|
189
|
-
onClick: () => {
|
|
190
|
-
elementFocusable(target, index).focus();
|
|
191
|
-
if (import_lodash.default.some(insideMemory, (i) => i === index)) return;
|
|
192
|
-
insideMemory.push(index);
|
|
193
|
-
},
|
|
194
188
|
onMouseLeave: () => {
|
|
195
189
|
insideMemory.splice(import_lodash.default.findIndex(insideMemory, (i) => i === index), 1);
|
|
196
190
|
},
|
|
@@ -20,7 +20,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
20
20
|
insideMemory.splice(_.findIndex(insideMemory, (i) => i === index), 1);
|
|
21
21
|
elementFocusable(targets[index], index).blur();
|
|
22
22
|
};
|
|
23
|
-
const close = (
|
|
23
|
+
const close = (index) => {
|
|
24
24
|
const element = containerRef.current[index];
|
|
25
25
|
element.style.opacity = "0";
|
|
26
26
|
element.style.zIndex = "-1";
|
|
@@ -39,7 +39,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
39
39
|
const handleScroll = () => {
|
|
40
40
|
_.forEach(containerRef.current, (element, index) => {
|
|
41
41
|
if (_.some(insideMemory, (i) => i === index)) return;
|
|
42
|
-
close(
|
|
42
|
+
close(index);
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
window.addEventListener("scroll", handleScroll, { passive: true });
|
|
@@ -82,8 +82,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
82
82
|
const targetElement = containerRef.current[index];
|
|
83
83
|
element.addEventListener("click", () => {
|
|
84
84
|
const styles = window.getComputedStyle(targetElement);
|
|
85
|
-
console.log("opacity", styles.opacity);
|
|
86
|
-
console.log("target", target);
|
|
87
85
|
if (styles.opacity === "1") {
|
|
88
86
|
blur(index);
|
|
89
87
|
return;
|
|
@@ -94,8 +92,9 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
94
92
|
_.forEach(containerRef.current, (elementRef) => blur(index));
|
|
95
93
|
});
|
|
96
94
|
focusable.addEventListener("blur", () => {
|
|
95
|
+
console.log(insideMemory);
|
|
97
96
|
if (_.some(insideMemory, (i) => i === index)) return;
|
|
98
|
-
close(
|
|
97
|
+
close(index);
|
|
99
98
|
});
|
|
100
99
|
});
|
|
101
100
|
}, [targets, inputRef, containerRef]);
|
|
@@ -152,11 +151,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
152
151
|
if (_.some(insideMemory, (i) => i === index)) return;
|
|
153
152
|
insideMemory.push(index);
|
|
154
153
|
},
|
|
155
|
-
onClick: () => {
|
|
156
|
-
elementFocusable(target, index).focus();
|
|
157
|
-
if (_.some(insideMemory, (i) => i === index)) return;
|
|
158
|
-
insideMemory.push(index);
|
|
159
|
-
},
|
|
160
154
|
onMouseLeave: () => {
|
|
161
155
|
insideMemory.splice(_.findIndex(insideMemory, (i) => i === index), 1);
|
|
162
156
|
},
|