@gustavo-valsechi/client 1.4.142 → 1.4.143

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.
@@ -74,9 +74,9 @@ function InputSelect(props) {
74
74
  return () => target.remove(inputRef);
75
75
  }, [containerRef, inputRef]);
76
76
  const onBlur = (event) => {
77
+ setFocus(false);
77
78
  setFilter("");
78
79
  if (register.onBlur) register.onBlur(event);
79
- setTimeout(() => setFocus(false), 10);
80
80
  };
81
81
  const onFocus = (event) => {
82
82
  setFocus(true);
@@ -126,16 +126,12 @@ function InputSelect(props) {
126
126
  children: value
127
127
  }
128
128
  ),
129
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
129
+ focus ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "input-icon", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
130
  "div",
131
131
  {
132
132
  className: "input-icon",
133
- "data-focus": focus,
134
133
  onClick: () => inputRef.current.focus(),
135
- children: [
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
138
- ]
134
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
139
135
  }
140
136
  )
141
137
  ]
@@ -41,9 +41,9 @@ function InputSelect(props) {
41
41
  return () => target.remove(inputRef);
42
42
  }, [containerRef, inputRef]);
43
43
  const onBlur = (event) => {
44
+ setFocus(false);
44
45
  setFilter("");
45
46
  if (register.onBlur) register.onBlur(event);
46
- setTimeout(() => setFocus(false), 10);
47
47
  };
48
48
  const onFocus = (event) => {
49
49
  setFocus(true);
@@ -93,16 +93,12 @@ function InputSelect(props) {
93
93
  children: value
94
94
  }
95
95
  ),
96
- /* @__PURE__ */ jsxs(
96
+ focus ? /* @__PURE__ */ jsx("div", { className: "input-icon", children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }) }) : /* @__PURE__ */ jsx(
97
97
  "div",
98
98
  {
99
99
  className: "input-icon",
100
- "data-focus": focus,
101
100
  onClick: () => inputRef.current.focus(),
102
- children: [
103
- /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
104
- /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
105
- ]
101
+ children: /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
106
102
  }
107
103
  )
108
104
  ]
@@ -99,37 +99,6 @@ const Container = import_styled_components.default.div`
99
99
 
100
100
  i {
101
101
  font-size: .9rem;
102
-
103
- &.fa-chevron-up {
104
- z-index: -1;
105
- opacity: 0;
106
- position: fixed;
107
- }
108
-
109
- &.fa-chevron-down {
110
- z-index: 0;
111
- opacity: 1;
112
- position: relative;
113
- }
114
- }
115
-
116
- &[data-focus="true"] {
117
- pointer-events: none;
118
- cursor: pointer;
119
-
120
- i {
121
- &.fa-chevron-up {
122
- z-index: 0;
123
- opacity: 1;
124
- position: relative;
125
- }
126
-
127
- &.fa-chevron-down {
128
- z-index: -1;
129
- opacity: 0;
130
- position: fixed;
131
- }
132
- }
133
102
  }
134
103
  }
135
104
  }
@@ -66,37 +66,6 @@ const Container = styled.div`
66
66
 
67
67
  i {
68
68
  font-size: .9rem;
69
-
70
- &.fa-chevron-up {
71
- z-index: -1;
72
- opacity: 0;
73
- position: fixed;
74
- }
75
-
76
- &.fa-chevron-down {
77
- z-index: 0;
78
- opacity: 1;
79
- position: relative;
80
- }
81
- }
82
-
83
- &[data-focus="true"] {
84
- pointer-events: none;
85
- cursor: pointer;
86
-
87
- i {
88
- &.fa-chevron-up {
89
- z-index: 0;
90
- opacity: 1;
91
- position: relative;
92
- }
93
-
94
- &.fa-chevron-down {
95
- z-index: -1;
96
- opacity: 0;
97
- position: fixed;
98
- }
99
- }
100
69
  }
101
70
  }
102
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.142",
3
+ "version": "1.4.143",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",