@gustavo-valsechi/client 1.4.131 → 1.4.132
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 -4
- package/dist/components/types/form/types/select/index.mjs +3 -4
- package/dist/components/types/form/types/select/options/index.js +0 -1
- package/dist/components/types/form/types/select/options/index.mjs +0 -1
- package/dist/components/types/form/types/select/styles.js +5 -0
- package/dist/components/types/form/types/select/styles.mjs +5 -0
- package/dist/contexts/target/index.js +1 -1
- package/dist/contexts/target/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -85,6 +85,7 @@ function InputSelect(props) {
|
|
|
85
85
|
if (!optionsElement) return;
|
|
86
86
|
optionsElement.setAttribute("value", value2);
|
|
87
87
|
};
|
|
88
|
+
console.log("focus", focus);
|
|
88
89
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, children: [
|
|
89
90
|
!!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
|
|
90
91
|
props.label,
|
|
@@ -116,6 +117,7 @@ function InputSelect(props) {
|
|
|
116
117
|
{
|
|
117
118
|
className: "input-label-value",
|
|
118
119
|
onClick: () => inputRef.current.click(),
|
|
120
|
+
"data-focus": focus,
|
|
119
121
|
children: value
|
|
120
122
|
}
|
|
121
123
|
),
|
|
@@ -124,10 +126,7 @@ function InputSelect(props) {
|
|
|
124
126
|
{
|
|
125
127
|
className: "input-icon",
|
|
126
128
|
"data-focus": focus,
|
|
127
|
-
onClick: () =>
|
|
128
|
-
if (focus) return inputRef.current.blur();
|
|
129
|
-
inputRef.current.click();
|
|
130
|
-
},
|
|
129
|
+
onClick: () => inputRef.current.click(),
|
|
131
130
|
children: [
|
|
132
131
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
|
|
133
132
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
|
|
@@ -52,6 +52,7 @@ function InputSelect(props) {
|
|
|
52
52
|
if (!optionsElement) return;
|
|
53
53
|
optionsElement.setAttribute("value", value2);
|
|
54
54
|
};
|
|
55
|
+
console.log("focus", focus);
|
|
55
56
|
return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, children: [
|
|
56
57
|
!!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
|
|
57
58
|
props.label,
|
|
@@ -83,6 +84,7 @@ function InputSelect(props) {
|
|
|
83
84
|
{
|
|
84
85
|
className: "input-label-value",
|
|
85
86
|
onClick: () => inputRef.current.click(),
|
|
87
|
+
"data-focus": focus,
|
|
86
88
|
children: value
|
|
87
89
|
}
|
|
88
90
|
),
|
|
@@ -91,10 +93,7 @@ function InputSelect(props) {
|
|
|
91
93
|
{
|
|
92
94
|
className: "input-icon",
|
|
93
95
|
"data-focus": focus,
|
|
94
|
-
onClick: () =>
|
|
95
|
-
if (focus) return inputRef.current.blur();
|
|
96
|
-
inputRef.current.click();
|
|
97
|
-
},
|
|
96
|
+
onClick: () => inputRef.current.click(),
|
|
98
97
|
children: [
|
|
99
98
|
/* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
|
|
100
99
|
/* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
|
|
@@ -55,7 +55,6 @@ function InputSelectOption(props) {
|
|
|
55
55
|
const normalize = (text2) => import_lodash.default.deburr(text2 == null ? void 0 : text2.toLowerCase());
|
|
56
56
|
if (import_lodash.default.isString(value)) return import_lodash.default.includes(normalize(value), normalize(filter));
|
|
57
57
|
const text = import_utils.default.format.textIntoElement(value);
|
|
58
|
-
console.log(text);
|
|
59
58
|
return import_lodash.default.includes(normalize(text), normalize(filter));
|
|
60
59
|
});
|
|
61
60
|
setOptions(filtredOptions);
|
|
@@ -22,7 +22,6 @@ function InputSelectOption(props) {
|
|
|
22
22
|
const normalize = (text2) => _.deburr(text2 == null ? void 0 : text2.toLowerCase());
|
|
23
23
|
if (_.isString(value)) return _.includes(normalize(value), normalize(filter));
|
|
24
24
|
const text = Utils.format.textIntoElement(value);
|
|
25
|
-
console.log(text);
|
|
26
25
|
return _.includes(normalize(text), normalize(filter));
|
|
27
26
|
});
|
|
28
27
|
setOptions(filtredOptions);
|
|
@@ -60,6 +60,7 @@ const Container = import_styled_components.default.div`
|
|
|
60
60
|
|
|
61
61
|
&:focus {
|
|
62
62
|
cursor: text;
|
|
63
|
+
pointer-events: none;
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
&:disabled {
|
|
@@ -84,6 +85,10 @@ const Container = import_styled_components.default.div`
|
|
|
84
85
|
padding: 0 1rem;
|
|
85
86
|
display: flex;
|
|
86
87
|
align-items: center;
|
|
88
|
+
|
|
89
|
+
&[data-focus="true"] {
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
}
|
|
87
92
|
}
|
|
88
93
|
|
|
89
94
|
.input-icon {
|
|
@@ -27,6 +27,7 @@ const Container = styled.div`
|
|
|
27
27
|
|
|
28
28
|
&:focus {
|
|
29
29
|
cursor: text;
|
|
30
|
+
pointer-events: none;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
&:disabled {
|
|
@@ -51,6 +52,10 @@ const Container = styled.div`
|
|
|
51
52
|
padding: 0 1rem;
|
|
52
53
|
display: flex;
|
|
53
54
|
align-items: center;
|
|
55
|
+
|
|
56
|
+
&[data-focus="true"] {
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
60
|
|
|
56
61
|
.input-icon {
|
|
@@ -55,7 +55,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
55
55
|
insideMemory.splice(import_lodash.default.findIndex(insideMemory, (i) => i === index), 1);
|
|
56
56
|
console.log("insideMemory in blur function", insideMemory);
|
|
57
57
|
elementFocusable(targets[index], index).focus();
|
|
58
|
-
|
|
58
|
+
elementFocusable(targets[index], index).blur();
|
|
59
59
|
};
|
|
60
60
|
const close = (index) => {
|
|
61
61
|
const element = containerRef.current[index];
|
|
@@ -21,7 +21,7 @@ const TargetProviderContainer = ({ children }) => {
|
|
|
21
21
|
insideMemory.splice(_.findIndex(insideMemory, (i) => i === index), 1);
|
|
22
22
|
console.log("insideMemory in blur function", insideMemory);
|
|
23
23
|
elementFocusable(targets[index], index).focus();
|
|
24
|
-
|
|
24
|
+
elementFocusable(targets[index], index).blur();
|
|
25
25
|
};
|
|
26
26
|
const close = (index) => {
|
|
27
27
|
const element = containerRef.current[index];
|