@gustavo-valsechi/client 1.4.274 → 1.4.276
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.
|
@@ -71,7 +71,7 @@ function InputDateTime(props) {
|
|
|
71
71
|
};
|
|
72
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
73
73
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.InputLabel, { optional: props.optional, children: props.label }),
|
|
74
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "input-content", children: [
|
|
75
75
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
76
76
|
"input",
|
|
77
77
|
{
|
|
@@ -81,6 +81,7 @@ function InputDateTime(props) {
|
|
|
81
81
|
if (props.onFocus) props.onFocus(props.name);
|
|
82
82
|
},
|
|
83
83
|
...register,
|
|
84
|
+
ref: inputRef,
|
|
84
85
|
onChange
|
|
85
86
|
}
|
|
86
87
|
),
|
|
@@ -38,7 +38,7 @@ function InputDateTime(props) {
|
|
|
38
38
|
};
|
|
39
39
|
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, disabled: props.disabled, children: [
|
|
40
40
|
!!props.label && /* @__PURE__ */ jsx(InputLabel, { optional: props.optional, children: props.label }),
|
|
41
|
-
/* @__PURE__ */ jsxs("div", {
|
|
41
|
+
/* @__PURE__ */ jsxs("div", { className: "input-content", children: [
|
|
42
42
|
/* @__PURE__ */ jsx(
|
|
43
43
|
"input",
|
|
44
44
|
{
|
|
@@ -48,6 +48,7 @@ function InputDateTime(props) {
|
|
|
48
48
|
if (props.onFocus) props.onFocus(props.name);
|
|
49
49
|
},
|
|
50
50
|
...register,
|
|
51
|
+
ref: inputRef,
|
|
51
52
|
onChange
|
|
52
53
|
}
|
|
53
54
|
),
|
|
@@ -110,7 +110,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
110
110
|
}
|
|
111
111
|
const styles = window.getComputedStyle(targetElement);
|
|
112
112
|
if (styles.opacity === "1") {
|
|
113
|
-
|
|
113
|
+
close(index);
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
console.log("CLICK", target, index);
|
|
@@ -121,7 +121,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
121
121
|
removeInside(index);
|
|
122
122
|
});
|
|
123
123
|
element.addEventListener("resize", () => {
|
|
124
|
-
import_lodash.default.forEach(containerRef.current, (elementRef) =>
|
|
124
|
+
import_lodash.default.forEach(containerRef.current, (elementRef) => close(index));
|
|
125
125
|
});
|
|
126
126
|
focusable.addEventListener("focus", () => {
|
|
127
127
|
console.log("FOCUS", target, index);
|
|
@@ -161,11 +161,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
161
161
|
if (isFocusable && !target.toggleRef) return target.ref.current;
|
|
162
162
|
return inputRef.current[index];
|
|
163
163
|
};
|
|
164
|
-
const blur = (index) => {
|
|
165
|
-
removeInside(index);
|
|
166
|
-
elementFocusable(targets[index], index).focus();
|
|
167
|
-
elementFocusable(targets[index], index).blur();
|
|
168
|
-
};
|
|
169
164
|
const close = (index) => {
|
|
170
165
|
const element = containerRef.current[index];
|
|
171
166
|
element.style.opacity = "0";
|
|
@@ -192,6 +187,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
192
187
|
const add = (target) => {
|
|
193
188
|
const exists = import_lodash.default.find(memory, (data) => data.ref.current === target.ref.current);
|
|
194
189
|
if (exists) return;
|
|
190
|
+
console.log("memory", memory);
|
|
195
191
|
memory.push(target);
|
|
196
192
|
setTargets([...memory]);
|
|
197
193
|
};
|
|
@@ -76,7 +76,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
76
76
|
}
|
|
77
77
|
const styles = window.getComputedStyle(targetElement);
|
|
78
78
|
if (styles.opacity === "1") {
|
|
79
|
-
|
|
79
|
+
close(index);
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
82
|
console.log("CLICK", target, index);
|
|
@@ -87,7 +87,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
87
87
|
removeInside(index);
|
|
88
88
|
});
|
|
89
89
|
element.addEventListener("resize", () => {
|
|
90
|
-
_.forEach(containerRef.current, (elementRef) =>
|
|
90
|
+
_.forEach(containerRef.current, (elementRef) => close(index));
|
|
91
91
|
});
|
|
92
92
|
focusable.addEventListener("focus", () => {
|
|
93
93
|
console.log("FOCUS", target, index);
|
|
@@ -127,11 +127,6 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
127
127
|
if (isFocusable && !target.toggleRef) return target.ref.current;
|
|
128
128
|
return inputRef.current[index];
|
|
129
129
|
};
|
|
130
|
-
const blur = (index) => {
|
|
131
|
-
removeInside(index);
|
|
132
|
-
elementFocusable(targets[index], index).focus();
|
|
133
|
-
elementFocusable(targets[index], index).blur();
|
|
134
|
-
};
|
|
135
130
|
const close = (index) => {
|
|
136
131
|
const element = containerRef.current[index];
|
|
137
132
|
element.style.opacity = "0";
|
|
@@ -158,6 +153,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
158
153
|
const add = (target) => {
|
|
159
154
|
const exists = _.find(memory, (data) => data.ref.current === target.ref.current);
|
|
160
155
|
if (exists) return;
|
|
156
|
+
console.log("memory", memory);
|
|
161
157
|
memory.push(target);
|
|
162
158
|
setTargets([...memory]);
|
|
163
159
|
};
|