@gustavo-valsechi/client 1.4.150 → 1.4.152

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.
@@ -87,10 +87,15 @@ function InputSelect(props) {
87
87
  event.target.value = props.mask ? props.mask(value2) : value2;
88
88
  setFilter(value2);
89
89
  if (props.onFilter) props.onFilter(value2);
90
+ if (register.onChange) register.onChange(event);
90
91
  const optionsElement = document.getElementById(`input-${props.name}-options`);
91
92
  if (!optionsElement) return;
92
93
  optionsElement.setAttribute("value", value2);
93
94
  };
95
+ const onClick = (event) => {
96
+ inputRef.current.focus();
97
+ if (register.onClick) register.onClick(event);
98
+ };
94
99
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_styles.Container, { className: props.className, error: props.error, children: [
95
100
  !!props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_label.InputLabel, { children: [
96
101
  props.label,
@@ -106,16 +111,16 @@ function InputSelect(props) {
106
111
  "input",
107
112
  {
108
113
  ...import_lodash.default.omit(props, ["className", "register", "mask", "setValue", "watch"]),
109
- ...register,
110
114
  ref: inputRef,
111
115
  type: "text",
112
116
  maxLength: props.maxLength || 255,
113
- onChange,
114
- onFocus,
115
- onBlur,
116
- onClick: () => inputRef.current.focus(),
117
117
  value: focus ? filter : inputValue,
118
- placeholder: import_lodash.default.isString(value) ? value : (value == null ? void 0 : value.textContent) || ""
118
+ placeholder: import_lodash.default.isString(value) ? value : (value == null ? void 0 : value.textContent) || "",
119
+ ...register,
120
+ onBlur,
121
+ onFocus,
122
+ onChange,
123
+ onClick
119
124
  }
120
125
  ),
121
126
  !focus && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -54,10 +54,15 @@ function InputSelect(props) {
54
54
  event.target.value = props.mask ? props.mask(value2) : value2;
55
55
  setFilter(value2);
56
56
  if (props.onFilter) props.onFilter(value2);
57
+ if (register.onChange) register.onChange(event);
57
58
  const optionsElement = document.getElementById(`input-${props.name}-options`);
58
59
  if (!optionsElement) return;
59
60
  optionsElement.setAttribute("value", value2);
60
61
  };
62
+ const onClick = (event) => {
63
+ inputRef.current.focus();
64
+ if (register.onClick) register.onClick(event);
65
+ };
61
66
  return /* @__PURE__ */ jsxs(Container, { className: props.className, error: props.error, children: [
62
67
  !!props.label && /* @__PURE__ */ jsxs(InputLabel, { children: [
63
68
  props.label,
@@ -73,16 +78,16 @@ function InputSelect(props) {
73
78
  "input",
74
79
  {
75
80
  ..._.omit(props, ["className", "register", "mask", "setValue", "watch"]),
76
- ...register,
77
81
  ref: inputRef,
78
82
  type: "text",
79
83
  maxLength: props.maxLength || 255,
80
- onChange,
81
- onFocus,
82
- onBlur,
83
- onClick: () => inputRef.current.focus(),
84
84
  value: focus ? filter : inputValue,
85
- placeholder: _.isString(value) ? value : (value == null ? void 0 : value.textContent) || ""
85
+ placeholder: _.isString(value) ? value : (value == null ? void 0 : value.textContent) || "",
86
+ ...register,
87
+ onBlur,
88
+ onFocus,
89
+ onChange,
90
+ onClick
86
91
  }
87
92
  ),
88
93
  !focus && /* @__PURE__ */ jsx(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gustavo-valsechi/client",
3
- "version": "1.4.150",
3
+ "version": "1.4.152",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",