@twintag/twintag-form 1.6.0 → 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 +12 -0
- package/README.md +59 -22
- package/dev/index.css +32 -32
- package/dev/main.tsx +1 -0
- package/lib/common/button.tsx +6 -6
- package/lib/common/calendar.tsx +10 -9
- package/lib/common/checkbox.tsx +3 -3
- package/lib/common/form.tsx +3 -3
- package/lib/common/icon.tsx +1 -1
- package/lib/common/input.tsx +4 -4
- package/lib/common/label.tsx +1 -1
- package/lib/common/popover.tsx +1 -1
- package/lib/common/radiogroup.tsx +2 -2
- package/lib/common/slider.tsx +3 -3
- package/lib/common/switch.tsx +3 -3
- package/lib/common/textarea.tsx +3 -3
- package/lib/components/containers/category.tsx +1 -1
- package/lib/components/fields/checkbox.tsx +1 -1
- package/lib/components/fields/date-picker.tsx +5 -5
- package/lib/components/fields/file.tsx +4 -3
- package/lib/components/fields/input.tsx +2 -2
- package/lib/components/fields/radiogroup.tsx +1 -1
- package/lib/components/fields/textarea.tsx +6 -2
- package/lib/components/fields/toggle.tsx +1 -1
- package/lib/components/fields/tri-toggle.tsx +4 -4
- 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/tailwind.config.ts +21 -26
- 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 -1170
|
@@ -20,10 +20,10 @@ import { useTwintagForm } from '@twintag/twintag-form/components/provider';
|
|
|
20
20
|
const sliderVariants = tv({
|
|
21
21
|
slots: {
|
|
22
22
|
root: 'relative flex w-11 touch-none select-none items-center',
|
|
23
|
-
track: 'relative h-5 w-full grow overflow-hidden rounded-full bg-muted',
|
|
24
|
-
range: 'absolute h-full bg-accent',
|
|
23
|
+
track: 'relative h-5 w-full grow overflow-hidden rounded-full bg-tf-muted',
|
|
24
|
+
range: 'absolute h-full bg-tf-accent',
|
|
25
25
|
thumb:
|
|
26
|
-
'relative block h-4 w-4 rounded-full border-2 border-transparent bg-background shadow-lg focus-visible:outline-none focus-visible:ring-0 disabled:pointer-events-none disabled:opacity-50',
|
|
26
|
+
'relative block h-4 w-4 rounded-full border-2 border-transparent bg-tf-background shadow-lg focus-visible:outline-none focus-visible:ring-0 disabled:pointer-events-none disabled:opacity-50',
|
|
27
27
|
},
|
|
28
28
|
variants: {
|
|
29
29
|
state: {
|
|
@@ -33,7 +33,7 @@ const sliderVariants = tv({
|
|
|
33
33
|
},
|
|
34
34
|
// null
|
|
35
35
|
1: {
|
|
36
|
-
thumb: 'h-5 w-5 border-accent',
|
|
36
|
+
thumb: 'h-5 w-5 border-tf-accent',
|
|
37
37
|
},
|
|
38
38
|
// true
|
|
39
39
|
2: {
|
|
@@ -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/tailwind.config.ts
CHANGED
|
@@ -7,36 +7,31 @@ const config = {
|
|
|
7
7
|
theme: {
|
|
8
8
|
extend: {
|
|
9
9
|
colors: {
|
|
10
|
-
category: 'hsl(var(--tf-category) / <alpha-value>)',
|
|
11
|
-
label: 'hsl(var(--tf-label) / <alpha-value>)',
|
|
10
|
+
'tf-category': 'hsl(var(--tf-category) / <alpha-value>)',
|
|
11
|
+
'tf-label': 'hsl(var(--tf-label) / <alpha-value>)',
|
|
12
12
|
|
|
13
|
-
background: 'hsl(var(--tf-background) / <alpha-value>)',
|
|
14
|
-
foreground: 'hsl(var(--tf-foreground) / <alpha-value>)',
|
|
13
|
+
'tf-background': 'hsl(var(--tf-background) / <alpha-value>)',
|
|
14
|
+
'tf-foreground': 'hsl(var(--tf-foreground) / <alpha-value>)',
|
|
15
15
|
|
|
16
|
-
primary:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
accent:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
foreground: 'hsl(var(--tf-muted-foreground) / <alpha-value>)',
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
input: 'hsl(var(--tf-input) / <alpha-value>)',
|
|
34
|
-
ring: 'hsl(var(--tf-ring) / <alpha-value>)',
|
|
16
|
+
'tf-primary': 'hsl(var(--tf-primary) / <alpha-value>)',
|
|
17
|
+
'tf-primary-foreground':
|
|
18
|
+
'hsl(var(--tf-primary-foreground) / <alpha-value>)',
|
|
19
|
+
'tf-accent': 'hsl(var(--tf-accent) / <alpha-value>)',
|
|
20
|
+
'tf-accent-foreground':
|
|
21
|
+
'hsl(var(--tf-accent-foreground) / <alpha-value>)',
|
|
22
|
+
'tf-destructive': 'hsl(var(--tf-destructive) / <alpha-value>)',
|
|
23
|
+
'tf-destructive-foreground':
|
|
24
|
+
'hsl(var(--tf-destructive-foreground) / <alpha-value>)',
|
|
25
|
+
'tf-muted': 'hsl(var(--tf-muted) / <alpha-value>)',
|
|
26
|
+
'tf-muted-foreground':
|
|
27
|
+
'hsl(var(--tf-muted-foreground) / <alpha-value>)',
|
|
28
|
+
'tf-input': 'hsl(var(--tf-input) / <alpha-value>)',
|
|
29
|
+
'tf-ring': 'hsl(var(--tf-ring) / <alpha-value>)',
|
|
35
30
|
},
|
|
36
31
|
borderRadius: {
|
|
37
|
-
lg: 'var(--tf-radius)',
|
|
38
|
-
md: 'calc(var(--tf-radius) - 2px)',
|
|
39
|
-
sm: 'calc(var(--tf-radius) - 4px)',
|
|
32
|
+
'tf-lg': 'var(--tf-radius)',
|
|
33
|
+
'tf-md': 'calc(var(--tf-radius) - 2px)',
|
|
34
|
+
'tf-sm': 'calc(var(--tf-radius) - 4px)',
|
|
40
35
|
},
|
|
41
36
|
fontFamily: {
|
|
42
37
|
'tf-font': ['var(--tf-font)', ...fontFamily.sans],
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @twintag/twintag-form@1.6.0 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
|
-
[2mdist/[22m[36mwebcomponent.js [39m[1m[2m 27.75 kB[22m[1m[22m[2m │ gzip: 5.50 kB[22m
|
|
13
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m135.56 kB[22m[1m[22m[2m │ gzip: 28.67 kB[22m
|
|
14
|
-
[vite:dts] Outside emitted: /home/runner/work/twintag-admin/twintag-admin/packages/twintag-form/twind.config.d.ts
|
|
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 9748ms.
|
|
19
|
-
|
|
20
|
-
[2mdist/[22m[36mwebcomponent.cjs [39m[1m[2m18.64 kB[22m[1m[22m[2m │ gzip: 5.00 kB[22m
|
|
21
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[2m94.64 kB[22m[1m[22m[2m │ gzip: 24.22 kB[22m
|
|
22
|
-
[32m✓ built in 10.72s[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 };
|
package/dist/common/form.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { ControllerProps, FieldPath, FieldValues, FormProviderProps, FieldError } from 'react-hook-form';
|
|
2
|
-
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
3
|
-
import { LabelProps } from '@radix-ui/react-label';
|
|
4
|
-
import { SlotProps } from '@radix-ui/react-slot';
|
|
5
|
-
|
|
6
|
-
import * as React from 'react';
|
|
7
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
8
|
-
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare const useFormField: () => {
|
|
10
|
-
invalid: boolean;
|
|
11
|
-
isDirty: boolean;
|
|
12
|
-
isTouched: boolean;
|
|
13
|
-
isValidating: boolean;
|
|
14
|
-
error?: FieldError;
|
|
15
|
-
id: string;
|
|
16
|
-
name: string;
|
|
17
|
-
formItemId: string;
|
|
18
|
-
formDescriptionId: string;
|
|
19
|
-
formMessageId: string;
|
|
20
|
-
};
|
|
21
|
-
declare const FormItem: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps< TVReturnType<{
|
|
22
|
-
variant: {
|
|
23
|
-
default: string;
|
|
24
|
-
outline: string;
|
|
25
|
-
};
|
|
26
|
-
}, undefined, "", {
|
|
27
|
-
variant: {
|
|
28
|
-
default: string;
|
|
29
|
-
outline: string;
|
|
30
|
-
};
|
|
31
|
-
}, undefined, TVReturnType<{
|
|
32
|
-
variant: {
|
|
33
|
-
default: string;
|
|
34
|
-
outline: string;
|
|
35
|
-
};
|
|
36
|
-
}, undefined, "", unknown, unknown, undefined>>> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
declare const FormLabel: React.ForwardRefExoticComponent<Omit<Omit< LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps< TVReturnType<{
|
|
38
|
-
size: {
|
|
39
|
-
sm: string;
|
|
40
|
-
base: string;
|
|
41
|
-
};
|
|
42
|
-
}, undefined, string[], {
|
|
43
|
-
size: {
|
|
44
|
-
sm: string;
|
|
45
|
-
base: string;
|
|
46
|
-
};
|
|
47
|
-
}, undefined, TVReturnType<{
|
|
48
|
-
size: {
|
|
49
|
-
sm: string;
|
|
50
|
-
base: string;
|
|
51
|
-
};
|
|
52
|
-
}, undefined, string[], unknown, unknown, undefined>>> & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
53
|
-
declare const FormControl: React.ForwardRefExoticComponent<Omit< SlotProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
54
|
-
declare const FormDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & VariantProps< TVReturnType<{
|
|
55
|
-
size: {
|
|
56
|
-
sm: string;
|
|
57
|
-
base: string;
|
|
58
|
-
};
|
|
59
|
-
}, undefined, "text-muted-foreground", {
|
|
60
|
-
size: {
|
|
61
|
-
sm: string;
|
|
62
|
-
base: string;
|
|
63
|
-
};
|
|
64
|
-
}, undefined, TVReturnType<{
|
|
65
|
-
size: {
|
|
66
|
-
sm: string;
|
|
67
|
-
base: string;
|
|
68
|
-
};
|
|
69
|
-
}, undefined, "text-muted-foreground", unknown, unknown, undefined>>> & React.RefAttributes<HTMLParagraphElement>>;
|
|
70
|
-
declare const FormMessage: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & VariantProps< TVReturnType<{
|
|
71
|
-
size: {
|
|
72
|
-
sm: string;
|
|
73
|
-
base: string;
|
|
74
|
-
};
|
|
75
|
-
}, undefined, "font-medium text-destructive", {
|
|
76
|
-
size: {
|
|
77
|
-
sm: string;
|
|
78
|
-
base: string;
|
|
79
|
-
};
|
|
80
|
-
}, undefined, TVReturnType<{
|
|
81
|
-
size: {
|
|
82
|
-
sm: string;
|
|
83
|
-
base: string;
|
|
84
|
-
};
|
|
85
|
-
}, undefined, "font-medium text-destructive", unknown, unknown, undefined>>> & React.RefAttributes<HTMLParagraphElement>>;
|
|
86
|
-
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
package/dist/common/icon.d.ts
DELETED
package/dist/common/input.d.ts
DELETED
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
import { VariantProps, TVReturnType } from 'tailwind-variants';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
declare const inputVariants: TVReturnType<{
|
|
5
|
-
variant: {
|
|
6
|
-
default: {
|
|
7
|
-
input: string;
|
|
8
|
-
};
|
|
9
|
-
outline: {
|
|
10
|
-
root: string;
|
|
11
|
-
input: string;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
size: {
|
|
15
|
-
sm: {
|
|
16
|
-
input: string;
|
|
17
|
-
};
|
|
18
|
-
base: {
|
|
19
|
-
input: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}, {
|
|
23
|
-
root: string;
|
|
24
|
-
input: string[];
|
|
25
|
-
}, undefined, {
|
|
26
|
-
variant: {
|
|
27
|
-
default: {
|
|
28
|
-
input: string;
|
|
29
|
-
};
|
|
30
|
-
outline: {
|
|
31
|
-
root: string;
|
|
32
|
-
input: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
size: {
|
|
36
|
-
sm: {
|
|
37
|
-
input: string;
|
|
38
|
-
};
|
|
39
|
-
base: {
|
|
40
|
-
input: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
}, {
|
|
44
|
-
root: string;
|
|
45
|
-
input: string[];
|
|
46
|
-
}, TVReturnType<{
|
|
47
|
-
variant: {
|
|
48
|
-
default: {
|
|
49
|
-
input: string;
|
|
50
|
-
};
|
|
51
|
-
outline: {
|
|
52
|
-
root: string;
|
|
53
|
-
input: string;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
size: {
|
|
57
|
-
sm: {
|
|
58
|
-
input: string;
|
|
59
|
-
};
|
|
60
|
-
base: {
|
|
61
|
-
input: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
}, {
|
|
65
|
-
root: string;
|
|
66
|
-
input: string[];
|
|
67
|
-
}, undefined, unknown, unknown, undefined>>;
|
|
68
|
-
export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> & VariantProps<typeof inputVariants>;
|
|
69
|
-
declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & VariantProps< TVReturnType<{
|
|
70
|
-
variant: {
|
|
71
|
-
default: {
|
|
72
|
-
input: string;
|
|
73
|
-
};
|
|
74
|
-
outline: {
|
|
75
|
-
root: string;
|
|
76
|
-
input: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
size: {
|
|
80
|
-
sm: {
|
|
81
|
-
input: string;
|
|
82
|
-
};
|
|
83
|
-
base: {
|
|
84
|
-
input: string;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
}, {
|
|
88
|
-
root: string;
|
|
89
|
-
input: string[];
|
|
90
|
-
}, undefined, {
|
|
91
|
-
variant: {
|
|
92
|
-
default: {
|
|
93
|
-
input: string;
|
|
94
|
-
};
|
|
95
|
-
outline: {
|
|
96
|
-
root: string;
|
|
97
|
-
input: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
size: {
|
|
101
|
-
sm: {
|
|
102
|
-
input: string;
|
|
103
|
-
};
|
|
104
|
-
base: {
|
|
105
|
-
input: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
}, {
|
|
109
|
-
root: string;
|
|
110
|
-
input: string[];
|
|
111
|
-
}, TVReturnType<{
|
|
112
|
-
variant: {
|
|
113
|
-
default: {
|
|
114
|
-
input: string;
|
|
115
|
-
};
|
|
116
|
-
outline: {
|
|
117
|
-
root: string;
|
|
118
|
-
input: string;
|
|
119
|
-
};
|
|
120
|
-
};
|
|
121
|
-
size: {
|
|
122
|
-
sm: {
|
|
123
|
-
input: string;
|
|
124
|
-
};
|
|
125
|
-
base: {
|
|
126
|
-
input: string;
|
|
127
|
-
};
|
|
128
|
-
};
|
|
129
|
-
}, {
|
|
130
|
-
root: string;
|
|
131
|
-
input: string[];
|
|
132
|
-
}, undefined, unknown, unknown, undefined>>> & React.RefAttributes<HTMLInputElement>>;
|
|
133
|
-
export { Input };
|