@twintag/twintag-form 0.4.1 → 0.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 +10 -54
- package/CHANGELOG.md +23 -0
- package/README.md +9 -5
- package/dist/components/Category/__styles.d.ts +19 -0
- package/dist/{lib/components → components}/Category/index.d.ts +2 -3
- package/dist/components/Form/index.d.ts +12 -0
- package/dist/{lib/types/index.d.ts → components/Input/__props.d.ts} +0 -6
- package/dist/components/Input/__styles.d.ts +245 -0
- package/dist/{lib/components → components}/Input/checkbox.d.ts +2 -3
- package/dist/{lib/components → components}/Input/file.d.ts +2 -3
- package/dist/{lib/components → components}/Input/index.d.ts +0 -1
- package/dist/{lib/components → components}/Input/simple.d.ts +2 -3
- package/dist/{lib/components → components}/Input/submit.d.ts +2 -3
- package/dist/{lib/components → components}/Input/textarea.d.ts +2 -3
- package/dist/{lib/components → components}/Input/toggle.d.ts +2 -3
- package/dist/{lib/components → components}/Label/index.d.ts +0 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/index.d.ts +14 -0
- package/dist/react.d.ts +1 -0
- package/dist/styles.d.ts +262 -0
- package/dist/twintag-form.react.js +8658 -0
- package/dist/twintag-form.webcomponent.js +4503 -0
- package/dist/webcomponent.d.ts +1 -0
- package/lib/__stories__/Form.stories.tsx +102 -10
- package/lib/components/Category/__styles.ts +12 -0
- package/lib/components/Category/index.tsx +5 -8
- package/lib/components/Form/index.tsx +33 -34
- package/lib/{types/index.ts → components/Input/__props.ts} +0 -6
- package/lib/components/Input/__styles.ts +132 -0
- package/lib/components/Input/checkbox.tsx +8 -11
- package/lib/components/Input/file.tsx +9 -12
- package/lib/components/Input/simple.tsx +8 -10
- package/lib/components/Input/submit.tsx +3 -9
- package/lib/components/Input/textarea.tsx +8 -10
- package/lib/components/Input/toggle.tsx +10 -11
- package/lib/components/Label/index.tsx +2 -1
- package/lib/components/index.tsx +4 -6
- package/lib/index.tsx +35 -157
- package/lib/styles.ts +2 -1
- package/lib/webcomponent.ts +1 -1
- package/package.json +11 -14
- package/tsconfig.json +3 -2
- package/vite.config.ts +47 -0
- package/dist/index.es.js +0 -27362
- package/dist/index.umd.js +0 -196
- package/dist/lib/__stories__/Form.stories.d.ts +0 -7
- package/dist/lib/__stories__/Form.stories.d.ts.map +0 -1
- package/dist/lib/components/Category/index.d.ts.map +0 -1
- package/dist/lib/components/Form/index.d.ts +0 -10
- package/dist/lib/components/Form/index.d.ts.map +0 -1
- package/dist/lib/components/Form/register.d.ts +0 -12
- package/dist/lib/components/Form/register.d.ts.map +0 -1
- package/dist/lib/components/Input/checkbox.d.ts.map +0 -1
- package/dist/lib/components/Input/file.d.ts.map +0 -1
- package/dist/lib/components/Input/index.d.ts.map +0 -1
- package/dist/lib/components/Input/simple.d.ts.map +0 -1
- package/dist/lib/components/Input/submit.d.ts.map +0 -1
- package/dist/lib/components/Input/textarea.d.ts.map +0 -1
- package/dist/lib/components/Input/toggle.d.ts.map +0 -1
- package/dist/lib/components/Label/index.d.ts.map +0 -1
- package/dist/lib/components/index.d.ts +0 -6
- package/dist/lib/components/index.d.ts.map +0 -1
- package/dist/lib/index.d.ts +0 -20
- package/dist/lib/index.d.ts.map +0 -1
- package/dist/lib/styles.d.ts +0 -131
- package/dist/lib/styles.d.ts.map +0 -1
- package/dist/lib/types/index.d.ts.map +0 -1
- package/dist/lib/webcomponent.d.ts +0 -2
- package/dist/lib/webcomponent.d.ts.map +0 -1
- package/dist/twind.config.d.ts +0 -5
- package/dist/twind.config.d.ts.map +0 -1
- package/dist/webcomponent.es.js +0 -31726
- package/dist/webcomponent.umd.js +0 -196
- package/lib/components/Form/register.tsx +0 -69
- package/scripts/build.js +0 -60
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,60 +1,16 @@
|
|
|
1
1
|
|
|
2
|
-
> @twintag/twintag-form@0.
|
|
3
|
-
> tsc &&
|
|
2
|
+
> @twintag/twintag-form@0.5.0 build /home/runner/work/twintag-templates/twintag-templates/packages/twintag-form
|
|
3
|
+
> tsc && vite build
|
|
4
4
|
|
|
5
5
|
[36mvite v4.3.9 [32mbuilding for production...[36m[39m
|
|
6
|
-
[36mvite v4.3.9 [32mbuilding for production...[36m[39m
|
|
7
|
-
transforming...
|
|
8
6
|
transforming...
|
|
9
|
-
[32m✓[39m
|
|
10
|
-
[1m[33m[plugin:typescript][39m[22m [33m@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.[39m
|
|
11
|
-
[32m✓[39m 663 modules transformed.
|
|
12
|
-
[1m[33m[plugin:typescript][39m[22m [33m@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.[39m
|
|
13
|
-
rendering chunks...
|
|
14
|
-
computing gzip size...
|
|
7
|
+
[32m✓[39m 671 modules transformed.
|
|
15
8
|
rendering chunks...
|
|
9
|
+
[32m
|
|
10
|
+
[36m[vite:dts][32m Start generate declaration files...[39m
|
|
16
11
|
computing gzip size...
|
|
17
|
-
[2mdist/[22m[
|
|
18
|
-
[1m[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[2mdist/[22m[32mlib/components/Label/index.d.ts [39m[1m[2m 0.26 kB[22m[1m[22m
|
|
23
|
-
[2mdist/[22m[32mlib/components/Form/index.d.ts [39m[1m[2m 0.26 kB[22m[1m[22m
|
|
24
|
-
[2mdist/[22m[32mlib/__stories__/Form.stories.d.ts [39m[1m[2m 0.28 kB[22m[1m[22m
|
|
25
|
-
[2mdist/[22m[32mtwind.config.d.ts [39m[1m[2m 0.29 kB[22m[1m[22m
|
|
26
|
-
[2mdist/[22m[32mlib/components/Input/file.d.ts [39m[1m[2m 0.35 kB[22m[1m[22m
|
|
27
|
-
[2mdist/[22m[32mlib/components/Input/simple.d.ts [39m[1m[2m 0.36 kB[22m[1m[22m
|
|
28
|
-
[2mdist/[22m[32mlib/components/Input/submit.d.ts [39m[1m[2m 0.36 kB[22m[1m[22m
|
|
29
|
-
[2mdist/[22m[32mlib/components/Input/toggle.d.ts [39m[1m[2m 0.36 kB[22m[1m[22m
|
|
30
|
-
[2mdist/[22m[32mlib/components/Input/textarea.d.ts [39m[1m[2m 0.37 kB[22m[1m[22m
|
|
31
|
-
[2mdist/[22m[32mlib/components/Input/checkbox.d.ts [39m[1m[2m 0.37 kB[22m[1m[22m
|
|
32
|
-
[2mdist/[22m[32mlib/components/Form/register.d.ts [39m[1m[2m 0.38 kB[22m[1m[22m
|
|
33
|
-
[2mdist/[22m[32mlib/types/index.d.ts [39m[1m[2m 0.40 kB[22m[1m[22m
|
|
34
|
-
[2mdist/[22m[32mlib/index.d.ts [39m[1m[2m 0.42 kB[22m[1m[22m
|
|
35
|
-
[2mdist/[22m[32mlib/components/Category/index.d.ts [39m[1m[2m 0.44 kB[22m[1m[22m
|
|
36
|
-
[2mdist/[22m[32mlib/styles.d.ts [39m[1m[2m 3.81 kB[22m[1m[22m
|
|
37
|
-
[2mdist/[22m[36mwebcomponent.es.js [39m[1m[33m1,010.34 kB[39m[22m[2m │ gzip: 240.17 kB[22m
|
|
38
|
-
[1m[33m[plugin:typescript][39m[22m [33m@rollup/plugin-typescript: Rollup 'sourcemap' option must be set to generate source maps.[39m
|
|
39
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[33m556.84 kB[39m[22m[2m │ gzip: 172.38 kB[22m
|
|
40
|
-
[32m✓ built in 19.78s[39m
|
|
41
|
-
[2mdist/[22m[32mlib/webcomponent.d.ts [39m[1m[2m 0.05 kB[22m[1m[22m
|
|
42
|
-
[2mdist/[22m[32mlib/components/index.d.ts [39m[1m[2m 0.20 kB[22m[1m[22m
|
|
43
|
-
[2mdist/[22m[32mlib/components/Input/index.d.ts [39m[1m[2m 0.20 kB[22m[1m[22m
|
|
44
|
-
[2mdist/[22m[32mlib/components/Label/index.d.ts [39m[1m[2m 0.26 kB[22m[1m[22m
|
|
45
|
-
[2mdist/[22m[32mlib/components/Form/index.d.ts [39m[1m[2m 0.26 kB[22m[1m[22m
|
|
46
|
-
[2mdist/[22m[32mlib/__stories__/Form.stories.d.ts [39m[1m[2m 0.28 kB[22m[1m[22m
|
|
47
|
-
[2mdist/[22m[32mtwind.config.d.ts [39m[1m[2m 0.29 kB[22m[1m[22m
|
|
48
|
-
[2mdist/[22m[32mlib/components/Input/file.d.ts [39m[1m[2m 0.35 kB[22m[1m[22m
|
|
49
|
-
[2mdist/[22m[32mlib/components/Input/simple.d.ts [39m[1m[2m 0.36 kB[22m[1m[22m
|
|
50
|
-
[2mdist/[22m[32mlib/components/Input/submit.d.ts [39m[1m[2m 0.36 kB[22m[1m[22m
|
|
51
|
-
[2mdist/[22m[32mlib/components/Input/toggle.d.ts [39m[1m[2m 0.36 kB[22m[1m[22m
|
|
52
|
-
[2mdist/[22m[32mlib/components/Input/textarea.d.ts [39m[1m[2m 0.37 kB[22m[1m[22m
|
|
53
|
-
[2mdist/[22m[32mlib/components/Input/checkbox.d.ts [39m[1m[2m 0.37 kB[22m[1m[22m
|
|
54
|
-
[2mdist/[22m[32mlib/components/Form/register.d.ts [39m[1m[2m 0.38 kB[22m[1m[22m
|
|
55
|
-
[2mdist/[22m[32mlib/types/index.d.ts [39m[1m[2m 0.40 kB[22m[1m[22m
|
|
56
|
-
[2mdist/[22m[32mlib/index.d.ts [39m[1m[2m 0.42 kB[22m[1m[22m
|
|
57
|
-
[2mdist/[22m[32mlib/components/Category/index.d.ts [39m[1m[2m 0.44 kB[22m[1m[22m
|
|
58
|
-
[2mdist/[22m[32mlib/styles.d.ts [39m[1m[2m 3.81 kB[22m[1m[22m
|
|
59
|
-
[2mdist/[22m[36mwebcomponent.umd.js [39m[1m[33m623.01 kB[39m[22m[2m │ gzip: 194.69 kB[22m
|
|
60
|
-
[32m✓ built in 19.99s[39m
|
|
12
|
+
[2mdist/[22m[36mtwintag-form.webcomponent.js [39m[1m[2m117.30 kB[22m[1m[22m[2m │ gzip: 33.19 kB[22m
|
|
13
|
+
[2mdist/[22m[36mtwintag-form.react.js [39m[1m[2m249.06 kB[22m[1m[22m[2m │ gzip: 56.76 kB[22m
|
|
14
|
+
[32m[36m[vite:dts][32m Declaration files built in 7200ms.
|
|
15
|
+
[39m
|
|
16
|
+
[32m✓ built in 10.74s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @twintag/twintag-form
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- b7c2725: Update
|
|
8
|
+
|
|
9
|
+
- feat: editor.
|
|
10
|
+
- fix: refinements to integrate components to editor.
|
|
11
|
+
- fix: update `twintag-json-renderer` to accept editor output format.
|
|
12
|
+
- feat: ar-demo.
|
|
13
|
+
- fix: (twintag-form) use `twintag-json-renderer`.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [b7c2725]
|
|
18
|
+
- @twintag/twintag-json-renderer@0.1.0
|
|
19
|
+
|
|
20
|
+
## 0.4.2
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 6871c37: Update documentation
|
|
25
|
+
|
|
3
26
|
## 0.4.1
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -210,8 +210,12 @@ The `submit` input is a submit input.
|
|
|
210
210
|
|
|
211
211
|
The form component exposes the following CSS variables:
|
|
212
212
|
|
|
213
|
-
| Variable
|
|
214
|
-
|
|
|
215
|
-
| `--clr-
|
|
216
|
-
| `--clr-
|
|
217
|
-
| `--
|
|
213
|
+
| Variable | Description |
|
|
214
|
+
| ---------------------- | ----------------------------- |
|
|
215
|
+
| `--clr-primary` | Primary color of the form. |
|
|
216
|
+
| `--clr-accent` | Accent color of the form. |
|
|
217
|
+
| `--clr-label` | Color of the labels. |
|
|
218
|
+
| `--clr-input` | Color of the inputs. |
|
|
219
|
+
| `--clr-placeholder` | Color of the placeholders. |
|
|
220
|
+
| `--clr-category-label` | Color of the category labels. |
|
|
221
|
+
| `--ff-text` | Font family of the text. |
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
2
|
+
import { TVReturnType } from 'tailwind-variants';
|
|
3
|
+
export declare const categoryStyle: TVReturnType<{
|
|
4
|
+
variant: {};
|
|
5
|
+
}, {
|
|
6
|
+
container: string;
|
|
7
|
+
span: string;
|
|
8
|
+
items: string;
|
|
9
|
+
}, undefined, TVConfig<{
|
|
10
|
+
variant: {};
|
|
11
|
+
}, {
|
|
12
|
+
variant: {};
|
|
13
|
+
}>, {
|
|
14
|
+
variant: {};
|
|
15
|
+
}, {
|
|
16
|
+
container: string;
|
|
17
|
+
span: string;
|
|
18
|
+
items: string;
|
|
19
|
+
}>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
3
|
import type { WithChildren } from 'twintag-types/dom';
|
|
4
|
-
import type { CommonProps } from '
|
|
5
|
-
import { categoryStyle } from '
|
|
4
|
+
import type { CommonProps } from '../Input/__props';
|
|
5
|
+
import { categoryStyle } from './__styles';
|
|
6
6
|
type Props = CommonProps<VariantProps<typeof categoryStyle>['variant']> & WithChildren;
|
|
7
7
|
declare const Category: FC<Props>;
|
|
8
8
|
export default Category;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
declare const Form: ForwardRefExoticComponent<{
|
|
4
|
+
options?: {
|
|
5
|
+
resetOnSubmit?: boolean | undefined;
|
|
6
|
+
} | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
} & RefAttributes<{
|
|
10
|
+
validate: () => void;
|
|
11
|
+
}>>;
|
|
12
|
+
export default Form;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import type { UseFormRegister, Control } from 'react-hook-form';
|
|
2
1
|
export type CommonProps<TVariant> = {
|
|
3
2
|
label: string;
|
|
4
3
|
bind: string;
|
|
5
|
-
useForm?: {
|
|
6
|
-
register: UseFormRegister<any>;
|
|
7
|
-
control: Control;
|
|
8
|
-
};
|
|
9
4
|
checked?: boolean;
|
|
10
5
|
options?: {
|
|
11
6
|
variant?: TVariant;
|
|
@@ -13,4 +8,3 @@ export type CommonProps<TVariant> = {
|
|
|
13
8
|
optionalField?: boolean;
|
|
14
9
|
};
|
|
15
10
|
};
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
2
|
+
import { TVReturnType, TVVariantsDefault, ClassValue, SlotsClassValue } from 'tailwind-variants';
|
|
3
|
+
export declare const labelStyle: TVReturnType<TVVariantsDefault<undefined, "text-label"> | {
|
|
4
|
+
[x: string]: {
|
|
5
|
+
[x: string]: ClassValue | SlotsClassValue<undefined, "text-label">;
|
|
6
|
+
} | undefined;
|
|
7
|
+
} | {}, undefined, "text-label", TVConfig<unknown, TVVariantsDefault<undefined, "text-label"> | {}>, TVVariantsDefault<undefined, "text-label"> | {}, undefined>;
|
|
8
|
+
export declare const containerStyle: TVReturnType<TVVariantsDefault<undefined, ""> | {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
[x: string]: ClassValue | SlotsClassValue<undefined, "">;
|
|
11
|
+
} | undefined;
|
|
12
|
+
} | {}, undefined, "", TVConfig<unknown, TVVariantsDefault<undefined, ""> | {}>, TVVariantsDefault<undefined, ""> | {}, undefined>;
|
|
13
|
+
export declare const checkboxStyle: TVReturnType<{
|
|
14
|
+
variant: {
|
|
15
|
+
alpha: {
|
|
16
|
+
checkbox: string;
|
|
17
|
+
};
|
|
18
|
+
beta: {
|
|
19
|
+
checkbox: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, {
|
|
23
|
+
container: string;
|
|
24
|
+
checkbox: string;
|
|
25
|
+
}, undefined, TVConfig<{
|
|
26
|
+
variant: {
|
|
27
|
+
alpha: {
|
|
28
|
+
checkbox: string;
|
|
29
|
+
};
|
|
30
|
+
beta: {
|
|
31
|
+
checkbox: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}, {
|
|
35
|
+
variant: {
|
|
36
|
+
alpha: {
|
|
37
|
+
checkbox: string;
|
|
38
|
+
};
|
|
39
|
+
beta: {
|
|
40
|
+
checkbox: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}>, {
|
|
44
|
+
variant: {
|
|
45
|
+
alpha: {
|
|
46
|
+
checkbox: string;
|
|
47
|
+
};
|
|
48
|
+
beta: {
|
|
49
|
+
checkbox: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
}, {
|
|
53
|
+
container: string;
|
|
54
|
+
checkbox: string;
|
|
55
|
+
}>;
|
|
56
|
+
export declare const fileStyle: TVReturnType<{
|
|
57
|
+
variant: {
|
|
58
|
+
alpha: {
|
|
59
|
+
container: string;
|
|
60
|
+
input: string;
|
|
61
|
+
};
|
|
62
|
+
beta: {
|
|
63
|
+
container: string;
|
|
64
|
+
input: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
container: string;
|
|
69
|
+
span: string;
|
|
70
|
+
input: string;
|
|
71
|
+
}, undefined, TVConfig<{
|
|
72
|
+
variant: {
|
|
73
|
+
alpha: {
|
|
74
|
+
container: string;
|
|
75
|
+
input: string;
|
|
76
|
+
};
|
|
77
|
+
beta: {
|
|
78
|
+
container: string;
|
|
79
|
+
input: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}, {
|
|
83
|
+
variant: {
|
|
84
|
+
alpha: {
|
|
85
|
+
container: string;
|
|
86
|
+
input: string;
|
|
87
|
+
};
|
|
88
|
+
beta: {
|
|
89
|
+
container: string;
|
|
90
|
+
input: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
}>, {
|
|
94
|
+
variant: {
|
|
95
|
+
alpha: {
|
|
96
|
+
container: string;
|
|
97
|
+
input: string;
|
|
98
|
+
};
|
|
99
|
+
beta: {
|
|
100
|
+
container: string;
|
|
101
|
+
input: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
}, {
|
|
105
|
+
container: string;
|
|
106
|
+
span: string;
|
|
107
|
+
input: string;
|
|
108
|
+
}>;
|
|
109
|
+
export declare const simpleStyle: TVReturnType<{
|
|
110
|
+
variant: {
|
|
111
|
+
alpha: {
|
|
112
|
+
container: string;
|
|
113
|
+
input: string;
|
|
114
|
+
};
|
|
115
|
+
beta: {
|
|
116
|
+
container: string;
|
|
117
|
+
input: string;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
}, {
|
|
121
|
+
container: string;
|
|
122
|
+
span: string;
|
|
123
|
+
input: string;
|
|
124
|
+
}, undefined, TVConfig<{
|
|
125
|
+
variant: {
|
|
126
|
+
alpha: {
|
|
127
|
+
container: string;
|
|
128
|
+
input: string;
|
|
129
|
+
};
|
|
130
|
+
beta: {
|
|
131
|
+
container: string;
|
|
132
|
+
input: string;
|
|
133
|
+
};
|
|
134
|
+
};
|
|
135
|
+
}, {
|
|
136
|
+
variant: {
|
|
137
|
+
alpha: {
|
|
138
|
+
container: string;
|
|
139
|
+
input: string;
|
|
140
|
+
};
|
|
141
|
+
beta: {
|
|
142
|
+
container: string;
|
|
143
|
+
input: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
}>, {
|
|
147
|
+
variant: {
|
|
148
|
+
alpha: {
|
|
149
|
+
container: string;
|
|
150
|
+
input: string;
|
|
151
|
+
};
|
|
152
|
+
beta: {
|
|
153
|
+
container: string;
|
|
154
|
+
input: string;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
}, {
|
|
158
|
+
container: string;
|
|
159
|
+
span: string;
|
|
160
|
+
input: string;
|
|
161
|
+
}>;
|
|
162
|
+
export declare const toggleStyle: TVReturnType<{
|
|
163
|
+
variant: {
|
|
164
|
+
alpha: {
|
|
165
|
+
container: string;
|
|
166
|
+
input: string;
|
|
167
|
+
thumb: string;
|
|
168
|
+
};
|
|
169
|
+
beta: {
|
|
170
|
+
container: string;
|
|
171
|
+
input: string;
|
|
172
|
+
thumb: string;
|
|
173
|
+
};
|
|
174
|
+
};
|
|
175
|
+
}, {
|
|
176
|
+
container: string;
|
|
177
|
+
span: string;
|
|
178
|
+
input: string;
|
|
179
|
+
thumb: string;
|
|
180
|
+
}, undefined, TVConfig<{
|
|
181
|
+
variant: {
|
|
182
|
+
alpha: {
|
|
183
|
+
container: string;
|
|
184
|
+
input: string;
|
|
185
|
+
thumb: string;
|
|
186
|
+
};
|
|
187
|
+
beta: {
|
|
188
|
+
container: string;
|
|
189
|
+
input: string;
|
|
190
|
+
thumb: string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
}, {
|
|
194
|
+
variant: {
|
|
195
|
+
alpha: {
|
|
196
|
+
container: string;
|
|
197
|
+
input: string;
|
|
198
|
+
thumb: string;
|
|
199
|
+
};
|
|
200
|
+
beta: {
|
|
201
|
+
container: string;
|
|
202
|
+
input: string;
|
|
203
|
+
thumb: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
}>, {
|
|
207
|
+
variant: {
|
|
208
|
+
alpha: {
|
|
209
|
+
container: string;
|
|
210
|
+
input: string;
|
|
211
|
+
thumb: string;
|
|
212
|
+
};
|
|
213
|
+
beta: {
|
|
214
|
+
container: string;
|
|
215
|
+
input: string;
|
|
216
|
+
thumb: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
}, {
|
|
220
|
+
container: string;
|
|
221
|
+
span: string;
|
|
222
|
+
input: string;
|
|
223
|
+
thumb: string;
|
|
224
|
+
}>;
|
|
225
|
+
export declare const submitStyle: TVReturnType<{
|
|
226
|
+
variant: {
|
|
227
|
+
alpha: "bg-primary text-white px-4 py-2 rounded-md";
|
|
228
|
+
beta: "bg-primary text-white px-4 py-2";
|
|
229
|
+
};
|
|
230
|
+
}, undefined, "w-max max-w-full mt-2", TVConfig<{
|
|
231
|
+
variant: {
|
|
232
|
+
alpha: "bg-primary text-white px-4 py-2 rounded-md";
|
|
233
|
+
beta: "bg-primary text-white px-4 py-2";
|
|
234
|
+
};
|
|
235
|
+
}, {
|
|
236
|
+
variant: {
|
|
237
|
+
alpha: "bg-primary text-white px-4 py-2 rounded-md";
|
|
238
|
+
beta: "bg-primary text-white px-4 py-2";
|
|
239
|
+
};
|
|
240
|
+
}>, {
|
|
241
|
+
variant: {
|
|
242
|
+
alpha: "bg-primary text-white px-4 py-2 rounded-md";
|
|
243
|
+
beta: "bg-primary text-white px-4 py-2";
|
|
244
|
+
};
|
|
245
|
+
}, undefined>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import type
|
|
4
|
-
import { checkboxStyle } from '
|
|
3
|
+
import { type CommonProps } from './__props';
|
|
4
|
+
import { checkboxStyle } from './__styles';
|
|
5
5
|
type Props = CommonProps<VariantProps<typeof checkboxStyle>['variant']>;
|
|
6
6
|
declare const Checkbox: FC<Props>;
|
|
7
7
|
export default Checkbox;
|
|
8
|
-
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import type
|
|
4
|
-
import { fileStyle } from '
|
|
3
|
+
import { type CommonProps } from './__props';
|
|
4
|
+
import { fileStyle } from './__styles';
|
|
5
5
|
type Props = CommonProps<VariantProps<typeof fileStyle>['variant']>;
|
|
6
6
|
declare const File: FC<Props>;
|
|
7
7
|
export default File;
|
|
8
|
-
//# sourceMappingURL=file.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import type
|
|
4
|
-
import { simpleStyle } from '
|
|
3
|
+
import { type CommonProps } from './__props';
|
|
4
|
+
import { simpleStyle } from './__styles';
|
|
5
5
|
type Props = CommonProps<VariantProps<typeof simpleStyle>['variant']>;
|
|
6
6
|
declare const Simple: FC<Props>;
|
|
7
7
|
export default Simple;
|
|
8
|
-
//# sourceMappingURL=simple.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import type
|
|
4
|
-
import { submitStyle } from '
|
|
3
|
+
import { type CommonProps } from './__props';
|
|
4
|
+
import { submitStyle } from './__styles';
|
|
5
5
|
type Props = CommonProps<VariantProps<typeof submitStyle>['variant']>;
|
|
6
6
|
declare const Submit: FC<Props>;
|
|
7
7
|
export default Submit;
|
|
8
|
-
//# sourceMappingURL=submit.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import type
|
|
4
|
-
import { simpleStyle } from '
|
|
3
|
+
import { type CommonProps } from './__props';
|
|
4
|
+
import { simpleStyle } from './__styles';
|
|
5
5
|
type Props = CommonProps<VariantProps<typeof simpleStyle>['variant']>;
|
|
6
6
|
declare const Textarea: FC<Props>;
|
|
7
7
|
export default Textarea;
|
|
8
|
-
//# sourceMappingURL=textarea.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
2
|
import type { VariantProps } from 'tailwind-variants';
|
|
3
|
-
import type
|
|
4
|
-
import { toggleStyle } from '
|
|
3
|
+
import { type CommonProps } from './__props';
|
|
4
|
+
import { toggleStyle } from './__styles';
|
|
5
5
|
type Props = CommonProps<VariantProps<typeof toggleStyle>['variant']>;
|
|
6
6
|
declare const Toggle: FC<Props>;
|
|
7
7
|
export default Toggle;
|
|
8
|
-
//# sourceMappingURL=toggle.d.ts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
import type { RawJsonComponent } from '@twintag/twintag-json-renderer/types';
|
|
4
|
+
type Props = {
|
|
5
|
+
config: RawJsonComponent[];
|
|
6
|
+
options?: {
|
|
7
|
+
variant?: string;
|
|
8
|
+
resetOnSubmit?: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const TwintagForm: ForwardRefExoticComponent<Props & RefAttributes<{
|
|
12
|
+
validate: () => void;
|
|
13
|
+
}>>;
|
|
14
|
+
export {};
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index'
|