@gustavo-valsechi/client 1.4.90 → 1.4.92

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.
@@ -67,11 +67,12 @@ function InputSelect(props) {
67
67
  props.label,
68
68
  props.required ? "*" : ""
69
69
  ] }),
70
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ref: inputRef, className: "input-content", children: [
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "input-content", children: [
71
71
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
72
72
  "input",
73
73
  {
74
74
  ...import_lodash.default.omit(props, ["className", "register", "mask", "setValue"]),
75
+ ref: inputRef,
75
76
  type: "text",
76
77
  maxLength: props.maxLength || 255,
77
78
  ...register,
@@ -80,7 +81,7 @@ function InputSelect(props) {
80
81
  onBlur
81
82
  }
82
83
  ),
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" }) })
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-icon", onClick: () => inputRef.current.click(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" }) })
84
85
  ] }),
85
86
  !!props.error && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_error.InputError, { children: props.error })
86
87
  ] });
@@ -34,11 +34,12 @@ function InputSelect(props) {
34
34
  props.label,
35
35
  props.required ? "*" : ""
36
36
  ] }),
37
- /* @__PURE__ */ jsxs("div", { ref: inputRef, className: "input-content", children: [
37
+ /* @__PURE__ */ jsxs("div", { className: "input-content", children: [
38
38
  /* @__PURE__ */ jsx(
39
39
  "input",
40
40
  {
41
41
  ..._.omit(props, ["className", "register", "mask", "setValue"]),
42
+ ref: inputRef,
42
43
  type: "text",
43
44
  maxLength: props.maxLength || 255,
44
45
  ...register,
@@ -47,7 +48,7 @@ function InputSelect(props) {
47
48
  onBlur
48
49
  }
49
50
  ),
50
- /* @__PURE__ */ jsx("div", { className: "input-icon", children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" }) })
51
+ /* @__PURE__ */ jsx("div", { className: "input-icon", onClick: () => inputRef.current.click(), children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: focus ? "fa-solid fa-chevron-up" : "fa-solid fa-chevron-down" }) })
51
52
  ] }),
52
53
  !!props.error && /* @__PURE__ */ jsx(InputError, { children: props.error })
53
54
  ] });
@@ -50,7 +50,7 @@ function InputSelectOption(props) {
50
50
  {
51
51
  className: "input-option",
52
52
  onClick: () => set(Object.keys(data)[index]),
53
- children: Object.values(data)
53
+ children: Object.values(data)[index] || ""
54
54
  },
55
55
  index
56
56
  )
@@ -17,7 +17,7 @@ function InputSelectOption(props) {
17
17
  {
18
18
  className: "input-option",
19
19
  onClick: () => set(Object.keys(data)[index]),
20
- children: Object.values(data)
20
+ children: Object.values(data)[index] || ""
21
21
  },
22
22
  index
23
23
  )
@@ -47,6 +47,10 @@ const TargetProviderContainer = ({ children }) => {
47
47
  const elementFocusable = (target, index) => {
48
48
  const focusableTags = ["input", "select", "textarea", "button"];
49
49
  const isFocusable = import_lodash.default.some(focusableTags, (tag) => target.ref.current.tagName.toLowerCase() === tag);
50
+ console.log("tagName", target.ref.current.tagName.toLowerCase());
51
+ console.log("isFocusable", isFocusable);
52
+ console.log("target.ref.current", target.ref.current);
53
+ console.log("inputRef.current[index]", inputRef.current[index]);
50
54
  if (isFocusable) return target.ref.current;
51
55
  return inputRef.current[index];
52
56
  };
@@ -13,6 +13,10 @@ const TargetProviderContainer = ({ children }) => {
13
13
  const elementFocusable = (target, index) => {
14
14
  const focusableTags = ["input", "select", "textarea", "button"];
15
15
  const isFocusable = _.some(focusableTags, (tag) => target.ref.current.tagName.toLowerCase() === tag);
16
+ console.log("tagName", target.ref.current.tagName.toLowerCase());
17
+ console.log("isFocusable", isFocusable);
18
+ console.log("target.ref.current", target.ref.current);
19
+ console.log("inputRef.current[index]", inputRef.current[index]);
16
20
  if (isFocusable) return target.ref.current;
17
21
  return inputRef.current[index];
18
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.90",
3
+ "version": "1.4.92",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",