@gustavo-valsechi/client 1.4.261 → 1.4.263

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,6 +54,7 @@ function InputSelect(props) {
54
54
  (0, import_react.useEffect)(() => {
55
55
  var _a2;
56
56
  if (!(inputRef == null ? void 0 : inputRef.current) || !(containerRef == null ? void 0 : containerRef.current) || !Object.keys(props.options || {}).length) return;
57
+ console.log(containerRef == null ? void 0 : containerRef.current);
57
58
  target.add({
58
59
  ref: inputRef,
59
60
  component: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -62,7 +63,7 @@ function InputSelect(props) {
62
63
  ...props,
63
64
  inputRef,
64
65
  register,
65
- width: ((_a2 = containerRef == null ? void 0 : containerRef.current) == null ? void 0 : _a2.offsetWidth) || 0
66
+ width: ((_a2 = containerRef == null ? void 0 : containerRef.current) == null ? void 0 : _a2.offsetWidth) - 1 || 0
66
67
  }
67
68
  )
68
69
  });
@@ -21,6 +21,7 @@ function InputSelect(props) {
21
21
  useEffect(() => {
22
22
  var _a2;
23
23
  if (!(inputRef == null ? void 0 : inputRef.current) || !(containerRef == null ? void 0 : containerRef.current) || !Object.keys(props.options || {}).length) return;
24
+ console.log(containerRef == null ? void 0 : containerRef.current);
24
25
  target.add({
25
26
  ref: inputRef,
26
27
  component: /* @__PURE__ */ jsx(
@@ -29,7 +30,7 @@ function InputSelect(props) {
29
30
  ...props,
30
31
  inputRef,
31
32
  register,
32
- width: ((_a2 = containerRef == null ? void 0 : containerRef.current) == null ? void 0 : _a2.offsetWidth) || 0
33
+ width: ((_a2 = containerRef == null ? void 0 : containerRef.current) == null ? void 0 : _a2.offsetWidth) - 1 || 0
33
34
  }
34
35
  )
35
36
  });
@@ -62,13 +62,18 @@ const TargetProviderContainer = ({ children }) => {
62
62
  const addScrollListener = (el) => {
63
63
  el.addEventListener("scroll", handleScroll, { passive: true });
64
64
  };
65
- const scrollables = document.querySelectorAll("*");
66
- scrollables.forEach((el) => {
65
+ const handleScrollabels = (el) => {
67
66
  const style = getComputedStyle(el);
68
67
  if (/(auto|scroll|overlay)/.test(style.overflow + style.overflowY + style.overflowX)) {
69
68
  addScrollListener(el);
70
69
  }
71
- });
70
+ };
71
+ const divScrollables = document.querySelectorAll("div");
72
+ const articleScrollables = document.querySelectorAll("article");
73
+ const ulScrollables = document.querySelectorAll("ul");
74
+ divScrollables.forEach((el) => handleScrollabels(el));
75
+ articleScrollables.forEach((el) => handleScrollabels(el));
76
+ ulScrollables.forEach((el) => handleScrollabels(el));
72
77
  const observer = new MutationObserver((mutations) => {
73
78
  for (const mutation of mutations) {
74
79
  mutation.addedNodes.forEach((node) => {
@@ -28,13 +28,18 @@ const TargetProviderContainer = ({ children }) => {
28
28
  const addScrollListener = (el) => {
29
29
  el.addEventListener("scroll", handleScroll, { passive: true });
30
30
  };
31
- const scrollables = document.querySelectorAll("*");
32
- scrollables.forEach((el) => {
31
+ const handleScrollabels = (el) => {
33
32
  const style = getComputedStyle(el);
34
33
  if (/(auto|scroll|overlay)/.test(style.overflow + style.overflowY + style.overflowX)) {
35
34
  addScrollListener(el);
36
35
  }
37
- });
36
+ };
37
+ const divScrollables = document.querySelectorAll("div");
38
+ const articleScrollables = document.querySelectorAll("article");
39
+ const ulScrollables = document.querySelectorAll("ul");
40
+ divScrollables.forEach((el) => handleScrollabels(el));
41
+ articleScrollables.forEach((el) => handleScrollabels(el));
42
+ ulScrollables.forEach((el) => handleScrollabels(el));
38
43
  const observer = new MutationObserver((mutations) => {
39
44
  for (const mutation of mutations) {
40
45
  mutation.addedNodes.forEach((node) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.261",
3
+ "version": "1.4.263",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",