@twintag/twintag-form 1.6.1 → 1.6.2-beta.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/CHANGELOG.md +6 -0
- package/README.md +59 -22
- package/dev/index.css +32 -32
- package/dev/main.tsx +1 -0
- package/lib/components/fields/date-picker.tsx +1 -1
- package/lib/components/fields/file.tsx +3 -2
- package/lib/components/fields/input.tsx +1 -1
- package/lib/components/fields/textarea.tsx +5 -1
- package/lib/components/provider.tsx +4 -5
- package/lib/index.tsx +7 -3
- package/lib/types/index.ts +26 -6
- package/package.json +1 -1
- package/.turbo/turbo-build.log +0 -22
- package/dist/common/accordion.d.ts +0 -7
- package/dist/common/button.d.ts +0 -71
- package/dist/common/calendar.d.ts +0 -139
- package/dist/common/checkbox.d.ts +0 -4
- package/dist/common/form.d.ts +0 -86
- package/dist/common/icon.d.ts +0 -8
- package/dist/common/input.d.ts +0 -133
- package/dist/common/label.d.ts +0 -21
- package/dist/common/popover.d.ts +0 -6
- package/dist/common/radiogroup.d.ts +0 -5
- package/dist/common/slider.d.ts +0 -4
- package/dist/common/switch.d.ts +0 -4
- package/dist/common/textarea.d.ts +0 -68
- package/dist/components/config.d.ts +0 -6
- package/dist/components/containers/accordion.d.ts +0 -7
- package/dist/components/containers/category.d.ts +0 -8
- package/dist/components/fields/checkbox.d.ts +0 -5
- package/dist/components/fields/date-picker.d.ts +0 -4
- package/dist/components/fields/file.d.ts +0 -5
- package/dist/components/fields/input.d.ts +0 -5
- package/dist/components/fields/radiogroup.d.ts +0 -7
- package/dist/components/fields/submit.d.ts +0 -4
- package/dist/components/fields/textarea.d.ts +0 -5
- package/dist/components/fields/toggle.d.ts +0 -5
- package/dist/components/fields/tri-toggle.d.ts +0 -5
- package/dist/components/form.d.ts +0 -9
- package/dist/components/input.d.ts +0 -4
- package/dist/components/label.d.ts +0 -4
- package/dist/components/provider.d.ts +0 -19
- package/dist/components/renderer.d.ts +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.js +0 -4456
- package/dist/types/index.d.ts +0 -58
- package/dist/utils/data.d.ts +0 -7
- package/dist/utils/string.d.ts +0 -3
- package/dist/utils/style.d.ts +0 -3
- package/dist/webcomponent.cjs +0 -1
- package/dist/webcomponent.d.ts +0 -1
- package/dist/webcomponent.js +0 -1162
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -76,12 +76,13 @@ The `config` object contains the form structure. It is organized by the index of
|
|
|
76
76
|
|
|
77
77
|
Twintag Form provides some options to customize the form:
|
|
78
78
|
|
|
79
|
-
| Option
|
|
80
|
-
|
|
|
81
|
-
| `variant`
|
|
82
|
-
| `size`
|
|
83
|
-
| `resetOnSubmit`
|
|
84
|
-
| `defaultValues`
|
|
79
|
+
| Option | Type | Description |
|
|
80
|
+
| ---------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
81
|
+
| `variant` | `default / outline` | Variant of the form. |
|
|
82
|
+
| `size` | `base / sm` | Default: `base` (font-size set to 16px). |
|
|
83
|
+
| `resetOnSubmit` | `boolean` | If `true`, the form will be reset after submitting. (`false` per default) |
|
|
84
|
+
| `defaultValues` | `object` | The properties are the same as the bind values in your config. |
|
|
85
|
+
| `acceptFileType` | `string` | Accept file type. ([ref](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#accept)) |
|
|
85
86
|
|
|
86
87
|
### **Inputs**
|
|
87
88
|
|
|
@@ -89,12 +90,13 @@ Twintag Form provides some options to customize the form:
|
|
|
89
90
|
|
|
90
91
|
Each input can be customized with the following optional options:
|
|
91
92
|
|
|
92
|
-
| Option | Type | Description
|
|
93
|
-
| --------------- | --------- |
|
|
94
|
-
| `description` | `string` | Description of the input.
|
|
95
|
-
| `error` | `string` | Error message.
|
|
96
|
-
| `placeholder` | `string` | Placeholder of the input.
|
|
97
|
-
| `optionalField` | `boolean` | If `true`, the field will be optional. (`false` per default)
|
|
93
|
+
| Option | Type | Description |
|
|
94
|
+
| --------------- | --------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `description` | `string` | Description of the input. |
|
|
96
|
+
| `error` | `string` | Error message. |
|
|
97
|
+
| `placeholder` | `string` | Placeholder of the input. |
|
|
98
|
+
| `optionalField` | `boolean` | If `true`, the field will be optional. (`false` per default) |
|
|
99
|
+
| `accept` | `string` | Accept file type. ([ref](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#accept)) |
|
|
98
100
|
|
|
99
101
|
```json
|
|
100
102
|
{
|
|
@@ -104,10 +106,7 @@ Each input can be customized with the following optional options:
|
|
|
104
106
|
"label": "Email",
|
|
105
107
|
"bind": "email",
|
|
106
108
|
"options": {
|
|
107
|
-
|
|
108
|
-
"error": "The field is empty."
|
|
109
|
-
"placeholder": "Write here...",
|
|
110
|
-
"optionalField": true
|
|
109
|
+
...
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
112
|
}
|
|
@@ -123,7 +122,13 @@ Each input can be customized with the following optional options:
|
|
|
123
122
|
"props": {
|
|
124
123
|
"subtype": "simple",
|
|
125
124
|
"label": "Email",
|
|
126
|
-
"bind": "email"
|
|
125
|
+
"bind": "email",
|
|
126
|
+
"options": {
|
|
127
|
+
"description": "Please enter you email",
|
|
128
|
+
"error": "The field is empty."
|
|
129
|
+
"placeholder": "Write here...",
|
|
130
|
+
"optionalField": false
|
|
131
|
+
}
|
|
127
132
|
}
|
|
128
133
|
}
|
|
129
134
|
```
|
|
@@ -136,7 +141,13 @@ Each input can be customized with the following optional options:
|
|
|
136
141
|
"props": {
|
|
137
142
|
"subtype": "textarea",
|
|
138
143
|
"label": "Message",
|
|
139
|
-
"bind": "message"
|
|
144
|
+
"bind": "message",
|
|
145
|
+
"options": {
|
|
146
|
+
"description": "Please enter you message",
|
|
147
|
+
"error": "The field is empty."
|
|
148
|
+
"placeholder": "Write here...",
|
|
149
|
+
"optionalField": false
|
|
150
|
+
}
|
|
140
151
|
}
|
|
141
152
|
}
|
|
142
153
|
```
|
|
@@ -149,7 +160,13 @@ Each input can be customized with the following optional options:
|
|
|
149
160
|
"props": {
|
|
150
161
|
"subtype": "file",
|
|
151
162
|
"label": "File",
|
|
152
|
-
"bind": "file"
|
|
163
|
+
"bind": "file",
|
|
164
|
+
"options": {
|
|
165
|
+
"description": "Please upload an image",
|
|
166
|
+
"error": "The field is empty.",
|
|
167
|
+
"accept": "image/*",
|
|
168
|
+
"optionalField": true
|
|
169
|
+
}
|
|
153
170
|
}
|
|
154
171
|
}
|
|
155
172
|
```
|
|
@@ -162,7 +179,12 @@ Each input can be customized with the following optional options:
|
|
|
162
179
|
"props": {
|
|
163
180
|
"subtype": "checkbox",
|
|
164
181
|
"label": "Checkbox",
|
|
165
|
-
"bind": "checkbox"
|
|
182
|
+
"bind": "checkbox",
|
|
183
|
+
"options": {
|
|
184
|
+
"description": "Please enter you email",
|
|
185
|
+
"error": "The field is empty."
|
|
186
|
+
"optionalField": false
|
|
187
|
+
}
|
|
166
188
|
}
|
|
167
189
|
}
|
|
168
190
|
```
|
|
@@ -175,7 +197,12 @@ Each input can be customized with the following optional options:
|
|
|
175
197
|
"props": {
|
|
176
198
|
"subtype": "toggle",
|
|
177
199
|
"label": "Toggle",
|
|
178
|
-
"bind": "toggle"
|
|
200
|
+
"bind": "toggle",
|
|
201
|
+
"options": {
|
|
202
|
+
"description": "Please enter you email",
|
|
203
|
+
"error": "The field is empty."
|
|
204
|
+
"optionalField": false
|
|
205
|
+
}
|
|
179
206
|
}
|
|
180
207
|
}
|
|
181
208
|
```
|
|
@@ -188,7 +215,12 @@ Each input can be customized with the following optional options:
|
|
|
188
215
|
"props": {
|
|
189
216
|
"subtype": "tri-toggle",
|
|
190
217
|
"label": "Toggle with 3 states",
|
|
191
|
-
"bind": "tri-states"
|
|
218
|
+
"bind": "tri-states",
|
|
219
|
+
"options": {
|
|
220
|
+
"description": "Please enter you email",
|
|
221
|
+
"error": "The field is empty."
|
|
222
|
+
"optionalField": false
|
|
223
|
+
}
|
|
192
224
|
}
|
|
193
225
|
}
|
|
194
226
|
```
|
|
@@ -202,6 +234,11 @@ Each input can be customized with the following optional options:
|
|
|
202
234
|
"subtype": "radiogroup",
|
|
203
235
|
"label": "Radio Group",
|
|
204
236
|
"bind": "radiogroup",
|
|
237
|
+
"options": {
|
|
238
|
+
"description": "Please enter you email",
|
|
239
|
+
"error": "The field is empty."
|
|
240
|
+
"optionalField": false
|
|
241
|
+
}
|
|
205
242
|
},
|
|
206
243
|
"children": [
|
|
207
244
|
{
|
package/dev/index.css
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
|
|
2
|
-
|
|
3
|
-
@tailwind base;
|
|
4
|
-
@tailwind components;
|
|
5
|
-
@tailwind utilities;
|
|
6
|
-
|
|
7
|
-
:root {
|
|
8
|
-
--tf-label: 222.2 47.4% 11.2%;
|
|
9
|
-
--tf-category: 222.2 47.4% 11.2%;
|
|
10
|
-
|
|
11
|
-
--tf-background: 0 0% 100%;
|
|
12
|
-
--tf-foreground: 0 0% 0%;
|
|
13
|
-
|
|
14
|
-
--tf-muted: 210 40% 96.1%;
|
|
15
|
-
--tf-muted-foreground: 215.4 16.3% 46.9%;
|
|
16
|
-
|
|
17
|
-
--tf-primary: 210 40% 98%;
|
|
18
|
-
--tf-primary-foreground: 222.2 47.4% 11.2%;
|
|
19
|
-
|
|
20
|
-
--tf-accent: 222.2 47.4% 11.2%;
|
|
21
|
-
--tf-accent-foreground: 210 40% 96.1%;
|
|
22
|
-
|
|
23
|
-
--tf-destructive: 0 100% 50%;
|
|
24
|
-
--tf-destructive-foreground: 210 40% 98%;
|
|
25
|
-
|
|
26
|
-
--tf-input: 214.3 31.8% 91.4%;
|
|
27
|
-
--tf-ring: 215 20.2% 65.1%;
|
|
28
|
-
|
|
29
|
-
--tf-radius: 0.5rem;
|
|
30
|
-
|
|
31
|
-
--tf-font: 'Roboto', sans-serif;
|
|
32
|
-
}
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
|
|
2
|
+
|
|
3
|
+
@tailwind base;
|
|
4
|
+
@tailwind components;
|
|
5
|
+
@tailwind utilities;
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
--tf-label: 222.2 47.4% 11.2%;
|
|
9
|
+
--tf-category: 222.2 47.4% 11.2%;
|
|
10
|
+
|
|
11
|
+
--tf-background: 0 0% 100%;
|
|
12
|
+
--tf-foreground: 0 0% 0%;
|
|
13
|
+
|
|
14
|
+
--tf-muted: 210 40% 96.1%;
|
|
15
|
+
--tf-muted-foreground: 215.4 16.3% 46.9%;
|
|
16
|
+
|
|
17
|
+
--tf-primary: 210 40% 98%;
|
|
18
|
+
--tf-primary-foreground: 222.2 47.4% 11.2%;
|
|
19
|
+
|
|
20
|
+
--tf-accent: 222.2 47.4% 11.2%;
|
|
21
|
+
--tf-accent-foreground: 210 40% 96.1%;
|
|
22
|
+
|
|
23
|
+
--tf-destructive: 0 100% 50%;
|
|
24
|
+
--tf-destructive-foreground: 210 40% 98%;
|
|
25
|
+
|
|
26
|
+
--tf-input: 214.3 31.8% 91.4%;
|
|
27
|
+
--tf-ring: 215 20.2% 65.1%;
|
|
28
|
+
|
|
29
|
+
--tf-radius: 0.5rem;
|
|
30
|
+
|
|
31
|
+
--tf-font: 'Roboto', sans-serif;
|
|
32
|
+
}
|
package/dev/main.tsx
CHANGED
|
@@ -17,9 +17,9 @@ import { useTwintagForm } from '@twintag/twintag-form/components/provider';
|
|
|
17
17
|
|
|
18
18
|
export const DEFAULT_FILE_VALUE = '';
|
|
19
19
|
|
|
20
|
-
export const File: FC<Props<'input'>> = ({ label, bind, options }) => {
|
|
20
|
+
export const File: FC<Props<'input', 'file'>> = ({ label, bind, options }) => {
|
|
21
21
|
const { control } = useFormContext();
|
|
22
|
-
const { variant, size } = useTwintagForm();
|
|
22
|
+
const { variant, size, acceptFileType } = useTwintagForm();
|
|
23
23
|
|
|
24
24
|
const isOptional = options?.optionalField;
|
|
25
25
|
|
|
@@ -63,6 +63,7 @@ export const File: FC<Props<'input'>> = ({ label, bind, options }) => {
|
|
|
63
63
|
}}
|
|
64
64
|
id={bind}
|
|
65
65
|
type='file'
|
|
66
|
+
accept={options?.accept ?? acceptFileType}
|
|
66
67
|
name={field.name}
|
|
67
68
|
size={size}
|
|
68
69
|
variant={variant}
|
|
@@ -17,7 +17,7 @@ import { useTwintagForm } from '@twintag/twintag-form/components/provider';
|
|
|
17
17
|
|
|
18
18
|
export const DEFAULT_INPUT_VALUE = '';
|
|
19
19
|
|
|
20
|
-
export const Input: FC<Props<'input'>> = ({ label, bind, options }) => {
|
|
20
|
+
export const Input: FC<Props<'input', 'text'>> = ({ label, bind, options }) => {
|
|
21
21
|
const { control } = useFormContext();
|
|
22
22
|
|
|
23
23
|
const { variant, size } = useTwintagForm();
|
|
@@ -17,7 +17,11 @@ import { useTwintagForm } from '@twintag/twintag-form/components/provider';
|
|
|
17
17
|
|
|
18
18
|
export const DEFAULT_TEXTAREA_VALUE = '';
|
|
19
19
|
|
|
20
|
-
export const Textarea: FC<Props<'input'>> = ({
|
|
20
|
+
export const Textarea: FC<Props<'input', 'text'>> = ({
|
|
21
|
+
label,
|
|
22
|
+
bind,
|
|
23
|
+
options,
|
|
24
|
+
}) => {
|
|
21
25
|
const { control } = useFormContext();
|
|
22
26
|
const { variant, size } = useTwintagForm();
|
|
23
27
|
|
|
@@ -16,6 +16,7 @@ export const twintagFormContext = createContext<TwintagFormContext>({
|
|
|
16
16
|
components: new Map(),
|
|
17
17
|
config: [],
|
|
18
18
|
resetValues: {},
|
|
19
|
+
acceptFileType: undefined,
|
|
19
20
|
});
|
|
20
21
|
|
|
21
22
|
export const useTwintagForm = () => {
|
|
@@ -126,13 +127,10 @@ export const TwintagFormProvider = ({
|
|
|
126
127
|
inputs,
|
|
127
128
|
components,
|
|
128
129
|
config,
|
|
130
|
+
acceptFileType,
|
|
129
131
|
children,
|
|
130
|
-
}: {
|
|
132
|
+
}: Omit<TwintagFormContext, 'config' | 'resetValues'> & {
|
|
131
133
|
config: RawJsonComponent | RawJsonComponent[];
|
|
132
|
-
variant: TwintagFormContext['variant'];
|
|
133
|
-
size: TwintagFormContext['size'];
|
|
134
|
-
inputs: Inputs;
|
|
135
|
-
components: Components;
|
|
136
134
|
} & WithChildren) => {
|
|
137
135
|
const __config = useMemo(() => {
|
|
138
136
|
if (Array.isArray(config)) {
|
|
@@ -155,6 +153,7 @@ export const TwintagFormProvider = ({
|
|
|
155
153
|
inputs,
|
|
156
154
|
components,
|
|
157
155
|
resetValues,
|
|
156
|
+
acceptFileType,
|
|
158
157
|
}}
|
|
159
158
|
>
|
|
160
159
|
{children}
|
package/lib/index.tsx
CHANGED
|
@@ -11,10 +11,13 @@ import { JsonRenderer } from '@twintag/twintag-form/components/renderer';
|
|
|
11
11
|
type Props = {
|
|
12
12
|
config: RawJsonComponent[];
|
|
13
13
|
options?: Partial<{
|
|
14
|
-
defaultValues
|
|
15
|
-
variant
|
|
16
|
-
size
|
|
14
|
+
defaultValues: ComponentProps<typeof TwintagForm>['defaultValues'];
|
|
15
|
+
variant: ComponentProps<typeof TwintagFormProvider>['variant'];
|
|
16
|
+
size: ComponentProps<typeof TwintagFormProvider>['size'];
|
|
17
17
|
resetOnSubmit?: boolean;
|
|
18
|
+
acceptFileType?: ComponentProps<
|
|
19
|
+
typeof TwintagFormProvider
|
|
20
|
+
>['acceptFileType'];
|
|
18
21
|
}>;
|
|
19
22
|
};
|
|
20
23
|
|
|
@@ -27,6 +30,7 @@ export const Form = forwardRef<HTMLFormElement, Props>(
|
|
|
27
30
|
variant={options?.variant}
|
|
28
31
|
size={options?.size}
|
|
29
32
|
config={config}
|
|
33
|
+
acceptFileType={options?.acceptFileType}
|
|
30
34
|
>
|
|
31
35
|
<TwintagForm
|
|
32
36
|
ref={ref}
|
package/lib/types/index.ts
CHANGED
|
@@ -5,6 +5,24 @@ export type InputCompConfig = {
|
|
|
5
5
|
component: ElementType;
|
|
6
6
|
};
|
|
7
7
|
|
|
8
|
+
type BaseInputOptions = Partial<{
|
|
9
|
+
description: string;
|
|
10
|
+
error: string;
|
|
11
|
+
optionalField: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
|
|
14
|
+
type TextInputOptions = BaseInputOptions & {
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
type DatePickerInputOptions = BaseInputOptions & {
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
type FileInputOptions = BaseInputOptions & {
|
|
23
|
+
accept?: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
8
26
|
type CompType = 'input' | 'item' | 'accordion' | 'category';
|
|
9
27
|
type StringLiteral<T> = T extends string
|
|
10
28
|
? string extends T
|
|
@@ -21,12 +39,13 @@ type RawProps<
|
|
|
21
39
|
bind: string;
|
|
22
40
|
label?: string;
|
|
23
41
|
subtype?: string;
|
|
24
|
-
options?:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
42
|
+
options?: TSubtype extends 'text' | 'textarea'
|
|
43
|
+
? TextInputOptions
|
|
44
|
+
: TSubtype extends 'datepicker'
|
|
45
|
+
? DatePickerInputOptions
|
|
46
|
+
: TSubtype extends 'file'
|
|
47
|
+
? FileInputOptions
|
|
48
|
+
: BaseInputOptions;
|
|
30
49
|
}
|
|
31
50
|
: TType extends 'accordion'
|
|
32
51
|
? TSubtype extends 'item'
|
|
@@ -79,4 +98,5 @@ export type TwintagFormContext = {
|
|
|
79
98
|
components: Map<string, ElementType>;
|
|
80
99
|
config: ParsedJsonComponent[] | ParsedJsonComponent;
|
|
81
100
|
resetValues: Record<string, unknown>;
|
|
101
|
+
acceptFileType?: string;
|
|
82
102
|
};
|
package/package.json
CHANGED
package/.turbo/turbo-build.log
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @twintag/twintag-form@1.6.1 build /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form
|
|
3
|
-
> tsc && vite build
|
|
4
|
-
|
|
5
|
-
[36mvite v5.4.8 [32mbuilding for production...[36m[39m
|
|
6
|
-
transforming...
|
|
7
|
-
[32m✓[39m 49 modules transformed.
|
|
8
|
-
rendering chunks...
|
|
9
|
-
|
|
10
|
-
[vite:dts] Start generate declaration files...
|
|
11
|
-
computing gzip size...
|
|
12
|
-
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/twind.config.d.ts
|
|
13
|
-
[2mdist/[22m[36mwebcomponent.js [39m[1m[2m 27.74 kB[22m[1m[22m[2m │ gzip: 5.50 kB[22m
|
|
14
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m135.84 kB[22m[1m[22m[2m │ gzip: 28.69 kB[22m
|
|
15
|
-
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/tailwind.config.d.ts
|
|
16
|
-
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/dev/main.d.ts
|
|
17
|
-
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/vite.config.d.ts
|
|
18
|
-
[vite:dts] Declaration files built in 9851ms.
|
|
19
|
-
|
|
20
|
-
[2mdist/[22m[36mwebcomponent.cjs [39m[1m[2m18.72 kB[22m[1m[22m[2m │ gzip: 5.01 kB[22m
|
|
21
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m94.92 kB[22m[1m[22m[2m │ gzip: 24.25 kB[22m
|
|
22
|
-
[32m✓ built in 10.80s[39m
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
-
declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
package/dist/common/button.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
declare const buttonVariants: TVReturnType<{
|
|
5
|
-
variant: {
|
|
6
|
-
default: string;
|
|
7
|
-
outline: string;
|
|
8
|
-
ghost: string;
|
|
9
|
-
};
|
|
10
|
-
size: {
|
|
11
|
-
sm: string;
|
|
12
|
-
base: string;
|
|
13
|
-
};
|
|
14
|
-
}, undefined, string[], {
|
|
15
|
-
variant: {
|
|
16
|
-
default: string;
|
|
17
|
-
outline: string;
|
|
18
|
-
ghost: string;
|
|
19
|
-
};
|
|
20
|
-
size: {
|
|
21
|
-
sm: string;
|
|
22
|
-
base: string;
|
|
23
|
-
};
|
|
24
|
-
}, undefined, TVReturnType<{
|
|
25
|
-
variant: {
|
|
26
|
-
default: string;
|
|
27
|
-
outline: string;
|
|
28
|
-
ghost: string;
|
|
29
|
-
};
|
|
30
|
-
size: {
|
|
31
|
-
sm: string;
|
|
32
|
-
base: string;
|
|
33
|
-
};
|
|
34
|
-
}, undefined, string[], unknown, unknown, undefined>>;
|
|
35
|
-
export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
|
|
36
|
-
asChild?: boolean;
|
|
37
|
-
};
|
|
38
|
-
declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps< TVReturnType<{
|
|
39
|
-
variant: {
|
|
40
|
-
default: string;
|
|
41
|
-
outline: string;
|
|
42
|
-
ghost: string;
|
|
43
|
-
};
|
|
44
|
-
size: {
|
|
45
|
-
sm: string;
|
|
46
|
-
base: string;
|
|
47
|
-
};
|
|
48
|
-
}, undefined, string[], {
|
|
49
|
-
variant: {
|
|
50
|
-
default: string;
|
|
51
|
-
outline: string;
|
|
52
|
-
ghost: string;
|
|
53
|
-
};
|
|
54
|
-
size: {
|
|
55
|
-
sm: string;
|
|
56
|
-
base: string;
|
|
57
|
-
};
|
|
58
|
-
}, undefined, TVReturnType<{
|
|
59
|
-
variant: {
|
|
60
|
-
default: string;
|
|
61
|
-
outline: string;
|
|
62
|
-
ghost: string;
|
|
63
|
-
};
|
|
64
|
-
size: {
|
|
65
|
-
sm: string;
|
|
66
|
-
base: string;
|
|
67
|
-
};
|
|
68
|
-
}, undefined, string[], unknown, unknown, undefined>>> & {
|
|
69
|
-
asChild?: boolean;
|
|
70
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
71
|
-
export { Button, buttonVariants };
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
2
|
-
import { DayPicker } from 'react-day-picker';
|
|
3
|
-
import type * as React from 'react';
|
|
4
|
-
declare const calendarVariants: TVReturnType<{
|
|
5
|
-
variant: {
|
|
6
|
-
dropdown: {
|
|
7
|
-
caption_label: string;
|
|
8
|
-
caption_dropdowns: string[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
size: {
|
|
12
|
-
sm: {
|
|
13
|
-
caption_label: string;
|
|
14
|
-
caption_dropdowns: string;
|
|
15
|
-
cell: string;
|
|
16
|
-
};
|
|
17
|
-
base: {
|
|
18
|
-
caption_label: string;
|
|
19
|
-
caption_dropdowns: string;
|
|
20
|
-
cell: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}, {
|
|
24
|
-
picker: string;
|
|
25
|
-
months: string;
|
|
26
|
-
month: string;
|
|
27
|
-
caption: string;
|
|
28
|
-
caption_dropdowns: string;
|
|
29
|
-
caption_label: string;
|
|
30
|
-
nav: string;
|
|
31
|
-
nav_button: string;
|
|
32
|
-
nav_button_previous: string;
|
|
33
|
-
nav_button_next: string;
|
|
34
|
-
table: string;
|
|
35
|
-
head_row: string;
|
|
36
|
-
head_cell: string;
|
|
37
|
-
row: string;
|
|
38
|
-
cell: string;
|
|
39
|
-
day: string;
|
|
40
|
-
day_range_end: string;
|
|
41
|
-
day_selected: string;
|
|
42
|
-
day_today: string;
|
|
43
|
-
day_outside: string;
|
|
44
|
-
day_disabled: string;
|
|
45
|
-
day_range_middle: string;
|
|
46
|
-
day_hidden: string;
|
|
47
|
-
}, undefined, {
|
|
48
|
-
variant: {
|
|
49
|
-
dropdown: {
|
|
50
|
-
caption_label: string;
|
|
51
|
-
caption_dropdowns: string[];
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
size: {
|
|
55
|
-
sm: {
|
|
56
|
-
caption_label: string;
|
|
57
|
-
caption_dropdowns: string;
|
|
58
|
-
cell: string;
|
|
59
|
-
};
|
|
60
|
-
base: {
|
|
61
|
-
caption_label: string;
|
|
62
|
-
caption_dropdowns: string;
|
|
63
|
-
cell: string;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
}, {
|
|
67
|
-
picker: string;
|
|
68
|
-
months: string;
|
|
69
|
-
month: string;
|
|
70
|
-
caption: string;
|
|
71
|
-
caption_dropdowns: string;
|
|
72
|
-
caption_label: string;
|
|
73
|
-
nav: string;
|
|
74
|
-
nav_button: string;
|
|
75
|
-
nav_button_previous: string;
|
|
76
|
-
nav_button_next: string;
|
|
77
|
-
table: string;
|
|
78
|
-
head_row: string;
|
|
79
|
-
head_cell: string;
|
|
80
|
-
row: string;
|
|
81
|
-
cell: string;
|
|
82
|
-
day: string;
|
|
83
|
-
day_range_end: string;
|
|
84
|
-
day_selected: string;
|
|
85
|
-
day_today: string;
|
|
86
|
-
day_outside: string;
|
|
87
|
-
day_disabled: string;
|
|
88
|
-
day_range_middle: string;
|
|
89
|
-
day_hidden: string;
|
|
90
|
-
}, TVReturnType<{
|
|
91
|
-
variant: {
|
|
92
|
-
dropdown: {
|
|
93
|
-
caption_label: string;
|
|
94
|
-
caption_dropdowns: string[];
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
size: {
|
|
98
|
-
sm: {
|
|
99
|
-
caption_label: string;
|
|
100
|
-
caption_dropdowns: string;
|
|
101
|
-
cell: string;
|
|
102
|
-
};
|
|
103
|
-
base: {
|
|
104
|
-
caption_label: string;
|
|
105
|
-
caption_dropdowns: string;
|
|
106
|
-
cell: string;
|
|
107
|
-
};
|
|
108
|
-
};
|
|
109
|
-
}, {
|
|
110
|
-
picker: string;
|
|
111
|
-
months: string;
|
|
112
|
-
month: string;
|
|
113
|
-
caption: string;
|
|
114
|
-
caption_dropdowns: string;
|
|
115
|
-
caption_label: string;
|
|
116
|
-
nav: string;
|
|
117
|
-
nav_button: string;
|
|
118
|
-
nav_button_previous: string;
|
|
119
|
-
nav_button_next: string;
|
|
120
|
-
table: string;
|
|
121
|
-
head_row: string;
|
|
122
|
-
head_cell: string;
|
|
123
|
-
row: string;
|
|
124
|
-
cell: string;
|
|
125
|
-
day: string;
|
|
126
|
-
day_range_end: string;
|
|
127
|
-
day_selected: string;
|
|
128
|
-
day_today: string;
|
|
129
|
-
day_outside: string;
|
|
130
|
-
day_disabled: string;
|
|
131
|
-
day_range_middle: string;
|
|
132
|
-
day_hidden: string;
|
|
133
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
134
|
-
export type CalendarProps = React.ComponentProps<typeof DayPicker> & VariantProps<typeof calendarVariants>;
|
|
135
|
-
declare function Calendar({ size, className, classNames, showOutsideDays, ...props }: CalendarProps): import("react/jsx-runtime").JSX.Element;
|
|
136
|
-
declare namespace Calendar {
|
|
137
|
-
var displayName: string;
|
|
138
|
-
}
|
|
139
|
-
export { Calendar };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
-
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
-
export { Checkbox };
|