@gustavo-valsechi/client 1.4.140 → 1.4.142

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.
@@ -75,11 +75,11 @@ function InputSelect(props) {
75
75
  }, [containerRef, inputRef]);
76
76
  const onBlur = (event) => {
77
77
  setFilter("");
78
- setTimeout(() => setFocus(false), 1);
79
78
  if (register.onBlur) register.onBlur(event);
79
+ setTimeout(() => setFocus(false), 10);
80
80
  };
81
81
  const onFocus = (event) => {
82
- setTimeout(() => setFocus(true), 1);
82
+ setFocus(true);
83
83
  if (register.onFocus) register.onFocus(event);
84
84
  };
85
85
  const onChange = (event) => {
@@ -131,11 +131,7 @@ function InputSelect(props) {
131
131
  {
132
132
  className: "input-icon",
133
133
  "data-focus": focus,
134
- onClick: () => {
135
- console.log(focus);
136
- if (focus) return;
137
- inputRef.current.focus();
138
- },
134
+ onClick: () => inputRef.current.focus(),
139
135
  children: [
140
136
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
141
137
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
@@ -42,11 +42,11 @@ function InputSelect(props) {
42
42
  }, [containerRef, inputRef]);
43
43
  const onBlur = (event) => {
44
44
  setFilter("");
45
- setTimeout(() => setFocus(false), 1);
46
45
  if (register.onBlur) register.onBlur(event);
46
+ setTimeout(() => setFocus(false), 10);
47
47
  };
48
48
  const onFocus = (event) => {
49
- setTimeout(() => setFocus(true), 1);
49
+ setFocus(true);
50
50
  if (register.onFocus) register.onFocus(event);
51
51
  };
52
52
  const onChange = (event) => {
@@ -98,11 +98,7 @@ function InputSelect(props) {
98
98
  {
99
99
  className: "input-icon",
100
100
  "data-focus": focus,
101
- onClick: () => {
102
- console.log(focus);
103
- if (focus) return;
104
- inputRef.current.focus();
105
- },
101
+ onClick: () => inputRef.current.focus(),
106
102
  children: [
107
103
  /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
108
104
  /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
@@ -95,6 +95,7 @@ const Container = import_styled_components.default.div`
95
95
  display: flex;
96
96
  align-items: center;
97
97
  justify-content: center;
98
+ position: relative;
98
99
 
99
100
  i {
100
101
  font-size: .9rem;
@@ -113,6 +114,9 @@ const Container = import_styled_components.default.div`
113
114
  }
114
115
 
115
116
  &[data-focus="true"] {
117
+ pointer-events: none;
118
+ cursor: pointer;
119
+
116
120
  i {
117
121
  &.fa-chevron-up {
118
122
  z-index: 0;
@@ -62,6 +62,7 @@ const Container = styled.div`
62
62
  display: flex;
63
63
  align-items: center;
64
64
  justify-content: center;
65
+ position: relative;
65
66
 
66
67
  i {
67
68
  font-size: .9rem;
@@ -80,6 +81,9 @@ const Container = styled.div`
80
81
  }
81
82
 
82
83
  &[data-focus="true"] {
84
+ pointer-events: none;
85
+ cursor: pointer;
86
+
83
87
  i {
84
88
  &.fa-chevron-up {
85
89
  z-index: 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.140",
3
+ "version": "1.4.142",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",