@twintag/twintag-form 1.4.0-beta.0 → 1.4.0-beta.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/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +6 -0
- package/README.md +121 -62
- package/dev/main.tsx +233 -209
- package/dist/common/button.d.ts +3 -2
- package/dist/common/calendar.d.ts +4 -4
- package/dist/common/form.d.ts +11 -11
- package/dist/common/icon.d.ts +2 -1
- package/dist/common/input.d.ts +3 -2
- package/dist/common/label.d.ts +3 -2
- package/dist/common/slider.d.ts +4 -0
- package/dist/common/textarea.d.ts +3 -2
- package/dist/components/config.d.ts +4 -2
- package/dist/components/containers/accordion.d.ts +3 -2
- package/dist/components/containers/category.d.ts +3 -2
- package/dist/components/fields/checkbox.d.ts +4 -2
- package/dist/components/fields/date-picker.d.ts +3 -1
- package/dist/components/fields/file.d.ts +4 -2
- package/dist/components/fields/input.d.ts +4 -2
- package/dist/components/fields/radiogroup.d.ts +4 -2
- package/dist/components/fields/submit.d.ts +3 -2
- package/dist/components/fields/textarea.d.ts +4 -2
- package/dist/components/fields/toggle.d.ts +4 -2
- package/dist/components/fields/tri-toggle.d.ts +5 -0
- package/dist/components/form.d.ts +2 -2
- package/dist/components/provider.d.ts +21 -0
- package/dist/components/renderer.d.ts +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/twintag-form.react.js +12828 -12261
- package/dist/types/index.d.ts +25 -17
- package/dist/utils/data.d.ts +2 -1
- package/dist/utils/style.d.ts +2 -1
- package/index.html +5 -3
- package/lib/common/slider.tsx +38 -0
- package/lib/components/config.tsx +46 -17
- package/lib/components/containers/accordion.tsx +1 -1
- package/lib/components/containers/category.tsx +1 -1
- package/lib/components/fields/checkbox.tsx +4 -2
- package/lib/components/fields/date-picker.tsx +4 -1
- package/lib/components/fields/file.tsx +83 -82
- package/lib/components/fields/input.tsx +4 -2
- package/lib/components/fields/radiogroup.tsx +4 -2
- package/lib/components/fields/submit.tsx +1 -1
- package/lib/components/fields/textarea.tsx +4 -2
- package/lib/components/fields/toggle.tsx +4 -2
- package/lib/components/fields/tri-toggle.tsx +141 -0
- package/lib/components/form.tsx +5 -7
- package/lib/components/provider.tsx +159 -0
- package/lib/components/{Render/index.tsx → renderer.tsx} +19 -2
- package/lib/index.tsx +41 -41
- package/lib/types/index.ts +49 -40
- package/package.json +7 -9
- package/dist/components/Render/index.d.ts +0 -7
- package/dist/components/Render/useJson.d.ts +0 -2
- package/dist/components/index.d.ts +0 -7
- package/dist/provider.d.ts +0 -8
- package/lib/components/Render/useJson.ts +0 -76
- package/lib/components/index.tsx +0 -24
- package/lib/provider.tsx +0 -39
package/dev/main.tsx
CHANGED
|
@@ -1,209 +1,233 @@
|
|
|
1
|
-
import type { ComponentProps } from 'react';
|
|
2
|
-
import type { Form } from '../lib';
|
|
3
|
-
|
|
4
|
-
import '../lib/webcomponent';
|
|
5
|
-
import './index.css';
|
|
6
|
-
|
|
7
|
-
const config = [
|
|
8
|
-
{
|
|
9
|
-
type: 'category',
|
|
10
|
-
props: {
|
|
11
|
-
label: 'Category 1st',
|
|
12
|
-
},
|
|
13
|
-
children: [
|
|
14
|
-
{
|
|
15
|
-
type: 'input',
|
|
16
|
-
props: {
|
|
17
|
-
subtype: '
|
|
18
|
-
label: '
|
|
19
|
-
bind: '
|
|
20
|
-
options: {
|
|
21
|
-
description: 'this field is required',
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
type: '
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import type { Form } from '../lib';
|
|
3
|
+
|
|
4
|
+
import '../lib/webcomponent';
|
|
5
|
+
import './index.css';
|
|
6
|
+
|
|
7
|
+
const config = [
|
|
8
|
+
{
|
|
9
|
+
type: 'category',
|
|
10
|
+
props: {
|
|
11
|
+
label: 'Category 1st',
|
|
12
|
+
},
|
|
13
|
+
children: [
|
|
14
|
+
{
|
|
15
|
+
type: 'input',
|
|
16
|
+
props: {
|
|
17
|
+
subtype: 'toggle',
|
|
18
|
+
label: 'Switch',
|
|
19
|
+
bind: 'switch',
|
|
20
|
+
options: {
|
|
21
|
+
description: 'this field is required',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'input',
|
|
27
|
+
props: {
|
|
28
|
+
subtype: 'tri-toggle',
|
|
29
|
+
label: 'Tri-toggle',
|
|
30
|
+
bind: 'tri-toggle-bind',
|
|
31
|
+
options: {
|
|
32
|
+
description: 'this field is never required',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: 'input',
|
|
38
|
+
props: {
|
|
39
|
+
subtype: 'datepicker',
|
|
40
|
+
label: 'Date picker',
|
|
41
|
+
bind: 'datepicker',
|
|
42
|
+
options: {
|
|
43
|
+
description: 'this field is required',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: 'accordion',
|
|
49
|
+
children: [
|
|
50
|
+
{
|
|
51
|
+
type: 'accordion',
|
|
52
|
+
props: {
|
|
53
|
+
subtype: 'item',
|
|
54
|
+
label: 'Required',
|
|
55
|
+
icon: 'archive-box-x-mark',
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
{
|
|
59
|
+
type: 'input',
|
|
60
|
+
props: {
|
|
61
|
+
subtype: 'toggle',
|
|
62
|
+
label: 'Required',
|
|
63
|
+
bind: 'required',
|
|
64
|
+
options: {
|
|
65
|
+
description: 'this field is required',
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: 'category',
|
|
77
|
+
props: {
|
|
78
|
+
label: 'Category 2nd',
|
|
79
|
+
},
|
|
80
|
+
children: [
|
|
81
|
+
{
|
|
82
|
+
type: 'input',
|
|
83
|
+
props: {
|
|
84
|
+
subtype: 'simple',
|
|
85
|
+
label: 'Email',
|
|
86
|
+
bind: 'email',
|
|
87
|
+
options: {
|
|
88
|
+
error: 'This field is required',
|
|
89
|
+
description: 'This field is required',
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
type: 'input',
|
|
95
|
+
props: {
|
|
96
|
+
subtype: 'radiogroup',
|
|
97
|
+
label: 'Radio Group',
|
|
98
|
+
bind: 'radiogroup',
|
|
99
|
+
options: {
|
|
100
|
+
description: 'This field is required',
|
|
101
|
+
error: 'This field is required',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
{
|
|
106
|
+
type: 'item',
|
|
107
|
+
props: {
|
|
108
|
+
label: 'Checkbox',
|
|
109
|
+
bind: 'checkbox',
|
|
110
|
+
options: {
|
|
111
|
+
description: 'This field is required',
|
|
112
|
+
error: 'This field is required',
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'item',
|
|
118
|
+
props: {
|
|
119
|
+
label: 'Mote',
|
|
120
|
+
bind: 'mote',
|
|
121
|
+
options: {
|
|
122
|
+
description: 'This field is required',
|
|
123
|
+
error: 'This field is required',
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: 'category',
|
|
133
|
+
props: {
|
|
134
|
+
label: 'Category 3rd',
|
|
135
|
+
},
|
|
136
|
+
children: [
|
|
137
|
+
{
|
|
138
|
+
type: 'input',
|
|
139
|
+
props: {
|
|
140
|
+
subtype: 'file',
|
|
141
|
+
label: 'File',
|
|
142
|
+
bind: 'file',
|
|
143
|
+
options: {
|
|
144
|
+
error: 'This field is required',
|
|
145
|
+
description: 'This field is required',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'category',
|
|
153
|
+
props: {
|
|
154
|
+
label: 'Category 4th',
|
|
155
|
+
},
|
|
156
|
+
children: [
|
|
157
|
+
{
|
|
158
|
+
type: 'input',
|
|
159
|
+
props: {
|
|
160
|
+
subtype: 'textarea',
|
|
161
|
+
label: 'Textarea',
|
|
162
|
+
bind: 'textarea',
|
|
163
|
+
options: {
|
|
164
|
+
description: 'This field is required',
|
|
165
|
+
error: 'This field is required',
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: 'input',
|
|
171
|
+
props: {
|
|
172
|
+
subtype: 'checkbox',
|
|
173
|
+
label: 'Checkbox',
|
|
174
|
+
bind: 'checkbox',
|
|
175
|
+
options: {
|
|
176
|
+
description: 'This field is required',
|
|
177
|
+
error: 'This field is required',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
type: 'input',
|
|
185
|
+
props: {
|
|
186
|
+
subtype: 'submit',
|
|
187
|
+
label: 'Submit',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
] satisfies React.ComponentProps<typeof Form>['config'];
|
|
191
|
+
|
|
192
|
+
const options = {
|
|
193
|
+
defaultValues: {
|
|
194
|
+
'tri-toggle-bind': null,
|
|
195
|
+
required: true,
|
|
196
|
+
email: 'This should work',
|
|
197
|
+
radiogroup: 'mote',
|
|
198
|
+
checkbox: true,
|
|
199
|
+
textarea: 'This is a textarea',
|
|
200
|
+
},
|
|
201
|
+
variant: 'beta',
|
|
202
|
+
resetOnSubmit: true,
|
|
203
|
+
} as ComponentProps<typeof Form>['options'];
|
|
204
|
+
|
|
205
|
+
// the key properties for the defaultValues object are the same as the bind properties
|
|
206
|
+
const form = document.querySelector('twintag-form');
|
|
207
|
+
|
|
208
|
+
form?.setAttribute('config', JSON.stringify(config));
|
|
209
|
+
form?.setAttribute('options', JSON.stringify(options));
|
|
210
|
+
|
|
211
|
+
form?.addEventListener('twintag-form-values', (event) => {
|
|
212
|
+
console.log('form values', (event as CustomEvent).detail);
|
|
213
|
+
});
|
|
214
|
+
form?.addEventListener('twintag-form-valid', (e) => {
|
|
215
|
+
console.log('form valid', (e as CustomEvent).detail);
|
|
216
|
+
});
|
|
217
|
+
form?.addEventListener('twintag-form-invalid', (e) => {
|
|
218
|
+
console.log('form invalid', (e as CustomEvent).detail);
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
const getValues = document.getElementById('get-values');
|
|
222
|
+
getValues?.addEventListener('click', () => {
|
|
223
|
+
form?.shadowRoot
|
|
224
|
+
?.querySelector('form')
|
|
225
|
+
?.dispatchEvent(new CustomEvent('twintag-form-get_values'));
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
const submit = document.getElementById('submit');
|
|
229
|
+
submit?.addEventListener('click', () => {
|
|
230
|
+
form?.shadowRoot
|
|
231
|
+
?.querySelector('form')
|
|
232
|
+
?.dispatchEvent(new CustomEvent('twintag-form-validate'));
|
|
233
|
+
});
|
package/dist/common/button.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
1
2
|
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
declare const buttonVariants: TVReturnType<{
|
|
5
6
|
variant: {
|
|
@@ -75,7 +76,7 @@ declare const buttonVariants: TVReturnType<{
|
|
|
75
76
|
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
|
|
76
77
|
asChild?: boolean;
|
|
77
78
|
};
|
|
78
|
-
declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<TVReturnType<{
|
|
79
|
+
declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps< TVReturnType<{
|
|
79
80
|
variant: {
|
|
80
81
|
default: string;
|
|
81
82
|
outline: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
2
|
+
import { DayPicker } from 'react-day-picker';
|
|
2
3
|
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
3
|
-
|
|
4
|
+
|
|
4
5
|
import * as React from 'react';
|
|
5
|
-
import { DayPicker } from 'react-day-picker';
|
|
6
6
|
declare const calendarVariants: TVReturnType<{
|
|
7
7
|
variant: {
|
|
8
8
|
dropdown: {
|
|
@@ -210,7 +210,7 @@ declare const calendarVariants: TVReturnType<{
|
|
|
210
210
|
};
|
|
211
211
|
}>, unknown, unknown, undefined>>;
|
|
212
212
|
export type CalendarProps = React.ComponentProps<typeof DayPicker> & VariantProps<typeof calendarVariants>;
|
|
213
|
-
declare function Calendar({ size, className, classNames, showOutsideDays, ...props }: CalendarProps): JSX.Element;
|
|
213
|
+
declare function Calendar({ size, className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
214
214
|
declare namespace Calendar {
|
|
215
215
|
var displayName: string;
|
|
216
216
|
}
|
package/dist/common/form.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ControllerProps, FieldPath, FieldValues, FormProviderProps, FieldError } from 'react-hook-form';
|
|
2
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
3
3
|
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
4
|
+
import { LabelProps } from '@radix-ui/react-label';
|
|
5
|
+
import { SlotProps } from '@radix-ui/react-slot';
|
|
6
|
+
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues extends FieldValues = TFieldValues>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
9
|
-
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => JSX.Element;
|
|
9
|
+
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
declare const useFormField: () => {
|
|
11
11
|
invalid: boolean;
|
|
12
12
|
isDirty: boolean;
|
|
@@ -18,7 +18,7 @@ declare const useFormField: () => {
|
|
|
18
18
|
formDescriptionId: string;
|
|
19
19
|
formMessageId: string;
|
|
20
20
|
};
|
|
21
|
-
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<TVReturnType<{
|
|
21
|
+
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps< TVReturnType<{
|
|
22
22
|
variant: {
|
|
23
23
|
default: string;
|
|
24
24
|
beta: string;
|
|
@@ -54,7 +54,7 @@ declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTM
|
|
|
54
54
|
beta: string;
|
|
55
55
|
};
|
|
56
56
|
}>, unknown, unknown, undefined>>> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
-
declare const FormLabel: React.ForwardRefExoticComponent<Omit<Omit<LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<TVReturnType<{
|
|
57
|
+
declare const FormLabel: React.ForwardRefExoticComponent<Omit<Omit< LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps< TVReturnType<{
|
|
58
58
|
size: {
|
|
59
59
|
sm: string;
|
|
60
60
|
base: string;
|
|
@@ -90,8 +90,8 @@ declare const FormLabel: React.ForwardRefExoticComponent<Omit<Omit<LabelProps &
|
|
|
90
90
|
base: string;
|
|
91
91
|
};
|
|
92
92
|
}>, unknown, unknown, undefined>>> & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
93
|
-
declare const FormControl: React.ForwardRefExoticComponent<Omit<SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
94
|
-
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & VariantProps<TVReturnType<{
|
|
93
|
+
declare const FormControl: React.ForwardRefExoticComponent<Omit< SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
94
|
+
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & VariantProps< TVReturnType<{
|
|
95
95
|
size: {
|
|
96
96
|
sm: string;
|
|
97
97
|
base: string;
|
|
@@ -127,7 +127,7 @@ declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttribu
|
|
|
127
127
|
base: string;
|
|
128
128
|
};
|
|
129
129
|
}>, unknown, unknown, undefined>>> & React.RefAttributes<HTMLParagraphElement>>;
|
|
130
|
-
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & VariantProps<TVReturnType<{
|
|
130
|
+
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & VariantProps< TVReturnType<{
|
|
131
131
|
size: {
|
|
132
132
|
sm: string;
|
|
133
133
|
base: string;
|
package/dist/common/icon.d.ts
CHANGED
package/dist/common/input.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
1
2
|
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
declare const inputVariants: TVReturnType<{
|
|
5
6
|
variant: {
|
|
@@ -138,7 +139,7 @@ declare const inputVariants: TVReturnType<{
|
|
|
138
139
|
};
|
|
139
140
|
}>, unknown, unknown, undefined>>;
|
|
140
141
|
export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & VariantProps<typeof inputVariants>;
|
|
141
|
-
declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & VariantProps<TVReturnType<{
|
|
142
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & VariantProps< TVReturnType<{
|
|
142
143
|
variant: {
|
|
143
144
|
default: {
|
|
144
145
|
input: string;
|
package/dist/common/label.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
1
2
|
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<TVReturnType<{
|
|
6
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps< TVReturnType<{
|
|
6
7
|
size: {
|
|
7
8
|
sm: string;
|
|
8
9
|
base: string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
export { Slider };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
1
2
|
import { TVConfig } from 'tailwind-variants/dist/config.js';
|
|
2
|
-
|
|
3
|
+
|
|
3
4
|
import * as React from 'react';
|
|
4
|
-
declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & VariantProps<TVReturnType<{
|
|
5
|
+
declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & VariantProps< TVReturnType<{
|
|
5
6
|
variant: {
|
|
6
7
|
default: {
|
|
7
8
|
textarea: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { ComponentConfig } from '../types';
|
|
3
|
+
|
|
4
|
+
export declare const Inputs: Map<string, ComponentConfig>;
|
|
3
5
|
export declare const Containers: Map<string, ElementType>;
|
|
4
6
|
export declare const components: Map<string, ElementType>;
|