@vritti/quantum-ui 0.2.2 → 0.2.4
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/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/index.d.ts +3 -0
- package/dist/components/Button/index.d.ts.map +1 -0
- package/dist/components/Card/Card.d.ts +2 -0
- package/dist/components/Card/Card.d.ts.map +1 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.d.ts.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/components/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.d.ts.map +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +17 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/DatePicker/index.d.ts.map +1 -0
- package/dist/components/Field/index.d.ts +2 -0
- package/dist/components/Field/index.d.ts.map +1 -0
- package/dist/components/Form/Form.d.ts +21 -0
- package/dist/components/Form/Form.d.ts.map +1 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Form/index.d.ts.map +1 -0
- package/dist/components/OTPField/OTPField.d.ts +14 -0
- package/dist/components/OTPField/OTPField.d.ts.map +1 -0
- package/dist/components/OTPField/index.d.ts +2 -0
- package/dist/components/OTPField/index.d.ts.map +1 -0
- package/dist/components/PasswordField/PasswordField.d.ts +10 -0
- package/dist/components/PasswordField/PasswordField.d.ts.map +1 -0
- package/dist/components/PasswordField/index.d.ts +2 -0
- package/dist/components/PasswordField/index.d.ts.map +1 -0
- package/dist/components/PhoneField/PhoneField.d.ts +15 -0
- package/dist/components/PhoneField/PhoneField.d.ts.map +1 -0
- package/dist/components/PhoneField/index.d.ts +3 -0
- package/dist/components/PhoneField/index.d.ts.map +1 -0
- package/dist/components/Progress/Progress.d.ts +2 -0
- package/dist/components/Progress/Progress.d.ts.map +1 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Progress/index.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/components/Spinner/Spinner.d.ts +3 -0
- package/dist/components/Spinner/Spinner.d.ts.map +1 -0
- package/dist/components/Spinner/index.d.ts +2 -0
- package/dist/components/Spinner/index.d.ts.map +1 -0
- package/dist/components/TextArea/TextArea.d.ts +8 -0
- package/dist/components/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/TextArea/index.d.ts +2 -0
- package/dist/components/TextArea/index.d.ts.map +1 -0
- package/dist/components/TextField/TextField.d.ts +10 -0
- package/dist/components/TextField/TextField.d.ts.map +1 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextField/index.d.ts.map +1 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.ts +7 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.ts.map +1 -0
- package/dist/components/ThemeToggle/index.d.ts +2 -0
- package/dist/components/ThemeToggle/index.d.ts.map +1 -0
- package/dist/{Typography.d.ts → components/Typography/Typography.d.ts} +10 -13
- package/dist/components/Typography/Typography.d.ts.map +1 -0
- package/dist/components/Typography/index.d.ts +2 -0
- package/dist/components/Typography/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/config/index.d.ts +34 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/index.d.ts +5 -563
- package/dist/index.d.ts.map +1 -0
- package/dist/utils/axios.d.ts +1 -7
- package/dist/utils/axios.d.ts.map +1 -0
- package/dist/utils/formHelpers.d.ts +19 -0
- package/dist/utils/formHelpers.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +33 -33
- package/dist/Button.d.ts +0 -54
- package/dist/Card.d.ts +0 -44
- package/dist/Checkbox.d.ts +0 -33
- package/dist/DatePicker.d.ts +0 -68
- package/dist/Form.d.ts +0 -250
- package/dist/OTPField.d.ts +0 -17
- package/dist/PasswordField.d.ts +0 -20
- package/dist/PhoneField.d.ts +0 -24
- package/dist/Progress.d.ts +0 -7
- package/dist/Skeleton.d.ts +0 -6
- package/dist/Spinner.d.ts +0 -14
- package/dist/TextArea.d.ts +0 -11
- package/dist/TextField.d.ts +0 -13
- package/dist/ThemeToggle.d.ts +0 -10
- package/dist/axios.d.ts +0 -28
- package/dist/components/Button.d.ts +0 -9
- package/dist/components/Card.d.ts +0 -9
- package/dist/components/Checkbox.d.ts +0 -9
- package/dist/components/DatePicker.d.ts +0 -9
- package/dist/components/Form.d.ts +0 -9
- package/dist/components/OTPField.d.ts +0 -9
- package/dist/components/PasswordField.d.ts +0 -9
- package/dist/components/PhoneField.d.ts +0 -9
- package/dist/components/Progress.d.ts +0 -9
- package/dist/components/Skeleton.d.ts +0 -9
- package/dist/components/Spinner.d.ts +0 -9
- package/dist/components/TextArea.d.ts +0 -9
- package/dist/components/TextField.d.ts +0 -9
- package/dist/components/ThemeToggle.d.ts +0 -9
- package/dist/components/Typography.d.ts +0 -9
- package/dist/shadcn/shadcnField.d.ts +0 -8
- package/dist/shadcnField.d.ts +0 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.4",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"sideEffects": false,
|
|
11
11
|
"repository": {
|
|
@@ -37,71 +37,71 @@
|
|
|
37
37
|
"import": "./dist/index.js"
|
|
38
38
|
},
|
|
39
39
|
"./Button": {
|
|
40
|
-
"types": "./dist/Button.d.ts",
|
|
40
|
+
"types": "./dist/components/Button/index.d.ts",
|
|
41
41
|
"import": "./dist/components/Button.js"
|
|
42
42
|
},
|
|
43
43
|
"./Card": {
|
|
44
|
-
"types": "./dist/Card.d.ts",
|
|
44
|
+
"types": "./dist/components/Card/index.d.ts",
|
|
45
45
|
"import": "./dist/components/Card.js"
|
|
46
46
|
},
|
|
47
47
|
"./TextField": {
|
|
48
|
-
"types": "./dist/TextField.d.ts",
|
|
48
|
+
"types": "./dist/components/TextField/index.d.ts",
|
|
49
49
|
"import": "./dist/components/TextField.js"
|
|
50
50
|
},
|
|
51
51
|
"./Typography": {
|
|
52
|
-
"types": "./dist/Typography.d.ts",
|
|
52
|
+
"types": "./dist/components/Typography/index.d.ts",
|
|
53
53
|
"import": "./dist/components/Typography.js"
|
|
54
54
|
},
|
|
55
55
|
"./ThemeToggle": {
|
|
56
|
-
"types": "./dist/ThemeToggle.d.ts",
|
|
56
|
+
"types": "./dist/components/ThemeToggle/index.d.ts",
|
|
57
57
|
"import": "./dist/components/ThemeToggle.js"
|
|
58
58
|
},
|
|
59
59
|
"./Checkbox": {
|
|
60
|
-
"types": "./dist/Checkbox.d.ts",
|
|
60
|
+
"types": "./dist/components/Checkbox/index.d.ts",
|
|
61
61
|
"import": "./dist/components/Checkbox.js"
|
|
62
62
|
},
|
|
63
63
|
"./PasswordField": {
|
|
64
|
-
"types": "./dist/PasswordField.d.ts",
|
|
64
|
+
"types": "./dist/components/PasswordField/index.d.ts",
|
|
65
65
|
"import": "./dist/components/PasswordField.js"
|
|
66
66
|
},
|
|
67
67
|
"./PhoneField": {
|
|
68
|
-
"types": "./dist/PhoneField.d.ts",
|
|
68
|
+
"types": "./dist/components/PhoneField/index.d.ts",
|
|
69
69
|
"import": "./dist/components/PhoneField.js"
|
|
70
70
|
},
|
|
71
71
|
"./Progress": {
|
|
72
|
-
"types": "./dist/Progress.d.ts",
|
|
72
|
+
"types": "./dist/components/Progress/index.d.ts",
|
|
73
73
|
"import": "./dist/components/Progress.js"
|
|
74
74
|
},
|
|
75
75
|
"./OTPField": {
|
|
76
|
-
"types": "./dist/OTPField.d.ts",
|
|
76
|
+
"types": "./dist/components/OTPField/index.d.ts",
|
|
77
77
|
"import": "./dist/components/OTPField.js"
|
|
78
78
|
},
|
|
79
79
|
"./TextArea": {
|
|
80
|
-
"types": "./dist/TextArea.d.ts",
|
|
80
|
+
"types": "./dist/components/TextArea/index.d.ts",
|
|
81
81
|
"import": "./dist/components/TextArea.js"
|
|
82
82
|
},
|
|
83
83
|
"./Form": {
|
|
84
|
-
"types": "./dist/Form.d.ts",
|
|
84
|
+
"types": "./dist/components/Form/index.d.ts",
|
|
85
85
|
"import": "./dist/components/Form.js"
|
|
86
86
|
},
|
|
87
87
|
"./DatePicker": {
|
|
88
|
-
"types": "./dist/DatePicker.d.ts",
|
|
88
|
+
"types": "./dist/components/DatePicker/index.d.ts",
|
|
89
89
|
"import": "./dist/components/DatePicker.js"
|
|
90
90
|
},
|
|
91
91
|
"./Skeleton": {
|
|
92
|
-
"types": "./dist/Skeleton.d.ts",
|
|
92
|
+
"types": "./dist/components/Skeleton/index.d.ts",
|
|
93
93
|
"import": "./dist/components/Skeleton.js"
|
|
94
94
|
},
|
|
95
95
|
"./Spinner": {
|
|
96
|
-
"types": "./dist/Spinner.d.ts",
|
|
96
|
+
"types": "./dist/components/Spinner/index.d.ts",
|
|
97
97
|
"import": "./dist/components/Spinner.js"
|
|
98
98
|
},
|
|
99
99
|
"./Field": {
|
|
100
|
-
"types": "./dist/Field.d.ts",
|
|
100
|
+
"types": "./dist/components/Field/index.d.ts",
|
|
101
101
|
"import": "./dist/shadcn/shadcnField.js"
|
|
102
102
|
},
|
|
103
103
|
"./axios": {
|
|
104
|
-
"types": "./dist/axios.d.ts",
|
|
104
|
+
"types": "./dist/utils/axios.d.ts",
|
|
105
105
|
"import": "./dist/utils/axios.js"
|
|
106
106
|
},
|
|
107
107
|
"./index.css": "./dist/assets/quantum-ui.css"
|
|
@@ -109,20 +109,6 @@
|
|
|
109
109
|
"files": [
|
|
110
110
|
"dist"
|
|
111
111
|
],
|
|
112
|
-
"scripts": {
|
|
113
|
-
"dev": "vite",
|
|
114
|
-
"build": "vite build",
|
|
115
|
-
"build:js": "vite build",
|
|
116
|
-
"build:types": "tsc --project tsconfig.lib.json --emitDeclarationOnly",
|
|
117
|
-
"build:watch": "npm run build:types && vite build --watch",
|
|
118
|
-
"check": "biome check --write .",
|
|
119
|
-
"format": "biome format --write .",
|
|
120
|
-
"lint": "biome lint .",
|
|
121
|
-
"preview": "vite preview",
|
|
122
|
-
"storybook": "storybook dev -p 6006",
|
|
123
|
-
"build-storybook": "storybook build",
|
|
124
|
-
"build-storybook:github": "NODE_ENV=production storybook build"
|
|
125
|
-
},
|
|
126
112
|
"peerDependencies": {
|
|
127
113
|
"@tanstack/react-query": "^5.0.0",
|
|
128
114
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -180,5 +166,19 @@
|
|
|
180
166
|
"react-phone-number-input": "^3.4.12",
|
|
181
167
|
"tailwind-merge": "^3.3.1",
|
|
182
168
|
"zod": "^4.1.12"
|
|
169
|
+
},
|
|
170
|
+
"scripts": {
|
|
171
|
+
"dev": "vite",
|
|
172
|
+
"build": "vite build",
|
|
173
|
+
"build:js": "vite build",
|
|
174
|
+
"build:types": "tsc --project tsconfig.lib.json --emitDeclarationOnly",
|
|
175
|
+
"build:watch": "npm run build:types && vite build --watch",
|
|
176
|
+
"check": "biome check --write .",
|
|
177
|
+
"format": "biome format --write .",
|
|
178
|
+
"lint": "biome lint .",
|
|
179
|
+
"preview": "vite preview",
|
|
180
|
+
"storybook": "storybook dev -p 6006",
|
|
181
|
+
"build-storybook": "storybook build",
|
|
182
|
+
"build-storybook:github": "NODE_ENV=production storybook build"
|
|
183
183
|
}
|
|
184
|
-
}
|
|
184
|
+
}
|
package/dist/Button.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React_2 from 'react';
|
|
2
|
-
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
export declare const Button: React_2.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React_2.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
|
|
6
|
-
declare function Button_2({
|
|
7
|
-
className,
|
|
8
|
-
variant,
|
|
9
|
-
size,
|
|
10
|
-
asChild = false,
|
|
11
|
-
...props
|
|
12
|
-
}: React_2.ComponentProps<'button'> &
|
|
13
|
-
VariantProps<typeof buttonVariants> & {
|
|
14
|
-
asChild?: boolean;
|
|
15
|
-
}) {
|
|
16
|
-
const Comp = asChild ? Slot : 'button';
|
|
17
|
-
|
|
18
|
-
return <Comp data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props} />;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export declare interface ButtonProps extends React_2.ComponentProps<typeof Button_2> {
|
|
22
|
-
isLoading?: boolean;
|
|
23
|
-
loadingText?: string;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export declare const buttonVariants = cva(
|
|
27
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
28
|
-
{
|
|
29
|
-
variants: {
|
|
30
|
-
variant: {
|
|
31
|
-
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
32
|
-
destructive:
|
|
33
|
-
'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
34
|
-
outline:
|
|
35
|
-
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
36
|
-
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
37
|
-
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
38
|
-
link: 'text-primary underline-offset-4 hover:underline',
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
42
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
43
|
-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
44
|
-
icon: 'size-9',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
defaultVariants: {
|
|
48
|
-
variant: 'default',
|
|
49
|
-
size: 'default',
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export { }
|
package/dist/Card.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type * as React_2 from 'react';
|
|
2
|
-
|
|
3
|
-
export declare function Card({ className, ...props }: React_2.ComponentProps<'div'>) {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
data-slot="card"
|
|
7
|
-
className={cn('bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm', className)}
|
|
8
|
-
{...props}
|
|
9
|
-
/>
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export declare function CardContent({ className, ...props }: React_2.ComponentProps<'div'>) {
|
|
14
|
-
return <div data-slot="card-content" className={cn('px-6', className)} {...props} />;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export declare function CardDescription({ className, ...props }: React_2.ComponentProps<'div'>) {
|
|
18
|
-
return <div data-slot="card-description" className={cn('text-muted-foreground text-sm', className)} {...props} />;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export declare function CardFooter({ className, ...props }: React_2.ComponentProps<'div'>) {
|
|
22
|
-
return (
|
|
23
|
-
<div data-slot="card-footer" className={cn('flex items-center px-6 [.border-t]:pt-6', className)} {...props} />
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export declare function CardHeader({ className, ...props }: React_2.ComponentProps<'div'>) {
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
data-slot="card-header"
|
|
31
|
-
className={cn(
|
|
32
|
-
'@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6',
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
35
|
-
{...props}
|
|
36
|
-
/>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export declare function CardTitle({ className, ...props }: React_2.ComponentProps<'div'>) {
|
|
41
|
-
return <div data-slot="card-title" className={cn('leading-none font-semibold', className)} {...props} />;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { }
|
package/dist/Checkbox.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
2
|
-
import { default as default_2 } from 'react';
|
|
3
|
-
import type * as React_2 from 'react';
|
|
4
|
-
|
|
5
|
-
export declare const Checkbox: default_2.ForwardRefExoticComponent<CheckboxProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
6
|
-
|
|
7
|
-
declare function Checkbox_2({ className, ...props }: React_2.ComponentProps<typeof CheckboxPrimitive.Root>) {
|
|
8
|
-
return (
|
|
9
|
-
<CheckboxPrimitive.Root
|
|
10
|
-
data-slot="checkbox"
|
|
11
|
-
className={cn(
|
|
12
|
-
'peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',
|
|
13
|
-
className,
|
|
14
|
-
)}
|
|
15
|
-
{...props}
|
|
16
|
-
>
|
|
17
|
-
<CheckboxPrimitive.Indicator
|
|
18
|
-
data-slot="checkbox-indicator"
|
|
19
|
-
className="grid place-content-center text-current transition-none"
|
|
20
|
-
>
|
|
21
|
-
<CheckIcon className="size-3.5" />
|
|
22
|
-
</CheckboxPrimitive.Indicator>
|
|
23
|
-
</CheckboxPrimitive.Root>
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare interface CheckboxProps extends default_2.ComponentPropsWithoutRef<typeof Checkbox_2> {
|
|
28
|
-
label?: default_2.ReactNode;
|
|
29
|
-
description?: default_2.ReactNode;
|
|
30
|
-
error?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export { }
|
package/dist/DatePicker.d.ts
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { DayPicker } from 'react-day-picker';
|
|
2
|
-
import * as React_2 from 'react';
|
|
3
|
-
import { VariantProps } from 'class-variance-authority';
|
|
4
|
-
|
|
5
|
-
declare function Button({
|
|
6
|
-
className,
|
|
7
|
-
variant,
|
|
8
|
-
size,
|
|
9
|
-
asChild = false,
|
|
10
|
-
...props
|
|
11
|
-
}: React_2.ComponentProps<'button'> &
|
|
12
|
-
VariantProps<typeof buttonVariants> & {
|
|
13
|
-
asChild?: boolean;
|
|
14
|
-
}) {
|
|
15
|
-
const Comp = asChild ? Slot : 'button';
|
|
16
|
-
|
|
17
|
-
return <Comp data-slot="button" className={cn(buttonVariants({ variant, size, className }))} {...props} />;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare const buttonVariants = cva(
|
|
21
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
22
|
-
{
|
|
23
|
-
variants: {
|
|
24
|
-
variant: {
|
|
25
|
-
default: 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',
|
|
26
|
-
destructive:
|
|
27
|
-
'bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',
|
|
28
|
-
outline:
|
|
29
|
-
'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',
|
|
30
|
-
secondary: 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',
|
|
31
|
-
ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',
|
|
32
|
-
link: 'text-primary underline-offset-4 hover:underline',
|
|
33
|
-
},
|
|
34
|
-
size: {
|
|
35
|
-
default: 'h-9 px-4 py-2 has-[>svg]:px-3',
|
|
36
|
-
sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',
|
|
37
|
-
lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',
|
|
38
|
-
icon: 'size-9',
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
defaultVariants: {
|
|
42
|
-
variant: 'default',
|
|
43
|
-
size: 'default',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
declare type CalendarProps = React_2.ComponentProps<typeof DayPicker> & {
|
|
49
|
-
buttonVariant?: React_2.ComponentProps<typeof Button>['variant'];
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export declare const DatePicker: React_2.ForwardRefExoticComponent<DatePickerProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
53
|
-
|
|
54
|
-
export declare interface DatePickerProps {
|
|
55
|
-
label?: string;
|
|
56
|
-
description?: React_2.ReactNode;
|
|
57
|
-
error?: string;
|
|
58
|
-
placeholder?: string;
|
|
59
|
-
value?: Date;
|
|
60
|
-
onValueChange?: (date: Date | undefined) => void;
|
|
61
|
-
open?: boolean;
|
|
62
|
-
onOpenChange?: (open: boolean) => void;
|
|
63
|
-
calendarProps?: CalendarProps;
|
|
64
|
-
className?: string;
|
|
65
|
-
id?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export { }
|
package/dist/Form.d.ts
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
import { Controller } from 'react-hook-form';
|
|
2
|
-
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import { JSX } from 'react/jsx-runtime';
|
|
4
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
-
import * as React_2 from 'react';
|
|
6
|
-
import { UseFormReturn } from 'react-hook-form';
|
|
7
|
-
import { UseMutationResult } from '@tanstack/react-query';
|
|
8
|
-
import { VariantProps } from 'class-variance-authority';
|
|
9
|
-
|
|
10
|
-
export { Controller }
|
|
11
|
-
|
|
12
|
-
export declare function Field({
|
|
13
|
-
className,
|
|
14
|
-
orientation = 'vertical',
|
|
15
|
-
...props
|
|
16
|
-
}: React.ComponentProps<'div'> & VariantProps<typeof fieldVariants>) {
|
|
17
|
-
return (
|
|
18
|
-
<div
|
|
19
|
-
role="group"
|
|
20
|
-
data-slot="field"
|
|
21
|
-
data-orientation={orientation}
|
|
22
|
-
className={cn(fieldVariants({ orientation }), className)}
|
|
23
|
-
{...props}
|
|
24
|
-
/>
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export declare function FieldContent({ className, ...props }: React.ComponentProps<'div'>) {
|
|
29
|
-
return (
|
|
30
|
-
<div
|
|
31
|
-
data-slot="field-content"
|
|
32
|
-
className={cn('group/field-content flex flex-1 flex-col gap-1.5 leading-snug', className)}
|
|
33
|
-
{...props}
|
|
34
|
-
/>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export declare function FieldDescription({ className, ...props }: React.ComponentProps<'p'>) {
|
|
39
|
-
return (
|
|
40
|
-
<p
|
|
41
|
-
data-slot="field-description"
|
|
42
|
-
className={cn(
|
|
43
|
-
'text-muted-foreground text-sm leading-normal font-normal group-has-[[data-orientation=horizontal]]/field:text-balance',
|
|
44
|
-
'last:mt-0 nth-last-2:-mt-1 [[data-variant=legend]+&]:-mt-1.5',
|
|
45
|
-
'[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4',
|
|
46
|
-
className,
|
|
47
|
-
)}
|
|
48
|
-
{...props}
|
|
49
|
-
/>
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export declare function FieldError({
|
|
54
|
-
className,
|
|
55
|
-
children,
|
|
56
|
-
errors,
|
|
57
|
-
...props
|
|
58
|
-
}: React.ComponentProps<'div'> & {
|
|
59
|
-
errors?: Array<{ message?: string } | undefined>;
|
|
60
|
-
}) {
|
|
61
|
-
const content = useMemo(() => {
|
|
62
|
-
if (children) {
|
|
63
|
-
return children;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (!errors?.length) {
|
|
67
|
-
return null;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (errors?.length === 1) {
|
|
71
|
-
return errors[0]?.message;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
return (
|
|
75
|
-
<ul className="ml-4 flex list-disc flex-col gap-1">
|
|
76
|
-
{errors.map((error) => error?.message && <li key={error.message}>{error.message}</li>)}
|
|
77
|
-
</ul>
|
|
78
|
-
);
|
|
79
|
-
}, [children, errors]);
|
|
80
|
-
|
|
81
|
-
if (!content) {
|
|
82
|
-
return null;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
return (
|
|
86
|
-
<div
|
|
87
|
-
role="alert"
|
|
88
|
-
data-slot="field-error"
|
|
89
|
-
className={cn('text-destructive text-sm font-normal', className)}
|
|
90
|
-
{...props}
|
|
91
|
-
>
|
|
92
|
-
{content}
|
|
93
|
-
</div>
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export declare function FieldGroup({ className, ...props }: React.ComponentProps<'div'>) {
|
|
98
|
-
return (
|
|
99
|
-
<div
|
|
100
|
-
data-slot="field-group"
|
|
101
|
-
className={cn(
|
|
102
|
-
'group/field-group @container/field-group flex w-full flex-col gap-2 data-[slot=checkbox-group]:gap-1 [&>[data-slot=field-group]]:gap-2',
|
|
103
|
-
className,
|
|
104
|
-
)}
|
|
105
|
-
{...props}
|
|
106
|
-
/>
|
|
107
|
-
);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export declare function FieldLabel({ className, ...props }: React.ComponentProps<typeof Label>) {
|
|
111
|
-
return (
|
|
112
|
-
<Label
|
|
113
|
-
data-slot="field-label"
|
|
114
|
-
className={cn(
|
|
115
|
-
'group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50',
|
|
116
|
-
'has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border [&>*]:data-[slot=field]:p-4',
|
|
117
|
-
'has-data-[state=checked]:bg-primary/5 has-data-[state=checked]:border-primary dark:has-data-[state=checked]:bg-primary/10',
|
|
118
|
-
className,
|
|
119
|
-
)}
|
|
120
|
-
{...props}
|
|
121
|
-
/>
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export declare function FieldLegend({
|
|
126
|
-
className,
|
|
127
|
-
variant = 'legend',
|
|
128
|
-
...props
|
|
129
|
-
}: React.ComponentProps<'legend'> & { variant?: 'legend' | 'label' }) {
|
|
130
|
-
return (
|
|
131
|
-
<legend
|
|
132
|
-
data-slot="field-legend"
|
|
133
|
-
data-variant={variant}
|
|
134
|
-
className={cn('mb-3 font-medium', 'data-[variant=legend]:text-base', 'data-[variant=label]:text-sm', className)}
|
|
135
|
-
{...props}
|
|
136
|
-
/>
|
|
137
|
-
);
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
declare interface FieldMapping {
|
|
141
|
-
[apiField: string]: string;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
export declare function FieldSeparator({
|
|
145
|
-
children,
|
|
146
|
-
className,
|
|
147
|
-
...props
|
|
148
|
-
}: React.ComponentProps<'div'> & {
|
|
149
|
-
children?: React.ReactNode;
|
|
150
|
-
}) {
|
|
151
|
-
return (
|
|
152
|
-
<div
|
|
153
|
-
data-slot="field-separator"
|
|
154
|
-
data-content={!!children}
|
|
155
|
-
className={cn('relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2', className)}
|
|
156
|
-
{...props}
|
|
157
|
-
>
|
|
158
|
-
<Separator className="absolute inset-0 top-1/2" />
|
|
159
|
-
{children && (
|
|
160
|
-
<span
|
|
161
|
-
className="bg-background text-muted-foreground relative mx-auto block w-fit px-2"
|
|
162
|
-
data-slot="field-separator-content"
|
|
163
|
-
>
|
|
164
|
-
{children}
|
|
165
|
-
</span>
|
|
166
|
-
)}
|
|
167
|
-
</div>
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export declare function FieldSet({ className, ...props }: React.ComponentProps<'fieldset'>) {
|
|
172
|
-
return (
|
|
173
|
-
<fieldset
|
|
174
|
-
data-slot="field-set"
|
|
175
|
-
className={cn(
|
|
176
|
-
'flex flex-col gap-4',
|
|
177
|
-
'has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3',
|
|
178
|
-
className,
|
|
179
|
-
)}
|
|
180
|
-
{...props}
|
|
181
|
-
/>
|
|
182
|
-
);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export declare function FieldTitle({ className, ...props }: React.ComponentProps<'div'>) {
|
|
186
|
-
return (
|
|
187
|
-
<div
|
|
188
|
-
data-slot="field-label"
|
|
189
|
-
className={cn(
|
|
190
|
-
'flex w-fit items-center gap-2 text-sm leading-snug font-medium group-data-[disabled=true]/field:opacity-50',
|
|
191
|
-
className,
|
|
192
|
-
)}
|
|
193
|
-
{...props}
|
|
194
|
-
/>
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
declare const fieldVariants = cva('group/field flex w-full gap-2 data-[invalid=true]:text-destructive', {
|
|
199
|
-
variants: {
|
|
200
|
-
orientation: {
|
|
201
|
-
vertical: ['flex-col [&>*]:w-full [&>.sr-only]:w-auto'],
|
|
202
|
-
horizontal: [
|
|
203
|
-
'flex-row items-center',
|
|
204
|
-
'[&>[data-slot=field-label]]:flex-auto',
|
|
205
|
-
'has-[>[data-slot=field-content]]:items-start has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
206
|
-
],
|
|
207
|
-
responsive: [
|
|
208
|
-
'flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto',
|
|
209
|
-
'@md/field-group:[&>[data-slot=field-label]]:flex-auto',
|
|
210
|
-
'@md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px',
|
|
211
|
-
],
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
defaultVariants: {
|
|
215
|
-
orientation: 'vertical',
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
export declare function Form<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = TFieldValues, TMutationData = unknown, TMutationError = Error, TMutationVariables = any>({ form, onSubmit, children, showRootError, rootErrorPosition, rootErrorClassName, fieldMapping, mutation, transformSubmit, ...props }: FormProps<TFieldValues, TContext, TTransformedValues, TMutationData, TMutationError, TMutationVariables>): JSX.Element;
|
|
220
|
-
|
|
221
|
-
export declare namespace Form {
|
|
222
|
-
var displayName: string;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
export declare interface FormProps<TFieldValues extends FieldValues = FieldValues, TContext = any, TTransformedValues extends FieldValues | undefined = TFieldValues, TMutationData = unknown, TMutationError = Error, TMutationVariables = any> extends Omit<React_2.FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> {
|
|
226
|
-
form: UseFormReturn<TFieldValues, TContext, TTransformedValues>;
|
|
227
|
-
onSubmit?: Parameters<UseFormReturn<TFieldValues, TContext, TTransformedValues>['handleSubmit']>[0];
|
|
228
|
-
children: React_2.ReactNode;
|
|
229
|
-
showRootError?: boolean;
|
|
230
|
-
rootErrorPosition?: 'top' | 'bottom';
|
|
231
|
-
rootErrorClassName?: string;
|
|
232
|
-
fieldMapping?: FieldMapping;
|
|
233
|
-
mutation?: UseMutationResult<TMutationData, TMutationError, TMutationVariables, unknown>;
|
|
234
|
-
transformSubmit?: (data: TTransformedValues extends undefined ? TFieldValues : TTransformedValues) => TMutationVariables;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
declare function Label({ className, ...props }: React_2.ComponentProps<typeof LabelPrimitive.Root>) {
|
|
238
|
-
return (
|
|
239
|
-
<LabelPrimitive.Root
|
|
240
|
-
data-slot="label"
|
|
241
|
-
className={cn(
|
|
242
|
-
'flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50',
|
|
243
|
-
className,
|
|
244
|
-
)}
|
|
245
|
-
{...props}
|
|
246
|
-
/>
|
|
247
|
-
);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export { }
|
package/dist/OTPField.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { default as default_2 } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const OTPField: default_2.ForwardRefExoticComponent<OTPFieldProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
4
|
-
|
|
5
|
-
export declare interface OTPFieldProps {
|
|
6
|
-
value: string;
|
|
7
|
-
onChange: (value: string) => void;
|
|
8
|
-
length?: number;
|
|
9
|
-
label?: string;
|
|
10
|
-
description?: default_2.ReactNode;
|
|
11
|
-
error?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
required?: boolean;
|
|
14
|
-
className?: string;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export { }
|
package/dist/PasswordField.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { default as default_2 } from 'react';
|
|
2
|
-
|
|
3
|
-
export declare const PasswordField: default_2.ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & default_2.RefAttributes<HTMLInputElement>>;
|
|
4
|
-
|
|
5
|
-
declare interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'endAdornment'> {
|
|
6
|
-
showStrengthIndicator?: boolean;
|
|
7
|
-
showMatchIndicator?: boolean;
|
|
8
|
-
matchPassword?: string;
|
|
9
|
-
toggleAriaLabel?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare interface TextFieldProps extends default_2.ComponentProps<'input'> {
|
|
13
|
-
label?: string;
|
|
14
|
-
description?: default_2.ReactNode;
|
|
15
|
-
error?: string;
|
|
16
|
-
startAdornment?: default_2.ReactNode;
|
|
17
|
-
endAdornment?: default_2.ReactNode;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { }
|
package/dist/PhoneField.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Country } from 'react-phone-number-input';
|
|
2
|
-
import { default as default_2 } from 'react';
|
|
3
|
-
import { isValidPhoneNumber } from 'react-phone-number-input';
|
|
4
|
-
import { Value as PhoneValue } from 'react-phone-number-input';
|
|
5
|
-
|
|
6
|
-
export { isValidPhoneNumber }
|
|
7
|
-
|
|
8
|
-
export declare const PhoneField: default_2.ForwardRefExoticComponent<PhoneFieldProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
9
|
-
|
|
10
|
-
export declare interface PhoneFieldProps {
|
|
11
|
-
value?: PhoneValue;
|
|
12
|
-
onChange: (value: PhoneValue | undefined) => void;
|
|
13
|
-
defaultCountry?: Country;
|
|
14
|
-
label?: string;
|
|
15
|
-
description?: default_2.ReactNode;
|
|
16
|
-
error?: string;
|
|
17
|
-
disabled?: boolean;
|
|
18
|
-
className?: string;
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { PhoneValue }
|
|
23
|
-
|
|
24
|
-
export { }
|
package/dist/Progress.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ForwardRefExoticComponent } from 'react';
|
|
2
|
-
import { ProgressProps } from '@radix-ui/react-progress';
|
|
3
|
-
import { RefAttributes } from 'react';
|
|
4
|
-
|
|
5
|
-
export declare const Progress: ForwardRefExoticComponent<Omit<ProgressProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLDivElement>>;
|
|
6
|
-
|
|
7
|
-
export { }
|