@codefast/ui 0.3.15 → 0.3.16-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/components/accordion.d.mts +30 -0
- package/dist/components/accordion.mjs +15 -0
- package/dist/components/alert-dialog.d.mts +60 -0
- package/dist/components/alert-dialog.mjs +30 -0
- package/dist/components/alert.d.mts +21 -0
- package/dist/components/alert.mjs +12 -0
- package/dist/components/aspect-ratio.d.mts +6 -0
- package/dist/components/aspect-ratio.mjs +3 -0
- package/dist/components/avatar.d.mts +18 -0
- package/dist/components/avatar.mjs +9 -0
- package/dist/components/badge.d.mts +9 -0
- package/dist/components/badge.mjs +6 -0
- package/dist/components/breadcrumb.d.mts +42 -0
- package/dist/components/breadcrumb.mjs +21 -0
- package/dist/components/button-group.d.mts +21 -0
- package/dist/components/button-group.mjs +12 -0
- package/dist/components/button.d.mts +9 -0
- package/dist/components/button.mjs +6 -0
- package/dist/components/calendar.d.mts +12 -0
- package/dist/components/calendar.mjs +7 -1
- package/dist/components/card.d.mts +42 -0
- package/dist/components/card.mjs +21 -0
- package/dist/components/carousel.d.mts +33 -0
- package/dist/components/carousel.mjs +15 -0
- package/dist/components/chart.d.mts +40 -1
- package/dist/components/chart.mjs +18 -0
- package/dist/components/checkbox-cards.d.mts +12 -0
- package/dist/components/checkbox-cards.mjs +6 -0
- package/dist/components/checkbox-group.d.mts +12 -0
- package/dist/components/checkbox-group.mjs +6 -0
- package/dist/components/checkbox.d.mts +6 -0
- package/dist/components/checkbox.mjs +3 -0
- package/dist/components/collapsible.d.mts +18 -0
- package/dist/components/collapsible.mjs +9 -0
- package/dist/components/command.d.mts +60 -0
- package/dist/components/command.mjs +30 -0
- package/dist/components/context-menu.d.mts +90 -0
- package/dist/components/context-menu.mjs +45 -0
- package/dist/components/dialog.d.mts +54 -0
- package/dist/components/dialog.mjs +27 -0
- package/dist/components/drawer.d.mts +54 -0
- package/dist/components/drawer.mjs +27 -0
- package/dist/components/dropdown-menu.d.mts +90 -0
- package/dist/components/dropdown-menu.mjs +45 -0
- package/dist/components/empty.d.mts +39 -0
- package/dist/components/empty.mjs +21 -0
- package/dist/components/field.d.mts +64 -1
- package/dist/components/field.mjs +33 -0
- package/dist/components/form.d.mts +42 -0
- package/dist/components/form.mjs +21 -0
- package/dist/components/hover-card.d.mts +24 -0
- package/dist/components/hover-card.mjs +12 -0
- package/dist/components/input-group.d.mts +45 -0
- package/dist/components/input-group.mjs +27 -0
- package/dist/components/input-number.d.mts +6 -0
- package/dist/components/input-number.mjs +3 -0
- package/dist/components/input-otp.d.mts +24 -0
- package/dist/components/input-otp.mjs +12 -0
- package/dist/components/input-password.d.mts +6 -0
- package/dist/components/input-password.mjs +3 -0
- package/dist/components/input-search.d.mts +6 -0
- package/dist/components/input-search.mjs +3 -0
- package/dist/components/input.d.mts +6 -0
- package/dist/components/input.mjs +3 -0
- package/dist/components/item.d.mts +66 -0
- package/dist/components/item.mjs +36 -0
- package/dist/components/kbd.d.mts +12 -0
- package/dist/components/kbd.mjs +6 -0
- package/dist/components/label.d.mts +6 -0
- package/dist/components/label.mjs +3 -0
- package/dist/components/menubar.d.mts +96 -0
- package/dist/components/menubar.mjs +48 -0
- package/dist/components/native-select.d.mts +18 -0
- package/dist/components/native-select.mjs +9 -0
- package/dist/components/navigation-menu.d.mts +39 -0
- package/dist/components/navigation-menu.mjs +21 -0
- package/dist/components/pagination.d.mts +42 -0
- package/dist/components/pagination.mjs +21 -0
- package/dist/components/popover.d.mts +30 -0
- package/dist/components/popover.mjs +15 -0
- package/dist/components/progress-circle.d.mts +9 -0
- package/dist/components/progress-circle.mjs +6 -0
- package/dist/components/progress.d.mts +6 -0
- package/dist/components/progress.mjs +3 -0
- package/dist/components/radio-cards.d.mts +12 -0
- package/dist/components/radio-cards.mjs +6 -0
- package/dist/components/radio-group.d.mts +12 -0
- package/dist/components/radio-group.mjs +6 -0
- package/dist/components/radio.d.mts +6 -0
- package/dist/components/radio.mjs +3 -0
- package/dist/components/resizable.d.mts +18 -0
- package/dist/components/resizable.mjs +9 -0
- package/dist/components/scroll-area.d.mts +15 -0
- package/dist/components/scroll-area.mjs +9 -0
- package/dist/components/select.d.mts +60 -0
- package/dist/components/select.mjs +30 -0
- package/dist/components/separator.d.mts +15 -0
- package/dist/components/separator.mjs +9 -0
- package/dist/components/sheet.d.mts +57 -0
- package/dist/components/sheet.mjs +30 -0
- package/dist/components/sidebar.d.mts +141 -0
- package/dist/components/sidebar.mjs +72 -0
- package/dist/components/skeleton.d.mts +6 -0
- package/dist/components/skeleton.mjs +3 -0
- package/dist/components/slider.d.mts +6 -0
- package/dist/components/slider.mjs +3 -0
- package/dist/components/sonner.d.mts +6 -0
- package/dist/components/sonner.mjs +3 -0
- package/dist/components/spinner.d.mts +6 -0
- package/dist/components/spinner.mjs +3 -0
- package/dist/components/switch.d.mts +6 -0
- package/dist/components/switch.mjs +3 -0
- package/dist/components/table.d.mts +48 -0
- package/dist/components/table.mjs +24 -0
- package/dist/components/tabs.d.mts +24 -0
- package/dist/components/tabs.mjs +12 -0
- package/dist/components/textarea.d.mts +6 -0
- package/dist/components/textarea.mjs +3 -0
- package/dist/components/toggle-group.d.mts +12 -0
- package/dist/components/toggle-group.mjs +6 -0
- package/dist/components/toggle.d.mts +12 -0
- package/dist/components/toggle.mjs +6 -0
- package/dist/components/tooltip.d.mts +30 -0
- package/dist/components/tooltip.mjs +15 -0
- package/dist/hooks/use-animated-value.d.mts +2 -0
- package/dist/hooks/use-animated-value.mjs +2 -0
- package/dist/hooks/use-copy-to-clipboard.d.mts +2 -0
- package/dist/hooks/use-copy-to-clipboard.mjs +2 -0
- package/dist/hooks/use-is-mobile.d.mts +2 -0
- package/dist/hooks/use-is-mobile.mjs +2 -0
- package/dist/hooks/use-media-query.d.mts +2 -0
- package/dist/hooks/use-media-query.mjs +2 -0
- package/dist/hooks/use-mutation-observer.d.mts +2 -0
- package/dist/hooks/use-mutation-observer.mjs +2 -0
- package/dist/hooks/use-pagination.d.mts +8 -1
- package/dist/hooks/use-pagination.mjs +4 -0
- package/dist/lib/utils.d.mts +1 -1
- package/dist/primitives/checkbox-group.d.mts +15 -3
- package/dist/primitives/checkbox-group.mjs +6 -0
- package/dist/primitives/input-number.d.mts +22 -0
- package/dist/primitives/input-number.mjs +12 -0
- package/dist/primitives/input.d.mts +10 -0
- package/dist/primitives/input.mjs +6 -0
- package/dist/primitives/progress-circle.d.mts +31 -1
- package/dist/primitives/progress-circle.mjs +12 -0
- package/package.json +17 -9
|
@@ -7,37 +7,79 @@ import * as _$react_hook_form0 from "react-hook-form";
|
|
|
7
7
|
import { ControllerProps, FieldPath, FieldValues, FormProvider } from "react-hook-form";
|
|
8
8
|
|
|
9
9
|
//#region src/components/form.d.ts
|
|
10
|
+
/**
|
|
11
|
+
* @since 0.3.16-canary.0
|
|
12
|
+
*/
|
|
10
13
|
type FormProps = ComponentProps<typeof FormProvider>;
|
|
14
|
+
/**
|
|
15
|
+
* @since 0.3.16-canary.0
|
|
16
|
+
*/
|
|
11
17
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: _$react_hook_form0.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
12
18
|
type ScopedProps<P> = P & {
|
|
13
19
|
__scopeFormField?: Scope;
|
|
14
20
|
};
|
|
15
21
|
declare const createFormFieldScope: _$_radix_ui_react_context0.CreateScope;
|
|
22
|
+
/**
|
|
23
|
+
* @since 0.3.16-canary.0
|
|
24
|
+
*/
|
|
16
25
|
type FormFieldProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = ControllerProps<TFieldValues, TName>;
|
|
26
|
+
/**
|
|
27
|
+
* @since 0.3.16-canary.0
|
|
28
|
+
*/
|
|
17
29
|
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(formFieldProps: ScopedProps<FormFieldProps<TFieldValues, TName>>): JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* @since 0.3.16-canary.0
|
|
32
|
+
*/
|
|
18
33
|
type FormItemProps = ComponentProps<"div">;
|
|
34
|
+
/**
|
|
35
|
+
* @since 0.3.16-canary.0
|
|
36
|
+
*/
|
|
19
37
|
declare function FormItem({
|
|
20
38
|
__scopeFormField,
|
|
21
39
|
className,
|
|
22
40
|
...props
|
|
23
41
|
}: ScopedProps<FormItemProps>): JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* @since 0.3.16-canary.0
|
|
44
|
+
*/
|
|
24
45
|
type FormLabelProps = ComponentProps<typeof LabelPrimitive.Root>;
|
|
46
|
+
/**
|
|
47
|
+
* @since 0.3.16-canary.0
|
|
48
|
+
*/
|
|
25
49
|
declare function FormLabel({
|
|
26
50
|
__scopeFormField,
|
|
27
51
|
...props
|
|
28
52
|
}: ScopedProps<FormLabelProps>): JSX.Element;
|
|
53
|
+
/**
|
|
54
|
+
* @since 0.3.16-canary.0
|
|
55
|
+
*/
|
|
29
56
|
type FormControlProps = ComponentProps<typeof Slot>;
|
|
57
|
+
/**
|
|
58
|
+
* @since 0.3.16-canary.0
|
|
59
|
+
*/
|
|
30
60
|
declare function FormControl({
|
|
31
61
|
__scopeFormField,
|
|
32
62
|
...props
|
|
33
63
|
}: ScopedProps<FormControlProps>): JSX.Element;
|
|
64
|
+
/**
|
|
65
|
+
* @since 0.3.16-canary.0
|
|
66
|
+
*/
|
|
34
67
|
type FormDescriptionProps = ComponentProps<"p">;
|
|
68
|
+
/**
|
|
69
|
+
* @since 0.3.16-canary.0
|
|
70
|
+
*/
|
|
35
71
|
declare function FormDescription({
|
|
36
72
|
__scopeFormField,
|
|
37
73
|
className,
|
|
38
74
|
...props
|
|
39
75
|
}: ScopedProps<FormDescriptionProps>): JSX.Element;
|
|
76
|
+
/**
|
|
77
|
+
* @since 0.3.16-canary.0
|
|
78
|
+
*/
|
|
40
79
|
type FormMessageProps = ComponentProps<"p">;
|
|
80
|
+
/**
|
|
81
|
+
* @since 0.3.16-canary.0
|
|
82
|
+
*/
|
|
41
83
|
declare function FormMessage({
|
|
42
84
|
__scopeFormField,
|
|
43
85
|
children,
|
package/dist/components/form.mjs
CHANGED
|
@@ -7,6 +7,9 @@ import { useId } from "react";
|
|
|
7
7
|
import { createContextScope } from "@radix-ui/react-context";
|
|
8
8
|
import { Controller, FormProvider, useFormContext, useFormState } from "react-hook-form";
|
|
9
9
|
//#region src/components/form.tsx
|
|
10
|
+
/**
|
|
11
|
+
* @since 0.3.16-canary.0
|
|
12
|
+
*/
|
|
10
13
|
const Form = FormProvider;
|
|
11
14
|
const FORM_FIELD_NAME = "FormField";
|
|
12
15
|
const [createFormFieldContext, createFormFieldScope] = createContextScope(FORM_FIELD_NAME);
|
|
@@ -25,6 +28,9 @@ function useFormItem(consumerName, scope) {
|
|
|
25
28
|
...fieldState
|
|
26
29
|
};
|
|
27
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* @since 0.3.16-canary.0
|
|
33
|
+
*/
|
|
28
34
|
function FormField(formFieldProps) {
|
|
29
35
|
const { __scopeFormField, ...props } = formFieldProps;
|
|
30
36
|
return /* @__PURE__ */ jsx(FormFieldContextProvider, {
|
|
@@ -34,6 +40,9 @@ function FormField(formFieldProps) {
|
|
|
34
40
|
});
|
|
35
41
|
}
|
|
36
42
|
const [FormItemContextProvider, useFormItemContext] = createFormFieldContext("FormItem");
|
|
43
|
+
/**
|
|
44
|
+
* @since 0.3.16-canary.0
|
|
45
|
+
*/
|
|
37
46
|
function FormItem({ __scopeFormField, className, ...props }) {
|
|
38
47
|
return /* @__PURE__ */ jsx(FormItemContextProvider, {
|
|
39
48
|
id: useId(),
|
|
@@ -46,6 +55,9 @@ function FormItem({ __scopeFormField, className, ...props }) {
|
|
|
46
55
|
});
|
|
47
56
|
}
|
|
48
57
|
const FORM_LABEL_NAME = "FormLabel";
|
|
58
|
+
/**
|
|
59
|
+
* @since 0.3.16-canary.0
|
|
60
|
+
*/
|
|
49
61
|
function FormLabel({ __scopeFormField, ...props }) {
|
|
50
62
|
const { error, formItemId } = useFormItem(FORM_LABEL_NAME, __scopeFormField);
|
|
51
63
|
return /* @__PURE__ */ jsx(Label, {
|
|
@@ -56,6 +68,9 @@ function FormLabel({ __scopeFormField, ...props }) {
|
|
|
56
68
|
});
|
|
57
69
|
}
|
|
58
70
|
const FORM_CONTROL_NAME = "FormControl";
|
|
71
|
+
/**
|
|
72
|
+
* @since 0.3.16-canary.0
|
|
73
|
+
*/
|
|
59
74
|
function FormControl({ __scopeFormField, ...props }) {
|
|
60
75
|
const { error, formDescriptionId, formItemId, formMessageId } = useFormItem(FORM_CONTROL_NAME, __scopeFormField);
|
|
61
76
|
return /* @__PURE__ */ jsx(Slot, {
|
|
@@ -66,6 +81,9 @@ function FormControl({ __scopeFormField, ...props }) {
|
|
|
66
81
|
...props
|
|
67
82
|
});
|
|
68
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* @since 0.3.16-canary.0
|
|
86
|
+
*/
|
|
69
87
|
function FormDescription({ __scopeFormField, className, ...props }) {
|
|
70
88
|
const { formDescriptionId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);
|
|
71
89
|
return /* @__PURE__ */ jsx("p", {
|
|
@@ -76,6 +94,9 @@ function FormDescription({ __scopeFormField, className, ...props }) {
|
|
|
76
94
|
});
|
|
77
95
|
}
|
|
78
96
|
const FORM_MESSAGE_NAME = "FormMessage";
|
|
97
|
+
/**
|
|
98
|
+
* @since 0.3.16-canary.0
|
|
99
|
+
*/
|
|
79
100
|
function FormMessage({ __scopeFormField, children, className, ...props }) {
|
|
80
101
|
const { error, formMessageId } = useFormItem(FORM_MESSAGE_NAME, __scopeFormField);
|
|
81
102
|
const body = error?.message ?? children;
|
|
@@ -2,22 +2,46 @@ import { ComponentProps, JSX } from "react";
|
|
|
2
2
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
3
3
|
|
|
4
4
|
//#region src/components/hover-card.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.3.16-canary.0
|
|
7
|
+
*/
|
|
5
8
|
type HoverCardProps = ComponentProps<typeof HoverCardPrimitive.Root>;
|
|
9
|
+
/**
|
|
10
|
+
* @since 0.3.16-canary.0
|
|
11
|
+
*/
|
|
6
12
|
declare function HoverCard({
|
|
7
13
|
...props
|
|
8
14
|
}: HoverCardProps): JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* @since 0.3.16-canary.0
|
|
17
|
+
*/
|
|
9
18
|
type HoverCardTriggerProps = ComponentProps<typeof HoverCardPrimitive.Trigger>;
|
|
19
|
+
/**
|
|
20
|
+
* @since 0.3.16-canary.0
|
|
21
|
+
*/
|
|
10
22
|
declare function HoverCardTrigger({
|
|
11
23
|
...props
|
|
12
24
|
}: HoverCardTriggerProps): JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* @since 0.3.16-canary.0
|
|
27
|
+
*/
|
|
13
28
|
type HoverCardContentProps = ComponentProps<typeof HoverCardPrimitive.Content>;
|
|
29
|
+
/**
|
|
30
|
+
* @since 0.3.16-canary.0
|
|
31
|
+
*/
|
|
14
32
|
declare function HoverCardContent({
|
|
15
33
|
align,
|
|
16
34
|
className,
|
|
17
35
|
sideOffset,
|
|
18
36
|
...props
|
|
19
37
|
}: HoverCardContentProps): JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* @since 0.3.16-canary.0
|
|
40
|
+
*/
|
|
20
41
|
type HoverCardArrowProps = ComponentProps<typeof HoverCardPrimitive.Arrow>;
|
|
42
|
+
/**
|
|
43
|
+
* @since 0.3.16-canary.0
|
|
44
|
+
*/
|
|
21
45
|
declare function HoverCardArrow({
|
|
22
46
|
className,
|
|
23
47
|
...props
|
|
@@ -3,18 +3,27 @@ import { cn } from "../lib/utils.mjs";
|
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
|
|
5
5
|
//#region src/components/hover-card.tsx
|
|
6
|
+
/**
|
|
7
|
+
* @since 0.3.16-canary.0
|
|
8
|
+
*/
|
|
6
9
|
function HoverCard({ ...props }) {
|
|
7
10
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, {
|
|
8
11
|
"data-slot": "hover-card",
|
|
9
12
|
...props
|
|
10
13
|
});
|
|
11
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* @since 0.3.16-canary.0
|
|
17
|
+
*/
|
|
12
18
|
function HoverCardTrigger({ ...props }) {
|
|
13
19
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, {
|
|
14
20
|
"data-slot": "hover-card-trigger",
|
|
15
21
|
...props
|
|
16
22
|
});
|
|
17
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* @since 0.3.16-canary.0
|
|
26
|
+
*/
|
|
18
27
|
function HoverCardContent({ align = "center", className, sideOffset = 4, ...props }) {
|
|
19
28
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx(HoverCardPrimitive.Content, {
|
|
20
29
|
align,
|
|
@@ -24,6 +33,9 @@ function HoverCardContent({ align = "center", className, sideOffset = 4, ...prop
|
|
|
24
33
|
...props
|
|
25
34
|
}) });
|
|
26
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* @since 0.3.16-canary.0
|
|
38
|
+
*/
|
|
27
39
|
function HoverCardArrow({ className, ...props }) {
|
|
28
40
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Arrow, {
|
|
29
41
|
className: cn("fill-popover", className),
|
|
@@ -6,7 +6,13 @@ import * as _$_codefast_tailwind_variants0 from "@codefast/tailwind-variants";
|
|
|
6
6
|
import { ComponentProps, JSX } from "react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/input-group.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* @since 0.3.16-canary.0
|
|
11
|
+
*/
|
|
9
12
|
declare const inputGroupVariants: _$_codefast_tailwind_variants0.VariantFunctionType<_$_codefast_tailwind_variants0.ConfigurationSchema, Record<string, never>>;
|
|
13
|
+
/**
|
|
14
|
+
* @since 0.3.16-canary.0
|
|
15
|
+
*/
|
|
10
16
|
declare const inputGroupAddonVariants: _$_codefast_tailwind_variants0.VariantFunctionType<{
|
|
11
17
|
align: {
|
|
12
18
|
"block-end": string[];
|
|
@@ -15,6 +21,9 @@ declare const inputGroupAddonVariants: _$_codefast_tailwind_variants0.VariantFun
|
|
|
15
21
|
"inline-start": string[];
|
|
16
22
|
};
|
|
17
23
|
}, Record<string, never>>;
|
|
24
|
+
/**
|
|
25
|
+
* @since 0.3.16-canary.0
|
|
26
|
+
*/
|
|
18
27
|
declare const inputGroupButtonVariants: _$_codefast_tailwind_variants0.VariantFunctionType<{
|
|
19
28
|
size: {
|
|
20
29
|
"icon-sm": string[];
|
|
@@ -23,18 +32,36 @@ declare const inputGroupButtonVariants: _$_codefast_tailwind_variants0.VariantFu
|
|
|
23
32
|
xs: string[];
|
|
24
33
|
};
|
|
25
34
|
}, Record<string, never>>;
|
|
35
|
+
/**
|
|
36
|
+
* @since 0.3.16-canary.0
|
|
37
|
+
*/
|
|
26
38
|
type InputGroupProps = ComponentProps<"div">;
|
|
39
|
+
/**
|
|
40
|
+
* @since 0.3.16-canary.0
|
|
41
|
+
*/
|
|
27
42
|
declare function InputGroup({
|
|
28
43
|
className,
|
|
29
44
|
...props
|
|
30
45
|
}: InputGroupProps): JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* @since 0.3.16-canary.0
|
|
48
|
+
*/
|
|
31
49
|
type InputGroupAddonProps = ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>;
|
|
50
|
+
/**
|
|
51
|
+
* @since 0.3.16-canary.0
|
|
52
|
+
*/
|
|
32
53
|
declare function InputGroupAddon({
|
|
33
54
|
align,
|
|
34
55
|
className,
|
|
35
56
|
...props
|
|
36
57
|
}: InputGroupAddonProps): JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* @since 0.3.16-canary.0
|
|
60
|
+
*/
|
|
37
61
|
type InputGroupButtonProps = Omit<ButtonProps, "size"> & VariantProps<typeof inputGroupButtonVariants>;
|
|
62
|
+
/**
|
|
63
|
+
* @since 0.3.16-canary.0
|
|
64
|
+
*/
|
|
38
65
|
declare function InputGroupButton({
|
|
39
66
|
className,
|
|
40
67
|
size,
|
|
@@ -42,17 +69,35 @@ declare function InputGroupButton({
|
|
|
42
69
|
variant,
|
|
43
70
|
...props
|
|
44
71
|
}: InputGroupButtonProps): JSX.Element;
|
|
72
|
+
/**
|
|
73
|
+
* @since 0.3.16-canary.0
|
|
74
|
+
*/
|
|
45
75
|
type InputGroupTextProps = ComponentProps<"span">;
|
|
76
|
+
/**
|
|
77
|
+
* @since 0.3.16-canary.0
|
|
78
|
+
*/
|
|
46
79
|
declare function InputGroupText({
|
|
47
80
|
className,
|
|
48
81
|
...props
|
|
49
82
|
}: InputGroupTextProps): JSX.Element;
|
|
83
|
+
/**
|
|
84
|
+
* @since 0.3.16-canary.0
|
|
85
|
+
*/
|
|
50
86
|
type InputGroupInputProps = InputProps;
|
|
87
|
+
/**
|
|
88
|
+
* @since 0.3.16-canary.0
|
|
89
|
+
*/
|
|
51
90
|
declare function InputGroupInput({
|
|
52
91
|
className,
|
|
53
92
|
...props
|
|
54
93
|
}: InputGroupInputProps): JSX.Element;
|
|
94
|
+
/**
|
|
95
|
+
* @since 0.3.16-canary.0
|
|
96
|
+
*/
|
|
55
97
|
type InputGroupTextareaProps = TextareaProps;
|
|
98
|
+
/**
|
|
99
|
+
* @since 0.3.16-canary.0
|
|
100
|
+
*/
|
|
56
101
|
declare function InputGroupTextarea({
|
|
57
102
|
className,
|
|
58
103
|
...props
|
|
@@ -5,6 +5,9 @@ import { Input } from "./input.mjs";
|
|
|
5
5
|
import { Textarea } from "./textarea.mjs";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/input-group.tsx
|
|
8
|
+
/**
|
|
9
|
+
* @since 0.3.16-canary.0
|
|
10
|
+
*/
|
|
8
11
|
const inputGroupVariants = tv({ base: [
|
|
9
12
|
"group/input-group relative flex h-9 w-full min-w-0 items-center",
|
|
10
13
|
"rounded-lg border border-input shadow-xs outline-none",
|
|
@@ -21,6 +24,9 @@ const inputGroupVariants = tv({ base: [
|
|
|
21
24
|
"has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-2",
|
|
22
25
|
"has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-2"
|
|
23
26
|
] });
|
|
27
|
+
/**
|
|
28
|
+
* @since 0.3.16-canary.0
|
|
29
|
+
*/
|
|
24
30
|
const inputGroupAddonVariants = tv({
|
|
25
31
|
base: [
|
|
26
32
|
"flex h-auto items-center justify-center gap-2 py-1.5",
|
|
@@ -56,6 +62,9 @@ const inputGroupAddonVariants = tv({
|
|
|
56
62
|
]
|
|
57
63
|
} }
|
|
58
64
|
});
|
|
65
|
+
/**
|
|
66
|
+
* @since 0.3.16-canary.0
|
|
67
|
+
*/
|
|
59
68
|
const inputGroupButtonVariants = tv({
|
|
60
69
|
base: [
|
|
61
70
|
"flex items-center gap-2",
|
|
@@ -84,6 +93,9 @@ const inputGroupButtonVariants = tv({
|
|
|
84
93
|
]
|
|
85
94
|
} }
|
|
86
95
|
});
|
|
96
|
+
/**
|
|
97
|
+
* @since 0.3.16-canary.0
|
|
98
|
+
*/
|
|
87
99
|
function InputGroup({ className, ...props }) {
|
|
88
100
|
return /* @__PURE__ */ jsx("div", {
|
|
89
101
|
className: inputGroupVariants({ className }),
|
|
@@ -92,6 +104,9 @@ function InputGroup({ className, ...props }) {
|
|
|
92
104
|
...props
|
|
93
105
|
});
|
|
94
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* @since 0.3.16-canary.0
|
|
109
|
+
*/
|
|
95
110
|
function InputGroupAddon({ align = "inline-start", className, ...props }) {
|
|
96
111
|
return /* @__PURE__ */ jsx("div", {
|
|
97
112
|
className: cn(inputGroupAddonVariants({ align }), className),
|
|
@@ -107,6 +122,9 @@ function InputGroupAddon({ align = "inline-start", className, ...props }) {
|
|
|
107
122
|
...props
|
|
108
123
|
});
|
|
109
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* @since 0.3.16-canary.0
|
|
127
|
+
*/
|
|
110
128
|
function InputGroupButton({ className, size = "xs", type = "button", variant = "ghost", ...props }) {
|
|
111
129
|
return /* @__PURE__ */ jsx(Button, {
|
|
112
130
|
className: cn(inputGroupButtonVariants({ size }), className),
|
|
@@ -117,6 +135,9 @@ function InputGroupButton({ className, size = "xs", type = "button", variant = "
|
|
|
117
135
|
...props
|
|
118
136
|
});
|
|
119
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* @since 0.3.16-canary.0
|
|
140
|
+
*/
|
|
120
141
|
function InputGroupText({ className, ...props }) {
|
|
121
142
|
return /* @__PURE__ */ jsx("span", {
|
|
122
143
|
className: cn("flex items-center gap-2 text-sm text-muted-foreground", "[&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -124,6 +145,9 @@ function InputGroupText({ className, ...props }) {
|
|
|
124
145
|
...props
|
|
125
146
|
});
|
|
126
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* @since 0.3.16-canary.0
|
|
150
|
+
*/
|
|
127
151
|
function InputGroupInput({ className, ...props }) {
|
|
128
152
|
return /* @__PURE__ */ jsx(Input, {
|
|
129
153
|
className: cn("flex-1", "px-3 py-1", "rounded-none border-0", "bg-transparent shadow-none", "focus-visible:ring-0", "dark:bg-transparent", className),
|
|
@@ -131,6 +155,9 @@ function InputGroupInput({ className, ...props }) {
|
|
|
131
155
|
...props
|
|
132
156
|
});
|
|
133
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* @since 0.3.16-canary.0
|
|
160
|
+
*/
|
|
134
161
|
function InputGroupTextarea({ className, ...props }) {
|
|
135
162
|
return /* @__PURE__ */ jsx(Textarea, {
|
|
136
163
|
className: cn("flex-1", "py-3", "rounded-none border-0", "bg-transparent shadow-none", "resize-none", "focus-visible:ring-0", "dark:bg-transparent", className),
|
|
@@ -2,7 +2,13 @@ import { Field as InputNumberField, InputNumber as InputNumber$1 } from "../prim
|
|
|
2
2
|
import { ComponentProps, JSX } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/input-number.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.3.16-canary.0
|
|
7
|
+
*/
|
|
5
8
|
interface InputNumberProps extends ComponentProps<typeof InputNumberField>, ComponentProps<typeof InputNumber$1> {}
|
|
9
|
+
/**
|
|
10
|
+
* @since 0.3.16-canary.0
|
|
11
|
+
*/
|
|
6
12
|
declare function InputNumber({
|
|
7
13
|
ariaDecrementLabel,
|
|
8
14
|
ariaIncrementLabel,
|
|
@@ -6,6 +6,9 @@ import { DecrementButton as InputNumberDecrementButton, Field as InputNumberFiel
|
|
|
6
6
|
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region src/components/input-number.tsx
|
|
9
|
+
/**
|
|
10
|
+
* @since 0.3.16-canary.0
|
|
11
|
+
*/
|
|
9
12
|
function InputNumber({ ariaDecrementLabel, ariaIncrementLabel, className, defaultValue, disabled, formatOptions, id, loaderPosition, loading, max, min, onChange, prefix, readOnly, spinner, step, suffix, value, ...props }) {
|
|
10
13
|
return /* @__PURE__ */ jsxs(InputNumber$1, {
|
|
11
14
|
ariaDecrementLabel,
|
|
@@ -2,26 +2,50 @@ import { ComponentProps, JSX } from "react";
|
|
|
2
2
|
import { OTPInput, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
3
3
|
|
|
4
4
|
//#region src/components/input-otp.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.3.16-canary.0
|
|
7
|
+
*/
|
|
5
8
|
type InputOTPProps = ComponentProps<typeof OTPInput>;
|
|
9
|
+
/**
|
|
10
|
+
* @since 0.3.16-canary.0
|
|
11
|
+
*/
|
|
6
12
|
declare function InputOTP({
|
|
7
13
|
className,
|
|
8
14
|
containerClassName,
|
|
9
15
|
...props
|
|
10
16
|
}: InputOTPProps): JSX.Element;
|
|
17
|
+
/**
|
|
18
|
+
* @since 0.3.16-canary.0
|
|
19
|
+
*/
|
|
11
20
|
type InputOTPGroupProps = ComponentProps<"div">;
|
|
21
|
+
/**
|
|
22
|
+
* @since 0.3.16-canary.0
|
|
23
|
+
*/
|
|
12
24
|
declare function InputOTPGroup({
|
|
13
25
|
className,
|
|
14
26
|
...props
|
|
15
27
|
}: InputOTPGroupProps): JSX.Element;
|
|
28
|
+
/**
|
|
29
|
+
* @since 0.3.16-canary.0
|
|
30
|
+
*/
|
|
16
31
|
interface InputOTPSlotProps extends ComponentProps<"div"> {
|
|
17
32
|
index: number;
|
|
18
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* @since 0.3.16-canary.0
|
|
36
|
+
*/
|
|
19
37
|
declare function InputOTPSlot({
|
|
20
38
|
className,
|
|
21
39
|
index,
|
|
22
40
|
...props
|
|
23
41
|
}: InputOTPSlotProps): JSX.Element;
|
|
42
|
+
/**
|
|
43
|
+
* @since 0.3.16-canary.0
|
|
44
|
+
*/
|
|
24
45
|
type InputOTPSeparatorProps = ComponentProps<"div">;
|
|
46
|
+
/**
|
|
47
|
+
* @since 0.3.16-canary.0
|
|
48
|
+
*/
|
|
25
49
|
declare function InputOTPSeparator({
|
|
26
50
|
...props
|
|
27
51
|
}: InputOTPSeparatorProps): JSX.Element;
|
|
@@ -5,6 +5,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import { use } from "react";
|
|
6
6
|
import { OTPInput, OTPInputContext, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
|
7
7
|
//#region src/components/input-otp.tsx
|
|
8
|
+
/**
|
|
9
|
+
* @since 0.3.16-canary.0
|
|
10
|
+
*/
|
|
8
11
|
function InputOTP({ className, containerClassName, ...props }) {
|
|
9
12
|
return /* @__PURE__ */ jsx(OTPInput, {
|
|
10
13
|
"aria-label": "One-time password",
|
|
@@ -14,6 +17,9 @@ function InputOTP({ className, containerClassName, ...props }) {
|
|
|
14
17
|
...props
|
|
15
18
|
});
|
|
16
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @since 0.3.16-canary.0
|
|
22
|
+
*/
|
|
17
23
|
function InputOTPGroup({ className, ...props }) {
|
|
18
24
|
return /* @__PURE__ */ jsx("div", {
|
|
19
25
|
className: cn("flex items-center -space-x-px", className),
|
|
@@ -22,6 +28,9 @@ function InputOTPGroup({ className, ...props }) {
|
|
|
22
28
|
...props
|
|
23
29
|
});
|
|
24
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* @since 0.3.16-canary.0
|
|
33
|
+
*/
|
|
25
34
|
function InputOTPSlot({ className, index, ...props }) {
|
|
26
35
|
const slot = use(OTPInputContext).slots[index];
|
|
27
36
|
if (slot === void 0) throw new Error(`InputOTPSlot: no slot at index ${index}`);
|
|
@@ -37,6 +46,9 @@ function InputOTPSlot({ className, index, ...props }) {
|
|
|
37
46
|
}) : null]
|
|
38
47
|
});
|
|
39
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* @since 0.3.16-canary.0
|
|
51
|
+
*/
|
|
40
52
|
function InputOTPSeparator({ ...props }) {
|
|
41
53
|
return /* @__PURE__ */ jsx("div", {
|
|
42
54
|
"data-slot": "input-otp-separator",
|
|
@@ -2,7 +2,13 @@ import { InputGroupInput } from "./input-group.mjs";
|
|
|
2
2
|
import { ComponentProps, JSX } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/input-password.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.3.16-canary.0
|
|
7
|
+
*/
|
|
5
8
|
type InputPasswordProps = Omit<ComponentProps<typeof InputGroupInput>, "type">;
|
|
9
|
+
/**
|
|
10
|
+
* @since 0.3.16-canary.0
|
|
11
|
+
*/
|
|
6
12
|
declare function InputPassword({
|
|
7
13
|
className,
|
|
8
14
|
disabled,
|
|
@@ -5,6 +5,9 @@ import { EyeIcon, EyeOffIcon } from "lucide-react";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useCallback, useState } from "react";
|
|
7
7
|
//#region src/components/input-password.tsx
|
|
8
|
+
/**
|
|
9
|
+
* @since 0.3.16-canary.0
|
|
10
|
+
*/
|
|
8
11
|
function InputPassword({ className, disabled, readOnly, ...props }) {
|
|
9
12
|
const [type, setType] = useState("password");
|
|
10
13
|
const togglePasswordVisibility = useCallback(() => {
|
|
@@ -2,11 +2,17 @@ import { InputGroupInput } from "./input-group.mjs";
|
|
|
2
2
|
import { ComponentProps, JSX } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/components/input-search.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.3.16-canary.0
|
|
7
|
+
*/
|
|
5
8
|
interface InputSearchProps extends Omit<ComponentProps<typeof InputGroupInput>, "defaultValue" | "onChange" | "type" | "value"> {
|
|
6
9
|
defaultValue?: string;
|
|
7
10
|
onChange?: (value?: string) => void;
|
|
8
11
|
value?: string;
|
|
9
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* @since 0.3.16-canary.0
|
|
15
|
+
*/
|
|
10
16
|
declare function InputSearch({
|
|
11
17
|
className,
|
|
12
18
|
defaultValue,
|
|
@@ -5,6 +5,9 @@ import { SearchIcon, XIcon } from "lucide-react";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { useControllableState } from "@radix-ui/react-use-controllable-state";
|
|
7
7
|
//#region src/components/input-search.tsx
|
|
8
|
+
/**
|
|
9
|
+
* @since 0.3.16-canary.0
|
|
10
|
+
*/
|
|
8
11
|
function InputSearch({ className, defaultValue, disabled, onChange, readOnly, value: valueProperty, ...props }) {
|
|
9
12
|
const [value, setValue] = useControllableState({
|
|
10
13
|
defaultProp: defaultValue,
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { ComponentProps, JSX } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/input.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @since 0.3.16-canary.0
|
|
6
|
+
*/
|
|
4
7
|
type InputProps = ComponentProps<"input">;
|
|
8
|
+
/**
|
|
9
|
+
* @since 0.3.16-canary.0
|
|
10
|
+
*/
|
|
5
11
|
declare function Input({
|
|
6
12
|
className,
|
|
7
13
|
type,
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { cn } from "../lib/utils.mjs";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/input.tsx
|
|
5
|
+
/**
|
|
6
|
+
* @since 0.3.16-canary.0
|
|
7
|
+
*/
|
|
5
8
|
function Input({ className, type, ...props }) {
|
|
6
9
|
return /* @__PURE__ */ jsx("input", {
|
|
7
10
|
className: cn("h-9 w-full min-w-0 px-3 py-1", "rounded-lg border border-input", "bg-transparent shadow-xs outline-none", "text-base", "transition-[color,box-shadow]", "selection:bg-primary selection:text-primary-foreground", "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground", "placeholder:text-muted-foreground", "disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50", "md:text-sm", "dark:bg-input/30", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50", "aria-invalid:border-destructive aria-invalid:ring-destructive/20", "dark:aria-invalid:ring-destructive/40", className),
|