@gustavo-valsechi/client 1.4.294 → 1.4.295

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.
@@ -65,7 +65,6 @@ function InputDateTime(props) {
65
65
  },
66
66
  component: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_picker.default, { ...props })
67
67
  });
68
- return () => target.remove(inputRef);
69
68
  }, [inputRef, toggleRef]);
70
69
  const onChange = (event) => {
71
70
  var _a2;
@@ -32,7 +32,6 @@ function InputDateTime(props) {
32
32
  },
33
33
  component: /* @__PURE__ */ jsx(InputDateTimePicker, { ...props })
34
34
  });
35
- return () => target.remove(inputRef);
36
35
  }, [inputRef, toggleRef]);
37
36
  const onChange = (event) => {
38
37
  var _a2;
@@ -66,7 +66,6 @@ function InputSelect(props) {
66
66
  }
67
67
  )
68
68
  });
69
- return () => target.remove(inputRef);
70
69
  }, [containerRef, inputRef, props.options]);
71
70
  (0, import_react.useEffect)(() => {
72
71
  if (!inputRef.current || !inputValue) return;
@@ -33,7 +33,6 @@ function InputSelect(props) {
33
33
  }
34
34
  )
35
35
  });
36
- return () => target.remove(inputRef);
37
36
  }, [containerRef, inputRef, props.options]);
38
37
  useEffect(() => {
39
38
  if (!inputRef.current || !inputValue) return;
@@ -123,22 +123,7 @@ const TargetProviderContainer = ({ children }) => {
123
123
  };
124
124
  const remove = (ref) => {
125
125
  const index = import_lodash.default.findIndex(memory, (data) => data.ref.current === ref.current);
126
- if (!theme.content.isMobile) {
127
- removeInside(index);
128
- import_lodash.default.forEach(targets, (target, index2) => {
129
- var _a, _b;
130
- const element = (_a = target.ref) == null ? void 0 : _a.current;
131
- const toggleElement = ((_b = target.toggleRef) == null ? void 0 : _b.current) || element;
132
- if (!(toggleElement == null ? void 0 : toggleElement.removeEventListener)) return;
133
- const focusable = elementFocusable(target, index2);
134
- const targetElement = containerRef.current[index2];
135
- toggleElement.removeEventListener("click", () => (0, import_events.onClick)(target, index2, close, focusable, targetElement, theme, setModal));
136
- if (theme.content.isMobile) return;
137
- toggleElement.removeEventListener("mouseleave", () => removeInside(index2));
138
- focusable.removeEventListener("focus", () => (0, import_events.onFocus)(target, index2, open));
139
- focusable.removeEventListener("blur", () => (0, import_events.onBlur)(target, index2, close, focusable, insideMemory));
140
- });
141
- }
126
+ if (!theme.content.isMobile) removeInside(index);
142
127
  memory.splice(index, 1);
143
128
  setTargets([...memory]);
144
129
  };
@@ -89,22 +89,7 @@ const TargetProviderContainer = ({ children }) => {
89
89
  };
90
90
  const remove = (ref) => {
91
91
  const index = _.findIndex(memory, (data) => data.ref.current === ref.current);
92
- if (!theme.content.isMobile) {
93
- removeInside(index);
94
- _.forEach(targets, (target, index2) => {
95
- var _a, _b;
96
- const element = (_a = target.ref) == null ? void 0 : _a.current;
97
- const toggleElement = ((_b = target.toggleRef) == null ? void 0 : _b.current) || element;
98
- if (!(toggleElement == null ? void 0 : toggleElement.removeEventListener)) return;
99
- const focusable = elementFocusable(target, index2);
100
- const targetElement = containerRef.current[index2];
101
- toggleElement.removeEventListener("click", () => onClick(target, index2, close, focusable, targetElement, theme, setModal));
102
- if (theme.content.isMobile) return;
103
- toggleElement.removeEventListener("mouseleave", () => removeInside(index2));
104
- focusable.removeEventListener("focus", () => onFocus(target, index2, open));
105
- focusable.removeEventListener("blur", () => onBlur(target, index2, close, focusable, insideMemory));
106
- });
107
- }
92
+ if (!theme.content.isMobile) removeInside(index);
108
93
  memory.splice(index, 1);
109
94
  setTargets([...memory]);
110
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.294",
3
+ "version": "1.4.295",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",