@rolster/react-forms 18.0.0

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { AbstractArray, AbstractArrayControl, AbstractArrayControls, AbstractArrayGroup, AbstractFormControl, AbstractFormGroup, AbstractGroupControls } from '@rolster/helpers-forms';
2
+ import { LegacyRef } from 'react';
3
+ export interface ReactFormControl<E extends HTMLElement = HTMLElement, T = any> extends AbstractFormControl<T> {
4
+ elementRef?: LegacyRef<E>;
5
+ }
6
+ export interface ReactArrayControl<E extends HTMLElement = HTMLElement, T = any> extends AbstractArrayControl<T> {
7
+ elementRef?: LegacyRef<E>;
8
+ }
9
+ export type ReactControl<E extends HTMLElement = HTMLElement, T = any> = ReactFormControl<E, T> | ReactArrayControl<E, T>;
10
+ export type ReactInputControl<T = any> = ReactFormControl<HTMLInputElement, T>;
11
+ export type ReactHtmlControl<T = any> = ReactFormControl<HTMLElement, T>;
12
+ export type ReactArrayInputControl<T = any> = ReactArrayControl<HTMLInputElement, T>;
13
+ export type ReactArrayHtmlControl<T = any> = ReactArrayControl<HTMLElement, T>;
14
+ export type ReactControls = AbstractGroupControls<ReactFormControl<HTMLElement> | AbstractArray<any>>;
15
+ export type ReactGroup<T extends ReactControls> = AbstractFormGroup<T>;
16
+ export type ReactArrayControls<T extends ReactArrayControl = ReactArrayControl> = AbstractArrayControls<T>;
17
+ export type ReactArrayGroup<T extends ReactArrayControls, R = any> = AbstractArrayGroup<T, R>;
18
+ export type ReactFormArray<T extends ReactArrayControls = ReactArrayControls, R = any> = AbstractArray<T, R>;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@rolster/react-forms",
3
+ "version": "18.0.0",
4
+ "description": "It implements a set of classes that allow managing the control of states of the input components in React",
5
+ "module": "dist/esm/index.js",
6
+ "main": "dist/cjs/index.js",
7
+ "unpkg": "dist/es/index.js",
8
+ "types": "dist/esm/index.d.ts",
9
+ "license": "MIT",
10
+ "author": "Rolster Technology <rolster.developments@gmail.com>",
11
+ "contributors": [
12
+ {
13
+ "name": "Daniel Andrés Castillo Pedroza",
14
+ "email": "ing.dacastillop@gmail.com"
15
+ }
16
+ ],
17
+ "files": [
18
+ "dist/"
19
+ ],
20
+ "scripts": {
21
+ "prettier": "prettier . --write",
22
+ "clean": "rimraf ./dist",
23
+ "build": "npm run clean && tsc -p tsconfig.app.json && rollup -c rollup.config.js",
24
+ "test": "jest --coverage",
25
+ "test:watch": "jest --coverage --watch",
26
+ "prepublishOnly": "npm run build"
27
+ },
28
+ "dependencies": {
29
+ "@rolster/helpers-forms": "^1.9.0",
30
+ "@rolster/validators": "^1.0.1",
31
+ "react": "^18.2.0",
32
+ "uuid": "^9.0.1"
33
+ },
34
+ "devDependencies": {
35
+ "@rollup/plugin-commonjs": "^25.0.4",
36
+ "@rollup/plugin-node-resolve": "^15.2.1",
37
+ "@rollup/plugin-typescript": "^11.1.3",
38
+ "@rolster/types": "^1.0.4",
39
+ "@types/jest": "^29.5.1",
40
+ "@types/react": "^18.2.42",
41
+ "@types/uuid": "^9.0.7",
42
+ "jest": "^29.5.0",
43
+ "prettier": "^3.0.3",
44
+ "rimraf": "^3.0.2",
45
+ "rollup": "^2.32.0",
46
+ "ts-jest": "^29.1.0",
47
+ "tslib": "^2.4.0",
48
+ "typescript": "^4.9.3"
49
+ },
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "https://github.com/rolster-developments/typescript-react-forms.git"
53
+ },
54
+ "keywords": [
55
+ "rolster",
56
+ "typescript",
57
+ "react",
58
+ "forms"
59
+ ]
60
+ }
package/readme.md ADDED
@@ -0,0 +1,23 @@
1
+ # Rolster React Forms
2
+
3
+ It implements a set of classes that allow managing the control of states of the input components in React.
4
+
5
+ ## Installation
6
+
7
+ ```
8
+ npm i @rolster/react-forms
9
+ ```
10
+
11
+ ## Configuration
12
+
13
+ You must install the `@rolster/types` to define package data types, which are configured by adding them to the `files` property of the `tsconfig.json` file.
14
+
15
+ ```json
16
+ {
17
+ "files": ["node_modules/@rolster/types/index.d.ts"]
18
+ }
19
+ ```
20
+
21
+ ## Contributing
22
+
23
+ - Daniel Andrés Castillo Pedroza :rocket: