@juantroconisf/lib 2.3.6 → 2.4.1
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/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ChangeEvent, FocusEvent } from 'react';
|
|
3
|
-
import { InputProps } from '@
|
|
3
|
+
import { InputProps } from '@heroui/react';
|
|
4
4
|
|
|
5
5
|
type ValidatorFunction<T, U> = (val: T, ...args: U[]) => boolean;
|
|
6
6
|
interface Validator<T, U = any> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ChangeEvent, FocusEvent } from 'react';
|
|
3
|
-
import { InputProps } from '@
|
|
3
|
+
import { InputProps } from '@heroui/react';
|
|
4
4
|
|
|
5
5
|
type ValidatorFunction<T, U> = (val: T, ...args: U[]) => boolean;
|
|
6
6
|
interface Validator<T, U = any> {
|
package/dist/index.js
CHANGED
|
@@ -17,11 +17,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
|
|
19
19
|
// src/index.ts
|
|
20
|
-
var
|
|
21
|
-
__export(
|
|
20
|
+
var index_exports = {};
|
|
21
|
+
__export(index_exports, {
|
|
22
22
|
useFormChange: () => useFormChange
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(index_exports);
|
|
25
25
|
|
|
26
26
|
// src/hooks/useFormChange.tsx
|
|
27
27
|
var import_react = require("react");
|
|
@@ -204,7 +204,7 @@ function useFormChange(initialObj) {
|
|
|
204
204
|
errorMessage: hasValidations ? inputValidations.validationProps.errorMessage : ""
|
|
205
205
|
};
|
|
206
206
|
},
|
|
207
|
-
[getValidation, onChange, onBlur]
|
|
207
|
+
[getValidation, onChange, onBlur, touched]
|
|
208
208
|
);
|
|
209
209
|
const hasInvalidValues = () => {
|
|
210
210
|
setTouched(allToValue(touched, true));
|
package/dist/index.mjs
CHANGED
|
@@ -186,7 +186,7 @@ function useFormChange(initialObj) {
|
|
|
186
186
|
errorMessage: hasValidations ? inputValidations.validationProps.errorMessage : ""
|
|
187
187
|
};
|
|
188
188
|
},
|
|
189
|
-
[getValidation, onChange, onBlur]
|
|
189
|
+
[getValidation, onChange, onBlur, touched]
|
|
190
190
|
);
|
|
191
191
|
const hasInvalidValues = () => {
|
|
192
192
|
setTouched(allToValue(touched, true));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juantroconisf/lib",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -17,13 +17,13 @@
|
|
|
17
17
|
"typings": "dist/index.d.ts",
|
|
18
18
|
"homepage": "https://github.com/juandiegotroconis/lib#readme",
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@
|
|
21
|
-
"@types/node": "^22.
|
|
22
|
-
"@types/react": "^
|
|
23
|
-
"tsup": "^8.
|
|
24
|
-
"typescript": "^5.
|
|
20
|
+
"@heroui/react": "^2.7.5",
|
|
21
|
+
"@types/node": "^22.13.10",
|
|
22
|
+
"@types/react": "^19.0.12",
|
|
23
|
+
"tsup": "^8.4.0",
|
|
24
|
+
"typescript": "^5.8.2"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"react": "^
|
|
27
|
+
"react": "^19.0.0"
|
|
28
28
|
}
|
|
29
29
|
}
|