@twintag/twintag-form 1.4.0 → 1.5.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.
- package/.turbo/turbo-build.log +16 -14
- package/CHANGELOG.md +12 -0
- package/dev/main.tsx +7 -1
- package/dist/common/form.d.ts +7 -7
- package/dist/common/input.d.ts +14 -14
- package/dist/common/textarea.d.ts +7 -7
- package/dist/components/config.d.ts +1 -1
- package/dist/components/input.d.ts +4 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/provider.d.ts +4 -6
- package/dist/react.cjs +89 -0
- package/dist/{twintag-form.react.js → react.js} +3535 -3528
- package/dist/types/index.d.ts +1 -1
- package/dist/webcomponent.cjs +1 -0
- package/dist/{twintag-form.webcomponent.js → webcomponent.js} +1 -1
- package/lib/common/form.tsx +1 -1
- package/lib/common/input.tsx +1 -1
- package/lib/common/textarea.tsx +1 -1
- package/lib/components/config.tsx +10 -22
- package/lib/components/containers/accordion.tsx +2 -2
- package/lib/components/containers/category.tsx +1 -1
- package/lib/components/fields/checkbox.tsx +1 -1
- package/lib/components/fields/date-picker.tsx +2 -2
- package/lib/components/fields/file.tsx +1 -1
- package/lib/components/fields/input.tsx +1 -1
- package/lib/components/fields/radiogroup.tsx +1 -1
- package/lib/components/fields/textarea.tsx +1 -1
- package/lib/components/fields/toggle.tsx +1 -1
- package/lib/components/form.tsx +1 -1
- package/lib/components/input.tsx +12 -0
- package/lib/components/label.tsx +8 -0
- package/lib/types/index.ts +1 -1
- package/package.json +3 -6
- package/tsconfig.json +5 -3
- package/vite.config.ts +5 -8
- package/dist/common/scroll-area.d.ts +0 -5
- package/dist/common/select.d.ts +0 -13
- package/lib/common/scroll-area.tsx +0 -46
- package/lib/common/select.tsx +0 -159
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @twintag/twintag-form@1.
|
|
2
|
+
> @twintag/twintag-form@1.5.0 build /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form
|
|
3
3
|
> tsc && vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v5.2.11 [32mbuilding for production...[36m[39m
|
|
6
6
|
transforming...
|
|
7
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 2517 modules transformed.
|
|
8
8
|
rendering chunks...
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
[vite:dts] Start generate declaration files...
|
|
11
11
|
computing gzip size...
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
[2mdist/[22m[
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[
|
|
12
|
+
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/twind.config.d.ts
|
|
13
|
+
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/tailwind.config.d.ts
|
|
14
|
+
[2mdist/[22m[36mwebcomponent.js [39m[1m[2m119.75 kB[22m[1m[22m[2m │ gzip: 33.51 kB[22m
|
|
15
|
+
[2mdist/[22m[36mreact.js [39m[1m[33m706.74 kB[39m[22m[2m │ gzip: 144.39 kB[22m
|
|
16
|
+
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/.eslintrc.d.cts
|
|
17
|
+
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/dev/main.d.ts
|
|
18
|
+
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/vite.config.d.ts
|
|
19
|
+
[vite:dts] Declaration files built in 8688ms.
|
|
20
|
+
|
|
21
|
+
[2mdist/[22m[36mwebcomponent.cjs [39m[1m[2m 69.15 kB[22m[1m[22m[2m │ gzip: 23.76 kB[22m
|
|
22
|
+
[2mdist/[22m[36mreact.cjs [39m[1m[2m496.73 kB[22m[1m[22m[2m │ gzip: 125.04 kB[22m
|
|
23
|
+
[32m✓ built in 14.00s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @twintag/twintag-form
|
|
2
2
|
|
|
3
|
+
## 1.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#113](https://github.com/esoptra/twintag-admin/pull/113) [`51fcc45`](https://github.com/esoptra/twintag-admin/commit/51fcc458599882792e9cc3e245ff6ed4da9a7b07) Thanks [@leweyse](https://github.com/leweyse)! - fix: use clear naming for optional variant
|
|
8
|
+
|
|
9
|
+
## 1.4.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- feat: add Label component
|
|
14
|
+
|
|
3
15
|
## 1.4.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dev/main.tsx
CHANGED
|
@@ -5,6 +5,12 @@ import '../lib/webcomponent';
|
|
|
5
5
|
import './index.css';
|
|
6
6
|
|
|
7
7
|
const config = [
|
|
8
|
+
{
|
|
9
|
+
type: 'label',
|
|
10
|
+
props: {
|
|
11
|
+
label: 'Custom label',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
8
14
|
{
|
|
9
15
|
type: 'category',
|
|
10
16
|
props: {
|
|
@@ -413,7 +419,7 @@ const options = {
|
|
|
413
419
|
checkbox: true,
|
|
414
420
|
textarea: 'This is a textarea',
|
|
415
421
|
},
|
|
416
|
-
variant: '
|
|
422
|
+
variant: 'outline',
|
|
417
423
|
resetOnSubmit: true,
|
|
418
424
|
} as ComponentProps<typeof Form>['options'];
|
|
419
425
|
|
package/dist/common/form.d.ts
CHANGED
|
@@ -21,37 +21,37 @@ declare const useFormField: () => {
|
|
|
21
21
|
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps< TVReturnType<{
|
|
22
22
|
variant: {
|
|
23
23
|
default: string;
|
|
24
|
-
|
|
24
|
+
outline: string;
|
|
25
25
|
};
|
|
26
26
|
}, undefined, "", TVConfig<{
|
|
27
27
|
variant: {
|
|
28
28
|
default: string;
|
|
29
|
-
|
|
29
|
+
outline: string;
|
|
30
30
|
};
|
|
31
31
|
}, {
|
|
32
32
|
variant: {
|
|
33
33
|
default: string;
|
|
34
|
-
|
|
34
|
+
outline: string;
|
|
35
35
|
};
|
|
36
36
|
}>, {
|
|
37
37
|
variant: {
|
|
38
38
|
default: string;
|
|
39
|
-
|
|
39
|
+
outline: string;
|
|
40
40
|
};
|
|
41
41
|
}, undefined, TVReturnType<{
|
|
42
42
|
variant: {
|
|
43
43
|
default: string;
|
|
44
|
-
|
|
44
|
+
outline: string;
|
|
45
45
|
};
|
|
46
46
|
}, undefined, "", TVConfig<{
|
|
47
47
|
variant: {
|
|
48
48
|
default: string;
|
|
49
|
-
|
|
49
|
+
outline: string;
|
|
50
50
|
};
|
|
51
51
|
}, {
|
|
52
52
|
variant: {
|
|
53
53
|
default: string;
|
|
54
|
-
|
|
54
|
+
outline: string;
|
|
55
55
|
};
|
|
56
56
|
}>, unknown, unknown, undefined>>> & React.RefAttributes<HTMLDivElement>>;
|
|
57
57
|
declare const FormLabel: React.ForwardRefExoticComponent<Omit<Omit< LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps< TVReturnType<{
|
package/dist/common/input.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
7
7
|
default: {
|
|
8
8
|
input: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
outline: {
|
|
11
11
|
root: string;
|
|
12
12
|
input: string;
|
|
13
13
|
};
|
|
@@ -28,7 +28,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
28
28
|
default: {
|
|
29
29
|
input: string;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
outline: {
|
|
32
32
|
root: string;
|
|
33
33
|
input: string;
|
|
34
34
|
};
|
|
@@ -46,7 +46,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
46
46
|
default: {
|
|
47
47
|
input: string;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
outline: {
|
|
50
50
|
root: string;
|
|
51
51
|
input: string;
|
|
52
52
|
};
|
|
@@ -64,7 +64,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
64
64
|
default: {
|
|
65
65
|
input: string;
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
outline: {
|
|
68
68
|
root: string;
|
|
69
69
|
input: string;
|
|
70
70
|
};
|
|
@@ -85,7 +85,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
85
85
|
default: {
|
|
86
86
|
input: string;
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
outline: {
|
|
89
89
|
root: string;
|
|
90
90
|
input: string;
|
|
91
91
|
};
|
|
@@ -106,7 +106,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
106
106
|
default: {
|
|
107
107
|
input: string;
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
outline: {
|
|
110
110
|
root: string;
|
|
111
111
|
input: string;
|
|
112
112
|
};
|
|
@@ -124,7 +124,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
124
124
|
default: {
|
|
125
125
|
input: string;
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
outline: {
|
|
128
128
|
root: string;
|
|
129
129
|
input: string;
|
|
130
130
|
};
|
|
@@ -144,7 +144,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
144
144
|
default: {
|
|
145
145
|
input: string;
|
|
146
146
|
};
|
|
147
|
-
|
|
147
|
+
outline: {
|
|
148
148
|
root: string;
|
|
149
149
|
input: string;
|
|
150
150
|
};
|
|
@@ -165,7 +165,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
165
165
|
default: {
|
|
166
166
|
input: string;
|
|
167
167
|
};
|
|
168
|
-
|
|
168
|
+
outline: {
|
|
169
169
|
root: string;
|
|
170
170
|
input: string;
|
|
171
171
|
};
|
|
@@ -183,7 +183,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
183
183
|
default: {
|
|
184
184
|
input: string;
|
|
185
185
|
};
|
|
186
|
-
|
|
186
|
+
outline: {
|
|
187
187
|
root: string;
|
|
188
188
|
input: string;
|
|
189
189
|
};
|
|
@@ -201,7 +201,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
201
201
|
default: {
|
|
202
202
|
input: string;
|
|
203
203
|
};
|
|
204
|
-
|
|
204
|
+
outline: {
|
|
205
205
|
root: string;
|
|
206
206
|
input: string;
|
|
207
207
|
};
|
|
@@ -222,7 +222,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
222
222
|
default: {
|
|
223
223
|
input: string;
|
|
224
224
|
};
|
|
225
|
-
|
|
225
|
+
outline: {
|
|
226
226
|
root: string;
|
|
227
227
|
input: string;
|
|
228
228
|
};
|
|
@@ -243,7 +243,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
243
243
|
default: {
|
|
244
244
|
input: string;
|
|
245
245
|
};
|
|
246
|
-
|
|
246
|
+
outline: {
|
|
247
247
|
root: string;
|
|
248
248
|
input: string;
|
|
249
249
|
};
|
|
@@ -261,7 +261,7 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
261
261
|
default: {
|
|
262
262
|
input: string;
|
|
263
263
|
};
|
|
264
|
-
|
|
264
|
+
outline: {
|
|
265
265
|
root: string;
|
|
266
266
|
input: string;
|
|
267
267
|
};
|
|
@@ -7,7 +7,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
7
7
|
default: {
|
|
8
8
|
textarea: string;
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
outline: {
|
|
11
11
|
root: string;
|
|
12
12
|
textarea: string;
|
|
13
13
|
};
|
|
@@ -28,7 +28,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
28
28
|
default: {
|
|
29
29
|
textarea: string;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
outline: {
|
|
32
32
|
root: string;
|
|
33
33
|
textarea: string;
|
|
34
34
|
};
|
|
@@ -46,7 +46,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
46
46
|
default: {
|
|
47
47
|
textarea: string;
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
outline: {
|
|
50
50
|
root: string;
|
|
51
51
|
textarea: string;
|
|
52
52
|
};
|
|
@@ -64,7 +64,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
64
64
|
default: {
|
|
65
65
|
textarea: string;
|
|
66
66
|
};
|
|
67
|
-
|
|
67
|
+
outline: {
|
|
68
68
|
root: string;
|
|
69
69
|
textarea: string;
|
|
70
70
|
};
|
|
@@ -85,7 +85,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
85
85
|
default: {
|
|
86
86
|
textarea: string;
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
outline: {
|
|
89
89
|
root: string;
|
|
90
90
|
textarea: string;
|
|
91
91
|
};
|
|
@@ -106,7 +106,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
106
106
|
default: {
|
|
107
107
|
textarea: string;
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
outline: {
|
|
110
110
|
root: string;
|
|
111
111
|
textarea: string;
|
|
112
112
|
};
|
|
@@ -124,7 +124,7 @@ declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttrib
|
|
|
124
124
|
default: {
|
|
125
125
|
textarea: string;
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
outline: {
|
|
128
128
|
root: string;
|
|
129
129
|
textarea: string;
|
|
130
130
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType } from 'react';
|
|
2
2
|
import { InputCompConfig } from '../types';
|
|
3
3
|
|
|
4
|
-
export declare const Inputs: Map<string, InputCompConfig>;
|
|
5
4
|
export declare const Containers: Map<string, ElementType>;
|
|
5
|
+
export declare const Inputs: Map<string, InputCompConfig>;
|
|
6
6
|
export declare const components: Map<string, ElementType>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ParsedJsonComponent, RawJsonComponent, TwintagFormContext, InputCompConfig } from '../types';
|
|
2
2
|
import { WithChildren } from 'twintag-types/dom';
|
|
3
|
-
import { Context
|
|
3
|
+
import { Context } from 'react';
|
|
4
4
|
|
|
5
5
|
export declare const twintagFormContext: Context<TwintagFormContext>;
|
|
6
6
|
export declare const useTwintagForm: () => TwintagFormContext;
|
|
@@ -13,9 +13,7 @@ export declare const TwintagFormProvider: ({ variant, size, inputs, components,
|
|
|
13
13
|
config: RawJsonComponent | RawJsonComponent[];
|
|
14
14
|
variant: TwintagFormContext['variant'];
|
|
15
15
|
size: TwintagFormContext['size'];
|
|
16
|
-
inputs:
|
|
17
|
-
components:
|
|
18
|
-
} &
|
|
19
|
-
children?: ReactNode;
|
|
20
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
inputs: Inputs;
|
|
17
|
+
components: Components;
|
|
18
|
+
} & WithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
21
19
|
export {};
|