@gustavo-valsechi/client 1.4.131 → 1.4.133
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/label/styles.js +1 -0
- package/dist/components/types/form/types/label/styles.mjs +1 -0
- 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/options/styles.js +6 -2
- package/dist/components/types/form/types/select/options/styles.mjs +6 -2
- package/dist/components/types/form/types/select/styles.js +6 -4
- package/dist/components/types/form/types/select/styles.mjs +6 -4
- package/dist/contexts/target/index.js +1 -1
- package/dist/contexts/target/index.mjs +1 -1
- package/dist/contexts/theme/global.styles.js +1 -1
- package/dist/contexts/theme/global.styles.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,
|
|
@@ -107,6 +108,7 @@ function InputSelect(props) {
|
|
|
107
108
|
onChange,
|
|
108
109
|
onFocus,
|
|
109
110
|
onBlur,
|
|
111
|
+
onClick: () => inputRef.current.focus(),
|
|
110
112
|
value: focus ? filter : "",
|
|
111
113
|
placeholder: import_lodash.default.isString(value) ? value : (value == null ? void 0 : value.textContent) || ""
|
|
112
114
|
}
|
|
@@ -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: () => !focus && 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,
|
|
@@ -74,6 +75,7 @@ function InputSelect(props) {
|
|
|
74
75
|
onChange,
|
|
75
76
|
onFocus,
|
|
76
77
|
onBlur,
|
|
78
|
+
onClick: () => inputRef.current.focus(),
|
|
77
79
|
value: focus ? filter : "",
|
|
78
80
|
placeholder: _.isString(value) ? value : (value == null ? void 0 : value.textContent) || ""
|
|
79
81
|
}
|
|
@@ -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: () => !focus && 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);
|
|
@@ -38,10 +38,14 @@ const Container = import_styled_components.default.div`
|
|
|
38
38
|
background-color: ${({ theme }) => theme.primary};
|
|
39
39
|
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
40
40
|
border-radius: 5px;
|
|
41
|
-
max-height:
|
|
41
|
+
max-height: 198px;
|
|
42
42
|
position: relative;
|
|
43
43
|
overflow-x: hidden;
|
|
44
|
-
overflow-y:
|
|
44
|
+
overflow-y: auto;
|
|
45
|
+
|
|
46
|
+
&::-webkit-scrollbar {
|
|
47
|
+
width: 0;
|
|
48
|
+
}
|
|
45
49
|
|
|
46
50
|
.input-option {
|
|
47
51
|
padding: .5rem 1rem;
|
|
@@ -5,10 +5,14 @@ const Container = styled.div`
|
|
|
5
5
|
background-color: ${({ theme }) => theme.primary};
|
|
6
6
|
border: 1px solid ${({ error, theme }) => error ? theme.negative : theme.t2};
|
|
7
7
|
border-radius: 5px;
|
|
8
|
-
max-height:
|
|
8
|
+
max-height: 198px;
|
|
9
9
|
position: relative;
|
|
10
10
|
overflow-x: hidden;
|
|
11
|
-
overflow-y:
|
|
11
|
+
overflow-y: auto;
|
|
12
|
+
|
|
13
|
+
&::-webkit-scrollbar {
|
|
14
|
+
width: 0;
|
|
15
|
+
}
|
|
12
16
|
|
|
13
17
|
.input-option {
|
|
14
18
|
padding: .5rem 1rem;
|
|
@@ -109,8 +109,10 @@ const Container = import_styled_components.default.div`
|
|
|
109
109
|
opacity: 1;
|
|
110
110
|
position: relative;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[data-focus="true"] {
|
|
115
|
+
i {
|
|
114
116
|
&.fa-chevron-up {
|
|
115
117
|
z-index: 0;
|
|
116
118
|
opacity: 1;
|
|
@@ -121,9 +123,9 @@ const Container = import_styled_components.default.div`
|
|
|
121
123
|
z-index: -1;
|
|
122
124
|
opacity: 0;
|
|
123
125
|
position: fixed;
|
|
124
|
-
}
|
|
126
|
+
}
|
|
125
127
|
}
|
|
126
|
-
}
|
|
128
|
+
}
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
`;
|
|
@@ -76,8 +76,10 @@ const Container = styled.div`
|
|
|
76
76
|
opacity: 1;
|
|
77
77
|
position: relative;
|
|
78
78
|
}
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[data-focus="true"] {
|
|
82
|
+
i {
|
|
81
83
|
&.fa-chevron-up {
|
|
82
84
|
z-index: 0;
|
|
83
85
|
opacity: 1;
|
|
@@ -88,9 +90,9 @@ const Container = styled.div`
|
|
|
88
90
|
z-index: -1;
|
|
89
91
|
opacity: 0;
|
|
90
92
|
position: fixed;
|
|
91
|
-
}
|
|
93
|
+
}
|
|
92
94
|
}
|
|
93
|
-
}
|
|
95
|
+
}
|
|
94
96
|
}
|
|
95
97
|
}
|
|
96
98
|
`;
|
|
@@ -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];
|
|
@@ -26,7 +26,7 @@ var import_styled_components = require("styled-components");
|
|
|
26
26
|
const GlobalStyle = import_styled_components.createGlobalStyle`
|
|
27
27
|
html, body, input, select, textarea, div, button {
|
|
28
28
|
font-family: "Poppins", sans-serif !important;
|
|
29
|
-
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
29
|
+
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
html, body {
|
|
@@ -3,7 +3,7 @@ import { createGlobalStyle } from "styled-components";
|
|
|
3
3
|
const GlobalStyle = createGlobalStyle`
|
|
4
4
|
html, body, input, select, textarea, div, button {
|
|
5
5
|
font-family: "Poppins", sans-serif !important;
|
|
6
|
-
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
6
|
+
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
html, body {
|