@alpic-ai/ui 0.0.0-dev.fffc79a → 0.0.0-dev.g01173d7
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/accordion-card.d.mts +4 -5
- package/dist/components/accordion.d.mts +4 -5
- package/dist/components/alert.d.mts +6 -8
- package/dist/components/attachment-tile.d.mts +1 -3
- package/dist/components/avatar.d.mts +5 -7
- package/dist/components/badge.d.mts +2 -4
- package/dist/components/breadcrumb.d.mts +8 -9
- package/dist/components/button.d.mts +2 -4
- package/dist/components/card.d.mts +7 -8
- package/dist/components/checkbox.d.mts +1 -2
- package/dist/components/collapsible.d.mts +3 -4
- package/dist/components/combobox.d.mts +12 -11
- package/dist/components/combobox.mjs +7 -4
- package/dist/components/command.d.mts +8 -9
- package/dist/components/copyable.d.mts +2 -3
- package/dist/components/description-list.d.mts +4 -5
- package/dist/components/dialog.d.mts +12 -14
- package/dist/components/dropdown-menu.d.mts +14 -16
- package/dist/components/form.d.mts +68 -16
- package/dist/components/form.mjs +114 -4
- package/dist/components/github-button.d.mts +1 -2
- package/dist/components/input-group.d.mts +4 -6
- package/dist/components/input.d.mts +1 -2
- package/dist/components/label.d.mts +1 -2
- package/dist/components/page-loader.d.mts +1 -3
- package/dist/components/pagination.d.mts +1 -2
- package/dist/components/popover.d.mts +4 -5
- package/dist/components/radio-group.d.mts +2 -3
- package/dist/components/scroll-area.d.mts +2 -3
- package/dist/components/select-trigger-variants.d.mts +1 -3
- package/dist/components/select.d.mts +8 -9
- package/dist/components/separator.d.mts +1 -2
- package/dist/components/sheet.d.mts +9 -10
- package/dist/components/shimmer-text.d.mts +10 -0
- package/dist/components/shimmer-text.mjs +22 -0
- package/dist/components/sidebar.d.mts +23 -25
- package/dist/components/skeleton.d.mts +2 -4
- package/dist/components/sonner.d.mts +2 -3
- package/dist/components/spinner.d.mts +3 -5
- package/dist/components/status-dot.d.mts +2 -4
- package/dist/components/switch.d.mts +1 -2
- package/dist/components/table.d.mts +8 -9
- package/dist/components/table.mjs +3 -3
- package/dist/components/tabs.d.mts +9 -11
- package/dist/components/tabs.mjs +4 -4
- package/dist/components/tag.d.mts +3 -5
- package/dist/components/task-progress.d.mts +25 -0
- package/dist/components/task-progress.mjs +66 -0
- package/dist/components/textarea.d.mts +1 -2
- package/dist/components/toggle-group.d.mts +3 -5
- package/dist/components/tooltip-icon-button.d.mts +1 -2
- package/dist/components/tooltip.d.mts +4 -5
- package/dist/components/tooltip.mjs +1 -1
- package/dist/components/typography.d.mts +4 -5
- package/dist/components/wizard.d.mts +33 -0
- package/dist/components/wizard.mjs +46 -0
- package/package.json +13 -13
- package/src/components/combobox.tsx +9 -2
- package/src/components/form.tsx +164 -3
- package/src/components/shimmer-text.tsx +23 -0
- package/src/components/table.tsx +2 -3
- package/src/components/tabs.tsx +4 -4
- package/src/components/task-progress.tsx +107 -0
- package/src/components/tooltip.tsx +1 -1
- package/src/components/wizard.tsx +69 -0
- package/src/stories/form.stories.tsx +64 -2
- package/src/stories/tabs.stories.tsx +4 -2
- package/src/stories/task-progress.stories.tsx +81 -0
- package/src/stories/wizard.stories.tsx +64 -0
- package/src/styles/tokens.css +11 -4
|
@@ -1,30 +1,28 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
2
|
import * as React from "react";
|
|
4
3
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
4
|
|
|
7
5
|
//#region src/components/dropdown-menu.d.ts
|
|
8
6
|
declare function DropdownMenu({
|
|
9
7
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>):
|
|
8
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
11
9
|
declare function DropdownMenuPortal({
|
|
12
10
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>):
|
|
11
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
14
12
|
declare function DropdownMenuTrigger({
|
|
15
13
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>):
|
|
14
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
17
15
|
declare function DropdownMenuContent({
|
|
18
16
|
className,
|
|
19
17
|
sideOffset,
|
|
20
18
|
...props
|
|
21
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>):
|
|
19
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
22
20
|
declare function DropdownMenuGroup({
|
|
23
21
|
...props
|
|
24
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>):
|
|
22
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
25
23
|
declare const dropdownMenuItemVariants: (props?: ({
|
|
26
24
|
variant?: "default" | "destructive" | null | undefined;
|
|
27
|
-
} &
|
|
25
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
26
|
declare function DropdownMenuItem({
|
|
29
27
|
className,
|
|
30
28
|
inset,
|
|
@@ -32,30 +30,30 @@ declare function DropdownMenuItem({
|
|
|
32
30
|
...props
|
|
33
31
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & VariantProps<typeof dropdownMenuItemVariants> & {
|
|
34
32
|
inset?: boolean;
|
|
35
|
-
}):
|
|
33
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
36
34
|
declare function DropdownMenuLabel({
|
|
37
35
|
className,
|
|
38
36
|
inset,
|
|
39
37
|
...props
|
|
40
38
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
41
39
|
inset?: boolean;
|
|
42
|
-
}):
|
|
40
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
43
41
|
declare function DropdownMenuHeader({
|
|
44
42
|
className,
|
|
45
43
|
children,
|
|
46
44
|
...props
|
|
47
|
-
}: React.HTMLAttributes<HTMLDivElement>):
|
|
45
|
+
}: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
48
46
|
declare function DropdownMenuSeparator({
|
|
49
47
|
className,
|
|
50
48
|
...props
|
|
51
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>):
|
|
49
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
52
50
|
declare function DropdownMenuShortcut({
|
|
53
51
|
className,
|
|
54
52
|
...props
|
|
55
|
-
}: React.ComponentProps<"span">):
|
|
53
|
+
}: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
56
54
|
declare function DropdownMenuSub({
|
|
57
55
|
...props
|
|
58
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>):
|
|
56
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): import("react/jsx-runtime").JSX.Element;
|
|
59
57
|
declare function DropdownMenuSubTrigger({
|
|
60
58
|
className,
|
|
61
59
|
inset,
|
|
@@ -63,10 +61,10 @@ declare function DropdownMenuSubTrigger({
|
|
|
63
61
|
...props
|
|
64
62
|
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
65
63
|
inset?: boolean;
|
|
66
|
-
}):
|
|
64
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
67
65
|
declare function DropdownMenuSubContent({
|
|
68
66
|
className,
|
|
69
67
|
...props
|
|
70
|
-
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>):
|
|
68
|
+
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): import("react/jsx-runtime").JSX.Element;
|
|
71
69
|
//#endregion
|
|
72
70
|
export { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuHeader, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuItemVariants };
|
|
@@ -1,23 +1,40 @@
|
|
|
1
1
|
import { InputProps } from "./input.mjs";
|
|
2
2
|
import { Label } from "./label.mjs";
|
|
3
3
|
import { TextareaProps } from "./textarea.mjs";
|
|
4
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import * as React from "react";
|
|
6
5
|
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
-
import * as _$react_hook_form0 from "react-hook-form";
|
|
8
6
|
import { ControllerProps, FieldPath, FieldValues } from "react-hook-form";
|
|
9
7
|
|
|
10
8
|
//#region src/components/form.d.ts
|
|
11
|
-
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(
|
|
9
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>({
|
|
10
|
+
children,
|
|
11
|
+
watch,
|
|
12
|
+
getValues,
|
|
13
|
+
getFieldState,
|
|
14
|
+
setError,
|
|
15
|
+
clearErrors,
|
|
16
|
+
setValue,
|
|
17
|
+
setValues,
|
|
18
|
+
trigger,
|
|
19
|
+
formState,
|
|
20
|
+
resetField,
|
|
21
|
+
reset,
|
|
22
|
+
handleSubmit,
|
|
23
|
+
unregister,
|
|
24
|
+
control,
|
|
25
|
+
register,
|
|
26
|
+
setFocus,
|
|
27
|
+
subscribe
|
|
28
|
+
}: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
12
29
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({
|
|
13
30
|
...props
|
|
14
|
-
}: ControllerProps<TFieldValues, TName>) =>
|
|
31
|
+
}: ControllerProps<TFieldValues, TName>) => import("react/jsx-runtime").JSX.Element;
|
|
15
32
|
declare const useFormField: () => {
|
|
16
33
|
invalid: boolean;
|
|
17
34
|
isDirty: boolean;
|
|
18
35
|
isTouched: boolean;
|
|
19
36
|
isValidating: boolean;
|
|
20
|
-
error?:
|
|
37
|
+
error?: import("react-hook-form").FieldError;
|
|
21
38
|
id: string;
|
|
22
39
|
name: string;
|
|
23
40
|
formItemId: string;
|
|
@@ -27,7 +44,7 @@ declare const useFormField: () => {
|
|
|
27
44
|
declare function FormItem({
|
|
28
45
|
className,
|
|
29
46
|
...props
|
|
30
|
-
}: React.ComponentProps<"div">):
|
|
47
|
+
}: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
31
48
|
interface FormLabelProps extends React.ComponentProps<typeof Label> {
|
|
32
49
|
required?: boolean;
|
|
33
50
|
tooltip?: string;
|
|
@@ -38,18 +55,18 @@ declare function FormLabel({
|
|
|
38
55
|
tooltip,
|
|
39
56
|
children,
|
|
40
57
|
...props
|
|
41
|
-
}: FormLabelProps):
|
|
58
|
+
}: FormLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
42
59
|
declare function FormControl({
|
|
43
60
|
...props
|
|
44
|
-
}: React.ComponentProps<typeof Slot>):
|
|
61
|
+
}: React.ComponentProps<typeof Slot>): import("react/jsx-runtime").JSX.Element;
|
|
45
62
|
declare function FormDescription({
|
|
46
63
|
className,
|
|
47
64
|
...props
|
|
48
|
-
}: React.ComponentProps<"p">):
|
|
65
|
+
}: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
49
66
|
declare function FormMessage({
|
|
50
67
|
className,
|
|
51
68
|
...props
|
|
52
|
-
}: React.ComponentProps<"p">):
|
|
69
|
+
}: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
|
|
53
70
|
interface FormHeaderProps extends React.ComponentProps<"div"> {
|
|
54
71
|
title: string;
|
|
55
72
|
description?: string;
|
|
@@ -59,11 +76,11 @@ declare function FormHeader({
|
|
|
59
76
|
description,
|
|
60
77
|
className,
|
|
61
78
|
...props
|
|
62
|
-
}: FormHeaderProps):
|
|
79
|
+
}: FormHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
63
80
|
declare function FormFields({
|
|
64
81
|
className,
|
|
65
82
|
...props
|
|
66
|
-
}: React.ComponentProps<"div">):
|
|
83
|
+
}: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
67
84
|
interface FormFieldBaseProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> {
|
|
68
85
|
control: ControllerProps<TFieldValues, TName>["control"];
|
|
69
86
|
name: TName;
|
|
@@ -83,7 +100,7 @@ declare function InputField<TFieldValues extends FieldValues, TName extends Fiel
|
|
|
83
100
|
description,
|
|
84
101
|
tooltip,
|
|
85
102
|
...inputProps
|
|
86
|
-
}: InputFieldProps<TFieldValues, TName>):
|
|
103
|
+
}: InputFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
87
104
|
interface TextareaFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> extends FormFieldBaseProps<TFieldValues, TName>, Omit<TextareaProps, "name" | "label"> {}
|
|
88
105
|
declare function TextareaField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({
|
|
89
106
|
control,
|
|
@@ -94,7 +111,7 @@ declare function TextareaField<TFieldValues extends FieldValues, TName extends F
|
|
|
94
111
|
description,
|
|
95
112
|
tooltip,
|
|
96
113
|
...textareaProps
|
|
97
|
-
}: TextareaFieldProps<TFieldValues, TName>):
|
|
114
|
+
}: TextareaFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
98
115
|
interface SelectFieldOption {
|
|
99
116
|
value: string;
|
|
100
117
|
label: string;
|
|
@@ -114,6 +131,41 @@ declare function SelectField<TFieldValues extends FieldValues, TName extends Fie
|
|
|
114
131
|
tooltip,
|
|
115
132
|
options,
|
|
116
133
|
placeholder
|
|
117
|
-
}: SelectFieldProps<TFieldValues, TName>):
|
|
134
|
+
}: SelectFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
135
|
+
interface RadioFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> extends FormFieldBaseProps<TFieldValues, TName> {
|
|
136
|
+
options: SelectFieldOption[];
|
|
137
|
+
}
|
|
138
|
+
declare function RadioField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({
|
|
139
|
+
control,
|
|
140
|
+
name,
|
|
141
|
+
rules,
|
|
142
|
+
required,
|
|
143
|
+
label,
|
|
144
|
+
description,
|
|
145
|
+
tooltip,
|
|
146
|
+
options
|
|
147
|
+
}: RadioFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
148
|
+
interface ChecklistFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> extends FormFieldBaseProps<TFieldValues, TName> {
|
|
149
|
+
options: SelectFieldOption[];
|
|
150
|
+
}
|
|
151
|
+
declare function ChecklistField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({
|
|
152
|
+
control,
|
|
153
|
+
name,
|
|
154
|
+
rules,
|
|
155
|
+
required,
|
|
156
|
+
label,
|
|
157
|
+
description,
|
|
158
|
+
tooltip,
|
|
159
|
+
options
|
|
160
|
+
}: ChecklistFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
161
|
+
interface CheckboxFieldProps<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>> extends Omit<FormFieldBaseProps<TFieldValues, TName>, "required"> {}
|
|
162
|
+
declare function CheckboxField<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({
|
|
163
|
+
control,
|
|
164
|
+
name,
|
|
165
|
+
rules,
|
|
166
|
+
label,
|
|
167
|
+
description,
|
|
168
|
+
tooltip
|
|
169
|
+
}: CheckboxFieldProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
118
170
|
//#endregion
|
|
119
|
-
export { Form, FormControl, FormDescription, FormField, FormFields, FormHeader, FormItem, FormLabel, FormMessage, InputField, SelectField, type SelectFieldOption, TextareaField, useFormField };
|
|
171
|
+
export { CheckboxField, ChecklistField, Form, FormControl, FormDescription, FormField, FormFields, FormHeader, FormItem, FormLabel, FormMessage, InputField, RadioField, SelectField, type SelectFieldOption, TextareaField, useFormField };
|
package/dist/components/form.mjs
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/cn.mjs";
|
|
3
3
|
import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip.mjs";
|
|
4
|
+
import { Checkbox } from "./checkbox.mjs";
|
|
4
5
|
import { Label } from "./label.mjs";
|
|
5
6
|
import { Input } from "./input.mjs";
|
|
7
|
+
import { RadioGroup, RadioGroupItem } from "./radio-group.mjs";
|
|
6
8
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.mjs";
|
|
7
9
|
import { Textarea } from "./textarea.mjs";
|
|
8
10
|
import { Info } from "lucide-react";
|
|
@@ -88,7 +90,7 @@ function FormDescription({ className, ...props }) {
|
|
|
88
90
|
return /* @__PURE__ */ jsx("p", {
|
|
89
91
|
"data-slot": "form-description",
|
|
90
92
|
id: formDescriptionId,
|
|
91
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
93
|
+
className: cn("text-muted-foreground type-text-sm whitespace-pre-line", className),
|
|
92
94
|
...props
|
|
93
95
|
});
|
|
94
96
|
}
|
|
@@ -134,11 +136,11 @@ function InputField({ control, name, rules, required, label, description, toolti
|
|
|
134
136
|
tooltip,
|
|
135
137
|
children: label
|
|
136
138
|
}),
|
|
139
|
+
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
137
140
|
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Input, {
|
|
138
141
|
...inputProps,
|
|
139
142
|
...field
|
|
140
143
|
}) }),
|
|
141
|
-
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
142
144
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
143
145
|
] })
|
|
144
146
|
});
|
|
@@ -154,11 +156,11 @@ function TextareaField({ control, name, rules, required, label, description, too
|
|
|
154
156
|
tooltip,
|
|
155
157
|
children: label
|
|
156
158
|
}),
|
|
159
|
+
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
157
160
|
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Textarea, {
|
|
158
161
|
...textareaProps,
|
|
159
162
|
...field
|
|
160
163
|
}) }),
|
|
161
|
-
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
162
164
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
163
165
|
] })
|
|
164
166
|
});
|
|
@@ -174,6 +176,7 @@ function SelectField({ control, name, rules, required, label, description, toolt
|
|
|
174
176
|
tooltip,
|
|
175
177
|
children: label
|
|
176
178
|
}),
|
|
179
|
+
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
177
180
|
/* @__PURE__ */ jsxs(Select, {
|
|
178
181
|
value: field.value,
|
|
179
182
|
onValueChange: field.onChange,
|
|
@@ -183,10 +186,117 @@ function SelectField({ control, name, rules, required, label, description, toolt
|
|
|
183
186
|
children: option.label
|
|
184
187
|
}, option.value)) })]
|
|
185
188
|
}),
|
|
189
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
190
|
+
] })
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
function RadioField({ control, name, rules, required, label, description, tooltip, options }) {
|
|
194
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
195
|
+
control,
|
|
196
|
+
name,
|
|
197
|
+
rules,
|
|
198
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
199
|
+
label && /* @__PURE__ */ jsx(FormLabel, {
|
|
200
|
+
required,
|
|
201
|
+
tooltip,
|
|
202
|
+
children: label
|
|
203
|
+
}),
|
|
186
204
|
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
205
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(RadioGroup, {
|
|
206
|
+
value: field.value ?? "",
|
|
207
|
+
onValueChange: field.onChange,
|
|
208
|
+
onBlur: field.onBlur,
|
|
209
|
+
children: options.map((option) => {
|
|
210
|
+
const itemId = `${field.name}-${option.value}`;
|
|
211
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
212
|
+
className: "flex items-center gap-2",
|
|
213
|
+
children: [/* @__PURE__ */ jsx(RadioGroupItem, {
|
|
214
|
+
id: itemId,
|
|
215
|
+
value: option.value,
|
|
216
|
+
disabled: option.disabled
|
|
217
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
218
|
+
htmlFor: itemId,
|
|
219
|
+
className: "type-text-sm font-normal",
|
|
220
|
+
children: option.label
|
|
221
|
+
})]
|
|
222
|
+
}, option.value);
|
|
223
|
+
})
|
|
224
|
+
}) }),
|
|
187
225
|
/* @__PURE__ */ jsx(FormMessage, {})
|
|
188
226
|
] })
|
|
189
227
|
});
|
|
190
228
|
}
|
|
229
|
+
function ChecklistField({ control, name, rules, required, label, description, tooltip, options }) {
|
|
230
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
231
|
+
control,
|
|
232
|
+
name,
|
|
233
|
+
rules,
|
|
234
|
+
render: ({ field }) => {
|
|
235
|
+
const selected = Array.isArray(field.value) ? field.value : [];
|
|
236
|
+
const toggle = (value, checked) => {
|
|
237
|
+
if (checked) field.onChange([...selected, value]);
|
|
238
|
+
else field.onChange(selected.filter((existing) => existing !== value));
|
|
239
|
+
};
|
|
240
|
+
return /* @__PURE__ */ jsxs(FormItem, { children: [
|
|
241
|
+
label && /* @__PURE__ */ jsx(FormLabel, {
|
|
242
|
+
required,
|
|
243
|
+
tooltip,
|
|
244
|
+
children: label
|
|
245
|
+
}),
|
|
246
|
+
description && /* @__PURE__ */ jsx(FormDescription, { children: description }),
|
|
247
|
+
/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx("fieldset", {
|
|
248
|
+
className: "m-0 flex flex-col gap-2 border-0 p-0",
|
|
249
|
+
onBlur: field.onBlur,
|
|
250
|
+
children: options.map((option) => {
|
|
251
|
+
const itemId = `${field.name}-${option.value}`;
|
|
252
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
253
|
+
className: "flex items-start gap-2",
|
|
254
|
+
children: [/* @__PURE__ */ jsx(Checkbox, {
|
|
255
|
+
id: itemId,
|
|
256
|
+
checked: selected.includes(option.value),
|
|
257
|
+
onCheckedChange: (next) => toggle(option.value, Boolean(next)),
|
|
258
|
+
disabled: option.disabled
|
|
259
|
+
}), /* @__PURE__ */ jsx(Label, {
|
|
260
|
+
htmlFor: itemId,
|
|
261
|
+
className: "type-text-sm font-normal leading-tight",
|
|
262
|
+
children: option.label
|
|
263
|
+
})]
|
|
264
|
+
}, option.value);
|
|
265
|
+
})
|
|
266
|
+
}) }),
|
|
267
|
+
/* @__PURE__ */ jsx(FormMessage, {})
|
|
268
|
+
] });
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
function CheckboxField({ control, name, rules, label, description, tooltip }) {
|
|
273
|
+
return /* @__PURE__ */ jsx(FormField, {
|
|
274
|
+
control,
|
|
275
|
+
name,
|
|
276
|
+
rules,
|
|
277
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(FormItem, {
|
|
278
|
+
className: "gap-1.5",
|
|
279
|
+
children: [
|
|
280
|
+
/* @__PURE__ */ jsxs("div", {
|
|
281
|
+
className: "flex items-start gap-2",
|
|
282
|
+
children: [/* @__PURE__ */ jsx(FormControl, { children: /* @__PURE__ */ jsx(Checkbox, {
|
|
283
|
+
checked: field.value ?? false,
|
|
284
|
+
onCheckedChange: (next) => field.onChange(Boolean(next)),
|
|
285
|
+
onBlur: field.onBlur
|
|
286
|
+
}) }), label && /* @__PURE__ */ jsx(FormLabel, {
|
|
287
|
+
tooltip,
|
|
288
|
+
className: "font-normal",
|
|
289
|
+
children: label
|
|
290
|
+
})]
|
|
291
|
+
}),
|
|
292
|
+
description && /* @__PURE__ */ jsx(FormDescription, {
|
|
293
|
+
className: "ml-6",
|
|
294
|
+
children: description
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ jsx(FormMessage, { className: "ml-6" })
|
|
297
|
+
]
|
|
298
|
+
})
|
|
299
|
+
});
|
|
300
|
+
}
|
|
191
301
|
//#endregion
|
|
192
|
-
export { Form, FormControl, FormDescription, FormField, FormFields, FormHeader, FormItem, FormLabel, FormMessage, InputField, SelectField, TextareaField, useFormField };
|
|
302
|
+
export { CheckboxField, ChecklistField, Form, FormControl, FormDescription, FormField, FormFields, FormHeader, FormItem, FormLabel, FormMessage, InputField, RadioField, SelectField, TextareaField, useFormField };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Button } from "./button.mjs";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { ComponentProps } from "react";
|
|
4
3
|
|
|
5
4
|
//#region src/components/github-button.d.ts
|
|
@@ -8,6 +7,6 @@ declare function GitHubButton({
|
|
|
8
7
|
className,
|
|
9
8
|
children,
|
|
10
9
|
...props
|
|
11
|
-
}: GitHubButtonProps):
|
|
10
|
+
}: GitHubButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
//#endregion
|
|
13
12
|
export { GitHubButton, type GitHubButtonProps };
|
|
@@ -1,25 +1,23 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import { VariantProps } from "class-variance-authority";
|
|
3
2
|
import * as React from "react";
|
|
4
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
3
|
|
|
6
4
|
//#region src/components/input-group.d.ts
|
|
7
5
|
declare function InputGroup({
|
|
8
6
|
className,
|
|
9
7
|
children,
|
|
10
8
|
...props
|
|
11
|
-
}: React.ComponentProps<"fieldset">):
|
|
9
|
+
}: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
|
|
12
10
|
declare const inputGroupAddonVariants: (props?: ({
|
|
13
11
|
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
14
|
-
} &
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
13
|
declare function InputGroupAddon({
|
|
16
14
|
className,
|
|
17
15
|
align,
|
|
18
16
|
...props
|
|
19
|
-
}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>):
|
|
17
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
20
18
|
declare function InputGroupTextarea({
|
|
21
19
|
className,
|
|
22
20
|
...props
|
|
23
|
-
}: React.ComponentProps<"textarea">):
|
|
21
|
+
}: React.ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
|
|
24
22
|
//#endregion
|
|
25
23
|
export { InputGroup, InputGroupAddon, InputGroupTextarea };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/input.d.ts
|
|
@@ -24,6 +23,6 @@ declare function Input({
|
|
|
24
23
|
leadingIcon,
|
|
25
24
|
size,
|
|
26
25
|
...props
|
|
27
|
-
}: InputProps):
|
|
26
|
+
}: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
27
|
//#endregion
|
|
29
28
|
export { Input, type InputProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
4
3
|
|
|
@@ -6,6 +5,6 @@ import * as LabelPrimitive from "@radix-ui/react-label";
|
|
|
6
5
|
declare function Label({
|
|
7
6
|
className,
|
|
8
7
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof LabelPrimitive.Root>):
|
|
8
|
+
}: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { Label };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
-
|
|
3
1
|
//#region src/components/page-loader.d.ts
|
|
4
2
|
interface PageLoaderProps {
|
|
5
3
|
className?: string;
|
|
6
4
|
}
|
|
7
5
|
declare function PageLoader({
|
|
8
6
|
className
|
|
9
|
-
}: PageLoaderProps):
|
|
7
|
+
}: PageLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
8
|
//#endregion
|
|
11
9
|
export { PageLoader, type PageLoaderProps };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/pagination.d.ts
|
|
@@ -13,6 +12,6 @@ declare function Pagination({
|
|
|
13
12
|
onPageChange,
|
|
14
13
|
className,
|
|
15
14
|
...props
|
|
16
|
-
}: PaginationProps):
|
|
15
|
+
}: PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
16
|
//#endregion
|
|
18
17
|
export { Pagination, type PaginationProps };
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
3
|
|
|
5
4
|
//#region src/components/popover.d.ts
|
|
6
5
|
declare function Popover({
|
|
7
6
|
...props
|
|
8
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Root>):
|
|
7
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
declare function PopoverTrigger({
|
|
10
9
|
...props
|
|
11
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>):
|
|
10
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
declare function PopoverAnchor({
|
|
13
12
|
...props
|
|
14
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>):
|
|
13
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Anchor>): import("react/jsx-runtime").JSX.Element;
|
|
15
14
|
declare function PopoverContent({
|
|
16
15
|
className,
|
|
17
16
|
align,
|
|
18
17
|
sideOffset,
|
|
19
18
|
...props
|
|
20
|
-
}: React.ComponentProps<typeof PopoverPrimitive.Content>):
|
|
19
|
+
}: React.ComponentProps<typeof PopoverPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
//#endregion
|
|
22
21
|
export { Popover, PopoverAnchor, PopoverContent, PopoverTrigger };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
3
|
|
|
@@ -6,10 +5,10 @@ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
|
6
5
|
declare function RadioGroup({
|
|
7
6
|
className,
|
|
8
7
|
...props
|
|
9
|
-
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>):
|
|
8
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
10
9
|
declare function RadioGroupItem({
|
|
11
10
|
className,
|
|
12
11
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>):
|
|
12
|
+
}: React.ComponentProps<typeof RadioGroupPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
//#endregion
|
|
15
14
|
export { RadioGroup, RadioGroupItem };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
4
3
|
|
|
@@ -7,11 +6,11 @@ declare function ScrollArea({
|
|
|
7
6
|
className,
|
|
8
7
|
children,
|
|
9
8
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>):
|
|
9
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
declare function ScrollBar({
|
|
12
11
|
className,
|
|
13
12
|
orientation,
|
|
14
13
|
...props
|
|
15
|
-
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>):
|
|
14
|
+
}: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
//#endregion
|
|
17
16
|
export { ScrollArea, ScrollBar };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
2
|
-
|
|
3
1
|
//#region src/components/select-trigger-variants.d.ts
|
|
4
2
|
/**
|
|
5
3
|
* Shared trigger styles for Select and Combobox.
|
|
@@ -8,6 +6,6 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
8
6
|
*/
|
|
9
7
|
declare const selectTriggerVariants: (props?: ({
|
|
10
8
|
size?: "sm" | "md" | null | undefined;
|
|
11
|
-
} &
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
10
|
//#endregion
|
|
13
11
|
export { selectTriggerVariants };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { selectTriggerVariants } from "./select-trigger-variants.mjs";
|
|
2
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { VariantProps } from "class-variance-authority";
|
|
4
3
|
import * as React from "react";
|
|
5
4
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
@@ -7,37 +6,37 @@ import * as SelectPrimitive from "@radix-ui/react-select";
|
|
|
7
6
|
//#region src/components/select.d.ts
|
|
8
7
|
declare function Select({
|
|
9
8
|
...props
|
|
10
|
-
}: React.ComponentProps<typeof SelectPrimitive.Root>):
|
|
9
|
+
}: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
11
10
|
declare function SelectGroup({
|
|
12
11
|
...props
|
|
13
|
-
}: React.ComponentProps<typeof SelectPrimitive.Group>):
|
|
12
|
+
}: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
14
13
|
declare function SelectValue({
|
|
15
14
|
...props
|
|
16
|
-
}: React.ComponentProps<typeof SelectPrimitive.Value>):
|
|
15
|
+
}: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
17
16
|
declare function SelectTrigger({
|
|
18
17
|
className,
|
|
19
18
|
size,
|
|
20
19
|
children,
|
|
21
20
|
...props
|
|
22
|
-
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & VariantProps<typeof selectTriggerVariants>):
|
|
21
|
+
}: React.ComponentProps<typeof SelectPrimitive.Trigger> & VariantProps<typeof selectTriggerVariants>): import("react/jsx-runtime").JSX.Element;
|
|
23
22
|
declare function SelectContent({
|
|
24
23
|
className,
|
|
25
24
|
children,
|
|
26
25
|
position,
|
|
27
26
|
...props
|
|
28
|
-
}: React.ComponentProps<typeof SelectPrimitive.Content>):
|
|
27
|
+
}: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
29
28
|
declare function SelectLabel({
|
|
30
29
|
className,
|
|
31
30
|
...props
|
|
32
|
-
}: React.ComponentProps<typeof SelectPrimitive.Label>):
|
|
31
|
+
}: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
33
32
|
declare function SelectItem({
|
|
34
33
|
className,
|
|
35
34
|
children,
|
|
36
35
|
...props
|
|
37
|
-
}: React.ComponentProps<typeof SelectPrimitive.Item>):
|
|
36
|
+
}: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
38
37
|
declare function SelectSeparator({
|
|
39
38
|
className,
|
|
40
39
|
...props
|
|
41
|
-
}: React.ComponentProps<typeof SelectPrimitive.Separator>):
|
|
40
|
+
}: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
42
41
|
//#endregion
|
|
43
42
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, selectTriggerVariants };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
1
|
import * as React from "react";
|
|
3
2
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
3
|
|
|
@@ -8,6 +7,6 @@ declare function Separator({
|
|
|
8
7
|
orientation,
|
|
9
8
|
decorative,
|
|
10
9
|
...props
|
|
11
|
-
}: React.ComponentProps<typeof SeparatorPrimitive.Root>):
|
|
10
|
+
}: React.ComponentProps<typeof SeparatorPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
//#endregion
|
|
13
12
|
export { Separator };
|