@gustavo-valsechi/client 1.4.132 → 1.4.134

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.
@@ -37,6 +37,7 @@ const Container = import_styled_components.default.label`
37
37
  font-size: .8rem;
38
38
  font-weight: 500;
39
39
  color: ${({ theme }) => theme.t6};
40
+ user-select: none;
40
41
  `;
41
42
  // Annotate the CommonJS export names for ESM import in node:
42
43
  0 && (module.exports = {
@@ -4,6 +4,7 @@ const Container = styled.label`
4
4
  font-size: .8rem;
5
5
  font-weight: 500;
6
6
  color: ${({ theme }) => theme.t6};
7
+ user-select: none;
7
8
  `;
8
9
  export {
9
10
  Container
@@ -85,7 +85,6 @@ function InputSelect(props) {
85
85
  if (!optionsElement) return;
86
86
  optionsElement.setAttribute("value", value2);
87
87
  };
88
- console.log("focus", focus);
89
88
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, children: [
90
89
  !!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
91
90
  props.label,
@@ -108,6 +107,7 @@ function InputSelect(props) {
108
107
  onChange,
109
108
  onFocus,
110
109
  onBlur,
110
+ onClick: () => inputRef.current.focus(),
111
111
  value: focus ? filter : "",
112
112
  placeholder: import_lodash.default.isString(value) ? value : (value == null ? void 0 : value.textContent) || ""
113
113
  }
@@ -117,7 +117,6 @@ function InputSelect(props) {
117
117
  {
118
118
  className: "input-label-value",
119
119
  onClick: () => inputRef.current.click(),
120
- "data-focus": focus,
121
120
  children: value
122
121
  }
123
122
  ),
@@ -126,7 +125,7 @@ function InputSelect(props) {
126
125
  {
127
126
  className: "input-icon",
128
127
  "data-focus": focus,
129
- onClick: () => inputRef.current.click(),
128
+ onClick: !focus && inputRef.current.click,
130
129
  children: [
131
130
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
132
131
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
@@ -52,7 +52,6 @@ function InputSelect(props) {
52
52
  if (!optionsElement) return;
53
53
  optionsElement.setAttribute("value", value2);
54
54
  };
55
- console.log("focus", focus);
56
55
  return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, children: [
57
56
  !!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
58
57
  props.label,
@@ -75,6 +74,7 @@ function InputSelect(props) {
75
74
  onChange,
76
75
  onFocus,
77
76
  onBlur,
77
+ onClick: () => inputRef.current.focus(),
78
78
  value: focus ? filter : "",
79
79
  placeholder: _.isString(value) ? value : (value == null ? void 0 : value.textContent) || ""
80
80
  }
@@ -84,7 +84,6 @@ function InputSelect(props) {
84
84
  {
85
85
  className: "input-label-value",
86
86
  onClick: () => inputRef.current.click(),
87
- "data-focus": focus,
88
87
  children: value
89
88
  }
90
89
  ),
@@ -93,7 +92,7 @@ function InputSelect(props) {
93
92
  {
94
93
  className: "input-icon",
95
94
  "data-focus": focus,
96
- onClick: () => inputRef.current.click(),
95
+ onClick: !focus && inputRef.current.click,
97
96
  children: [
98
97
  /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-up" }),
99
98
  /* @__PURE__ */ jsx("i", { "aria-hidden": true, className: "fa-solid fa-chevron-down" })
@@ -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: 180px;
41
+ max-height: 198px;
42
42
  position: relative;
43
43
  overflow-x: hidden;
44
- overflow-y: scroll;
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: 180px;
8
+ max-height: 198px;
9
9
  position: relative;
10
10
  overflow-x: hidden;
11
- overflow-y: scroll;
11
+ overflow-y: auto;
12
+
13
+ &::-webkit-scrollbar {
14
+ width: 0;
15
+ }
12
16
 
13
17
  .input-option {
14
18
  padding: .5rem 1rem;
@@ -60,7 +60,6 @@ const Container = import_styled_components.default.div`
60
60
 
61
61
  &:focus {
62
62
  cursor: text;
63
- pointer-events: none;
64
63
  }
65
64
 
66
65
  &:disabled {
@@ -85,10 +84,6 @@ const Container = import_styled_components.default.div`
85
84
  padding: 0 1rem;
86
85
  display: flex;
87
86
  align-items: center;
88
-
89
- &[data-focus="true"] {
90
- pointer-events: none;
91
- }
92
87
  }
93
88
 
94
89
  .input-icon {
@@ -114,8 +109,10 @@ const Container = import_styled_components.default.div`
114
109
  opacity: 1;
115
110
  position: relative;
116
111
  }
117
-
118
- &[data-focus="true"] {
112
+ }
113
+
114
+ &[data-focus="true"] {
115
+ i {
119
116
  &.fa-chevron-up {
120
117
  z-index: 0;
121
118
  opacity: 1;
@@ -126,9 +123,9 @@ const Container = import_styled_components.default.div`
126
123
  z-index: -1;
127
124
  opacity: 0;
128
125
  position: fixed;
129
- }
126
+ }
130
127
  }
131
- }
128
+ }
132
129
  }
133
130
  }
134
131
  `;
@@ -27,7 +27,6 @@ const Container = styled.div`
27
27
 
28
28
  &:focus {
29
29
  cursor: text;
30
- pointer-events: none;
31
30
  }
32
31
 
33
32
  &:disabled {
@@ -52,10 +51,6 @@ const Container = styled.div`
52
51
  padding: 0 1rem;
53
52
  display: flex;
54
53
  align-items: center;
55
-
56
- &[data-focus="true"] {
57
- pointer-events: none;
58
- }
59
54
  }
60
55
 
61
56
  .input-icon {
@@ -81,8 +76,10 @@ const Container = styled.div`
81
76
  opacity: 1;
82
77
  position: relative;
83
78
  }
84
-
85
- &[data-focus="true"] {
79
+ }
80
+
81
+ &[data-focus="true"] {
82
+ i {
86
83
  &.fa-chevron-up {
87
84
  z-index: 0;
88
85
  opacity: 1;
@@ -93,9 +90,9 @@ const Container = styled.div`
93
90
  z-index: -1;
94
91
  opacity: 0;
95
92
  position: fixed;
96
- }
93
+ }
97
94
  }
98
- }
95
+ }
99
96
  }
100
97
  }
101
98
  `;
@@ -128,8 +128,10 @@ const TargetProviderContainer = ({ children }) => {
128
128
  element.addEventListener("resize", () => {
129
129
  import_lodash.default.forEach(containerRef.current, (elementRef) => blur(index));
130
130
  });
131
+ focusable.addEventListener("focus", () => {
132
+ open(target, index);
133
+ });
131
134
  focusable.addEventListener("blur", () => {
132
- console.log("insideMemory in blur", insideMemory);
133
135
  if (import_lodash.default.some(insideMemory, (i) => i === index)) return;
134
136
  close(index);
135
137
  });
@@ -94,8 +94,10 @@ const TargetProviderContainer = ({ children }) => {
94
94
  element.addEventListener("resize", () => {
95
95
  _.forEach(containerRef.current, (elementRef) => blur(index));
96
96
  });
97
+ focusable.addEventListener("focus", () => {
98
+ open(target, index);
99
+ });
97
100
  focusable.addEventListener("blur", () => {
98
- console.log("insideMemory in blur", insideMemory);
99
101
  if (_.some(insideMemory, (i) => i === index)) return;
100
102
  close(index);
101
103
  });
@@ -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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.132",
3
+ "version": "1.4.134",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",