@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.
- package/dist/components/types/form/types/select/index.js +3 -2
- package/dist/components/types/form/types/select/index.mjs +3 -2
- package/dist/components/types/form/types/select/options/index.js +1 -1
- package/dist/components/types/form/types/select/options/index.mjs +1 -1
- package/dist/contexts/target/index.js +4 -0
- package/dist/contexts/target/index.mjs +4 -0
- package/package.json +1 -1
|
@@ -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", {
|
|
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", {
|
|
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
|
] });
|
|
@@ -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
|
};
|